@abtnode/blocklet-services 1.16.38-beta-20250110-093740-edc58f78 → 1.16.38-beta-20250114-011103-277f0108
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.
- package/api/libs/connect/session.js +47 -9
- package/api/routes/oauth.js +5 -7
- package/api/routes/user.js +6 -8
- package/dist/assets/{access-control-DcliPEX2.js → access-control-DYH-J6hX.js} +1 -1
- package/dist/assets/{add-component-core-DSlHbXth.js → add-component-core-BWkCzqAe.js} +1 -1
- package/dist/assets/{add-resource-B9SUcn9b.js → add-resource-gJH8Kf-h.js} +1 -1
- package/dist/assets/{analytics-BVmtToBr.js → analytics-Bv-kTIMo.js} +1 -1
- package/dist/assets/{audit-logs-DOpEhbRi.js → audit-logs-1KlkVb5T.js} +1 -1
- package/dist/assets/{branding-BIbnR-Yt.js → branding-CKhye1G1.js} +2 -2
- package/dist/assets/{bundle-avatar-DqROxHMq.js → bundle-avatar-B19h7IBb.js} +1 -1
- package/dist/assets/{complete-B_C_fwut.js → complete-XH7CJJ1E.js} +1 -1
- package/dist/assets/{component-eAmweIYL.js → component-B4nl0OGh.js} +1 -1
- package/dist/assets/{config-CWoxBu0J.js → config-B8mAOrZA.js} +1 -1
- package/dist/assets/{config-navigation-jKhcoDId.js → config-navigation-Y__TwRFz.js} +3 -3
- package/dist/assets/{config-space-Dofzrh5m.js → config-space-DJZf5rEq.js} +1 -1
- package/dist/assets/{confirm-C0rryr4e.js → confirm-CucPiuHr.js} +1 -1
- package/dist/assets/{connect-Wiz0Gw9I.js → connect-CPSe4Vws.js} +1 -1
- package/dist/assets/{connect-CfWNBUY4.js → connect-DH0hj2CX.js} +1 -1
- package/dist/assets/{connect-to-Dsq1ST9l.js → connect-to-DfzH7XJt.js} +1 -1
- package/dist/assets/{dashboard-Ca8O6iHB.js → dashboard-D7XqaqMa.js} +3 -3
- package/dist/assets/{domain-DJyjDPmO.js → domain-D80mBbZ5.js} +1 -1
- package/dist/assets/{domain-list-BEjAE8hh.js → domain-list-DGgkgu6r.js} +1 -1
- package/dist/assets/{email-C3ggDSGp.js → email-C1ha_p9W.js} +1 -1
- package/dist/assets/{exchange-passport-4QuzoW2F.js → exchange-passport-4uu5i0rP.js} +1 -1
- package/dist/assets/{form-text-input-CT57jMfW.js → form-text-input-DB90dWTR.js} +1 -1
- package/dist/assets/{fuel-CJ-CsgDu.js → fuel-PiarpzYg.js} +1 -1
- package/dist/assets/{index-CQT4qLcx.js → index-8ktBk2aq.js} +1 -1
- package/dist/assets/{index-CrvlY8Z5.js → index-B5PaGLoo.js} +1 -1
- package/dist/assets/{index-CqPx8QUY.js → index-BCUhK2IK.js} +1 -1
- package/dist/assets/{index-l4yaELph.js → index-BPFeU32W.js} +1 -1
- package/dist/assets/{index-BZnWmdZ0.js → index-BdipdMDv.js} +1 -1
- package/dist/assets/{index-BPF3oif7.js → index-CYcUSW9Y.js} +5 -5
- package/dist/assets/{index-IdPbsC-k.js → index-Cn9hlGXz.js} +1 -1
- package/dist/assets/{index-DMelUylN.js → index-D97FQw7_.js} +3 -3
- package/dist/assets/{index-BQxL3qXG.js → index-DDHKg1sP.js} +1 -1
- package/dist/assets/{index-wG4Kh8A_.js → index-DgZ1ypbb.js} +3 -3
- package/dist/assets/{index-Bxg1LKG8.js → index-N-iuMUsJ.js} +1 -1
- package/dist/assets/{index-ROkOEO9F.js → index-PIIZTXU1.js} +1 -1
- package/dist/assets/{invitation-Dn2JFqk3.js → invitation-D0h9V7Yr.js} +1 -1
- package/dist/assets/{invite-k-THgUaE.js → invite-CLadQHSg.js} +1 -1
- package/dist/assets/{issue-passport-Cp0z7zOC.js → issue-passport-DOvL3-GM.js} +1 -1
- package/dist/assets/{item-DqTNLhw3.js → item-BKMUYpdp.js} +1 -1
- package/dist/assets/{layout-BRN0uPvp.js → layout-Bb4get3W.js} +1 -1
- package/dist/assets/{log-D1ShKaDY.js → log-r4HRH3tf.js} +1 -1
- package/dist/assets/{login-D9awP98G.js → login-IiYHalJQ.js} +1 -1
- package/dist/assets/{logo-uploader-BA8U554_.js → logo-uploader-C1-XCCMv.js} +3 -3
- package/dist/assets/{lost-passport-kJqVsdV1.js → lost-passport-EcYlR7v6.js} +1 -1
- package/dist/assets/open-window-B-5Hms7z.js +1 -1
- package/dist/assets/{overview-4bff7RWe.js → overview-Bc6RN_5G.js} +1 -1
- package/dist/assets/{publish-resource-BhQQlAPL.js → publish-resource-cSMHC1nt.js} +1 -1
- package/dist/assets/{relative-time-BXb5Mt72.js → relative-time-BzZIQh7e.js} +1 -1
- package/dist/assets/{setup-DTQXAoXZ.js → setup-CdCyHLLn.js} +3 -3
- package/dist/assets/{start-DNpygdxp.js → start-owo1aKq8.js} +1 -1
- package/dist/assets/{step-actions-ClTz1KhK.js → step-actions-DnckX9Zh.js} +1 -1
- package/dist/assets/{transfer-A_yTwCWw.js → transfer-De5_Rua8.js} +1 -1
- package/dist/assets/{unsubscribe-uaBnibKD.js → unsubscribe-B0kFTEaS.js} +1 -1
- package/dist/assets/{user-center-B3stHKHJ.js → user-center-B9_0ML8Q.js} +1 -1
- package/dist/assets/{util-ao8gSgii.js → util-Ci0WMGC4.js} +1 -1
- package/dist/assets/{wrap-locale-DNve09jN.js → wrap-locale-D_rplmnG.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/dist/share/shared-service-worker.js +60 -2
- package/package.json +21 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as B}from"./vendor-react-D-afvo_7.js";import{g as x,bo as R,z as m,bp as J,v as O,bq as F,br as M}from"./vendor-arcblock-CiLB_TiI.js";import{j as e,a3 as g,T as u,E as r,I as D,aw as Z}from"./vendor-mui-core-BlX2BJoA.js";import"./vendor-hooks-CLzfFpO7.js";import{u as Q}from"./config-space-Dofzrh5m.js";import{f as j,h as T,B as k,y as L,$ as w,ab as V}from"./index-wG4Kh8A_.js";import{d as H}from"./DeleteOutline-VzoIEqow.js";import{f as y}from"./format-error-C0Ke3VXF.js";import{a as G,j as N}from"./vendor-utils-DCpRgzMR.js";import"./api-C0C4sDJA.js";var S=function(c){return e.jsxs("svg",{...c,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsf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kJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};S.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function b(){const{t}=x();return e.jsx(g,{children:e.jsxs(g,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(S,{style:{width:250,height:250}}),e.jsx(u,{marginTop:"24px",children:t("storage.spaces.connect.providerForStorage")})]})})}b.propTypes={};function C({spaceGateway:t,onDeleteSpace:c}){const{t:o}=x(),[l,i]=B.useState(!1),[a,p]=B.useState(!1),d=(s,h)=>{s==null||s.stopPropagation(),i(h)},f=async s=>{try{s==null||s.stopPropagation(),p(!0),await c(t),i(!1)}catch(h){console.error(h),m.error(`${o("storage.spaces.gateway.delete.failed")}: ${y(h)}`)}finally{p(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(D,{size:"small",onClick:s=>d(s,!0),children:e.jsx(H,{})}),e.jsx(R,{title:o("storage.spaces.gateway.delete.title"),open:l,confirmButton:{text:o("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:a}},cancelButton:{text:o("common.cancel"),props:{size:"small",variant:"outlined"}},onConfirm:f,onCancel:s=>d(s,!1),children:e.jsx(u,{sx:{wordWrap:"break-word"},children:o("storage.spaces.gateway.delete.descForStorage",{name:`${t==null?void 0:t.name}`})})})]})}C.propTypes={onDeleteSpace:r.func,spaceGateway:r.shape({name:r.string.isRequired,url:r.string.isRequired,protected:r.bool}).isRequired};C.defaultProps={onDeleteSpace:()=>{}};function v({spaceGateway:t,onDisconnect:c}){const{t:o}=x(),l=async()=>{try{await c(),m.success(o("storage.spaces.gateway.delete.succeeded",{name:t.name}))}catch(i){console.error(i),m.error(y(i))}};return e.jsx(C,{spaceGateway:t,onDeleteSpace:l})}v.propTypes={spaceGateway:r.shape({did:r.string.isRequired,name:r.string.isRequired,url:r.string.isRequired,endpoint:r.string.isRequired}).isRequired,onDisconnect:r.func};v.defaultProps={onDisconnect:()=>{}};function s1(){const{t}=x(),{spaceGateway:c,settingStorageEndpoint:o}=Q();return e.jsxs(g,{display:"flex",flexDirection:"column",children:[e.jsx(g,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:e.jsx(u,{fontSize:"1rem",fontWeight:"bold",children:t("storage.spaces.connected.title")})}),e.jsx(g,{children:e.jsx(J,{sx:{marginTop:2},endpoint:c.endpoint,selected:!0,action:l=>e.jsx(v,{...l,onDisconnect:()=>o(null)})})})]})}function X({blocklet:t}){var f,s,h;if(O(t))return{};const{appDid:c}=t,o=j.getAppName(t),l=j.getAppDescription(t),i=(h=(s=(f=t==null?void 0:t.site)==null?void 0:f.domainAliases)==null?void 0:s.sort((n,A)=>n.accessibility.accessible&&A.accessibility.accessible?+n.isProtected-+A.isProtected:+A.accessibility.accessible-+n.accessibility.accessible))==null?void 0:h.map(n=>{var I;const A=(I=n==null?void 0:n.domainStatus)!=null&&I.isHttps?"https://":"http://",E=n==null?void 0:n.value;return`${A}${E}`}).filter(Boolean),a=i==null?void 0:i[0],p=T.DID_SPACES.AUTHORIZE.DEFAULT_SCOPE,d=window.location.href;return{appDid:c,appName:o,appDescription:l,appUrl:a,scopes:p,referrer:d,isReady:!!a}}function U({onConnect:t,...c}){const{blocklet:o}=k(),{info:l}=L(),{t:i}=x(),a=X({blocklet:o}),p=w(l),d={checkFn:G.create({baseURL:N(window.location.origin,V())}).get,webWalletUrl:p,extraParams:{appPid:o.appPid,appDid:a.appDid,appName:a.appName,appDescription:a.appDescription,appUrl:a.appUrl,referrer:a.referrer,scopes:a.scopes,nodeDid:l.did}},f=async(s,h)=>{try{const n=M(s,h);await t(n),m.success(i("storage.spaces.connectedWithName",{name:n.name}))}catch(n){console.error(n),m.error(y(n))}};return e.jsx(F,{...c,options:d,onSuccess:f})}U.propTypes={onConnect:Z.func};U.defaultProps={onConnect:()=>{}};export{s1 as C,b as D,U as a,X as u};
|
|
1
|
+
import{r as B}from"./vendor-react-D-afvo_7.js";import{g as x,bo as R,z as m,bp as J,v as O,bq as F,br as M}from"./vendor-arcblock-CiLB_TiI.js";import{j as e,a3 as g,T as u,E as r,I as D,aw as Z}from"./vendor-mui-core-BlX2BJoA.js";import"./vendor-hooks-CLzfFpO7.js";import{u as Q}from"./config-space-DJZf5rEq.js";import{f as j,h as T,B as k,y as L,$ as w,ab as V}from"./index-DgZ1ypbb.js";import{d as H}from"./DeleteOutline-VzoIEqow.js";import{f as y}from"./format-error-C0Ke3VXF.js";import{a as G,j as N}from"./vendor-utils-DCpRgzMR.js";import"./api-C0C4sDJA.js";var S=function(c){return e.jsxs("svg",{...c,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy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XB3q1TK2GWGjxhtr146ZKTKWPp9sR8MWBNzQTNNrIt4XCVHh+OwfYAo9QybSeFUX5a9bl1On+cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};S.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function b(){const{t}=x();return e.jsx(g,{children:e.jsxs(g,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(S,{style:{width:250,height:250}}),e.jsx(u,{marginTop:"24px",children:t("storage.spaces.connect.providerForStorage")})]})})}b.propTypes={};function C({spaceGateway:t,onDeleteSpace:c}){const{t:o}=x(),[l,i]=B.useState(!1),[a,p]=B.useState(!1),d=(s,h)=>{s==null||s.stopPropagation(),i(h)},f=async s=>{try{s==null||s.stopPropagation(),p(!0),await c(t),i(!1)}catch(h){console.error(h),m.error(`${o("storage.spaces.gateway.delete.failed")}: ${y(h)}`)}finally{p(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(D,{size:"small",onClick:s=>d(s,!0),children:e.jsx(H,{})}),e.jsx(R,{title:o("storage.spaces.gateway.delete.title"),open:l,confirmButton:{text:o("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:a}},cancelButton:{text:o("common.cancel"),props:{size:"small",variant:"outlined"}},onConfirm:f,onCancel:s=>d(s,!1),children:e.jsx(u,{sx:{wordWrap:"break-word"},children:o("storage.spaces.gateway.delete.descForStorage",{name:`${t==null?void 0:t.name}`})})})]})}C.propTypes={onDeleteSpace:r.func,spaceGateway:r.shape({name:r.string.isRequired,url:r.string.isRequired,protected:r.bool}).isRequired};C.defaultProps={onDeleteSpace:()=>{}};function v({spaceGateway:t,onDisconnect:c}){const{t:o}=x(),l=async()=>{try{await c(),m.success(o("storage.spaces.gateway.delete.succeeded",{name:t.name}))}catch(i){console.error(i),m.error(y(i))}};return e.jsx(C,{spaceGateway:t,onDeleteSpace:l})}v.propTypes={spaceGateway:r.shape({did:r.string.isRequired,name:r.string.isRequired,url:r.string.isRequired,endpoint:r.string.isRequired}).isRequired,onDisconnect:r.func};v.defaultProps={onDisconnect:()=>{}};function s1(){const{t}=x(),{spaceGateway:c,settingStorageEndpoint:o}=Q();return e.jsxs(g,{display:"flex",flexDirection:"column",children:[e.jsx(g,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:e.jsx(u,{fontSize:"1rem",fontWeight:"bold",children:t("storage.spaces.connected.title")})}),e.jsx(g,{children:e.jsx(J,{sx:{marginTop:2},endpoint:c.endpoint,selected:!0,action:l=>e.jsx(v,{...l,onDisconnect:()=>o(null)})})})]})}function X({blocklet:t}){var f,s,h;if(O(t))return{};const{appDid:c}=t,o=j.getAppName(t),l=j.getAppDescription(t),i=(h=(s=(f=t==null?void 0:t.site)==null?void 0:f.domainAliases)==null?void 0:s.sort((n,A)=>n.accessibility.accessible&&A.accessibility.accessible?+n.isProtected-+A.isProtected:+A.accessibility.accessible-+n.accessibility.accessible))==null?void 0:h.map(n=>{var I;const A=(I=n==null?void 0:n.domainStatus)!=null&&I.isHttps?"https://":"http://",E=n==null?void 0:n.value;return`${A}${E}`}).filter(Boolean),a=i==null?void 0:i[0],p=T.DID_SPACES.AUTHORIZE.DEFAULT_SCOPE,d=window.location.href;return{appDid:c,appName:o,appDescription:l,appUrl:a,scopes:p,referrer:d,isReady:!!a}}function U({onConnect:t,...c}){const{blocklet:o}=k(),{info:l}=L(),{t:i}=x(),a=X({blocklet:o}),p=w(l),d={checkFn:G.create({baseURL:N(window.location.origin,V())}).get,webWalletUrl:p,extraParams:{appPid:o.appPid,appDid:a.appDid,appName:a.appName,appDescription:a.appDescription,appUrl:a.appUrl,referrer:a.referrer,scopes:a.scopes,nodeDid:l.did}},f=async(s,h)=>{try{const n=M(s,h);await t(n),m.success(i("storage.spaces.connectedWithName",{name:n.name}))}catch(n){console.error(n),m.error(y(n))}};return e.jsx(F,{...c,options:d,onSuccess:f})}U.propTypes={onConnect:Z.func};U.defaultProps={onConnect:()=>{}};export{s1 as C,b as D,U as a,X as u};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-
|
|
2
|
-
import{y as Ne,f as k,h as Z,z as qe,A as Er,b as Ir,B as Lr,C as Tr,D as hn,E as le,F as mn,G as Pr,o as ye,H as Dr,I as Rr,k as Ft,g as Ar,j as Or,m as zt,l as Mr,n as $r,J as De,e as Le,K as kr,_ as K,L as Ht,N as Br,c as Vt}from"./index-wG4Kh8A_.js";import{a1 as N,j as a,E as _,aa as lt,I as gn,ak as Nr,ad as vn,ah as Ur,al as Fr,bp as zr,a2 as ee,bq as Hr,aR as Vr,T as ue,bx as qr,aN as qt,by as Kt,a3 as R,a4 as Xe,bz as yn,bA as xn,bB as bn,aQ as Sn,t as Ue,A as oe,aj as wn,aK as Kr}from"./vendor-mui-core-BlX2BJoA.js";import{ad as U,ao as Wr,af as jn,ap as Gr,ag as ut,d as M,aa as Wt,z as q,g as Y,ab as Qr,aq as Xr,ar as Zr,as as Yr,at as Jr,au as eo,av as to,aw as no,ax as ro,q as oo,ay as so,az as io,aA as ao,aB as co,aC as lo,C as Oe,aD as uo,a6 as fo,aE as po,aF as ho,P as mo,aG as go}from"./vendor-arcblock-CiLB_TiI.js";import{r as x,L as _n,g as vo,f as yo,k as xo,l as bo}from"./vendor-react-D-afvo_7.js";import{_ as Gt}from"./useLocalStorage-CSyjxtUy.js";import{C as Qt}from"./confirm-C0rryr4e.js";import{d as So}from"./PlayArrow-oA7gV2MA.js";import{j as Cn}from"./vendor-utils-DCpRgzMR.js";import{g as Xt}from"./get-safe-url-RTzyOi09.js";import{f as dt}from"./format-error-C0Ke3VXF.js";import{p as En,B as wo}from"./index-CQT4qLcx.js";import{u as jo}from"./session-ocxAyn6f.js";import{D as _o,_ as In}from"./useAsyncRetry-KXMle3o0.js";import{_ as Ln}from"./useSetState-Crt4S51m.js";import{I as Co}from"./vendor-hooks-CLzfFpO7.js";var ft={},Eo=N;Object.defineProperty(ft,"__esModule",{value:!0});var Tn=ft.default=void 0,Io=Eo(U()),Lo=a;Tn=ft.default=(0,Io.default)((0,Lo.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var pt={},To=N;Object.defineProperty(pt,"__esModule",{value:!0});var Pn=pt.default=void 0,Po=To(U()),Do=a;Pn=pt.default=(0,Po.default)((0,Do.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var ht={},Ro=N;Object.defineProperty(ht,"__esModule",{value:!0});var Dn=ht.default=void 0,Ao=Ro(U()),Oo=a;Dn=ht.default=(0,Ao.default)((0,Oo.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var mt={},Mo=N;Object.defineProperty(mt,"__esModule",{value:!0});var Rn=mt.default=void 0,$o=Mo(U()),ko=a;Rn=mt.default=(0,$o.default)((0,ko.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var gt={},Bo=N;Object.defineProperty(gt,"__esModule",{value:!0});var An=gt.default=void 0,No=Bo(U()),Uo=a;An=gt.default=(0,No.default)((0,Uo.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var vt={},Fo=N;Object.defineProperty(vt,"__esModule",{value:!0});var On=vt.default=void 0,zo=Fo(U()),Ho=a;On=vt.default=(0,zo.default)((0,Ho.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var yt={},Vo=N;Object.defineProperty(yt,"__esModule",{value:!0});var Mn=yt.default=void 0,qo=Vo(U()),Ko=a;Mn=yt.default=(0,qo.default)((0,Ko.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var xt={};Object.defineProperty(xt,"__esModule",{value:!0});var $n=xt.default=void 0;Wo(x);var Zt=a;function Wo(e){return e&&e.__esModule?e:{default:e}}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Jt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yt(Object(n),!0).forEach(function(r){Go(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Go(e,t,n){return(t=Qo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qo(e){var t=Xo(e,"string");return typeof t=="symbol"?t:t+""}function Xo(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bt=function(t){return(0,Zt.jsx)("svg",Jt(Jt({},t),{},{children:(0,Zt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})}))};bt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};bt.displayName="dashboard";$n=xt.default=bt;var St={},Zo=N;Object.defineProperty(St,"__esModule",{value:!0});var kn=St.default=void 0,Yo=Zo(U()),Jo=a;kn=St.default=(0,Yo.default)((0,Jo.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const ce={Start:So,Stop:Tn,Restart:Pn,Reload:Dn,Remove:Wr,Config:Rn,Log:An,Group:On,Cancel:Mn,Dashboard:$n,Overview:kn},es=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(Cn(n.origin,t));return o.search=r.toString(),o.toString()},ts="internal",ns="external";function wt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:s,useBlockletUrlEvaluation:i,...c}){const l=Ne(),[d,u]=x.useState(null),[f,p]=x.useState(null),[y,b]=x.useState(!1),[h,L]=x.useState(null),{t:g}=x.useContext(jn),[I]=Gt("skip-blocklet-setup",!1),{loading:j,recommendedUrl:T}=i(e),[$]=Gt("blocklet-type-filter",ts),v=k.isInProgress(e.status),[C,S]=x.useState(!1);x.useEffect(()=>{var D,B;if(!(e!=null&&e.controller))return;S(((B=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:B.value)===Z.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var z,X,ne;try{const H=await l.api.getLauncherSession({input:{launcherSessionId:(z=e==null?void 0:e.controller)==null?void 0:z.launcherSessionId,launcherUrl:(X=e==null?void 0:e.controller)==null?void 0:X.launcherUrl}});if(H!=null&&H.error){console.error("get launcher session failed",H.error);return}S([M.LAUNCH_SESSION_STATUS.overdue,M.LAUNCH_SESSION_STATUS.canceled,M.LAUNCH_SESSION_STATUS.terminated].includes((ne=H==null?void 0:H.launcherSession)==null?void 0:ne.status))}catch(H){console.error("call getLauncherSession error",H)}})()},[]);const{inService:w}=l,E=(m,D,B=!1)=>async()=>{const z=async Ce=>{var Ie;t({action:m,blocklet:e}),b(!0),p(m);let Ee=!1;try{if(m==="remove")await D(Ce);else if(m==="start"){if(!k.hasRunnableComponent(e)){q.error(g("blocklet.noComponent"));return}if(!w&&!I&&!((Ie=e.settings)!=null&&Ie.initialized)&&e.mode!==Z.BLOCKLET_MODES.DEVELOPMENT){if(!T||!Wt(T)){q.error(g("blocklet.gotoVisitError"));return}const W=Er(l.info),Ut=new URL(T);Ut.searchParams.set("serverUrl",W),window.open(Xt(Ut.href,{allowDomains:null})),n({action:m,blocklet:e});return}const re=e.children.filter(W=>!k.isInProgress(W.status)&&W.status!=="running").map(W=>W.meta.did),ae={did:e.meta.did,componentDids:re};await D({input:ae})}else if(["stop","restart","reload"].includes(m)){const re=e.children.filter(W=>W.status==="running").map(W=>W.meta.did),ae={did:e.meta.did,componentDids:re};await D({input:ae})}else{const re={did:e.meta.did};await D({input:re})}m==="remove"?Ee=!0:await Ir(1e3),m==="reload"&&q.success(g("blocklet.reloadSuccess")),L(null),n({action:m,blocklet:e})}catch(re){const ae=`Blocklet ${m} failed: ${dt(re)}`;throw n({action:m,blocklet:e,error:new Error(ae)}),new Error(ae)}finally{Ee||b(!1)}},X=()=>{b(!1),L(null)},ne=k.getDisplayName(e,!0),H=e.mode===Z.BLOCKLET_MODES.DEVELOPMENT?{description:()=>a.jsx(ue,{component:"div",children:a.jsx(ue,{gutterBottom:!0,children:g("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Ce,Ee)=>a.jsxs(ue,{component:"div",children:[a.jsx(ue,{gutterBottom:!0,children:g("blocklet.action.removeApplicationDescription")}),a.jsxs(qr,{name:"removeType",value:Ce.removeType,onChange:Ie=>Ee({...Ce,removeType:Ie.target.value}),children:[a.jsx(qt,{value:"backup",control:a.jsx(Kt,{}),label:g("blocklet.action.removeApplicationAfterBackup")}),a.jsx(qt,{value:"complete",control:a.jsx(Kt,{}),label:g("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Cr={stop:{title:`${g("common.stop")} ${ne}`,description:g("blocklet.action.stopDescription"),confirm:g("blocklet.action.confirmStop"),cancel:g("common.cancel"),onConfirm:z,onCancel:X},restart:{title:`${g("common.restart")} ${ne}`,description:g("blocklet.action.restartDescription"),confirm:g("blocklet.action.confirmRestart"),cancel:g("common.cancel"),onConfirm:z,onCancel:X},remove:{title:`${g("common.remove")} ${ne}`,confirm:g("blocklet.action.confirmRemove"),cancel:g("common.cancel"),onConfirm:z,onCancel:X,...H},cancelDownload:{title:`${g("common.cancel")}`,description:g("blocklet.action.cancelDownloadDescription",{name:ne}),confirm:g("common.confirm"),cancel:g("common.cancel"),onConfirm:z,onCancel:X}};B?L(Cr[m]):await z()},P=!!d,Q=m=>{try{m.stopPropagation(),m.preventDefault()}catch{}u(m.currentTarget)},F=m=>{try{m.stopPropagation(),m.preventDefault()}catch{}u(null)},je=async(m,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof m.handler=="function")try{b(!0),p(m.action),await m.handler()}catch(B){console.error(`Blocklet ${m.name} failed: `,B)}finally{b(!1),u(null)}else u(null)},Sr=!w&&k.isDeletableBlocklet(e)?{action:"remove",icon:ce.Remove,name:g("common.remove"),handler:E("remove",async({removeType:m})=>{m==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:v}:null,wr={action:"remove",icon:({sx:m,...D})=>a.jsx(ce.Cancel,{sx:{...m,paddingRight:"2px",zoom:.95},...D}),name:g("common.cancel"),handler:E("cancelDownload",l.api.cancelDownloadBlocklet,!0)},jr=k.getAppMissingConfigs(e),_r=()=>{var z;const m=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=s==null?void 0:s({mountPoint:m,blocklet:e});if(!D||!Wt(D)){q.error(g("blocklet.gotoVisitError"));return}const B=(z=e==null?void 0:e.site)==null?void 0:z.domainAliases;window.open(Xt(es(D,".well-known/service/admin"),{allowDomains:B==null?void 0:B.map(X=>X.value)}))};let _e=[{action:"start",icon:ce.Start,inExternal:!0,name:g("common.start"),handler:E("start",l.api.startBlocklet),disabled:C||e.children.every(m=>m.status==="running")||qe(e.status)||j||v},{action:"stop",icon:ce.Stop,inExternal:!0,name:g("common.stop"),handler:E("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:ce.Restart,name:g("common.restart"),handler:E("restart",l.api.restartBlocklet,!0),disabled:C||e.status!=="running"},qe(e.status)?wr:Sr,{separator:!0},w?null:{action:"dashboard",icon:({style:m,...D})=>a.jsx(ce.Dashboard,{...D,style:{...m,width:"26px",height:"26px",paddingRight:"3px"}}),name:g("sidebar.dashboard"),handler:_r}].filter(Boolean);return $===ns&&(_e=_e.filter(m=>m.inExternal)),r==="menu"?a.jsxs(en,{"data-cy":"blocklet-actions",children:[a.jsx(gn,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:Q,size:"small",disabled:!o||!qe(e.status)&&y,children:a.jsx(Gr,{})}),a.jsxs(Nr,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:P,onClose:F,PaperProps:{},children:[jr.length>0&&a.jsxs(vn,{style:{maxWidth:"400px"},severity:"error",children:[g("blocklet.config.missingRequired"),a.jsx("br",{}),a.jsx(_n,{to:`/blocklets/${e.meta.did}/components`,children:g("blocklet.config.gotoFix")})]}),_e.map((m,D)=>m.separator?a.jsx(Ur,{},`separator-${D}`):a.jsxs(Fr,{dense:!0,onClick:B=>je(m,B),disabled:y||m.disabled,"data-cy":`${m.action}-blocklet`,children:[a.jsx(zr,{style:{minWidth:24},children:f===m.action&&y?a.jsx(ee,{size:16,sx:{marginRight:1}}):a.jsx(m.icon,{fontSize:"small"})}),a.jsx(Hr,{primary:m.name})]},m.name))]}),h&&a.jsx(Qt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):a.jsxs(en,{"data-cy":"blocklet-actions",...c,children:[a.jsx(Vr,{children:_e.filter(m=>!m.separator&&!m.onlyInMenu).map(m=>a.jsxs(ut,{title:m.name,"data-cy":`${m.action}-blocklet`,onClick:()=>je(m),disabled:!!m.disabled||y,children:[f===m.action&&y?a.jsx(ee,{size:16,sx:{marginRight:1}}):a.jsx(m.icon,{}),a.jsx("span",{className:"blocklet-action-text",children:m.name})]},m.name))}),h&&a.jsx(Qt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}wt.propTypes={getComponentUrl:_.func,blocklet:_.object.isRequired,onStart:_.func.isRequired,onComplete:_.func.isRequired,variant:_.oneOf(["menu","group"]),hasPermission:_.bool,useBlockletUrlEvaluation:_.func};wt.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const en=lt.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-Bc6RN_5G.js","assets/vendor-mui-core-BlX2BJoA.js","assets/vendor-react-D-afvo_7.js","assets/vendor-arcblock-CiLB_TiI.js","assets/vendor-utils-DCpRgzMR.js","assets/vendor-hooks-CLzfFpO7.js","assets/vendor-arcblock-DhgPdlEj.css","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/index-mnKcDZP2.js","assets/index-DgZ1ypbb.js","assets/did-address-49U3oRW2.js","assets/domain-list-DGgkgu6r.js","assets/Add-2VCvBnGd.js","assets/base32-COJTblwx.js","assets/LockIcon-DQtUl5vk.js","assets/CheckCircle-BElcljFC.js","assets/util-Ci0WMGC4.js","assets/useSetState-Crt4S51m.js","assets/permission-SgzW7fBj.js","assets/session-ocxAyn6f.js","assets/useAsyncRetry-KXMle3o0.js","assets/useAsync-cdOzMWPw.js","assets/confirm-CucPiuHr.js","assets/format-error-C0Ke3VXF.js","assets/InfoOutlined-BFP30UJa.js","assets/api-C0C4sDJA.js","assets/actions-BEpPU26q.js","assets/MoreHoriz-DnFq43xg.js","assets/useLocalStorage-CSyjxtUy.js","assets/PlayArrow-oA7gV2MA.js","assets/get-safe-url-CVhAz4Qr.js","assets/index-8ktBk2aq.js","assets/index-B5PaGLoo.js","assets/index-DoZ2YM4T.js","assets/Loop-n5c7A0qE.js","assets/ViewList-IMqkd2Sv.js","assets/list-header-Bn1GhGok.js","assets/click-to-copy-DNu8CktB.js","assets/DeleteOutline-VzoIEqow.js","assets/sdk-Dqc91xl4.js","assets/index-N-iuMUsJ.js","assets/shorten-label-BnvWOC_s.js","assets/index-BdipdMDv.js","assets/EditIcon-BF2eKBD0.js","assets/Google-rxW6OGq8.js","assets/index-BPFeU32W.js","assets/iframe-BUonayoL.js","assets/config-d41PVAVu.js","assets/form-text-input-DB90dWTR.js","assets/Done-BCESxXX2.js","assets/logo-uploader-C1-XCCMv.js","assets/ArrowDropDown-BdHlAt9a.js","assets/ChevronRight-B8pf890W.js","assets/bundle-avatar-B19h7IBb.js","assets/simple-select-BwufbE2b.js","assets/isEmail-BWNRBSAy.js","assets/switch-control-D-IROOaC.js","assets/audit-logs-1KlkVb5T.js","assets/index-Bi1xb9O8.js","assets/index-D4PP6P2d.css","assets/relative-time-BzZIQh7e.js","assets/index-D7mJIWyJ.js","assets/log-r4HRH3tf.js","assets/Download-BJmwtO6i.js","assets/log-D33dFtt_.css","assets/index-CYcUSW9Y.js","assets/Error-CpAOVH8t.js","assets/react-beautiful-dnd.esm-C8vTtkBe.js","assets/raf-schd.esm-Cxhj8umC.js","assets/QuestionMarkCircle-gL_QM35Z.js","assets/index-DQSF6ElG.js","assets/vendor-mui-x-Bq1FyQ7S.js","assets/item-BKMUYpdp.js","assets/Launch-BOCFiYoz.js","assets/config-navigation-Y__TwRFz.js","assets/slicedToArray-DNAGECrJ.js","assets/index-BGO2DsWz.js","assets/_createAggregator-B4i0o6gy.js","assets/index-BCUhK2IK.js","assets/use-mobile-DAR0hmJd.js","assets/connect-to-DfzH7XJt.js","assets/config-space-DJZf5rEq.js","assets/component-B4nl0OGh.js","assets/index-DcfIKM1A.js","assets/index-BP6sEHV5.js","assets/ChevronLeft-BfF37o7u.js","assets/add-component-core-BWkCzqAe.js","assets/launch-result-message-zXOcVqEr.js","assets/page-header-6EUz18Qu.js","assets/index-Cn9hlGXz.js","assets/content-layout-CK_AzZZ-.js","assets/add-component-core-D-IRi6XF.css","assets/toUpper-BQrWudMF.js","assets/analytics-Bv-kTIMo.js","assets/LaunchOutlined-B-PaS5ms.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{y as Ne,f as k,h as Z,z as qe,A as Er,b as Ir,B as Lr,C as Tr,D as hn,E as le,F as mn,G as Pr,o as ye,H as Dr,I as Rr,k as Ft,g as Ar,j as Or,m as zt,l as Mr,n as $r,J as De,e as Le,K as kr,_ as K,L as Ht,N as Br,c as Vt}from"./index-DgZ1ypbb.js";import{a1 as N,j as a,E as _,aa as lt,I as gn,ak as Nr,ad as vn,ah as Ur,al as Fr,bp as zr,a2 as ee,bq as Hr,aR as Vr,T as ue,bx as qr,aN as qt,by as Kt,a3 as R,a4 as Xe,bz as yn,bA as xn,bB as bn,aQ as Sn,t as Ue,A as oe,aj as wn,aK as Kr}from"./vendor-mui-core-BlX2BJoA.js";import{ad as U,ao as Wr,af as jn,ap as Gr,ag as ut,d as M,aa as Wt,z as q,g as Y,ab as Qr,aq as Xr,ar as Zr,as as Yr,at as Jr,au as eo,av as to,aw as no,ax as ro,q as oo,ay as so,az as io,aA as ao,aB as co,aC as lo,C as Oe,aD as uo,a6 as fo,aE as po,aF as ho,P as mo,aG as go}from"./vendor-arcblock-CiLB_TiI.js";import{r as x,L as _n,g as vo,f as yo,k as xo,l as bo}from"./vendor-react-D-afvo_7.js";import{_ as Gt}from"./useLocalStorage-CSyjxtUy.js";import{C as Qt}from"./confirm-CucPiuHr.js";import{d as So}from"./PlayArrow-oA7gV2MA.js";import{j as Cn}from"./vendor-utils-DCpRgzMR.js";import{g as Xt}from"./get-safe-url-CVhAz4Qr.js";import{f as dt}from"./format-error-C0Ke3VXF.js";import{p as En,B as wo}from"./index-8ktBk2aq.js";import{u as jo}from"./session-ocxAyn6f.js";import{D as _o,_ as In}from"./useAsyncRetry-KXMle3o0.js";import{_ as Ln}from"./useSetState-Crt4S51m.js";import{I as Co}from"./vendor-hooks-CLzfFpO7.js";var ft={},Eo=N;Object.defineProperty(ft,"__esModule",{value:!0});var Tn=ft.default=void 0,Io=Eo(U()),Lo=a;Tn=ft.default=(0,Io.default)((0,Lo.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var pt={},To=N;Object.defineProperty(pt,"__esModule",{value:!0});var Pn=pt.default=void 0,Po=To(U()),Do=a;Pn=pt.default=(0,Po.default)((0,Do.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var ht={},Ro=N;Object.defineProperty(ht,"__esModule",{value:!0});var Dn=ht.default=void 0,Ao=Ro(U()),Oo=a;Dn=ht.default=(0,Ao.default)((0,Oo.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var mt={},Mo=N;Object.defineProperty(mt,"__esModule",{value:!0});var Rn=mt.default=void 0,$o=Mo(U()),ko=a;Rn=mt.default=(0,$o.default)((0,ko.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var gt={},Bo=N;Object.defineProperty(gt,"__esModule",{value:!0});var An=gt.default=void 0,No=Bo(U()),Uo=a;An=gt.default=(0,No.default)((0,Uo.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var vt={},Fo=N;Object.defineProperty(vt,"__esModule",{value:!0});var On=vt.default=void 0,zo=Fo(U()),Ho=a;On=vt.default=(0,zo.default)((0,Ho.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var yt={},Vo=N;Object.defineProperty(yt,"__esModule",{value:!0});var Mn=yt.default=void 0,qo=Vo(U()),Ko=a;Mn=yt.default=(0,qo.default)((0,Ko.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var xt={};Object.defineProperty(xt,"__esModule",{value:!0});var $n=xt.default=void 0;Wo(x);var Zt=a;function Wo(e){return e&&e.__esModule?e:{default:e}}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Jt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yt(Object(n),!0).forEach(function(r){Go(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Go(e,t,n){return(t=Qo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qo(e){var t=Xo(e,"string");return typeof t=="symbol"?t:t+""}function Xo(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bt=function(t){return(0,Zt.jsx)("svg",Jt(Jt({},t),{},{children:(0,Zt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})}))};bt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};bt.displayName="dashboard";$n=xt.default=bt;var St={},Zo=N;Object.defineProperty(St,"__esModule",{value:!0});var kn=St.default=void 0,Yo=Zo(U()),Jo=a;kn=St.default=(0,Yo.default)((0,Jo.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const ce={Start:So,Stop:Tn,Restart:Pn,Reload:Dn,Remove:Wr,Config:Rn,Log:An,Group:On,Cancel:Mn,Dashboard:$n,Overview:kn},es=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(Cn(n.origin,t));return o.search=r.toString(),o.toString()},ts="internal",ns="external";function wt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:s,useBlockletUrlEvaluation:i,...c}){const l=Ne(),[d,u]=x.useState(null),[f,p]=x.useState(null),[y,b]=x.useState(!1),[h,L]=x.useState(null),{t:g}=x.useContext(jn),[I]=Gt("skip-blocklet-setup",!1),{loading:j,recommendedUrl:T}=i(e),[$]=Gt("blocklet-type-filter",ts),v=k.isInProgress(e.status),[C,S]=x.useState(!1);x.useEffect(()=>{var D,B;if(!(e!=null&&e.controller))return;S(((B=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:B.value)===Z.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var z,X,ne;try{const H=await l.api.getLauncherSession({input:{launcherSessionId:(z=e==null?void 0:e.controller)==null?void 0:z.launcherSessionId,launcherUrl:(X=e==null?void 0:e.controller)==null?void 0:X.launcherUrl}});if(H!=null&&H.error){console.error("get launcher session failed",H.error);return}S([M.LAUNCH_SESSION_STATUS.overdue,M.LAUNCH_SESSION_STATUS.canceled,M.LAUNCH_SESSION_STATUS.terminated].includes((ne=H==null?void 0:H.launcherSession)==null?void 0:ne.status))}catch(H){console.error("call getLauncherSession error",H)}})()},[]);const{inService:w}=l,E=(m,D,B=!1)=>async()=>{const z=async Ce=>{var Ie;t({action:m,blocklet:e}),b(!0),p(m);let Ee=!1;try{if(m==="remove")await D(Ce);else if(m==="start"){if(!k.hasRunnableComponent(e)){q.error(g("blocklet.noComponent"));return}if(!w&&!I&&!((Ie=e.settings)!=null&&Ie.initialized)&&e.mode!==Z.BLOCKLET_MODES.DEVELOPMENT){if(!T||!Wt(T)){q.error(g("blocklet.gotoVisitError"));return}const W=Er(l.info),Ut=new URL(T);Ut.searchParams.set("serverUrl",W),window.open(Xt(Ut.href,{allowDomains:null})),n({action:m,blocklet:e});return}const re=e.children.filter(W=>!k.isInProgress(W.status)&&W.status!=="running").map(W=>W.meta.did),ae={did:e.meta.did,componentDids:re};await D({input:ae})}else if(["stop","restart","reload"].includes(m)){const re=e.children.filter(W=>W.status==="running").map(W=>W.meta.did),ae={did:e.meta.did,componentDids:re};await D({input:ae})}else{const re={did:e.meta.did};await D({input:re})}m==="remove"?Ee=!0:await Ir(1e3),m==="reload"&&q.success(g("blocklet.reloadSuccess")),L(null),n({action:m,blocklet:e})}catch(re){const ae=`Blocklet ${m} failed: ${dt(re)}`;throw n({action:m,blocklet:e,error:new Error(ae)}),new Error(ae)}finally{Ee||b(!1)}},X=()=>{b(!1),L(null)},ne=k.getDisplayName(e,!0),H=e.mode===Z.BLOCKLET_MODES.DEVELOPMENT?{description:()=>a.jsx(ue,{component:"div",children:a.jsx(ue,{gutterBottom:!0,children:g("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Ce,Ee)=>a.jsxs(ue,{component:"div",children:[a.jsx(ue,{gutterBottom:!0,children:g("blocklet.action.removeApplicationDescription")}),a.jsxs(qr,{name:"removeType",value:Ce.removeType,onChange:Ie=>Ee({...Ce,removeType:Ie.target.value}),children:[a.jsx(qt,{value:"backup",control:a.jsx(Kt,{}),label:g("blocklet.action.removeApplicationAfterBackup")}),a.jsx(qt,{value:"complete",control:a.jsx(Kt,{}),label:g("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Cr={stop:{title:`${g("common.stop")} ${ne}`,description:g("blocklet.action.stopDescription"),confirm:g("blocklet.action.confirmStop"),cancel:g("common.cancel"),onConfirm:z,onCancel:X},restart:{title:`${g("common.restart")} ${ne}`,description:g("blocklet.action.restartDescription"),confirm:g("blocklet.action.confirmRestart"),cancel:g("common.cancel"),onConfirm:z,onCancel:X},remove:{title:`${g("common.remove")} ${ne}`,confirm:g("blocklet.action.confirmRemove"),cancel:g("common.cancel"),onConfirm:z,onCancel:X,...H},cancelDownload:{title:`${g("common.cancel")}`,description:g("blocklet.action.cancelDownloadDescription",{name:ne}),confirm:g("common.confirm"),cancel:g("common.cancel"),onConfirm:z,onCancel:X}};B?L(Cr[m]):await z()},P=!!d,Q=m=>{try{m.stopPropagation(),m.preventDefault()}catch{}u(m.currentTarget)},F=m=>{try{m.stopPropagation(),m.preventDefault()}catch{}u(null)},je=async(m,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof m.handler=="function")try{b(!0),p(m.action),await m.handler()}catch(B){console.error(`Blocklet ${m.name} failed: `,B)}finally{b(!1),u(null)}else u(null)},Sr=!w&&k.isDeletableBlocklet(e)?{action:"remove",icon:ce.Remove,name:g("common.remove"),handler:E("remove",async({removeType:m})=>{m==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:v}:null,wr={action:"remove",icon:({sx:m,...D})=>a.jsx(ce.Cancel,{sx:{...m,paddingRight:"2px",zoom:.95},...D}),name:g("common.cancel"),handler:E("cancelDownload",l.api.cancelDownloadBlocklet,!0)},jr=k.getAppMissingConfigs(e),_r=()=>{var z;const m=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=s==null?void 0:s({mountPoint:m,blocklet:e});if(!D||!Wt(D)){q.error(g("blocklet.gotoVisitError"));return}const B=(z=e==null?void 0:e.site)==null?void 0:z.domainAliases;window.open(Xt(es(D,".well-known/service/admin"),{allowDomains:B==null?void 0:B.map(X=>X.value)}))};let _e=[{action:"start",icon:ce.Start,inExternal:!0,name:g("common.start"),handler:E("start",l.api.startBlocklet),disabled:C||e.children.every(m=>m.status==="running")||qe(e.status)||j||v},{action:"stop",icon:ce.Stop,inExternal:!0,name:g("common.stop"),handler:E("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:ce.Restart,name:g("common.restart"),handler:E("restart",l.api.restartBlocklet,!0),disabled:C||e.status!=="running"},qe(e.status)?wr:Sr,{separator:!0},w?null:{action:"dashboard",icon:({style:m,...D})=>a.jsx(ce.Dashboard,{...D,style:{...m,width:"26px",height:"26px",paddingRight:"3px"}}),name:g("sidebar.dashboard"),handler:_r}].filter(Boolean);return $===ns&&(_e=_e.filter(m=>m.inExternal)),r==="menu"?a.jsxs(en,{"data-cy":"blocklet-actions",children:[a.jsx(gn,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:Q,size:"small",disabled:!o||!qe(e.status)&&y,children:a.jsx(Gr,{})}),a.jsxs(Nr,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:P,onClose:F,PaperProps:{},children:[jr.length>0&&a.jsxs(vn,{style:{maxWidth:"400px"},severity:"error",children:[g("blocklet.config.missingRequired"),a.jsx("br",{}),a.jsx(_n,{to:`/blocklets/${e.meta.did}/components`,children:g("blocklet.config.gotoFix")})]}),_e.map((m,D)=>m.separator?a.jsx(Ur,{},`separator-${D}`):a.jsxs(Fr,{dense:!0,onClick:B=>je(m,B),disabled:y||m.disabled,"data-cy":`${m.action}-blocklet`,children:[a.jsx(zr,{style:{minWidth:24},children:f===m.action&&y?a.jsx(ee,{size:16,sx:{marginRight:1}}):a.jsx(m.icon,{fontSize:"small"})}),a.jsx(Hr,{primary:m.name})]},m.name))]}),h&&a.jsx(Qt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):a.jsxs(en,{"data-cy":"blocklet-actions",...c,children:[a.jsx(Vr,{children:_e.filter(m=>!m.separator&&!m.onlyInMenu).map(m=>a.jsxs(ut,{title:m.name,"data-cy":`${m.action}-blocklet`,onClick:()=>je(m),disabled:!!m.disabled||y,children:[f===m.action&&y?a.jsx(ee,{size:16,sx:{marginRight:1}}):a.jsx(m.icon,{}),a.jsx("span",{className:"blocklet-action-text",children:m.name})]},m.name))}),h&&a.jsx(Qt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}wt.propTypes={getComponentUrl:_.func,blocklet:_.object.isRequired,onStart:_.func.isRequired,onComplete:_.func.isRequired,variant:_.oneOf(["menu","group"]),hasPermission:_.bool,useBlockletUrlEvaluation:_.func};wt.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const en=lt.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
|
|
@@ -37,7 +37,7 @@ ${r}
|
|
|
37
37
|
max-height: 400px;
|
|
38
38
|
overflow-y: auto;
|
|
39
39
|
}
|
|
40
|
-
`;function va(){const{t:e,locale:t}=Y(),{blocklet:n,launcherSession:r}=ye(),[o,s]=Co({subscriptionURL:"#"});if(x.useEffect(()=>{var l,d;Ft(n,r)&&Ar({launcherSessionId:(l=n==null?void 0:n.controller)==null?void 0:l.launcherSessionId,launcherUrl:(d=n==null?void 0:n.controller)==null?void 0:d.launcherUrl,locale:t}).then(u=>{s({subscriptionURL:u})}).catch(u=>{console.error("get subscription url error:",u)})},[n,r]),!n||!r||!Or(n)||r.status===M.LAUNCH_SESSION_STATUS.installed)return"";let i=null,c="";return Ft(n,r)?(i=a.jsx(Sn,{href:o.subscriptionURL,children:e("blocklet.manageSubscription")}),c=e("blocklet.suspendedCausedByExpired",{deadline:zt(r==null?void 0:r.reservedUntil,t)})):Mr(n,r)&&(i=a.jsx(_n,{to:Cn(M.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),c=e("blocklet.suspendedCausedByTerminated",{canceledAt:zt(r==null?void 0:r.terminatedAt,t),deadline:$r(r==null?void 0:r.terminatedAt,t)})),a.jsxs(R,{component:ho,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c,a.jsx(ue,{component:"span",sx:{marginLeft:"4px"},children:i})]})}const br=x.createContext({});function Za(){return x.useContext(br)}const{Provider:ya,Consumer:Ya}=br,{did:V,appId:xa}=window.env;function ba({children:e}){var v,C;const{t,locale:n}=Y(),{blocklet:r}=ye(),[o,s]=x.useState([]),[i,c]=x.useState([]),[l,d]=x.useState([]),u=k.getDisplayName(r),f=((v=((r==null?void 0:r.environments)||[]).find(S=>S.key===Z.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:v.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],y=(r==null?void 0:r.trustedFactories)||[],b=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const S=await Le.doBatchQuery({getRoles:{input:{teamDid:V}},getPermissions:{input:{teamDid:V}},getInvitations:{input:{teamDid:V}}});c((S.getRoles.roles||[]).filter(w=>!M.RBAC_CONFIG.roles.some(E=>E.name===w.name&&(!E.passport||E.ci))).map(w=>(w.hasDescription=!!w.description,w.hasDescription||(w.description=t("team.passport.description",{teamName:u,title:w.title})),w))),d(S.getPermissions.permissions||[]),s(S.getInvitations.invitations||[])}catch(S){q.error(S.message)}},L=({did:S}={})=>{const w={teamDid:V,user:{did:S}};return Le.getUser({input:w})},g=({query:S,paging:w}={})=>{const E={teamDid:V};return w&&(E.paging=w),S&&(E.query=S),E.sort={lastLoginAt:-1},Le.getUsers({input:E})},I=()=>Le.getUsersCountPerRole({input:{teamDid:V}}),j=()=>h();x.useEffect(()=>{var S;(S=r==null?void 0:r.meta)!=null&&S.did&&h()},[(C=r==null?void 0:r.meta)==null?void 0:C.did]),x.useEffect(()=>{c(S=>S.map(w=>(w.hasDescription||(w.description=t("team.passport.description",{teamName:u,title:w.title})),{...w})))},[t,n]);const T=S=>{S.teamDid===V&&h()};De(Z.TeamEvents.userAdded,T,[V]),De(Z.TeamEvents.userRemoved,T,[V]),De(Z.TeamEvents.userUpdated,T,[V]);const $={teamDid:V,teamIssuerDid:xa,teamName:u,invitations:o,roles:i,permissions:l,trustedPassports:p,trustedFactories:y,isNodeTeam:!1,enablePassportIssuance:b,refresh:j,passportColor:f,endpoint:window.location.origin,blocklet:r,api:{getUser:L,getUsers:g,getUsersCountPerRole:I}};return a.jsx(ya,{value:$,children:e})}const Sa=x.lazy(()=>K(()=>import("./overview-
|
|
40
|
+
`;function va(){const{t:e,locale:t}=Y(),{blocklet:n,launcherSession:r}=ye(),[o,s]=Co({subscriptionURL:"#"});if(x.useEffect(()=>{var l,d;Ft(n,r)&&Ar({launcherSessionId:(l=n==null?void 0:n.controller)==null?void 0:l.launcherSessionId,launcherUrl:(d=n==null?void 0:n.controller)==null?void 0:d.launcherUrl,locale:t}).then(u=>{s({subscriptionURL:u})}).catch(u=>{console.error("get subscription url error:",u)})},[n,r]),!n||!r||!Or(n)||r.status===M.LAUNCH_SESSION_STATUS.installed)return"";let i=null,c="";return Ft(n,r)?(i=a.jsx(Sn,{href:o.subscriptionURL,children:e("blocklet.manageSubscription")}),c=e("blocklet.suspendedCausedByExpired",{deadline:zt(r==null?void 0:r.reservedUntil,t)})):Mr(n,r)&&(i=a.jsx(_n,{to:Cn(M.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),c=e("blocklet.suspendedCausedByTerminated",{canceledAt:zt(r==null?void 0:r.terminatedAt,t),deadline:$r(r==null?void 0:r.terminatedAt,t)})),a.jsxs(R,{component:ho,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[c,a.jsx(ue,{component:"span",sx:{marginLeft:"4px"},children:i})]})}const br=x.createContext({});function Za(){return x.useContext(br)}const{Provider:ya,Consumer:Ya}=br,{did:V,appId:xa}=window.env;function ba({children:e}){var v,C;const{t,locale:n}=Y(),{blocklet:r}=ye(),[o,s]=x.useState([]),[i,c]=x.useState([]),[l,d]=x.useState([]),u=k.getDisplayName(r),f=((v=((r==null?void 0:r.environments)||[]).find(S=>S.key===Z.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:v.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],y=(r==null?void 0:r.trustedFactories)||[],b=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const S=await Le.doBatchQuery({getRoles:{input:{teamDid:V}},getPermissions:{input:{teamDid:V}},getInvitations:{input:{teamDid:V}}});c((S.getRoles.roles||[]).filter(w=>!M.RBAC_CONFIG.roles.some(E=>E.name===w.name&&(!E.passport||E.ci))).map(w=>(w.hasDescription=!!w.description,w.hasDescription||(w.description=t("team.passport.description",{teamName:u,title:w.title})),w))),d(S.getPermissions.permissions||[]),s(S.getInvitations.invitations||[])}catch(S){q.error(S.message)}},L=({did:S}={})=>{const w={teamDid:V,user:{did:S}};return Le.getUser({input:w})},g=({query:S,paging:w}={})=>{const E={teamDid:V};return w&&(E.paging=w),S&&(E.query=S),E.sort={lastLoginAt:-1},Le.getUsers({input:E})},I=()=>Le.getUsersCountPerRole({input:{teamDid:V}}),j=()=>h();x.useEffect(()=>{var S;(S=r==null?void 0:r.meta)!=null&&S.did&&h()},[(C=r==null?void 0:r.meta)==null?void 0:C.did]),x.useEffect(()=>{c(S=>S.map(w=>(w.hasDescription||(w.description=t("team.passport.description",{teamName:u,title:w.title})),{...w})))},[t,n]);const T=S=>{S.teamDid===V&&h()};De(Z.TeamEvents.userAdded,T,[V]),De(Z.TeamEvents.userRemoved,T,[V]),De(Z.TeamEvents.userUpdated,T,[V]);const $={teamDid:V,teamIssuerDid:xa,teamName:u,invitations:o,roles:i,permissions:l,trustedPassports:p,trustedFactories:y,isNodeTeam:!1,enablePassportIssuance:b,refresh:j,passportColor:f,endpoint:window.location.origin,blocklet:r,api:{getUser:L,getUsers:g,getUsersCountPerRole:I}};return a.jsx(ya,{value:$,children:e})}const Sa=x.lazy(()=>K(()=>import("./overview-Bc6RN_5G.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]))),wa=x.lazy(()=>K(()=>import("./index-B5PaGLoo.js"),__vite__mapDeps([32,2,1,3,4,5,6,33,12,34,35,36,9,10,18,19,37,23,21,8,38,22,39,40,26,27,41,28,29,30,31,20,17]))),ja=x.lazy(()=>K(()=>import("./index-BdipdMDv.js"),__vite__mapDeps([42,2,1,12,3,4,5,6,43,14,36,9,18,19,22,23,44,10,17,28,29,30,31,20,21]))),_a=x.lazy(()=>K(()=>import("./index-BPFeU32W.js"),__vite__mapDeps([45,2,1,46,3,4,5,6,47,48,49,50,9,33,43,51,52,53,31,34,18,19,22,23,17,37,54,55,56,7,12,8,13,28,29,30,20,21]))),Ca=x.lazy(()=>K(()=>import("./audit-logs-1KlkVb5T.js"),__vite__mapDeps([57,1,2,58,59,3,4,5,6,28,9,60,31,61]))),Ea=x.lazy(()=>K(()=>import("./log-r4HRH3tf.js"),__vite__mapDeps([62,1,2,28,3,4,5,6,9,63,53,64]))),Ia=x.lazy(()=>K(()=>import("./index-CYcUSW9Y.js"),__vite__mapDeps([65,2,1,9,3,4,5,6,12,66,22,23,19,10,67,68,53,41,63,69,17,33,70,40,25,52,71,38,72,73,49,37,30,51,58,59,61]))),La=x.lazy(()=>K(()=>import("./config-navigation-Y__TwRFz.js"),__vite__mapDeps([74,2,3,4,5,1,6,75,9,54,76,77,31,23,28,22,29,30,19,20,21,17]))),Ta=x.lazy(()=>K(()=>import("./index-BCUhK2IK.js"),__vite__mapDeps([78,1,2,5,4,9,3,6,79,25,80,81,38,23,8,27,30,56]))),Pa=x.lazy(()=>K(()=>import("./component-B4nl0OGh.js"),__vite__mapDeps([82,1,2,4,3,5,6,12,48,49,50,9,33,43,51,56,18,19,83,75,84,68,37,52,85,23,86,72,73,38,41,22,30,10,87,88,81,25,89,44,58,59,76,8,28,16,79,90,80,91,14,24,53,29,26,27,92,31,20,21,17]))),Da=x.lazy(()=>K(()=>import("./analytics-Bv-kTIMo.js"),__vite__mapDeps([93,1,2,3,4,5,6,9,20,21,46,94,85,52,84,23,71,31,53,28,22,29,30,19,17])));function Ra(){var h,L;const e=xo(),{tab:t="overview"}=bo(),{blocklet:n,actions:{refreshBlocklet:r}}=ye(),{t:o}=Y(),s=(h=n==null?void 0:n.meta)==null?void 0:h.did,i=g=>{e(`${M.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${g}`)},c=()=>{r()},l=!n||Ht(n.status)?[]:k.getAppMissingConfigs(n),d=[{label:o("common.overview"),value:"overview"},{label:a.jsx(Kr,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:o("common.components")}),value:"components"}];Ht(n==null?void 0:n.status)||d.push({label:o("common.configuration"),value:"configuration"}),d.push({label:o("common.auditLogs"),value:"audit-logs"}),n&&((L=n.children)!=null&&L.length)&&n.structVersion===M.APP_STRUCT_VERSION&&d.push({label:o("common.logs"),value:"logs"}),d.push({label:o("common.configNavigation"),value:"navigation"});const u=a.jsx(Ca,{scope:s,categories:["blocklet","team","security","certificates","gateway"]});De(M.EVENTS.NOTIFICATION_BLOCKLET_CREATE,g=>{const{severity:I,title:j,description:T}=g||{};I==="error"?q.error(T||j):q.success(T||j)});const f={overview:a.jsx(Sa,{}),members:a.jsx(R,{mt:-5,children:a.jsx(wa,{type:"blocklet",createPassportSvg:Vt})}),passports:a.jsx(R,{mt:-4.5,children:a.jsx(ja,{createPassportSvg:Vt})}),components:Pa,configuration:a.jsx(_a,{blocklet:n,onUpdate:c}),"audit-logs":u,logs:Ea,navigation:La,"did-spaces":a.jsx(Ta,{navOrientation:"horizontal",sx:{mt:-4}}),analytics:a.jsx(R,{mt:-5,children:a.jsx(Da,{})}),publish:a.jsx(R,{mt:-3,children:a.jsx(Ia,{})})},p=f[t]||f.overview,y=!["members","passports","analytics","publish","notifications","did-spaces"].includes(t),b=n?a.jsxs(Ct,{type:"components",children:[y&&a.jsx(R,{pt:3,children:a.jsx(go,{tabs:d,current:t,onChange:i,scrollButtons:"auto"})}),a.jsx("div",{className:"page-content",children:a.jsx(x.Suspense,{fallback:a.jsx(Oe,{relative:"parent",children:a.jsx(ee,{})}),children:x.isValidElement(p)?p:a.jsx(p,{blocklet:n})})})]}):a.jsx(Oe,{relative:"parent",children:a.jsx(ee,{})});return a.jsx(Br,{children:a.jsx(ba,{children:a.jsx(Nt,{children:a.jsxs(Oa,{children:[y&&a.jsxs(R,{component:"div",className:"page-header",children:[a.jsxs(ue,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[n?a.jsx(wo,{blocklet:n,style:{marginRight:16}}):null,n?a.jsxs(R,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[a.jsx(R,{children:k.getDisplayName(n)}),(n==null?void 0:n.status)!=="unknown"&&a.jsx(_t,{size:"12px",status:n.status,source:n.source,progress:n.progress})]}):`${o("common.blocklet")} ${o("common.detail")}`]}),n?a.jsx(rs,{className:"page-actions",hasPermission:!0,blocklet:n,onStart:()=>{},onComplete:({error:g}={})=>{g&&q.error(g.message)},variant:"group"}):null]}),a.jsx(Bn,{}),a.jsx(va,{}),b]})})})})}function Aa(){var r;const{blocklet:e}=ye(),{t}=Y(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return x.useEffect(()=>{const o=kr();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),a.jsxs(a.Fragment,{children:[a.jsx(mo,{children:a.jsx("title",{children:t("pageTitle.dashboard")})}),a.jsx(Ra,{})]})}const Oa=lt.main`
|
|
41
41
|
.page-header {
|
|
42
42
|
display: flex;
|
|
43
43
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as E,j as t,a3 as i,T as j,I as _,C as w,E as y,aa as A}from"./vendor-mui-core-BlX2BJoA.js";import{H as L,o as W,f as H,af as R,d as S}from"./index-
|
|
1
|
+
import{a1 as E,j as t,a3 as i,T as j,I as _,C as w,E as y,aa as A}from"./vendor-mui-core-BlX2BJoA.js";import{H as L,o as W,f as H,af as R,d as S}from"./index-DgZ1ypbb.js";import{D as z,a as O,B as q,A as N}from"./domain-list-DGgkgu6r.js";import{ad as $,af as F,bB as K}from"./vendor-arcblock-CiLB_TiI.js";import{P as M}from"./page-header-6EUz18Qu.js";import{r}from"./vendor-react-D-afvo_7.js";import{_ as U}from"./useSetState-Crt4S51m.js";import{S as l}from"./button-Bo5ZAcJk.js";import{S as Y}from"./layout-Bb4get3W.js";import{S as G}from"./step-actions-DnckX9Zh.js";import"./vendor-utils-DCpRgzMR.js";import"./vendor-hooks-CLzfFpO7.js";import"./Add-2VCvBnGd.js";import"./base32-COJTblwx.js";import"./LockIcon-DQtUl5vk.js";import"./CheckCircle-BElcljFC.js";import"./util-Ci0WMGC4.js";import"./permission-SgzW7fBj.js";import"./session-ocxAyn6f.js";import"./useAsyncRetry-KXMle3o0.js";import"./useAsync-cdOzMWPw.js";import"./confirm-CucPiuHr.js";import"./format-error-C0Ke3VXF.js";import"./InfoOutlined-BFP30UJa.js";import"./api-C0C4sDJA.js";import"./index-mnKcDZP2.js";import"./actions-BEpPU26q.js";import"./MoreHoriz-DnFq43xg.js";import"./content-layout-CK_AzZZ-.js";var p={},J=E;Object.defineProperty(p,"__esModule",{value:!0});var v=p.default=void 0,Q=J($()),V=t;v=p.default=(0,Q.default)((0,V.jsx)("path",{d:"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m6 9.8a.9.9 0 0 1-.1.5l-2.1 4.9a1.34 1.34 0 0 1-1.3.8H9a2 2 0 0 1-2-2v-5a1.28 1.28 0 0 1 .4-1L12 5l.69.69a1.08 1.08 0 0 1 .3.7v.2L12.41 10H17a1 1 0 0 1 1 1z"}),"Recommend");function c({onNext:s,onPrevious:g}){var h,D;const{t:o}=r.useContext(F),{info:C}=L(),[k,u]=r.useState(!1),{blocklet:a}=W(),[x,I]=r.useState(""),[d,P]=r.useState(!1),B=(((a==null?void 0:a.site)||{}).domainAliases||[]).map(e=>H.replaceSlotToIp(e.value,x)),[n,m]=U({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),f=(D=(h=a.environments)==null?void 0:h.find(e=>e.key==="BLOCKLET_APP_PK"))==null?void 0:D.value,T=B.find(e=>R.isDidDomain(e));return r.useEffect(()=>{S.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:e})=>{I(e.address||"")}).catch(e=>{console.error(e.message)})},[]),t.jsxs(X,{children:[t.jsx("div",{className:"header",children:t.jsx(M,{title:o("setup.domain.title"),subTitle:o("setup.domain.subTitle"),onClickBack:g})}),t.jsxs(i,{className:"form",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[t.jsxs(i,{children:[t.jsxs(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:[t.jsx(i,{display:"inline",children:o("setup.domain.skipStart")}),t.jsx(l,{variant:"text",size:"small",disabled:!!n.addDomainState.text,onClick:()=>s(),style:{paddingTop:0},children:t.jsx("span",{style:{textDecoration:"underline"},children:o("setup.domain.skip")})}),t.jsx(i,{display:"inline",children:o("setup.domain.skipEnd")})]}),t.jsx(i,{sx:{marginTop:"12px"},children:t.jsx(O,{listOnly:!0,inSetup:!0})})]}),t.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[C.nftDomainUrl&&t.jsxs(t.Fragment,{children:[t.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(v,{color:"primary"}),t.jsx(j,{fontWeight:"fontWeightBold",children:o("setup.domain.buyDIDDomainTitle")})]}),t.jsxs(i,{children:[t.jsx(q,{appPk:f,appId:a.appPid,siteId:a.site.id,teamDid:a.meta.did,title:o("common.buy"),inBlockletSetup:!0}),t.jsx(j,{sx:{marginTop:1},children:o("setup.domain.buyDIDDomainTips")})]})]}),t.jsxs(i,{children:[t.jsxs(i,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",overflow:"hidden",cursor:"pointer"},onClick:()=>P(!d),children:[t.jsx(i,{fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o("setup.domain.addTitle")}),t.jsx(_,{sx:{transform:d?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s"},children:t.jsx(K,{})})]}),t.jsx(w,{in:d,timeout:"auto",unmountOnExit:!0,children:t.jsx(N,{autoFocus:!1,appPk:f,appId:a.appPid,siteId:a.site.id,teamDid:a.meta.did,cnameDomain:T,currentIp:x,inBlockletSetup:!0,shouldCheckDomain:!0,resolveDomain:e=>S.get(`/dns-resolve?hostname=${e}`),onInputDomain:e=>{m({domain:e.domain,type:e.type}),u(e.error)},onStateChange:e=>m({addDomainState:e}),onSuccess:e=>{const b={domain:e.domain,type:e.type,nftDid:e.nftDid,chainHost:e.chainHost};m(b),s()},onError:u})})]})]})]}),t.jsx(G,{mt:8,disabled:!!n.addDomainState.text,blocklet:a,onStartNow:()=>s("complete"),children:n.domain?t.jsx(l,{variant:"contained",loading:!!n.addDomainState.text,disabled:k||!!n.addDomainState.text||!n.domain,onClick:()=>s(),children:n.addDomainState.text||o("setup.next")}):t.jsx(l,{variant:"contained",disabled:!!n.addDomainState.text,onClick:()=>s(),children:o("setup.skip")})})]})}function Et(s){return t.jsx(z,{children:t.jsx(c,{...s})})}c.propTypes={onNext:y.func,onPrevious:y.func};c.defaultProps={onNext:()=>{},onPrevious:()=>{}};const X=A(Y)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: hidden;
|
|
4
4
|
.form {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ad as ae,ba as $e,N as ut,f as Be,L as mt,g as k,ag as W,al as pt,v as ft,z as O,aS as le,bF as ht,bG as Me,bH as xt,C as Pe,ab as gt,bl as Ee,ao as ze,b0 as Dt,bB as yt,aM as jt}from"./vendor-arcblock-CiLB_TiI.js";import{a1 as ce,j as e,a3 as p,a2 as z,T as q,ad as de,e as K,t as ue,aj as Ue,E as s,a4 as M,M as vt,bW as bt,al as Ne,bp as Ct,bq as wt,am as St,ao as Rt,aa as At,I as It}from"./vendor-mui-core-BlX2BJoA.js";import{r as A,g as Pt}from"./vendor-react-D-afvo_7.js";import{d as Et}from"./Add-2VCvBnGd.js";import{b as kt}from"./base32-COJTblwx.js";import{ag as Tt,ah as Oe,y as F,B as We,h as ke,ai as He,M as Lt,aj as _t,af as Ve,b as qt,G as Te,ak as Ft,al as $t,I as Bt,am as Mt,an as zt,f as Le}from"./index-wG4Kh8A_.js";import{d as Ut}from"./LockIcon-DQtUl5vk.js";import{I as Nt,u as V,D as Ot,B as Wt,L as Ht}from"./vendor-hooks-CLzfFpO7.js";import{d as Vt}from"./CheckCircle-BElcljFC.js";import{d as Gt,p as _e}from"./util-ao8gSgii.js";import{j as G,w as Kt,a as Qt}from"./vendor-utils-DCpRgzMR.js";import{_ as Q}from"./useSetState-Crt4S51m.js";import{w as Ge}from"./permission-SgzW7fBj.js";import{_ as Yt,D as qe}from"./useAsyncRetry-KXMle3o0.js";import{C as Y}from"./confirm-C0rryr4e.js";import{d as Zt}from"./InfoOutlined-BFP30UJa.js";import{_ as Xt}from"./useAsync-cdOzMWPw.js";import"./api-C0C4sDJA.js";import{I as Jt}from"./index-mnKcDZP2.js";import{A as en}from"./actions-BEpPU26q.js";var me={},tn=ce;Object.defineProperty(me,"__esModule",{value:!0});var Ke=me.default=void 0,nn=tn(ae()),sn=e;Ke=me.default=(0,nn.default)((0,sn.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");const on=$e({});on.interceptors.request.use(n=>{const t=window.blocklet?window.blocklet.prefix:"/";return n.baseURL=t||"",n.url=G("/api",String(n.url)),n.timeout=2e5,n.params=n.params||{},new URLSearchParams(n.url.split("?")[1]).has("locale")||(n.params.locale=ut()),n},n=>Promise.reject(n));const Qe=(...n)=>$e(...n),rn=(n,t)=>t?n?[n,...Array.isArray(t)?t:[t]]:t:n,an=(n,{width:t=600,height:o=700,name:i="did-domain:popup"}={})=>{const a=window.screenX+(window.innerWidth-t)/2,r=window.screenY+(window.innerHeight-o)/2,l=[`left=${a}`,`top=${r}`,`width=${t}`,`height=${o}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],c=window.open("",i,l.join(","));if(c===null)throw new Error("Failed to open popup");return c.location.href=Kt(n,{opener:window.location.origin}),c},ln="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Ye=async n=>{var d;if(!n||!(n!=null&&n.trim()))return null;const t=Qe(),o=new URL(n);o.pathname="__blocklet__.js",o.searchParams.set("type","json");const{data:i}=await t.get(o.toString()),a=(d=i==null?void 0:i.componentMountPoints)==null?void 0:d.find(h=>h.did===ln),r=new URL(n);r.pathname=a==null?void 0:a.mountPoint;const l=r.toString(),c=G(l,"/api");return{base:l,api:c}},cn=Be({buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),dn=Be({buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),un={zh:dn,en:cn};function Ze({delegatee:n,delegateePk:t,didDomainURL:o,locale:i,title:a,onSuccess:r,...l}){const{t:c}=k(),[d,h]=Nt({currentState:1}),f=A.useRef(null),C=V(x=>{var m,v,I,j;x.data.type==="didDomain.success"&&(r==null||r({nftDid:(m=x.data)==null?void 0:m.nftDid,domain:(v=x.data)==null?void 0:v.domain,chainHost:(I=x.data)==null?void 0:I.chainHost}),(j=f.current)==null||j.close(),f.current=null,h({currentState:4}),setTimeout(()=>{h({currentState:8})},2e3))});Ot(()=>{var x;try{window.removeEventListener("message",C),(x=f.current)==null||x.close(),f.current=null}catch(m){console.warn("Failed to close popup",m)}});const S=V(()=>{h({currentState:1})}),g=V(()=>{h({currentState:2}),P.run()}),y=V(({sessionId:x,baseURL:m})=>{window.addEventListener("message",C);const v=new URL(m);v.searchParams.set("sessionId",x),v.searchParams.set("locale",i),f.current=an(v.toString());const I=setInterval(()=>{var j;(j=f.current)!=null&&j.closed&&(clearInterval(I),S())},1e3);return()=>clearInterval(I)}),P=Wt(async()=>{const x=await Ye(o);if(!x)return null;const m=Qe({baseURL:x.api}),{data:v}=await m.post("/payment/session",{delegatee:n,delegateePk:t});return y({sessionId:v.sessionId,baseURL:x.base})},{manual:!0,debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(x){console.error(x)}});return e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:g,variant:"contained",startIcon:e.jsx(Gt,{}),...l,children:a||c("buy.button.title")}),e.jsxs(pt,{fullWidth:!0,maxWidth:"xs",open:d.currentState>1&&d.currentState<8,onClose:S,children:[!P.error&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[d.currentState===2&&e.jsx(z,{size:50}),d.currentState===4&&e.jsx(Vt,{sx:{color:"primary.main",fontSize:"5rem"}}),d.currentState===2&&e.jsx(q,{children:c("buy.status.inProgress")}),d.currentState===4&&e.jsx(q,{children:c("buy.status.success")})]}),P.error&&e.jsx(de,{severity:"error",children:c("buy.error.failedToCreateSession")})]})]})}const Xe={onSuccess:()=>{},title:""};Ze.defaultProps=Xe;function Je(n){return e.jsx(mt,{locale:n.locale,translations:un,children:e.jsx(Ze,{...n})})}Je.defaultProps=Xe;function et({nftDid:n,didDomainURL:t,locale:o,sx:i}){const{t:a}=k(),[r,l]=Q({safeIframeRef:null,popoverAnchorEl:null}),c=A.useRef(null),d=K(),h=ue(d.breakpoints.down("md")),f=y=>{l({popoverAnchorEl:y.currentTarget})},C=()=>{l({popoverAnchorEl:null})},S=Ht(async()=>{const y=await Ye(t);return y?y.base:null});if(!S.value)return null;if(S.loading)return e.jsx(z,{});const g=G(S.value,`/embed/domain?nft-did=${n}&locale=${o}`);return e.jsxs(e.Fragment,{children:[e.jsx(p,{component:"img",src:G(t,"/.well-known/service/blocklet/logo"),alt:"logo",width:16,height:16,onClick:f,sx:rn({cursor:"pointer"},i)}),e.jsx(Ue,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:C,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:c,title:a("common.subscription"),width:h?"320px":"400px",height:h?"600px":"680px",style:{border:0},src:g})})]})}et.defaultProps={sx:{}};const mn=n=>["waiting","creating","renewaling"].includes(n);function pe(n){var w,R;const{t}=k(),[o,i]=A.useState(!1),{inService:a}=F(),[r,l]=A.useState(null),{siteId:c,domain:d,onAdd:h,children:f,did:C}=n,[S,g]=A.useState(!1),{api:y,ws:{useSubscription:P}}=F(),{mode:x,actions:{refreshDomainStatus:m}}=We(),v=Yt(async()=>{const{cert:b}=await y.findCertificateByDomain({input:{domain:d,did:C}});return b}),I=(b,U)=>{b.domain===d&&(g(!1),i(!1),a&&x!=="setup"&&(U==="success"?O.success(t("setup.domain.genCertSuccess",{domain:b.domain})):U==="error"&&O.error(t("setup.domain.genCertFailed",{domain:b.domain,message:b.message}))))};if(A.useEffect(()=>{var b;v.loading||g(mn((b=v.value)==null?void 0:b.status))},[v.loading,(w=v.value)==null?void 0:w.status]),P(ke.BlockletEvents.certError,b=>I(b,"error")),P(ke.BlockletEvents.certIssued,b=>{v.retry(),m(b.domain),I(b,"success")}),v.loading||((R=v.value)==null?void 0:R.status)==="normal")return"";const j=()=>{i(!1),l(null)},T=async()=>{i(!0);try{await y.issueLetsEncryptCert({input:{siteId:c,domain:d,did:C,inBlockletSetup:x==="setup"}}),h(),g(!0)}catch(b){console.error(b),g(!1)}finally{i(!1),l(null)}},u={title:t("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(de,{severity:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:T,onCancel:j},L=b=>{b.stopPropagation(),l(u)};return e.jsxs(e.Fragment,{children:[S?e.jsx(M,{title:t("router.cert.issuing"),children:e.jsx(z,{size:12})}):f({loading:o,open:L}),r&&e.jsx(Y,{color:"primary",title:r.title,description:r.description,confirm:r.confirm,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}pe.propTypes={domain:s.string.isRequired,did:s.string.isRequired,siteId:s.string.isRequired,onAdd:s.func,children:s.any};pe.defaultProps={onAdd:()=>{},children:null};function fe(n){const{domain:t,domainStatus:o,...i}=n;return Tt(t)||!Oe(t)||ft(o)||o!=null&&o.isHttps?"":e.jsx(pe,{domain:t,...i})}fe.propTypes={domain:s.string.isRequired,domainStatus:s.shape({isHttps:s.bool}).isRequired,did:s.string.isRequired,onAdd:s.func,children:s.any};fe.defaultProps={onAdd:()=>{},children:null};var he={},pn=ce;Object.defineProperty(he,"__esModule",{value:!0});var tt=he.default=void 0,fn=pn(ae()),hn=e;tt=he.default=(0,fn.default)((0,hn.jsx)("path",{d:"M17 20.41 18.41 19 15 15.59 13.59 17zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5z"}),"CallMerge");const nt=A.createContext({}),{Provider:xn,Consumer:es}=nt;function gn({children:n}){const[t,o]=Q({domain:"",error:null}),{locale:i}=k(),a={error:t.error,domain:t.domain,setError:r=>{o({error:r})},setDomain:r=>{const l=le(r),c=He(l,i);o({domain:l,error:c})}};return e.jsx(xn,{value:{value:a},children:n})}function Dn(){const{value:n}=A.useContext(nt);return n}const{joinURL:Fe}=Lt,yn=_t,st="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",jn=async n=>{var c;if(!n||!(n!=null&&n.trim()))return null;const t=new URL(n);t.pathname="__blocklet__.js",t.searchParams.set("type","json");const{data:o}=await yn.get(t.toString()),i=(c=o==null?void 0:o.componentMountPoints)==null?void 0:c.find(d=>d.did===st),a=new URL(n);a.pathname=i==null?void 0:i.mountPoint;const r=a.toString(),l=Fe(r,"/api");return{base:r,api:l,domain:Fe(l,"/domains")}};var vn={DID_DOMAIN_SERVICE_DID:st,getDidDomainServiceURL:jn},Z={exports:{}};const bn=ht,Cn=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class ot extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const wn=(n,t,o)=>{const i=o.retries-(t-1);return n.attemptNumber=t,n.retriesLeft=i,n},Sn=n=>Cn.includes(n),it=(n,t)=>new Promise((o,i)=>{t={onFailedAttempt:()=>{},retries:10,...t};const a=bn.operation(t);a.attempt(async r=>{try{o(await n(r))}catch(l){if(!(l instanceof Error)){i(new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`));return}if(l instanceof ot)a.stop(),i(l.originalError);else if(l instanceof TypeError&&!Sn(l.message))a.stop(),i(l);else{wn(l,r,t);try{await t.onFailedAttempt(l)}catch(c){i(c);return}a.retry(l)||i(a.mainError())}}})});Z.exports=it;Z.exports.default=it;Z.exports.AbortError=ot;var Rn=Z.exports;const An=Pt(Rn);function xe({domain:n,resolvedTarget:t,...o}){const{t:i,locale:a}=k();return e.jsxs(p,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...o,children:[e.jsxs(p,{display:"flex",children:[i("router.domain.setup.tipStart"),n&&e.jsx(p,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),i("router.domain.setup.tipEnd"),":"]}),e.jsxs(p,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[e.jsx(se,{label:i("router.domain.setup.recordType"),value:"CNAME",locale:a}),e.jsx(se,{label:i("router.domain.setup.recordValue"),value:t,locale:a})]})]})}xe.propTypes={domain:s.string,resolvedTarget:s.string.isRequired};xe.defaultProps={domain:""};function se({locale:n,label:t,value:o}){const i=ue(r=>r.breakpoints.down("md")),a=K();return e.jsx(Jt,{name:t,nameWidth:120,children:e.jsxs(p,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(q,{component:"span",color:"primary.main",overflow:"auto",sx:i?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:o}),e.jsx(Me,{content:o,locale:n,style:{marginLeft:"4px",color:a.palette.text.secondary}})]})})}se.propTypes={locale:s.string.isRequired,label:s.string.isRequired,value:s.string.isRequired};function ge({siteId:n,teamDid:t,cnameDomain:o,defaultCustomDomain:i,onInputDomain:a,appId:r,appPk:l,onSuccess:c,onError:d,disabled:h,autoFocus:f,inBlockletSetup:C,shouldCheckDomain:S,onStateChange:g,currentIp:y,resolveDomain:P,...x}){const{t:m,locale:v}=k(),{api:I,info:j}=F(),T=Dn(),u=K(),L=xt({key:"sm"}),[w,R]=Q({submittingDomain:!1,domain:i,error:null,type:j!=null&&j.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1}),b=Xt(()=>vn.getDidDomainServiceURL(j==null?void 0:j.nftDomainUrl));if(j!=null&&j.nftDomainUrl&&b.loading)return e.jsx(p,{...x,children:e.jsx(Pe,{relative:"parent",children:e.jsx(z,{})})});if(b.error)return e.jsx(p,{...x,children:e.jsx(Pe,{relative:"parent",children:b.error.message})});const U=b.value,at=()=>{R({invalidDNSDomain:null})},ee=async D=>{g(m("setup.domain.addingDomain")),await I.addDomainAlias({input:{id:n,domainAlias:D,teamDid:t,inBlockletSetup:!0}}),R({submittingDomain:!1}),c({domain:D,type:"inputDomain"})},Se=async({domain:D,type:E,nftDid:N,chainHost:_})=>{try{if(!S){if(E==="inputDomain"){await ee(D);return}c({domain:D,type:E,nftDid:N,chainHost:_});return}g({text:m("setup.domain.checkingResolvable")});let $=30;const te=3e3,dt=$*1e3/te,Ae=setInterval(()=>{if($<=0){clearInterval(Ae);return}g({text:`${m("setup.domain.checkingResolvable")} (${$--}s)`})},1e3),Ie=await An(async()=>{const{data:B}=await P(D);if(!B.address)throw new Error("Cannot resolve domain");return B.address},{retries:dt,minTimeout:te,maxTimeout:te,onFailedAttempt:console.error}).catch(console.error);if(clearInterval(Ae),!Ie){const B=m("setup.domain.cannotResolve",{domain:D});if(E==="nftDomain"){O.error(B),c({domain:D,type:"nftDomain"});return}g({text:""}),R({invalidDNSDomain:{domain:D,error:B},domain:D,type:E,submittingDomain:!1});return}if(Ie!==y){const B=m("setup.domain.resolvedAddressError",{domain:D,curDomain:window.location.hostname});if(E==="nftDomain"){O.error(B),c({domain:D,type:"nftDomain"});return}g({text:""}),R({invalidDNSDomain:{domain:D,error:B},domain:D,type:E,submittingDomain:!1});return}if(E==="nftDomain"){c({domain:D,type:"nftDomain"});return}await ee(D)}catch($){O.error($.message),g({text:""}),R({submittingDomain:!1})}},lt=async({domain:D,nftDid:E,chainHost:N})=>{try{const _=_e(D);R({submittingDomain:!0}),await I.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:_,nftDid:E,chainHost:N,teamDid:t,inBlockletSetup:C}});const $="nftDomain";R({showNFTDomainAuth:!1,type:$}),await Se({domain:_,type:$,nftDid:E,chainHost:N})}catch(_){O.error(_.message)}finally{R({showNFTDomainAuth:!1,submittingDomain:!1})}},ct=async()=>{try{R({submittingDomain:!0});const D=_e(w.domain);if(j.nftDomainUrl&&U&&(await I.isDidDomain({input:{domain:D}})).value===!0){R({showNFTDomainAuth:!0});return}await Se({domain:D,type:w.type})}catch(D){R({submittingDomain:!1}),T.setError(D.message)}},Re=T.error||w.error;return e.jsx(p,{...x,children:e.jsxs(p,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(p,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[e.jsx(q,{sx:{color:u.palette.text.primary},children:m("router.domainAlias.add.tips")}),e.jsx(vt,{sx:{display:"block",marginTop:"8px"},label:m("router.domainAlias.add.domainDescription"),helperText:w.type==="inputDomain"&&Re||m("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:h,value:w.domain,size:"small",variant:"outlined",error:!!Re&&w.type==="inputDomain",onChange:D=>{var _;const E=le((_=D.target)==null?void 0:_.value);T.setDomain(E);const N=He(E,v);R({domain:E,error:N,type:"inputDomain"}),a({domain:E,error:N,type:"inputDomain"})},autoFocus:f,onBlur:()=>{T.domain||(R({error:null}),T.setError(null))}}),e.jsx(p,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(bt,{"data-cy":"confirm-add-domain",fullWidth:L,variant:"contained",loading:w.submittingDomain,onClick:ct,children:m("common.add")})}),e.jsxs(p,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:u.palette.primary.main},onClick:()=>R({showDnsTip:!w.showDnsTip}),children:[e.jsx(Zt,{fontSize:"1em"}),m("router.domainAlias.showTipHint")]}),w.showDnsTip&&e.jsx(xe,{domain:w.domain,resolvedTarget:o,style:{marginTop:"4px"}})]}),w.invalidDNSDomain&&e.jsx(Y,{title:m("common.reminder"),description:m("setup.domain.invalidDNSReminder",{error:w.invalidDNSDomain.error}),color:"primary",confirm:m("setup.domain.continueAdd"),onConfirm:()=>ee(w.invalidDNSDomain.domain,w.type),onCancel:at}),U&&e.jsx(gt,{open:w.showNFTDomainAuth,popup:!0,useSocket:!1,forceConnected:!1,action:"authorize",baseUrl:U.api,checkFn:Qt.create({baseURL:U.api}).get,extraParams:{delegatee:r,delegateePk:l,domain:w.domain},onSuccess:lt,onClose:()=>R({showNFTDomainAuth:!1,submittingDomain:!1}),checkTimeout:60*5e3,showDownload:!1,messages:{title:m("router.domainAlias.addDomainNFT.connect.title"),scan:m("router.domainAlias.addDomainNFT.connect.scan"),confirm:m("router.domainAlias.addDomainNFT.connect.confirm"),success:m("router.domainAlias.addDomainNFT.connect.success")}})]})})}ge.propTypes={siteId:s.string.isRequired,currentIp:s.string,teamDid:s.string.isRequired,cnameDomain:s.string.isRequired,defaultCustomDomain:s.string,onInputDomain:s.func,onSuccess:s.func,appId:s.string,appPk:s.string,disabled:s.bool,autoFocus:s.bool,inBlockletSetup:s.bool,shouldCheckDomain:s.bool,onStateChange:s.func,resolveDomain:s.func,onError:s.func};ge.defaultProps={defaultCustomDomain:"",currentIp:"",onInputDomain:Ee,onSuccess:Ee,appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1,shouldCheckDomain:!1,onStateChange:()=>{},resolveDomain:()=>{},onError:()=>{}};function De({id:n,children:t,title:o,teamDid:i,systemDomains:a,appId:r,appPk:l}){const{t:c}=k(),[d,h]=Q({loading:!1,confirmSetting:null}),f=a.find(y=>Ve.isDidDomain(y)),C=()=>{h({loading:!1,confirmSetting:null})},S={title:o||c("router.domainAlias.add.title"),description:function(P,x,m){return e.jsx(ge,{siteId:n,teamDid:i,cnameDomain:f,onSuccess:()=>h({confirmSetting:null}),onInputDomain:({domain:v,type:I,error:j})=>{x({...P,domain:v,type:I,__disableConfirm:!!j}),m(j)},appId:r,appPk:l})},confirm:c("common.confirm"),cancel:c("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:C},g=y=>{y.stopPropagation(),h({confirmSetting:S})};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:d.loading,open:g}):e.jsxs(Ne,{onClick:g,className:"rule-action","data-cy":"action-add-domain-alias",children:[d.loading?e.jsx(z,{size:16}):e.jsx(tt,{style:{fontSize:18,marginRight:5}}),c("router.domainAlias.add.title")]}),d.confirmSetting&&e.jsx(Y,{title:d.confirmSetting.title,description:d.confirmSetting.description,confirm:d.confirmSetting.confirm,cancel:d.confirmSetting.cancel,params:d.confirmSetting.params,onCancel:d.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:d.loading,maxWidth:"sm"})]})}De.propTypes={id:s.string.isRequired,children:s.any,title:s.string,teamDid:s.string,systemDomains:s.arrayOf(s.string).isRequired,appId:s.string,appPk:s.string.isRequired};De.defaultProps={children:null,title:"",teamDid:"",appId:null};function In(n){return e.jsx(gn,{children:e.jsx(De,{...n})})}function ye({appId:n,appPk:t,siteId:o,inBlockletSetup:i,teamDid:a,sx:r,...l}){const{api:c,info:d}=F(),{locale:h,t:f}=k(),C=async({domain:S,nftDid:g,chainHost:y})=>{await c.addDomainAlias({input:{id:o,type:"nft-domain",domainAlias:S,nftDid:g,chainHost:y,teamDid:a,inBlockletSetup:i}})};return e.jsx(Je,{delegatee:n,delegateePk:t,didDomainURL:d.nftDomainUrl,onSuccess:C,locale:h,variant:"outlined",sx:r,title:f("router.domainAlias.addDomainNFT.buy"),...l})}ye.propTypes={appId:s.string.isRequired,appPk:s.string.isRequired,siteId:s.string.isRequired,inBlockletSetup:s.bool.isRequired,teamDid:s.string.isRequired,sx:s.object};ye.defaultProps={sx:{}};function je(n){const{t}=k(),[o,i]=A.useState(!1),[a,r]=A.useState(null),{id:l,domain:c,children:d,teamDid:h}=n,{api:f}=F(),C=()=>{i(!1),r(null)},S=async()=>{i(!0);try{await f.deleteDomainAlias({input:{id:l,domainAlias:c,teamDid:h}}),await qt(2e3)}catch(P){O.error(P.message)}finally{r(null),i(!1)}},g={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:S,onCancel:C},y=P=>{P.stopPropagation(),r(g)};return e.jsxs(e.Fragment,{children:[typeof d=="function"?d({loading:o,open:y}):e.jsxs(W,{edge:"end",onClick:y,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[o?e.jsx(z,{size:16}):e.jsx(ze,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),a&&e.jsx(Y,{title:a.title,description:a.description,confirm:a.confirm,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}je.propTypes={id:s.string.isRequired,domain:s.string.isRequired,children:s.any,teamDid:s.string};je.defaultProps={children:null,teamDid:""};function ve({site:n,domain:t,blocklet:o}){const{t:i}=k(),a=t.value===window.location.hostname;return e.jsx(en,{"data-cy":"domain-actions",size:"large",actions:[({close:r})=>{var l;return e.jsx(je,{id:n.id,domain:t.value,teamDid:(l=o==null?void 0:o.meta)==null?void 0:l.did,children:({open:c})=>e.jsx(M,{title:a?i("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(Ne,{disabled:t.isProtected||a,dense:!0,onClick:d=>{r(),c(d)},"data-cy":"action-toggle-block",children:[e.jsx(Ct,{style:{minWidth:24,marginRight:8},children:e.jsx(ze,{})}),e.jsx(wt,{primary:i("common.delete")})]},"remove")})})})}]})}ve.propTypes={site:s.object.isRequired,domain:s.object.isRequired,blocklet:s.object.isRequired};ve.defaultProps={};var be={},Pn=ce;Object.defineProperty(be,"__esModule",{value:!0});var Ce=be.default=void 0,En=Pn(ae()),kn=e;Ce=be.default=(0,En.default)((0,kn.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Https");const X=s.shape({href:s.string,accessibility:s.shape({loading:s.bool,accessible:s.bool}),domainStatus:s.shape({isHttps:s.bool,matchedCert:s.object}),dns:s.shape({resolved:s.bool,ip:s.string})});function we({certificate:n}){const[t,o]=A.useState(null),i=F(),{t:a,locale:r}=k(),l=h=>{o(h.currentTarget)},c=()=>{o(null)},d=!!t;return e.jsxs(e.Fragment,{children:[e.jsx(Ce,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:l,onMouseLeave:c,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),e.jsx(Ue,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:c,disableRestoreFocus:!0,children:e.jsx(St,{children:e.jsxs(Rt,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${i.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(q,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(q,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(q,{component:"div",children:`${a("common.issuer")}: ${Dt(n,"issuer.commonName","")}`}),e.jsx(q,{component:"div",children:`${a("router.cert.issuedOn")}: ${Te(n.validFrom,r)}`}),e.jsx(q,{component:"div",children:`${a("router.cert.expiryOn")}: ${Te(n.validTo,r)}`})]})]})})})]})}we.propTypes={certificate:s.object};we.defaultProps={certificate:{}};function H({domain:n,filters:t}){const{t:o}=k(),{value:i,domainStatus:a}=n;if(!Oe(i))return null;let r=null,l=null;const{isHttps:c,matchedCert:d}=a;if(!Ft(i)){const{dns:{resolved:f,ip:C}={}}=a;f||C==="127.0.0.1"?r=e.jsx(M,{title:o("router.domain.verify.ok"),children:e.jsx(qe,{color:"success"})}):r=e.jsx(M,{title:o("router.domain.verify.notResolved"),children:e.jsx(qe,{color:"error"})})}c?l=e.jsx(we,{certificate:d}):l=e.jsx(M,{title:o("router.domain.https.bad"),children:e.jsx(Ce,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const h=t.map(f=>f==="domain"?r:f==="http"?l:null);return A.createElement(A.Fragment,null,...h)}H.propTypes={domain:X.isRequired,filters:s.array};H.defaultProps={filters:["domain","http"]};const Tn=Ge(J,"mutate_blocklets"),Ln=Ge(J,"",$t);function rt(n){const{inService:t}=F(),{blocklet:o,loadingRuntimeInfo:i}=We();let a=Tn;return t&&(a=Ln),e.jsx(a,{...n,blocklet:o,inService:t,loadingRuntimeInfo:i})}rt.propTypes={listOnly:s.bool};rt.defaultProps={listOnly:!1};function J({hasPermission:n,blocklet:t,loadingRuntimeInfo:o,inService:i,listOnly:a}){var v,I,j,T;const{t:r}=k(),{info:l}=F(),[c,d]=A.useState(!1),h=ue(u=>u.breakpoints.down("md")),f=A.useMemo(()=>{let u=n;return Bt(t)&&(u=u&&i),u},[n,i,t]),{site:C}=t,S=A.useMemo(()=>{var u;return Mt((u=t.site)==null?void 0:u.domainAliases)},[(v=t.site)==null?void 0:v.domainAliases]),g=[],y=[],P=kt.encode(t.appPid),x=(j=(I=t.environments)==null?void 0:I.find(u=>u.key==="BLOCKLET_APP_PK"))==null?void 0:j.value,m=zt(S);return S.forEach(u=>{const L=u.value||"";Ve.isDidDomain(L)&&!L.startsWith(P)?y.push(u):g.push(u)}),e.jsxs(e.Fragment,{children:[!a&&e.jsxs(e.Fragment,{children:[e.jsxs(p,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(p,{children:r("common.domain")}),f&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(In,{id:C.id,title:r("router.domain.add.title"),teamDid:(T=t.meta)==null?void 0:T.did,appId:t.appPid,appPk:x,systemDomains:m==null?void 0:m.map(u=>u.value),children:({open:u})=>e.jsxs(W,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:u,disabled:Le.isInProgress(t.status),children:[e.jsx(Et,{style:{fontSize:"1.3em",marginRight:4}}),r("common.add")]})}),l.nftDomainUrl&&e.jsx(ye,{variant:"outlined",appId:t.appPid,appPk:x,siteId:C.id,inBlockletSetup:!1,teamDid:t.meta.did})]})]}),Le.isAccessible(t.status)===!1&&e.jsx(p,{mt:1.5,mb:1.5,children:e.jsx(de,{severity:"warning",children:r("blocklet.router.noRunning")})})]}),e.jsx(p,{sx:{display:"flex",flexDirection:"column",gap:1},children:(c?S:g).map(u=>{var w,R;const L=u.value;return e.jsxs(A.Fragment,{children:[h&&e.jsxs(p,{display:"flex",flexDirection:"column",children:[e.jsx(p,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:e.jsx(oe,{domain:u,target:"_blank",children:u.value})}),e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[e.jsx(H,{domain:u,filters:["domain"]},`${u.value}-domain`),e.jsx(re,{siteId:(w=t.site)==null?void 0:w.id,domain:u,blocklet:t,hasMutatePermission:f})]}),e.jsx(p,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:f,site:C,domain:u,blocklet:t})})]})]},L),!h&&e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[e.jsx(H,{domain:u,filters:["domain"]},`${u.value}-domain`),e.jsx(p,{sx:{ml:2,mr:.5},children:e.jsx(oe,{domain:u,target:"_blank",children:u.value})}),e.jsx(re,{siteId:(R=t.site)==null?void 0:R.id,domain:u,blocklet:t,hasMutatePermission:f})]}),e.jsx(p,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:f,site:C,domain:u,blocklet:t})})]},L)]},L)})}),y.length>0&&e.jsx("div",{style:{marginLeft:"20px",marginTop:"12px"},children:e.jsx(W,{endIcon:c?e.jsx(Ke,{}):e.jsx(yt,{}),onClick:()=>d(!c),children:r(c?"common.collapseAll":"blocklet.router.showAllDomains")})}),!S.length&&(o?e.jsx(z,{size:16}):e.jsx(jt,{children:r("common.empty")}))]})}J.propTypes={hasPermission:s.bool,blocklet:s.object.isRequired,loadingRuntimeInfo:s.bool,inService:s.bool.isRequired,listOnly:s.bool};J.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1};function oe({domain:n,children:t,...o}){const{t:i,locale:a}=k(),{href:r,accessibility:l,value:c}=n,d=A.useCallback(()=>e.jsx(Me,{content:le(c),locale:a,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}),[c,a]);return!l||l.loading?e.jsxs(ne,{...o,children:[t,d(),e.jsx(M,{title:i("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx("span",{className:"status",children:e.jsx(z,{size:12})})})]}):l.accessible?e.jsxs(ne,{...o,children:[e.jsx(p,{component:"a",href:r,target:"_blank",rel:"noopener noreferrer",children:t}),d()]}):e.jsxs(ne,{...o,children:[e.jsx(M,{title:i("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx("span",{children:t})}),d()]})}oe.propTypes={domain:X.isRequired,children:s.any.isRequired};const ne=At.span`
|
|
1
|
+
import{ad as ae,ba as $e,N as ut,f as Be,L as mt,g as k,ag as W,al as pt,v as ft,z as O,aS as le,bF as ht,bG as Me,bH as xt,C as Pe,ab as gt,bl as Ee,ao as ze,b0 as Dt,bB as yt,aM as jt}from"./vendor-arcblock-CiLB_TiI.js";import{a1 as ce,j as e,a3 as p,a2 as z,T as q,ad as de,e as K,t as ue,aj as Ue,E as s,a4 as M,M as vt,bW as bt,al as Ne,bp as Ct,bq as wt,am as St,ao as Rt,aa as At,I as It}from"./vendor-mui-core-BlX2BJoA.js";import{r as A,g as Pt}from"./vendor-react-D-afvo_7.js";import{d as Et}from"./Add-2VCvBnGd.js";import{b as kt}from"./base32-COJTblwx.js";import{ag as Tt,ah as Oe,y as F,B as We,h as ke,ai as He,M as Lt,aj as _t,af as Ve,b as qt,G as Te,ak as Ft,al as $t,I as Bt,am as Mt,an as zt,f as Le}from"./index-DgZ1ypbb.js";import{d as Ut}from"./LockIcon-DQtUl5vk.js";import{I as Nt,u as V,D as Ot,B as Wt,L as Ht}from"./vendor-hooks-CLzfFpO7.js";import{d as Vt}from"./CheckCircle-BElcljFC.js";import{d as Gt,p as _e}from"./util-Ci0WMGC4.js";import{j as G,w as Kt,a as Qt}from"./vendor-utils-DCpRgzMR.js";import{_ as Q}from"./useSetState-Crt4S51m.js";import{w as Ge}from"./permission-SgzW7fBj.js";import{_ as Yt,D as qe}from"./useAsyncRetry-KXMle3o0.js";import{C as Y}from"./confirm-CucPiuHr.js";import{d as Zt}from"./InfoOutlined-BFP30UJa.js";import{_ as Xt}from"./useAsync-cdOzMWPw.js";import"./api-C0C4sDJA.js";import{I as Jt}from"./index-mnKcDZP2.js";import{A as en}from"./actions-BEpPU26q.js";var me={},tn=ce;Object.defineProperty(me,"__esModule",{value:!0});var Ke=me.default=void 0,nn=tn(ae()),sn=e;Ke=me.default=(0,nn.default)((0,sn.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");const on=$e({});on.interceptors.request.use(n=>{const t=window.blocklet?window.blocklet.prefix:"/";return n.baseURL=t||"",n.url=G("/api",String(n.url)),n.timeout=2e5,n.params=n.params||{},new URLSearchParams(n.url.split("?")[1]).has("locale")||(n.params.locale=ut()),n},n=>Promise.reject(n));const Qe=(...n)=>$e(...n),rn=(n,t)=>t?n?[n,...Array.isArray(t)?t:[t]]:t:n,an=(n,{width:t=600,height:o=700,name:i="did-domain:popup"}={})=>{const a=window.screenX+(window.innerWidth-t)/2,r=window.screenY+(window.innerHeight-o)/2,l=[`left=${a}`,`top=${r}`,`width=${t}`,`height=${o}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],c=window.open("",i,l.join(","));if(c===null)throw new Error("Failed to open popup");return c.location.href=Kt(n,{opener:window.location.origin}),c},ln="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Ye=async n=>{var d;if(!n||!(n!=null&&n.trim()))return null;const t=Qe(),o=new URL(n);o.pathname="__blocklet__.js",o.searchParams.set("type","json");const{data:i}=await t.get(o.toString()),a=(d=i==null?void 0:i.componentMountPoints)==null?void 0:d.find(h=>h.did===ln),r=new URL(n);r.pathname=a==null?void 0:a.mountPoint;const l=r.toString(),c=G(l,"/api");return{base:l,api:c}},cn=Be({buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),dn=Be({buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),un={zh:dn,en:cn};function Ze({delegatee:n,delegateePk:t,didDomainURL:o,locale:i,title:a,onSuccess:r,...l}){const{t:c}=k(),[d,h]=Nt({currentState:1}),f=A.useRef(null),C=V(x=>{var m,v,I,j;x.data.type==="didDomain.success"&&(r==null||r({nftDid:(m=x.data)==null?void 0:m.nftDid,domain:(v=x.data)==null?void 0:v.domain,chainHost:(I=x.data)==null?void 0:I.chainHost}),(j=f.current)==null||j.close(),f.current=null,h({currentState:4}),setTimeout(()=>{h({currentState:8})},2e3))});Ot(()=>{var x;try{window.removeEventListener("message",C),(x=f.current)==null||x.close(),f.current=null}catch(m){console.warn("Failed to close popup",m)}});const S=V(()=>{h({currentState:1})}),g=V(()=>{h({currentState:2}),P.run()}),y=V(({sessionId:x,baseURL:m})=>{window.addEventListener("message",C);const v=new URL(m);v.searchParams.set("sessionId",x),v.searchParams.set("locale",i),f.current=an(v.toString());const I=setInterval(()=>{var j;(j=f.current)!=null&&j.closed&&(clearInterval(I),S())},1e3);return()=>clearInterval(I)}),P=Wt(async()=>{const x=await Ye(o);if(!x)return null;const m=Qe({baseURL:x.api}),{data:v}=await m.post("/payment/session",{delegatee:n,delegateePk:t});return y({sessionId:v.sessionId,baseURL:x.base})},{manual:!0,debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(x){console.error(x)}});return e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:g,variant:"contained",startIcon:e.jsx(Gt,{}),...l,children:a||c("buy.button.title")}),e.jsxs(pt,{fullWidth:!0,maxWidth:"xs",open:d.currentState>1&&d.currentState<8,onClose:S,children:[!P.error&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[d.currentState===2&&e.jsx(z,{size:50}),d.currentState===4&&e.jsx(Vt,{sx:{color:"primary.main",fontSize:"5rem"}}),d.currentState===2&&e.jsx(q,{children:c("buy.status.inProgress")}),d.currentState===4&&e.jsx(q,{children:c("buy.status.success")})]}),P.error&&e.jsx(de,{severity:"error",children:c("buy.error.failedToCreateSession")})]})]})}const Xe={onSuccess:()=>{},title:""};Ze.defaultProps=Xe;function Je(n){return e.jsx(mt,{locale:n.locale,translations:un,children:e.jsx(Ze,{...n})})}Je.defaultProps=Xe;function et({nftDid:n,didDomainURL:t,locale:o,sx:i}){const{t:a}=k(),[r,l]=Q({safeIframeRef:null,popoverAnchorEl:null}),c=A.useRef(null),d=K(),h=ue(d.breakpoints.down("md")),f=y=>{l({popoverAnchorEl:y.currentTarget})},C=()=>{l({popoverAnchorEl:null})},S=Ht(async()=>{const y=await Ye(t);return y?y.base:null});if(!S.value)return null;if(S.loading)return e.jsx(z,{});const g=G(S.value,`/embed/domain?nft-did=${n}&locale=${o}`);return e.jsxs(e.Fragment,{children:[e.jsx(p,{component:"img",src:G(t,"/.well-known/service/blocklet/logo"),alt:"logo",width:16,height:16,onClick:f,sx:rn({cursor:"pointer"},i)}),e.jsx(Ue,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:C,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:c,title:a("common.subscription"),width:h?"320px":"400px",height:h?"600px":"680px",style:{border:0},src:g})})]})}et.defaultProps={sx:{}};const mn=n=>["waiting","creating","renewaling"].includes(n);function pe(n){var w,R;const{t}=k(),[o,i]=A.useState(!1),{inService:a}=F(),[r,l]=A.useState(null),{siteId:c,domain:d,onAdd:h,children:f,did:C}=n,[S,g]=A.useState(!1),{api:y,ws:{useSubscription:P}}=F(),{mode:x,actions:{refreshDomainStatus:m}}=We(),v=Yt(async()=>{const{cert:b}=await y.findCertificateByDomain({input:{domain:d,did:C}});return b}),I=(b,U)=>{b.domain===d&&(g(!1),i(!1),a&&x!=="setup"&&(U==="success"?O.success(t("setup.domain.genCertSuccess",{domain:b.domain})):U==="error"&&O.error(t("setup.domain.genCertFailed",{domain:b.domain,message:b.message}))))};if(A.useEffect(()=>{var b;v.loading||g(mn((b=v.value)==null?void 0:b.status))},[v.loading,(w=v.value)==null?void 0:w.status]),P(ke.BlockletEvents.certError,b=>I(b,"error")),P(ke.BlockletEvents.certIssued,b=>{v.retry(),m(b.domain),I(b,"success")}),v.loading||((R=v.value)==null?void 0:R.status)==="normal")return"";const j=()=>{i(!1),l(null)},T=async()=>{i(!0);try{await y.issueLetsEncryptCert({input:{siteId:c,domain:d,did:C,inBlockletSetup:x==="setup"}}),h(),g(!0)}catch(b){console.error(b),g(!1)}finally{i(!1),l(null)}},u={title:t("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(de,{severity:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:T,onCancel:j},L=b=>{b.stopPropagation(),l(u)};return e.jsxs(e.Fragment,{children:[S?e.jsx(M,{title:t("router.cert.issuing"),children:e.jsx(z,{size:12})}):f({loading:o,open:L}),r&&e.jsx(Y,{color:"primary",title:r.title,description:r.description,confirm:r.confirm,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}pe.propTypes={domain:s.string.isRequired,did:s.string.isRequired,siteId:s.string.isRequired,onAdd:s.func,children:s.any};pe.defaultProps={onAdd:()=>{},children:null};function fe(n){const{domain:t,domainStatus:o,...i}=n;return Tt(t)||!Oe(t)||ft(o)||o!=null&&o.isHttps?"":e.jsx(pe,{domain:t,...i})}fe.propTypes={domain:s.string.isRequired,domainStatus:s.shape({isHttps:s.bool}).isRequired,did:s.string.isRequired,onAdd:s.func,children:s.any};fe.defaultProps={onAdd:()=>{},children:null};var he={},pn=ce;Object.defineProperty(he,"__esModule",{value:!0});var tt=he.default=void 0,fn=pn(ae()),hn=e;tt=he.default=(0,fn.default)((0,hn.jsx)("path",{d:"M17 20.41 18.41 19 15 15.59 13.59 17zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5z"}),"CallMerge");const nt=A.createContext({}),{Provider:xn,Consumer:es}=nt;function gn({children:n}){const[t,o]=Q({domain:"",error:null}),{locale:i}=k(),a={error:t.error,domain:t.domain,setError:r=>{o({error:r})},setDomain:r=>{const l=le(r),c=He(l,i);o({domain:l,error:c})}};return e.jsx(xn,{value:{value:a},children:n})}function Dn(){const{value:n}=A.useContext(nt);return n}const{joinURL:Fe}=Lt,yn=_t,st="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",jn=async n=>{var c;if(!n||!(n!=null&&n.trim()))return null;const t=new URL(n);t.pathname="__blocklet__.js",t.searchParams.set("type","json");const{data:o}=await yn.get(t.toString()),i=(c=o==null?void 0:o.componentMountPoints)==null?void 0:c.find(d=>d.did===st),a=new URL(n);a.pathname=i==null?void 0:i.mountPoint;const r=a.toString(),l=Fe(r,"/api");return{base:r,api:l,domain:Fe(l,"/domains")}};var vn={DID_DOMAIN_SERVICE_DID:st,getDidDomainServiceURL:jn},Z={exports:{}};const bn=ht,Cn=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class ot extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const wn=(n,t,o)=>{const i=o.retries-(t-1);return n.attemptNumber=t,n.retriesLeft=i,n},Sn=n=>Cn.includes(n),it=(n,t)=>new Promise((o,i)=>{t={onFailedAttempt:()=>{},retries:10,...t};const a=bn.operation(t);a.attempt(async r=>{try{o(await n(r))}catch(l){if(!(l instanceof Error)){i(new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`));return}if(l instanceof ot)a.stop(),i(l.originalError);else if(l instanceof TypeError&&!Sn(l.message))a.stop(),i(l);else{wn(l,r,t);try{await t.onFailedAttempt(l)}catch(c){i(c);return}a.retry(l)||i(a.mainError())}}})});Z.exports=it;Z.exports.default=it;Z.exports.AbortError=ot;var Rn=Z.exports;const An=Pt(Rn);function xe({domain:n,resolvedTarget:t,...o}){const{t:i,locale:a}=k();return e.jsxs(p,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...o,children:[e.jsxs(p,{display:"flex",children:[i("router.domain.setup.tipStart"),n&&e.jsx(p,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),i("router.domain.setup.tipEnd"),":"]}),e.jsxs(p,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[e.jsx(se,{label:i("router.domain.setup.recordType"),value:"CNAME",locale:a}),e.jsx(se,{label:i("router.domain.setup.recordValue"),value:t,locale:a})]})]})}xe.propTypes={domain:s.string,resolvedTarget:s.string.isRequired};xe.defaultProps={domain:""};function se({locale:n,label:t,value:o}){const i=ue(r=>r.breakpoints.down("md")),a=K();return e.jsx(Jt,{name:t,nameWidth:120,children:e.jsxs(p,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(q,{component:"span",color:"primary.main",overflow:"auto",sx:i?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:o}),e.jsx(Me,{content:o,locale:n,style:{marginLeft:"4px",color:a.palette.text.secondary}})]})})}se.propTypes={locale:s.string.isRequired,label:s.string.isRequired,value:s.string.isRequired};function ge({siteId:n,teamDid:t,cnameDomain:o,defaultCustomDomain:i,onInputDomain:a,appId:r,appPk:l,onSuccess:c,onError:d,disabled:h,autoFocus:f,inBlockletSetup:C,shouldCheckDomain:S,onStateChange:g,currentIp:y,resolveDomain:P,...x}){const{t:m,locale:v}=k(),{api:I,info:j}=F(),T=Dn(),u=K(),L=xt({key:"sm"}),[w,R]=Q({submittingDomain:!1,domain:i,error:null,type:j!=null&&j.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1}),b=Xt(()=>vn.getDidDomainServiceURL(j==null?void 0:j.nftDomainUrl));if(j!=null&&j.nftDomainUrl&&b.loading)return e.jsx(p,{...x,children:e.jsx(Pe,{relative:"parent",children:e.jsx(z,{})})});if(b.error)return e.jsx(p,{...x,children:e.jsx(Pe,{relative:"parent",children:b.error.message})});const U=b.value,at=()=>{R({invalidDNSDomain:null})},ee=async D=>{g(m("setup.domain.addingDomain")),await I.addDomainAlias({input:{id:n,domainAlias:D,teamDid:t,inBlockletSetup:!0}}),R({submittingDomain:!1}),c({domain:D,type:"inputDomain"})},Se=async({domain:D,type:E,nftDid:N,chainHost:_})=>{try{if(!S){if(E==="inputDomain"){await ee(D);return}c({domain:D,type:E,nftDid:N,chainHost:_});return}g({text:m("setup.domain.checkingResolvable")});let $=30;const te=3e3,dt=$*1e3/te,Ae=setInterval(()=>{if($<=0){clearInterval(Ae);return}g({text:`${m("setup.domain.checkingResolvable")} (${$--}s)`})},1e3),Ie=await An(async()=>{const{data:B}=await P(D);if(!B.address)throw new Error("Cannot resolve domain");return B.address},{retries:dt,minTimeout:te,maxTimeout:te,onFailedAttempt:console.error}).catch(console.error);if(clearInterval(Ae),!Ie){const B=m("setup.domain.cannotResolve",{domain:D});if(E==="nftDomain"){O.error(B),c({domain:D,type:"nftDomain"});return}g({text:""}),R({invalidDNSDomain:{domain:D,error:B},domain:D,type:E,submittingDomain:!1});return}if(Ie!==y){const B=m("setup.domain.resolvedAddressError",{domain:D,curDomain:window.location.hostname});if(E==="nftDomain"){O.error(B),c({domain:D,type:"nftDomain"});return}g({text:""}),R({invalidDNSDomain:{domain:D,error:B},domain:D,type:E,submittingDomain:!1});return}if(E==="nftDomain"){c({domain:D,type:"nftDomain"});return}await ee(D)}catch($){O.error($.message),g({text:""}),R({submittingDomain:!1})}},lt=async({domain:D,nftDid:E,chainHost:N})=>{try{const _=_e(D);R({submittingDomain:!0}),await I.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:_,nftDid:E,chainHost:N,teamDid:t,inBlockletSetup:C}});const $="nftDomain";R({showNFTDomainAuth:!1,type:$}),await Se({domain:_,type:$,nftDid:E,chainHost:N})}catch(_){O.error(_.message)}finally{R({showNFTDomainAuth:!1,submittingDomain:!1})}},ct=async()=>{try{R({submittingDomain:!0});const D=_e(w.domain);if(j.nftDomainUrl&&U&&(await I.isDidDomain({input:{domain:D}})).value===!0){R({showNFTDomainAuth:!0});return}await Se({domain:D,type:w.type})}catch(D){R({submittingDomain:!1}),T.setError(D.message)}},Re=T.error||w.error;return e.jsx(p,{...x,children:e.jsxs(p,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(p,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[e.jsx(q,{sx:{color:u.palette.text.primary},children:m("router.domainAlias.add.tips")}),e.jsx(vt,{sx:{display:"block",marginTop:"8px"},label:m("router.domainAlias.add.domainDescription"),helperText:w.type==="inputDomain"&&Re||m("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:h,value:w.domain,size:"small",variant:"outlined",error:!!Re&&w.type==="inputDomain",onChange:D=>{var _;const E=le((_=D.target)==null?void 0:_.value);T.setDomain(E);const N=He(E,v);R({domain:E,error:N,type:"inputDomain"}),a({domain:E,error:N,type:"inputDomain"})},autoFocus:f,onBlur:()=>{T.domain||(R({error:null}),T.setError(null))}}),e.jsx(p,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(bt,{"data-cy":"confirm-add-domain",fullWidth:L,variant:"contained",loading:w.submittingDomain,onClick:ct,children:m("common.add")})}),e.jsxs(p,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:u.palette.primary.main},onClick:()=>R({showDnsTip:!w.showDnsTip}),children:[e.jsx(Zt,{fontSize:"1em"}),m("router.domainAlias.showTipHint")]}),w.showDnsTip&&e.jsx(xe,{domain:w.domain,resolvedTarget:o,style:{marginTop:"4px"}})]}),w.invalidDNSDomain&&e.jsx(Y,{title:m("common.reminder"),description:m("setup.domain.invalidDNSReminder",{error:w.invalidDNSDomain.error}),color:"primary",confirm:m("setup.domain.continueAdd"),onConfirm:()=>ee(w.invalidDNSDomain.domain,w.type),onCancel:at}),U&&e.jsx(gt,{open:w.showNFTDomainAuth,popup:!0,useSocket:!1,forceConnected:!1,action:"authorize",baseUrl:U.api,checkFn:Qt.create({baseURL:U.api}).get,extraParams:{delegatee:r,delegateePk:l,domain:w.domain},onSuccess:lt,onClose:()=>R({showNFTDomainAuth:!1,submittingDomain:!1}),checkTimeout:60*5e3,showDownload:!1,messages:{title:m("router.domainAlias.addDomainNFT.connect.title"),scan:m("router.domainAlias.addDomainNFT.connect.scan"),confirm:m("router.domainAlias.addDomainNFT.connect.confirm"),success:m("router.domainAlias.addDomainNFT.connect.success")}})]})})}ge.propTypes={siteId:s.string.isRequired,currentIp:s.string,teamDid:s.string.isRequired,cnameDomain:s.string.isRequired,defaultCustomDomain:s.string,onInputDomain:s.func,onSuccess:s.func,appId:s.string,appPk:s.string,disabled:s.bool,autoFocus:s.bool,inBlockletSetup:s.bool,shouldCheckDomain:s.bool,onStateChange:s.func,resolveDomain:s.func,onError:s.func};ge.defaultProps={defaultCustomDomain:"",currentIp:"",onInputDomain:Ee,onSuccess:Ee,appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1,shouldCheckDomain:!1,onStateChange:()=>{},resolveDomain:()=>{},onError:()=>{}};function De({id:n,children:t,title:o,teamDid:i,systemDomains:a,appId:r,appPk:l}){const{t:c}=k(),[d,h]=Q({loading:!1,confirmSetting:null}),f=a.find(y=>Ve.isDidDomain(y)),C=()=>{h({loading:!1,confirmSetting:null})},S={title:o||c("router.domainAlias.add.title"),description:function(P,x,m){return e.jsx(ge,{siteId:n,teamDid:i,cnameDomain:f,onSuccess:()=>h({confirmSetting:null}),onInputDomain:({domain:v,type:I,error:j})=>{x({...P,domain:v,type:I,__disableConfirm:!!j}),m(j)},appId:r,appPk:l})},confirm:c("common.confirm"),cancel:c("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:C},g=y=>{y.stopPropagation(),h({confirmSetting:S})};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:d.loading,open:g}):e.jsxs(Ne,{onClick:g,className:"rule-action","data-cy":"action-add-domain-alias",children:[d.loading?e.jsx(z,{size:16}):e.jsx(tt,{style:{fontSize:18,marginRight:5}}),c("router.domainAlias.add.title")]}),d.confirmSetting&&e.jsx(Y,{title:d.confirmSetting.title,description:d.confirmSetting.description,confirm:d.confirmSetting.confirm,cancel:d.confirmSetting.cancel,params:d.confirmSetting.params,onCancel:d.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:d.loading,maxWidth:"sm"})]})}De.propTypes={id:s.string.isRequired,children:s.any,title:s.string,teamDid:s.string,systemDomains:s.arrayOf(s.string).isRequired,appId:s.string,appPk:s.string.isRequired};De.defaultProps={children:null,title:"",teamDid:"",appId:null};function In(n){return e.jsx(gn,{children:e.jsx(De,{...n})})}function ye({appId:n,appPk:t,siteId:o,inBlockletSetup:i,teamDid:a,sx:r,...l}){const{api:c,info:d}=F(),{locale:h,t:f}=k(),C=async({domain:S,nftDid:g,chainHost:y})=>{await c.addDomainAlias({input:{id:o,type:"nft-domain",domainAlias:S,nftDid:g,chainHost:y,teamDid:a,inBlockletSetup:i}})};return e.jsx(Je,{delegatee:n,delegateePk:t,didDomainURL:d.nftDomainUrl,onSuccess:C,locale:h,variant:"outlined",sx:r,title:f("router.domainAlias.addDomainNFT.buy"),...l})}ye.propTypes={appId:s.string.isRequired,appPk:s.string.isRequired,siteId:s.string.isRequired,inBlockletSetup:s.bool.isRequired,teamDid:s.string.isRequired,sx:s.object};ye.defaultProps={sx:{}};function je(n){const{t}=k(),[o,i]=A.useState(!1),[a,r]=A.useState(null),{id:l,domain:c,children:d,teamDid:h}=n,{api:f}=F(),C=()=>{i(!1),r(null)},S=async()=>{i(!0);try{await f.deleteDomainAlias({input:{id:l,domainAlias:c,teamDid:h}}),await qt(2e3)}catch(P){O.error(P.message)}finally{r(null),i(!1)}},g={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:S,onCancel:C},y=P=>{P.stopPropagation(),r(g)};return e.jsxs(e.Fragment,{children:[typeof d=="function"?d({loading:o,open:y}):e.jsxs(W,{edge:"end",onClick:y,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[o?e.jsx(z,{size:16}):e.jsx(ze,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),a&&e.jsx(Y,{title:a.title,description:a.description,confirm:a.confirm,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}je.propTypes={id:s.string.isRequired,domain:s.string.isRequired,children:s.any,teamDid:s.string};je.defaultProps={children:null,teamDid:""};function ve({site:n,domain:t,blocklet:o}){const{t:i}=k(),a=t.value===window.location.hostname;return e.jsx(en,{"data-cy":"domain-actions",size:"large",actions:[({close:r})=>{var l;return e.jsx(je,{id:n.id,domain:t.value,teamDid:(l=o==null?void 0:o.meta)==null?void 0:l.did,children:({open:c})=>e.jsx(M,{title:a?i("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(Ne,{disabled:t.isProtected||a,dense:!0,onClick:d=>{r(),c(d)},"data-cy":"action-toggle-block",children:[e.jsx(Ct,{style:{minWidth:24,marginRight:8},children:e.jsx(ze,{})}),e.jsx(wt,{primary:i("common.delete")})]},"remove")})})})}]})}ve.propTypes={site:s.object.isRequired,domain:s.object.isRequired,blocklet:s.object.isRequired};ve.defaultProps={};var be={},Pn=ce;Object.defineProperty(be,"__esModule",{value:!0});var Ce=be.default=void 0,En=Pn(ae()),kn=e;Ce=be.default=(0,En.default)((0,kn.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Https");const X=s.shape({href:s.string,accessibility:s.shape({loading:s.bool,accessible:s.bool}),domainStatus:s.shape({isHttps:s.bool,matchedCert:s.object}),dns:s.shape({resolved:s.bool,ip:s.string})});function we({certificate:n}){const[t,o]=A.useState(null),i=F(),{t:a,locale:r}=k(),l=h=>{o(h.currentTarget)},c=()=>{o(null)},d=!!t;return e.jsxs(e.Fragment,{children:[e.jsx(Ce,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:l,onMouseLeave:c,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),e.jsx(Ue,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:c,disableRestoreFocus:!0,children:e.jsx(St,{children:e.jsxs(Rt,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${i.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(q,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(q,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(q,{component:"div",children:`${a("common.issuer")}: ${Dt(n,"issuer.commonName","")}`}),e.jsx(q,{component:"div",children:`${a("router.cert.issuedOn")}: ${Te(n.validFrom,r)}`}),e.jsx(q,{component:"div",children:`${a("router.cert.expiryOn")}: ${Te(n.validTo,r)}`})]})]})})})]})}we.propTypes={certificate:s.object};we.defaultProps={certificate:{}};function H({domain:n,filters:t}){const{t:o}=k(),{value:i,domainStatus:a}=n;if(!Oe(i))return null;let r=null,l=null;const{isHttps:c,matchedCert:d}=a;if(!Ft(i)){const{dns:{resolved:f,ip:C}={}}=a;f||C==="127.0.0.1"?r=e.jsx(M,{title:o("router.domain.verify.ok"),children:e.jsx(qe,{color:"success"})}):r=e.jsx(M,{title:o("router.domain.verify.notResolved"),children:e.jsx(qe,{color:"error"})})}c?l=e.jsx(we,{certificate:d}):l=e.jsx(M,{title:o("router.domain.https.bad"),children:e.jsx(Ce,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const h=t.map(f=>f==="domain"?r:f==="http"?l:null);return A.createElement(A.Fragment,null,...h)}H.propTypes={domain:X.isRequired,filters:s.array};H.defaultProps={filters:["domain","http"]};const Tn=Ge(J,"mutate_blocklets"),Ln=Ge(J,"",$t);function rt(n){const{inService:t}=F(),{blocklet:o,loadingRuntimeInfo:i}=We();let a=Tn;return t&&(a=Ln),e.jsx(a,{...n,blocklet:o,inService:t,loadingRuntimeInfo:i})}rt.propTypes={listOnly:s.bool};rt.defaultProps={listOnly:!1};function J({hasPermission:n,blocklet:t,loadingRuntimeInfo:o,inService:i,listOnly:a}){var v,I,j,T;const{t:r}=k(),{info:l}=F(),[c,d]=A.useState(!1),h=ue(u=>u.breakpoints.down("md")),f=A.useMemo(()=>{let u=n;return Bt(t)&&(u=u&&i),u},[n,i,t]),{site:C}=t,S=A.useMemo(()=>{var u;return Mt((u=t.site)==null?void 0:u.domainAliases)},[(v=t.site)==null?void 0:v.domainAliases]),g=[],y=[],P=kt.encode(t.appPid),x=(j=(I=t.environments)==null?void 0:I.find(u=>u.key==="BLOCKLET_APP_PK"))==null?void 0:j.value,m=zt(S);return S.forEach(u=>{const L=u.value||"";Ve.isDidDomain(L)&&!L.startsWith(P)?y.push(u):g.push(u)}),e.jsxs(e.Fragment,{children:[!a&&e.jsxs(e.Fragment,{children:[e.jsxs(p,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(p,{children:r("common.domain")}),f&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(In,{id:C.id,title:r("router.domain.add.title"),teamDid:(T=t.meta)==null?void 0:T.did,appId:t.appPid,appPk:x,systemDomains:m==null?void 0:m.map(u=>u.value),children:({open:u})=>e.jsxs(W,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:u,disabled:Le.isInProgress(t.status),children:[e.jsx(Et,{style:{fontSize:"1.3em",marginRight:4}}),r("common.add")]})}),l.nftDomainUrl&&e.jsx(ye,{variant:"outlined",appId:t.appPid,appPk:x,siteId:C.id,inBlockletSetup:!1,teamDid:t.meta.did})]})]}),Le.isAccessible(t.status)===!1&&e.jsx(p,{mt:1.5,mb:1.5,children:e.jsx(de,{severity:"warning",children:r("blocklet.router.noRunning")})})]}),e.jsx(p,{sx:{display:"flex",flexDirection:"column",gap:1},children:(c?S:g).map(u=>{var w,R;const L=u.value;return e.jsxs(A.Fragment,{children:[h&&e.jsxs(p,{display:"flex",flexDirection:"column",children:[e.jsx(p,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:e.jsx(oe,{domain:u,target:"_blank",children:u.value})}),e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[e.jsx(H,{domain:u,filters:["domain"]},`${u.value}-domain`),e.jsx(re,{siteId:(w=t.site)==null?void 0:w.id,domain:u,blocklet:t,hasMutatePermission:f})]}),e.jsx(p,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:f,site:C,domain:u,blocklet:t})})]})]},L),!h&&e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[e.jsx(H,{domain:u,filters:["domain"]},`${u.value}-domain`),e.jsx(p,{sx:{ml:2,mr:.5},children:e.jsx(oe,{domain:u,target:"_blank",children:u.value})}),e.jsx(re,{siteId:(R=t.site)==null?void 0:R.id,domain:u,blocklet:t,hasMutatePermission:f})]}),e.jsx(p,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:f,site:C,domain:u,blocklet:t})})]},L)]},L)})}),y.length>0&&e.jsx("div",{style:{marginLeft:"20px",marginTop:"12px"},children:e.jsx(W,{endIcon:c?e.jsx(Ke,{}):e.jsx(yt,{}),onClick:()=>d(!c),children:r(c?"common.collapseAll":"blocklet.router.showAllDomains")})}),!S.length&&(o?e.jsx(z,{size:16}):e.jsx(jt,{children:r("common.empty")}))]})}J.propTypes={hasPermission:s.bool,blocklet:s.object.isRequired,loadingRuntimeInfo:s.bool,inService:s.bool.isRequired,listOnly:s.bool};J.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1};function oe({domain:n,children:t,...o}){const{t:i,locale:a}=k(),{href:r,accessibility:l,value:c}=n,d=A.useCallback(()=>e.jsx(Me,{content:le(c),locale:a,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}),[c,a]);return!l||l.loading?e.jsxs(ne,{...o,children:[t,d(),e.jsx(M,{title:i("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx("span",{className:"status",children:e.jsx(z,{size:12})})})]}):l.accessible?e.jsxs(ne,{...o,children:[e.jsx(p,{component:"a",href:r,target:"_blank",rel:"noopener noreferrer",children:t}),d()]}):e.jsxs(ne,{...o,children:[e.jsx(M,{title:i("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx("span",{children:t})}),d()]})}oe.propTypes={domain:X.isRequired,children:s.any.isRequired};const ne=At.span`
|
|
2
2
|
&,
|
|
3
3
|
& > * {
|
|
4
4
|
color: #222;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DVYdq7IA.js","assets/vendor-react-D-afvo_7.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{u as ee,_ as b,d as $}from"./index-
|
|
2
|
+
import{u as ee,_ as b,d as $}from"./index-DgZ1ypbb.js";import{a1 as te,j as e,ac as g,T as w,x as P,aQ as se,a3 as F,M,a2 as ne,aa as ie}from"./vendor-mui-core-BlX2BJoA.js";import{r,u as re}from"./vendor-react-D-afvo_7.js";import{d as p,ad as ae,g as oe,W as ce,z as C,aS as h,P as le,U as ue,S as de,D as fe}from"./vendor-arcblock-CiLB_TiI.js";import{i as me}from"./isEmail-BWNRBSAy.js";import{F as pe}from"./fullpage-CFp4hSHz.js";import"./vendor-hooks-CLzfFpO7.js";import{f as S}from"./format-error-C0Ke3VXF.js";import{d as ge}from"./CheckCircle-BElcljFC.js";import{g as R}from"./get-safe-url-RTzyOi09.js";import"./vendor-utils-DCpRgzMR.js";var N;(N=window.env)!=null&&N.groupPathPrefix;p.ROLES.ADMIN,p.ROLES.OWNER;const y=()=>{const{searchParams:o}=new URL(window.location.href);return o.get("fromWallet")==="1"};var T={},he=te;Object.defineProperty(T,"__esModule",{value:!0});var H=T.default=void 0,ye=he(ae()),xe=e;H=T.default=(0,ye.default)((0,xe.jsx)("path",{d:"M12 19c0-3.87 3.13-7 7-7 1.08 0 2.09.25 3 .68V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h8.08c-.05-.33-.08-.66-.08-1M4 6l8 5 8-5v2l-8 5-8-5zm13.34 16-3.54-3.54 1.41-1.41 2.12 2.12 4.24-4.24L23 16.34z"}),"MarkEmailRead");const Ee=ie.form`
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,a2 as C,a3 as T}from"./vendor-mui-core-BlX2BJoA.js";import{r as k,k as W}from"./vendor-react-D-afvo_7.js";import{g as j,C as S,ab as I,z as h,d as R,ac as U}from"./vendor-arcblock-CiLB_TiI.js";import{F as b}from"./fullpage-CFp4hSHz.js";import{w as v}from"./wrap-locale-
|
|
1
|
+
import{j as e,a2 as C,a3 as T}from"./vendor-mui-core-BlX2BJoA.js";import{r as k,k as W}from"./vendor-react-D-afvo_7.js";import{g as j,C as S,ab as I,z as h,d as R,ac as U}from"./vendor-arcblock-CiLB_TiI.js";import{F as b}from"./fullpage-CFp4hSHz.js";import{w as v}from"./wrap-locale-D_rplmnG.js";import{g as L}from"./get-safe-url-CVhAz4Qr.js";import{S as F,s as N,a as _}from"./index-DgZ1ypbb.js";import"./vendor-utils-DCpRgzMR.js";import"./vendor-hooks-CLzfFpO7.js";function D({SessionContext:t,webWalletUrl:n,onSuccess:s}){var d,g;const{api:a,session:i}=k.useContext(t),{t:o,locale:f}=j(),u=W(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),w=async(r,E)=>{s(r,E),await i.refresh(),h.success(o("exchangePassport.success")),setTimeout(()=>{if(p){const c=decodeURIComponent(p);c.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?u(c,{replace:!0}):window.location.href=L(c)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},P=r=>{h.error(r.message)},m={},x=l.get("componentId");return x&&(m.componentId=x),i.loading?e.jsx(S,{children:e.jsx(C,{})}):e.jsx(b,{did:((d=window==null?void 0:window.blocklet)==null?void 0:d.appPid)||((g=window==null?void 0:window.env)==null?void 0:g.appPid),children:e.jsx(T,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(I,{className:"connect",action:"exchange-passport",checkFn:a.get,checkTimeout:10*60*1e3,webWalletUrl:n,onSuccess:w,onError:P,locale:f,messages:{title:o("exchangePassport.dialog.title"),scan:o("exchangePassport.dialog.scan"),confirm:o("exchangePassport.dialog.confirm"),success:o("exchangePassport.dialog.success")},extraParams:m,extraContent:null})})})}const z=v(D);function y(){const t=U(),n=(s,a)=>{s.sessionToken&&(N(a(s.sessionToken)),_(a(s.refreshToken)))};return e.jsx(z,{SessionContext:F,webWalletUrl:t,onSuccess:n})}export{y as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as X,j as e,E as t,I as S,aR as A,x as U,P as V,v as W,$ as G,ar as H,al as J,bR as Q,M as Y,a3 as u,a2 as Z}from"./vendor-mui-core-BlX2BJoA.js";import{ad as ee,af as te,bc as se}from"./vendor-arcblock-CiLB_TiI.js";import{b as P,r as i}from"./vendor-react-D-afvo_7.js";import{d as ae}from"./Done-BCESxXX2.js";import{F as le,R as ne}from"./logo-uploader-
|
|
1
|
+
import{a1 as X,j as e,E as t,I as S,aR as A,x as U,P as V,v as W,$ as G,ar as H,al as J,bR as Q,M as Y,a3 as u,a2 as Z}from"./vendor-mui-core-BlX2BJoA.js";import{ad as ee,af as te,bc as se}from"./vendor-arcblock-CiLB_TiI.js";import{b as P,r as i}from"./vendor-react-D-afvo_7.js";import{d as ae}from"./Done-BCESxXX2.js";import{F as le,R as ne}from"./logo-uploader-C1-XCCMv.js";import{d as re}from"./EditIcon-BF2eKBD0.js";import{d as ie}from"./ArrowDropDown-BdHlAt9a.js";var R={},oe=X;Object.defineProperty(R,"__esModule",{value:!0});var ce=R.default=void 0,ue=oe(ee()),de=e;ce=R.default=(0,ue.default)((0,de.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"SettingsOutlined");function I({triggers:l,onEnterEdit:a,disabled:m}){const n=P.useRef(null),[p,o]=P.useState(!1),b=s=>{o(!1),s()},C=()=>{o(s=>!s)},d=s=>{n.current&&n.current.contains(s.target)||o(!1)};return l.length===0?e.jsx(S,{"data-cy":"schema-form-item-edit",onClick:a,disabled:m,size:"large",children:e.jsx(re,{})}):e.jsxs(e.Fragment,{children:[e.jsx(A,{variant:"outlined",ref:n,"aria-label":"split button",children:e.jsx(U,{size:"large","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:C,children:e.jsx(ie,{})})}),e.jsx(V,{sx:{zIndex:9999},open:p,anchorEl:n.current,role:void 0,placement:"bottom-end",children:e.jsx(W,{children:e.jsx(G,{onClickAway:d,children:e.jsx(H,{id:"split-button-menu",autoFocusItem:!0,children:l.map(s=>e.jsx(J,{onClick:()=>b(s.handler),children:s.title},s.key))})})})})]})}I.propTypes={triggers:t.arrayOf(t.shape({key:t.string.isRequired,title:t.string.isRequired,handler:t.func.isRequired})),onEnterEdit:t.func.isRequired,disabled:t.bool.isRequired};I.defaultProps={triggers:[]};const T=(l,a,m)=>l===null&&a&&m?"******":l?a?"******":l:"",fe=Q`
|
|
2
2
|
0%, 100% {
|
|
3
3
|
transform: scale(1) translateX(0);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,a3 as t,a2 as P,aQ as W,E as d,aa as B}from"./vendor-mui-core-BlX2BJoA.js";import{r as l}from"./vendor-react-D-afvo_7.js";import{j as v}from"./vendor-utils-DCpRgzMR.js";import{d as E}from"./Launch-BOCFiYoz.js";import{af as I,ab as L}from"./vendor-arcblock-CiLB_TiI.js";import{W as $}from"./did-address-49U3oRW2.js";import{P as D}from"./page-header-6EUz18Qu.js";import{o as T,u as z}from"./index-
|
|
1
|
+
import{j as e,a3 as t,a2 as P,aQ as W,E as d,aa as B}from"./vendor-mui-core-BlX2BJoA.js";import{r as l}from"./vendor-react-D-afvo_7.js";import{j as v}from"./vendor-utils-DCpRgzMR.js";import{d as E}from"./Launch-BOCFiYoz.js";import{af as I,ab as L}from"./vendor-arcblock-CiLB_TiI.js";import{W as $}from"./did-address-49U3oRW2.js";import{P as D}from"./page-header-6EUz18Qu.js";import{o as T,u as z}from"./index-DgZ1ypbb.js";import{S as A}from"./layout-Bb4get3W.js";import{S as F}from"./step-actions-DnckX9Zh.js";import{S as m}from"./button-Bo5ZAcJk.js";import"./vendor-hooks-CLzfFpO7.js";import"./content-layout-CK_AzZZ-.js";function u({onNext:n,onPrevious:f}){const{locale:x,t:s}=l.useContext(I),{blocklet:a,gas:c,tokenInfo:h,actions:j}=T(),{api:y}=z(),[g,o]=l.useState(!1),{need:p="",current:b="",owe:r=99999,deficiency:k,symbol:C="",endpoint:i}=c||{},{origin:S="/"}=i?new URL(i):{};l.useEffect(()=>{const N=setInterval(()=>{j.refreshFuel()},2e3);return()=>{clearInterval(N)}},[]);const w=()=>{o(!1)};return c?e.jsxs(R,{children:[e.jsx("div",{className:"header",children:e.jsx(D,{title:s("setup.fuel.title"),onClickBack:f})}),e.jsxs(t,{className:"qr-body",children:[e.jsxs(t,{mb:6,className:"tip",children:[s("setup.fuel.tipStart").replace("slot",""),e.jsx("span",{className:"amount",children:`${p} ${C}`}),s("setup.fuel.tipEnd")]}),e.jsx(t,{fontSize:16,fontWeight:"fontWeightBold",mb:.5,children:s("setup.fuel.addressTitle")}),e.jsxs(t,{display:"flex",alignItems:"center",children:[e.jsx($,{className:"address",did:a.appDid}),e.jsx(W,{style:{lineHeight:1},target:"_blank",href:v(S,"/explorer/accounts/",a.appDid),underline:"hover",children:e.jsx(E,{className:"icon-launch"})})]}),e.jsx(t,{my:2,children:e.jsx(m,{color:"primary",onClick:()=>o(!0),disabled:!r,children:s("setup.fuel.fuelApp")})}),e.jsx(L,{popup:!0,open:g,action:"fuel",checkFn:y.get,checkTimeout:10*60*1e3,onSuccess:w,onClose:()=>o(!1),locale:x,messages:{title:s("setup.connect.title"),scan:s("setup.connect.scan"),confirm:s("setup.connect.confirm"),success:s("setup.connect.success")},extraParams:{amount:k,...h,endpoint:i}}),e.jsxs(t,{display:"flex",color:"text.secondary",children:[e.jsxs(t,{display:"flex",children:[e.jsxs(t,{children:[s("setup.fuel.need"),":"]}),e.jsx(t,{ml:.5,color:"primary.main",fontWeight:"fontWeightBold",children:p})]}),e.jsxs(t,{display:"flex",ml:3,children:[e.jsxs(t,{children:[s("setup.fuel.current"),":"]}),e.jsx(t,{ml:.5,color:r>0?"error.main":"primary.main",fontWeight:"fontWeightBold",children:b})]})]})]}),e.jsx(F,{mt:8,children:e.jsx(m,{disabled:r>0,onClick:()=>n(),children:s("setup.next")})})]}):e.jsx(t,{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",children:e.jsx(P,{})})}u.propTypes={onNext:d.func,onPrevious:d.func};u.defaultProps={onNext:()=>{},onPrevious:()=>{}};const R=B(A)`
|
|
2
2
|
.qr-body {
|
|
3
3
|
width: 580px;
|
|
4
4
|
${n=>n.theme.breakpoints.down("md")} {
|