@abtnode/blocklet-services 1.16.19-beta-7d3ef675 → 1.16.19-beta-ba354e01

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/build/asset-manifest.json +61 -61
  2. package/build/index.html +1 -1
  3. package/build/service-worker.js +1 -1
  4. package/build/service-worker.js.map +1 -1
  5. package/build/static/css/{1233.dba37e64.chunk.css → 424.13cf051c.chunk.css} +1 -1
  6. package/build/static/js/1946.dd7542b8.chunk.js +2 -0
  7. package/build/static/js/2761.a62dc611.chunk.js +2 -0
  8. package/build/static/js/2988.62cc135c.chunk.js +2 -0
  9. package/build/static/js/3131.0f8fd01b.chunk.js +2 -0
  10. package/build/static/js/3490.4d3a51ea.chunk.js +2 -0
  11. package/build/static/js/356.df75c406.chunk.js +2 -0
  12. package/build/static/js/3842.c535fcce.chunk.js +3 -0
  13. package/build/static/js/{4023.623d31df.chunk.js → 4023.8c5c7db4.chunk.js} +2 -2
  14. package/build/static/js/424.d91b48b7.chunk.js +3 -0
  15. package/build/static/js/4881.8ba32996.chunk.js +2 -0
  16. package/build/static/js/530.a11fe287.chunk.js +2 -0
  17. package/build/static/js/5403.1ee6610b.chunk.js +3 -0
  18. package/build/static/js/5673.0dd67df6.chunk.js +2 -0
  19. package/build/static/js/5710.a221ffa5.chunk.js +2 -0
  20. package/build/static/js/5725.c401d636.chunk.js +3 -0
  21. package/build/static/js/5856.8f363ad8.chunk.js +3 -0
  22. package/build/static/js/5982.2fbc5d75.chunk.js +2 -0
  23. package/build/static/js/6032.1a233c60.chunk.js +2 -0
  24. package/build/static/js/6112.55185ef9.chunk.js +2 -0
  25. package/build/static/js/779.ba47be45.chunk.js +2 -0
  26. package/build/static/js/{7892.46f78f2c.chunk.js → 7892.029c9f9b.chunk.js} +2 -2
  27. package/build/static/js/8792.13a6919f.chunk.js +2 -0
  28. package/build/static/js/8944.d6df0376.chunk.js +2 -0
  29. package/build/static/js/8983.c87cf7ed.chunk.js +2 -0
  30. package/build/static/js/9194.8e4efb4f.chunk.js +2 -0
  31. package/build/static/js/9596.5b13ea7d.chunk.js +2 -0
  32. package/build/static/js/9900.31422ac9.chunk.js +2 -0
  33. package/build/static/js/main.9d12d0ab.js +3 -0
  34. package/package.json +18 -18
  35. package/build/static/js/1233.43c6131b.chunk.js +0 -3
  36. package/build/static/js/1905.656cb960.chunk.js +0 -2
  37. package/build/static/js/2506.dd9284b6.chunk.js +0 -2
  38. package/build/static/js/2838.bc235457.chunk.js +0 -3
  39. package/build/static/js/3131.99541aca.chunk.js +0 -2
  40. package/build/static/js/3708.937e3176.chunk.js +0 -3
  41. package/build/static/js/371.5ff795df.chunk.js +0 -2
  42. package/build/static/js/3842.e1bb702b.chunk.js +0 -3
  43. package/build/static/js/468.bbc69bbf.chunk.js +0 -2
  44. package/build/static/js/5982.4f8369df.chunk.js +0 -2
  45. package/build/static/js/6139.4c62883c.chunk.js +0 -2
  46. package/build/static/js/6271.0a698298.chunk.js +0 -2
  47. package/build/static/js/6311.d6addc15.chunk.js +0 -2
  48. package/build/static/js/7305.465df4a1.chunk.js +0 -2
  49. package/build/static/js/7648.955e20c7.chunk.js +0 -3
  50. package/build/static/js/779.21153e82.chunk.js +0 -2
  51. package/build/static/js/8016.3ef64a2c.chunk.js +0 -2
  52. package/build/static/js/8792.0f55707c.chunk.js +0 -2
  53. package/build/static/js/8944.7444f668.chunk.js +0 -2
  54. package/build/static/js/8983.6213f391.chunk.js +0 -2
  55. package/build/static/js/9033.ebf65926.chunk.js +0 -2
  56. package/build/static/js/9107.7f32925d.chunk.js +0 -2
  57. package/build/static/js/9596.a4eead04.chunk.js +0 -2
  58. package/build/static/js/9865.d5dfa72b.chunk.js +0 -2
  59. package/build/static/js/9900.3b72165e.chunk.js +0 -2
  60. package/build/static/js/main.81fbc388.js +0 -3
  61. /package/build/static/js/{3842.e1bb702b.chunk.js.LICENSE.txt → 3842.c535fcce.chunk.js.LICENSE.txt} +0 -0
  62. /package/build/static/js/{1233.43c6131b.chunk.js.LICENSE.txt → 424.d91b48b7.chunk.js.LICENSE.txt} +0 -0
  63. /package/build/static/js/{7648.955e20c7.chunk.js.LICENSE.txt → 5403.1ee6610b.chunk.js.LICENSE.txt} +0 -0
  64. /package/build/static/js/{2838.bc235457.chunk.js.LICENSE.txt → 5725.c401d636.chunk.js.LICENSE.txt} +0 -0
  65. /package/build/static/js/{3708.937e3176.chunk.js.LICENSE.txt → 5856.8f363ad8.chunk.js.LICENSE.txt} +0 -0
  66. /package/build/static/js/{main.81fbc388.js.LICENSE.txt → main.9d12d0ab.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8792],{92746:function(e,n,t){var a,r=t(71171),s=t(33028),o=t(59740),i=t(16380),c=t(50442),l=t(37574),p=["labelProps","className","style"];function d(e){var n=e.labelProps,t=e.className,a=e.style,r=(0,o.Z)(e,p),i=(0,s.Z)((0,s.Z)({},n),{},{labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"});return(0,l.jsx)(u,{className:t,style:a,children:(0,l.jsx)(c.Z,(0,s.Z)({labelProps:i},r))})}d.propTypes=c.Z.propTypes,d.defaultProps=c.Z.defaultProps;var u=i.Z.div(a||(a=(0,r.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(function(e){return e.theme.breakpoints.down("sm")}));n.Z=d},58792:function(e,n,t){t.r(n),t.d(n,{default:function(){return Ge}});var a=t(30969),r=t(33028),s=t(38361),o=t(33359),i=t(26022),c=t(45008),l=t(32723),p=t(34795),d=t(96234),u=t(33665),h=t(94308),f=t(43207),x=t(87006),m=t(29996),g=t(26328),v=t(19611),Z=t.n(v),y=t(1986),j=t(15419),k=t(50496),b=t(23299),A=t(20244),C=t(54559),w=t(24891),S=t(41395),B=t(83998),I=t(30134),D=t(99030),U=t(37574);function R(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,c.y0)().blocklet,v=(0,S.h6)().info,R=(0,i.PE)(),E=R.t,T=R.locale,F=(0,a.useState)(""),z=(0,d.Z)(F,2),O=z[0],L=z[1],N=(0,a.useState)(!1),P=(0,d.Z)(N,2),M=P[0],J=P[1],G=(0,a.useState)(!1),Q=(0,d.Z)(G,2),H=Q[0],V=Q[1],X=(0,a.useState)(""),K=(0,d.Z)(X,2),W=K[0],Y=K[1],q=(0,B.Z)({blocklet:t}),_=(0,w.yP)(v),$=(0,D.XN)(),ee=$.spaceGateways,ne=$.addSpaceGateway,te=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:Z()(A.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(A.PROD_DID_SPACES.CORE_URL).origin,checkFn:C.od.create({baseURL:Z()(A.PROD_DID_SPACES.CORE_URL,"space")}).get,messages:{title:E("storage.spaces.provideNFT.title",{appName:q.appName},T),scan:E("storage.spaces.provideNFT.scan",{appName:q.appName},T),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:E("storage.spaces.provideNFT.success")})},onClose:function(){se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),ae=(0,d.Z)(te,2),re=ae[0],se=ae[1],oe=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:E("storage.spaces.authorize.title",{appName:q.appName},T),scan:E("storage.spaces.authorize.scan",{appName:q.appName},T),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:E("storage.spaces.authorize.success")})},onClose:function(){le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),ie=(0,d.Z)(oe,2),ce=ie[0],le=ie[1],pe=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n,t){var a,s;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a=t(n.endpoint),s=n.space?t(n.space):{},e.next=5,de((0,r.Z)((0,r.Z)({endpoint:a},{did:(0,I.LQ)(a),name:"DID Space"}),s));case 5:le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),L(null),se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),y.Z.error((0,w.Z)(e.t0));case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(n,t){return e.apply(this,arguments)}}(),de=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n){var t,a,r,s,o,i;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.endpoint,r=n.name,s=n.did,e.next=3,(0,I.Z3)(a);case 3:return o=e.sent,e.next=6,(0,I.w2)(o);case 6:if(e.sent){e.next=9;break}return y.Z.error(E("storage.spaces.gateway.add.invalidUrl")),e.abrupt("return");case 9:if(!ee.some((function(e){return e.endpoint===a}))){e.next=13;break}return y.Z.error(E("storage.spaces.gateway.add.duplicate",{name:r})),e.abrupt("return");case 13:return i={name:r,did:s,url:o,endpoint:a},e.next=16,ne(i,a);case 16:y.Z.success(E("storage.spaces.connectedWithName",{name:null!==(t=null===i||void 0===i?void 0:i.name)&&void 0!==t?t:"DID Spaces"}));case 17:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ue=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){var n,t,a,s;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,J(!0),e.next=4,(0,I.Z3)(O);case 4:return n=e.sent,t=(0,I.ag)(n),a=new URL(n).searchParams.get("spaceDid"),e.next=9,(0,I.w2)(t);case 9:if(e.sent){e.next=11;break}throw new Error(E("storage.spaces.gateway.add.invalidUrl"));case 11:le((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,prefix:Z()(t,"space/api/did"),baseUrl:new URL(t).origin,checkFn:C.od.create({baseURL:Z()(t,"space")}).get,extraParams:{appDid:q.appDid,appName:q.appName,appDescription:q.appDescription,scopes:q.scopes,appUrl:q.appUrl,referrer:q.referrer,nodeDid:v.did,spaceDid:a}})})),V(!1),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),s="".concat(E("storage.spaces.gateway.add.failed",T),": ").concat((0,w.Z)(e.t0)),Y(s);case 19:return e.prev=19,J(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)(s.Z,{children:[(0,U.jsx)(j.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:function(){se((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,extraParams:{appDid:q.appDid,appName:q.appName,appDescription:q.appDescription,scopes:q.scopes,appUrl:q.appUrl,referrer:q.referrer,nodeDid:v.did}})}))},menu:[(0,U.jsx)(j.Z.Item,(0,r.Z)((0,r.Z)({sx:{textTransform:"none"},onClick:function(){return V(!0)},size:"small"},n),{},{children:E("storage.spaces.connect.useSpaceGateway")}),"1")],children:(0,U.jsx)(o.Z,{sx:{fontWeight:"bold",textTransform:"none"},children:E("storage.spaces.connect.useWallet")})}),(0,U.jsx)(g.Z,{forceConnected:!1,saveConnect:!1,prefix:re.prefix,open:re.open,popup:!0,action:re.action,webWalletUrl:_,baseUrl:re.baseUrl,checkFn:re.checkFn,onSuccess:pe,onClose:re.onClose,checkTimeout:re.checkTimeout,extraParams:re.extraParams,messages:re.messages,locale:T}),(0,U.jsx)(g.Z,{forceConnected:!1,saveConnect:!1,prefix:ce.prefix,open:ce.open,popup:!0,action:ce.action,baseUrl:ce.baseUrl,checkFn:ce.checkFn,onSuccess:pe,onClose:ce.onClose,checkTimeout:ce.checkTimeout,extraParams:ce.extraParams,messages:ce.messages,locale:T}),(0,U.jsxs)(k.ZP,{title:E("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:H,onClose:function(){return V(!1)},PaperProps:{style:{minHeight:"auto"}},actions:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(m.Z,{onClick:function(e){e.stopPropagation(),V(!1)},color:"inherit",children:E("common.cancel")}),(0,U.jsxs)(m.Z,{onClick:ue,color:"primary",disabled:M||!O,variant:"contained",autoFocus:!0,children:[M&&(0,U.jsx)(h.Z,{size:16}),E("common.confirm")]})]}),children:[(0,U.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,U.jsx)(f.Z,{component:"div",children:(0,U.jsx)(o.Z,{component:"div",children:(0,U.jsx)(x.Z,{label:E("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:O,onChange:function(e){Y(null),L(e.target.value)},disabled:M,onKeyPress:function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Enter"!==n.key){e.next=3;break}return e.next=3,ue();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),autoFocus:!0})})})}),Boolean(W)&&(0,U.jsx)(b.Z,{type:"error",style:{width:"100%"},children:W})]})]})}R.propTypes={},R.defaultProps={};var E,T=R,F=t(71171),z=t(59740),O=t(16380),L=t(24974),N=t.n(L),P=t(99237),M=t.n(P),J=t(19638),G=t(70177),Q=["blocklet"];function H(e){var n=e.blocklet,t=(0,z.Z)(e,Q),s=(0,a.useContext)(i.RD).t;if(!n.diskInfo)return(0,U.jsx)(o.Z,{children:s("blocklet.diskInfo.empty")});var c=function(e,n,t){return(0,U.jsxs)(o.Z,{children:[t?(0,U.jsx)(J.Z,{style:{cursor:"pointer"},onClick:t,underline:"hover",children:e}):e," ",(0,U.jsx)("strong",{children:n?M()(n):"empty"})]})},l=n.environments.reduce((function(e,n){return e[n.key]=n.value,e}),{}),p=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:c(l.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:c(l.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:c(l.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:c(l.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return(0,U.jsx)(V,(0,r.Z)((0,r.Z)({component:"div"},t),{},{children:p.map((function(e){return(0,U.jsx)(G.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.key)}))}))}H.propTypes={blocklet:N().object.isRequired},H.defaultProps={};var V=(0,O.Z)(o.Z)(E||(E=(0,F.Z)([""]))),X=function(e){return(0,U.jsxs)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:[(0,U.jsxs)("g",{filter:"url(#a)",children:[(0,U.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"}),(0,U.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.192 6.222l-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"}),(0,U.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,U.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"})}),(0,U.jsxs)("g",{mask:"url(#b)",children:[(0,U.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,U.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,U.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"}),(0,U.jsx)("path",{d:"M117.604 47.263L121.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)"}),(0,U.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)"}),(0,U.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,U.jsx)("path",{d:"M50.928 216.089l1.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"}),(0,U.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"})]}),(0,U.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,U.jsx)("path",{d:"M192.064 213.333l.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"}),(0,U.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"})]})]}),(0,U.jsxs)("defs",{children:[(0,U.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,U.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,U.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"}),(0,U.jsx)("feOffset",{dy:"2"}),(0,U.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,U.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,U.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"}),(0,U.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,U.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,U.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,U.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,U.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#101010"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,U.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,U.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,U.jsx)("stop",{stopColor:"#fff"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,U.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:[(0,U.jsx)("stop",{stopColor:"#016BED"}),(0,U.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,U.jsx)("clipPath",{id:"g",children:(0,U.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,U.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/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1N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+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=="})]})]}))};function K(){var e=(0,i.PE)().t,n=(0,c.y0)().blocklet;return(0,U.jsxs)(s.Z,{children:[(0,U.jsxs)(s.Z,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[(0,U.jsx)(X,{style:{width:200,height:250}}),(0,U.jsx)(o.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.provider")}),(0,U.jsx)(T,{})]}),(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,U.jsx)(H,{blocklet:n})]})}X.defaultProps={width:"228",height:"258",viewBox:"0 0 228 258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},K.propTypes={};var W=K,Y=t(75255),q=t(7173),_=t(38627),$=t(59505),ee=t(54164),ne=t(50576),te=t(38996),ae=t(36558),re=t(92746),se=t(94551),oe=t(48082),ie=t(2689),ce=t(93310),le=t(86008),pe=t(37973),de=t(20352),ue=t(61292),he=t(60030),fe=t(30291),xe=t(67531);function me(e){var n=e.spaceGateway,t=e.onDelete,r=(0,i.PE)().t,s=(0,a.useState)(!1),o=(0,d.Z)(s,2),c=o[0],u=o[1],h=(0,a.useState)(!1),f=(0,d.Z)(h,2),x=f[0],m=f[1],g=function(e,n){null===e||void 0===e||e.preventDefault(),null===e||void 0===e||e.stopPropagation(),u(n)},v=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(a){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,null===a||void 0===a||a.stopPropagation(),m(!0),e.next=5,t(n);case 5:u(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error("".concat(r("storage.space.gateway.delete.failed"),": ").concat((0,w.Z)(e.t0)));case 12:return e.prev=12,m(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(n){return e.apply(this,arguments)}}();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(ie.Z,{color:"red",onClick:function(e){return g(e,!0)},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24,color:"red"},children:(0,U.jsx)(fe.default,{fontSize:"small"})}),(0,U.jsx)(le.Z,{style:{color:"red"},children:r("common.delete")})]}),(0,U.jsx)(xe.Z,{title:r("common.delConfirmDescription",{data:"".concat(null===n||void 0===n?void 0:n.name)}),open:c,confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error",loading:x}},cancelButton:{text:r("common.cancel"),props:{variant:"contained",color:"primary"},loading:x},onConfirm:v,onCancel:function(e){return g(e,!1)}})]})}me.propTypes={onDelete:N().func,spaceGateway:N().shape({name:N().string.isRequired,url:N().string.isRequired,protected:N().bool}).isRequired},me.defaultProps={onDelete:function(){}};var ge=me,ve=["spaceGateway","connected","onDelete","onConnect","enableSwitchToSpace"];function Ze(e){var n=e.spaceGateway,t=e.connected,s=e.onDelete,o=e.onConnect,c=e.enableSwitchToSpace,u=(0,z.Z)(e,ve),f=(0,a.useState)(null),x=(0,d.Z)(f,2),m=x[0],g=x[1],v=(0,i.PE)().t,Z=(0,a.useState)(!1),j=(0,d.Z)(Z,2),k=j[0],b=j[1],A=function(e,n){e.stopPropagation(),e.preventDefault(),g(n&&e.currentTarget)},C=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(t){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,b(!0),A(t,!1),e.next=5,o(n);case 5:e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),y.Z.error(e.t0.message);case 11:return e.prev=11,b(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,7,11,14]])})));return function(n){return e.apply(this,arguments)}}();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(se.Z,(0,r.Z)((0,r.Z)({"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:function(e){return A(e,!0)},size:"small"},u),{},{children:k||null!==n&&void 0!==n&&n.loading?(0,U.jsx)(h.Z,{size:"24px"}):(0,U.jsx)(pe.Z,{})})),(0,U.jsxs)(oe.Z,{id:"simple-menu",anchorEl:m,keepMounted:!0,open:Boolean(m),onClose:function(e){return A(e,!1)},children:[(0,U.jsxs)(ie.Z,{onClick:function(e){A(e,!1),window.open(n.endpoint?(0,I.nD)(n.endpoint):n.url)},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(de.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("common.open")})]}),(0,U.jsxs)(ie.Z,{onClick:function(e){A(e,!1),window.open((0,I.Xv)(n.endpoint))},children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(he.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("storage.spaces.strategy.viewBackupFiles")})]}),!t&&c&&(0,U.jsxs)(ie.Z,{onClick:C,children:[(0,U.jsx)(ce.Z,{style:{minWidth:24},children:(0,U.jsx)(ue.Z,{fontSize:"small"})}),(0,U.jsx)(le.Z,{children:v("storage.spaces.connect.switchToSpace")})]}),!t&&(0,U.jsx)(ge,{spaceGateway:n,onDelete:s})]})]})}Ze.propTypes={spaceGateway:N().shape({name:N().string.isRequired,url:N().string.isRequired,protected:N().bool,endpoint:N().string.isRequired,loading:N().bool}).isRequired,connected:N().bool.isRequired,enableSwitchToSpace:N().bool,onDelete:N().func,onConnect:N().func},Ze.defaultProps={onDelete:function(){},onConnect:function(){},enableSwitchToSpace:!0};var ye,je=Ze,ke=t(19066),be=t(50202),Ae=["spaceGateway","connected","onDelete","onBackupNow"],Ce=function(e){return(0,U.jsx)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:(0,U.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})}))};Ce.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var we=function(e){return(0,U.jsx)("svg",(0,r.Z)((0,r.Z)({},e),{},{children:(0,U.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})}))};function Se(e){var n=e.spaceGateway,t=e.connected,u=e.onDelete,h=e.onBackupNow,f=(0,z.Z)(e,Ae),x=(0,Y.Z)((function(e){return e.breakpoints.down("md")})),v=(0,i.PE)(),j=v.t,k=v.locale,b=(0,c.y0)().blocklet,A=(0,S.h6)(),w=A.api,R=A.info.did,E=(0,B.Z)({blocklet:b}),T=E.appDid,F=E.appName,O=E.appDescription,L=E.scopes,N=E.appUrl,P=E.referrer,M=(0,D.XN)(),J=M.updateSpaceGateway,G=M.backupEndpoint,Q=M.backupProgress,H=M.refreshBackupEndpoint,V=(0,a.useState)(!1),X=(0,d.Z)(V,2),K=X[0],W=X[1],se=(0,a.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:j("storage.spaces.authorize.title",{appName:F},k),scan:j("storage.spaces.authorize.scan",{appName:F},k),confirm:"",success:(0,U.jsx)(o.Z,{gutterBottom:!0,children:j("storage.spaces.authorize.success")})},onClose:function(){ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))}}),oe=(0,d.Z)(se,2),ie=oe[0],ce=oe[1],le=(0,ee.Z)((0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",!0);case 2:return e.abrupt("return",(0,I.Nb)(G));case 3:case"end":return e.stop()}}),e)}))),{refreshDeps:[t,G,null===ie||void 0===ie?void 0:ie.open,K]}),pe=le.data,de=le.loading,ue=t&&pe,he=t&&!K&&pe&&!(null!==n&&void 0!==n&&n.loading),fe=t&&K&&pe,xe=t&&!pe&&!de&&!K,me=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.Nb)(null===n||void 0===n?void 0:n.endpoint);case 2:if(!e.sent){e.next=9;break}return e.next=6,w.configBlocklet({input:{did:[b.meta.did],configs:[{key:$.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 6:return H(),y.Z.success(j("storage.spaces.connect.switchToSpaceSucceeded",{name:n.name?"(".concat(n.name,")"):""})),e.abrupt("return");case 9:ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!0,prefix:Z()(n.url,"space/api/did"),baseUrl:new URL(n.url).origin,checkFn:C.od.create({baseURL:Z()(n.url,"space")}).get,extraParams:{appDid:T,appName:F,appDescription:O,scopes:L,appUrl:N,referrer:P,nodeDid:R,spaceDid:n.did}})}));case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(t,a){var s,o,i,c,p,d;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a(t.endpoint),c=(0,I.LQ)(i),p=t.space?a(t.space):{},!n.did||c===n.did){e.next=7;break}return ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),y.Z.error(j("storage.spaces.gateway.switch.failedForMismatchSpace",{name:null!==p&&void 0!==p&&p.name?p.name:""})),e.abrupt("return");case 7:return d=(0,r.Z)((0,r.Z)({},n),{},{name:null!==(s=p.name)&&void 0!==s?s:"DID Space",did:null!==(o=p.did)&&void 0!==o?o:(0,I.LQ)(i),endpoint:i}),e.next=10,J(d);case 10:ce((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}));case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ve=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!K){e.next=3;break}return e.abrupt("return");case 3:return W(!0),e.next=6,h();case 6:e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error(e.t0.message);case 12:return e.prev=12,W(!0),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(){return e.apply(this,arguments)}}();return(0,a.useEffect)((function(){null!==Q&&void 0!==Q&&Q.completed?(100===(null===Q||void 0===Q?void 0:Q.progress)?y.Z.success(j("storage.spaces.backupSuccessfully")):-1===(null===Q||void 0===Q?void 0:Q.progress)&&y.Z.error(null===Q||void 0===Q?void 0:Q.message),W(!1),Q.progress=0,Q.message=""):Q.progress&&W(!0)}),[Q]),(0,U.jsxs)(Be,{style:{position:"relative"},children:[(0,U.jsxs)(s.Z,(0,r.Z)((0,r.Z)({sx:{backgroundColor:t?"#F0FDFF":"inherit","&:hover":{backgroundColor:t?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px"},f),{},{children:[(0,U.jsx)(s.Z,{display:"flex",children:(0,U.jsx)(be.Z,{alt:n.did,src:(0,I.Jf)(n.endpoint)})}),(0,U.jsxs)(s.Z,{className:"spaces-info",display:"flex",flexGrow:(!x||!fe)&&1,minWidth:"180px",flexDirection:fe?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[(0,U.jsxs)(s.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,U.jsx)(o.Z,{color:t?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:n.name}),ue&&(0,U.jsx)(q.Z,{label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ce,{style:{marginRight:"4px"}}),j("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),xe&&(0,U.jsx)(q.Z,{label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(we,{style:{marginRight:"4px"}}),j("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),(0,U.jsx)(s.Z,{className:"spaces-address",display:fe?"none":"flex",color:"#9397A1",marginTop:"8px",children:(0,U.jsx)(o.Z,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:n.did&&(0,U.jsx)(ae.Z,{copyable:!1,size:14,compact:!0,responsive:!1,did:n.did})})})]}),(0,U.jsxs)(s.Z,{className:"spaces-backup",display:"flex",alignItems:"center",flex:x&&fe&&1,children:[he&&(0,U.jsxs)(s.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[(0,U.jsx)(m.Z,{variant:"contained",size:"small",onClick:ve,children:j("storage.spaces.strategy.backupNow")}),ke.C&&(0,U.jsx)(re.Z,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:(0,U.jsx)(o.Z,{sx:{marginRight:"8px",fontSize:"16px"},children:(0,U.jsx)("span",{children:j("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),fe&&(0,U.jsxs)(s.Z,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",minWidth:!x&&"640px",marginLeft:x&&"16px",width:x&&"360px",marginRight:"auto",alignSelf:"flex-end",children:[(0,U.jsx)(o.Z,{color:"primary",children:null===Q||void 0===Q?void 0:Q.message}),(0,U.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[(0,U.jsx)(s.Z,{sx:{width:"100%",mr:1},children:(0,U.jsx)(_.Z,{color:"primary",variant:"determinate",value:null===Q||void 0===Q?void 0:Q.progress})}),(0,U.jsx)(s.Z,{sx:{maxWidth:"100%"},children:(0,U.jsxs)(o.Z,{variant:"body2",color:"text.secondary",children:[null===Q||void 0===Q?void 0:Q.progress,"%"]})})]})]}),xe&&(0,U.jsx)(s.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:(0,U.jsx)(m.Z,{color:"error",variant:"contained",size:"small",onClick:me,children:j("storage.spaces.disconnected.reconnectNow")})}),(0,U.jsx)(je,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:n,connected:t,onDelete:u,onConnect:me,enableSwitchToSpace:(null===Q||void 0===Q?void 0:Q.completed)||(0,ne.isEmpty)(null===Q||void 0===Q?void 0:Q.message)})]})]})),(0,U.jsx)(g.Z,{forceConnected:!1,saveConnect:!1,prefix:ie.prefix,open:ie.open,popup:!0,action:ie.action,baseUrl:ie.baseUrl,checkFn:ie.checkFn,onSuccess:ge,onClose:ie.onClose,checkTimeout:ie.checkTimeout,extraParams:ie.extraParams,messages:ie.messages,locale:k},"get-endpoint"),(0,U.jsx)(s.Z,{className:"selected-container ".concat(t?"selected":""),children:(0,U.jsx)(te.default,{className:"selected-icon"})})]})}we.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se.propTypes={spaceGateway:N().shape({did:N().string.isRequired,name:N().string.isRequired,url:N().string.isRequired,endpoint:N().string.isRequired,protected:N().bool,loading:N().bool}).isRequired,connected:N().bool.isRequired,progress:N().any.isRequired,onDelete:N().func,onBackupNow:N().func},Se.defaultProps={onDelete:function(){},onBackupNow:function(){}};var Be=(0,O.Z)(s.Z)(ye||(ye=(0,F.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"]))),Ie=Se,De=t(9715),Ue=t(2291),Re=t(6779),Ee=t(20296),Te=t(19886),Fe=t.n(Te),ze=t(88666);function Oe(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,i.PE)(),a=t.t,c=t.locale,l=(0,D.XN)(),p=l.spaceGateways,d=l.backups,f=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:function(e){var n,t=d[e],a=t.targetUrl,r=t.targetName,s=t.status,i=t.createdAt,c=s===A.BACKUPS.STATUS.PROGRESS&&Fe()().diff(i,"hours")>=A.BACKUPS.TIMEOUT_HOURS,l=s===A.BACKUPS.STATUS.SUCCEEDED&&!c,u=r||(null===(n=p.find((function(e){return null===a||void 0===a?void 0:a.includes((0,I.LQ)(null===e||void 0===e?void 0:e.endpoint))})))||void 0===n?void 0:n.name)||"Unknown DID Space";return l?(0,U.jsx)(J.Z,{fontSize:"16px",href:a,target:"_blank",children:u}):(0,U.jsx)(o.Z,{variant:"body1",fontSize:"16px",children:u})}}},{label:a("common.strategy"),name:"strategy",options:{customBodyRender:function(e){var n=a(0===e?"common.auto":"common.manual");return(0,U.jsx)(De.Z,{children:n})}}},{label:a("common.startTime"),name:"createdAt",options:{customBodyRender:function(e){return Fe()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:a("common.endTime"),name:"updatedAt",options:{customBodyRender:function(e){return(0,ne.isEmpty)(e)?"":Fe()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:a("common.status"),name:"status",options:{customBodyRenderLite:function(e){var n,t=null!==(n=null===d||void 0===d?void 0:d[e])&&void 0!==n?n:{},r=t.status,i=t.message,c=t.createdAt,l=r===A.BACKUPS.STATUS.PROGRESS&&Fe()().diff(c,"hours")>=A.BACKUPS.TIMEOUT_HOURS,p=l&&a("common.timeoutError"),u=r===A.BACKUPS.STATUS.PROGRESS&&!l,f=r===A.BACKUPS.STATUS.SUCCEEDED&&!l;return u?(0,U.jsxs)(o.Z,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[(0,U.jsx)(h.Z,{sx:{marginRight:"4px"},size:"12px"}),a("common.progress")]}):f?(0,U.jsx)(De.Z,{type:"success",children:a("common.succeeded")}):(0,U.jsxs)(s.Z,{display:"inline-flex",alignItems:"center",children:[(0,U.jsx)(De.Z,{type:"error",children:a("common.failed")})," \xa0",(0,U.jsx)(Re.Z,{style:{display:"flex",alignItems:"center",flexShrink:0},title:i||p,children:(0,U.jsx)(Ee.Z,{children:(0,U.jsx)(ze.Z,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return(0,U.jsx)(s.Z,(0,r.Z)((0,r.Z)({},n),{},{children:null!==d&&void 0!==d&&d.length?(0,U.jsx)(Ue.Z,{title:(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:a("storage.spaces.backup.records")}),data:d,columns:f,emptyNode:a("storage.spaces.record.emptyData",c),options:{download:!1,filter:!1,print:!1}}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(s.Z,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",children:a("storage.spaces.backup.records")})}),(0,U.jsx)(s.Z,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:a("storage.spaces.record.emptyData")})]})}))}Oe.propTypes={};var Le=Oe;function Ne(e){var n=Object.assign({},((0,u.Z)(e),e)),t=(0,i.PE)().t,a=(0,D.XN)(),s=a.autoBackup,c=a.updateAutoBackup,d=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){var n;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=!s.enabled,e.next=4,c({enabled:n});case 4:y.Z.success(t(n?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled")),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),y.Z.error(e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();return(0,U.jsx)(re.Z,{checked:Boolean(null===s||void 0===s?void 0:s.enabled),onChange:d,name:"enableWelcomePage",labelProps:{label:(0,U.jsx)(o.Z,{marginRight:"8px",children:(0,U.jsx)("span",{children:t("storage.spaces.autoBackup.title")})})},style:(0,r.Z)({},n.style)})}Ne.propTypes={};var Pe=Ne;var Me=function(){var e=(0,i.PE)().t,n=(0,c.y0)().blocklet,t=(0,S.h6)().api,a=(0,D.XN)(),r=a.spaceGateways,d=a.spaceGatewaysLoading,u=a.deleteSpaceGateway,f=a.spaceGatewayIsSelected,x=d&&!(null!==r&&void 0!==r&&r.length),m=function(){var n=(0,p.Z)((0,l.Z)().mark((function n(t){return(0,l.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,u(t);case 2:y.Z.success(e("storage.spaces.gateway.delete.succeeded",{name:"(".concat(t.name,")")}));case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),g=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.backupBlocklet({input:{appDid:n.appDid,to:"spaces"}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,U.jsxs)(s.Z,{display:"flex",flexDirection:"column",children:[(0,U.jsxs)(s.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:e("storage.spaces.connected.title")}),(0,U.jsx)(Pe,{style:{marginRight:"32px"}}),(0,U.jsx)(T,{})]}),(0,U.jsx)(s.Z,{children:x?(0,U.jsx)(s.Z,{display:"flex",justifyContent:"center",children:(0,U.jsx)(h.Z,{})}):r.map((function(e){return(0,U.jsx)(Ie,{style:{marginTop:"12px"},spaceGateway:e,connected:f(e),onDelete:m,onBackupNow:g},e.endpoint)}))}),(0,U.jsx)(Le,{sx:{marginTop:"24px"}}),(0,U.jsx)(o.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,U.jsx)(H,{blocklet:n})]})};function Je(){return(0,D.XN)().backupEndpoint?(0,U.jsx)(Me,{}):(0,U.jsx)(W,{})}Je.propTypes={};var Ge=Je},19066:function(e,n,t){t.d(n,{C:function(){return a}});var a="true"===localStorage.getItem("enableDebug")}}]);
2
+ //# sourceMappingURL=8792.13a6919f.chunk.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8944],{38944:function(e,n,t){t.r(n),t.d(n,{default:function(){return an}});var r,o=t(71171),i=t(16380),a=t(30969),c=t(30734),l=t(238),s=t(38361),u=t(51711),d=t(26022),p=t(19865),f=t(7017),m=t(20244),v=t(24891),h=t(43820),g=t(94282),Z=t(33028),x=t(32723),b=t(34795),k=t(96234),y=t(59740),w=t(24974),E=t.n(w),P=t(86822),C=t(17708),j=t(94551),D=t(48082),B=t(75295),S=t(27265),L=t(94308),R=t(2689),T=t(37973),_=t(93310),A=t(86008),O=t(33359),N=t(76492),I=t(97517),U=t(49884),G=t(18877),K=t(29996),z=t(59505),F=t(1986),M=t(90617),V=t(41395),q=t(8479),X=t(55008),H=t(45008),Y=t(37574),W=["blocklet","onStart","onComplete","variant","hasPermission","useBlockletUrlEvaluation"];function Q(e){var n,t,r,o,i=e.blocklet,l=e.onStart,s=e.onComplete,u=e.variant,p=e.hasPermission,m=e.useBlockletUrlEvaluation,h=(0,y.Z)(e,W),g=(0,c.useNavigate)(),w=(0,V.h6)(),E=(0,a.useState)(null),Q=(0,k.Z)(E,2),$=Q[0],ee=Q[1],ne=(0,a.useState)(null),te=(0,k.Z)(ne,2),re=te[0],oe=te[1],ie=(0,a.useState)(!1),ae=(0,k.Z)(ie,2),ce=ae[0],le=ae[1],se=(0,a.useState)(null),ue=(0,k.Z)(se,2),de=ue[0],pe=ue[1],fe=(0,a.useContext)(d.RD).t,me=(0,C.Z)("skip-blocklet-setup",!1),ve=(0,k.Z)(me,1)[0],he=m(i),ge=he.loading,Ze=he.recommendedUrl,xe=(0,H.y0)().nftState,be=(0,f.isInProgress)(i.status),ke=(null===i||void 0===i||null===(n=i.controller)||void 0===n||null===(t=n.status)||void 0===t?void 0:t.value)===z.BLOCKLET_CONTROLLER_STATUS.suspended;null!==xe&&void 0!==xe&&xe.expired||(null===i||void 0===i||null===(r=i.controller)||void 0===r||null===(o=r.status)||void 0===o?void 0:o.reason)!==z.SUSPENDED_REASON.expired||(ke=!1);var ye=w.inService,we=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,b.Z)((0,x.Z)().mark((function r(){var o,a,c,u,d;return(0,x.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=function(){var t=(0,b.Z)((0,x.Z)().mark((function t(r){var o,a,c,u,d,p,m,h,g,Z;return(0,x.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l({action:e,blocklet:i}),le(!0),oe(e),o=!1,t.prev=4,"remove"!==e){t.next=10;break}return t.next=8,n(r);case 8:case 25:case 32:t.next=37;break;case 10:if("start"!==e){t.next=27;break}if((0,f.hasRunnableComponent)(i)){t.next=14;break}return F.Z.error(fe("blocklet.noComponent")),t.abrupt("return");case 14:if(ye||ve||null!==(a=i.settings)&&void 0!==a&&a.initialized||i.mode===z.BLOCKLET_MODES.DEVELOPMENT){t.next=21;break}return c=(0,M.RU)(w.info),(u=new URL(Ze)).searchParams.set("serverUrl",c),window.open(u.href),s({action:e,blocklet:i}),t.abrupt("return");case 21:return d=i.children.filter((function(e){return!(0,f.isInProgress)(e.status)&&"running"!==e.status})).map((function(e){return e.meta.did})),p={did:i.meta.did,componentDids:d},t.next=25,n({input:p});case 27:if(!["stop","restart","reload"].includes(e)){t.next=34;break}return m=i.children.filter((function(e){return"running"===e.status})).map((function(e){return e.meta.did})),h={did:i.meta.did,componentDids:m},t.next=32,n({input:h});case 34:return g={did:i.meta.did},t.next=37,n({input:g});case 37:if("remove"!==e){t.next=41;break}o=!0,t.next=43;break;case 41:return t.next=43,(0,v._v)(1e3);case 43:"reload"===e&&F.Z.success(fe("blocklet.reloadSuccess")),pe(null),s({action:e,blocklet:i}),t.next=53;break;case 48:throw t.prev=48,t.t0=t.catch(4),Z="Blocklet ".concat(e," failed: ").concat((0,v.Z)(t.t0)),s({action:e,blocklet:i,error:new Error(Z)}),new Error(Z);case 53:return t.prev=53,o||le(!1),t.finish(53);case 56:case"end":return t.stop()}}),t,null,[[4,48,53,56]])})));return function(e){return t.apply(this,arguments)}}(),a=function(){le(!1),pe(null)},c=(0,f.getDisplayName)(i,!0),u=i.mode===z.BLOCKLET_MODES.DEVELOPMENT?{description:function(){return(0,Y.jsx)(O.Z,{component:"div",children:(0,Y.jsx)(O.Z,{gutterBottom:!0,children:fe("blocklet.action.removeApplicationDescription")})})},params:{removeType:"complete"}}:{description:function(e,n){return(0,Y.jsxs)(O.Z,{component:"div",children:[(0,Y.jsx)(O.Z,{gutterBottom:!0,children:fe("blocklet.action.removeApplicationDescription")}),(0,Y.jsxs)(I.Z,{name:"removeType",value:e.removeType,onChange:function(t){return n((0,Z.Z)((0,Z.Z)({},e),{},{removeType:t.target.value}))},children:[(0,Y.jsx)(U.Z,{value:"backup",control:(0,Y.jsx)(N.Z,{}),label:fe("blocklet.action.removeApplicationAfterBackup")}),(0,Y.jsx)(U.Z,{value:"complete",control:(0,Y.jsx)(N.Z,{}),label:fe("blocklet.action.removeApplicationComplete")})]})]})},params:{removeType:"backup"}},d={stop:{title:"".concat(fe("common.stop")," ").concat(c),description:fe("blocklet.action.stopDescription"),confirm:fe("blocklet.action.confirmStop"),cancel:fe("common.cancel"),onConfirm:o,onCancel:a},restart:{title:"".concat(fe("common.restart")," ").concat(c),description:fe("blocklet.action.restartDescription"),confirm:fe("blocklet.action.confirmRestart"),cancel:fe("common.cancel"),onConfirm:o,onCancel:a},remove:(0,Z.Z)({title:"".concat(fe("common.remove")," ").concat(c),confirm:fe("blocklet.action.confirmRemove"),cancel:fe("common.cancel"),onConfirm:o,onCancel:a},u),cancelDownload:{title:"".concat(fe("common.cancel")),description:fe("blocklet.action.cancelDownloadDescription",{name:c}),confirm:fe("common.confirm"),cancel:fe("common.cancel"),onConfirm:o,onCancel:a}},!t){r.next=9;break}pe(d[e]),r.next=11;break;case 9:return r.next=11,o();case 11:case"end":return r.stop()}}),r)})))},Ee=Boolean($),Pe=function(){var e=(0,b.Z)((0,x.Z)().mark((function e(n,t){return(0,x.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.stopPropagation(),t.preventDefault()}catch(r){}if("function"!==typeof n.handler){e.next=18;break}return e.prev=2,le(!0),oe(n.action),e.next=7,n.handler();case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),console.error("Blocklet ".concat(n.name," failed: "),e.t0);case 12:return e.prev=12,le(!1),ee(null),e.finish(12);case 16:e.next=19;break;case 18:ee(null);case 19:case"end":return e.stop()}}),e,null,[[2,9,12,16]])})));return function(n,t){return e.apply(this,arguments)}}(),Ce=!ye&&(0,f.isDeletableBlocklet)(i)?{action:"remove",icon:X.Z.Remove,name:fe("common.remove"),handler:we("remove",function(){var e=(0,b.Z)((0,x.Z)().mark((function e(n){return(0,x.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("backup"!==n.removeType){e.next=4;break}return e.next=4,w.api.backupBlocklet({input:{appDid:i.appDid,to:"disk"}});case 4:return e.next=6,w.api.deleteBlocklet({input:{did:i.meta.did,keepData:!1}});case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),!0),disabled:be}:null,je={action:"remove",icon:X.Z.Remove,name:fe("common.cancel"),handler:we("cancelDownload",w.api.cancelDownloadBlocklet,!0)},De=(0,f.getAppMissingConfigs)(i),Be=[{action:"start",icon:X.Z.Start,name:fe("common.start"),handler:we("start",w.api.startBlocklet),disabled:ke||i.children.every((function(e){return"running"===e.status}))||(0,v.XN)(i.status)||ge||be},{action:"stop",icon:X.Z.Stop,name:fe("common.stop"),handler:we("stop",w.api.stopBlocklet,!0),disabled:!["running","starting"].includes(i.status)},{action:"restart",icon:X.Z.Restart,name:fe("common.restart"),handler:we("restart",w.api.restartBlocklet,!0),disabled:ke||"running"!==i.status},{action:"reload",icon:X.Z.Reload,name:fe("common.reload"),handler:we("reload",w.api.reloadBlocklet),disabled:ke||"running"!==i.status},(0,v.XN)(i.status)?je:Ce,{separator:!0},{onlyInMenu:!0,action:"config",icon:X.Z.Config,name:fe("common.config"),handler:function(){g("/blocklets/".concat(i.meta.did,"/configuration"))},disabled:(0,v.XN)(i.status)},{onlyInMenu:!0,action:"team",icon:X.Z.Group,name:fe("common.manageTeam"),handler:function(){g("/blocklets/".concat(i.meta.did,"/members"))},disabled:(0,v.XN)(i.status)},{onlyInMenu:!0,action:"log",icon:X.Z.Log,name:fe("common.log"),handler:function(){g("/logs/blocklet-".concat(i.meta.did))},disabled:(0,v.XN)(i.status)}].filter(Boolean);return"menu"===u?(0,Y.jsxs)(J,{"data-cy":"blocklet-actions",children:[(0,Y.jsx)(j.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":i.meta.did,onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ee(e.currentTarget)},size:"small",disabled:!p||!(0,v.XN)(i.status)&&ce,children:(0,Y.jsx)(T.Z,{})}),(0,Y.jsxs)(D.Z,{id:"actions-menu",anchorEl:$,keepMounted:!0,open:Ee,onClose:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}ee(null)},PaperProps:{},children:[De.length>0&&(0,Y.jsxs)(G.Z,{style:{maxWidth:"400px"},severity:"error",children:[fe("blocklet.config.missingRequired"),(0,Y.jsx)("br",{}),(0,Y.jsx)(P.rU,{to:"/blocklets/".concat(i.meta.did,"/components"),children:fe("blocklet.config.gotoFix")})]}),Be.map((function(e,n){return e.separator?(0,Y.jsx)(B.Z,{},"separator-".concat(n)):(0,Y.jsxs)(R.Z,{dense:!0,onClick:function(n){return Pe(e,n)},disabled:ce||e.disabled,"data-cy":"".concat(e.action,"-blocklet"),children:[(0,Y.jsx)(_.Z,{style:{minWidth:24},children:re===e.action&&ce?(0,Y.jsx)(L.Z,{size:16,sx:{marginRight:1}}):(0,Y.jsx)(e.icon,{fontSize:"small"})}),(0,Y.jsx)(A.Z,{primary:e.name})]},e.name)}))]}),de&&(0,Y.jsx)(q.Z,{title:de.title,description:de.description,confirm:de.confirm,cancel:de.cancel,params:de.params,onConfirm:de.onConfirm,onCancel:de.onCancel})]}):(0,Y.jsxs)(J,(0,Z.Z)((0,Z.Z)({"data-cy":"blocklet-actions"},h),{},{children:[(0,Y.jsx)(S.Z,{children:Be.filter((function(e){return!e.separator&&!e.onlyInMenu})).map((function(e){return(0,Y.jsxs)(K.Z,{title:e.name,"data-cy":"".concat(e.action,"-blocklet"),onClick:function(){return Pe(e)},disabled:Boolean(e.disabled)||ce,children:[re===e.action&&ce?(0,Y.jsx)(L.Z,{size:16,sx:{marginRight:1}}):(0,Y.jsx)(e.icon,{}),(0,Y.jsx)("span",{className:"blocklet-action-text",children:e.name})]},e.name)}))}),de&&(0,Y.jsx)(q.Z,{title:de.title,description:de.description,confirm:de.confirm,cancel:de.cancel,params:de.params,onConfirm:de.onConfirm,onCancel:de.onCancel})]}))}Q.propTypes={blocklet:E().object.isRequired,onStart:E().func.isRequired,onComplete:E().func.isRequired,variant:E().oneOf(["menu","group"]),hasPermission:E().bool,useBlockletUrlEvaluation:E().func},Q.defaultProps={variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:function(){var e,n;return{loading:!1,recommendedUrl:null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.href}}};var J=i.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n align-items: center;\n\n @media (max-width: ","px) {\n .MuiButton-root {\n padding: 4px;\n font-size: 10px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.sm})),$=t(84802),ee=t(23299),ne=t(26328),te=t(77370),re=function(e){var n={},t=null;return(0,f.forEachBlockletSync)(e,(function(e){n[e.meta.bundleDid]?t=(0,f.getDisplayName)(e,!0):e.meta.bundleDid&&(n[e.meta.bundleDid]=!0)})),t},oe=function(e,n,t){var r=e.hostname,o=e.href;if(!n)return o;if(t){var i,a=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!a)return o;var c=a[0],l=(((null===(i=n.site)||void 0===i?void 0:i.domainAliases)||[]).map((function(e){return e.value})).filter(Boolean).find((function(e){return e.endsWith(m.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(m.DEFAULT_DID_DOMAIN),"");return l?o.replace(r,"".concat(l,"-").concat(c,".").concat(m.DEFAULT_IP_DOMAIN_SUFFIX)):o}return o.replace(n.meta.bundleDid,n.appPid)};function ie(){var e=(0,d.PE)().t,n=(0,te.T)().api,t=(0,H.y0)().blocklet,r=(0,V.h6)().inService,o=(0,a.useState)(!1),i=(0,k.Z)(o,2),c=i[0],l=i[1],u=(0,a.useState)(5),p=(0,k.Z)(u,2),h=p[0],g=p[1],Z=t&&t.structVersion!==m.APP_STRUCT_VERSION;return[Z&&(0,Y.jsxs)(ee.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,Y.jsxs)(s.Z,{display:"flex",alignItems:"center",children:[(0,Y.jsx)(K.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void F.Z.error(e("blocklet.migrate.tip.running"));var n=re(t);if(n)return void F.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));l(!0)}catch(r){F.Z.error((0,v.Z)(r))}}()},style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,Y.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((function(n){return(0,Y.jsx)(s.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(n))},n)}))]},"alert"),t&&(0,Y.jsx)(ne.Z,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=oe(window.location,t,r);setTimeout((function(){window.location.href=e}),5e3),g(5),setInterval((function(){g((function(e){return e-1}))}),1e3)},extraParams:{appDid:t.appDid,did:t.meta.did,wt:(0,M.iK)(t,!0),title:(0,f.getDisplayName)(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:h>=0?e("blocklet.migrate.success",{sec:h}):"Redirecting..."},onClose:function(){return l(!1)}},"connect")]}ie.propTypes={};var ae=t(99030),ce=t(90781),le=t(23938),se=t(74197),ue=t(80670),de=t(48952),pe=ue.Gy.Provider,fe=(ue.Gy.Consumer,window.env),me=fe.did,ve=fe.appId;function he(e){var n,t,r=e.children,o=(0,le.y0)().blocklet,i=(0,a.useState)([]),c=(0,k.Z)(i,2),l=c[0],s=c[1],u=(0,a.useState)([]),d=(0,k.Z)(u,2),p=d[0],v=d[1],h=(0,a.useState)([]),g=(0,k.Z)(h,2),Z=g[0],y=g[1],w=(0,f.getDisplayName)(o),E=(null===(n=((null===o||void 0===o?void 0:o.environments)||[]).find((function(e){return e.key===z.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR})))||void 0===n?void 0:n.value)||"auto",P=(null===o||void 0===o?void 0:o.trustedPassports)||[],C=(null===o||void 0===o?void 0:o.trustedFactories)||[],j=!1!==(null===o||void 0===o?void 0:o.enablePassportIssuance),D=function(){var e=(0,b.Z)((0,x.Z)().mark((function e(){var n;return(0,x.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de.Z.doBatchQuery({getRoles:{input:{teamDid:me}},getPermissions:{input:{teamDid:me}},getInvitations:{input:{teamDid:me}}});case 3:n=e.sent,v((n.getRoles.roles||[]).filter((function(e){return!m.RBAC_CONFIG.roles.some((function(n){return n.name===e.name&&(!n.passport||n.ci)}))})).map((function(e){return e.description=e.description||"Use this passport to connect ".concat(w," as ").concat(e.title),e}))),y(n.getPermissions.permissions||[]),s(n.getInvitations.invitations||[]),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),F.Z.error(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();(0,a.useEffect)((function(){var e;null!==o&&void 0!==o&&null!==(e=o.meta)&&void 0!==e&&e.did&&D()}),[null===o||void 0===o||null===(t=o.meta)||void 0===t?void 0:t.did]);var B=function(e){e.teamDid===me&&D(me)};(0,ce.mU)(m.EVENTS.USER_ADDED,B,[me]),(0,ce.mU)(m.EVENTS.USER_REMOVED,B,[me]),(0,ce.mU)(m.EVENTS.USER_UPDATED,B,[me]);var S={teamDid:me,teamIssuerDid:ve,teamName:w,invitations:l,roles:p,permissions:Z,trustedPassports:P,trustedFactories:C,isNodeTeam:!1,enablePassportIssuance:j,refresh:function(){return D()},passportColor:E,endpoint:window.location.origin,blocklet:o,api:{getUser:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).did,n={teamDid:me,user:{did:e}};return de.Z.getUser({input:n})},getUsers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.query,t=e.paging,r={teamDid:me};return t&&(r.paging=t),n&&(r.query=n),r.sort={lastLoginAt:-1},de.Z.getUsers({input:r})},getUsersCountPerRole:function(){return de.Z.getUsersCountPerRole({input:{teamDid:me}})}}};return(0,Y.jsx)(pe,{value:S,children:r})}t(53420);var ge=t(25177),Ze=t(75255),xe=t(51921),be=t(40817),ke=t(28915),ye=t(19638),we=t(13328);function Ee(e){var n=e.infos,t=(0,d.PE)().t,r=n.map((function(e){return"* ".concat(e.label,": ").concat(e.value)})).join("\n"),o=new URL("https://github.com/blocklet/blocklet-site/issues/new");return o.searchParams.set("title","[Feedback]"),o.searchParams.set("body","\x3c!-- [Enter feedback here] --\x3e\n\n\n\n\x3c!--\nDocument Details\n".concat(r,"\n* Page: ").concat(window.location.href,"\n--\x3e\n")),(0,we.tZ)(s.Z,{sx:{mx:{xs:0,md:2}},children:(0,we.tZ)(ye.Z,{sx:{color:"text.primary"},target:"_blank",href:o.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}Ee.propTypes={infos:E().arrayOf(E().shape({label:E().string,value:E().string}))},Ee.defaultProps={infos:[]};var Pe=t(37433),Ce=t(39563),je=t(63771),De=t(19886),Be=t.n(De),Se=t(91380),Le=t(7173),Re=t(83176),Te=t(93033),_e=t.n(Te),Ae=t(22073),Oe=t(43178),Ne=["launcherUrl","chainHost","nftId","retention"],Ie=["sx"];function Ue(e){var n,t,r=e.launcherUrl,o=e.chainHost,i=e.nftId,c=(e.retention,(0,y.Z)(e,Ne)),l=(0,d.PE)(),u=l.t,p=l.locale,f=(0,Oe.Z)({safeIframeRef:null,popoverAnchorEl:null}),m=(0,k.Z)(f,2),h=m[0],g=m[1],w=(0,a.useRef)(null),E=c.sx,P=void 0===E?{}:E,C=(0,y.Z)(c,Ie),j=(0,Ae.Z)((0,b.Z)((0,x.Z)().mark((function e(){var n,t,a,c;return(0,x.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([(0,v.Nh)(o,i),(0,v.qZ)({launcherUrl:r||"https://launcher.arcblock.io/",nftId:i,locale:p})]);case 2:return n=e.sent,t=(0,k.Z)(n,2),a=t[0],c=t[1],e.abrupt("return",{asset:a,subscriptionURL:c});case 7:case"end":return e.stop()}}),e)}))),[p]);if(j.loading)return(0,Y.jsxs)(s.Z,(0,Z.Z)((0,Z.Z)({sx:(0,Z.Z)({display:"flex",alignItems:"center",color:"grey",gap:1},P)},C),{},{children:[(0,Y.jsx)(L.Z,{size:16}),u("expiration.loading")]}));if(j.error)return console.error(j.error),(0,Y.jsx)(Le.Z,(0,Z.Z)((0,Z.Z)({label:u("expiration.loadFailed"),color:"error",variant:"success",sx:(0,Z.Z)({cursor:"pointer"},P)},C),{},{onClick:function(){return j.retry()}}));var D=(0,v.D9)(null===(n=j.value)||void 0===n?void 0:n.asset),B=Be()(D).isBefore(Be()()),S=Be()(D).diff(Be()(),"ms"),R="success";S<=2592e6&&(R="warning"),B&&(R="error");return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Le.Z,(0,Z.Z)((0,Z.Z)({label:(0,Y.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,Y.jsx)(Se.Z,{sx:{mr:"4px"},fontSize:"small"}),u("expiration.tips.".concat(R),{validity:_e()(S,{locale:(0,v.tA)(p),compact:!0,verbose:!0})})]}),color:R,variant:"success"!==R?"contained":"outlined",sx:(0,Z.Z)({cursor:"pointer"},P)},C),{},{onClick:function(e){g({popoverAnchorEl:e.currentTarget})}})),(0,Y.jsx)(Re.ZP,{id:"popover-info",open:Boolean(h.popoverAnchorEl),anchorEl:h.popoverAnchorEl,onClose:function(){g({popoverAnchorEl:null})},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,Y.jsx)("iframe",{ref:w,title:u("common.subscription"),width:"360px",height:"600px",style:{border:0},src:null===(t=j.value)||void 0===t?void 0:t.subscriptionURL})})]})}Ue.propTypes={chainHost:E().string.isRequired,nftId:E().string.isRequired,sx:E().object,retention:E().number,launcherUrl:E().string.isRequired},Ue.defaultProps={sx:{},retention:0};var Ge,Ke=Ue;function ze(){var e=(0,je.gP)(),n=e.inFullPage,t=e.toggleFullPage;return(0,we.tZ)(j.Z,{onClick:t,children:n?(0,we.tZ)(ke.Z,{}):(0,we.tZ)(be.Z,{})})}function Fe(e){var n,t=e.children,r=(0,d.PE)().t,o=(0,le.y0)(),i=o.loading,a=o.error,u=o.actions.refreshBlocklet,p=o.env,f=o.blocklet,h=(0,se.h6)().info,g=(0,c.useLocation)(),Z=(0,Ze.Z)((function(e){return e.breakpoints.down("md")})),x=[{label:"App ID",value:p.appId},{label:"App Version",value:p.version},{label:"App Bundle Name",value:null===f||void 0===f||null===(n=f.meta)||void 0===n?void 0:n.bundleName},{label:"Server Id",value:h.did},{label:"Server Version",value:h.version}],b={};return Z&&(b.logo=null),(0,we.BX)(Ve,{legacy:!1,fullWidth:!0,headerAddons:function(e){var n=Array.isArray(e)?e:[e];if(n.unshift((0,we.tZ)(ze,{})),f){var t,r,o,i={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};if((0,M.ep)(f))n.unshift((0,we.tZ)(Ke,{chainHost:null===f||void 0===f||null===(t=f.controller)||void 0===t?void 0:t.chainHost,nftId:null===f||void 0===f||null===(r=f.controller)||void 0===r?void 0:r.nftId,launcherUrl:null===f||void 0===f||null===(o=f.controller)||void 0===o?void 0:o.launcherUrl,retention:m.EXPIRED_BLOCKLET_DATA_RETENTION_DAYS,sx:i}));else h.ownerNft&&h.launcher&&n.unshift((0,we.tZ)(Ke,{chainHost:h.launcher.chainHost,nftId:h.ownerNft.did,launcherUrl:h.launcher.url,sx:i}))}return n},headerProps:b,footerProps:{addon:(0,we.tZ)(Ee,{infos:x})},children:[!f&&i&&(0,we.tZ)(l.Z,{relative:"parent",children:(0,we.tZ)(L.Z,{})}),!f&&a&&(0,we.BX)(l.Z,{relative:"parent",children:[(0,we.BX)(s.Z,{display:"flex",alignItems:"center",children:[(0,we.tZ)(ge.Z,{color:"error",sx:{marginRight:1}}),(0,v.Z)(a)]}),(0,we.tZ)(K.Z,{onClick:function(){return u()},children:(0,we.tZ)("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!f&&(0,we.tZ)(s.Z,{flex:1,padding:"16px",display:"flex",flexDirection:"column",children:(0,we.tZ)(xe.ErrorBoundary,{FallbackComponent:Pe.H,resetKeys:[g.pathname],children:t})})]})}Fe.defaultProps={children:null};var Me,Ve=(0,i.Z)(Ce.Z)(Ge||(Ge=(0,o.Z)([""]))),qe=t(38507),Xe=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(218),t.e(3688)]).then(t.bind(t,13688))})),He=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(4961),t.e(2653)]).then(t.bind(t,92653))})),Ye=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(8604),t.e(3593)]).then(t.bind(t,23593))})),We=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(3953),t.e(9529),t.e(716),t.e(4802)]).then(t.bind(t,121))})),Qe=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7606),t.e(3154),t.e(6771)]).then(t.bind(t,26771))})),Je=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(5645),t.e(8702)]).then(t.bind(t,25205))})),$e=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(1249),t.e(356)]).then(t.bind(t,60356))})),en=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(2631),t.e(3953),t.e(5725),t.e(4917),t.e(5403),t.e(4023)]).then(t.bind(t,4023))})),nn=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(1),t.e(9657),t.e(8792)]).then(t.bind(t,58792))})),tn=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(9017),t.e(4319),t.e(6629),t.e(9997),t.e(5725),t.e(7606),t.e(476),t.e(9996),t.e(424),t.e(4009),t.e(3979),t.e(9657),t.e(4881),t.e(9194),t.e(1946)]).then(t.bind(t,91946))})),rn=(0,a.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(3994),t.e(655),t.e(9582),t.e(2631),t.e(9017),t.e(2291),t.e(9996),t.e(4009),t.e(7832),t.e(5569)]).then(t.bind(t,65569))}));function on(){var e,n,t=(0,c.useNavigate)(),r=(0,c.useParams)().tab,o=void 0===r?"overview":r,i=(0,le.y0)(),Z=i.blocklet,x=i.actions.refreshBlocklet,b=(0,d.PE)().t,k=null===Z||void 0===Z||null===(e=Z.meta)||void 0===e?void 0:e.did,y=!Z||(0,v.wS)(Z.status)?[]:(0,f.getAppMissingConfigs)(Z),w=[{label:b("common.overview"),value:"overview"},{label:(0,Y.jsx)(u.Z,{color:"error",variant:"dot",invisible:!y.length,children:b("common.components")}),value:"components"}];(0,v.wS)(null===Z||void 0===Z?void 0:Z.status)||w.push({label:b("common.configuration"),value:"configuration"}),w.push({label:b("common.auditLogs"),value:"audit-logs"}),Z&&null!==(n=Z.children)&&void 0!==n&&n.length&&Z.structVersion===m.APP_STRUCT_VERSION&&w.push({label:b("common.logs"),value:"logs"}),w.push({label:b("common.configNavigation"),value:"navigation"}),w.push({label:b("common.storage"),value:"storage"}),w.push({label:b("common.publish"),value:"publish"});var E=(0,Y.jsx)(Qe,{scope:k,categories:["blocklet","team","security","certificates","gateway"]});(0,ce.mU)(m.EVENTS.NOTIFICATION_CREATE,(function(e){var n=e||{},t=n.severity,r=n.title,o=n.description;"error"===t?F.Z.error(o||r):F.Z.success(o||r)}),[k]);var P={overview:(0,Y.jsx)(Xe,{}),members:(0,Y.jsx)(s.Z,{mt:-5,children:(0,Y.jsx)(He,{type:"blocklet",createPassportSvg:qe.Ju})}),passports:(0,Y.jsx)(s.Z,{mt:-4.5,children:(0,Y.jsx)(Ye,{createPassportSvg:qe.Ju})}),components:tn,configuration:(0,Y.jsx)(We,{blocklet:Z,onUpdate:function(){x()}}),"audit-logs":E,logs:Je,navigation:en,storage:(0,Y.jsx)(nn,{}),analytics:(0,Y.jsx)(s.Z,{mt:-5,children:(0,Y.jsx)(rn,{})}),publish:(0,Y.jsx)($e,{})},C=P[o]||P.overview,j=!["members","passports","analytics"].includes(o),D=Z?(0,Y.jsxs)(h.g,{type:"components",children:[j&&(0,Y.jsx)(p.Z,{style:{marginLeft:-16},tabs:w,current:o,onChange:function(e){t("".concat(m.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/").concat(e))},scrollButtons:"auto"}),(0,Y.jsx)("div",{className:"page-content",children:(0,Y.jsx)(a.Suspense,{fallback:(0,Y.jsx)(l.Z,{children:(0,Y.jsx)(L.Z,{})}),children:(0,a.isValidElement)(C)?C:(0,Y.jsx)(C,{blocklet:Z})})})]}):(0,Y.jsx)(l.Z,{children:(0,Y.jsx)(L.Z,{})});return(0,Y.jsx)(se.cK,{children:(0,Y.jsx)(he,{children:(0,Y.jsx)(Fe,{children:(0,Y.jsx)(ae.wV,{children:(0,Y.jsxs)(cn,{children:[j&&(0,Y.jsxs)(s.Z,{component:"div",className:"page-header",children:[(0,Y.jsxs)(s.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[Z?(0,Y.jsx)($.Z,{blocklet:Z,style:{marginRight:16}}):null,Z?(0,Y.jsxs)(s.Z,{display:"flex",alignItems:"center",children:[(0,Y.jsx)(s.Z,{children:(0,f.getDisplayName)(Z)}),"unknown"!==(null===Z||void 0===Z?void 0:Z.status)&&(0,Y.jsx)(g.Z,{size:"12px",style:{marginLeft:8},status:Z.status,source:Z.source})]}):"".concat(b("common.blocklet")," ").concat(b("common.detail"))]}),Z?(0,Y.jsx)(Q,{className:"page-actions",hasPermission:!0,blocklet:Z,onStart:function(){},onComplete:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).error;e&&F.Z.error(e.message)},variant:"group"}):null]}),(0,Y.jsx)(ie,{}),D]})})})})})}function an(){var e,n=(0,le.y0)().blocklet,t=null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did;return(0,a.useEffect)((function(){var e=(0,ce.ZP)();return t&&e.connect(),function(){t&&e.isConnected()&&e.disconnect()}}),[t]),(0,Y.jsx)(on,{})}var cn=i.Z.main(Me||(Me=(0,o.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 18px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.md}))},84802:function(e,n,t){t.d(n,{Z:function(){return f}});var r=t(33028),o=t(59740),i=t(24974),a=t.n(i),c=t(59467),l=t(62399),s=t(59505),u=t(15300),d=t(37574),p=["blocklet","style","size"];function f(e){var n,t=e.blocklet,i=e.style,a=e.size,f=(0,o.Z)(e,p),m=(0,u.Z)({blocklet:t}).logoUrl,v=f.variant,h=(0,d.jsx)("img",{src:m,alt:"",style:{width:a}});t.meta.logo||((null===(n=(t.configs||[]).find((function(e){return e.key===s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE})))||void 0===n?void 0:n.value)||(h=(0,d.jsx)(l.Z,{did:t.meta.did||"",responsive:!0})));return(0,d.jsx)(c.Z,(0,r.Z)((0,r.Z)({variant:v||"square",style:Object.assign({backgroundColor:"transparent",width:a,height:a,borderRadius:10},i)},f),{},{children:h}))}f.propTypes={blocklet:a().object.isRequired,style:a().object,size:a().oneOfType([a().number,a().string])},f.defaultProps={style:{},size:40}},55008:function(e,n,t){var r=t(10814),o=t(8825),i=t(60003),a=t(13875),c=t(57256),l=t(14079),s=t(51389),u=t(98127);n.Z={Start:o.Z,Stop:i.Z,Restart:a.default,Reload:c.Z,Remove:r.default,Config:l.Z,Log:s.Z,Group:u.Z}},94282:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(33028),o=t(59740),i=t(30969),a=t(24974),c=t.n(a),l=t(94308),s=t(6779),u=t(26022),d=t(7017),p=t(19708),f=t(61472),m=t(37574),v=["status","variant","source"],h={yellow:"#FFCF71",grey:"#888888"};function g(e){var n=e.status,t=e.variant,a=(e.source,(0,o.Z)(e,v)),c=(0,i.useContext)(u.RD).t,g={added:h.grey,waiting:h.yellow,downloading:h.yellow,downloaded:h.grey,installing:h.yellow,installed:h.grey,starting:h.yellow,running:"success",stopping:h.yellow,stopped:h.grey,error:"error",upgrading:h.yellow,restarting:h.yellow,corrupted:"error",deleting:h.yellow},Z=(0,d.isInProgress)(n),x=c("blocklet.status.".concat(n));return"dot"===t?(0,m.jsx)(s.Z,{title:c("blocklet.statusTip",{status:x}),children:(0,m.jsx)(p.Z,(0,r.Z)({color:g[n]},a))}):(0,m.jsxs)(f.Z,(0,r.Z)((0,r.Z)({type:{added:"primary",waiting:"warning",downloading:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning"}[n]},a),{},{children:[Z&&(0,m.jsx)(l.Z,{size:12,color:"inherit",style:{marginRight:5}}),x]}))}g.propTypes={status:c().string.isRequired,variant:c().oneOf(["dot","tag"]),source:c().string},g.defaultProps={variant:"tag",source:""}},99030:function(e,n,t){t.d(n,{wV:function(){return j},XN:function(){return D}});var r=t(32723),o=t(33028),i=t(34795),a=t(96234),c=t(30969),l=t(24974),s=t.n(l),u=t(1986),d=t(26022),p=t(59505),f=t(45008),m=t(30134),v=t(57982),h=t(41395),g=t(50576);function Z(e){return x.apply(this,arguments)}function x(){return x=(0,i.Z)((0,r.Z)().mark((function e(n){var t,a,c,l,s;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,a=n.nodeApi,c=n.spaceGateways,l=!1,e.next=4,Promise.all(c.map(function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){var t,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.name,e.next=3,(0,m.nU)(n.endpoint);case 3:return i=e.sent,(0,g.isEmpty)(i)||i===t||(t=i,l=!0),e.abrupt("return",(0,o.Z)((0,o.Z)({},n),{},{name:t}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()));case 4:if(s=e.sent,!l){e.next=8;break}return e.next=8,Promise.all(s.filter((function(e){return e.did})).map((function(e){return a.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,o.Z)({},e)}})})));case 8:return e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)}))),x.apply(this,arguments)}var b=t(85710);var k=t(24891);function y(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,o=n.setLoading,l=(0,f.y0)().blocklet,s=(0,c.useState)([]),d=(0,a.Z)(s,2),p=d[0],m=d[1],Z=(0,h.h6)().api,x=(0,g.debounce)((0,i.Z)((0,r.Z)().mark((function e(){var n,t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o(!0),l){e.next=5;break}return m([]),e.abrupt("return");case 5:return e.next=7,Z.getBlockletBackups({input:{did:l.meta.did}});case 7:n=e.sent,t=n.backups,m(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,k.Z)(e.t0));case 16:return e.prev=16,o(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,12,16,19]])}))),2e3);return(0,v.Z)((0,i.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x();case 1:case"end":return e.stop()}}),e)}))),[null===l||void 0===l||null===(e=l.meta)||void 0===e?void 0:e.did].concat(t)),{backups:p}}var w=function(e){var n=e.appDid,t=y().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),i=(0,a.Z)(r,2),l=i[0],s=i[1];return(0,(0,h.h6)().ws.useSubscription)(p.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&s((function(){return(0,o.Z)({},e)}))}),[n]),(0,c.useEffect)((function(){var e;if(null!==t&&void 0!==t&&t.length&&(0,g.isNull)(null===(e=t[0])||void 0===e?void 0:e.status)){var n=(0,a.Z)(t,1)[0];s((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),l};var E=t(37574),P=(0,c.createContext)({}),C=P.Provider;P.Consumer;function j(e){var n=e.children,t=(0,d.PE)().t,l=(0,h.h6)().api,s=(0,f.y0)().blocklet,g=(0,c.useState)(!1),x=(0,a.Z)(g,2),k=x[0],P=x[1],j=(0,c.useState)(!1),D=(0,a.Z)(j,2),B=D[0],S=D[1],L=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,o=n.refresh,l=(0,f.y0)(),s=l.blocklet,d=l.actions.refreshBlocklet,p=null===s||void 0===s||null===(e=s.meta)||void 0===e?void 0:e.did,m=(0,c.useState)([]),g=(0,a.Z)(m,2),x=g[0],k=g[1],y=(0,h.h6)().api;return(0,v.Z)((0,i.Z)((0,r.Z)().mark((function e(){var n,o,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,p){e.next=4;break}return k([]),e.abrupt("return");case 4:return null===t||void 0===t||t(!0),e.next=7,y.getBlockletSpaceGateways({input:{did:p}});case 7:return n=e.sent,o=n.spaceGateways,e.next=11,Z({blockletDid:p,nodeApi:y,spaceGateways:o});case 11:i=e.sent,k(null!==i&&void 0!==i?i:[]),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),u.Z.error((0,b.Z)(e.t0));case 19:return e.prev=19,null===t||void 0===t||t(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])}))),[p,d,o]),{spaceGateways:x}}({refresh:B,setLoading:P}),R=L.spaceGateways,T=w({appDid:null===s||void 0===s?void 0:s.appDid}),_=(0,c.useState)(!1),A=(0,a.Z)(_,2),O=A[0],N=A[1],I=(0,c.useMemo)((function(){return(0,m.mo)(null===s||void 0===s?void 0:s.environments)}),[s,B,O]),U=(0,c.useState)(!1),G=(0,a.Z)(U,2),K=G[0],z=y({deps:[T],setLoading:G[1]}).backups,F=(0,c.useState)(null===R||void 0===R?void 0:R.find((function(e){return e.endpoint===I}))),M=(0,a.Z)(F,2),V=M[0],q=M[1],X=(0,c.useState)(!1),H=(0,a.Z)(X,2),Y=H[0],W=H[1],Q=function(){var e,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]}).deps,t=(0,f.y0)().blocklet,o=(0,h.h6)().api,l=(0,c.useState)(null),s=(0,a.Z)(l,2),u=s[0],d=s[1];return(0,v.Z)((0,i.Z)((0,r.Z)().mark((function e(){var n,i,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===t||void 0===t||null===(n=t.meta)||void 0===n||!n.did){e.next=6;break}return e.next=3,o.getAutoBackup({input:{did:t.meta.did}});case 3:i=e.sent,a=i.autoBackup,d(a);case 6:case"end":return e.stop()}}),e)}))),[null===t||void 0===t||null===(e=t.meta)||void 0===e?void 0:e.did].concat(n)),u}({deps:[Y]}),J=function(){S((function(e){return!e}))},$=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n,t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R.push((0,o.Z)((0,o.Z)({},n),{},{loading:!0})),e.next=3,l.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:n}});case 3:if(I===t){e.next=6;break}return e.next=6,l.configBlocklet({input:{did:[s.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:J(),q(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ee=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(n.endpoint!==I){e.next=5;break}return u.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,l.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:J(),q(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ne=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){var o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(I===n.endpoint){e.next=5;break}return e.next=5,l.configBlocklet({input:{did:[s.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 5:u.Z.success(t("storage.spaces.connectedWithName",{name:null!==(o=null===n||void 0===n?void 0:n.name)&&void 0!==o?o:"DID Spaces"})),J();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),te=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.updateAutoBackup({input:{did:s.meta.did,autoBackup:n}});case 2:W((function(e){return!e}));case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,E.jsx)(C,{value:{spaceGateways:R,selectedSpaceGateway:V,addSpaceGateway:$,deleteSpaceGateway:ee,updateSpaceGateway:ne,refreshSpaceGateways:J,spaceGatewaysLoading:k,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===I},updateAutoBackup:te,backupEndpoint:I,backupProgress:T,backups:z,backupsLoading:K,refreshBackupEndpoint:function(){N((function(e){return!e}))},autoBackup:Q},children:n})}function D(){return(0,c.useContext)(P)}j.propTypes={children:s().any.isRequired},j.defaultProps={}},43820:function(e,n,t){t.d(n,{K:function(){return f},g:function(){return p}});var r=t(68079),o=t(96234),i=t(30969),a=t(24974),c=t.n(a),l=t(16986),s=t.n(l),u=t(37574),d=(0,i.createContext)({});function p(e){var n=e.children,t=e.type,a=(0,i.useState)([]),c=(0,o.Z)(a,2),l=c[0],p=c[1],f=(0,i.useRef)([]),m=function(e){if(f.current.includes(e)){var n=f.current.filter((function(n){return n!==e}));p(n),f.current=n}};return(0,u.jsx)(d.Provider,{value:{type:t,deletingBlocklets:l,addDeletingDid:function(e){if(!f.current.includes(e)){var n=[].concat((0,r.Z)(f.current),[e]);p(n),f.current=n}},removeDeletingDid:m,matchDeletingDid:function(e){var n=l.filter((function(n){return e.find((function(e){return e===n}))}));s()(n,l).forEach((function(e){return m(e)}))}},children:n})}function f(){return(0,i.useContext)(d)}p.propTypes={type:c().string,children:c().node.isRequired},p.defaultProps={type:"blocklets"}},80670:function(e,n,t){t.d(n,{DJ:function(){return i},Gy:function(){return o}});var r=t(30969),o=(0,r.createContext)({});o.Provider,o.Consumer;function i(){return(0,r.useContext)(o)}},19708:function(e,n,t){var r,o=t(71171),i=t(16380),a={success:"#3ab39d",error:"#D0021B"},c="10px",l=i.Z.div(r||(r=(0,o.Z)(["\n display: inline-block;\n min-width: ",";\n min-height: ",";\n background: ",";\n border-radius: 100%;\n"])),(function(e){return e.size||c}),(function(e){return e.size||c}),(function(e){return a[e.color]||e.color||a.success}));n.Z=l},15300:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(19611),o=t.n(r),i=t(59505),a=t(41395),c=t(24891),l=function(e,n){var t,r="?v=";n?r+=(0,c.Qi)(n):r+="".concat(null===e||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.version).concat((0,c.wS)(null===e||void 0===e?void 0:e.status)?"~":"");return r};function s(e){var n,t,r,c,s=e.blocklet,u=(0,a.h6)().inService,d=null===(n=((null===s||void 0===s?void 0:s.environments)||[]).find((function(e){return e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE})))||void 0===n?void 0:n.value,p=null===(t=((null===s||void 0===s?void 0:s.environments)||[]).find((function(e){return e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT})))||void 0===t?void 0:t.value,f=null===(r=((null===s||void 0===s?void 0:s.environments)||[]).find((function(e){return e.key===i.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON})))||void 0===r?void 0:r.value,m=(null===(c=window.env)||void 0===c?void 0:c.apiPrefix)||"/";return{logoUrl:o()(m,"/blocklet/logo/".concat(u?"":s.meta.did),l(s,d)),rectLogoUrl:o()(m,"/blocklet/logo-rect/".concat(u?"":s.meta.did),l(s,p)),faviconUrl:o()(m,"/blocklet/logo-favicon/".concat(u?"":s.meta.did),l(s,f))}}},61472:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(33028),o=t(59740),i=t(24974),a=t.n(i),c=t(9715),l=t(37574),s=["children","style"];function u(e){var n=e.children,t=e.style,i=(0,o.Z)(e,s);return(0,l.jsx)(c.Z,(0,r.Z)((0,r.Z)({style:t},i),{},{children:n}))}u.propTypes={children:a().any.isRequired,style:a().object},u.defaultProps={style:{}}}}]);
2
+ //# sourceMappingURL=8944.d6df0376.chunk.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8983],{38641:function(n,e,t){t.r(e),t.d(e,{default:function(){return O}});var r=t(71171),o=t(32723),i=t(34795),a=t(96234),c=t(30969),l=t(16380),s=t(76492),u=t(97517),d=t(49884),p=t(87535),f=t(38361),m=t(88876),h=t(94702),v=t(26022),Z=t(1986),x=t(20244),b=t(7017),g=t(99398),k=t(24891),w=t(70115),y=t(23938),z=t(66744),C=t(32668),j=t(39816),S=t(55829),N=t(6779),A=t(94551),M=t(37574);function W(n){var e=n.children,t=(0,v.PE)().t;return(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[e,(0,M.jsx)(N.Z,{title:t("blocklet.config.access.publicInstanceTip"),children:(0,M.jsx)(A.Z,{children:(0,M.jsx)(S.Z,{fontSize:"small"})})})]})}var P,E=(0,c.memo)(W);function O(n){var e=n.onNext,t=(0,h.Z)(),r=(0,v.PE)(),l=r.t,z=r.locale,S=(0,c.useState)(!1),N=(0,a.Z)(S,2),A=N[0],W=N[1],P=(0,c.useState)(""),O=(0,a.Z)(P,2),I=O[0],L=O[1],B=(0,c.useState)(!1),H=(0,a.Z)(B,2),T=H[0],V=H[1],R=(0,y.y0)(),F=R.blocklet,q=R.actions,D=R.getPublicInstance;(0,c.useEffect)((function(){L((0,b.getWhoCanAccess)(F)),V(D(F))}),[F]);var Y=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,W(!0),n.next=4,(0,k._v)(800);case 4:return n.next=6,q.configWhoCanAccess(e);case 6:W(!1),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(0),W(!1),Z.Z.error(n.t0.message);case 13:case"end":return n.stop()}}),n,null,[[0,9]])})));return function(e){return n.apply(this,arguments)}}(),G=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!A){n.next=2;break}return n.abrupt("return");case 2:return L(e.target.value),n.next=5,Y(e.target.value);case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),J=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(e){var t;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.target.checked,n.prev=1,W(!0),n.next=5,q.configPublicToStore(t);case 5:W(!1),n.next=12;break;case 8:n.prev=8,n.t0=n.catch(1),W(!1),Z.Z.error(n.t0.message);case 12:case"end":return n.stop()}}),n,null,[[1,8]])})));return function(e){return n.apply(this,arguments)}}(),K={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:t.palette.text.secondary};return(0,M.jsxs)(_,{children:[(0,M.jsx)("div",{className:"header",children:(0,M.jsx)(g.Z,{title:l("blocklet.config.access.description")})}),(0,M.jsx)(p.Z,{component:"fieldset",children:(0,M.jsx)(u.Z,{name:"inherit",value:I,onChange:G,children:w.Z.map((function(n){return(0,M.jsxs)("div",{style:{marginBottom:16},children:[(0,M.jsx)(d.Z,{value:n.value,control:(0,M.jsx)(s.Z,{color:"primary"}),label:(0,M.jsxs)("span",{children:[(0,M.jsx)(n.icon,{style:K}),n.title[z]]})}),(0,M.jsxs)(f.Z,{className:"tip",children:[n.description[z],n.value===x.WHO_CAN_ACCESS.ALL&&I===x.WHO_CAN_ACCESS.ALL&&"registry"===F.source&&(0,M.jsx)(E,{children:(0,M.jsx)(d.Z,{style:{marginRight:0},value:n.value,control:(0,M.jsx)(m.Z,{size:"small"}),label:(0,M.jsx)("span",{children:l("blocklet.config.access.publicToStore")}),onChange:J,checked:T,disabled:A})})]})]},n.value)}))})}),(0,M.jsx)(C.Z,{mt:8,disabled:A,blocklet:F,onStartNow:function(){return e("complete")},children:(0,M.jsx)(j.Z,{loading:A,variant:"outlined",disabled:A,onClick:function(){return e()},children:l("setup.continue")})})]})}O.defaultProps={onNext:function(){}};var _=(0,l.Z)(z.Z)(P||(P=(0,r.Z)(["\n height: 100%;\n overflow-y: auto;\n .header {\n width: 100%;\n }\n .tip {\n margin-left: 32px;\n font-size: 12px;\n margin-top: -8px;\n color: ",";\n }\n"])),(function(n){return n.theme.palette.text.secondary}))},39816:function(n,e,t){t.d(e,{Z:function(){return c}});var r=t(33028),o=t(33665),i=t(29996),a=t(37574);function c(n){var e=Object.assign({},((0,o.Z)(n),n));return(0,a.jsx)(i.Z,(0,r.Z)({className:"bottom-button",variant:"contained",color:"primary"},e))}},66744:function(n,e,t){var r,o=t(71171),i=t(16380),a=t(44876),c=(0,i.Z)(a.Z)(r||(r=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n padding-bottom: 16px;\n "," {\n padding-top: 34px;\n padding-bottom: 34px;\n }\n .header {\n width: 100%;\n margin-bottom: 34px;\n "," {\n margin-bottom: 64px;\n }\n }\n .container-main {\n position: relative;\n flex: 1;\n width: 100%;\n }\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow-y: auto;\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.up("md")}));e.Z=c},32668:function(n,e,t){t.d(e,{Z:function(){return f}});var r,o,i=t(71171),a=t(16380),c=t(29996),l=t(26022),s=t(38361),u=t(23539),d=t(38507),p=t(37574);function f(n){var e=n.blocklet,t=n.onStartNow,r=n.children,o=n.disabled,i=(0,l.PE)().t,a=(0,u.Z)();return!e||(0,d.bg)(e.meta)?(0,p.jsx)(m,{children:r}):(0,p.jsxs)(h,{isMobile:a,children:[(0,p.jsx)(c.Z,{className:"start-now",variant:"contained",color:"primary",disabled:o,onClick:function(){return t()},children:i("setup.startNow")}),(0,p.jsx)(s.Z,{display:"flex",alignItems:"center",children:r})]})}f.defaultProps={blocklet:null,onStartNow:function(){},children:null,disabled:!1};var m=(0,a.Z)(s.Z)(r||(r=(0,i.Z)(["\n width: 100%;\n margin-top: auto;\n padding-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n .bottom-button {\n min-width: 200px;\n }\n "," {\n .bottom-button {\n width: 100%;\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")})),h=(0,a.Z)(s.Z)(o||(o=(0,i.Z)(["\n padding-top: 24px;\n margin-top: auto;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n .start-now {\n min-width: 140px;\n }\n .bottom-button {\n min-width: 120px;\n }\n "," {\n width: 100%;\n }\n\n "," {\n .start-now {\n min-width: inherit;\n }\n .bottom-button {\n min-width: 100px;\n }\n }\n\n "," {\n justify-content: space-between;\n gap: '32px',\n }}\n"])),(function(n){return n.theme.breakpoints.down("lg")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.isMobile}))},23539:function(n,e,t){t.d(e,{Z:function(){return i}});var r=t(94702),o=t(75255);function i(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{key:"sm"}).key,e=(0,r.Z)();return(0,o.Z)(e.breakpoints.down(n))}},44876:function(n,e,t){t.d(e,{Z:function(){return p}});var r,o=t(71171),i=t(33028),a=t(59740),c=t(16380),l=t(24974),s=t.n(l),u=t(37574),d=["children"];function p(n){var e=n.children,t=(0,a.Z)(n,d);return(0,u.jsx)(f,(0,i.Z)((0,i.Z)({},t),{},{children:e}))}p.propTypes={children:s().any.isRequired};var f=c.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.up("sm")}),(function(n){return n.theme.breakpoints.down("md")}))},70115:function(n,e,t){var r=t(39517),o=t(87642),i=t(64076),a=t(20244);e.Z=[{value:a.WHO_CAN_ACCESS.ALL,icon:i.Z,title:{zh:"\u6240\u6709\u4eba\u53ef\u8bbf\u95ee",en:"Accessible to all"},description:{zh:"\u5411\u6240\u6709\u4eba\u5f00\u653e\uff0c\u65e0\u9700\u901a\u884c\u8bc1\u5373\u53ef\u8bbf\u95ee\u5e94\u7528",en:"Open to the world anyone can access without passport"}},{value:a.WHO_CAN_ACCESS.INVITED,icon:o.Z,title:{zh:"\u53ea\u6709\u88ab\u9080\u8bf7\u7684\u4eba\u53ef\u4ee5\u8bbf\u95ee",en:"Only invited people can access"},description:{zh:"\u7a0d\u540e\u60a8\u53ef\u4ee5\u5728\u7ba1\u7406\u9875\u9762\u4e2d\u9080\u8bf7\u6210\u5458",en:"You can invite members later in the admin page"}},{value:a.WHO_CAN_ACCESS.OWNER,icon:r.Z,title:{zh:"\u53ea\u6709\u5e94\u7528\u6240\u6709\u8005\u53ef\u4ee5\u8bbf\u95ee",en:"Only Owner of the blocklet can access"},description:{zh:"\u5fc5\u987b\u63d0\u4f9b\u6240\u6709\u8005\u901a\u884c\u8bc1\u624d\u80fd\u8bbf\u95ee\u5e94\u7528",en:"You must provide owner passport to access this application"}}]},99398:function(n,e,t){var r,o=t(71171),i=t(33028),a=t(59740),c=t(16380),l=t(24974),s=t.n(l),u=t(15405),d=t(37574),p=["title","subTitle","onClickBack"];function f(n){var e=n.title,t=n.subTitle,r=n.onClickBack,o=(0,a.Z)(n,p);return(0,d.jsxs)(m,(0,i.Z)((0,i.Z)({},o),{},{children:[r&&(0,d.jsx)(u.Z,{className:"back-btn",onClick:r}),(0,d.jsx)("div",{className:"title",children:e}),(0,d.jsx)("div",{className:"sub-title",children:t})]}))}var m=c.Z.div(r||(r=(0,o.Z)(["\n position: relative;\n width: 100%;\n text-align: center;\n\n .title {\n font-size: 24px;\n font-weight: 700;\n color: ",";\n\n "," {\n font-size: 20px;\n }\n }\n\n .sub-title {\n font-size: 14px;\n color: ",";\n padding: 0 14px;\n font-weight: 400;\n }\n\n .back-btn {\n position: absolute;\n left: 0;\n top: 8px;\n color: #9397a1;\n font-size: 18px;\n cursor: pointer;\n }\n"])),(function(n){return n.theme.palette.common.black}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.grey[600]}));e.Z=f,f.propTypes={title:s().string,subTitle:s().string,onClickBack:s().oneOfType([s().func,s().string])},f.defaultProps={title:"",subTitle:"",onClickBack:""}},15405:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");e.Z=a},87642:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"}),"ContactMail");e.Z=a},55829:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");e.Z=a},39517:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.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-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock");e.Z=a},64076:function(n,e,t){var r=t(71600);e.Z=void 0;var o=r(t(48035)),i=t(37574),a=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}),"Public");e.Z=a},88876:function(n,e,t){t.d(e,{Z:function(){return C}});var r=t(56666),o=t(31461),i=t(7896),a=t(30969),c=t(87023),l=t(26540),s=t(74262),u=t(71885),d=t(17469),p=t(37574),f=(0,d.Z)((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),m=(0,d.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,d.Z)((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),v=t(24099),Z=t(17363),x=t(45971),b=t(72726),g=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],k=(0,x.ZP)(u.Z,{shouldForwardProp:function(n){return(0,x.FO)(n)||"classes"===n},name:"MuiCheckbox",slot:"Root",overridesResolver:function(n,e){var t=n.ownerState;return[e.root,t.indeterminate&&e.indeterminate,e["size".concat((0,v.Z)(t.size))],"default"!==t.color&&e["color".concat((0,v.Z)(t.color))]]}})((function(n){var e,t=n.theme,o=n.ownerState;return(0,i.Z)({color:(t.vars||t).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===o.color?t.vars.palette.action.activeChannel:t.vars.palette[o.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,s.Fq)("default"===o.color?t.palette.action.active:t.palette[o.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==o.color&&(e={},(0,r.Z)(e,"&.".concat(b.Z.checked,", &.").concat(b.Z.indeterminate),{color:(t.vars||t).palette[o.color].main}),(0,r.Z)(e,"&.".concat(b.Z.disabled),{color:(t.vars||t).palette.action.disabled}),e))})),w=(0,p.jsx)(m,{}),y=(0,p.jsx)(f,{}),z=(0,p.jsx)(h,{}),C=a.forwardRef((function(n,e){var t,r,s=(0,Z.Z)({props:n,name:"MuiCheckbox"}),u=s.checkedIcon,d=void 0===u?w:u,f=s.color,m=void 0===f?"primary":f,h=s.icon,x=void 0===h?y:h,C=s.indeterminate,j=void 0!==C&&C,S=s.indeterminateIcon,N=void 0===S?z:S,A=s.inputProps,M=s.size,W=void 0===M?"medium":M,P=s.className,E=(0,o.Z)(s,g),O=j?N:x,_=j?N:d,I=(0,i.Z)({},s,{color:m,indeterminate:j,size:W}),L=function(n){var e=n.classes,t=n.indeterminate,r=n.color,o=n.size,a={root:["root",t&&"indeterminate","color".concat((0,v.Z)(r)),"size".concat((0,v.Z)(o))]},c=(0,l.Z)(a,b.y,e);return(0,i.Z)({},e,c)}(I);return(0,p.jsx)(k,(0,i.Z)({type:"checkbox",inputProps:(0,i.Z)({"data-indeterminate":j},A),icon:a.cloneElement(O,{fontSize:null!=(t=O.props.fontSize)?t:W}),checkedIcon:a.cloneElement(_,{fontSize:null!=(r=_.props.fontSize)?r:W}),ownerState:I,ref:e,className:(0,c.Z)(L.root,P)},E,{classes:L}))}))},72726:function(n,e,t){t.d(e,{y:function(){return i}});var r=t(62746),o=t(2975);function i(n){return(0,o.Z)("MuiCheckbox",n)}var a=(0,r.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);e.Z=a},87535:function(n,e,t){var r=t(96234),o=t(31461),i=t(7896),a=t(30969),c=t(87023),l=t(26540),s=t(17363),u=t(45971),d=t(81133),p=t(24099),f=t(86209),m=t(43611),h=t(35572),v=t(37574),Z=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],x=(0,u.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:function(n,e){var t=n.ownerState;return(0,i.Z)({},e.root,e["margin".concat((0,p.Z)(t.margin))],t.fullWidth&&e.fullWidth)}})((function(n){var e=n.ownerState;return(0,i.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})})),b=a.forwardRef((function(n,e){var t=(0,s.Z)({props:n,name:"MuiFormControl"}),u=t.children,b=t.className,g=t.color,k=void 0===g?"primary":g,w=t.component,y=void 0===w?"div":w,z=t.disabled,C=void 0!==z&&z,j=t.error,S=void 0!==j&&j,N=t.focused,A=t.fullWidth,M=void 0!==A&&A,W=t.hiddenLabel,P=void 0!==W&&W,E=t.margin,O=void 0===E?"none":E,_=t.required,I=void 0!==_&&_,L=t.size,B=void 0===L?"medium":L,H=t.variant,T=void 0===H?"outlined":H,V=(0,o.Z)(t,Z),R=(0,i.Z)({},t,{color:k,component:y,disabled:C,error:S,fullWidth:M,hiddenLabel:P,margin:O,required:I,size:B,variant:T}),F=function(n){var e=n.classes,t=n.margin,r=n.fullWidth,o={root:["root","none"!==t&&"margin".concat((0,p.Z)(t)),r&&"fullWidth"]};return(0,l.Z)(o,h.e,e)}(R),q=a.useState((function(){var n=!1;return u&&a.Children.forEach(u,(function(e){if((0,f.Z)(e,["Input","Select"])){var t=(0,f.Z)(e,["Select"])?e.props.input:e;t&&(0,d.B7)(t.props)&&(n=!0)}})),n})),D=(0,r.Z)(q,2),Y=D[0],G=D[1],J=a.useState((function(){var n=!1;return u&&a.Children.forEach(u,(function(e){(0,f.Z)(e,["Input","Select"])&&((0,d.vd)(e.props,!0)||(0,d.vd)(e.props.inputProps,!0))&&(n=!0)})),n})),K=(0,r.Z)(J,2),Q=K[0],U=K[1],X=a.useState(!1),$=(0,r.Z)(X,2),nn=$[0],en=$[1];C&&nn&&en(!1);var tn,rn=void 0===N||C?nn:N,on=a.useMemo((function(){return{adornedStart:Y,setAdornedStart:G,color:k,disabled:C,error:S,filled:Q,focused:rn,fullWidth:M,hiddenLabel:P,size:B,onBlur:function(){en(!1)},onEmpty:function(){U(!1)},onFilled:function(){U(!0)},onFocus:function(){en(!0)},registerEffect:tn,required:I,variant:T}}),[Y,k,C,S,Q,rn,M,P,tn,I,B,T]);return(0,v.jsx)(m.Z.Provider,{value:on,children:(0,v.jsx)(x,(0,i.Z)({as:y,ownerState:R,className:(0,c.Z)(F.root,b),ref:e},V,{children:u}))})}));e.Z=b},43611:function(n,e,t){var r=t(30969).createContext(void 0);e.Z=r},35572:function(n,e,t){t.d(e,{e:function(){return i}});var r=t(62746),o=t(2975);function i(n){return(0,o.Z)("MuiFormControl",n)}var a=(0,r.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);e.Z=a},42641:function(n,e,t){function r(n){var e=n.props,t=n.states,r=n.muiFormControl;return t.reduce((function(n,t){return n[t]=e[t],r&&"undefined"===typeof e[t]&&(n[t]=r[t]),n}),{})}t.d(e,{Z:function(){return r}})},86171:function(n,e,t){t.d(e,{Z:function(){return i}});var r=t(30969),o=t(43611);function i(){return r.useContext(o.Z)}},81133:function(n,e,t){function r(n){return null!=n&&!(Array.isArray(n)&&0===n.length)}function o(n){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n&&(r(n.value)&&""!==n.value||e&&r(n.defaultValue)&&""!==n.defaultValue)}function i(n){return n.startAdornment}t.d(e,{B7:function(){return i},vd:function(){return o}})}}]);
2
+ //# sourceMappingURL=8983.c87cf7ed.chunk.js.map
@@ -0,0 +1,2 @@
1
+ (self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[9194],{60966:function(e,n,t){var r=t(6399);e.exports=function(e,n){return r(e)===r(n)}},66710:function(e,n,t){"use strict";t.d(n,{Z:function(){return yt}});var r=t(71171),o=t(68079),i=t(59740),a=t(32723),c=t(34795),l=t(96234),s=t(33028),d=t(30969),u=t(24974),p=t.n(u),m=t(30734),f=t(12700),h=t.n(f),x=t(43260),v=t.n(x),g=t(76032),y=t.n(g),Z=t(60523),b=t.n(Z),k=t(99398),j=t(94308),C=t(33359),w=t(87006),S=t(1437),R=t(38996),E=t(75255),A=t(16380),T=t(26022),P=t(59505),U=t(66629),B=t(43001),D=t(38361),I=t(20244),N=t(29996),F=t(23299),L=t(78598),O=t(65248),M=t(7017),z=t(88617),J=t.n(z),V=t(1986),G=t(41395),Q=t(45008),q=t(24891),H=t(8016),K=t(14458),W=t(19611),X=t.n(W),Y=t(26328),_=t(59485),$=t.n(_),ee=t(54559),ne=t(74743),te=t(67888),re=t(9943),oe=t(86008),ie=t(93310),ae=t(64698),ce=t(36508),le=t(6200),se=t(37574),de={meta:p().object.isRequired,onCancel:p().func.isRequired},ue=(0,ne.Z)((function(){return{dialogAuth:{padding:"0 0 24px !important","& .auth-title":{textAlign:"center !important",marginBottom:"4px !important"},"& .auth-tip--scan":{textAlign:"center !important"}},iconRoot:{minWidth:48}}}));function pe(e){var n=e.action,t=e.onSelect,r=e.onNext,o=ue(),i=(0,T.PE)().t,a=[{action:"purchase",title:i("store.purchase.purchase.title"),description:i("store.purchase.purchase.description")},{action:"verify",title:i("store.purchase.verify.title"),description:i("store.purchase.verify.description")}];return(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(te.Z,{className:o.tabPanel,children:a.map((function(e){return(0,se.jsxs)(re.ZP,{button:!0,selected:n===e.action,onClick:function(){return t(e.action)},children:[(0,se.jsx)(ie.Z,{className:o.iconRoot,children:"purchase"===e.action?(0,se.jsx)(ae.Z,{style:{color:"purchase"===n?le.Z.primary.main:"#AAA",fontSize:32}}):(0,se.jsx)(ce.Z,{style:{color:"verify"===n?le.Z.primary.main:"#AAA",fontSize:32}})}),(0,se.jsx)(oe.Z,{primary:e.title,secondary:e.description})]},e.action)}))}),r&&(0,se.jsx)(N.Z,{fullWidth:!0,disabled:!n,variant:"contained",color:"primary",style:{marginTop:16},onClick:r,children:i("common.next")})]})}pe.propTypes={action:p().oneOf(["both","purchase","verify"]).isRequired,onSelect:p().func.isRequired,onNext:p().func.isRequired};var me=["mode"];function fe(e){var n=e.meta,t=e.onCancel,r=e.mode,o=e.handlePaySuccess,i=(0,T.PE)(),u=i.t,p=i.locale,m=(0,G.h6)().info,f=(0,q.yP)(m),h=(0,d.useState)(null),x=(0,l.Z)(h,2),v=x[0],g=x[1],y=new URL(null===n||void 0===n?void 0:n.registryUrl).origin,Z=(0,M.getDisplayName)({meta:n}),b=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(n,i){var l,s,d,p,m;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=function(e){return $()((function(){return ee.hi.get(e).then(function(){var e=(0,c.Z)((0,a.Z)().mark((function e(n){var t,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.data,r=null===t||void 0===t?void 0:t.downloadTokenList,"succeed"!==t.status){e.next=12;break}if(!r||!r.length){e.next=8;break}return e.next=6,l({downloadTokenList:r});case 6:e.next=11;break;case 8:return e.next=10,s(u("blocklet.component.missDownloadTokenTip"));case 10:case 11:case 16:return e.abrupt("return",!0);case 12:if("error"!==t.status){e.next=17;break}return console.error("vc error: ",t),e.next=16,s(null===t||void 0===t?void 0:t.error);case 17:return e.abrupt("return",!1);case 18:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}())}),{interval:1e3})},l=function(e){var n=e.downloadTokenList;o({downloadTokenList:n})},s=function(e){V.Z.error(e),t(e)},"purchase"!==r||!v){e.next=9;break}return p=(0,q.Pi)(v),m=p.statusUrl,e.next=7,d(m);case 7:e.next=11;break;case 9:return e.next=11,l({downloadTokenList:n.downloadTokenList&&i(n.downloadTokenList)});case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();if((0,d.useEffect)((function(){if("purchase"===r){var e=new URL(y);e.pathname="/api/did/verify-purchase-blocklet/token",e.searchParams.set("serverDid",m.did),e.searchParams.set("blockletDid",null===n||void 0===n?void 0:n.did);try{ee.hi.get(e.href).then((function(e){var n=e.data,t="".concat(n.url);g(t)}))}catch(t){console.error("get next workflow url error: ",t)}}return function(){g(null)}}),[r]),"purchase"===r&&!v)return"";var k={verify:{action:"verify-purchase-blocklet",checkFn:ee.od.create({baseURL:y}).get,extraParams:{serverDid:m.did,blockletDid:null===n||void 0===n?void 0:n.did},messages:{title:u("store.purchase.verify.auth.title",{name:Z}),scan:u("store.purchase.verify.auth.scan"),confirm:u("store.purchase.verify.auth.confirm"),success:u("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:ee.od.create({baseURL:X()(y,"/store")}).get,extraParams:{factory:n.nftFactory,nw:v},messages:{title:u("store.purchase.auth.title",{name:Z}),scan:u("store.purchase.auth.scan"),confirm:u("store.purchase.auth.confirm"),success:(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("p",{children:u("store.purchase.auth.success")}),(0,se.jsx)("p",{children:u("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return(0,se.jsx)(Y.Z,(0,s.Z)({open:!0,locale:p,popup:!1,saveConnect:!1,className:"connect",baseUrl:y,onSuccess:b,cancelWhenScanned:t,onClose:t,checkTimeout:3e5,webWalletUrl:f,disableClose:!0,showDownload:!1},k[r]))}fe.propTypes=(0,s.Z)((0,s.Z)({},de),{},{handlePaySuccess:p().func,mode:p().oneOf(["verify","purchase"]).isRequired}),fe.defaultProps={handlePaySuccess:function(){}};var he=(0,d.forwardRef)((function(e,n){var t=e.mode,r=(0,i.Z)(e,me),o=(0,d.useState)("both"!==t?t:"verify"),a=(0,l.Z)(o,2),c=a[0],u=a[1],p=(0,d.useState)("both"!==t?2:1),m=(0,l.Z)(p,2),f=m[0],h=m[1],x=function(){c&&2!==f&&h(2)};return(0,d.useImperativeHandle)(n,(function(){return{onNext:x,getCurrentStep:function(){return f}}})),1===f?(0,se.jsx)("div",{style:{maxWidth:520},children:(0,se.jsx)(pe,{action:c,onNext:null,onSelect:function(e){e!==c&&u(e)}})}):(0,se.jsx)(fe,(0,s.Z)((0,s.Z)({},r),{},{mode:c}))}));he.propTypes={mode:p().oneOf(["both","verify","purchase"]).isRequired,ref:p().any},he.defaultProps={ref:{}};var xe,ve=he,ge=t(52654),ye=t(94486),Ze=t(30250),be=t(33665);function ke(e){var n=Object.assign({},((0,be.Z)(e),e));return(0,se.jsxs)("div",(0,s.Z)((0,s.Z)({},n),{},{style:{width:"100%"},children:[(0,se.jsx)("h3",{children:"End User License Agreement for Application"}),(0,se.jsxs)("p",{children:["Blocklet Server License Agreement ",I.COPYRIGHT_OWNER," version 2020-08-28"]}),(0,se.jsx)("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),(0,se.jsx)("p",{children:"\u6682\u65e0"})]}))}function je(e){var n=e.meta,t=e.onClickNext,r=e.handleDescEle,o=(0,m.useNavigate)(),i=(0,T.PE)(),a=i.t,c=i.locale,l=t||function(){o("/launch-blocklet/install".concat(window.location.search))};return(0,se.jsxs)(Ce,{children:[(0,se.jsx)("div",{className:"app-content",children:(0,se.jsx)("div",{className:"agreement",children:(0,se.jsx)("div",{className:"agreement-content",children:(0,se.jsx)(Ze.Z,{blockletMeta:{data:n},locale:c,handleDescEle:r})})})}),(0,se.jsx)("div",{className:"button-container","data-cy":"agree-all",children:(0,se.jsx)(ye.Z,{onContinue:l,description:(0,se.jsx)(ke,{}),texts:{listenName:a("launchBlocklet.license"),buttonNext:a("launchBlocklet.next")}})})]})}je.propTypes={meta:p().object.isRequired,onClickNext:p().func,handleDescEle:p().node},je.defaultProps={onClickNext:null,handleDescEle:""};var Ce=A.Z.div(xe||(xe=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n flex: 1;\n .app-content {\n padding: 2px 24px 24px;\n "," {\n padding-top: 10px;\n }\n width: 100%;\n flex: 1;\n letter-spacing: normal;\n }\n .agreement {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n border: 1px solid ",";\n border-radius: 12px;\n "," {\n margin-top: 24px;\n }\n "," {\n margin-top: 16px;\n }\n .agreement-content {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n font-size: 14px;\n overflow-y: auto;\n "," {\n padding: 0 24px;\n }\n "," {\n padding: 0 16px;\n }\n &:after {\n display: block;\n content: '';\n height: 24px;\n }\n }\n }\n .button-container {\n padding-top: 24px;\n padding-bottom: 34px;\n "," {\n padding-right: 24px;\n margin-left: auto;\n }\n "," {\n padding-top: 0;\n padding-bottom: 16px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.palette.grey[100]}),(function(e){return e.theme.breakpoints.up("md")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.up("md")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.up("md")}),(function(e){return e.theme.breakpoints.down("md")})),we=t(50496),Se=t(43207),Re=t(38219),Ee=t(70576),Ae=t(50624),Te=t(70177),Pe=t(77370),Ue=t(90617),Be=t(36558);function De(e){var n=e.defaultUrl,t=e.onCancel,r=e.onSuccess,o=e.onError,i=e.mode,u=e.handleText,p=(0,G.h6)().api,m=(0,Pe.T)().api,f=(0,d.useState)(!1),h=(0,l.Z)(f,2),x=h[0],v=h[1],g=(0,d.useState)(""),y=(0,l.Z)(g,2),Z=y[0],b=y[1],k=(0,T.PE)().t,S={dist:{}},R=(0,d.useState)(n),E=(0,l.Z)(R,2),A=E[0],P=E[1],U=(0,d.useState)(n?1:0),B=(0,l.Z)(U,2),D=B[0],I=B[1],L=(0,d.useState)(S),O=(0,l.Z)(L,2),z=O[0],J=O[1],V=(0,d.useState)(!1),Q=(0,l.Z)(V,2),H=Q[0],K=Q[1],W=(0,d.useState)({}),X=(0,l.Z)(W,2),_=X[0],$=X[1],ee="component"===i,ne=!!ee||!n,te=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(){var n,t,r,i,c,l;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:J(S),b(null),v(!0),e.prev=3,n=decodeURIComponent(A.trim()),e.prev=5,new URL(n),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(5),new Error("Invalid URL");case 12:return e.next=14,p.getBlockletMetaFromUrl({input:{url:n}});case 14:t=e.sent,r=t.meta,i=t.inStore,c=t.registryUrl,J(r),$({inStore:i,registryUrl:c,inputUrl:A.trim()}),e.next=28;break;case 22:e.prev=22,e.t1=e.catch(3),console.error(e.t1),l="Blocklet Install failed: ".concat((0,q.Z)(e.t1)),b(l),o(e.t1);case 28:return e.prev=28,v(!1),e.finish(28);case 31:case"end":return e.stop()}}),e,null,[[3,22,28,31],[5,9]])})));return function(){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){n&&te()}),[n]);var re=[{name:k("common.name"),value:(0,M.getDisplayName)({meta:z},!0)},{name:k("common.version"),value:z.version},{name:k("common.did"),value:(0,se.jsx)(Be.Z,{did:z.did})},{name:k("common.author"),value:(0,q.rq)(z.author)},{name:k("blocklet.dist.downloadLink"),value:z.dist.tarball}],oe=[{label:k("blocklet.fromUrl.step0"),body:(0,se.jsx)(C.Z,{component:"div",children:(0,se.jsx)(w.Z,{label:k("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:k("blocklet.fromUrl.description"),value:A,onChange:function(e){b(null),P(e.target.value)},disabled:x,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),te(),I(1))}})}),cancel:k("common.cancel"),confirm:k("common.next"),onCancel:t,onConfirm:function(){te(),I(1)}},{label:k("blocklet.fromUrl.step1"),body:x?(0,se.jsx)("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:(0,se.jsx)(j.Z,{})}):z.did?(0,se.jsx)("div",{style:{paddingLeft:"10%"},children:re.map((function(e){return e.name===k("common.did")?(0,se.jsx)(Te.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return k("common.did")},children:e.value},e.name):(0,se.jsx)(Te.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)}))}):null,cancel:k(ne?"common.pre":"common.cancel"),confirm:(null===u||void 0===u?void 0:u.confirm)||k("blocklet.fromUrl.confirm"),onCancel:function(){ne?I((function(e){return e-1})):t()},onConfirm:function(){!function(){if(ee)return r((0,s.Z)({meta:z},_)),void t();v(!0),K(!0)}()}}],ie=oe[D];return(0,se.jsxs)(se.Fragment,{children:[(0,se.jsxs)(we.ZP,{title:(null===u||void 0===u?void 0:u.title)||k("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:function(){return ie.onCancel()},showCloseButton:0===D,disableEscapeKeyDown:!0,open:!0,actions:(0,se.jsxs)(se.Fragment,{children:[ie.cancel&&(0,se.jsx)(N.Z,{onClick:function(e){e.stopPropagation(),b(null),ie.onCancel()},color:"inherit",children:ie.cancel||k("common.cancel")}),(0,se.jsxs)(N.Z,{onClick:function(e){e.stopPropagation(),ie.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:x||!A||Z,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[x&&0===D&&(0,se.jsx)(j.Z,{size:16}),ie.confirm]})]}),children:[ne&&(0,se.jsx)(Re.Z,{alternativeLabel:!0,activeStep:D,children:oe.map((function(e){var n=e.label;return(0,se.jsx)(Ee.Z,{children:(0,se.jsx)(Ae.Z,{children:n})},n)}))}),(0,se.jsx)(Se.Z,{component:"div",style:{marginTop:24},children:ie.body}),!!Z&&(0,se.jsx)(F.Z,{type:"error",style:{width:"100%",marginTop:8},children:Z})]}),z&&H&&(0,se.jsx)(Y.Z,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:m.get,checkTimeout:3e5,onSuccess:function(){v(!1),K(!1),r((0,s.Z)({meta:z},_)),t()},extraParams:{title:z.title,wt:(0,Ue.iK)(z),blockletMetaUrl:decodeURIComponent(A.trim())},messages:{title:k("setup.keyPair.title"),scan:k("setup.keyPair.scan"),confirm:k("setup.keyPair.confirm"),success:k("setup.keyPair.success")},onClose:function(){v(!1),K(!1)}})]})}De.propTypes={defaultUrl:p().string,onCancel:p().func.isRequired,onSuccess:p().func.isRequired,onError:p().func,mode:p().oneOf(["install","component"]),handleText:p().object},De.defaultProps={onError:function(){},defaultUrl:"",mode:"install",handleText:{}};var Ie=t(2689),Ne=t(97475),Fe=t(17708),Le=t(3715),Oe=(0,ne.Z)((function(e){return{addMenuItemRoot:{justifyContent:"center",color:e.palette.primary.main,lineHeight:"3.2"}}}));function Me(e){var n=e.disabled,t=e.storeList,r=e.teamDid,o=e.onAdd,i=(0,G.h6)().api,s=(0,d.useState)(!1),u=(0,l.Z)(s,2),p=u[0],m=u[1],f=(0,d.useState)(!0),h=(0,l.Z)(f,2),x=h[0],v=h[1],g=(0,d.useState)(!1),y=(0,l.Z)(g,2),Z=y[0],b=y[1],k=(0,d.useState)(""),S=(0,l.Z)(k,2),R=S[0],E=S[1],A=(0,d.useState)(""),P=(0,l.Z)(A,2),U=P[0],B=P[1],D=(0,T.PE)().t,I=Oe(),L=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(){var n,c,l,s;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m(!0),e.prev=1,n=(0,q.bQ)(R,t),c=n.isNew,l=n.decoded,c){e.next=5;break}throw new Error(D("store.blockletRegistry.haveSameRegistry"));case 5:return e.next=7,i.addBlockletStore({input:{teamDid:r,url:l}});case 7:o(l),b(!1),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(1),s="".concat(D("store.blockletRegistry.addFailed")," ").concat((0,q.Z)(e.t0)),B(s);case 15:return e.prev=15,m(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,11,15,18]])})));return function(){return e.apply(this,arguments)}}();return(0,se.jsxs)(se.Fragment,{children:[(0,se.jsxs)(re.ZP,{button:!0,disabled:n,className:I.addMenuItemRoot,onClick:function(){b(!0)},children:[(0,se.jsx)(Le.Z,{font:!0}),(0,se.jsx)(C.Z,{variant:"inherit",children:D("store.blockletRegistry.addRegistry")})]}),(0,se.jsxs)(we.ZP,{title:D("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:Z,onClose:function(){return b(!1)},PaperProps:{style:{minHeight:"auto"}},actions:(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(N.Z,{onClick:function(e){e.stopPropagation(),b(!1)},color:"inherit",children:D("common.cancel")}),(0,se.jsxs)(N.Z,{onClick:function(e){e.stopPropagation(),L()},color:"primary","data-cy":"install-blocklet-next-step",disabled:p||!R||x,variant:"contained",autoFocus:!0,children:[p&&(0,se.jsx)(j.Z,{size:16}),D("common.confirm")]})]}),children:[(0,se.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,se.jsx)(Se.Z,{component:"div",children:(0,se.jsx)(C.Z,{component:"div",children:(0,se.jsx)(w.Z,{label:D("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:R,onChange:function(e){B(null);var n=!1;e.target.value.trim()||(n=!0),e.target.value.trim()||B(D("store.blockletRegistry.registryUrlEmpty")),E(e.target.value),v(n)},disabled:p,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),e.target.value.trim()?L():B(D("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!U&&(0,se.jsx)(F.Z,{type:"error",style:{width:"100%"},children:U})]})]})}Me.propTypes={teamDid:p().string.isRequired,disabled:p().bool,storeList:p().array,onAdd:p().func},Me.defaultProps={disabled:!1,storeList:[],onAdd:function(){}};var ze=t(50714),Je=t(11909),Ve=t(94551),Ge=t(94702),Qe=t(30291),qe=t(25371);function He(e){var n=e.store,t=e.teamDid,r=e.onDelete,o=(0,G.h6)().api,i=(0,T.PE)().t,s=(0,d.useState)(!1),u=(0,l.Z)(s,2),p=u[0],m=u[1],f=(0,d.useState)(null),h=(0,l.Z)(f,2),x=h[0],v=h[1],g=(0,Ge.Z)(),y=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m(!0),e.next=4,o.deleteBlockletStore({input:{teamDid:t,url:n.url}});case 4:r&&"function"===typeof r&&r(),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),V.Z.error("Remove Blocklet Store Error: ".concat((0,q.Z)(e.t0)));case 10:return e.prev=10,m(!1),v(null),e.finish(10);case 14:case"end":return e.stop()}}),e,null,[[0,7,10,14]])})));return function(){return e.apply(this,arguments)}}(),Z={keyName:n.url,title:i("store.blockletRegistry.deleteRegistry"),description:i("store.blockletRegistry.deleteDesc",{name:"<b>".concat(n.url,"</b>"),color:g.palette.error.main}),confirmPlaceholder:i("store.blockletRegistry.confirmDesc",{name:n.url}),confirm:i("common.delConfirm"),cancel:i("common.cancel"),onConfirm:y,onCancel:function(){m(!1),v(null)}};return(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(Ve.Z,{disabled:p,onClick:function(e){e.stopPropagation(),v(Z)},size:"large",children:(0,se.jsx)(Qe.default,{})}),x&&(0,se.jsx)(qe.Z,{keyName:x.keyName,title:x.title,description:x.description,confirmPlaceholder:x.confirmPlaceholder,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}He.propTypes={teamDid:p().string.isRequired,store:p().object.isRequired,onDelete:p().func},He.defaultProps={onDelete:function(){}};var Ke,We=(0,ne.Z)((function(){return{buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}}));function Xe(e){var n=e.teamDid,t=e.store,r=e.onDelete,o=We();return(0,se.jsxs)("div",{className:o.menuName,children:[(0,se.jsx)(C.Z,{component:"span",variant:"subtitle1",style:{fontWeight:"400"},children:t.name}),(0,se.jsx)(C.Z,{className:"url",component:"span",variant:"inherit",children:"".concat(t.url)}),(0,se.jsxs)(ze.Z,{children:[(0,se.jsx)(Ve.Z,{onClick:function(e){e.stopPropagation(),window.open(t.url)},size:"large",children:(0,se.jsx)(Je.Z,{})}),!t.protected&&(0,se.jsx)(He,{store:t,onDelete:r,teamDid:n})]})]})}function Ye(e){var n=e.onChange,t=e.loading,r=e.children,i=e.extra,a=e.stores,c=e.storageKey,u=(0,T.PE)().t,p=(0,G.h6)(),m=p.info,f=p.inService,x=(0,Q.y0)().blocklet,v=(0,d.useState)(!1),g=(0,l.Z)(v,2),y=g[0],Z=g[1],b=(0,d.useRef)(null),k=(0,d.useState)(),j=(0,l.Z)(k,2),S=j[0],R=j[1],E=(0,Fe.Z)(c||"tmp"),A=(0,l.Z)(E,2),P=A[0],U=A[1],B=c?[P,U]:[S,R],D=(0,l.Z)(B,2),F=D[0],L=D[1],O=(0,q.dX)({fromBlocklet:f,blocklet:x,nodeInfo:m}),M=O.storeList,z=O.teamDid,J=h()([].concat((0,o.Z)(a.map((function(e){return(0,s.Z)((0,s.Z)({},e),{},{protected:!0})}))),(0,o.Z)(M)),"url"),V=F&&J.find((function(e){return F===e.url}))||J[0],H=m.mode===I.NODE_MODES.SERVERLESS;return(0,se.jsxs)(se.Fragment,{children:[(0,se.jsxs)($e,{children:[(0,se.jsx)(N.Z,{ref:b,color:"secondary","data-cy":"add-component-select-store",endIcon:(0,se.jsx)(Ne.Z,{color:"secondary"}),onClick:function(){Z(!0)},style:{padding:"0 2px"},children:(0,se.jsx)(C.Z,{color:"secondary",children:V.name})}),(0,se.jsx)(C.Z,{color:"secondary",children:i})]}),(0,se.jsxs)(w.Z,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:u("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:V,autoFocus:!0,onChange:function(e){var t=e.target.value;L(t.url),n(t)},SelectProps:{open:y,MenuProps:{anchorEl:b.current},renderValue:function(e){return null===e||void 0===e?void 0:e.name},onClose:function(){Z(!1)}},style:{display:"none"},margin:"normal",children:[null===J||void 0===J?void 0:J.map((function(e){return(0,se.jsx)(Ie.Z,{value:e,"data-cy":e.url,children:(0,se.jsx)(Xe,{teamDid:z,store:e,onDelete:function(){var n;F===e.url&&L(null===(n=J[0])||void 0===n?void 0:n.url)}})},e.url)})),!H&&(0,se.jsx)(Me,{disabled:t,storeList:J,teamDid:z,onAdd:function(e){L(e)}})]}),r({currentRegistry:V})]})}Xe.propTypes={teamDid:p().string.isRequired,store:p().shape({name:p().string.isRequired,url:p().string.isRequired,protected:p().bool}).isRequired,onDelete:p().func},Xe.defaultProps={onDelete:function(){}},Ye.propTypes={onChange:p().func,loading:p().bool,children:p().any.isRequired,extra:p().node,storageKey:p().string,stores:p().arrayOf(p().shape({name:p().string.isRequired,url:p().string.isRequired}))},Ye.defaultProps={onChange:function(){},loading:!1,extra:"",stores:[],storageKey:""};var _e,$e=A.Z.div(Ke||(Ke=(0,r.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n\n span {\n font-size: 16px;\n color: ",";\n // font-weight: bold;\n }\n"])),(function(e){return e.theme.palette.common.black})),en=t(19638),nn=t(37433),tn=t(51921),rn=t(95612),on=t(49956),an=["handleButtonClick","handleSearchSelect","storeUrl","handleBlockletRender","extraFilter","serverVersion","resourceType"],cn=function(e,n){return X()(n,"/blocklets/".concat(e.did))},ln=function(e){var n=e.blocklet,t=e.attribute,r=e.value;return n._formatted?n._formatted[t]:r},sn=function(e){return e.inStore&&!1===(0,M.isFreeBlocklet)(e)};function dn(e){var n=e.blocklet,t=e.blocklets,r=e.handleButtonClick,o=e.endpoint,i=(0,T.PE)().t,s=X()(o,(0,q.lk)(n.did,n.logo||"")),u=(0,d.useState)(!1),p=(0,l.Z)(u,2),m=p[0],f=p[1],h=sn(n)?i("common.purchase"):i("blocklet.component.choose"),x=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(i){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.preventDefault(),i.stopPropagation(),e.prev=2,f(!0),e.next=6,r({meta:n,registryUrl:o,blocklets:t});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),V.Z.error(e.t0.message);case 11:return e.prev=11,f(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[2,8,11,14]])})));return function(n){return e.apply(this,arguments)}}();return(0,se.jsx)(en.Z,{href:cn(n,o),style:{color:"initial",textDecoration:"none"},onClick:function(e){return!!e.currentTarget.contains(e.target)||(e.preventDefault(),!1)},target:"_blank",children:(0,se.jsx)(fn,{title:ln({blocklet:n,attribute:"title",value:n.title||n.name}),did:n.did,description:ln({blocklet:n,attribute:"description",value:n.description}),cover:n.logo?s:"",version:n.version,button:(0,se.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,se.jsx)(on.Kk,{children:(0,se.jsx)(N.Z,{onClick:x,size:"small",disabled:m,variant:"outlined",color:"primary","data-cy":"install-blocklet",children:m?(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(j.Z,{size:16,style:{marginRight:3}}),h]}):h},n.did)})})})})}function un(e){var n=e.handleButtonClick,t=e.handleSearchSelect,r=e.storeUrl,o=e.handleBlockletRender,a=e.extraFilter,c=e.serverVersion,u=e.resourceType,p=(0,i.Z)(e,an),m=(0,T.PE)().locale,f=(0,d.useState)(!1),h=(0,l.Z)(f,2),x=h[0],v=h[1],g=(0,d.useState)({}),y=(0,l.Z)(g,2),Z=y[0],b=y[1],k=r;return(0,d.useEffect)((function(){b({resourceType:u})}),[k,u]),(0,d.useEffect)((function(){v(!0),b({resourceType:u})}),[]),(0,se.jsx)(tn.ErrorBoundary,{FallbackComponent:nn.H,resetKeys:[k],children:(0,se.jsx)("div",(0,s.Z)((0,s.Z)({},p),{},{children:x&&(0,se.jsx)(rn.Z,{blockletRender:function(e){var t=(0,s.Z)((0,s.Z)({},e),{},{handleButtonClick:n,endpoint:k});return o((0,s.Z)((0,s.Z)({},e),{},{defaultRender:(0,se.jsx)(dn,(0,s.Z)({},t))}))},baseSearch:!0,endpoint:k,locale:m,onFilterChange:function(e){b(e)},onSearchSelect:t,filters:Z,extraFilter:a,serverVersion:c,fetchCategoryDelay:500})}))})}dn.propTypes={blocklet:p().object.isRequired,blocklets:p().array,handleButtonClick:p().func,endpoint:p().string},dn.defaultProps={handleButtonClick:null,endpoint:"",blocklets:[]},un.propTypes={storeUrl:p().string.isRequired,handleButtonClick:p().func,handleSearchSelect:p().func,handleBlockletRender:p().func,extraFilter:p().func,serverVersion:p().string,resourceType:p().string},un.defaultProps={handleButtonClick:null,handleSearchSelect:null,handleBlockletRender:null,extraFilter:void 0,serverVersion:"",resourceType:""};var pn,mn,fn=(0,A.Z)(on.ZP)(_e||(_e=(0,r.Z)(["\n .ms-highlight {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),hn=t(238);function xn(e){var n=Object.assign({},((0,be.Z)(e),e));return(0,se.jsx)(N.Z,(0,s.Z)({className:"bottom-button",variant:"contained",color:"primary"},n))}function vn(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{key:"sm"}).key,n=(0,Ge.Z)();return(0,E.Z)(n.breakpoints.down(e))}function gn(e){var n=e.blocklet,t=e.onStartNow,r=e.children,o=e.disabled,i=(0,T.PE)().t,a=vn();return!n||(0,q.bg)(n.meta)?(0,se.jsx)(yn,{children:r}):(0,se.jsxs)(Zn,{isMobile:a,children:[(0,se.jsx)(xn,{className:"start-now",variant:"contained",color:"primary",disabled:o,onClick:function(){return t()},children:i("setup.startNow")}),(0,se.jsx)(D.Z,{display:"flex",alignItems:"center",children:r})]})}gn.propTypes={blocklet:p().object,onStartNow:p().func,children:p().any,disabled:p().bool},gn.defaultProps={blocklet:null,onStartNow:function(){},children:null,disabled:!1};var yn=(0,A.Z)(D.Z)(pn||(pn=(0,r.Z)(["\n width: 100%;\n margin-top: auto;\n padding-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n .bottom-button {\n min-width: 200px;\n }\n "," {\n .bottom-button {\n width: 100%;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")})),Zn=(0,A.Z)(D.Z)(mn||(mn=(0,r.Z)(["\n padding-top: 24px;\n margin-top: auto;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n .start-now {\n min-width: 140px;\n }\n .bottom-button {\n min-width: 120px;\n }\n "," {\n width: 100%;\n }\n\n "," {\n .start-now {\n min-width: inherit;\n }\n .bottom-button {\n min-width: 100px;\n }\n }\n\n "," {\n justify-content: space-between;\n gap: '32px',\n }}\n"])),(function(e){return e.theme.breakpoints.down("lg")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.isMobile})),bn=t(44876),kn=function(e){return(0,se.jsxs)("svg",(0,s.Z)((0,s.Z)({},e),{},{children:[(0,se.jsxs)("g",{filter:"url(#a)",children:[(0,se.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"}),(0,se.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.192 6.222l-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"}),(0,se.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,se.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"})}),(0,se.jsxs)("g",{mask:"url(#b)",children:[(0,se.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,se.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,se.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"}),(0,se.jsx)("path",{d:"M117.604 47.263L121.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)"}),(0,se.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)"}),(0,se.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,se.jsx)("path",{d:"M50.928 216.089l1.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"}),(0,se.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"})]}),(0,se.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,se.jsx)("path",{d:"M192.064 213.333l.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"}),(0,se.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"})]})]}),(0,se.jsxs)("defs",{children:[(0,se.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,se.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,se.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"}),(0,se.jsx)("feOffset",{dy:"2"}),(0,se.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,se.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,se.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"}),(0,se.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,se.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,se.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,se.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,se.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,se.jsx)("stop",{stopColor:"#101010"}),(0,se.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,se.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,se.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,se.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,se.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,se.jsx)("stop",{stopColor:"#fff"}),(0,se.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,se.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:[(0,se.jsx)("stop",{stopColor:"#016BED"}),(0,se.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,se.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,se.jsx)("clipPath",{id:"g",children:(0,se.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,se.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+X59pv6udCJ7MAV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AuzRViTEA7tgePYuBGUYId9lgeqCiJ/JAP+K37em+n0mcKzQjQWZNGFywCCCF+7J1+B4vr0gBhFB6S+89eO6chpzkyM8s0MdCgW7njgiikAKvGH0fRKr9cXmycUjU8xfeY87PIXB3q1TK2GWGjxhtr146ZKTKWPp9sR8MWBNzQTNNrIt4XCVHh+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=="})]})]}))};function jn(){var e=(0,T.PE)().t;return(0,se.jsx)(D.Z,{children:(0,se.jsxs)(D.Z,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[(0,se.jsx)(kn,{style:{width:200,height:250}}),(0,se.jsx)(C.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.providerForStorage")})]})})}kn.defaultProps={width:"228",height:"258",viewBox:"0 0 228 258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},jn.propTypes={};var Cn=jn,wn=t(7173),Sn=t(50202),Rn=t(30134),En=t(67531),An=t(39882),Tn=t.n(An);function Pn(e){var n=e.spaceGateway,t=e.onDeleteSpace,r=(0,T.PE)().t,o=(0,d.useState)(!1),i=(0,l.Z)(o,2),s=i[0],u=i[1],p=(0,d.useState)(!1),m=(0,l.Z)(p,2),f=m[0],h=m[1],x=function(e,n){null===e||void 0===e||e.stopPropagation(),u(n)},v=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(o){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,null===o||void 0===o||o.stopPropagation(),h(!0),e.next=5,t(n);case 5:u(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),V.Z.error("".concat(r("storage.spaces.gateway.delete.failed"),": ").concat(Tn()(e.t0)));case 12:return e.prev=12,h(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,8,12,15]])})));return function(n){return e.apply(this,arguments)}}();return(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(Ve.Z,{size:"small",onClick:function(e){return x(e,!0)},children:(0,se.jsx)(Qe.default,{})}),(0,se.jsx)(En.Z,{title:r("common.delConfirmDescription",{data:"".concat(null===n||void 0===n?void 0:n.name)}),open:s,confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error",loading:f}},cancelButton:{text:r("common.cancel"),props:{variant:"contained",color:"primary"}},onConfirm:v,onCancel:function(e){return x(e,!1)}})]})}Pn.propTypes={onDeleteSpace:p().func,spaceGateway:p().shape({name:p().string.isRequired,url:p().string.isRequired,protected:p().bool}).isRequired},Pn.defaultProps={onDeleteSpace:function(){}};var Un,Bn=Pn,Dn=["spaceGateway","connected","onDisconnect"],In=function(e){return(0,se.jsx)("svg",(0,s.Z)((0,s.Z)({},e),{},{children:(0,se.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})}))};function Nn(e){var n=e.spaceGateway,t=e.connected,r=e.onDisconnect,o=(0,i.Z)(e,Dn),l=vn(),d=(0,T.PE)().t,u=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r();case 3:V.Z.success(d("storage.spaces.gateway.delete.succeeded",{name:n.name})),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0),V.Z.error((0,q.Z)(e.t0));case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}();return(0,se.jsxs)(Fn,{style:{position:"relative"},children:[(0,se.jsxs)(D.Z,(0,s.Z)((0,s.Z)({sx:{backgroundColor:t?"#F0FDFF":"inherit","&:hover":{backgroundColor:t?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px"},o),{},{children:[(0,se.jsx)(D.Z,{display:"flex",children:(0,se.jsx)(Sn.Z,{alt:n.did,src:(0,Rn.Jf)(n.endpoint)})}),(0,se.jsxs)(D.Z,{className:"spaces-info",display:"flex",flexGrow:1,flexDirection:"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[(0,se.jsxs)(D.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,se.jsx)(C.Z,{color:t?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:n.name}),(0,se.jsx)(wn.Z,{label:(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(In,{style:{marginRight:"4px"}}),d("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:l?null:"20px",fontWeight:"bold"}})]}),(0,se.jsx)(D.Z,{className:"spaces-address",display:"flex",color:"#9397A1",marginTop:"8px",children:(0,se.jsx)(C.Z,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:n.did&&(0,se.jsx)(Be.Z,{copyable:!1,size:14,compact:!0,responsive:!1,did:n.did})})})]}),(0,se.jsx)(D.Z,{className:"spaces-backup",display:"flex",alignItems:"center",children:(0,se.jsx)(D.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:(0,se.jsx)(Bn,{spaceGateway:n,onDeleteSpace:u})})})]})),(0,se.jsx)(D.Z,{className:"selected-container selected",children:(0,se.jsx)(R.default,{className:"selected-icon"})})]})}In.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Nn.propTypes={spaceGateway:p().shape({did:p().string.isRequired,name:p().string.isRequired,url:p().string.isRequired,endpoint:p().string.isRequired,protected:p().bool}).isRequired,connected:u.bool,onDisconnect:u.func},Nn.defaultProps={connected:!1,onDisconnect:function(){}};var Fn=(0,A.Z)(D.Z)(Un||(Un=(0,r.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"]))),Ln=Nn,On=t(50576),Mn=t(57982);var zn=(0,d.createContext)({}),Jn=zn.Provider;zn.Consumer;function Vn(e){var n=e.children,t=(0,d.useState)(!1),r=(0,l.Z)(t,2),o=r[0],i=r[1],s=(0,d.useState)(null),u=(0,l.Z)(s,2),p=u[0],m=u[1],f=(0,Q.y0)(),h=f.blocklet,x=f.actions.refreshBlocklet,v=function(){var e=(0,d.useState)(null),n=(0,l.Z)(e,2),t=n[0],r=n[1],o=(0,Q.y0)().blocklet;return(0,d.useEffect)((function(){r((0,Rn.EJ)(o))}),[o]),{storageEndpoint:t}}(),g=v.storageEndpoint,y=(0,G.h6)().api;(0,Mn.Z)((0,c.Z)((0,a.Z)().mark((function e(){var n;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i(!0),!(0,On.isEmpty)(g)){e.next=5;break}return m(null),e.abrupt("return");case 5:return e.next=7,(0,Rn.UV)(g);case 7:n=e.sent,m(n),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.error(e.t0),V.Z.error(e.t0.message);case 15:return e.prev=15,i(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[0,11,15,18]])}))),[g]);var Z=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(n){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(n),e.next=3,b(n.endpoint);case 3:x();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(n){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.configBlocklet({input:{did:[h.meta.did],configs:[{key:P.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:n}]}});case 2:x();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){function e(){return(e=(0,c.Z)((0,a.Z)().mark((function e(){var n,t;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,Rn.nU)(p.endpoint,p.name);case 4:n=e.sent,t=(0,On.merge)(p,{name:n}),m(t);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]);var k=Boolean(g&&p);return(0,se.jsx)(Jn,{value:{loading:o,spaceGateway:p,deleteSpaceGateway:function(){m(null),x()},updateSpaceGateway:Z,storageEndpoint:g,settingStorageEndpoint:b,hasStorageEndpoint:k},children:n})}function Gn(){return(0,d.useContext)(zn)}Vn.propTypes={children:u.node.isRequired},Vn.defaultProps={};var Qn=function(){var e=(0,T.PE)().t,n=Gn(),t=n.spaceGateway,r=n.settingStorageEndpoint;return(0,se.jsxs)(D.Z,{display:"flex",flexDirection:"column",children:[(0,se.jsx)(D.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:(0,se.jsx)(C.Z,{fontSize:"1.2rem",fontWeight:"bold",children:e("storage.spaces.connected.title")})}),(0,se.jsx)(D.Z,{children:(0,se.jsx)(Ln,{style:{marginTop:"12px"},spaceGateway:t,connected:!0,onDisconnect:function(){return r(null)}},t.endpoint)})]})},qn=t(15419),Hn=t(83998),Kn=t(85710),Wn=["onConnect"];function Xn(e){var n=e.onConnect,t=(0,i.Z)(e,Wn),r=(0,Q.y0)().blocklet,o=(0,G.h6)().info,u=(0,T.PE)(),p=u.t,m=u.locale,f=(0,d.useState)(""),h=(0,l.Z)(f,2),x=h[0],v=h[1],g=(0,d.useState)(!1),y=(0,l.Z)(g,2),Z=y[0],b=y[1],k=(0,d.useState)(!1),S=(0,l.Z)(k,2),R=S[0],E=S[1],A=(0,d.useState)(""),P=(0,l.Z)(A,2),U=P[0],B=P[1],L=(0,Hn.Z)({blocklet:r}),O=(0,Kn.yP)(o),M=Gn().storageEndpoint,z=(0,d.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:X()(I.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(I.PROD_DID_SPACES.CORE_URL).origin,checkFn:ee.od.create({baseURL:X()(I.PROD_DID_SPACES.CORE_URL,"space")}).get,messages:{title:p("storage.spaces.provideNFT.title",{appName:L.appName},m),scan:p("storage.spaces.provideNFT.scan",{appName:L.appName},m),confirm:"",success:(0,se.jsx)(C.Z,{gutterBottom:!0,children:p("storage.spaces.provideNFT.success")})},onClose:function(){H((function(e){return(0,s.Z)((0,s.Z)({},e),{},{open:!1})}))}}),J=(0,l.Z)(z,2),q=J[0],H=J[1],K=(0,d.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:p("storage.spaces.authorize.title",{appName:L.appName},m),scan:p("storage.spaces.authorize.scan",{appName:L.appName},m),confirm:"",success:(0,se.jsx)(C.Z,{gutterBottom:!0,children:p("storage.spaces.authorize.success")})},onClose:function(){$((function(e){return(0,s.Z)((0,s.Z)({},e),{},{open:!1})}))}}),W=(0,l.Z)(K,2),_=W[0],$=W[1],ne=function(e,n){setTimeout((0,c.Z)((0,a.Z)().mark((function t(){var r,o;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return $((function(e){return(0,s.Z)((0,s.Z)({},e),{},{open:!1})})),v(null),H((function(e){return(0,s.Z)((0,s.Z)({},e),{},{open:!1})})),r=n(e.endpoint),o=e.space?n(e.space):{},t.next=7,te((0,s.Z)((0,s.Z)({endpoint:r},{did:(0,Rn.LQ)(r),name:"DID Space"}),o));case 7:case"end":return t.stop()}}),t)}))),0)},te=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(t){var r,o,i,c,l;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.did,o=t.name,i=t.endpoint,e.next=3,(0,Rn.Z3)(i);case 3:return c=e.sent,e.next=6,(0,Rn.w2)(c);case 6:if(e.sent){e.next=9;break}return V.Z.error(p("storage.spaces.gateway.add.invalidUrl")),e.abrupt("return");case 9:return l={name:o,did:r,url:c,endpoint:i},e.next=12,n(l);case 12:V.Z.success(p("storage.spaces.connectedWithName",{name:l.name}));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),re=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(){var n,t,r,i;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,b(!0),e.next=4,(0,Rn.Z3)(x);case 4:return n=e.sent,t=(0,Rn.ag)(n),r=new URL(n).searchParams.get("spaceDid"),e.next=9,(0,Rn.w2)(t);case 9:if(e.sent){e.next=11;break}throw new Error(p("storage.spaces.gateway.add.invalidUrl"));case 11:$((function(e){return(0,s.Z)((0,s.Z)({},e),{},{open:!0,prefix:X()(t,"space/api/did"),baseUrl:new URL(t).origin,checkFn:ee.od.create({baseURL:X()(t,"space")}).get,extraParams:{appDid:L.appDid,appName:L.appName,appDescription:L.appDescription,scopes:L.scopes,appUrl:L.appUrl,referrer:L.referrer,nodeDid:o.did,spaceDid:r}})})),E(!1),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),i="".concat(p("storage.spaces.gateway.add.failed",m),": ").concat((0,Kn.Z)(e.t0)),B(i);case 19:return e.prev=19,b(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])})));return function(){return e.apply(this,arguments)}}();return(0,se.jsxs)(D.Z,{children:[(0,se.jsx)(qn.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:function(){H((function(e){return(0,s.Z)((0,s.Z)({},e),{},{open:!0,extraParams:{appDid:L.appDid,appName:L.appName,appDescription:L.appDescription,scopes:L.scopes,appUrl:L.appUrl,referrer:L.referrer,nodeDid:o.did}})}))},variant:"outlined",menu:[(0,se.jsx)(qn.Z.Item,(0,s.Z)((0,s.Z)({sx:{textTransform:"none"},onClick:function(){return E(!0)},size:"small"},t),{},{children:p(M?"storage.spaces.connect.useSpaceGatewayReconnect":"storage.spaces.connect.useSpaceGateway")}),"1")],children:(0,se.jsx)(C.Z,{sx:{fontWeight:"bold",textTransform:"none"},children:p(M?"storage.spaces.connect.useWalletReconnect":"storage.spaces.connect.useWallet")})}),(0,se.jsx)(Y.Z,{forceConnected:!1,saveConnect:!1,prefix:q.prefix,open:q.open,popup:!0,action:q.action,webWalletUrl:O,baseUrl:q.baseUrl,checkFn:q.checkFn,onSuccess:ne,onClose:q.onClose,checkTimeout:q.checkTimeout,extraParams:q.extraParams,messages:q.messages,locale:m}),(0,se.jsx)(Y.Z,{forceConnected:!1,saveConnect:!1,prefix:_.prefix,open:_.open,popup:!0,action:_.action,baseUrl:_.baseUrl,checkFn:_.checkFn,onSuccess:ne,onClose:_.onClose,checkTimeout:_.checkTimeout,extraParams:_.extraParams,messages:_.messages,locale:m}),(0,se.jsxs)(we.ZP,{title:p("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:R,onClose:function(){return E(!1)},PaperProps:{style:{minHeight:"auto"}},actions:(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(N.Z,{onClick:function(e){e.stopPropagation(),E(!1)},color:"inherit",children:p("common.cancel")}),(0,se.jsxs)(N.Z,{onClick:re,color:"primary",disabled:Z||!x,variant:"contained",autoFocus:!0,children:[Z&&(0,se.jsx)(j.Z,{size:16}),p("common.confirm")]})]}),children:[(0,se.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,se.jsx)(Se.Z,{component:"div",children:(0,se.jsx)(C.Z,{component:"div",children:(0,se.jsx)(w.Z,{label:p("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:x,onChange:function(e){B(null),v(e.target.value)},disabled:Z,onKeyPress:function(){var e=(0,c.Z)((0,a.Z)().mark((function e(n){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("Enter"!==n.key){e.next=3;break}return e.next=3,re();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),autoFocus:!0})})})}),Boolean(U)&&(0,se.jsx)(F.Z,{type:"error",style:{width:"100%"},children:U})]})]})}Xn.propTypes={onConnect:u.func},Xn.defaultProps={onConnect:function(){}};var Yn,_n=Xn;function $n(e){var n,t=e.blockletMeta,r=e.onEndpointUpdate,o=vn(),i=(0,Q.y0)().blocklet,a=Gn(),c=a.updateSpaceGateway,l=a.loading,s=a.hasStorageEndpoint;return(0,d.useEffect)((function(){null===r||void 0===r||r()}),[i]),l?(0,se.jsx)(hn.Z,{relative:"parent",children:(0,se.jsx)(j.Z,{})}):(0,se.jsxs)(ct,{children:[(0,se.jsx)(D.Z,{width:o?"360px":"720px",children:s?(0,se.jsx)(Qn,{}):(0,se.jsx)(Cn,{})}),"required"===(null===t||void 0===t||null===(n=t.capabilities)||void 0===n?void 0:n.didSpace)&&(0,se.jsx)(gn,{mt:8,children:(0,se.jsx)(_n,{onConnect:c})})]})}$n.propTypes={blockletMeta:p().any.isRequired,onEndpointUpdate:u.func},$n.defaultProps={onEndpointUpdate:function(){}};var et,nt,tt,rt,ot,it,at,ct=(0,A.Z)(bn.Z)(Yn||(Yn=(0,r.Z)(["\n height: 100%;\n overflow-y: auto;\n"]))),lt=$n,st=["name","validation"],dt=["default","key"],ut=function(e){return e.inStore&&!1===(0,M.isFreeBlocklet)(e)},pt=function(e){var n;return null===e||void 0===e||null===(n=e.capabilities)||void 0===n?void 0:n.didSpace},mt=function(e){var n,t;return(null===e||void 0===e||null===(n=e.configs)||void 0===n||null===(t=n.find((function(e){return e.key===P.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null},ft=function(e){return(e.environments||[]).some((function(e){return e.required}))},ht=function(e,n){return null===e||void 0===e?void 0:e.some((function(e){return e.required&&!n[e.key]}))},xt=function(e){var n=e.params,t=e.blocklet,r=e.t,o=n.title||n.name;return o?r(((null===t||void 0===t?void 0:t.children)||[]).find((function(e){return e.meta.bundleDid===n.bundleDid}))?"blocklet.component.upgradeNext":"blocklet.component.addNext",{name:o}):r("common.next")},vt=(0,d.forwardRef)((function(e,n){var t=e.meta,r=e.isMobile,o=e.onStepChange,i=(0,B.s)(),a=i.steps,c=i.activeStep,l=i.setActiveStepByKey,u=i.setActiveStepByIndex,p=(0,T.PE)(),m=p.t,f=p.locale,h=a[c];return(0,d.useEffect)((function(){o(c)}),[o,c]),(0,d.useImperativeHandle)(n,(function(){return{setActiveStepByKey:l,setActiveStepByIndex:u}})),(0,se.jsx)(Ct,{component:"div",className:r?"mobileStyle":"",sx:{height:"calc(100% - 56px)"},children:(0,se.jsx)(U.Z,{locale:f,blockletMeta:(0,s.Z)({title:" "},t),pcWidth:"100%",pcHeight:"100%",logoUrl:t&&t.logo&&t.registryUrl?(0,q.aZ)({did:t.did,baseUrl:t.registryUrl,logoPath:t.logo}):null,stepTip:m("blocklet.component.add"),children:(0,se.jsx)(kt,{children:null!==h&&void 0!==h&&h.body&&"function"===typeof h.body?h.body():h.body})})})}));vt.propTypes={meta:p().any,onStepChange:p().func.isRequired,isMobile:p().bool.isRequired},vt.defaultProps={meta:null};var gt=function(e){setTimeout((function(){window.parent.postMessage({event:"component.installed",componentDid:e},"*")}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3)};function yt(e){var n,t,r,u,p,f,x,g=e.onClose,Z=e.mode,C=e.stores,A=e.resourceType,U=e.storageKey,z=e.inDialog,W=(0,T.PE)(),X=W.t,Y=W.locale,_=(0,d.useState)(!1),$=(0,l.Z)(_,2),ee=$[0],ne=$[1],te=(0,d.useState)(null),re=(0,l.Z)(te,2),oe=re[0],ie=re[1],ae=(0,d.useState)(""),ce=(0,l.Z)(ae,2),le=ce[0],de=ce[1],ue=(0,d.useState)(""),pe=(0,l.Z)(ue,2),me=pe[0],fe=pe[1],he=(0,G.h6)(),xe=he.api,ye=he.ws.useSubscription,Ze=he.inService,be=he.info,ke=(0,Q.y0)(),Ce=ke.blocklet,we=ke.actions.refreshBlocklet,Se=(0,d.useState)(null),Re=(0,l.Z)(Se,2),Ee=Re[0],Ae=Re[1],Te=(0,d.useState)(!1),Pe=(0,l.Z)(Te,2),Ue=Pe[0],Be=Pe[1],Ie={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceCapability:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},Ne=(0,d.useState)(Ie),Fe=(0,l.Z)(Ne,2),Le=Fe[0],Oe=Fe[1],Me=(0,d.useState)(0),ze=(0,l.Z)(Me,2),Je=ze[0],Ve=ze[1],Ge=(0,d.useRef)({}),Qe=(0,d.useRef)({}),qe=(0,d.useRef)({}),He=(0,E.Z)((function(e){return e.breakpoints.down("md")})),Ke=(0,m.useParams)(),We=Ge.current.meta,Xe=(Qe.current||{}).setActiveStepByIndex,_e=be.mode===I.NODE_MODES.SERVERLESS,$e=function(e){return Oe((function(n){return(0,s.Z)((0,s.Z)({},n),e)}))};(0,d.useEffect)((function(){if(Le.pathPrefix){var e=cn((0,s.Z)((0,s.Z)({},Le),{},{pathPrefix:Le.pathPrefix,locale:Y})).errMsg;de(e)}}),[Le.pathPrefix]),(0,d.useEffect)((function(){0===Je&&Oe(Ie)}),[Je]);var en=function(){var e,n=null!==(e=mt(Ce))&&void 0!==e?e:"";$e({didSpaceEndpoint:n})},nn=function(){var e;return null!==Ge&&void 0!==Ge&&null!==(e=Ge.current)&&void 0!==e&&e.meta?(0,M.getDisplayName)(Ge.current):""},tn=function(e){!function n(t){$e({installResultProps:{variant:"error",title:nn(),subTitle:e,footer:(0,se.jsx)(N.Z,{className:"bottom-button",disabled:t,"data-cy":"retry-install-component",onClick:function(){var e=(0,c.Z)((0,a.Z)().mark((function e(){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),e.next=3,an(Ge.current.installInput);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),children:(0,se.jsxs)(D.Z,{display:"flex",alignItems:"center",children:[t&&(0,se.jsx)(j.Z,{size:16,style:{marginRight:8}}),X("common.retry")]})})}})}()},rn=function(e){return function(n){var t,r;((null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.did)||(null===n||void 0===n?void 0:n.meta))===(null===Ce||void 0===Ce||null===(r=Ce.meta)||void 0===r?void 0:r.did)&&e(n)}};ye(P.BlockletEvents.statusChange,rn((function(e){if(e.status===P.BlockletStatus.upgrading)$e({installResultProps:{variant:"success",title:nn(),subTitle:X("blocklet.component.installSuccessTip")}}),gt(Ke.componentDid);var n=mt(Ce);$e((function(e){return(0,s.Z)((0,s.Z)({},e),{},{didSpaceEndpoint:n})}))})),[null===Ce||void 0===Ce||null===(n=Ce.meta)||void 0===n?void 0:n.did]),ye(P.BlockletEvents.downloadFailed,rn((function(){tn(X("blocklet.component.installComponentError"))})),[null===Ce||void 0===Ce||null===(t=Ce.meta)||void 0===t?void 0:t.did]),ye(P.BlockletEvents.installFailed,rn((function(){tn(X("blocklet.component.installComponentError"))})),[null===Ce||void 0===Ce||null===(r=Ce.meta)||void 0===r?void 0:r.did]);var on=function(){ne(!1),Oe({}),Ge.current={},g()},an=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(n){var t,r,o,i,c,l,d,u,p,m,f,h,x,v,g,y,Z,b,k,j,C,w,S,R,E;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Le.pathPrefix,i=Le.bundleDid,c=Le.title,l=Le.componentName,d=void 0===l?"":l,u=Le.componentDid,p=void 0===u?"":u,m=(null===(t=Ge.current)||void 0===t?void 0:t.meta)||{},f=m.configs,h=void 0===f?[]:f,x=m.registryUrl,v=m.inStore,g=m.inputUrl,y=null===(r=Ge.current)||void 0===r?void 0:r.downloadTokenList,Z=v?(0,q.Rn)(x,i):g,ne(!0),b=(0,s.Z)((0,s.Z)((0,s.Z)({rootDid:Ce.meta.did,url:Z,mountPoint:J()(o),title:c,name:d,did:p},Le.hasEnvironmentsStep&&h.length>0?{configs:h.map((function(e){return(0,s.Z)((0,s.Z)({},e),{},{value:Le.configsValue[e.key]||""})}))}:{}),y?{downloadTokenList:y}:{}),n),e.prev=6,e.next=9,xe.installComponent({input:b});case 9:if(!x){e.next=15;break}if(k=(0,q.dX)({fromBlocklet:Ze,nodeInfo:be,blocklet:Ce}),j=k.teamDid,C=k.storeList,w=(0,q.bQ)(x,C),S=w.isNew,R=w.decoded,!S){e.next=15;break}return e.next=15,xe.addBlockletStore({input:{teamDid:j,url:R}});case 15:$e({installResultProps:{}}),we({showError:!1,attachRuntimeInfo:!1}),e.next=25;break;case 19:e.prev=19,e.t0=e.catch(6),E=(0,q.Z)(e.t0),V.Z.error(E),console.error("installComponent error: ",e.t0),tn(E);case 25:return e.prev=25,ne(!1),Ge.current.installInput=b,e.finish(25);case 29:case"end":return e.stop()}}),e,null,[[6,19,25,29]])})));return function(n){return e.apply(this,arguments)}}(),cn=function(e){return{errMsg:(0,ge.Rw)({params:(0,s.Z)((0,s.Z)({},e),{},{did:e.bundleDid}),blocklets:[Ce],blocklet:Ce,locale:Y})}},ln=function(){var e=(0,c.Z)((0,a.Z)().mark((function e(n){var t,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=cn((0,s.Z)((0,s.Z)({},Le),{},{locale:Y})),r=t.errMsg,de(r),Je!==pn.length-2){e.next=5;break}return e.next=5,an(n);case 5:Xe((function(e){return e+1}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),sn=function(){Xe((function(e){return e-1}))},dn=function(e){var n,t,r=e.chooseParams,a=void 0===r?Ge.current:r,c=e.componentDid,l=e.isInit,d=void 0!==l&&l,u=a.meta,p=a.registryUrl,m=a.inStore,f=a.inputUrl,x=u.did,g=u.title,y=u.name,Z=((null===(n=Ce.settings)||void 0===n?void 0:n.children)||[]).filter((function(e){return"deleted"===e.status&&e.meta.bundleDid===x})),k=c||"",j=null===(t=u.environments)||void 0===t?void 0:t.map((function(e){var n=e.name,t=e.validation,r=(0,i.Z)(e,st),o={validation:b()(t)?"":t};return(0,s.Z)((0,s.Z)({},r),{},{key:n},o)}));Ge.current=(0,s.Z)((0,s.Z)({},a),{},{meta:(0,s.Z)((0,s.Z)({},u),{},{configs:j,registryUrl:p,inStore:m,inputUrl:f})});var C={};if(d){var w=[Ce],S=j||[],R=h()(v()([].concat((0,o.Z)(S),[])),"key").filter((function(e){return!!e.key})).sort((function(e,n){return e.required&&!n.required?-1:n.required&&!e.required?1:0})),E=(0,M.getSharedConfigObj)(w[0],{configs:R}),A={},T=R.map((function(e){var n=e.default,t=e.key,r=(0,i.Z)(e,dt);return A[t]=E[t]||n,(0,s.Z)((0,s.Z)({},r),{},{key:t,hidden:!!P.BLOCKLET_CONFIGURABLE_KEY[t]})}));C=(0,s.Z)((0,s.Z)({},C),{},{configsList:T,configsValue:A,hasMissRequiredConfigs:ht(T,A)})}var U,B,D=Ce.children.some((function(e){return"/"===e.mountPoint})),I=Z.find((function(e){return e.meta.bundleDid===x}));I?C=(0,s.Z)((0,s.Z)({},C),{},{pathPrefix:I.mountPoint||"",title:g||"",componentName:I.meta.name,hasEnvironmentsStep:!1}):C=(0,s.Z)((0,s.Z)({},C),{},{pathPrefix:D?"/".concat(J()(g)||J()(y)):"/",title:g||"",componentName:"",hasEnvironmentsStep:(null===(U=Ge.current.meta)||void 0===U||null===(B=U.environments)||void 0===B?void 0:B.length)>0});var N=ut(Ge.current.meta),F=pt(Ge.current.meta),L=mt(Ce);$e((0,s.Z)((0,s.Z)({bundleDid:x,componentDid:k},C),{},{hasRequiredEnvironments:ft(Ge.current.meta),requirePurchase:N,didSpaceCapability:F,didSpaceEndpoint:L})),d&&N&&function(){var e=Le.pathPrefix,n=Le.bundleDid,t=Le.title,r=Le.componentName,o=void 0===r?"":r,i=Le.componentDid,a=void 0===i?"":i,c=(Ge.current||{}).meta,l=void 0===c?{}:c,s=l.registryUrl,d=l.inStore,u=l.inputUrl,p=d?(0,q.Rn)(s,n):u;Ae({meta:l,installOpts:{type:"component",rootDid:Ce.meta.did,mountPoint:e,url:p,title:t,name:o,did:a}})}()},pn=[{key:"selectComponent",name:X("blocklet.component.selectComponent"),body:(0,se.jsxs)(bt,{component:"div",children:[Le.showFromUrlDialog&&(0,se.jsx)(De,{mode:"component",onCancel:function(){$e({showFromUrlDialog:!1})},onSuccess:function(e){var n=e.meta,t=e.inputUrl,r=e.inStore,o=e.registryUrl;dn({chooseParams:{meta:n,inputUrl:t,inStore:r,registryUrl:o},isInit:!0}),$e({showFromUrlDialog:!1}),ln()},handleText:{title:X("blocklet.component.addComponentTip.fromUrl"),confirm:X("blocklet.component.choose")}}),(0,se.jsx)(Ye,{stores:C,extra:_e?null:(0,se.jsxs)(N.Z,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:function(){$e({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[(0,se.jsx)(S.Z,{style:{fontSize:20,marginRight:4}})," ",X("blocklet.component.addComponentTip.fromUrl")," "]}),loading:ee,onChange:function(){Oe({}),Ge.current={}},storageKey:U,children:function(e){var n=e.currentRegistry;return(0,se.jsx)(un,{serverVersion:null===be||void 0===be?void 0:be.version,style:He?{height:"calc(100vh - 56px - 80px - 32px - 40px )"}:{height:"calc(100% - 40px)"},storeUrl:n.url,resourceType:A,handleButtonClick:function(e){dn({chooseParams:(0,s.Z)((0,s.Z)({},e),{},{inStore:!0}),isInit:!0})},handleBlockletRender:function(e){var n=e.blocklet,t=e.defaultRender,r=(null===Le||void 0===Le?void 0:Le.bundleDid)&&(null===Le||void 0===Le?void 0:Le.bundleDid)===(null===n||void 0===n?void 0:n.did);return(0,se.jsxs)(St,{children:[r&&(0,se.jsx)("div",{className:"check-container",children:(0,se.jsx)(R.default,{className:"check-icon"})}),(0,se.jsx)("div",{className:r?"choose-blocklet":"",style:{marginLeft:16},children:t})]})}})}})]}),cancel:"embed"===Z?void 0:X("common.cancel"),confirm:xt({params:Le,blocklet:Ce,t:X}),onCancel:on,onConfirm:function(){ln()}},{key:"agreement",name:X("launchBlocklet.introduction"),body:(0,se.jsxs)(bt,{component:"div",className:"agreement-wrapper",children:[(0,se.jsx)(k.Z,{title:X("launchBlocklet.introduction"),subTitle:X("blocklet.component.addComponentTip.introduction")}),(0,se.jsx)(je,{meta:We,onClickNext:ln,handleDescEle:(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("p",{children:(0,se.jsx)("div",{dangerouslySetInnerHTML:{__html:X("blocklet.component.addComponentTip.".concat(Le.requirePurchase?"isPurchase":"isFree"),{name:nn()})}})}),(0,se.jsx)("p",{children:X("blocklet.component.addComponentTip.belowInformation")})]})})]}),cancel:X("common.pre"),confirm:X("launchBlocklet.next"),onCancel:sn,onConfirm:function(){Be(!1),ln()}},We&&Le.requirePurchase&&{key:"purchase",name:(0,se.jsxs)(se.Fragment,{children:[X("common.verifyNFT"),(0,se.jsx)(K.Z,{})]}),body:(0,se.jsxs)(bt,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(2===(null===(u=qe.current)||void 0===u||null===(p=u.getCurrentStep)||void 0===p?void 0:p.call(u))||Ue)&&(0,se.jsx)(wt,{title:X("common.verifyNFT"),subTitle:X("blocklet.component.addComponentTip.verifyNFT")}),y()(Le.purchaseResultProps)?Ee&&(0,se.jsx)(ve,{ref:qe,meta:Ee.meta,mode:Le.componentDid?"verify":"both",onCancel:function(e){Be(!1),$e({purchaseResultProps:{variant:"error",title:nn(),subTitle:e,style:{paddingTop:120},footer:(0,se.jsx)(N.Z,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:function(){$e({purchaseResultProps:{}})},children:X("common.retry")})}})},installOpts:Ee.installOpts,handlePaySuccess:function(e){var n=e.downloadTokenList;Ge.current.downloadTokenList=n,Be(!1),ln()}}):(0,se.jsx)("div",{className:"flex-align-center flex-justify-center",children:(0,se.jsx)(O.Z,(0,s.Z)({},Le.purchaseResultProps))})]}),disabled:2===(null===(f=qe.current)||void 0===f||null===(x=f.getCurrentStep)||void 0===x?void 0:x.call(f))||Ue,cancel:X("common.pre"),confirm:X("common.next"),onConfirm:function(){"function"===typeof qe.current.onNext&&(qe.current.onNext(),Be(!0))},onCancel:function(){sn()}},(0,M.hasStartEngine)(We)&&{key:"config",name:X("common.config"),error:le,body:(0,se.jsxs)(bt,{component:"div",children:[(0,se.jsx)(wt,{title:X("common.config"),subTitle:X("blocklet.component.addComponentTip.config")}),(0,se.jsx)(w.Z,{label:X("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"mount-point-input"},fullWidth:!0,helperText:me||X("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:Le.pathPrefix,onChange:function(e){var n=e.target.value;$e({pathPrefix:n}),fe(X("common.slugifyHint",{value:(0,q.LN)(n)}))}}),!!le&&(0,se.jsx)(F.Z,{type:"error",style:{width:"100%",marginTop:8},children:le})]}),cancel:X("common.pre"),confirm:X("common.next"),onCancel:sn,onConfirm:function(){ln()}},We&&(null===Le||void 0===Le?void 0:Le.hasEnvironmentsStep)&&{key:"environment",name:(0,se.jsxs)(se.Fragment,{children:[X("common.environment")," ",Le.hasRequiredEnvironments&&(0,se.jsx)(K.Z,{})]}),disabled:!!oe||(null===Le||void 0===Le?void 0:Le.hasMissRequiredConfigs),body:function(){return(0,se.jsxs)(bt,{component:"div",children:[(0,se.jsx)(wt,{title:X("common.environment"),subTitle:X("blocklet.component.addComponentTip.environment")}),(0,se.jsx)(H.Z,{style:{marginTop:-12,width:"100%"},schema:Le.configsList,defaultValue:Le.configsValue,onChange:function(e,n){var t=n.action,r=n.currentItem,o=n.allValues;"confirm"===t&&$e({hasMissRequiredConfigs:ht(Le.configsList,o),configsValue:o}),"edit"===t?ie(r):["cancel","confirm"].includes(t)&&ie(null)}})]})},cancel:X("common.pre"),confirm:X("common.next"),onCancel:sn,onConfirm:ln},We&&(null===Le||void 0===Le?void 0:Le.didSpaceCapability)&&{key:"didSpace",name:(0,se.jsxs)(se.Fragment,{children:[X("blocklet.component.didSpaceConfig")," ","required"===Le.didSpaceCapability&&(0,se.jsx)(K.Z,{})]}),disabled:"required"===Le.didSpaceCapability&&!Le.didSpaceEndpoint,body:function(){return(0,se.jsx)(Vn,{children:(0,se.jsxs)(bt,{component:"div",children:[(0,se.jsx)(wt,{title:X("blocklet.component.didSpaceConfig"),subTitle:X("blocklet.component.didSpaceConfigTip")}),(0,se.jsx)(D.Z,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:(0,se.jsx)(lt,{blockletMeta:Ge.current.meta,onNext:function(){ln()},onEndpointUpdate:en})})]})})},cancel:X("common.pre"),confirm:X("common.next"),onCancel:sn,onConfirm:ln},{key:"install",name:X("common.install"),disabled:!1,loading:!1,body:(0,se.jsx)(bt,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:y()(Le.installResultProps)?(0,se.jsx)(L.Z,{message:(0,se.jsx)(Rt,{children:X("blocklet.component.installingCanCloseWindowTip")}),increaseSpeed:.3,messageLoop:!1}):(0,se.jsx)("div",{style:{marginTop:120},children:(0,se.jsx)(O.Z,(0,s.Z)({},Le.installResultProps))})}),confirm:X("common.complete"),onConfirm:function(){gt(Ke.componentDid),on(),setTimeout((function(){var e=document.getElementsByClassName("dashboard-main")[0];e&&(e.scrollTop=e.scrollHeight)}),200)}}].filter((function(e){return e})),mn=pn[Je]||{};return Ce?(0,se.jsxs)(Zt,{sx:He?{width:"100%",height:window.innerHeight}:{width:"100%",height:z?"72vh":"100vh"},children:[(0,se.jsx)(B.W,{steps:pn,mode:"memory",children:(0,se.jsx)(vt,{ref:Qe,meta:We,isMobile:He,onStepChange:function(e){Ve(e)}})}),(0,se.jsxs)(D.Z,{className:"action-bar",children:[mn.cancel&&(0,se.jsx)(N.Z,{onClick:function(e){e.stopPropagation(),mn.onCancel()},disabled:Je===pn.length-2&&ee,color:"inherit",children:mn.cancel||X("common.cancel")}),mn.confirm&&(0,se.jsx)(N.Z,{onClick:function(e){e.stopPropagation(),mn.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:ee||("boolean"===typeof mn.disabled?mn.disabled:!(!ee&&!mn.error&&Le.bundleDid)||Je>1&&!Le.pathPrefix),variant:"contained",autoFocus:!0,title:mn.confirm,style:{marginLeft:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:(0,se.jsxs)(D.Z,{display:"flex",alignItems:"center",children:[("boolean"===typeof mn.loading?mn.loading:ee)&&(0,se.jsx)(j.Z,{style:{marginRight:8},size:16}),mn.confirm]})})]})]}):null}yt.propTypes={onClose:p().func,mode:p().oneOf(["normal","embed"]),inDialog:p().bool,stores:p().arrayOf(p().string),resourceType:p().string,storageKey:p().string},yt.defaultProps={onClose:function(){},mode:"normal",stores:[],resourceType:"",storageKey:"",inDialog:!0};var Zt=(0,A.Z)(D.Z)(et||(et=(0,r.Z)(["\n .action-bar {\n display: flex;\n justify-content: flex-end;\n position: sticky;\n bottom: 0;\n padding-top: 16px;\n z-index: 100;\n width: 100%;\n background: #fff;\n border-top: 1px solid #eee;\n }\n"]))),bt=(0,A.Z)(C.Z)(nt||(nt=(0,r.Z)(["\n width: 100%;\n height: 100%;\n"]))),kt=A.Z.div(tt||(tt=(0,r.Z)(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n\n .bottom-button {\n min-width: 200px;\n }\n\n // blocklet-select-side\n aside {\n width: 140px;\n }\n"]))),jt=function(e){return e.isMobile?"\n height: calc(100vh - 56px - 64px - 48px);\n ":""},Ct=(0,A.Z)(D.Z)(rt||(rt=(0,r.Z)(["\n ","\n\n & .flex-justify-center {\n display: flex;\n justify-content: center;\n }\n\n & .flex-align-center {\n display: flex;\n height: 100%;\n align-items: center;\n ","\n }\n\n & .agreement-wrapper {\n ","\n max-height: 60vh;\n .eula-trigger {\n padding-right: 0;\n }\n .next-button {\n display: none;\n }\n }\n\n & .connect {\n background: white;\n }\n"])),(function(e){return"mobileStyle"===e.className?"\n & > div{\n height: 100%;\n }\n .root-header {\n .app-name-content {\n display: none;\n }\n }\n\n\n\n // content-panel\n .root-header + div{\n padding-top: 0;\n position: relative;\n & > div {\n padding-top: 0;\n }\n }\n\n header + div {\n padding-top: 0;\n }\n\n header {\n .header-title {\n margin-left: 0;\n }\n\n .header-title-name {\n max-width: 100% !important;\n }\n }\n ":"\n position: relative;\n .root-header {\n z-index: auto !important;\n position: fixed !important;\n }\n & > div {\n height: 100%;\n width: 100%;\n max-width: 100%;\n & > div {\n max-height: unset !important;\n max-width: 100%;\n & > div {\n // left-panel\n &:first-child {\n padding: 0;\n width: 25%;\n min-width: 240px;\n & > div:first-child {\n display: none;\n }\n // step\n & > div:last-child {\n // margin-top: 32px;\n margin-top: 0;\n }\n }\n // right-panel\n &:last-child {\n padding-top: 0;\n padding-right: 0px;\n overflow-y: auto;\n .app-content {\n padding: 0 0 24px 0;\n }\n .button-container {\n padding-right: 0;\n }\n }\n }\n }\n }\n\n "}),(function(e){return jt(e)}),(function(e){return jt(e)})),wt=(0,A.Z)(k.Z)(ot||(ot=(0,r.Z)(["\n margin-bottom: 24px;\n"]))),St=A.Z.div(it||(it=(0,r.Z)(["\n position: relative;\n\n .choose-blocklet {\n background-color: rgb(236, 251, 253);\n border-color: rgb(236, 251, 253);\n border-radius: 8px;\n }\n\n .check-container {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: flex-end;\n width: 30px;\n height: 30px;\n border-radius: 0 0 8px 0;\n color: ",";\n overflow: hidden;\n transition: all ease 0.3s;\n &:after {\n position: absolute;\n z-index: 0;\n display: block;\n width: 0;\n height: 0;\n border-top: transparent solid 15px;\n border-left: transparent solid 15px;\n border-bottom: "," solid 15px;\n border-right: "," solid 15px;\n transition: all ease 0.1s;\n content: '';\n }\n\n .check-icon {\n position: relative;\n z-index: 2;\n margin: 0 1px 1px 0;\n font-size: 16px;\n transition: all ease 0.2s;\n }\n }\n"])),(function(e){return e.theme.palette.common.white}),(function(e){return e.theme.palette.primary.main}),(function(e){return e.theme.palette.primary.main})),Rt=A.Z.div(at||(at=(0,r.Z)(["\n color: ",";\n .msg-before {\n display: inline-block;\n color: #aaa;\n font-size: 14px;\n margin-right: 6px;\n }\n"])),(function(e){return e.theme.palette.primary.main}))},52654:function(e,n,t){"use strict";t.d(n,{Rw:function(){return d},fX:function(){return s},sf:function(){return u}});var r=t(20244),o=t(60966),i=t.n(o),a=t(59505),c=t(22351),l=function(e,n){if(e.type===r.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error("".concat(n("router.validation.redirectUrlRequired")));if(!e.redirectCode)return new Error("redirect ".concat(n("router.validation.redirectCodeRequired")))}else if(e.type===r.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(n("router.validation.didRequired"));return null},s=function(e,n){var t=l(e,n);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(n("router.validation.pathPrefixTooLong",{length:150})):null:new Error(n("router.validation.pathPrefixCannotBeEmpty")))},d=function(e){var n=e.params,t=e.blocklets,r=e.blocklet,o=e.locale,l=void 0===o?"en":o;if(r){var s=(r.children||[]).find((function(e){return(0,c.default)(e.meta)&&i()(e.mountPoint,n.pathPrefix)}));if("gateway"!==r.meta.group&&"/"===n.pathPrefix&&(s="/"),s)return{zh:"\u6302\u8f7d\u70b9 ".concat(n.pathPrefix," \u5df2\u5b58\u5728\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6302\u8f7d\u70b9"),en:"The mount point ".concat(n.pathPrefix," already exist, please use another mount point")}[l]}var d=t.find((function(e){return e.meta.did===n.did}));if(!d)return"";var u=d.meta.interfaces.find((function(e){return"web"===e.type}));return u&&u.prefix!==a.BLOCKLET_DYNAMIC_PATH_PREFIX&&n.pathPrefix!==u.prefix?{zh:"\u8be5 blocklet \u53ea\u80fd\u6302\u8f7d\u5728 ".concat(u.prefix),en:"This blocklet can only be mounted on ".concat(u.prefix)}[l]:""},u=function(e){if(!e||"string"!==typeof e)return e;var n=e.trim();try{return(n=n.toLowerCase()).startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n}catch(t){return console.error("format domain failed",t),n}}},73820:function(e,n,t){"use strict";t.d(n,{Z:function(){return p}});var r=t(33028),o=t(59740),i=t(30969),a=t(24974),c=t.n(a),l=t(99631),s=t(26022),d=t(37574),u=["children"];function p(e){var n=e.children,t=(0,o.Z)(e,u),a=(0,i.useContext)(s.RD).t;return(0,d.jsx)(l.Z,(0,r.Z)((0,r.Z)({tip:a("common.copyTip"),copiedTip:a("common.copiedTip")},t),{},{children:n}))}p.propTypes={children:c().any.isRequired}},25371:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var r=t(33028),o=t(24974),i=t.n(o),a=t(33359),c=t(87006),l=t(18877),s=t(26022),d=t(73820),u=t(8479),p=t(37574);function m(e){var n=e.title,t=e.description,o=e.confirmPlaceholder,i=e.cancel,m=e.confirm,f=e.params,h=e.onCancel,x=e.onConfirm,v=e.keyName,g=(0,s.PE)().t,y={title:function(){return(0,p.jsxs)("div",{children:[n," (".concat(v,")")]})},description:function(e,n){return(0,p.jsxs)("div",{children:[(0,p.jsx)(l.Z,{severity:"warning",style:{width:"100%"},children:g("common.notice")}),(0,p.jsx)("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:t}}),(0,p.jsxs)("div",{style:{marginBottom:24},children:[g("common.click"),"\uff1a",(0,p.jsx)(d.Z,{"data-cy":"click-copy",children:v})]}),(0,p.jsx)(a.Z,{component:"div",children:(0,p.jsx)(c.Z,{label:o,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:e.inputVal,onChange:function(t){var o;o=(0,r.Z)((0,r.Z)({},e),{},{inputVal:t.target.value,__disableConfirm:v!==t.target.value}),n((0,r.Z)((0,r.Z)({},o),{},{__disableConfirm:o.__disableConfirm}))}})})]})},confirm:m,cancel:i,onConfirm:x,onCancel:h,params:(0,r.Z)({inputVal:"",__disableConfirm:!0},f)};return(0,p.jsx)(u.Z,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})}m.propTypes={title:i().any.isRequired,keyName:i().any.isRequired,description:i().any.isRequired,confirmPlaceholder:i().any.isRequired,cancel:i().string,confirm:i().string,params:i().object,onCancel:i().func,onConfirm:i().func.isRequired},m.defaultProps={onCancel:function(){},cancel:"",confirm:"Confirm",params:{}}},7768:function(e,n,t){"use strict";t.d(n,{K_:function(){return r},WC:function(){return o},fx:function(){return i}});var r="blocklet-add-component-registry",o="server-add-registry",i=function(e){return"resource-".concat(e,"-add-registry")}}}]);
2
+ //# sourceMappingURL=9194.8e4efb4f.chunk.js.map