@abtnode/blocklet-services 1.16.18-beta-aa01bd8e → 1.16.18-beta-bb4ebacc

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 (97) hide show
  1. package/api/index.js +1 -7
  2. package/api/routes/env.js +4 -2
  3. package/api/services/auth/index.js +77 -13
  4. package/api/services/auth/session.js +48 -1
  5. package/api/services/notification/blocklet-events-notifier.js +1 -0
  6. package/api/socket/channel/component.js +6 -5
  7. package/api/socket/channel/did.js +51 -20
  8. package/api/socket/util.js +1 -0
  9. package/build/asset-manifest.json +99 -87
  10. package/build/index.html +1 -1
  11. package/build/service-worker.js +1 -1
  12. package/build/service-worker.js.map +1 -1
  13. package/build/static/css/{4448.de9040c4.chunk.css → 1233.dba37e64.chunk.css} +1 -1
  14. package/build/static/js/{1148.e614f706.chunk.js → 1148.5ccba08e.chunk.js} +2 -2
  15. package/build/static/js/{4448.f0c62086.chunk.js → 1233.276cf2d0.chunk.js} +3 -3
  16. package/build/static/js/{4448.f0c62086.chunk.js.LICENSE.txt → 1233.276cf2d0.chunk.js.LICENSE.txt} +6 -0
  17. package/build/static/js/2653.980158ea.chunk.js +2 -0
  18. package/build/static/js/2664.da443f31.chunk.js +2 -0
  19. package/build/static/js/2801.33d2f238.chunk.js +2 -0
  20. package/build/static/js/2940.ce32ab3f.chunk.js +2 -0
  21. package/build/static/js/3025.7c99c058.chunk.js +2 -0
  22. package/build/static/js/{3033.6623d19d.chunk.js → 3033.9fe46d7f.chunk.js} +2 -2
  23. package/build/static/js/{3131.672170fb.chunk.js → 3131.99541aca.chunk.js} +2 -2
  24. package/build/static/js/3430.dc830483.chunk.js +2 -0
  25. package/build/static/js/{3688.48e7b69c.chunk.js → 3688.679796d1.chunk.js} +2 -2
  26. package/build/static/js/3708.7e2ad66b.chunk.js +3 -0
  27. package/build/static/js/3842.e1bb702b.chunk.js +3 -0
  28. package/build/static/js/3953.ddf8be86.chunk.js +2 -0
  29. package/build/static/js/{4023.a2e9db00.chunk.js → 4023.5fe8180a.chunk.js} +2 -2
  30. package/build/static/js/4076.5ca97365.chunk.js +2 -0
  31. package/build/static/js/4160.e45b5ba1.chunk.js +2 -0
  32. package/build/static/js/4587.9a042d46.chunk.js +2 -0
  33. package/build/static/js/4802.217e3956.chunk.js +2 -0
  34. package/build/static/js/5070.31a74ba7.chunk.js +2 -0
  35. package/build/static/js/5468.b54ce65b.chunk.js +2 -0
  36. package/build/static/js/5547.d68bfde3.chunk.js +3 -0
  37. package/build/static/js/556.e1875260.chunk.js +3 -0
  38. package/build/static/js/6032.1001afd3.chunk.js +2 -0
  39. package/build/static/js/{6139.5867193a.chunk.js → 6139.161b2e7f.chunk.js} +2 -2
  40. package/build/static/js/6218.9a4feced.chunk.js +2 -0
  41. package/build/static/js/{6658.090d923f.chunk.js → 6658.98f9956d.chunk.js} +2 -2
  42. package/build/static/js/{716.9c76ad65.chunk.js → 716.e68425d7.chunk.js} +3 -3
  43. package/build/static/js/716.e68425d7.chunk.js.LICENSE.txt +5 -0
  44. package/build/static/js/7305.465df4a1.chunk.js +2 -0
  45. package/build/static/js/7313.b53b59d8.chunk.js +2 -0
  46. package/build/static/js/779.73350f02.chunk.js +2 -0
  47. package/build/static/js/7858.52930f63.chunk.js +2 -0
  48. package/build/static/js/8016.3ef64a2c.chunk.js +2 -0
  49. package/build/static/js/{8181.86477cc5.chunk.js → 8181.6c2a7dcb.chunk.js} +2 -2
  50. package/build/static/js/8393.ea7ef05d.chunk.js +2 -0
  51. package/build/static/js/840.5bc210dd.chunk.js +2 -0
  52. package/build/static/js/{8622.66a81bc0.chunk.js → 8622.ebd44812.chunk.js} +2 -2
  53. package/build/static/js/8641.bec13444.chunk.js +2 -0
  54. package/build/static/js/8702.bb84d009.chunk.js +2 -0
  55. package/build/static/js/{8792.8b009f81.chunk.js → 8792.0f55707c.chunk.js} +2 -2
  56. package/build/static/js/8944.559ade67.chunk.js +2 -0
  57. package/build/static/js/9033.ebf65926.chunk.js +2 -0
  58. package/build/static/js/9107.7f32925d.chunk.js +2 -0
  59. package/build/static/js/9314.f0add972.chunk.js +2 -0
  60. package/build/static/js/{9596.5251398b.chunk.js → 9596.a4eead04.chunk.js} +2 -2
  61. package/build/static/js/9865.d5dfa72b.chunk.js +2 -0
  62. package/build/static/js/{9900.cce3f786.chunk.js → 9900.3b72165e.chunk.js} +2 -2
  63. package/build/static/js/main.36b0deea.js +3 -0
  64. package/package.json +27 -26
  65. package/build/static/js/1343.69031e0b.chunk.js +0 -2
  66. package/build/static/js/1581.ed4544c6.chunk.js +0 -2
  67. package/build/static/js/2026.514f995a.chunk.js +0 -2
  68. package/build/static/js/2362.ab5308a8.chunk.js +0 -2
  69. package/build/static/js/2506.dd9284b6.chunk.js +0 -2
  70. package/build/static/js/2653.6610534f.chunk.js +0 -2
  71. package/build/static/js/2972.2d5268c3.chunk.js +0 -2
  72. package/build/static/js/3025.aa129833.chunk.js +0 -2
  73. package/build/static/js/3038.40d611d1.chunk.js +0 -2
  74. package/build/static/js/3683.6f169a32.chunk.js +0 -2
  75. package/build/static/js/3920.5c63a2b9.chunk.js +0 -3
  76. package/build/static/js/4076.bcc72fcc.chunk.js +0 -2
  77. package/build/static/js/4247.c25f1945.chunk.js +0 -2
  78. package/build/static/js/4587.906e3023.chunk.js +0 -2
  79. package/build/static/js/4716.a8a5b75d.chunk.js +0 -2
  80. package/build/static/js/4764.51208c0d.chunk.js +0 -2
  81. package/build/static/js/4802.cd83ecef.chunk.js +0 -2
  82. package/build/static/js/5547.8447edf9.chunk.js +0 -3
  83. package/build/static/js/556.4d5cc702.chunk.js +0 -3
  84. package/build/static/js/6032.48c0a152.chunk.js +0 -2
  85. package/build/static/js/7050.3281ad5f.chunk.js +0 -2
  86. package/build/static/js/779.383b4b4a.chunk.js +0 -2
  87. package/build/static/js/7858.4e5b7c88.chunk.js +0 -2
  88. package/build/static/js/8702.2d858942.chunk.js +0 -2
  89. package/build/static/js/8944.07bcf75f.chunk.js +0 -2
  90. package/build/static/js/8983.19b79a23.chunk.js +0 -2
  91. package/build/static/js/9880.13ac9520.chunk.js +0 -2
  92. package/build/static/js/main.63103d24.js +0 -3
  93. /package/build/static/js/{3920.5c63a2b9.chunk.js.LICENSE.txt → 3708.7e2ad66b.chunk.js.LICENSE.txt} +0 -0
  94. /package/build/static/js/{716.9c76ad65.chunk.js.LICENSE.txt → 3842.e1bb702b.chunk.js.LICENSE.txt} +0 -0
  95. /package/build/static/js/{5547.8447edf9.chunk.js.LICENSE.txt → 5547.d68bfde3.chunk.js.LICENSE.txt} +0 -0
  96. /package/build/static/js/{556.4d5cc702.chunk.js.LICENSE.txt → 556.e1875260.chunk.js.LICENSE.txt} +0 -0
  97. /package/build/static/js/{main.63103d24.js.LICENSE.txt → main.36b0deea.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[840],{18877:function(e,t,r){r.d(t,{Z:function(){return I}});var o=r(56666),a=r(31461),n=r(7896),l=r(30969),i=r(87023),s=r(26540),c=r(74262),d=r(45971),u=r(17363),v=r(24099),p=r(46672),f=r(62746),m=r(2975);function g(e){return(0,m.Z)("MuiAlert",e)}var h=(0,f.Z)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),Z=r(94551),x=r(17469),A=r(37574),S=(0,x.Z)((0,A.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),C=(0,x.Z)((0,A.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),M=(0,x.Z)((0,A.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),b=(0,x.Z)((0,A.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),y=r(42571),j=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],k=(0,d.ZP)(p.Z,{name:"MuiAlert",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.variant],t["".concat(r.variant).concat((0,v.Z)(r.color||r.severity))]]}})((function(e){var t=e.theme,r=e.ownerState,a="light"===t.palette.mode?c._j:c.$n,l="light"===t.palette.mode?c.$n:c._j,i=r.color||r.severity;return(0,n.Z)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},i&&"standard"===r.variant&&(0,o.Z)({color:t.vars?t.vars.palette.Alert["".concat(i,"Color")]:a(t.palette[i].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(i,"StandardBg")]:l(t.palette[i].light,.9)},"& .".concat(h.icon),t.vars?{color:t.vars.palette.Alert["".concat(i,"IconColor")]}:{color:t.palette[i].main}),i&&"outlined"===r.variant&&(0,o.Z)({color:t.vars?t.vars.palette.Alert["".concat(i,"Color")]:a(t.palette[i].light,.6),border:"1px solid ".concat((t.vars||t).palette[i].light)},"& .".concat(h.icon),t.vars?{color:t.vars.palette.Alert["".concat(i,"IconColor")]}:{color:t.palette[i].main}),i&&"filled"===r.variant&&(0,n.Z)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(i,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(i,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[i].dark:t.palette[i].main,color:t.palette.getContrastText(t.palette[i].main)}))})),w=(0,d.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:function(e,t){return t.icon}})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),z=(0,d.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:function(e,t){return t.message}})({padding:"8px 0",minWidth:0,overflow:"auto"}),R=(0,d.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:function(e,t){return t.action}})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),P={success:(0,A.jsx)(S,{fontSize:"inherit"}),warning:(0,A.jsx)(C,{fontSize:"inherit"}),error:(0,A.jsx)(M,{fontSize:"inherit"}),info:(0,A.jsx)(b,{fontSize:"inherit"})},I=l.forwardRef((function(e,t){var r,o,l,c,d,p,f=(0,u.Z)({props:e,name:"MuiAlert"}),m=f.action,h=f.children,x=f.className,S=f.closeText,C=void 0===S?"Close":S,M=f.color,b=f.components,I=void 0===b?{}:b,L=f.componentsProps,N=void 0===L?{}:L,_=f.icon,B=f.iconMapping,D=void 0===B?P:B,F=f.onClose,H=f.role,O=void 0===H?"alert":H,W=f.severity,E=void 0===W?"success":W,T=f.slotProps,V=void 0===T?{}:T,q=f.slots,$=void 0===q?{}:q,G=f.variant,J=void 0===G?"standard":G,K=(0,a.Z)(f,j),Q=(0,n.Z)({},f,{color:M,severity:E,variant:J}),U=function(e){var t=e.variant,r=e.color,o=e.severity,a=e.classes,n={root:["root","".concat(t).concat((0,v.Z)(r||o)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,s.Z)(n,g,a)}(Q),X=null!=(r=null!=(o=$.closeButton)?o:I.CloseButton)?r:Z.Z,Y=null!=(l=null!=(c=$.closeIcon)?c:I.CloseIcon)?l:y.Z,ee=null!=(d=V.closeButton)?d:N.closeButton,te=null!=(p=V.closeIcon)?p:N.closeIcon;return(0,A.jsxs)(k,(0,n.Z)({role:O,elevation:0,ownerState:Q,className:(0,i.Z)(U.root,x),ref:t},K,{children:[!1!==_?(0,A.jsx)(w,{ownerState:Q,className:U.icon,children:_||D[E]||P[E]}):null,(0,A.jsx)(z,{ownerState:Q,className:U.message,children:h}),null!=m?(0,A.jsx)(R,{ownerState:Q,className:U.action,children:m}):null,null==m&&F?(0,A.jsx)(R,{ownerState:Q,className:U.action,children:(0,A.jsx)(X,(0,n.Z)({size:"small","aria-label":C,title:C,color:"inherit",onClick:F},ee,{children:(0,A.jsx)(Y,(0,n.Z)({fontSize:"small"},te))}))}):null]}))}))},59467:function(e,t,r){r.d(t,{Z:function(){return S}});var o=r(96234),a=r(31461),n=r(7896),l=r(30969),i=r(87023),s=r(26540),c=r(45971),d=r(17363),u=r(17469),v=r(37574),p=(0,u.Z)((0,v.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person"),f=r(62746),m=r(2975);function g(e){return(0,m.Z)("MuiAvatar",e)}(0,f.Z)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);var h=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],Z=(0,c.ZP)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})((function(e){var t=e.theme,r=e.ownerState;return(0,n.Z)({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},"rounded"===r.variant&&{borderRadius:(t.vars||t).shape.borderRadius},"square"===r.variant&&{borderRadius:0},r.colorDefault&&(0,n.Z)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:{backgroundColor:"light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[600]}))})),x=(0,c.ZP)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:function(e,t){return t.img}})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),A=(0,c.ZP)(p,{name:"MuiAvatar",slot:"Fallback",overridesResolver:function(e,t){return t.fallback}})({width:"75%",height:"75%"});var S=l.forwardRef((function(e,t){var r=(0,d.Z)({props:e,name:"MuiAvatar"}),c=r.alt,u=r.children,p=r.className,f=r.component,m=void 0===f?"div":f,S=r.imgProps,C=r.sizes,M=r.src,b=r.srcSet,y=r.variant,j=void 0===y?"circular":y,k=(0,a.Z)(r,h),w=null,z=function(e){var t=e.crossOrigin,r=e.referrerPolicy,a=e.src,n=e.srcSet,i=l.useState(!1),s=(0,o.Z)(i,2),c=s[0],d=s[1];return l.useEffect((function(){if(a||n){d(!1);var e=!0,o=new Image;return o.onload=function(){e&&d("loaded")},o.onerror=function(){e&&d("error")},o.crossOrigin=t,o.referrerPolicy=r,o.src=a,n&&(o.srcset=n),function(){e=!1}}}),[t,r,a,n]),c}((0,n.Z)({},S,{src:M,srcSet:b})),R=M||b,P=R&&"error"!==z,I=(0,n.Z)({},r,{colorDefault:!P,component:m,variant:j}),L=function(e){var t=e.classes,r={root:["root",e.variant,e.colorDefault&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,s.Z)(r,g,t)}(I);return w=P?(0,v.jsx)(x,(0,n.Z)({alt:c,srcSet:b,src:M,sizes:C,ownerState:I,className:L.img},S)):null!=u?u:R&&c?c[0]:(0,v.jsx)(A,{ownerState:I,className:L.fallback}),(0,v.jsx)(Z,(0,n.Z)({as:m,ownerState:I,className:(0,i.Z)(L.root,p),ref:t},k,{children:w}))}))},42571:function(e,t,r){r(30969);var o=r(17469),a=r(37574);t.Z=(0,o.Z)((0,a.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")}}]);
2
+ //# sourceMappingURL=840.5bc210dd.chunk.js.map
@@ -1,2 +1,2 @@
1
- (self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8622],{8622:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return he}});var t,r=i(71171),o=i(33028),a=i(32723),c=i(34795),s=i(30969),l=i(16380),p=i(30734),u=i(24974),v=i.n(u),d=i(54164),f=i(94308),h=i(20003),m=i(96234),g=i(26022),x=i(50496),_=i(17469),w=i(37574),y=(0,_.Z)((0,w.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");function j(e){var n=e.invitation,i=e.createPassportSvg,t=e.passportColor,r=(0,s.useState)(!1),o=(0,m.Z)(r,2),a=o[0],c=o[1],l=(0,s.useContext)(g.RD).t,p=(0,s.useMemo)((function(){return(n.role.title||n.role.name).toUpperCase()}),[n.role.title,n.role.name]),u=(0,s.useMemo)((function(){return i({title:p,issuer:n.info.name,issuerDid:n.info.appDid,ownerName:"Your Name",ownerDid:n.info.appDid,preferredColor:n.info.passportColor||t})}),[n,p]),v=(0,s.useCallback)((function(){c(!0)}),[]),d=(0,s.useCallback)((function(){c(!1)}),[]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Z,{children:(0,w.jsx)("div",{className:"invite-passport__card",onClick:v,children:(0,w.jsx)("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),(0,w.jsx)(x.ZP,{open:a,title:l("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:d,children:n.role.permissions&&n.role.permissions.length>0?(0,w.jsx)("ul",{style:{listStyle:"circle",padding:"0 20px"},children:n.role.permissions.map((function(e){return(0,w.jsx)("li",{style:{listStyle:"circle"},children:e.description},e.name)}))}):(0,w.jsxs)("div",{style:{color:"#999",textAlign:"center"},children:[(0,w.jsx)(y,{style:{width:"30px",height:"30px"}}),(0,w.jsx)("div",{children:l("invite.emptyPermission")})]})})]})}j.propTypes={invitation:v().object.isRequired,createPassportSvg:v().func.isRequired,passportColor:v().string},j.defaultProps={passportColor:"auto"};var b,Z=l.Z.div(t||(t=(0,r.Z)(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),k=j,z=i(17323),S=i(85300),P=i(19611),C=i.n(P),N=i(24891),R=i(86776),I=i(77370);function O(e){var n,i,t,r=e.invitation,o=e.onLogin,a=e.onReceive,c=e.inService,l=(0,g.PE)(),p=l.t,u=l.locale,v=(0,I.T)().connectApi,d=(0,R.Z)().getPassportId;"undefined"!==typeof window&&(n=null===(i=window)||void 0===i||null===(t=i.blocklet)||void 0===t?void 0:t.componentId);var f={passportId:d(),inviteId:r.inviteId,baseUrl:window.location.origin,componentId:n},h=(0,s.useCallback)((function(){v.close()}),[v]),m=(0,s.useCallback)((function(){v.close(),o.apply(void 0,arguments)}),[o,v]),x=(0,s.useCallback)((function(){"function"!==typeof a?c?v.openPopup({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:u,extraParams:f,baseUrl:window.location.origin,prefix:C()(window.location.origin,S.Bu,S.nC),messages:{title:p("receive.dialog.title"),scan:p("receive.dialog.scan"),confirm:p("receive.dialog.confirm"),success:p("receive.dialog.success")},onSuccess:m,onClose:h},{locale:u}):v.open({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:u,extraParams:f,messages:{title:p("receive.dialog.title"),scan:p("receive.dialog.scan"),confirm:p("receive.dialog.confirm"),success:p("receive.dialog.success")},onSuccess:m,onClose:h}):a()}),[v.openPopup]);return(0,w.jsxs)(L,{children:[(0,w.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:x,children:p("invite.receive")}),(0,w.jsxs)("div",{className:"invite-receive__until",children:[p("invite.validUntil"),(0,N.o0)(r.expireDate,u)]})]})}O.propTypes={invitation:v().object.isRequired,onLogin:v().func,onReceive:v().func,inService:v().bool},O.defaultProps={onLogin:function(){},onReceive:null,inService:!1};var M,L=l.Z.div(b||(b=(0,r.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),H=O;function T(e){var n=e.onLogin,i=(0,g.PE)().t;return(0,w.jsx)(E,{children:(0,w.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:function(){return n()},children:i("common.connect")})})}T.propTypes={onLogin:v().func},T.defaultProps={onLogin:function(){}};var V,E=l.Z.div(M||(M=(0,r.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),D=T,q=i(62399);function F(e){var n=e.invitation,i=(0,g.PE)().t,t=(0,s.useMemo)((function(){return(n.role.title||n.role.name).toUpperCase()}),[n.role.title,n.role.name]),r=(0,s.useMemo)((function(){return i("invite.message",{name:"{{name}}",role:t,dapp:"{{dapp}}"})}),[i,t]),o=(0,N.E8)(n.info.chainHost,n.inviter.did,"account"),a=(0,N.Zp)(r,{name:function(){return o?(0,w.jsx)("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:n.inviter.fullName},"name"):n.inviter.fullName},dapp:function(){return(0,w.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")}});return(0,w.jsxs)(U,{children:[(0,w.jsx)(q.Z,{did:n.inviter.did,src:encodeURI(n.inviter.avatar),size:80,shape:"circle",variant:"circle"}),(0,w.jsx)("div",{className:"invite-user__message",children:a})]})}F.propTypes={invitation:v().object.isRequired};var B,U=l.Z.div(V||(V=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),J=F,A=i(38361),W=i(82774);function K(e){var n=e.invitation,i=e.type,t=(0,g.PE)().t,r=(0,s.useMemo)((function(){return t("invite.success",{dapp:"{{dapp}}"})}),[t]),o=(0,N.E8)(n.info.chainHost,n.inviter.did,"account"),a="receiver"===i?n.receiver:n.inviter,c=(0,N.Zp)(r,{name:function(){return o?(0,w.jsx)("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:a.fullName},"name"):a.fullName},dapp:function(){return(0,w.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")}});return(0,w.jsxs)(Y,{children:[(0,w.jsx)(A.Z,{pt:1,color:"success.main",children:(0,w.jsx)(W.Z,{style:{fontSize:80}})}),(0,w.jsx)("div",{className:"invite-user__message",children:c})]})}K.propTypes={invitation:v().object.isRequired,type:v().oneOf("inviter","receiver")},K.defaultProps={type:"inviter"};var X,Y=l.Z.div(B||(B=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),G=K,Q=i(59740),$=["invitation"];function ee(e){var n=e.invitation,i=(0,Q.Z)(e,$);return(0,w.jsxs)(ie,(0,o.Z)((0,o.Z)({},i),{},{children:[(0,w.jsx)(q.Z,{did:n.info.did,src:n.info.logo,style:{flexShrink:0}}),(0,w.jsxs)("div",{className:"invite-app__content",children:[(0,w.jsx)("div",{className:"invite-app__title",children:n.info.name}),(0,w.jsx)("div",{className:"invite-app__description",children:n.info.description})]})]}))}ee.propTypes={invitation:v().object.isRequired};var ne,ie=l.Z.div(X||(X=(0,r.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n .invite-app__content {\n flex: 1;\n margin: 0 12px;\n font-weight: 700;\n overflow: hidden;\n }\n .invite-app__title {\n line-height: 1;\n margin-bottom: 2px;\n overflow: hidden;\n }\n .invite-app__description {\n font-size: 12px;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 1.3em;\n color: #999;\n overflow: hidden;\n }\n"]))),te=ee,re=i(85752);function oe(e){var n,i,t=e.getDataFn,r=e.passportColor,o=e.createPassportSvg,a=e.onLoginSuccess,c=e.checkFn,s=e.onReceive,l=e.inService,p=(0,d.Z)(t);if(p.loading)return(0,w.jsx)(f.Z,{});if(p.error)return(0,w.jsx)(h.Z,{status:"404",title:null===(n=p.error)||void 0===n||null===(i=n.response)||void 0===i?void 0:i.data,description:""});var u="success"===p.data.status,v=u?G:J,m=u?D:H;return(0,w.jsxs)(ce,{className:"page-invite__wrapper",children:[(0,w.jsx)(te,{invitation:p.data}),(0,w.jsxs)("div",{className:"page-invite__card",children:[(0,w.jsx)(v,{invitation:p.data}),(0,w.jsx)(k,{invitation:p.data,createPassportSvg:o,passportColor:r}),(0,w.jsx)(m,{invitation:p.data,onLogin:a,checkFn:c,onReceive:s,inService:l})]})]})}oe.propTypes={getDataFn:v().func.isRequired,checkFn:v().func.isRequired,createPassportSvg:v().func.isRequired,onLoginSuccess:v().func,onReceive:v().func,passportColor:v().string,inService:v().bool},oe.defaultProps={onLoginSuccess:function(){},passportColor:"auto",onReceive:null,inService:!1};var ae,ce=l.Z.div(ne||(ne=(0,r.Z)(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"]))),se=(0,re.Z)(oe),le=i(32263),pe=i(20244),ue=i(99042),ve=i(38507),de=i(4485);var fe=l.Z.div(ae||(ae=(0,r.Z)(["\n width: 100vw;\n height: 100%;\n min-height: 100vh;\n display: flex;\n justify-content: center;\n background-color: #f6f8fa;\n overflow: auto;\n padding: 20px;\n"]))),he=function(e){var n=(0,p.useNavigate)(),i=new URL(window.location.href).searchParams,t=(0,de.Tt)(),r=t.api,l=t.session,u=i.get("inviteId"),v=i.get("redirect"),d=(0,s.useCallback)((0,c.Z)((0,a.Z)().mark((function e(){var n,i;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ue.Z.get("invitation",{params:{inviteId:u}});case 2:return n=e.sent,i=n.data,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)}))),[u]),f=(0,s.useCallback)(function(){var e=(0,c.Z)((0,a.Z)().mark((function e(i){var t,r=arguments;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>1&&void 0!==r[1]?r[1]:function(e){return e},i&&((0,ve.ZB)(t(i.sessionToken)),(0,ve.zI)(t(i.refreshToken)),i.visitorId&&(0,le.IA)(t(i.visitorId))),e.next=4,l.refresh();case 4:setTimeout((function(){if(v){var e=decodeURIComponent(v);e.startsWith(pe.WELLKNOWN_SERVICE_PATH_PREFIX)?n(e,{replace:!0}):window.location=e}else window.location=window.env.pathPrefix||"/"}),50);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),[]);return(0,w.jsx)(fe,{className:"page-invite",children:(0,w.jsx)(se,(0,o.Z)((0,o.Z)({},e),{},{getDataFn:d,checkFn:r.get,createPassportSvg:ve.Ju,onLoginSuccess:f,inService:!0}))})}},77370:function(e,n,i){"use strict";i.d(n,{B:function(){return r.B3},T:function(){return o}});var t=i(30969),r=i(82972);function o(){return(0,t.useContext)(r.B3)}},86776:function(e,n,i){"use strict";i.d(n,{Z:function(){return o}});var t=i(96234),r=i(17708);function o(){var e=(0,r.Z)("passportId",""),n=(0,t.Z)(e,3),i=n[0],o=n[1],a=n[2];return{getPassportId:function(){return setTimeout((function(){a()}),0),i||""},setPassportId:o}}},19477:function(e,n,i){var t=i(2717),r=i(37095),o=i(93113);e.exports={translations:{zh:t(o),en:t(r)}}},85752:function(e,n,i){"use strict";i.d(n,{Z:function(){return c}});var t=i(33028),r=i(26022),o=i(19477),a=i(37574);function c(e){return function(n){return(0,a.jsx)(r.Iw,{translations:o.translations,children:(0,a.jsx)(e,(0,t.Z)({},n))})}}},17323:function(e,n,i){"use strict";i.d(n,{Z:function(){return u}});var t=i(33028),r=i(59740),o=i(24974),a=i.n(o),c=i(29996),s=i(82969),l=i(37574),p=["children"];function u(e){var n=e.children,i=(0,r.Z)(e,p);return(0,l.jsxs)(c.Z,(0,t.Z)((0,t.Z)({color:"did",variant:"contained"},i),{},{children:[(0,l.jsx)("span",{style:{fontWeight:400},children:n||"Continue With"}),(0,l.jsx)(s.Z,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]}))}u.propTypes={children:a().any},u.defaultProps={children:""}},82969:function(e,n,i){"use strict";n.Z=void 0;(t=i(30969))&&t.__esModule;var t,r=i(37574);function o(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function a(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?o(Object(i),!0).forEach((function(n){c(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function c(e,n,i){return(n=function(e){var n=function(e,n){if("object"!==typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var t=i.call(e,n||"default");if("object"!==typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===typeof n?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}var s=function(e){return(0,r.jsxs)("svg",a(a({},e),{},{children:[(0,r.jsx)("path",{d:"M24.604 2.263L28.524 0H42.79v41.862H28.79a1 1 0 0 1-.5-.134l-15.103-8.72V8.854l1.817-1.05 3.2 1.848-1.817 1.05V31.16l12.993 7.502H39.59V3.2H29.38l-1.576.91-3.2-1.847z"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.402 31.16V10.701L13.409 3.2H3.2v35.462h10.21l1.58-.913 3.2 1.847-3.923 2.266H0V0h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z"}),(0,r.jsx)("path",{d:"M138.44 27.684c.192 0 .357.075.496.224l1.344 1.472a9.584 9.584 0 0 1-3.44 2.576c-1.344.608-2.965.912-4.864.912-1.664 0-3.173-.288-4.528-.864a10.056 10.056 0 0 1-3.456-2.416c-.949-1.035-1.685-2.272-2.208-3.712-.523-1.44-.784-3.024-.784-4.752 0-1.728.272-3.312.816-4.752.555-1.44 1.328-2.677 2.32-3.712a10.444 10.444 0 0 1 3.552-2.416c1.387-.576 2.917-.864 4.592-.864 1.632 0 3.083.267 4.352.8a10.973 10.973 0 0 1 3.312 2.128l-1.12 1.584a.936.936 0 0 1-.288.288.742.742 0 0 1-.432.112c-.203 0-.443-.101-.72-.304a8.802 8.802 0 0 0-1.072-.672c-.437-.256-.981-.485-1.632-.688-.651-.203-1.461-.304-2.432-.304-1.141 0-2.187.203-3.136.608a6.885 6.885 0 0 0-2.464 1.728c-.683.747-1.216 1.67-1.6 2.768-.373 1.088-.56 2.32-.56 3.696 0 1.397.197 2.64.592 3.728.395 1.088.939 2.01 1.632 2.768a6.914 6.914 0 0 0 2.448 1.728 7.764 7.764 0 0 0 3.04.592c.661 0 1.253-.037 1.776-.112a7.843 7.843 0 0 0 1.456-.368c.448-.16.869-.363 1.264-.608a8.89 8.89 0 0 0 1.168-.912c.085-.075.176-.133.272-.176a.616.616 0 0 1 .304-.08zM149.68 16.1c1.195 0 2.272.197 3.232.592a6.54 6.54 0 0 1 2.464 1.68c.683.725 1.205 1.605 1.568 2.64.363 1.024.544 2.176.544 3.456 0 1.28-.181 2.437-.544 3.472-.363 1.035-.885 1.915-1.568 2.64a6.795 6.795 0 0 1-2.464 1.68c-.96.384-2.037.576-3.232.576-1.205 0-2.293-.192-3.264-.576a6.987 6.987 0 0 1-2.464-1.68c-.683-.725-1.211-1.605-1.584-2.64-.363-1.035-.544-2.192-.544-3.472 0-1.28.181-2.432.544-3.456.373-1.035.901-1.915 1.584-2.64a6.717 6.717 0 0 1 2.464-1.68c.971-.395 2.059-.592 3.264-.592zm0 14.304c1.536 0 2.683-.517 3.44-1.552.757-1.035 1.136-2.49 1.136-4.368 0-1.877-.379-3.333-1.136-4.368-.757-1.045-1.904-1.568-3.44-1.568-1.557 0-2.72.523-3.488 1.568-.757 1.035-1.136 2.49-1.136 4.368 0 1.877.379 3.333 1.136 4.368.768 1.035 1.931 1.552 3.488 1.552zM163.899 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.442 6.442 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448.682.299 1.253.72 1.712 1.264.458.533.805 1.179 1.04 1.936.234.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.534-.65-1.35-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.38 7.38 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM181.805 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.448 6.448 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448a4.63 4.63 0 0 1 1.712 1.264c.459.533.805 1.179 1.04 1.936.235.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.533-.65-1.349-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.396 7.396 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM207.551 22.676c0-.619-.09-1.19-.272-1.712a3.77 3.77 0 0 0-.768-1.36 3.521 3.521 0 0 0-1.248-.896c-.49-.213-1.056-.32-1.696-.32-1.312 0-2.346.379-3.104 1.136-.746.757-1.221 1.808-1.424 3.152h8.512zm2.576 7.616a6.311 6.311 0 0 1-1.328 1.168 7.926 7.926 0 0 1-1.6.784 9.664 9.664 0 0 1-1.76.448c-.597.096-1.189.144-1.776.144-1.12 0-2.16-.187-3.12-.56a7.159 7.159 0 0 1-2.48-1.664c-.693-.736-1.237-1.643-1.632-2.72-.384-1.088-.576-2.336-.576-3.744 0-1.13.176-2.181.528-3.152a7.67 7.67 0 0 1 1.504-2.56 7.064 7.064 0 0 1 2.416-1.712c.95-.416 2.016-.624 3.2-.624.992 0 1.904.165 2.736.496.843.32 1.568.79 2.176 1.408.608.619 1.083 1.381 1.424 2.288.352.907.528 1.941.528 3.104 0 .48-.053.805-.16.976-.106.16-.304.24-.592.24h-10.656c.032.97.171 1.819.416 2.544.246.715.582 1.312 1.008 1.792.438.48.955.837 1.552 1.072.598.235 1.264.352 2 .352.694 0 1.291-.08 1.792-.24.512-.16.95-.33 1.312-.512.374-.192.683-.368.928-.528.256-.16.48-.24.672-.24.256 0 .454.096.592.288l.896 1.152zM225.113 19.396a1.836 1.836 0 0 1-.288.288c-.086.064-.214.096-.384.096-.171 0-.352-.064-.544-.192a4.872 4.872 0 0 0-.704-.432 5.21 5.21 0 0 0-1.024-.432c-.395-.139-.886-.208-1.472-.208-.768 0-1.446.139-2.032.416a3.972 3.972 0 0 0-1.472 1.184c-.384.512-.678 1.136-.88 1.872-.203.736-.304 1.563-.304 2.48 0 .95.106 1.797.32 2.544.213.736.517 1.36.912 1.872.394.501.874.885 1.44 1.152a4.522 4.522 0 0 0 1.888.384c.672 0 1.226-.08 1.664-.24.437-.17.8-.352 1.088-.544.288-.192.528-.368.72-.528.192-.17.389-.256.592-.256.256 0 .453.096.592.288l.896 1.152a5.966 5.966 0 0 1-1.264 1.168c-.459.32-.95.581-1.472.784a8.34 8.34 0 0 1-1.648.448c-.566.096-1.142.144-1.728.144a7.25 7.25 0 0 1-2.848-.56 6.52 6.52 0 0 1-2.288-1.632c-.64-.715-1.147-1.59-1.52-2.624-.374-1.045-.56-2.23-.56-3.552 0-1.205.165-2.32.496-3.344.341-1.024.837-1.904 1.488-2.64a6.821 6.821 0 0 1 2.432-1.744c.96-.427 2.058-.64 3.296-.64 1.162 0 2.186.187 3.072.56a7.514 7.514 0 0 1 2.368 1.584l-.832 1.152zM234.121 32.868c-1.312 0-2.325-.368-3.04-1.104-.704-.736-1.056-1.787-1.056-3.152v-9.728h-1.888a.701.701 0 0 1-.464-.16c-.117-.117-.176-.288-.176-.512v-1.264l2.64-.368.704-4.848a.738.738 0 0 1 .24-.416.724.724 0 0 1 .48-.16h1.584v5.456h4.608v2.272h-4.608v9.52c0 .64.155 1.12.464 1.44.32.31.726.464 1.216.464.288 0 .534-.037.736-.112a3.27 3.27 0 0 0 .544-.24c.15-.096.278-.181.384-.256a.521.521 0 0 1 .288-.112c.107 0 .187.027.24.08a.694.694 0 0 1 .192.224l.928 1.504c-.512.47-1.12.832-1.824 1.088a6.362 6.362 0 0 1-2.192.384z"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.815 33.284V9H70.66a6.259 6.259 0 0 1 5.823 6.243v11.783a6.258 6.258 0 0 1-6.258 6.258h-12.41zM84.56 9h-3.335v24.321h3.335V9zM61.15 29.95V12.32h9.075a2.923 2.923 0 0 1 2.923 2.923v11.783a2.923 2.923 0 0 1-2.923 2.923H61.15zM89.243 9v24.284h12.409a6.258 6.258 0 0 0 6.259-6.258V15.243A6.259 6.259 0 0 0 102.087 9H89.243zm22.912 5.636h3.728v3.728h-3.728v-3.729zm3.728 9.321h-3.728v3.729h3.728v-3.729zM92.578 12.32v17.63h9.074a2.924 2.924 0 0 0 2.924-2.924V15.243a2.924 2.924 0 0 0-2.924-2.923h-9.074z"})]}))};s.defaultProps={width:"239",height:"42",viewBox:"0 0 239 42",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},s.displayName="connect-logo";var l=s;n.Z=l},82774:function(e,n,i){"use strict";var t=i(71600);n.Z=void 0;var r=t(i(48035)),o=i(37574),a=(0,r.default)((0,o.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-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=a},17708:function(e,n,i){"use strict";var t=i(30969),r=i(46378);n.Z=function(e,n,i){if(!r.isBrowser)return[n,r.noop,r.noop];if(!e)throw new Error("useLocalStorage key may not be falsy");var o=i?i.raw?function(e){return e}:i.deserializer:JSON.parse,a=t.useRef((function(e){try{var t=i?i.raw?String:i.serializer:JSON.stringify,r=localStorage.getItem(e);return null!==r?o(r):(n&&localStorage.setItem(e,t(n)),n)}catch(c){return n}})),c=t.useState((function(){return a.current(e)})),s=c[0],l=c[1];t.useLayoutEffect((function(){return l(a.current(e))}),[e]);var p=t.useCallback((function(n){try{var t="function"===typeof n?n(s):n;if("undefined"===typeof t)return;var r=void 0;r=i?i.raw?"string"===typeof t?t:JSON.stringify(t):i.serializer?i.serializer(t):JSON.stringify(t):JSON.stringify(t),localStorage.setItem(e,r),l(o(r))}catch(c){}}),[e,l]),u=t.useCallback((function(){try{localStorage.removeItem(e),l(void 0)}catch(c){}}),[e,l]);return[s,p,u]}}}]);
2
- //# sourceMappingURL=8622.66a81bc0.chunk.js.map
1
+ (self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8622],{8622:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return he}});var t,r=i(71171),o=i(33028),a=i(32723),c=i(34795),s=i(30969),l=i(16380),p=i(30734),u=i(24974),v=i.n(u),d=i(54164),f=i(94308),h=i(20003),m=i(96234),g=i(26022),x=i(50496),_=i(17469),w=i(37574),j=(0,_.Z)((0,w.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");function y(e){var n=e.invitation,i=e.createPassportSvg,t=e.passportColor,r=(0,s.useState)(!1),o=(0,m.Z)(r,2),a=o[0],c=o[1],l=(0,s.useContext)(g.RD).t,p=(0,s.useMemo)((function(){return(n.role.title||n.role.name).toUpperCase()}),[n.role.title,n.role.name]),u=(0,s.useMemo)((function(){return i({title:p,issuer:n.info.name,issuerDid:n.info.appDid,ownerName:"Your Name",ownerDid:n.info.appDid,preferredColor:n.info.passportColor||t})}),[n,p]),v=(0,s.useCallback)((function(){c(!0)}),[]),d=(0,s.useCallback)((function(){c(!1)}),[]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Z,{children:(0,w.jsx)("div",{className:"invite-passport__card",onClick:v,children:(0,w.jsx)("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),(0,w.jsx)(x.ZP,{open:a,title:l("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:d,children:n.role.permissions&&n.role.permissions.length>0?(0,w.jsx)("ul",{style:{listStyle:"circle",padding:"0 20px"},children:n.role.permissions.map((function(e){return(0,w.jsx)("li",{style:{listStyle:"circle"},children:e.description},e.name)}))}):(0,w.jsxs)("div",{style:{color:"#999",textAlign:"center"},children:[(0,w.jsx)(j,{style:{width:"30px",height:"30px"}}),(0,w.jsx)("div",{children:l("invite.emptyPermission")})]})})]})}y.propTypes={invitation:v().object.isRequired,createPassportSvg:v().func.isRequired,passportColor:v().string},y.defaultProps={passportColor:"auto"};var b,Z=l.Z.div(t||(t=(0,r.Z)(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),k=y,P=i(17323),z=i(85300),C=i(19611),S=i.n(C),N=i(24891),I=i(86776),R=i(77370);function M(e){var n,i,t,r=e.invitation,o=e.onLogin,a=e.onReceive,c=e.inService,l=(0,g.PE)(),p=l.t,u=l.locale,v=(0,R.T)().connectApi,d=(0,I.Z)().getPassportId;"undefined"!==typeof window&&(n=null===(i=window)||void 0===i||null===(t=i.blocklet)||void 0===t?void 0:t.componentId);var f={passportId:d(),inviteId:r.inviteId,baseUrl:window.location.origin,componentId:n},h=(0,s.useCallback)((function(){v.close()}),[v]),m=(0,s.useCallback)((function(){v.close(),o.apply(void 0,arguments)}),[o,v]),x=(0,s.useCallback)((function(){"function"!==typeof a?c?v.openPopup({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:u,extraParams:f,baseUrl:window.location.origin,prefix:S()(window.location.origin,z.Bu,z.nC),messages:{title:p("receive.dialog.title"),scan:p("receive.dialog.scan"),confirm:p("receive.dialog.confirm"),success:p("receive.dialog.success")},onSuccess:m,onClose:h},{locale:u}):v.open({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:u,extraParams:f,messages:{title:p("receive.dialog.title"),scan:p("receive.dialog.scan"),confirm:p("receive.dialog.confirm"),success:p("receive.dialog.success")},onSuccess:m,onClose:h}):a()}),[v.openPopup]);return(0,w.jsxs)(O,{children:[(0,w.jsx)(P.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:x,children:p("invite.receive")}),(0,w.jsxs)("div",{className:"invite-receive__until",children:[p("invite.validUntil"),(0,N.o0)(r.expireDate,u)]})]})}M.propTypes={invitation:v().object.isRequired,onLogin:v().func,onReceive:v().func,inService:v().bool},M.defaultProps={onLogin:function(){},onReceive:null,inService:!1};var L,O=l.Z.div(b||(b=(0,r.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),H=M;function T(e){var n=e.onLogin,i=(0,g.PE)().t;return(0,w.jsx)(D,{children:(0,w.jsx)(P.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:function(){return n()},children:i("common.connect")})})}T.propTypes={onLogin:v().func},T.defaultProps={onLogin:function(){}};var V,D=l.Z.div(L||(L=(0,r.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),E=T,q=i(62399);function F(e){var n=e.invitation,i=(0,g.PE)().t,t=(0,s.useMemo)((function(){return(n.role.title||n.role.name).toUpperCase()}),[n.role.title,n.role.name]),r=(0,s.useMemo)((function(){return i("invite.message",{name:"{{name}}",role:t,dapp:"{{dapp}}"})}),[i,t]),o=(0,N.E8)(n.info.chainHost,n.inviter.did,"account"),a=(0,N.Zp)(r,{name:function(){return o?(0,w.jsx)("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:n.inviter.fullName},"name"):n.inviter.fullName},dapp:function(){return(0,w.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")}});return(0,w.jsxs)(B,{children:[(0,w.jsx)(q.Z,{did:n.inviter.did,src:encodeURI(n.inviter.avatar),size:80,shape:"circle",variant:"circle"}),(0,w.jsx)("div",{className:"invite-user__message",children:a})]})}F.propTypes={invitation:v().object.isRequired};var U,B=l.Z.div(V||(V=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),A=F,W=i(38361),J=i(82774);function K(e){var n=e.invitation,i=e.type,t=(0,g.PE)().t,r=(0,s.useMemo)((function(){return t("invite.success",{dapp:"{{dapp}}"})}),[t]),o=(0,N.E8)(n.info.chainHost,n.inviter.did,"account"),a="receiver"===i?n.receiver:n.inviter,c=(0,N.Zp)(r,{name:function(){return o?(0,w.jsx)("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:a.fullName},"name"):a.fullName},dapp:function(){return(0,w.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")}});return(0,w.jsxs)(Y,{children:[(0,w.jsx)(W.Z,{pt:1,color:"success.main",children:(0,w.jsx)(J.Z,{style:{fontSize:80}})}),(0,w.jsx)("div",{className:"invite-user__message",children:c})]})}K.propTypes={invitation:v().object.isRequired,type:v().oneOf("inviter","receiver")},K.defaultProps={type:"inviter"};var X,Y=l.Z.div(U||(U=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),G=K,Q=i(59740),$=["invitation"];function ee(e){var n=e.invitation,i=(0,Q.Z)(e,$);return(0,w.jsxs)(ie,(0,o.Z)((0,o.Z)({},i),{},{children:[(0,w.jsx)(q.Z,{did:n.info.did,src:n.info.logo,style:{flexShrink:0}}),(0,w.jsxs)("div",{className:"invite-app__content",children:[(0,w.jsx)("div",{className:"invite-app__title",children:n.info.name}),(0,w.jsx)("div",{className:"invite-app__description",children:n.info.description})]})]}))}ee.propTypes={invitation:v().object.isRequired};var ne,ie=l.Z.div(X||(X=(0,r.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n .invite-app__content {\n flex: 1;\n margin: 0 12px;\n font-weight: 700;\n overflow: hidden;\n }\n .invite-app__title {\n line-height: 1;\n margin-bottom: 2px;\n overflow: hidden;\n }\n .invite-app__description {\n font-size: 12px;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 1.3em;\n color: #999;\n overflow: hidden;\n }\n"]))),te=ee,re=i(85752);function oe(e){var n,i,t=e.getDataFn,r=e.passportColor,o=e.createPassportSvg,a=e.onLoginSuccess,c=e.checkFn,s=e.onReceive,l=e.inService,p=(0,d.Z)(t);if(p.loading)return(0,w.jsx)(f.Z,{});if(p.error)return(0,w.jsx)(h.Z,{status:"404",title:null===(n=p.error)||void 0===n||null===(i=n.response)||void 0===i?void 0:i.data,description:""});var u="success"===p.data.status,v=u?G:A,m=u?E:H;return(0,w.jsxs)(ce,{className:"page-invite__wrapper",children:[(0,w.jsx)(te,{invitation:p.data}),(0,w.jsxs)("div",{className:"page-invite__card",children:[(0,w.jsx)(v,{invitation:p.data}),(0,w.jsx)(k,{invitation:p.data,createPassportSvg:o,passportColor:r}),(0,w.jsx)(m,{invitation:p.data,onLogin:a,checkFn:c,onReceive:s,inService:l})]})]})}oe.propTypes={getDataFn:v().func.isRequired,checkFn:v().func.isRequired,createPassportSvg:v().func.isRequired,onLoginSuccess:v().func,onReceive:v().func,passportColor:v().string,inService:v().bool},oe.defaultProps={onLoginSuccess:function(){},passportColor:"auto",onReceive:null,inService:!1};var ae,ce=l.Z.div(ne||(ne=(0,r.Z)(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"]))),se=(0,re.Z)(oe),le=i(32263),pe=i(20244),ue=i(99042),ve=i(38507),de=i(4485);var fe=l.Z.div(ae||(ae=(0,r.Z)(["\n width: 100vw;\n height: 100%;\n min-height: 100vh;\n display: flex;\n justify-content: center;\n background-color: #f6f8fa;\n overflow: auto;\n padding: 20px;\n"]))),he=function(e){var n=(0,p.useNavigate)(),i=new URL(window.location.href).searchParams,t=(0,de.Tt)(),r=t.api,l=t.session,u=i.get("inviteId"),v=i.get("redirect"),d=(0,s.useCallback)((0,c.Z)((0,a.Z)().mark((function e(){var n,i;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ue.Z.get("invitation",{params:{inviteId:u}});case 2:return n=e.sent,i=n.data,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)}))),[u]),f=(0,s.useCallback)(function(){var e=(0,c.Z)((0,a.Z)().mark((function e(i){var t,r=arguments;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>1&&void 0!==r[1]?r[1]:function(e){return e},i&&((0,ve.ZB)(t(i.sessionToken)),(0,ve.zI)(t(i.refreshToken)),i.visitorId&&(0,le.IA)(t(i.visitorId))),e.next=4,l.refresh();case 4:setTimeout((function(){if(v){var e=decodeURIComponent(v);e.startsWith(pe.WELLKNOWN_SERVICE_PATH_PREFIX)?n(e,{replace:!0}):window.location=e}else window.location=window.env.pathPrefix||"/"}),50);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),[]);return(0,w.jsx)(fe,{className:"page-invite",children:(0,w.jsx)(se,(0,o.Z)((0,o.Z)({},e),{},{getDataFn:d,checkFn:r.get,createPassportSvg:ve.Ju,onLoginSuccess:f,inService:!0}))})}},77370:function(e,n,i){"use strict";i.d(n,{B:function(){return r.B3},T:function(){return o}});var t=i(30969),r=i(82972);function o(){return(0,t.useContext)(r.B3)}},86776:function(e,n,i){"use strict";function t(){return{getPassportId:function(){var e=localStorage.getItem("passportId")||"";return localStorage.removeItem("passportId"),e},setPassportId:function(e){localStorage.setItem("passportId",e)}}}i.d(n,{Z:function(){return t}})},19477:function(e,n,i){var t=i(2717),r=i(37095),o=i(93113);e.exports={translations:{zh:t(o),en:t(r)}}},85752:function(e,n,i){"use strict";i.d(n,{Z:function(){return c}});var t=i(33028),r=i(26022),o=i(19477),a=i(37574);function c(e){return function(n){return(0,a.jsx)(r.Iw,{translations:o.translations,children:(0,a.jsx)(e,(0,t.Z)({},n))})}}},17323:function(e,n,i){"use strict";i.d(n,{Z:function(){return u}});var t=i(33028),r=i(59740),o=i(24974),a=i.n(o),c=i(29996),s=i(82969),l=i(37574),p=["children"];function u(e){var n=e.children,i=(0,r.Z)(e,p);return(0,l.jsxs)(c.Z,(0,t.Z)((0,t.Z)({color:"did",variant:"contained"},i),{},{children:[(0,l.jsx)("span",{style:{fontWeight:400},children:n||"Continue With"}),(0,l.jsx)(s.Z,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]}))}u.propTypes={children:a().any},u.defaultProps={children:""}},82969:function(e,n,i){"use strict";n.Z=void 0;(t=i(30969))&&t.__esModule;var t,r=i(37574);function o(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function a(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?o(Object(i),!0).forEach((function(n){c(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function c(e,n,i){return(n=function(e){var n=function(e,n){if("object"!==typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var t=i.call(e,n||"default");if("object"!==typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===typeof n?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}var s=function(e){return(0,r.jsxs)("svg",a(a({},e),{},{children:[(0,r.jsx)("path",{d:"M24.604 2.263L28.524 0H42.79v41.862H28.79a1 1 0 0 1-.5-.134l-15.103-8.72V8.854l1.817-1.05 3.2 1.848-1.817 1.05V31.16l12.993 7.502H39.59V3.2H29.38l-1.576.91-3.2-1.847z"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.402 31.16V10.701L13.409 3.2H3.2v35.462h10.21l1.58-.913 3.2 1.847-3.923 2.266H0V0h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z"}),(0,r.jsx)("path",{d:"M138.44 27.684c.192 0 .357.075.496.224l1.344 1.472a9.584 9.584 0 0 1-3.44 2.576c-1.344.608-2.965.912-4.864.912-1.664 0-3.173-.288-4.528-.864a10.056 10.056 0 0 1-3.456-2.416c-.949-1.035-1.685-2.272-2.208-3.712-.523-1.44-.784-3.024-.784-4.752 0-1.728.272-3.312.816-4.752.555-1.44 1.328-2.677 2.32-3.712a10.444 10.444 0 0 1 3.552-2.416c1.387-.576 2.917-.864 4.592-.864 1.632 0 3.083.267 4.352.8a10.973 10.973 0 0 1 3.312 2.128l-1.12 1.584a.936.936 0 0 1-.288.288.742.742 0 0 1-.432.112c-.203 0-.443-.101-.72-.304a8.802 8.802 0 0 0-1.072-.672c-.437-.256-.981-.485-1.632-.688-.651-.203-1.461-.304-2.432-.304-1.141 0-2.187.203-3.136.608a6.885 6.885 0 0 0-2.464 1.728c-.683.747-1.216 1.67-1.6 2.768-.373 1.088-.56 2.32-.56 3.696 0 1.397.197 2.64.592 3.728.395 1.088.939 2.01 1.632 2.768a6.914 6.914 0 0 0 2.448 1.728 7.764 7.764 0 0 0 3.04.592c.661 0 1.253-.037 1.776-.112a7.843 7.843 0 0 0 1.456-.368c.448-.16.869-.363 1.264-.608a8.89 8.89 0 0 0 1.168-.912c.085-.075.176-.133.272-.176a.616.616 0 0 1 .304-.08zM149.68 16.1c1.195 0 2.272.197 3.232.592a6.54 6.54 0 0 1 2.464 1.68c.683.725 1.205 1.605 1.568 2.64.363 1.024.544 2.176.544 3.456 0 1.28-.181 2.437-.544 3.472-.363 1.035-.885 1.915-1.568 2.64a6.795 6.795 0 0 1-2.464 1.68c-.96.384-2.037.576-3.232.576-1.205 0-2.293-.192-3.264-.576a6.987 6.987 0 0 1-2.464-1.68c-.683-.725-1.211-1.605-1.584-2.64-.363-1.035-.544-2.192-.544-3.472 0-1.28.181-2.432.544-3.456.373-1.035.901-1.915 1.584-2.64a6.717 6.717 0 0 1 2.464-1.68c.971-.395 2.059-.592 3.264-.592zm0 14.304c1.536 0 2.683-.517 3.44-1.552.757-1.035 1.136-2.49 1.136-4.368 0-1.877-.379-3.333-1.136-4.368-.757-1.045-1.904-1.568-3.44-1.568-1.557 0-2.72.523-3.488 1.568-.757 1.035-1.136 2.49-1.136 4.368 0 1.877.379 3.333 1.136 4.368.768 1.035 1.931 1.552 3.488 1.552zM163.899 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.442 6.442 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448.682.299 1.253.72 1.712 1.264.458.533.805 1.179 1.04 1.936.234.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.534-.65-1.35-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.38 7.38 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM181.805 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.448 6.448 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448a4.63 4.63 0 0 1 1.712 1.264c.459.533.805 1.179 1.04 1.936.235.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.533-.65-1.349-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.396 7.396 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM207.551 22.676c0-.619-.09-1.19-.272-1.712a3.77 3.77 0 0 0-.768-1.36 3.521 3.521 0 0 0-1.248-.896c-.49-.213-1.056-.32-1.696-.32-1.312 0-2.346.379-3.104 1.136-.746.757-1.221 1.808-1.424 3.152h8.512zm2.576 7.616a6.311 6.311 0 0 1-1.328 1.168 7.926 7.926 0 0 1-1.6.784 9.664 9.664 0 0 1-1.76.448c-.597.096-1.189.144-1.776.144-1.12 0-2.16-.187-3.12-.56a7.159 7.159 0 0 1-2.48-1.664c-.693-.736-1.237-1.643-1.632-2.72-.384-1.088-.576-2.336-.576-3.744 0-1.13.176-2.181.528-3.152a7.67 7.67 0 0 1 1.504-2.56 7.064 7.064 0 0 1 2.416-1.712c.95-.416 2.016-.624 3.2-.624.992 0 1.904.165 2.736.496.843.32 1.568.79 2.176 1.408.608.619 1.083 1.381 1.424 2.288.352.907.528 1.941.528 3.104 0 .48-.053.805-.16.976-.106.16-.304.24-.592.24h-10.656c.032.97.171 1.819.416 2.544.246.715.582 1.312 1.008 1.792.438.48.955.837 1.552 1.072.598.235 1.264.352 2 .352.694 0 1.291-.08 1.792-.24.512-.16.95-.33 1.312-.512.374-.192.683-.368.928-.528.256-.16.48-.24.672-.24.256 0 .454.096.592.288l.896 1.152zM225.113 19.396a1.836 1.836 0 0 1-.288.288c-.086.064-.214.096-.384.096-.171 0-.352-.064-.544-.192a4.872 4.872 0 0 0-.704-.432 5.21 5.21 0 0 0-1.024-.432c-.395-.139-.886-.208-1.472-.208-.768 0-1.446.139-2.032.416a3.972 3.972 0 0 0-1.472 1.184c-.384.512-.678 1.136-.88 1.872-.203.736-.304 1.563-.304 2.48 0 .95.106 1.797.32 2.544.213.736.517 1.36.912 1.872.394.501.874.885 1.44 1.152a4.522 4.522 0 0 0 1.888.384c.672 0 1.226-.08 1.664-.24.437-.17.8-.352 1.088-.544.288-.192.528-.368.72-.528.192-.17.389-.256.592-.256.256 0 .453.096.592.288l.896 1.152a5.966 5.966 0 0 1-1.264 1.168c-.459.32-.95.581-1.472.784a8.34 8.34 0 0 1-1.648.448c-.566.096-1.142.144-1.728.144a7.25 7.25 0 0 1-2.848-.56 6.52 6.52 0 0 1-2.288-1.632c-.64-.715-1.147-1.59-1.52-2.624-.374-1.045-.56-2.23-.56-3.552 0-1.205.165-2.32.496-3.344.341-1.024.837-1.904 1.488-2.64a6.821 6.821 0 0 1 2.432-1.744c.96-.427 2.058-.64 3.296-.64 1.162 0 2.186.187 3.072.56a7.514 7.514 0 0 1 2.368 1.584l-.832 1.152zM234.121 32.868c-1.312 0-2.325-.368-3.04-1.104-.704-.736-1.056-1.787-1.056-3.152v-9.728h-1.888a.701.701 0 0 1-.464-.16c-.117-.117-.176-.288-.176-.512v-1.264l2.64-.368.704-4.848a.738.738 0 0 1 .24-.416.724.724 0 0 1 .48-.16h1.584v5.456h4.608v2.272h-4.608v9.52c0 .64.155 1.12.464 1.44.32.31.726.464 1.216.464.288 0 .534-.037.736-.112a3.27 3.27 0 0 0 .544-.24c.15-.096.278-.181.384-.256a.521.521 0 0 1 .288-.112c.107 0 .187.027.24.08a.694.694 0 0 1 .192.224l.928 1.504c-.512.47-1.12.832-1.824 1.088a6.362 6.362 0 0 1-2.192.384z"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.815 33.284V9H70.66a6.259 6.259 0 0 1 5.823 6.243v11.783a6.258 6.258 0 0 1-6.258 6.258h-12.41zM84.56 9h-3.335v24.321h3.335V9zM61.15 29.95V12.32h9.075a2.923 2.923 0 0 1 2.923 2.923v11.783a2.923 2.923 0 0 1-2.923 2.923H61.15zM89.243 9v24.284h12.409a6.258 6.258 0 0 0 6.259-6.258V15.243A6.259 6.259 0 0 0 102.087 9H89.243zm22.912 5.636h3.728v3.728h-3.728v-3.729zm3.728 9.321h-3.728v3.729h3.728v-3.729zM92.578 12.32v17.63h9.074a2.924 2.924 0 0 0 2.924-2.924V15.243a2.924 2.924 0 0 0-2.924-2.923h-9.074z"})]}))};s.defaultProps={width:"239",height:"42",viewBox:"0 0 239 42",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},s.displayName="connect-logo";var l=s;n.Z=l},82774:function(e,n,i){"use strict";var t=i(71600);n.Z=void 0;var r=t(i(48035)),o=i(37574),a=(0,r.default)((0,o.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-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=a}}]);
2
+ //# sourceMappingURL=8622.ebd44812.chunk.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8641],{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(39017),j=t(32668),C=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)(j.Z,{mt:8,disabled:A,blocklet:F,onStartNow:function(){return e("complete")},children:(0,M.jsx)(C.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))}},39017:function(n,e,t){t.d(e,{Z:function(){return h}});var r,o=t(71171),i=t(16380),a=t(33028),c=t(59740),l=t(24974),s=t.n(l),u=t(37574),d=["children"];function p(n){var e=n.children,t=(0,c.Z)(n,d);return(0,u.jsx)(m,(0,a.Z)((0,a.Z)({},t),{},{children:e}))}p.propTypes={children:s().any.isRequired};var f,m=i.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")})),h=(0,i.Z)(p)(f||(f=(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")}))},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))}},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 j}});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,{}),j=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,j=s.indeterminate,C=void 0!==j&&j,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=C?N:x,_=C?N:d,I=(0,i.Z)({},s,{color:m,indeterminate:C,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":C},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,j=void 0!==z&&z,C=t.error,S=void 0!==C&&C,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:j,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];j&&nn&&en(!1);var tn,rn=void 0===N||j?nn:N,on=a.useMemo((function(){return{adornedStart:Y,setAdornedStart:G,color:k,disabled:j,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,j,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},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},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=8641.bec13444.chunk.js.map
@@ -0,0 +1,2 @@
1
+ (self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[8702],{58687:function(e,n,t){var r=t(67179);e.exports=function(e){return r((e||"").replace(/^[@./-]/,"").replace(/[@./_]/g,"-"))}},25205:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return G}});var r=t(33028),i=t(96234),a=t(59740),o=t(24974),l=t.n(o),s=t(38361),c=t(87535),d=t(39130),u=t(2689),p=t(17708),f=t(71171),m=t(30969),g=t(16380),h=t(72097),x=t(27265),v=t(75255),b=t(10515),y=t(34869),Z=t(24891);var w,j,k=function(){var e=(0,m.useState)(+new Date),n=(0,i.Z)(e,2),t=n[0],r=n[1];return(0,y.Z)((function(){r(+new Date)}),1e3),(0,Z.mr)(t,"MMMM Do YYYY, h:mm:ss a")},C=t(41395),T=t(37574),E=["name","logId","types","defaultTypeIndex","initialData","prepend","postpend","onTypeChange"],D=["logFile"];function I(e){var n=e.name,t=e.logId,o=e.types,l=e.defaultTypeIndex,s=e.initialData,c=e.prepend,d=e.postpend,u=e.onTypeChange,p=(0,a.Z)(e,E),f=(0,C.h6)().ws.useSubscription,g={info:"Info",error:"Error",access:"Access",stdout:"stdout",stderr:"stderr",pm2:"PM2"},b=(0,v.Z)((function(e){return e.breakpoints.down("md")})),y=(0,m.useState)(o[l||0]),Z=(0,i.Z)(y,2),w=Z[0],j=Z[1],k=(0,m.useState)(),D=(0,i.Z)(k,2),I=D[0],z=D[1],P=(0,m.useRef)({});return(0,m.useEffect)((function(){o.forEach((function(e){var t=P.current[e];t&&(t.write("Collecting ".concat(e," logs for ").concat(n,"...")),t.write("\r\n\r\n"),s.forEach((function(e){return t.write(e)})))}))}),[]),f("log.".concat(t),(function(e){I||z(e.logFiles||{});var n=P.current[e.level];n&&(n.write(e.data.replace(/.\n/g,(function(e){return"\r\n"===e?e:"".concat(e[0],"\r\n\r\n")}))),n.write("\r\n\r\n"))}),[]),(0,T.jsxs)(S,(0,r.Z)((0,r.Z)({},p),{},{children:[(0,T.jsxs)("div",{className:"log-terminal-group-head",children:[(0,T.jsxs)("div",{className:"log-terminal-group-head-start",children:[c,(0,T.jsx)(x.Z,{variant:"outlined",size:b?"small":"medium",children:o.map((function(e){var n=e===w?{variant:"contained"}:{};return(0,T.jsx)(h.Z,(0,r.Z)((0,r.Z)({},n),{},{onClick:function(){j(e),u(e)},children:g[e]}),e)}))})]}),(0,T.jsx)("div",{className:"log-terminal-group-head-end",children:d})]}),(0,T.jsx)("div",{className:"log-terminal-group-terminals",children:o.map((function(e){return(0,T.jsx)(R,{ref:function(n){P.current[e]=n},logFile:null===I||void 0===I?void 0:I[e],style:{visibility:e===w?"visible":"hidden"}},e)}))})]}))}I.propTypes={name:l().string.isRequired,logId:l().string.isRequired,types:l().arrayOf(l().string),defaultTypeIndex:l().number,initialData:l().arrayOf(l().string),prepend:l().node,postpend:l().node,onTypeChange:l().func},I.defaultProps={types:["error","info","access","stdout","stderr"],defaultTypeIndex:0,initialData:[],prepend:null,postpend:null,onTypeChange:function(){}};var S=g.Z.div(w||(w=(0,f.Z)(["\n display: flex;\n flex-direction: column;\n height: 100%;\n .log-terminal-group-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 16px;\n }\n\n .log-terminal-group-head-start {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 16px;\n "," {\n flex-direction: column;\n align-items: start;\n }\n }\n\n .log-terminal-group-head-end {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 16px;\n "," {\n flex-direction: column;\n align-items: start;\n }\n }\n .log-terminal-group-terminals {\n flex: 1;\n position: relative;\n overflow: hidden;\n > * {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.down("md")})),R=(0,m.forwardRef)((function(e,n){var t=e.logFile,i=(0,a.Z)(e,D);return(0,T.jsxs)(z,(0,r.Z)((0,r.Z)({},i),{},{children:[(0,T.jsxs)("div",{className:"log-terminal-top",children:[(0,T.jsx)(k,{}),t&&(0,T.jsx)("span",{children:t})]}),(0,T.jsx)("div",{className:"log-terminal-container",style:{position:"relative"},children:(0,T.jsx)(b.Z,{ref:n,style:{width:"100%",boxSizing:"border-box",height:"100%"},options:{theme:{background:"#2C313C",foreground:"#EEEEEE"}}})})]}))}));R.propTypes={logFile:l().string},R.defaultProps={logFile:""};var z=g.Z.div(j||(j=(0,f.Z)(["\n height: 100%;\n display: flex;\n flex-direction: column;\n .log-terminal-top {\n flex: 0 0 auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding: 8px;\n font-size: 14px;\n color: aquamarine;\n background: darkgray;\n word-break: break-word;\n }\n .log-terminal-container {\n flex: 1;\n height: 100%;\n padding: 8px;\n overflow: hidden;\n background: #2c313c;\n }\n\n .xterm-viewport::-webkit-scrollbar {\n width: 10px;\n }\n .xterm-viewport::-webkit-scrollbar-track {\n opacity: 0;\n }\n .xterm-viewport::-webkit-scrollbar-thumb {\n min-height: 20px;\n background-color: #ffffff20;\n }\n"]))),P=t(32723),Y=t(34795),M=t(19886),_=t.n(M),F=t(32677),N=t(94308),q=t(29996),O=t(26022),L=t(50496),U=t(58687),A=t.n(U),H=t(1986),W=[1,7];function B(e){var n=e.id,t=e.name,r=(0,O.PE)().t,a=(0,C.h6)(),o=a.restApi,l=a.inService,p=(0,m.useState)(!1),f=(0,i.Z)(p,2),g=f[0],h=f[1],x=(0,m.useState)(!1),v=(0,i.Z)(x,2),b=v[0],y=v[1],Z=(0,m.useState)(1),w=(0,i.Z)(Z,2),j=w[0],k=w[1],E=function(){var e=(0,Y.Z)((0,P.Z)().mark((function e(){var r,i,a,s;return(0,P.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,y(!0),r=l?"":"/".concat(n),e.next=7,o.get("/download/log".concat(r,"?days=").concat(j),{responseType:"blob"});case 7:i=e.sent,a=URL.createObjectURL(i.data),(s=document.createElement("a")).href=a,s.setAttribute("download","".concat(A()(t||n),".").concat(_()().format("YYYYMMDDHHmmss"),".log.zip")),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a),y(!1),h(!1),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(2),y(!1),H.Z.error(e.t0.message);case 24:case"end":return e.stop()}}),e,null,[[2,20]])})));return function(){return e.apply(this,arguments)}}();return[(0,T.jsx)(s.Z,{display:"flex",alignItems:"center",style:{gap:16},children:(0,T.jsxs)(q.Z,{"data-cy":"download-logs",variant:"outlined",onClick:function(){return h(!0)},disabled:b,children:[b?(0,T.jsx)(N.Z,{size:16}):(0,T.jsx)(F.Z,{fontSize:"small",style:{transform:"translateY(2px)"}}),(0,T.jsx)(s.Z,{ml:.5,children:r("common.download")})]})}),g&&(0,T.jsx)(L.ZP,{open:!0,onClose:function(){h(!1)},disableEscapeKeyDown:!0,title:r("common.download"),PaperProps:{style:{minHeight:"auto"}},actions:(0,T.jsxs)(q.Z,{"data-cy":"download-logs",variant:"outlined",onClick:function(){return E()},disabled:b,children:[b&&(0,T.jsx)(N.Z,{size:16}),(0,T.jsx)(s.Z,{ml:.5,children:r("common.confirm")})]}),children:(0,T.jsx)(s.Z,{mb:2,display:"flex",justifyContent:"center",children:(0,T.jsx)(c.Z,{size:"small",fullWidth:!0,children:(0,T.jsx)(d.Z,{value:j,onChange:function(e){k(e.target.value)},children:W.map((function(e){return(0,T.jsx)(u.Z,{value:e,children:r("log.lastDays.".concat(e))},e)}))})})})})]}B.propTypes={id:l().string.isRequired,name:l().string},B.defaultProps={name:""};var K=["blocklet"];function G(e){var n,t=e.blocklet,o=(0,a.Z)(e,K),l=((null===t||void 0===t?void 0:t.children)||[]).map((function(e){return{did:e.meta.did,name:e.meta.title,types:["error","info","access","stdout","stderr"]}})),f=(0,p.Z)("blocklet-log-".concat(t.meta.did),""),m=(0,i.Z)(f,2),g=m[0],h=m[1],x=g.split(","),v=(0,i.Z)(x,2),b=v[0],y=v[1];l.find((function(e){return e.did===b}))||(b=null===(n=l[0])||void 0===n?void 0:n.did);var Z=(0,T.jsx)(c.Z,{sx:{minWidth:240},children:(0,T.jsx)(d.Z,{value:b,onChange:function(e){h([e.target.value,y].join(","))},size:"small",children:l.map((function(e){return(0,T.jsx)(u.Z,{value:e.did,children:e.name},e.did)}))})}),w=l.find((function(e){return e.did===b}))||l[0]||t.meta;return(0,T.jsx)(s.Z,(0,r.Z)((0,r.Z)({height:{xs:"calc(100vh - 444px)",sm:"calc(100vh - 508px)",md:"calc(100vh - 445px)"}},o),{},{children:(0,T.jsx)(I,{logId:w===t.meta?"blocklet-".concat(t.meta.did):"blocklet-".concat(t.meta.did,"/").concat(w.did),initialData:['Tip: this tab will only show runtime logs. Please go to "Blocklet Server" to view other lifecycle logs of the blocklet (install/start/stop...)',"\r\n\r\n"],prepend:Z,postpend:(0,T.jsx)(B,{id:t.meta.did,name:t.meta.name}),name:w.name,types:w.types,defaultTypeIndex:y,onTypeChange:function(e){var n=w.types.indexOf(e);h([b,n||0].join(","))}},w.did)}))}G.propTypes={blocklet:l().object.isRequired}}}]);
2
+ //# sourceMappingURL=8702.bb84d009.chunk.js.map
@@ -1,2 +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(31575),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,c,p;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=n.endpoint,o=n.name,i=n.did,(c=null===s||void 0===s||null===(t=s.replace(/\/api\/.+/,""))||void 0===t||null===(a=t.trim())||void 0===a?void 0:a.replace(/\/$/,"")).startsWith("http")||(c="https://".concat(c)),e.next=5,(0,I.w2)(c);case 5:if(e.sent){e.next=8;break}return y.Z.error(E("storage.spaces.gateway.add.invalidUrl")),e.abrupt("return");case 8:if(!ee.some((function(e){return e.endpoint===s}))){e.next=12;break}return y.Z.error(E("storage.spaces.gateway.add.duplicate",{name:o})),e.abrupt("return");case 12:return p={name:o,did:i,url:c,endpoint:s},e.next=15,ne(p,s);case 15:y.Z.success(E("storage.spaces.connectedWithName",{name:null!==(r=null===p||void 0===p?void 0:p.name)&&void 0!==r?r:"DID Spaces"}));case 16: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),n=O.startsWith("http")?O:"https://".concat(O),t=(0,I.ag)(n),a=new URL(n).searchParams.get("spaceDid"),e.next=7,(0,I.w2)(t);case 7:if(e.sent){e.next=9;break}throw new Error(E("storage.spaces.gateway.add.invalidUrl"));case 9: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=17;break;case 13:e.prev=13,e.t0=e.catch(0),s="".concat(E("storage.spaces.gateway.add.failed",T),": ").concat((0,w.Z)(e.t0)),Y(s);case 17:return e.prev=17,J(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[0,13,17,20]])})));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/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um++uKyho0BwmD+1rA90yarpO4ZpjLgs8+BTUfU9w+gkwEi6ftxqyB9Wt6IBstE0E8kxJLeKaV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UIuW1fJLBKOoydII6+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.8b009f81.chunk.js.map
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,c,p;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=n.endpoint,o=n.name,i=n.did,(c=null===s||void 0===s||null===(t=s.replace(/\/api\/.+/,""))||void 0===t||null===(a=t.trim())||void 0===a?void 0:a.replace(/\/$/,"")).startsWith("http")||(c="https://".concat(c)),e.next=5,(0,I.w2)(c);case 5:if(e.sent){e.next=8;break}return y.Z.error(E("storage.spaces.gateway.add.invalidUrl")),e.abrupt("return");case 8:if(!ee.some((function(e){return e.endpoint===s}))){e.next=12;break}return y.Z.error(E("storage.spaces.gateway.add.duplicate",{name:o})),e.abrupt("return");case 12:return p={name:o,did:i,url:c,endpoint:s},e.next=15,ne(p,s);case 15:y.Z.success(E("storage.spaces.connectedWithName",{name:null!==(r=null===p||void 0===p?void 0:p.name)&&void 0!==r?r:"DID Spaces"}));case 16: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),n=O.startsWith("http")?O:"https://".concat(O),t=(0,I.ag)(n),a=new URL(n).searchParams.get("spaceDid"),e.next=7,(0,I.w2)(t);case 7:if(e.sent){e.next=9;break}throw new Error(E("storage.spaces.gateway.add.invalidUrl"));case 9: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=17;break;case 13:e.prev=13,e.t0=e.catch(0),s="".concat(E("storage.spaces.gateway.add.failed",T),": ").concat((0,w.Z)(e.t0)),Y(s);case 17:return e.prev=17,J(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[0,13,17,20]])})));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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ilnNMFce7twgDgrgWhsE8jWW+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.0f55707c.chunk.js.map