@abtnode/webapp 1.16.17-beta-3232a7af → 1.16.17-beta-703fb879

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 (49) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/build/asset-manifest.json +20 -22
  4. package/build/index.html +1 -1
  5. package/build/service-worker.js +1 -1
  6. package/build/static/js/{2311.1fe5b0ce.chunk.js → 2311.3b030a8c.chunk.js} +2 -2
  7. package/build/static/js/2334.6d728159.chunk.js +1 -0
  8. package/build/static/js/3389.6295883d.chunk.js +1 -0
  9. package/build/static/js/3826.4c0cfe41.chunk.js +2 -0
  10. package/build/static/js/4650.0114b7aa.chunk.js +1 -0
  11. package/build/static/js/{4775.488b5fef.chunk.js → 4775.81aa3a9a.chunk.js} +1 -1
  12. package/build/static/js/4906.95bd8456.chunk.js +1 -0
  13. package/build/static/js/6277.0a135bbe.chunk.js +2 -0
  14. package/build/static/js/6412.c70c5169.chunk.js +1 -0
  15. package/build/static/js/6511.2234a510.chunk.js +1 -0
  16. package/build/static/js/6950.e2cfcf8f.chunk.js +1 -0
  17. package/build/static/js/6960.6966ff3e.chunk.js +1 -0
  18. package/build/static/js/7126.2e1dc542.chunk.js +1 -0
  19. package/build/static/js/7327.87476df2.chunk.js +1 -0
  20. package/build/static/js/7913.f177ca9d.chunk.js +1 -0
  21. package/build/static/js/8973.e2994c60.chunk.js +1 -0
  22. package/build/static/js/9249.ca07a031.chunk.js +1 -0
  23. package/build/static/js/9277.096074ac.chunk.js +1 -0
  24. package/build/static/js/main.fe7acc37.js +2 -0
  25. package/build/static/js/{main.69f96497.js.LICENSE.txt → main.fe7acc37.js.LICENSE.txt} +9 -0
  26. package/package.json +1 -1
  27. package/build/static/js/2334.255d59b6.chunk.js +0 -1
  28. package/build/static/js/3389.8d232eb3.chunk.js +0 -1
  29. package/build/static/js/3826.99a169b4.chunk.js +0 -2
  30. package/build/static/js/4650.2a69f6e7.chunk.js +0 -1
  31. package/build/static/js/4906.825f650b.chunk.js +0 -1
  32. package/build/static/js/5873.e467bcef.chunk.js +0 -2
  33. package/build/static/js/5873.e467bcef.chunk.js.LICENSE.txt +0 -8
  34. package/build/static/js/6277.06fe2ed5.chunk.js +0 -2
  35. package/build/static/js/6412.b103122a.chunk.js +0 -1
  36. package/build/static/js/6511.102d8c13.chunk.js +0 -1
  37. package/build/static/js/6950.e0b7db0a.chunk.js +0 -1
  38. package/build/static/js/6960.ae50a2e7.chunk.js +0 -1
  39. package/build/static/js/7126.9f26a67c.chunk.js +0 -1
  40. package/build/static/js/7327.a90bf973.chunk.js +0 -1
  41. package/build/static/js/7913.8561e15c.chunk.js +0 -1
  42. package/build/static/js/8973.a4e2b77d.chunk.js +0 -1
  43. package/build/static/js/9249.9f167db8.chunk.js +0 -1
  44. package/build/static/js/9277.918fef1e.chunk.js +0 -1
  45. package/build/static/js/9366.f160471a.chunk.js +0 -1
  46. package/build/static/js/main.69f96497.js +0 -2
  47. /package/build/static/js/{2311.1fe5b0ce.chunk.js.LICENSE.txt → 2311.3b030a8c.chunk.js.LICENSE.txt} +0 -0
  48. /package/build/static/js/{3826.99a169b4.chunk.js.LICENSE.txt → 3826.4c0cfe41.chunk.js.LICENSE.txt} +0 -0
  49. /package/build/static/js/{6277.06fe2ed5.chunk.js.LICENSE.txt → 6277.0a135bbe.chunk.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4650],{44784:function(e,n,t){var s,a=t(71171),r=t(33028),i=t(59740),o=t(33518),c=t(82790),l=t(96266),p=["labelProps","className","style"];function d(e){var n=e.labelProps,t=e.className,s=e.style,a=(0,i.Z)(e,p),o=(0,r.Z)((0,r.Z)({},n),{},{labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"});return(0,l.jsx)(h,{className:t,style:s,children:(0,l.jsx)(c.Z,(0,r.Z)({labelProps:o},a))})}d.propTypes=c.Z.propTypes,d.defaultProps=c.Z.defaultProps;var h=o.Z.div(s||(s=(0,a.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},34650:function(e,n,t){t.r(n),t.d(n,{default:function(){return We}});var s=t(5057),a=t(33028),r=t(39948),i=t(11750),o=t(68420),c=t(29054),l=t(32723),p=t(34795),d=t(96234),h=t(33665),u=t(44846),f=t(55372),x=t(47020),m=t(28726),g=t(547),v=t(6352),A=t.n(v),y=t(86229),j=t(17682),Z=t(13128),k=t(88574),C=t(35432),B=t(60344),b=t(14491),I=t(58238),S=t(38242);var w=function(e){var n,t,s,a=e.blocklet,r=a.appDid,i=(0,S.getAppName)(a),o=(0,S.getAppDescription)(a),c=null===a||void 0===a||null===(n=a.site)||void 0===n||null===(t=n.domainAliases)||void 0===t||null===(s=t.sort((function(e,n){return e.accessibility.accessible&&n.accessibility.accessible?+e.isProtected-+n.isProtected:+n.accessibility.accessible-+e.accessibility.accessible})))||void 0===s?void 0:s.map((function(e){var n,t=null!==e&&void 0!==e&&null!==(n=e.domainStatus)&&void 0!==n&&n.isHttps?"https://":"http://",s=null===e||void 0===e?void 0:e.value;return"".concat(t).concat(s)})).filter(Boolean),l=null===c||void 0===c?void 0:c[0];return{appDid:r,appName:i,appDescription:o,appUrl:l,scopes:"list:object read:object write:object",referrer:window.location.href,isReady:Boolean(l)}},U=t(84584),R=t(43019),E=t(96266);function D(e){var n=Object.assign({},((0,h.Z)(e),e)),t=(0,c.y0)().blocklet,v=(0,I.h6)().info,S=(0,o.PE)(),D=S.t,F=S.locale,O=(0,s.useState)(""),T=(0,d.Z)(O,2),M=T[0],z=T[1],J=(0,s.useState)(!1),L=(0,d.Z)(J,2),Q=L[0],N=L[1],G=(0,s.useState)(!1),P=(0,d.Z)(G,2),V=P[0],H=P[1],X=(0,s.useState)(""),K=(0,d.Z)(X,2),Y=K[0],W=K[1],q=w({blocklet:t}),_=(0,b.yP)(v),$=(0,R.XN)(),ee=$.spaceGateways,ne=$.addSpaceGateway,te=(0,s.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:A()(C.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(C.PROD_DID_SPACES.CORE_URL).origin,checkFn:B.od.create({baseURL:A()(C.PROD_DID_SPACES.CORE_URL,"space")}).get,messages:{title:D("storage.spaces.provideNFT.title",{appName:q.appName},F),scan:D("storage.spaces.provideNFT.scan",{appName:q.appName},F),confirm:"",success:(0,E.jsx)(i.Z,{gutterBottom:!0,children:D("storage.spaces.provideNFT.success")})},onClose:function(){re((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}))}}),se=(0,d.Z)(te,2),ae=se[0],re=se[1],ie=(0,s.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:D("storage.spaces.authorize.title",{appName:q.appName},F),scan:D("storage.spaces.authorize.scan",{appName:q.appName},F),confirm:"",success:(0,E.jsx)(i.Z,{gutterBottom:!0,children:D("storage.spaces.authorize.success")})},onClose:function(){le((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}))}}),oe=(0,d.Z)(ie,2),ce=oe[0],le=oe[1],pe=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n,t){var s,r;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s=t(n.endpoint),r=n.space?t(n.space):{},e.next=5,de((0,a.Z)((0,a.Z)({endpoint:s},{did:(0,U.LQ)(s),name:"DID Space"}),r));case 5:le((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})})),z(null),re((function(e){return(0,a.Z)((0,a.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,b.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,s,a,r,i,o,c,p;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.endpoint,i=n.name,o=n.did,(c=null===r||void 0===r||null===(t=r.replace(/\/api\/.+/,""))||void 0===t||null===(s=t.trim())||void 0===s?void 0:s.replace(/\/$/,"")).startsWith("http")||(c="https://".concat(c)),e.next=5,(0,U.w2)(c);case 5:if(e.sent){e.next=8;break}return y.Z.error(D("storage.spaces.gateway.add.invalidUrl")),e.abrupt("return");case 8:if(!ee.some((function(e){return e.endpoint===r}))){e.next=12;break}return y.Z.error(D("storage.spaces.gateway.add.duplicate",{name:i})),e.abrupt("return");case 12:return p={name:i,did:o,url:c,endpoint:r},e.next=15,ne(p,r);case 15:y.Z.success(D("storage.spaces.connectedWithName",{name:null!==(a=null===p||void 0===p?void 0:p.name)&&void 0!==a?a:"DID Spaces"}));case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),he=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(){var n,t,s,r;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,N(!0),n=M.startsWith("http")?M:"https://".concat(M),t=(0,U.ag)(n),s=new URL(n).searchParams.get("spaceDid"),e.next=7,(0,U.w2)(t);case 7:if(e.sent){e.next=9;break}throw new Error(D("storage.spaces.gateway.add.invalidUrl"));case 9:le((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!0,prefix:A()(t,"space/api/did"),baseUrl:new URL(t).origin,checkFn:B.od.create({baseURL:A()(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:s}})})),H(!1),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(0),r="".concat(D("storage.spaces.gateway.add.failed",F),": ").concat((0,b.Z)(e.t0)),W(r);case 17:return e.prev=17,N(!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,E.jsxs)(r.Z,{children:[(0,E.jsx)(j.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:function(){re((function(e){return(0,a.Z)((0,a.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,E.jsx)(j.Z.Item,(0,a.Z)((0,a.Z)({sx:{textTransform:"none"},onClick:function(){return H(!0)},size:"small"},n),{},{children:D("storage.spaces.connect.useSpaceGateway")}),"1")],children:(0,E.jsx)(i.Z,{sx:{fontWeight:"bold",textTransform:"none"},children:D("storage.spaces.connect.useWallet")})}),(0,E.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:ae.prefix,open:ae.open,popup:!0,action:ae.action,webWalletUrl:_,baseUrl:ae.baseUrl,checkFn:ae.checkFn,onSuccess:pe,onClose:ae.onClose,checkTimeout:ae.checkTimeout,extraParams:ae.extraParams,messages:ae.messages,locale:F}),(0,E.jsx)(g.default,{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:F}),(0,E.jsxs)(Z.ZP,{title:D("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:V,onClose:function(){return H(!1)},PaperProps:{style:{minHeight:"auto"}},actions:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(m.Z,{onClick:function(e){e.stopPropagation(),H(!1)},color:"inherit",children:D("common.cancel")}),(0,E.jsxs)(m.Z,{onClick:he,color:"primary",disabled:Q||!M,variant:"contained",autoFocus:!0,children:[Q&&(0,E.jsx)(u.Z,{size:16}),D("common.confirm")]})]}),children:[(0,E.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,E.jsx)(f.Z,{component:"div",children:(0,E.jsx)(i.Z,{component:"div",children:(0,E.jsx)(x.Z,{label:D("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:M,onChange:function(e){W(null),z(e.target.value)},disabled:Q,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,he();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),autoFocus:!0})})})}),Boolean(Y)&&(0,E.jsx)(k.Z,{type:"error",style:{width:"100%"},children:Y})]})]})}D.propTypes={},D.defaultProps={};var F,O=D,T=t(71171),M=t(59740),z=t(33518),J=t(55898),L=t.n(J),Q=t(90049),N=t.n(Q),G=t(38898),P=t(64886),V=["blocklet"];function H(e){var n=e.blocklet,t=(0,M.Z)(e,V),r=(0,s.useContext)(o.RD).t;if(!n.diskInfo)return(0,E.jsx)(i.Z,{children:r("blocklet.diskInfo.empty")});var c=function(e,n,t){return(0,E.jsxs)(i.Z,{children:[t?(0,E.jsx)(G.Z,{style:{cursor:"pointer"},onClick:t,underline:"hover",children:e}):e," ",(0,E.jsx)("strong",{children:n?N()(n):"empty"})]})},l=n.environments.reduce((function(e,n){return e[n.key]=n.value,e}),{}),p=[{key:"appDir",name:r("blocklet.diskInfo.appDir"),value:c(l.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:r("blocklet.diskInfo.dataDir"),value:c(l.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:r("blocklet.diskInfo.logDir"),value:c(l.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:r("blocklet.diskInfo.cacheDir"),value:c(l.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return(0,E.jsx)(X,(0,a.Z)((0,a.Z)({component:"div"},t),{},{children:p.map((function(e){return(0,E.jsx)(P.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.key)}))}))}H.propTypes={blocklet:L().object.isRequired},H.defaultProps={};var X=(0,z.Z)(i.Z)(F||(F=(0,T.Z)([""]))),K=function(e){return(0,E.jsxs)("svg",(0,a.Z)((0,a.Z)({},e),{},{children:[(0,E.jsxs)("g",{filter:"url(#a)",children:[(0,E.jsx)("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97z",fill:"#DDD"}),(0,E.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,E.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,E.jsx)("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97z",fill:"#D9D9D9"})}),(0,E.jsxs)("g",{mask:"url(#b)",children:[(0,E.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,E.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,E.jsx)("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568zm11.546-10.102V169h-1.756v-11.636h1.756zM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29z",fill:"#fff"}),(0,E.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,E.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z",fill:"url(#f)"}),(0,E.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,E.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,E.jsx)("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762zM36.355 214h-1.011v7.783h1.01V214zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75zM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894zm6.946 1.803h1.13v1.193h-1.13v-1.193zm1.13 2.983h-1.13v1.193h1.13v-1.193zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751z"})]}),(0,E.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,E.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,E.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26z",fill:"#fff"})]})]}),(0,E.jsxs)("defs",{children:[(0,E.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,E.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,E.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,E.jsx)("feOffset",{dy:"2"}),(0,E.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,E.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,E.jsx)("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),(0,E.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,E.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,E.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,E.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,E.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,E.jsx)("stop",{stopColor:"#101010"}),(0,E.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,E.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,E.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,E.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,E.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,E.jsx)("stop",{stopColor:"#fff"}),(0,E.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,E.jsxs)("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[(0,E.jsx)("stop",{stopColor:"#016BED"}),(0,E.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,E.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,E.jsx)("clipPath",{id:"g",children:(0,E.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,E.jsx)("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um++uKyho0BwmD+1rA90yarpO4ZpjLgs8+BTUfU9w+gkwEi6ftxqyB9Wt6IBstE0E8kxJLeKaVhNA/uEwIslv1JmRwcSzAo+URPCF5M8AGzEF8yG+QVBFl53FqhfYqd7/PM6AmJouW4cVge9pZuMJga2NQH918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WkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]}))};function Y(){var e=(0,o.PE)().t,n=(0,c.y0)().blocklet;return(0,E.jsxs)(r.Z,{children:[(0,E.jsxs)(r.Z,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[(0,E.jsx)(K,{style:{width:200,height:250}}),(0,E.jsx)(i.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.provider")}),(0,E.jsx)(O,{})]}),(0,E.jsx)(i.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,E.jsx)(H,{blocklet:n})]})}K.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"},Y.propTypes={};var W=Y,q=t(72904),_=t(19654),$=t(99154),ee=t(76811),ne=t(79366),te=t(65873),se=t(42876),ae=t(17450),re=t(44784),ie=t(67680),oe=t(61533),ce=t(74490),le=t(46954),pe=t(44067),de=t(83294),he=t(45396),ue=t(14482),fe=t(85733),xe=t(47595),me=t(60939);function ge(e){var n=e.spaceGateway,t=e.onDelete,a=(0,o.PE)().t,r=(0,s.useState)(!1),i=(0,d.Z)(r,2),c=i[0],h=i[1],u=(0,s.useState)(!1),f=(0,d.Z)(u,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(),h(n)},v=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(s){return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,null===s||void 0===s||s.stopPropagation(),m(!0),e.next=5,t(n);case 5:h(!1),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),y.Z.error("".concat(a("storage.space.gateway.delete.failed"),": ").concat((0,b.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,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(ce.Z,{color:"red",onClick:function(e){return g(e,!0)},children:[(0,E.jsx)(le.Z,{style:{minWidth:24,color:"red"},children:(0,E.jsx)(xe.default,{fontSize:"small"})}),(0,E.jsx)(pe.Z,{style:{color:"red"},children:a("common.delete")})]}),(0,E.jsx)(me.Z,{title:a("common.delConfirmDescription",{data:"".concat(null===n||void 0===n?void 0:n.name)}),open:c,confirmButton:{text:a("common.confirm"),props:{variant:"contained",color:"error",loading:x}},cancelButton:{text:a("common.cancel"),props:{variant:"contained",color:"primary"},loading:x},onConfirm:v,onCancel:function(e){return g(e,!1)}})]})}ge.propTypes={onDelete:L().func,spaceGateway:L().shape({name:L().string.isRequired,url:L().string.isRequired,protected:L().bool}).isRequired},ge.defaultProps={onDelete:function(){}};var ve=ge,Ae=["spaceGateway","connected","onDelete","onConnect","enableSwitchToSpace"];function ye(e){var n=e.spaceGateway,t=e.connected,r=e.onDelete,i=e.onConnect,c=e.enableSwitchToSpace,h=(0,M.Z)(e,Ae),f=(0,s.useState)(null),x=(0,d.Z)(f,2),m=x[0],g=x[1],v=(0,o.PE)().t,A=(0,s.useState)(!1),j=(0,d.Z)(A,2),Z=j[0],k=j[1],C=function(e,n){e.stopPropagation(),e.preventDefault(),g(n&&e.currentTarget)},B=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,k(!0),C(t,!1),e.next=5,i(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,k(!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,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ie.Z,(0,a.Z)((0,a.Z)({"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:function(e){return C(e,!0)},size:"small"},h),{},{children:Z||null!==n&&void 0!==n&&n.loading?(0,E.jsx)(u.Z,{size:"24px"}):(0,E.jsx)(de.Z,{})})),(0,E.jsxs)(oe.Z,{id:"simple-menu",anchorEl:m,keepMounted:!0,open:Boolean(m),onClose:function(e){return C(e,!1)},children:[(0,E.jsxs)(ce.Z,{onClick:function(e){C(e,!1),window.open(n.endpoint?(0,U.nD)(n.endpoint):n.url)},children:[(0,E.jsx)(le.Z,{style:{minWidth:24},children:(0,E.jsx)(he.Z,{fontSize:"small"})}),(0,E.jsx)(pe.Z,{children:v("common.open")})]}),(0,E.jsxs)(ce.Z,{onClick:function(e){C(e,!1),window.open((0,U.Xv)(n.endpoint))},children:[(0,E.jsx)(le.Z,{style:{minWidth:24},children:(0,E.jsx)(fe.Z,{fontSize:"small"})}),(0,E.jsx)(pe.Z,{children:v("storage.spaces.strategy.viewBackupFiles")})]}),!t&&c&&(0,E.jsxs)(ce.Z,{onClick:B,children:[(0,E.jsx)(le.Z,{style:{minWidth:24},children:(0,E.jsx)(ue.Z,{fontSize:"small"})}),(0,E.jsx)(pe.Z,{children:v("storage.spaces.connect.switchToSpace")})]}),!t&&(0,E.jsx)(ve,{spaceGateway:n,onDelete:r})]})]})}ye.propTypes={spaceGateway:L().shape({name:L().string.isRequired,url:L().string.isRequired,protected:L().bool,endpoint:L().string.isRequired,loading:L().bool}).isRequired,connected:L().bool.isRequired,enableSwitchToSpace:L().bool,onDelete:L().func,onConnect:L().func},ye.defaultProps={onDelete:function(){},onConnect:function(){},enableSwitchToSpace:!0};var je=ye,Ze=t(54063),ke=t(22256),Ce=t(37541),Be=t(7278),be=t(29042),Ie=function(e){return(0,E.jsxs)("svg",(0,a.Z)((0,a.Z)({},e),{},{children:[(0,E.jsxs)("g",{filter:"url(#a)",children:[(0,E.jsx)("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97z",fill:"#DDD"}),(0,E.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,E.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,E.jsx)("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97z",fill:"#D9D9D9"})}),(0,E.jsxs)("g",{mask:"url(#b)",children:[(0,E.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,E.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,E.jsx)("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568zm11.546-10.102V169h-1.756v-11.636h1.756zM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29z",fill:"#fff"}),(0,E.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,E.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z",fill:"url(#f)"}),(0,E.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,E.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,E.jsx)("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762zM36.355 214h-1.011v7.783h1.01V214zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75zM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894zm6.946 1.803h1.13v1.193h-1.13v-1.193zm1.13 2.983h-1.13v1.193h1.13v-1.193zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751z"})]}),(0,E.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,E.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,E.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26z",fill:"#fff"})]})]}),(0,E.jsxs)("defs",{children:[(0,E.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,E.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,E.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,E.jsx)("feOffset",{dy:"2"}),(0,E.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,E.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,E.jsx)("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),(0,E.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,E.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,E.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,E.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,E.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,E.jsx)("stop",{stopColor:"#101010"}),(0,E.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,E.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,E.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,E.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,E.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,E.jsx)("stop",{stopColor:"#fff"}),(0,E.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,E.jsxs)("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[(0,E.jsx)("stop",{stopColor:"#016BED"}),(0,E.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,E.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,E.jsx)("clipPath",{id:"g",children:(0,E.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,E.jsx)("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEE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dCgW7njgiikAKvGH0fRKr9cXmycUjU8xfeY87PIXB3q1TK2GWGjxhtr146ZKTKWPp9sR8MWBNzQTNNrIt4XCVHh+OwfYAo9QybSeFUX5a9bl1On+cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]}))};function Se(e){var n=e.src,t=e.alt,a=(0,s.useState)(!1),r=(0,d.Z)(a,2),i=r[0],o=r[1],c=(0,s.useState)(!1),l=(0,d.Z)(c,2),p=l[0],h=l[1],u=function(){return h(!0)},f=function(){return h(!1)};return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ke.Z,{ready:i,customPlaceholder:(0,E.jsx)("img",{style:{cursor:"pointer"},alt:t,src:n,width:"58px",height:"58px",onError:function(){return o(!0)},onClick:u}),children:(0,E.jsx)(Ie,{style:{cursor:"pointer",width:"58px",height:"58px"},onClick:u})}),(0,E.jsx)(Ce.Z,{open:p,onClose:f,"aria-labelledby":"preview-space-nft-display","aria-describedby":"preview space nft display",fullWidth:!0,maxWidth:"md",children:(0,E.jsxs)(Be.Z,{style:{padding:"8px 8px",backgroundColor:"rgba(0,0,0,0.8)"},children:[(0,E.jsx)(ie.Z,{color:"inherit",onClick:f,"aria-label":"close",style:{position:"absolute",top:8,right:8,color:"white"},children:(0,E.jsx)(be.Z,{})}),i?(0,E.jsx)(Ie,{style:{width:"100%",height:"75vh"}}):(0,E.jsx)("img",{src:n,alt:"",style:{width:"100%",height:"75vh",objectFit:"contain"}})]})})]})}Ie.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"},Se.propTypes={src:J.string.isRequired,alt:J.string.isRequired};var we,Ue=Se,Re=["spaceGateway","connected","onDelete","onBackupNow"],Ee=function(e){return(0,E.jsx)("svg",(0,a.Z)((0,a.Z)({},e),{},{children:(0,E.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})}))};Ee.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var De=function(e){return(0,E.jsx)("svg",(0,a.Z)((0,a.Z)({},e),{},{children:(0,E.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})}))};function Fe(e){var n=e.spaceGateway,t=e.connected,h=e.onDelete,u=e.onBackupNow,f=(0,M.Z)(e,Re),x=(0,q.Z)((function(e){return e.breakpoints.down("md")})),v=(0,o.PE)(),j=v.t,Z=v.locale,k=(0,c.y0)().blocklet,C=(0,I.h6)(),b=C.api,S=C.info.did,D=w({blocklet:k}),F=D.appDid,O=D.appName,T=D.appDescription,z=D.scopes,J=D.appUrl,L=D.referrer,Q=(0,R.XN)(),N=Q.updateSpaceGateway,G=Q.backupEndpoint,P=Q.backupProgress,V=Q.refreshBackupEndpoint,H=(0,s.useState)(!1),X=(0,d.Z)(H,2),K=X[0],Y=X[1],W=(0,s.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:j("storage.spaces.authorize.title",{appName:O},Z),scan:j("storage.spaces.authorize.scan",{appName:O},Z),confirm:"",success:(0,E.jsx)(i.Z,{gutterBottom:!0,children:j("storage.spaces.authorize.success")})},onClose:function(){ce((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}))}}),ie=(0,d.Z)(W,2),oe=ie[0],ce=ie[1],le=(0,ne.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,U.Nb)(G));case 3:case"end":return e.stop()}}),e)}))),{refreshDeps:[t,G,null===oe||void 0===oe?void 0:oe.open,K]}),pe=le.data,de=le.loading,he=t&&pe,ue=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,U.Nb)(null===n||void 0===n?void 0:n.endpoint);case 2:if(!e.sent){e.next=9;break}return e.next=6,b.configBlocklet({input:{did:[k.meta.did],configs:[{key:ee.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 6:return V(),y.Z.success(j("storage.spaces.connect.switchToSpaceSucceeded",{name:n.name?"(".concat(n.name,")"):""})),e.abrupt("return");case 9:ce((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!0,prefix:A()(n.url,"space/api/did"),baseUrl:new URL(n.url).origin,checkFn:B.od.create({baseURL:A()(n.url,"space")}).get,extraParams:{appDid:F,appName:O,appDescription:T,scopes:z,appUrl:J,referrer:L,nodeDid:S,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,s){var r,i,o,c,p,d;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=s(t.endpoint),c=(0,U.LQ)(o),p=t.space?s(t.space):{},!n.did||c===n.did){e.next=7;break}return ce((function(e){return(0,a.Z)((0,a.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,a.Z)((0,a.Z)({},n),{},{name:null!==(r=p.name)&&void 0!==r?r:"DID Space",did:null!==(i=p.did)&&void 0!==i?i:(0,U.LQ)(o),endpoint:o}),e.next=10,N(d);case 10:ce((function(e){return(0,a.Z)((0,a.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 Y(!0),e.next=6,u();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,Y(!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,s.useEffect)((function(){null!==P&&void 0!==P&&P.completed?(100===(null===P||void 0===P?void 0:P.progress)?y.Z.success(j("storage.spaces.backupSuccessfully")):-1===(null===P||void 0===P?void 0:P.progress)&&y.Z.error(null===P||void 0===P?void 0:P.message),Y(!1),P.progress=0,P.message=""):P.progress&&Y(!0)}),[P]),(0,E.jsxs)(Oe,{style:{position:"relative"},children:[(0,E.jsxs)(r.Z,(0,a.Z)((0,a.Z)({sx:{backgroundColor:t?"#F0FDFF":"inherit","&:hover":{backgroundColor:t?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px"},f),{},{children:[(0,E.jsx)(r.Z,{display:"flex",children:(0,E.jsx)(Ue,{alt:n.did,src:(0,U.Jf)(n.endpoint)})}),(0,E.jsxs)(r.Z,{className:"spaces-info",display:"flex",flexGrow:(!x||!fe)&&1,minWidth:"180px",flexDirection:fe?"row":"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[(0,E.jsxs)(r.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,E.jsx)(i.Z,{color:t?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:n.name}),he&&(0,E.jsx)(_.Z,{label:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Ee,{style:{marginRight:"4px"}}),j("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}}),xe&&(0,E.jsx)(_.Z,{label:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(De,{style:{marginRight:"4px"}}),j("storage.spaces.disconnected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:"20px",fontWeight:"bold"}})]}),(0,E.jsx)(r.Z,{className:"spaces-address",display:fe?"none":"flex",color:"#9397A1",marginTop:"8px",children:(0,E.jsx)(i.Z,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:n.did&&(0,E.jsx)(ae.Z,{copyable:!1,size:14,compact:!0,responsive:!1,did:n.did})})})]}),(0,E.jsxs)(r.Z,{className:"spaces-backup",display:"flex",alignItems:"center",flex:x&&fe&&1,children:[ue&&(0,E.jsxs)(r.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:[(0,E.jsx)(m.Z,{variant:"contained",size:"small",onClick:ve,children:j("storage.spaces.strategy.backupNow")}),Ze.C&&(0,E.jsx)(re.Z,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:(0,E.jsx)(i.Z,{sx:{marginRight:"8px",fontSize:"16px"},children:(0,E.jsx)("span",{children:j("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),fe&&(0,E.jsxs)(r.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,E.jsx)(i.Z,{color:"primary",children:null===P||void 0===P?void 0:P.message}),(0,E.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[(0,E.jsx)(r.Z,{sx:{width:"100%",mr:1},children:(0,E.jsx)($.Z,{color:"primary",variant:"determinate",value:null===P||void 0===P?void 0:P.progress})}),(0,E.jsx)(r.Z,{sx:{maxWidth:"100%"},children:(0,E.jsxs)(i.Z,{variant:"body2",color:"text.secondary",children:[null===P||void 0===P?void 0:P.progress,"%"]})})]})]}),xe&&(0,E.jsx)(r.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:(0,E.jsx)(m.Z,{color:"error",variant:"contained",size:"small",onClick:me,children:j("storage.spaces.disconnected.reconnectNow")})}),(0,E.jsx)(je,{sx:{marginLeft:"16px",marginRight:"16px",alignItems:"flex-end",justifyItems:"flex-end"},spaceGateway:n,connected:t,onDelete:h,onConnect:me,enableSwitchToSpace:(null===P||void 0===P?void 0:P.completed)||(0,te.isEmpty)(null===P||void 0===P?void 0:P.message)})]})]})),(0,E.jsx)(g.default,{forceConnected:!1,saveConnect:!1,prefix:oe.prefix,open:oe.open,popup:!0,action:oe.action,baseUrl:oe.baseUrl,checkFn:oe.checkFn,onSuccess:ge,onClose:oe.onClose,checkTimeout:oe.checkTimeout,extraParams:oe.extraParams,messages:oe.messages,locale:Z},"get-endpoint"),(0,E.jsx)(r.Z,{className:"selected-container ".concat(t?"selected":""),children:(0,E.jsx)(se.default,{className:"selected-icon"})})]})}De.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Fe.propTypes={spaceGateway:L().shape({did:L().string.isRequired,name:L().string.isRequired,url:L().string.isRequired,endpoint:L().string.isRequired,protected:L().bool,loading:L().bool}).isRequired,connected:L().bool.isRequired,progress:L().any.isRequired,onDelete:L().func,onBackupNow:L().func},Fe.defaultProps={onDelete:function(){},onBackupNow:function(){}};var Oe=(0,z.Z)(r.Z)(we||(we=(0,T.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"]))),Te=Fe,Me=t(19778),ze=t(75760),Je=t(75239),Le=t(21722),Qe=t(1577),Ne=t.n(Qe),Ge=t(73119);function Pe(e){var n=Object.assign({},((0,h.Z)(e),e)),t=(0,o.PE)(),s=t.t,c=t.locale,l=(0,R.XN)(),p=l.spaceGateways,d=l.backups,f=[{label:"DID Spaces",name:"target",options:{customBodyRenderLite:function(e){var n,t=d[e],s=t.targetUrl,a=t.targetName,r=t.status,o=t.createdAt,c=r===C.BACKUPS.STATUS.PROGRESS&&Ne()().diff(o,"hours")>=C.BACKUPS.TIMEOUT_HOURS,l=r===C.BACKUPS.STATUS.SUCCEEDED&&!c,h=a||(null===(n=p.find((function(e){return null===s||void 0===s?void 0:s.includes((0,U.LQ)(null===e||void 0===e?void 0:e.endpoint))})))||void 0===n?void 0:n.name)||"Unknown DID Space";return l?(0,E.jsx)(G.Z,{fontSize:"16px",href:s,target:"_blank",children:h}):(0,E.jsx)(i.Z,{variant:"body1",fontSize:"16px",children:h})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:function(e){var n=s(0===e?"common.auto":"common.manual");return(0,E.jsx)(Me.Z,{children:n})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:function(e){return Ne()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:function(e){return(0,te.isEmpty)(e)?"":Ne()(e).format("YYYY-MM-DD HH:mm:ss")}}},{label:s("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:{},a=t.status,o=t.message,c=t.createdAt,l=a===C.BACKUPS.STATUS.PROGRESS&&Ne()().diff(c,"hours")>=C.BACKUPS.TIMEOUT_HOURS,p=l&&s("common.timeoutError"),h=a===C.BACKUPS.STATUS.PROGRESS&&!l,f=a===C.BACKUPS.STATUS.SUCCEEDED&&!l;return h?(0,E.jsxs)(i.Z,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[(0,E.jsx)(u.Z,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):f?(0,E.jsx)(Me.Z,{type:"success",children:s("common.succeeded")}):(0,E.jsxs)(r.Z,{display:"inline-flex",alignItems:"center",children:[(0,E.jsx)(Me.Z,{type:"error",children:s("common.failed")})," \xa0",(0,E.jsx)(Je.Z,{style:{display:"flex",alignItems:"center",flexShrink:0},title:o||p,children:(0,E.jsx)(Le.Z,{children:(0,E.jsx)(Ge.Z,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return(0,E.jsx)(r.Z,(0,a.Z)((0,a.Z)({},n),{},{children:null!==d&&void 0!==d&&d.length?(0,E.jsx)(ze.Z,{title:(0,E.jsx)(i.Z,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")}),data:d,columns:f,emptyNode:s("storage.spaces.record.emptyData",c),options:{download:!1,filter:!1,print:!1}}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r.Z,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:(0,E.jsx)(i.Z,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),(0,E.jsx)(r.Z,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})}))}Pe.propTypes={};var Ve=Pe;function He(e){var n=Object.assign({},((0,h.Z)(e),e)),t=(0,o.PE)().t,s=(0,R.XN)(),r=s.autoBackup,c=s.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=!r.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,E.jsx)(re.Z,{checked:Boolean(null===r||void 0===r?void 0:r.enabled),onChange:d,name:"enableWelcomePage",labelProps:{label:(0,E.jsx)(i.Z,{marginRight:"8px",children:(0,E.jsx)("span",{children:t("storage.spaces.autoBackup.title")})})},style:(0,a.Z)({},n.style)})}He.propTypes={};var Xe=He;var Ke=function(){var e=(0,o.PE)().t,n=(0,c.y0)().blocklet,t=(0,I.h6)().api,s=(0,R.XN)(),a=s.spaceGateways,d=s.spaceGatewaysLoading,h=s.deleteSpaceGateway,f=s.spaceGatewayIsSelected,x=d&&!(null!==a&&void 0!==a&&a.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,h(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,E.jsxs)(r.Z,{display:"flex",flexDirection:"column",children:[(0,E.jsxs)(r.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[(0,E.jsx)(i.Z,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:e("storage.spaces.connected.title")}),(0,E.jsx)(Xe,{style:{marginRight:"32px"}}),(0,E.jsx)(O,{})]}),(0,E.jsx)(r.Z,{children:x?(0,E.jsx)(r.Z,{display:"flex",justifyContent:"center",children:(0,E.jsx)(u.Z,{})}):a.map((function(e){return(0,E.jsx)(Te,{style:{marginTop:"12px"},spaceGateway:e,connected:f(e),onDelete:m,onBackupNow:g},e.endpoint)}))}),(0,E.jsx)(Ve,{sx:{marginTop:"24px"}}),(0,E.jsx)(i.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,E.jsx)(H,{blocklet:n})]})};function Ye(){return(0,R.XN)().backupEndpoint?(0,E.jsx)(Ke,{}):(0,E.jsx)(W,{})}Ye.propTypes={};var We=Ye},54063:function(e,n,t){t.d(n,{C:function(){return s}});var s="true"===localStorage.getItem("enableDebug")}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4775],{19371:function(n,e,t){var i=t(38636).default,o=t(73408).default,r=t(814).default,a=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.splitNavigationBySection=e.flattenNavigation=e.checkLink=e.joinLink=e.cleanOrphanNavigation=e.filterNavigation=e.nestNavigationList=e.isMatchSection=e.deepWalk=e.parseNavigation=void 0;var l=a(t(10905)),c=a(t(50482)),s=a(t(8708)),u=a(t(3785)),d=a(t(24914)),f=a(t(25842)),v=a(t(6352)),m=a(t(56977)),p=a(t(6018)),h=t(65873),g=a(t(32828)),x=t(45239);Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return x.checkLink}});var k="header",b="/",j="/",Z="/";function y(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.key,o=void 0===i?"children":i,r=t.order,a=void 0===r?"first":r;!function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.index,l=void 0===r?0:r,c=i.parent,s=void 0===c?null:c,u=i.level,d=void 0===u?0:u;Array.isArray(t)?t.forEach((function(e,t){n(e,{index:t,parent:s,level:d+1})})):t&&("first"===a&&e(t,s,{index:l,level:d}),n(t[o],{parent:t,level:d}),"last"===a&&e(t,s,{index:l,level:d}))}(n)}function L(n,e){return!(e!==k||!(0,u.default)(n))||(Array.isArray(n)?n.includes(e):n===e)}function N(n){try{return JSON.parse(n)}catch(e){return n}}function S(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,p.default)(e||""))return e;var t=m.default.join(n,e||j);return t.length>1&&t.endsWith("/")?t.slice(0,t.length-1):t}function w(n,e){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).strict,i=n,r=e;return void 0===t||t||(i=i||"/",r=r||"/"),(0,h.isObject)(i)&&(0,h.isString)(r)&&(0,x.checkLink)(r)?Object.keys(i).reduce((function(n,e){return n[e]=S(i[e],r),n}),{}):(0,h.isString)(i)&&(0,x.checkLink)(i)&&(0,h.isObject)(r)?Object.keys(r).reduce((function(n,e){return n[e]=S(i,r[e]),n}),{}):(0,h.isString)(i)&&(0,h.isString)(r)?(0,x.checkLink)(i)||(0,x.checkLink)(r)?S(i,r):r:(0,h.isObject)(i)&&(0,h.isObject)(r)?o(new Set([].concat(o(Object.keys(i)),o(Object.keys(r))))).reduce((function(n,e){return n[e]=S(i[e],r[e]),n}),{}):r}function P(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.depth,i=void 0===t?1:t,r=e.transform,a=void 0===r?function(n){return n}:r,l=(0,f.default)(n),c=[];return y(l,(function(n,e,t){var r=t.level;if(r>=i){var l=n.items,s=void 0===l?[]:l;if(s&&Array.isArray(s)&&s.length>0){delete n.items;var u=s.map((function(e){return a(e,n)}));if(e){var f;(f=e.items).push.apply(f,o(u))}else{var v=a((0,d.default)(n,["items"]),e);c.push.apply(c,[v].concat(o(u)))}}else if(1===r){var m=a((0,d.default)(n,["items"]),e);c.push(m)}}else 1===r&&c.push(n)}),{key:"items",order:"last"}),c}function C(n){var e,t=(0,f.default)(n),a=[],l=i(t);try{var c=function(){var n=e.value,t=(0,f.default)((0,d.default)(n,["items"])),l=[];function c(n,e){var i=function(n,e){return e&&Array.isArray(n.items)?n.items.filter((function(t){return(0,u.default)(t.section)?L(n.section,e):!!L(t.section,e)})).map((function(n){return r(r({},n),{},{section:e})})):[]}(n,e);l.push(r(r({},t),{},{section:e,items:i}))}if(Array.isArray(n.section)){var s,v=i(n.section);try{for(v.s();!(s=v.n()).done;){c(n,s.value)}}catch(x){v.e(x)}finally{v.f()}}else if(n.section){c(n,n.section)}else if(n.items&&n.items.length>0){var m,p=n.items.reduce((function(n,e){var t=(e||{}).section,i=void 0===t?[k]:t;return n.push.apply(n,o(i)),n}),[]),h=o(new Set(p)),g=i(h);try{for(g.s();!(m=g.n()).done;){c(n,m.value)}}catch(x){g.e(x)}finally{g.f()}}else l.push(r(r({},n),{},{section:k}));a.push.apply(a,l)};for(l.s();!(e=l.n()).done;)c()}catch(s){l.e(s)}finally{l.f()}return a}function O(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=(0,f.default)(n);return e.reduceRight((function(n,t,i){if(t.parent){var r=e.find((function(n){return t.section&&n.section?n.section===t.section&&n.id===t.parent:n.id===t.parent}));r&&(r.items||(r.items=[]),r.items=[t].concat(o(r.items))),e.splice(i,1)}return null}),null),e}e.deepWalk=y,e.isMatchSection=L,e.joinLink=function(n,e){var t=(0,f.default)(n);return y(t,(function(n,t){var i=n.component||n.child;if(i){var o=e.find((function(n){return n.name===i}));o&&(n.link=w(o.link,n.link,{strict:!1}))}else t&&(n.link=w(t.link,n.link))}),{key:"items"}),t},e.flattenNavigation=P,e.splitNavigationBySection=C,e.nestNavigationList=O,e.filterNavigation=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=O(n);return y(t,(function(n){if(null!==n&&void 0!==n&&n.component&&(e.some((function(e){return e.name===n.component}))||(n.visible=!1)),n.items&&n.items.length)for(var t=n.items.length-1;t>=0;t--)!1===n.items[t].visible&&n.items.splice(t,1)}),{key:"items"}),t.filter((function(n){var e;return!1!==n.visible&&!(n.items&&Array.isArray(n.items)&&n.items.length>0&&null!==(e=n.items)&&void 0!==e&&e.every((function(n){return!1===n.visible})))}))},e.cleanOrphanNavigation=function(n){return n.map((function(n){return n.items&&Array.isArray(n.items)&&1===n.items.length&&["header","footer","",void 0,null].includes(n.section)?n.items[0]:n}))},e.parseNavigation=function(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).beforeProcess,a=void 0===t?function(n){return n}:t,u=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],t=function t(a){var l,c,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=[],d=a.children,m=void 0===d?[]:d,p=a.meta,h=void 0===p?{}:p,x=(0,f.default)((null===h||void 0===h?void 0:h.navigation)||[]);(0,g.default)(h)&&!1!==(null===(l=a.meta)||void 0===l||null===(c=l.capabilities)||void 0===c?void 0:c.navigation)&&u.push.apply(u,o(x));var Z,y=s.name||"",L=s.mountPoint||b,N=a===n?"":h.name||"",S=a===n?"":a.mountPoint||b,w=i(m);try{var P=function(){var n,i,a,l,c=Z.value;if(!(0,g.default)(c.meta))return"continue";var s=c.meta.name,d=c.mountPoint,f=[y,N,s].filter(Boolean).join("."),m=c.meta.navigation||[],p=(0,v.default)(L,S,d);!1!==(null===(n=c.meta)||void 0===n||null===(i=n.capabilities)||void 0===i?void 0:i.navigation)&&e.push({did:c.meta.did,name:f,link:p,title:c.meta.title||"",navigation:m.map((function(n){return r({section:k},n)}))});var h=x.find((function(n){return!!n.component&&n.component===s}));if(h){if(!h.link)if(c.meta.navigation&&c.meta.navigation.length>0){var b,w,P=t(c,{mountPoint:S,name:N});P.length>0&&(h.items=null!==(b=h.items)&&void 0!==b?b:[],(w=h.items).push.apply(w,o(P)))}else h.link=j}else if(!1!==(null===(a=c.meta)||void 0===a||null===(l=a.capabilities)||void 0===l?void 0:l.navigation)){var C=t(c,{mountPoint:S,name:N}),O={title:c.meta.title,component:s,id:c.meta.did};C.length>0?(O.items=C,O.link=void 0):O.link=j,u.push(O)}};for(w.s();!(Z=w.n()).done;)P()}catch(C){w.e(C)}finally{w.f()}return u}(n);return{navigationList:t,components:e}}(e),d=u.navigationList,m=u.components,p=(null===e||void 0===e||null===(n=e.settings)||void 0===n?void 0:n.navigations)||[],h=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=P((0,f.default)(n),{depth:e,transform:function(n,e){var t;return e&&(n._parent||(n._parent=e.id,e.component||(n.link=w(e.link,n.link))),n.section=n.section||e.section||[k],n.visible=null!==(t=n.visible)&&void 0!==t?t:e.visible),n.component=[e.component,n.component].filter(Boolean).join("."),n}});return y(t,(function(n){n.items&&n.items.length>0&&n.items.reduceRight((function(e,t){if(t._parent){var i=n.items.findIndex((function(n){return n.id===t._parent}));i>=0&&n.items.splice(i,1),delete t._parent}return null}),null)}),{key:"items"}),t}(a(d)),x=P(C(function(n){var e=(0,f.default)(n).filter((function(n){return n.id}));return y(e,(function(n,e){var t;if(n.items&&n.items.length){for(var i=n.items.length-1;i>=0;i--)n.items[i].id||n.items.splice(i,1);0===n.items.length&&n.component&&(n.link=n.link||j)}e&&(n.parent=e.id,n.id=[e.id,n.id].join(Z)),n.from=n.from||"yaml",n.visible=null===(t=n.visible)||void 0===t||t}),{key:"items"}),e}(h)).reduce((function(n,e){var t=["bottom","social","sessionManager"].includes(e.section),i=!1,a=m.find((function(n){return"/"===n.link}));if(a&&e.id===a.did&&(i=!0),t||i){if(e.items&&e.items.length>0)return n.push.apply(n,o(e.items.map((function(n){var t=e.section,i=w(e.link,n.link),o=[e.component,n.component].filter(Boolean).join(".");return r(r({},n),{},{section:t,link:i,component:o,parent:""})})))),n;if(i)return n}return n.push(e),n}),[]),{transform:function(n,e){var t=n.component;return null!==e&&void 0!==e&&e.component&&(t=[e.component,n.component].filter(Boolean).join(".")),r(r({},n),{},{component:t})}});return{navigationList:(0,l.default)(p.map((function(n){var e=r({},n);return e.role&&(e.role=N(e.role)),e.section&&(e.section=N(e.section)),e.title&&(e.title=N(e.title)),e.link&&(e.link=N(e.link)),e})),x,(function(n,e){var t=["id","section"];return(0,c.default)((0,s.default)(n,t),(0,s.default)(e,t))})),components:m,builtinList:x}}},14775:function(n,e,t){t.r(e),t.d(e,{default:function(){return ge}});var i=t(33028),o=t(32723),r=t(34795),a=t(5057),l=t(39948),c=t(56556),s=t(49127),u=t(80576),d=t(6041),f=t(74490),v=t(25228),m=t(51177),p=t(95301),h=t(11750),g=t(39067),x=t(86229),k=t(55498),b=t(12673),j=t(13128),Z=t(68420),y=t(54130),L=t(92706),N=t.n(L),S=t(55898),w=t.n(S),P=t(53210),C=t(86272),O=t.n(C),E=t(26271),A=t.n(E),R=t(50482),T=t.n(R),_=t(20877),I=t(36095),M=t(96266);function D(n){var e=n.prevPath,t=n.nextPath,i=e.length,o=t.length;return!(i!==o||!T()(e.slice(0,i-1),t.slice(0,o-1)))}function W(n){var e=n.treeNode,t=(0,Z.PE)().locale;return(0,M.jsxs)(M.Fragment,{children:[e.icon&&(0,M.jsx)(k.JO,{style:{marginRight:4},icon:e.icon}),function(){var n=e.title,i=e.subtitle,o=n,r=i;return A()(n)&&(o=n[t]),!(0,a.isValidElement)(i)&&A()(i)&&(r=i[t]),(0,M.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,M.jsx)(h.Z,{variant:"subtitle1",fontSize:16,children:o}),i&&(0,M.jsx)(h.Z,{variant:"body2",color:"gray",ml:1.5,lineHeight:1,children:r})]})}()]})}function z(n){var e=n.treeData,t=n.setTreeData,o=n.renderActions,r=e.map((function(n){return(0,i.Z)((0,i.Z)({},n),{},{expanded:!0})})),a={};return"undefined"!==typeof window&&(a.context=window),(0,M.jsx)(I.W,(0,i.Z)((0,i.Z)({backend:_.HTML5Backend},a),{},{children:(0,M.jsx)(P.oP,{generateNodeProps:function(n){return{buttons:o({data:n.node,className:"list-item-actions"}),icons:(0,M.jsx)(k.JO,{icon:"ic:round-drag-indicator"}),title:(0,M.jsx)(W,{treeNode:n.node})}},maxDepth:2,isVirtualized:!1,treeData:r,onChange:t,canDrop:D,theme:O()})}))}W.propTypes={treeNode:w().object.isRequired},z.propTypes={treeData:w().object.isRequired,setTreeData:w().func,renderActions:w().func},z.defaultProps={setTreeData:function(){},renderActions:function(){}};var J=z,F=t(96234),B=t(56666),q=t(28726),G=t(75953),V=t(67680),K=t(53070),H=t(47020),U=t(41899),Q=t(11251),Y=t(24914),X=t.n(Y),$=t(8708),nn=t.n($),en=t(82488),tn=t.n(en),on=t(78164),rn=t.n(on),an=t(75506),ln=t.n(an),cn=t(2765),sn=t.n(cn),un=t(25842),dn=t.n(un),fn=t(95550),vn=t(19371),mn=t(6352),pn=t.n(mn),hn=t(2842),gn=t(6018),xn=t.n(gn),kn=t(76811),bn=t(68079),jn=t(63838),Zn=t(65873),yn=t(27156),Ln=t(23985),Nn=t(11819),Sn=t(59740),wn=t(19654),Pn=t(90067),Cn=t(44067),On=t(12594),En=["fullWidth","multiple","required","label","placeholer","options","helperText","error","margin"];function An(n){var e=n.fullWidth,t=n.multiple,o=n.required,r=n.label,a=n.placeholer,c=n.options,s=n.helperText,v=n.error,p=n.margin,g=(0,Sn.Z)(n,En),x=c.find((function(n){return n.value===g.value})),k=null===x||void 0===x?void 0:x.title;return(0,M.jsxs)(u.Z,{margin:p,fullWidth:e,error:v,children:[(0,M.jsx)(d.Z,{children:"".concat(r).concat(o?"*":"")}),(0,M.jsxs)(m.Z,(0,i.Z)((0,i.Z)({multiple:t,input:(0,M.jsx)(On.Z,{defaultValue:k,sx:{flex:1},required:o,label:r,inputProps:{margin:p}}),renderValue:function(n){if(t)return(0,M.jsx)(l.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:n.map((function(n){var e=c.find((function(e){return e.value===n}));return e&&e.title&&(0,M.jsx)(wn.Z,{size:"small",label:e.title},n)}))});var e=c.find((function(e){return e.value===n}));return e&&e.title&&(0,M.jsxs)(l.Z,{children:[(0,M.jsx)(h.Z,{component:"span",children:e.title}),(0,M.jsx)(h.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:e.description})]})}},g),{},{children:[(0,M.jsx)(f.Z,{disabled:!0,children:(0,M.jsx)("em",{children:a})}),!t&&(0,M.jsx)(f.Z,{value:"",children:"None"}),c.map((function(n){return n&&n.value&&(0,M.jsxs)(f.Z,{value:n.value,children:[(0,M.jsx)(Cn.Z,{children:n.title}),n.description&&(0,M.jsx)(h.Z,{variant:"body2",color:"text.secondary",children:n.description})]},n.value)}))]})),(0,M.jsx)(Pn.Z,{children:s})]})}An.propTypes={error:w().bool,required:w().bool,multiple:w().bool,fullWidth:w().bool,label:w().string,placeholer:w().string,options:w().array,helperText:w().string,margin:w().string},An.defaultProps={error:!1,required:!1,multiple:!1,fullWidth:!1,label:"",placeholer:"",options:[],helperText:"",margin:""};var Rn=An,Tn="en";function _n(n){var e=n.sx,t=n.onAdd,i=n.onChange,o=n.locales,r=n.localeMap,s=n.onRemoveLocale,u=(0,Z.PE)().t,d=(0,a.useRef)(),f=(0,a.useState)(null),v=(0,F.Z)(f,2),m=v[0],p=v[1],g=(0,b.Z)({currentLocale:Tn,localeList:[],inputLocale:"",localeError:""}),x=(0,a.useMemo)((function(){return!!m}),[m]),j=(0,a.useMemo)((function(){return o.includes(g.currentLocale)?g.currentLocale:Tn}),[o,g.currentLocale]),y=(0,a.useMemo)((function(){return Object.keys((0,Zn.omit)(r,[].concat((0,bn.Z)(g.localeList),[Tn]))).map((function(n){return{title:r[n],value:n}}))}),[g.localeList]);function L(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=function(n){return n?"en"!==n&&!g.localeList.includes(n)||u("navigation.form.localeExists",{value:n}):u("common.requiredErrorText",{name:"Locale"})}(null===n||void 0===n?void 0:n.trim());return g.localeError=!0!==e?e:"",e}function N(){var n,e=null===(n=g.inputLocale)||void 0===n?void 0:n.trim();!0===L(e)&&(S(),g.localeList.push(e),g.currentLocale=e,t(e))}function S(){p(null),g.inputLocale="",g.localeError=""}return(0,a.useEffect)((function(){g.localeList=(0,bn.Z)(o)}),[o,g]),(0,jn.Z)("enter",(function(){setTimeout((function(){N()}))}),{target:d}),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(yn.Z,{sx:e,value:j,onChange:function(n,e){g.currentLocale=e,i(e)},children:[(0,M.jsx)(Ln.Z,{label:"Default (".concat(r[Tn],")"),value:"en"}),g.localeList.map((function(n){return(0,M.jsx)(Ln.Z,{sx:{position:"relative"},label:(0,M.jsxs)(M.Fragment,{children:[r[n],(0,M.jsx)(V.Z,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:function(e){!function(n,e){n.preventDefault(),n.stopPropagation(),g.localeList=(0,Zn.without)(g.localeList,e),s(e),e===g.currentLocale&&(g.currentLocale=Tn)}(e,n)},children:(0,M.jsx)(k.JO,{icon:"mdi:close",height:14})})]}),value:n},n)})),(0,M.jsx)(V.Z,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:function(n){p(n.currentTarget)},children:(0,M.jsx)(k.JO,{icon:"mdi:plus"})})]}),(0,M.jsx)(Nn.ZP,{open:x,anchorEl:m,onClose:S,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,M.jsxs)(l.Z,{sx:{p:2,width:"270px"},children:[(0,M.jsx)(h.Z,{variant:"subtitle2",children:u("navigation.form.localePlaceholder")}),(0,M.jsx)(l.Z,{mt:1,children:(0,M.jsx)(Rn,{required:!0,fullWidth:!0,label:"Locale",value:g.inputLocale,options:y,onChange:function(n){var e=n.target.value;L(e),g.inputLocale=e},error:!!g.localeError,helperText:g.localeError||" "})}),(0,M.jsx)(l.Z,{display:"flex",justifyContent:"flex-end",children:(0,M.jsx)(c.Z,{size:"small",variant:"contained",onClick:N,children:u("common.confirm")})})]})})]})}_n.propTypes={sx:w().any,onAdd:w().func,onChange:w().func,onRemoveLocale:w().func,localeMap:w().object,locales:w().array},_n.defaultProps={sx:null,onAdd:function(){},onChange:function(){},onRemoveLocale:function(){},localeMap:{},locales:[]};var In=_n,Mn=t(17425),Dn=t(29054),Wn="en",zn={title:(0,B.Z)({},Wn,""),link:(0,B.Z)({},Wn,"")};function Jn(n){var e=n.icon,t=(0,a.useState)(!1),i=(0,F.Z)(t,2),l=i[0],c=i[1];return(0,U.Z)((0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!1),n.next=3,(0,k.GL)(e);case 3:c(!0);case 4:case"end":return n.stop()}}),n)}))),[e]),e?l?(0,M.jsx)(k.JO,{icon:e}):(0,M.jsx)(k.JO,{color:"#f06f6e",icon:"ic:baseline-error"}):(0,M.jsx)(k.JO,{icon:"codicon:blank"})}Jn.propTypes={icon:w().string.isRequired};var Fn=(0,a.forwardRef)((function(n,e){var t=n.section,c=n.components,s=n.rawNavigations,d=(0,Mn.DJ)().roles,f=(0,Z.PE)(),v=f.t,m=f.locale,p=(0,Dn.y0)().blocklet.environments.find((function(n){return"BLOCKLET_APP_LANGUAGES"===n.key})),g=(p?p.value.split(","):["en","zh"]).filter((function(n){return kn.SUPPORTED_LANGUAGES[n]})).reduce((function(n,e){return n[e]=kn.SUPPORTED_LANGUAGES[e].nativeName,n}),{}),y=(0,a.useRef)((function(){})),L=(0,Q.Z)(!1),N=(0,F.Z)(L,2),S=N[0],w=N[1],P=w.setFalse,C=w.setTrue,O=(0,b.Z)({isRoot:!0,type:"add",linkDisabled:!1,locale:Wn,formState:dn()(zn),get localeList(){return rn()(Object.keys(this.formState.title),Wn)}}),E=(0,fn.cI)({mode:"onChange",defaultValues:{id:void 0,title:void 0,icon:void 0,link:void 0,component:void 0,parent:void 0,role:[]}}),R=E.handleSubmit,T=E.control,_=E.watch,I=E.setValue,D=E.clearErrors,W=E.formState.errors;(0,a.useEffect)((function(){I("title",O.formState.title[O.locale]),I("link",O.formState.link[O.locale])}),[I,O.locale,S]);var z=_("component"),J=_("title"),U=_("link"),Y=_("icon"),$=_("parent");(0,a.useEffect)((function(){O.formState.title[O.locale]=J}),[J]),(0,a.useEffect)((function(){O.formState.link[O.locale]=U}),[U]);var en=(0,a.useMemo)((function(){return s.find((function(n){return z?c.find((function(n){return n.name===z})).did===n.id:n.id===$}))}),[c,s,z,$]),on=(0,a.useMemo)((function(){if(null!==en&&void 0!==en&&en.component){var n=(c.find((function(n){return n.name===en.component}))||{}).link,e=A()(n)?n[O.locale]:n;if(z)return(0,hn.QT)(e);var t=A()(en.link)?en.link[O.locale]:en.link;return(0,hn.QT)(pn()(e,t||"/"))}return null}),[c,O.locale,en,z]),an=(0,a.useMemo)((function(){var n=(en||{}).component,e=(c.find((function(e){return e.name===n}))||{}).navigation,i=void 0===e?[]:e;return(0,vn.flattenNavigation)(i,{transform:function(n,e){return null!==e&&void 0!==e&&e.section&&(n.section=n.section||e.section),n}}).filter((function(n){return n.link})).filter((function(n){return(0,vn.isMatchSection)(n.section,t)})).map((function(n){return{label:n.link,title:n.title[m]||n.title}}))}),[en,c,t,m]),cn=(0,a.useMemo)((function(){var n={add:v("common.create"),edit:v("common.edit")}[O.type];return n?"".concat(n," ").concat(v("navigation.navigation")):"--"}),[O.type,v]),un=(0,a.useCallback)((function(){O.isRoot=!0,O.locale=Wn,O.type="add",O.linkDisabled=!1,y.current=function(){},I("id",void 0),I("icon",void 0),I("title",void 0),I("link",void 0),I("component",void 0),I("parent",void 0),I("role",[]),O.formState=dn()(zn),D()}),[D,I,O]),mn=(0,a.useCallback)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O.localeList.length>0&&(new Set(tn()(O.formState.title)).size>1&&(n.title=O.formState.title),new Set(tn()(O.formState.link)).size>1&&(n.link=O.formState.link)),ln()(n.role)&&(n.role=void 0),n}),[O.formState.link,O.formState.title,O.localeList]),gn=(0,a.useCallback)((function(){P(),setTimeout((function(){un()}))}),[un,P]),bn=(0,a.useCallback)((function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).parent,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};O.type="add",O.isRoot=!n,I("parent",null===n||void 0===n?void 0:n.id),y.current=function(n){e(gn,n)},C()}),[gn,C,I,O]),jn=(0,a.useCallback)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},t=n.id,i=n.title,o=n.icon,r=n.link,a=n.parent,l=n.component,c=n.role,s=void 0===c?[]:c;I("id",t),I("icon",o),"tmpl"===n.from&&(O.linkDisabled=!0),sn()(i)?O.formState.title=O.localeList.reduce((function(n,e){return n[e]=i,n}),(0,B.Z)({},Wn,i)):A()(i)?O.formState.title=dn()(i):O.formState.title={},sn()(r)?O.formState.link=O.localeList.reduce((function(n,e){return n[e]=r,n}),(0,B.Z)({},Wn,r)):A()(r)?O.formState.link=dn()(r):O.formState.link={},I("component",l),I("parent",a),I("role",s||[]),C(),O.type="edit",O.isRoot=!a,y.current=function(n){var t=nn()(n,["id","title","icon","link","role"]);e(gn,t)}}),[gn,C,I,O]);function Zn(n){var e=null===n||void 0===n?void 0:n.trim();return e?!(e.length>24)||v("navigation.form.titleTooLong",{len:24}):v("common.requiredErrorText",{name:v("navigation.form.title")})}function yn(){return(yn=(0,r.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:if(!(t=null===e||void 0===e?void 0:e.trim())){n.next=10;break}return n.prev=2,n.next=5,(0,k.GL)(t);case 5:n.next=10;break;case 7:return n.prev=7,n.t0=n.catch(2),n.abrupt("return",v("navigation.form.invalidIcon"));case 10:return n.abrupt("return",!0);case 11:case"end":return n.stop()}}),n,null,[[2,7]])})))).apply(this,arguments)}function Ln(n){var e=null===n||void 0===n?void 0:n.trim();return e?!!(0,vn.checkLink)(e)||v("navigation.form.invalidLink"):!!O.isRoot||v("common.requiredErrorText",{name:v("navigation.form.link")})}(0,a.useImperativeHandle)(e,(function(){return{add:bn,edit:jn,close:gn}}),[bn,gn,jn]);var Nn=(0,a.useCallback)((function(n){O.locale=n,O.formState.title[n]||(O.formState.title[n]=""),O.formState.link[n]||(O.formState.link[n]=""),setTimeout((function(){D()}))}),[D,O]),Sn=(0,a.useCallback)((function(){for(var n=O.formState,e=n.title,t=n.link,i=0,o=Object.keys(e);i<o.length;i++){var r=Zn(e[o[i]]);if(!0!==r)return r}for(var a=0,l=Object.keys(t);a<l.length;a++){var c=Ln(t[l[a]]);if(!0!==c)return c}return!0}),[O.formState]),wn=(0,a.useCallback)((function(n){var e=Sn();!0===e?y.current(mn(n)):x.Z.error(e)}),[Sn,mn]),Pn=(0,a.useCallback)((function(n){O.formState.title=X()(O.formState.title,n),O.formState.link=X()(O.formState.link,n)}),[O.formState]),Cn=(0,a.useCallback)((function(n){var e,t;O.locale=n,O.formState.title[n]=null===(e=O.formState.title)||void 0===e?void 0:e[Wn],O.formState.link[n]=null===(t=O.formState.link)||void 0===t?void 0:t[Wn],setTimeout((function(){D()}))}),[D,O]);return(0,M.jsxs)(j.ZP,{open:S,title:cn,onClose:gn,actions:(0,M.jsx)(q.Z,{onClick:R(wn),color:"primary",autoFocus:!0,variant:"contained",children:v("common.confirm")}),children:[(0,M.jsx)(In,{sx:{mb:1},onAdd:Cn,onChange:Nn,onRemoveLocale:Pn,localeMap:g,locales:O.localeList}),(0,M.jsxs)("form",{noValidate:!0,autoComplete:"off",children:[(0,M.jsx)(fn.Qr,{name:"title",control:T,rules:{validate:Zn},render:function(n){var e,t,o=n.field;return(0,M.jsx)(H.Z,(0,i.Z)({fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:v("navigation.form.titlePlaceholder"),label:v("navigation.form.title"),disabled:O.isEdit,error:!(null===W||void 0===W||null===(e=W.title)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.title)||void 0===t?void 0:t.message)||" "},o))}}),(0,M.jsx)(fn.Qr,{name:"icon",control:T,rules:{validate:function(n){return yn.apply(this,arguments)}},render:function(n){var e,t,o=n.field;return(0,M.jsx)(H.Z,(0,i.Z)((0,i.Z)({fullWidth:!0,variant:"outlined",margin:"dense",placeholder:v("navigation.form.iconPlaceholder"),label:v("navigation.form.icon"),error:!(null===W||void 0===W||null===(e=W.icon)||void 0===e||!e.message),disabled:O.locale!==Wn,helperText:(null===W||void 0===W||null===(t=W.icon)||void 0===t?void 0:t.message)||(0,M.jsx)(l.Z,{display:"flex",children:(0,M.jsxs)(l.Z,{component:"a",href:"https://icones.js.org",target:"_blank",display:"flex",alignItems:"center",children:[v("navigation.form.findMoreIcon")," ",(0,M.jsx)(k.JO,{style:{marginLeft:4},icon:"radix-icons:external-link"})]})})},o),{},{InputProps:{endAdornment:(0,M.jsx)(K.Z,{position:"end",children:(0,M.jsx)(V.Z,{sx:{cursor:"default"},disableFocusRipple:!0,disableRipple:!0,children:Y&&(0,M.jsx)(Jn,{icon:Y})})})}}))}}),O.isRoot&&(0,M.jsx)(fn.Qr,{name:"component",control:T,render:function(n){var e,t,o=n.field;return(0,M.jsx)(Rn,(0,i.Z)({fullWidth:!0,margin:"dense",disabled:"edit"===O.type||O.locale!==Wn,label:v("navigation.form.component"),placeholer:v("navigation.form.componentPlaceholder"),options:c.map((function(n){return{title:n.title,value:n.name,description:n.link}})),error:!(null===W||void 0===W||null===(e=W.component)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.component)||void 0===t?void 0:t.message)||" "},X()(o,"ref")))}}),(0,M.jsx)(fn.Qr,{name:"link",control:T,rules:{validate:Ln},render:function(n){var e=n.field;return(0,M.jsx)(u.Z,{fullWidth:!0,margin:"dense",children:(0,M.jsx)(G.Z,(0,i.Z)((0,i.Z)({disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:O.linkDisabled,isOptionEqualToValue:function(n){return n.label},options:an,renderInput:function(n){var e,t;return(0,M.jsx)(H.Z,(0,i.Z)((0,i.Z)({},n),{},{placeholder:v("navigation.form.linkPlaceholder"),label:v("navigation.form.link"),error:!(null===W||void 0===W||null===(e=W.link)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.link)||void 0===t?void 0:t.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:on?(0,M.jsx)(K.Z,{position:"start",sx:{textDecoration:xn()(U||"")?"line-through":""},children:on}):null}}))},renderOption:function(n,e){return(0,M.jsxs)(l.Z,(0,i.Z)((0,i.Z)({component:"li"},n),{},{children:[e.label,(0,M.jsx)(h.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:e.title})]}))},margin:"dense"},e),{},{onChange:function(){},onInputChange:function(n,t){e.onChange(t)}}))})}}),["dashboard","sessionManager"].includes(t)&&(0,M.jsx)(fn.Qr,{name:"role",control:T,render:function(n){var e,t,o=n.field;return(0,M.jsx)(Rn,(0,i.Z)({fullWidth:!0,multiple:!0,margin:"dense",label:v("navigation.form.role"),placeholer:v("navigation.form.rolePlaceholder"),options:d.map((function(n){return{title:n.title,value:n.name}})),error:!(null===W||void 0===W||null===(e=W.role)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.role)||void 0===t?void 0:t.message)||" "},X()(o,"ref")))}})]})]})}));Fn.propTypes={section:w().string,components:w().array,rawNavigations:w().array},Fn.defaultProps={section:"",components:[],rawNavigations:[]};var Bn=Fn;function qn(n){var e=n.className,t=n.add,i=n.edit,o=n.toggle,r=n.del,l=n.data,c=n.section,s=(0,Z.PE)().t,u=["yaml","tmpl"].includes(l.from),d=(0,a.isValidElement)(l.subtitle);function f(n){n.preventDefault(),n.stopPropagation()}var v=(0,a.useCallback)((function(n){f(n),t(l)}),[t,l]),m=(0,a.useCallback)((function(n){f(n),i(l)}),[i,l]),p=(0,a.useCallback)((function(n){f(n),o(l)}),[o,l]),h=(0,a.useCallback)((function(n){f(n),r(l)}),[r,l]);return(0,M.jsxs)("div",{className:e,children:[!l.parent&&["header","footer","dashboard"].includes(c)&&(0,M.jsx)("span",{title:s(d?"navigation.action.noAddSub":"navigation.action.addSub"),children:(0,M.jsx)(V.Z,{size:"small",color:"success",onClick:v,disabled:d,children:(0,M.jsx)(k.JO,{icon:"mdi:plus-box-outline"})})}),(0,M.jsx)("span",{title:s(d?"navigation.action.noEdit":"navigation.action.edit"),children:(0,M.jsx)(V.Z,{size:"small",color:"primary",onClick:m,disabled:d,children:(0,M.jsx)(k.JO,{icon:"mdi:pencil"})})}),(0,M.jsx)("span",{title:d?s("navigation.action.noEdit"):l.visible?s("navigation.action.hide"):s("navigation.action.show"),children:(0,M.jsx)(V.Z,{size:"small",color:"warning",onClick:p,disabled:d,children:!1===l.visible?(0,M.jsx)(k.JO,{icon:"mdi:eye-off-outline"}):(0,M.jsx)(k.JO,{icon:"mdi:eye-outline"})})}),(0,M.jsx)("span",{title:s(u&&!d?"navigation.action.noDel":"navigation.action.del"),children:(0,M.jsx)(V.Z,{disabled:u&&!d,size:"small",color:"error",onClick:h,children:(0,M.jsx)(k.JO,{icon:"mdi:delete"})})})]})}qn.propTypes={data:w().object.isRequired,className:w().string,add:w().func,edit:w().func,toggle:w().func,del:w().func,section:w().string},qn.defaultProps={className:"",add:function(){},edit:function(){},toggle:function(){},del:function(){},section:""};var Gn=qn,Vn=t(3785),Kn=t.n(Vn),Hn=t(79683),Un=t.n(Hn),Qn=t(35432),Yn=t(14491),Xn="/",$n="header",ne={sessionManager:[{id:"/sessionManager",title:{en:"Manage",zh:"\u7ba1\u7406"},section:["sessionManager"],icon:"ion:settings-outline",link:"".concat(Qn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),role:["owner","admin"],from:"tmpl"}],dashboard:[{id:"/access",title:{en:"Access",zh:"\u8bbf\u95ee\u63a7\u5236"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"member",title:{en:"Members",zh:"\u6210\u5458"},icon:"ant-design:user-outlined",link:"".concat(Qn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/members"),from:"tmpl"},{id:"passport",title:{en:"Passport",zh:"\u901a\u884c\u8bc1"},icon:"icon-park-outline:passport",link:"".concat(Qn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/passports"),from:"tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"\u4eea\u8868\u76d8"},icon:"ant-design:dashboard-outlined",link:"".concat(Qn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),from:"tmpl"}]}]};function ee(n,e){return n.section&&e.section?n.section===e.section&&n.id===e.id:n.id===e.id}function te(){var n=(0,Dn.y0)(),e=n.blocklet,t=n.actions,l=(0,vn.parseNavigation)(e,{beforeProcess:function(n){var e=dn()(n);return ne.dashboard.forEach((function(n){e.some((function(e){return e.id===n.id}))||e.push(n)})),e.some((function(n){return n.id&&(n.section||[]).includes("sessionManager")}))||e.push.apply(e,(0,bn.Z)(ne.sessionManager)),e}}),c=l.navigationList,s=l.components,u=l.builtinList,d=(0,b.Z)({rawNavigation:dn()(c),activeSection:$n,components:s}),f=(0,a.useMemo)((function(){return(0,vn.nestNavigationList)(d.rawNavigation)}),[d.rawNavigation]),v=(0,a.useMemo)((function(){var n=(0,vn.filterNavigation)(d.rawNavigation,s),e=(0,vn.joinLink)(n,s);return(0,vn.cleanOrphanNavigation)(e)}),[s,d.rawNavigation]);function m(n){if(!n.id)return"";var e=(0,vn.flattenNavigation)((0,vn.joinLink)(f,s)),t=e.find((function(e){return e.id===n.id}));function i(n){var e=n.name;return(0,M.jsx)(wn.Z,{label:"Uninstalled: ".concat(e),color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}if(null!==t&&void 0!==t&&t.component){if(!s.some((function(n){return n.name===t.component})))return(0,M.jsx)(i,{name:t.component})}else if(t.parent){var o=e.find((function(n){return n.id===t.parent}));if(null!==o&&void 0!==o&&o.component&&!s.some((function(n){return n.name===o.component})))return(0,M.jsx)(i,{name:o.component})}return null===t||void 0===t?void 0:t.link}function p(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xn;return n.map((function(n){var t=s.find((function(e){return e.name===n.component})),i=(null===t||void 0===t?void 0:t.link)||e,o=n.items||[],r=n.link;return{title:n.title,subtitle:m(n),link:r,icon:n.icon,children:p(o,r||Xn),section:n.section,visible:n.visible,parent:n.parent,component:n.component,id:n.id,role:n.role,from:n.from,__base:i}}))}function h(n){return g.apply(this,arguments)}function g(){return(g=(0,r.Z)((0,o.Z)().mark((function n(e){var r,a;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.map((function(n){return Un()(n,Kn())})),a=r.map((function(n){var e=(0,i.Z)({},n);return e.role&&Array.isArray(e.role)&&(e.role=JSON.stringify(e.role)),e.section&&Array.isArray(e.section)&&(e.section=JSON.stringify(e.section)),e.title&&e.title instanceof Object&&(e.title=JSON.stringify(e.title)),e.link&&e.link instanceof Object&&(e.link=JSON.stringify(e.link)),e})),n.next=4,t.configNavigations(a);case 4:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function x(){return(x=(0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h([]);case 2:d.rawNavigation=dn()(u);case 3:case"end":return n.stop()}}),n)})))).apply(this,arguments)}return{state:d,navigation:v,components:s,getNavigationFullLink:m,updateActiveSection:function(n){d.activeSection=n},updateNavigationItem:function(n){!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=d.rawNavigation.map((function(e){var t=n.find((function(n){return ee((0,i.Z)((0,i.Z)({},n),{},{section:d.activeSection}),e)}));return t?(0,i.Z)((0,i.Z)({},e),t):e}));d.rawNavigation=e}([n])},delNavigationItem:function(n){var e=d.rawNavigation.filter((function(e){return e.id===n||e.parent===n})).map((function(n){return n.id}));d.rawNavigation=d.rawNavigation.filter((function(n){return!e.includes(n.id)}))},addNavigationItem:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,i.Z)((0,i.Z)({},n),{},{id:(0,Yn.x0)(),section:d.activeSection,visible:!0});d.rawNavigation=[].concat((0,bn.Z)(d.rawNavigation),[e])},updateNavigationTree:function(n){var e=[];(0,vn.deepWalk)(n,(function(n,t){var o=(0,i.Z)((0,i.Z)({},X()(n,["children","expand"])),{},{parent:null===t||void 0===t?void 0:t.id});e.push(o)}));var t=d.rawNavigation.filter((function(n){if(!d.activeSection)return!1;var t=e.find((function(e){return ee(e,n)}));return!t||!(0,vn.isMatchSection)(t.section,d.activeSection)}));d.rawNavigation=[].concat((0,bn.Z)(t),e)},getNavigation:function(n){return p(dn()(f).filter((function(e){return(0,vn.isMatchSection)(e.section,n)})))},saveNavigationList:h,resetNavigation:function(){return x.apply(this,arguments)}}}var ie,oe=t(71171),re=t(1192),ae=t(2484),le=t(5873),ce=t(88764),se=t(55402),ue=t(5939),de=t(33518),fe=t(49522);function ve(n){var e,t,i,o,r=n.className,a=n.navigation,c=(0,Dn.y0)().blocklet,s=(0,fe.Z)({blocklet:c}).logoUrl,u=null===c||void 0===c||null===(e=c.environments)||void 0===e||null===(t=e.find((function(n){return n.key===kn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER})))||void 0===t?void 0:t.value,d=null===c||void 0===c||null===(i=c.environments)||void 0===i||null===(o=i.find((function(n){return n.key===kn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR})))||void 0===o?void 0:o.value,f=u||d?{owner:u,year:d}:void 0,v={appId:c.appDid,appLogo:s,appName:c.meta.title,enableConnect:!0,enableLocale:!1,navigation:a,copyright:f};return(0,M.jsx)(ce.Z,{children:(0,M.jsxs)(l.Z,{className:r,children:[(0,M.jsx)(re.Z,{meta:v}),(0,M.jsx)(l.Z,{children:(0,M.jsx)(le.Z,{meta:v,invalidPathFallback:function(){},headerProps:{style:{display:"none"}},children:(0,M.jsx)(se.ZP,{container:!0,spacing:2,children:new Array(6).fill().map((function(n,e){return(0,M.jsxs)(se.ZP,{item:!0,xs:4,children:[(0,M.jsx)(ue.Z,{animation:!1,variant:"rectangular",width:"100%",height:120}),(0,M.jsxs)(l.Z,{sx:{pt:.5},children:[(0,M.jsx)(ue.Z,{animation:!1}),(0,M.jsx)(ue.Z,{width:"60%",animation:!1})]})]},e)}))})})}),(0,M.jsx)(ae.Z,{meta:v})]})})}ve.propTypes={className:w().string,navigation:w().array},ve.defaultProps={className:"",navigation:[]};var me=(0,de.Z)(ve)(ie||(ie=(0,oe.Z)(["\n .dashboard {\n height: auto !important;\n }\n .dashboard-content + div {\n display: none;\n }\n"]))),pe={login:N(),logout:N(),switch:N(),switchDid:N(),switchProfile:N(),switchPassport:N(),useDid:function(){return{walletDid:"abcdefghijklmnopqrstuvwxyz"}},useOAuth:function(){return{logoutOAuth:N(),bindOAuth:N(),configs:{},switchOAuthPassport:N()}}},he={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"SessionManager"};var ge=function(){var n=(0,Z.PE)().t,e=(0,Dn.y0)().blocklet,t=(0,a.useRef)(null),L=(0,Mn.DJ)().roles,N=(0,b.Z)({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),S=te(),w=S.state,P=S.navigation,C=S.getNavigation,O=S.saveNavigationList,E=S.resetNavigation,A=S.updateActiveSection,R=S.updateNavigationTree,T=S.updateNavigationItem,_=S.delNavigationItem,I=S.addNavigationItem,D=(0,a.useCallback)((function(n){t.current.add({parent:n},(function(n,e){I(e),n()}))}),[I]),W=(0,a.useCallback)((function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(n){case"edit":t.current.edit(e,(function(n,e){T(e),n()}));break;case"toggle":T({id:e.id,visible:!e.visible});break;case"del":_(e.id)}}),[_,T]),z=(0,a.useCallback)((0,r.Z)((0,o.Z)().mark((function e(){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,N.saveLoading=!0,e.next=4,O(w.rawNavigation);case 4:x.Z.success(n("common.succeeded")),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),x.Z.error((0,M.jsxs)(l.Z,{children:[(0,M.jsx)(h.Z,{variant:"subtitle2",children:n("navigation.actionFailed")}),(0,M.jsx)(h.Z,{variant:"body1",children:(0,Yn.Z)(e.t0)||e.t0.error})]}));case 10:return e.prev=10,N.saveLoading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])}))),[w.rawNavigation,N,O,n]),F=(0,a.useCallback)((0,r.Z)((0,o.Z)().mark((function e(){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,N.resetLoading=!0,e.next=4,E();case 4:x.Z.success("\u91cd\u7f6e\u6210\u529f",{variant:"success"}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),x.Z.error((0,M.jsxs)(l.Z,{children:[(0,M.jsx)(h.Z,{variant:"subtitle2",children:n("navigation.actionFailed")}),(0,M.jsx)(h.Z,{variant:"body1",children:(0,Yn.Z)(e.t0)||e.t0.error})]}));case 10:return e.prev=10,N.resetLoading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])}))),[N,E,n]),B=(0,a.useMemo)((function(){return{session:(0,i.Z)((0,i.Z)({},pe),{},{user:{did:e.appDid,fullName:"Preview User",role:N.mockRole}})}}),[e.appDid,N.mockRole]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(s.Z,{variant:"outlined",children:Object.keys(he).map((function(n){return(0,M.jsxs)(c.Z,{variant:w.activeSection===n?"contained":void 0,onClick:function(){return A(n)},children:[he[n]," (".concat(C(n).length,")")]},n)}))}),(0,M.jsxs)(p.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[(0,M.jsx)(h.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Config"}),(0,M.jsx)(s.Z,{variant:"outlined",children:(0,M.jsx)(g.Z,{size:"small",variant:"outlined",color:"error",startIcon:(0,M.jsx)(k.JO,{icon:"system-uicons:reset"}),sx:{mr:2},loading:N.resetLoading,loadingPosition:"start",onClick:function(){N.showResetConfirm=!0},children:"\u91cd\u7f6e"})}),(0,M.jsxs)(s.Z,{variant:"outlined",children:[(0,M.jsx)(c.Z,{size:"small",variant:"outlined",startIcon:(0,M.jsx)(k.JO,{icon:"mdi:plus"}),onClick:function(){return D()},children:"\u65b0\u5efa"}),(0,M.jsx)(g.Z,{size:"small",variant:"contained",startIcon:(0,M.jsx)(k.JO,{icon:"mdi:content-save"}),loading:N.saveLoading,loadingPosition:"start",onClick:z,children:"\u4fdd\u5b58"})]})]}),(0,M.jsx)(v.Z,{variant:"outlined",sx:{display:"flex",height:280,overflow:"hidden"},children:(0,M.jsx)(v.Z,{elevation:0,sx:{flex:1,overflow:"auto"},children:(0,M.jsx)(J,{treeData:C(w.activeSection),setTreeData:R,renderActions:function(n){var e=n.data,t=n.className;return(0,M.jsx)(Gn,{data:e,className:t,section:w.activeSection,add:function(){return D.apply(void 0,arguments)},del:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["del"].concat(e))},edit:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["edit"].concat(e))},toggle:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["toggle"].concat(e))}})}})})}),(0,M.jsxs)(p.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[(0,M.jsx)(h.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Preview"}),(0,M.jsxs)(u.Z,{sx:{m:1,minWidth:120},size:"small",children:[(0,M.jsx)(d.Z,{children:"Role"}),(0,M.jsx)(m.Z,{value:N.mockRole,label:"Role",onChange:function(n){N.mockRole=n.target.value},children:L.map((function(n){return(0,M.jsx)(f.Z,{value:n.name,children:n.title},n.name)}))})]})]}),(0,M.jsx)(v.Z,{variant:"outlined",children:(0,M.jsx)(y.B3.Provider,{value:B,children:(0,M.jsx)(me,{navigation:P})})}),(0,M.jsx)(Bn,{ref:t,section:w.activeSection,components:w.components,rawNavigations:w.rawNavigation}),(0,M.jsx)(j.I4,{open:N.showResetConfirm,title:"\u662f\u5426\u6e05\u7a7a\u6240\u6709\u81ea\u5b9a\u4e49\u5bfc\u822a",onConfirm:function(){var n=(0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,F();case 2:N.showResetConfirm=!1;case 3:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),onCancel:function(){N.showResetConfirm=!1},children:(0,M.jsx)("p",{children:"\u6e05\u7a7a\u540e\uff0c\u5bfc\u822a\u4f1a\u6062\u590d\u5230 Blocklet \u539f\u6709\u9ed8\u8ba4\u7684\u914d\u7f6e"})})]})}}}]);
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4775],{19371:function(n,e,t){var i=t(38636).default,o=t(73408).default,r=t(814).default,a=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.splitNavigationBySection=e.flattenNavigation=e.checkLink=e.joinLink=e.cleanOrphanNavigation=e.filterNavigation=e.nestNavigationList=e.isMatchSection=e.deepWalk=e.parseNavigation=void 0;var l=a(t(10905)),c=a(t(50482)),s=a(t(8708)),u=a(t(3785)),d=a(t(24914)),f=a(t(25842)),v=a(t(6352)),m=a(t(56977)),p=a(t(6018)),h=t(65873),g=a(t(32828)),x=t(45239);Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return x.checkLink}});var k="header",b="/",j="/",Z="/";function y(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.key,o=void 0===i?"children":i,r=t.order,a=void 0===r?"first":r;!function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.index,l=void 0===r?0:r,c=i.parent,s=void 0===c?null:c,u=i.level,d=void 0===u?0:u;Array.isArray(t)?t.forEach((function(e,t){n(e,{index:t,parent:s,level:d+1})})):t&&("first"===a&&e(t,s,{index:l,level:d}),n(t[o],{parent:t,level:d}),"last"===a&&e(t,s,{index:l,level:d}))}(n)}function L(n,e){return!(e!==k||!(0,u.default)(n))||(Array.isArray(n)?n.includes(e):n===e)}function N(n){try{return JSON.parse(n)}catch(e){return n}}function S(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,p.default)(e||""))return e;var t=m.default.join(n,e||j);return t.length>1&&t.endsWith("/")?t.slice(0,t.length-1):t}function w(n,e){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).strict,i=n,r=e;return void 0===t||t||(i=i||"/",r=r||"/"),(0,h.isObject)(i)&&(0,h.isString)(r)&&(0,x.checkLink)(r)?Object.keys(i).reduce((function(n,e){return n[e]=S(i[e],r),n}),{}):(0,h.isString)(i)&&(0,x.checkLink)(i)&&(0,h.isObject)(r)?Object.keys(r).reduce((function(n,e){return n[e]=S(i,r[e]),n}),{}):(0,h.isString)(i)&&(0,h.isString)(r)?(0,x.checkLink)(i)||(0,x.checkLink)(r)?S(i,r):r:(0,h.isObject)(i)&&(0,h.isObject)(r)?o(new Set([].concat(o(Object.keys(i)),o(Object.keys(r))))).reduce((function(n,e){return n[e]=S(i[e],r[e]),n}),{}):r}function P(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.depth,i=void 0===t?1:t,r=e.transform,a=void 0===r?function(n){return n}:r,l=(0,f.default)(n),c=[];return y(l,(function(n,e,t){var r=t.level;if(r>=i){var l=n.items,s=void 0===l?[]:l;if(s&&Array.isArray(s)&&s.length>0){delete n.items;var u=s.map((function(e){return a(e,n)}));if(e){var f;(f=e.items).push.apply(f,o(u))}else{var v=a((0,d.default)(n,["items"]),e);c.push.apply(c,[v].concat(o(u)))}}else if(1===r){var m=a((0,d.default)(n,["items"]),e);c.push(m)}}else 1===r&&c.push(n)}),{key:"items",order:"last"}),c}function C(n){var e,t=(0,f.default)(n),a=[],l=i(t);try{var c=function(){var n=e.value,t=(0,f.default)((0,d.default)(n,["items"])),l=[];function c(n,e){var i=function(n,e){return e&&Array.isArray(n.items)?n.items.filter((function(t){return(0,u.default)(t.section)?L(n.section,e):!!L(t.section,e)})).map((function(n){return r(r({},n),{},{section:e})})):[]}(n,e);l.push(r(r({},t),{},{section:e,items:i}))}if(Array.isArray(n.section)){var s,v=i(n.section);try{for(v.s();!(s=v.n()).done;){c(n,s.value)}}catch(x){v.e(x)}finally{v.f()}}else if(n.section){c(n,n.section)}else if(n.items&&n.items.length>0){var m,p=n.items.reduce((function(n,e){var t=(e||{}).section,i=void 0===t?[k]:t;return n.push.apply(n,o(i)),n}),[]),h=o(new Set(p)),g=i(h);try{for(g.s();!(m=g.n()).done;){c(n,m.value)}}catch(x){g.e(x)}finally{g.f()}}else l.push(r(r({},n),{},{section:k}));a.push.apply(a,l)};for(l.s();!(e=l.n()).done;)c()}catch(s){l.e(s)}finally{l.f()}return a}function O(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=(0,f.default)(n);return e.reduceRight((function(n,t,i){if(t.parent){var r=e.find((function(n){return t.section&&n.section?n.section===t.section&&n.id===t.parent:n.id===t.parent}));r&&(r.items||(r.items=[]),r.items=[t].concat(o(r.items))),e.splice(i,1)}return null}),null),e}e.deepWalk=y,e.isMatchSection=L,e.joinLink=function(n,e){var t=(0,f.default)(n);return y(t,(function(n,t){var i=n.component||n.child;if(i){var o=e.find((function(n){return n.name===i}));o&&(n.link=w(o.link,n.link,{strict:!1}))}else t&&(n.link=w(t.link,n.link))}),{key:"items"}),t},e.flattenNavigation=P,e.splitNavigationBySection=C,e.nestNavigationList=O,e.filterNavigation=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=O(n);return y(t,(function(n){if(null!==n&&void 0!==n&&n.component&&(e.some((function(e){return e.name===n.component}))||(n.visible=!1)),n.items&&n.items.length)for(var t=n.items.length-1;t>=0;t--)!1===n.items[t].visible&&n.items.splice(t,1)}),{key:"items"}),t.filter((function(n){var e;return!1!==n.visible&&!(n.items&&Array.isArray(n.items)&&n.items.length>0&&null!==(e=n.items)&&void 0!==e&&e.every((function(n){return!1===n.visible})))}))},e.cleanOrphanNavigation=function(n){return n.map((function(n){return n.items&&Array.isArray(n.items)&&1===n.items.length&&["header","footer","",void 0,null].includes(n.section)?n.items[0]:n}))},e.parseNavigation=function(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).beforeProcess,a=void 0===t?function(n){return n}:t,u=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],t=function t(a){var l,c,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=[],d=a.children,m=void 0===d?[]:d,p=a.meta,h=void 0===p?{}:p,x=(0,f.default)((null===h||void 0===h?void 0:h.navigation)||[]);(0,g.default)(h)&&!1!==(null===(l=a.meta)||void 0===l||null===(c=l.capabilities)||void 0===c?void 0:c.navigation)&&u.push.apply(u,o(x));var Z,y=s.name||"",L=s.mountPoint||b,N=a===n?"":h.name||"",S=a===n?"":a.mountPoint||b,w=i(m);try{var P=function(){var n,i,a,l,c=Z.value;if(!(0,g.default)(c.meta))return"continue";var s=c.meta.name,d=c.mountPoint,f=[y,N,s].filter(Boolean).join("."),m=c.meta.navigation||[],p=(0,v.default)(L,S,d);!1!==(null===(n=c.meta)||void 0===n||null===(i=n.capabilities)||void 0===i?void 0:i.navigation)&&e.push({did:c.meta.did,name:f,link:p,title:c.meta.title||"",navigation:m.map((function(n){return r({section:k},n)}))});var h=x.find((function(n){return!!n.component&&n.component===s}));if(h){if(!h.link)if(c.meta.navigation&&c.meta.navigation.length>0){var b,w,P=t(c,{mountPoint:S,name:N});P.length>0&&(h.items=null!==(b=h.items)&&void 0!==b?b:[],(w=h.items).push.apply(w,o(P)))}else h.link=j}else if(!1!==(null===(a=c.meta)||void 0===a||null===(l=a.capabilities)||void 0===l?void 0:l.navigation)){var C=t(c,{mountPoint:S,name:N}),O={title:c.meta.title,component:s,id:c.meta.did};C.length>0?(O.items=C,O.link=void 0):O.link=j,u.push(O)}};for(w.s();!(Z=w.n()).done;)P()}catch(C){w.e(C)}finally{w.f()}return u}(n);return{navigationList:t,components:e}}(e),d=u.navigationList,m=u.components,p=(null===e||void 0===e||null===(n=e.settings)||void 0===n?void 0:n.navigations)||[],h=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=P((0,f.default)(n),{depth:e,transform:function(n,e){var t;return e&&(n._parent||(n._parent=e.id,e.component||(n.link=w(e.link,n.link))),n.section=n.section||e.section||[k],n.visible=null!==(t=n.visible)&&void 0!==t?t:e.visible),n.component=[e.component,n.component].filter(Boolean).join("."),n}});return y(t,(function(n){n.items&&n.items.length>0&&n.items.reduceRight((function(e,t){if(t._parent){var i=n.items.findIndex((function(n){return n.id===t._parent}));i>=0&&n.items.splice(i,1),delete t._parent}return null}),null)}),{key:"items"}),t}(a(d)),x=P(C(function(n){var e=(0,f.default)(n).filter((function(n){return n.id}));return y(e,(function(n,e){var t;if(n.items&&n.items.length){for(var i=n.items.length-1;i>=0;i--)n.items[i].id||n.items.splice(i,1);0===n.items.length&&n.component&&(n.link=n.link||j)}e&&(n.parent=e.id,n.id=[e.id,n.id].join(Z)),n.from=n.from||"yaml",n.visible=null===(t=n.visible)||void 0===t||t}),{key:"items"}),e}(h)).reduce((function(n,e){var t=["bottom","social","sessionManager"].includes(e.section),i=!1,a=m.find((function(n){return"/"===n.link}));if(a&&e.id===a.did&&(i=!0),t||i){if(e.items&&e.items.length>0)return n.push.apply(n,o(e.items.map((function(n){var t=e.section,i=w(e.link,n.link),o=[e.component,n.component].filter(Boolean).join(".");return r(r({},n),{},{section:t,link:i,component:o,parent:""})})))),n;if(i)return n}return n.push(e),n}),[]),{transform:function(n,e){var t=n.component;return null!==e&&void 0!==e&&e.component&&(t=[e.component,n.component].filter(Boolean).join(".")),r(r({},n),{},{component:t})}});return{navigationList:(0,l.default)(p.map((function(n){var e=r({},n);return e.role&&(e.role=N(e.role)),e.section&&(e.section=N(e.section)),e.title&&(e.title=N(e.title)),e.link&&(e.link=N(e.link)),e})),x,(function(n,e){var t=["id","section"];return(0,c.default)((0,s.default)(n,t),(0,s.default)(e,t))})),components:m,builtinList:x}}},14775:function(n,e,t){t.r(e),t.d(e,{default:function(){return ge}});var i=t(33028),o=t(32723),r=t(34795),a=t(5057),l=t(39948),c=t(56556),s=t(49127),u=t(80576),d=t(6041),f=t(74490),v=t(25228),m=t(51177),p=t(95301),h=t(11750),g=t(39067),x=t(86229),k=t(55498),b=t(12673),j=t(13128),Z=t(68420),y=t(42030),L=t(92706),N=t.n(L),S=t(55898),w=t.n(S),P=t(53210),C=t(86272),O=t.n(C),E=t(26271),A=t.n(E),R=t(50482),T=t.n(R),_=t(20877),I=t(36095),M=t(96266);function D(n){var e=n.prevPath,t=n.nextPath,i=e.length,o=t.length;return!(i!==o||!T()(e.slice(0,i-1),t.slice(0,o-1)))}function W(n){var e=n.treeNode,t=(0,Z.PE)().locale;return(0,M.jsxs)(M.Fragment,{children:[e.icon&&(0,M.jsx)(k.JO,{style:{marginRight:4},icon:e.icon}),function(){var n=e.title,i=e.subtitle,o=n,r=i;return A()(n)&&(o=n[t]),!(0,a.isValidElement)(i)&&A()(i)&&(r=i[t]),(0,M.jsxs)(l.Z,{display:"flex",alignItems:"center",children:[(0,M.jsx)(h.Z,{variant:"subtitle1",fontSize:16,children:o}),i&&(0,M.jsx)(h.Z,{variant:"body2",color:"gray",ml:1.5,lineHeight:1,children:r})]})}()]})}function z(n){var e=n.treeData,t=n.setTreeData,o=n.renderActions,r=e.map((function(n){return(0,i.Z)((0,i.Z)({},n),{},{expanded:!0})})),a={};return"undefined"!==typeof window&&(a.context=window),(0,M.jsx)(I.W,(0,i.Z)((0,i.Z)({backend:_.HTML5Backend},a),{},{children:(0,M.jsx)(P.oP,{generateNodeProps:function(n){return{buttons:o({data:n.node,className:"list-item-actions"}),icons:(0,M.jsx)(k.JO,{icon:"ic:round-drag-indicator"}),title:(0,M.jsx)(W,{treeNode:n.node})}},maxDepth:2,isVirtualized:!1,treeData:r,onChange:t,canDrop:D,theme:O()})}))}W.propTypes={treeNode:w().object.isRequired},z.propTypes={treeData:w().object.isRequired,setTreeData:w().func,renderActions:w().func},z.defaultProps={setTreeData:function(){},renderActions:function(){}};var J=z,F=t(96234),B=t(56666),q=t(28726),G=t(75953),V=t(67680),K=t(53070),H=t(47020),U=t(41899),Q=t(11251),Y=t(24914),X=t.n(Y),$=t(8708),nn=t.n($),en=t(82488),tn=t.n(en),on=t(78164),rn=t.n(on),an=t(75506),ln=t.n(an),cn=t(2765),sn=t.n(cn),un=t(25842),dn=t.n(un),fn=t(95550),vn=t(19371),mn=t(6352),pn=t.n(mn),hn=t(2842),gn=t(6018),xn=t.n(gn),kn=t(76811),bn=t(68079),jn=t(63838),Zn=t(65873),yn=t(27156),Ln=t(23985),Nn=t(11819),Sn=t(59740),wn=t(19654),Pn=t(90067),Cn=t(44067),On=t(12594),En=["fullWidth","multiple","required","label","placeholer","options","helperText","error","margin"];function An(n){var e=n.fullWidth,t=n.multiple,o=n.required,r=n.label,a=n.placeholer,c=n.options,s=n.helperText,v=n.error,p=n.margin,g=(0,Sn.Z)(n,En),x=c.find((function(n){return n.value===g.value})),k=null===x||void 0===x?void 0:x.title;return(0,M.jsxs)(u.Z,{margin:p,fullWidth:e,error:v,children:[(0,M.jsx)(d.Z,{children:"".concat(r).concat(o?"*":"")}),(0,M.jsxs)(m.Z,(0,i.Z)((0,i.Z)({multiple:t,input:(0,M.jsx)(On.Z,{defaultValue:k,sx:{flex:1},required:o,label:r,inputProps:{margin:p}}),renderValue:function(n){if(t)return(0,M.jsx)(l.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:n.map((function(n){var e=c.find((function(e){return e.value===n}));return e&&e.title&&(0,M.jsx)(wn.Z,{size:"small",label:e.title},n)}))});var e=c.find((function(e){return e.value===n}));return e&&e.title&&(0,M.jsxs)(l.Z,{children:[(0,M.jsx)(h.Z,{component:"span",children:e.title}),(0,M.jsx)(h.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:e.description})]})}},g),{},{children:[(0,M.jsx)(f.Z,{disabled:!0,children:(0,M.jsx)("em",{children:a})}),!t&&(0,M.jsx)(f.Z,{value:"",children:"None"}),c.map((function(n){return n&&n.value&&(0,M.jsxs)(f.Z,{value:n.value,children:[(0,M.jsx)(Cn.Z,{children:n.title}),n.description&&(0,M.jsx)(h.Z,{variant:"body2",color:"text.secondary",children:n.description})]},n.value)}))]})),(0,M.jsx)(Pn.Z,{children:s})]})}An.propTypes={error:w().bool,required:w().bool,multiple:w().bool,fullWidth:w().bool,label:w().string,placeholer:w().string,options:w().array,helperText:w().string,margin:w().string},An.defaultProps={error:!1,required:!1,multiple:!1,fullWidth:!1,label:"",placeholer:"",options:[],helperText:"",margin:""};var Rn=An,Tn="en";function _n(n){var e=n.sx,t=n.onAdd,i=n.onChange,o=n.locales,r=n.localeMap,s=n.onRemoveLocale,u=(0,Z.PE)().t,d=(0,a.useRef)(),f=(0,a.useState)(null),v=(0,F.Z)(f,2),m=v[0],p=v[1],g=(0,b.Z)({currentLocale:Tn,localeList:[],inputLocale:"",localeError:""}),x=(0,a.useMemo)((function(){return!!m}),[m]),j=(0,a.useMemo)((function(){return o.includes(g.currentLocale)?g.currentLocale:Tn}),[o,g.currentLocale]),y=(0,a.useMemo)((function(){return Object.keys((0,Zn.omit)(r,[].concat((0,bn.Z)(g.localeList),[Tn]))).map((function(n){return{title:r[n],value:n}}))}),[g.localeList]);function L(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=function(n){return n?"en"!==n&&!g.localeList.includes(n)||u("navigation.form.localeExists",{value:n}):u("common.requiredErrorText",{name:"Locale"})}(null===n||void 0===n?void 0:n.trim());return g.localeError=!0!==e?e:"",e}function N(){var n,e=null===(n=g.inputLocale)||void 0===n?void 0:n.trim();!0===L(e)&&(S(),g.localeList.push(e),g.currentLocale=e,t(e))}function S(){p(null),g.inputLocale="",g.localeError=""}return(0,a.useEffect)((function(){g.localeList=(0,bn.Z)(o)}),[o,g]),(0,jn.Z)("enter",(function(){setTimeout((function(){N()}))}),{target:d}),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(yn.Z,{sx:e,value:j,onChange:function(n,e){g.currentLocale=e,i(e)},children:[(0,M.jsx)(Ln.Z,{label:"Default (".concat(r[Tn],")"),value:"en"}),g.localeList.map((function(n){return(0,M.jsx)(Ln.Z,{sx:{position:"relative"},label:(0,M.jsxs)(M.Fragment,{children:[r[n],(0,M.jsx)(V.Z,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:function(e){!function(n,e){n.preventDefault(),n.stopPropagation(),g.localeList=(0,Zn.without)(g.localeList,e),s(e),e===g.currentLocale&&(g.currentLocale=Tn)}(e,n)},children:(0,M.jsx)(k.JO,{icon:"mdi:close",height:14})})]}),value:n},n)})),(0,M.jsx)(V.Z,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:function(n){p(n.currentTarget)},children:(0,M.jsx)(k.JO,{icon:"mdi:plus"})})]}),(0,M.jsx)(Nn.ZP,{open:x,anchorEl:m,onClose:S,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,M.jsxs)(l.Z,{sx:{p:2,width:"270px"},children:[(0,M.jsx)(h.Z,{variant:"subtitle2",children:u("navigation.form.localePlaceholder")}),(0,M.jsx)(l.Z,{mt:1,children:(0,M.jsx)(Rn,{required:!0,fullWidth:!0,label:"Locale",value:g.inputLocale,options:y,onChange:function(n){var e=n.target.value;L(e),g.inputLocale=e},error:!!g.localeError,helperText:g.localeError||" "})}),(0,M.jsx)(l.Z,{display:"flex",justifyContent:"flex-end",children:(0,M.jsx)(c.Z,{size:"small",variant:"contained",onClick:N,children:u("common.confirm")})})]})})]})}_n.propTypes={sx:w().any,onAdd:w().func,onChange:w().func,onRemoveLocale:w().func,localeMap:w().object,locales:w().array},_n.defaultProps={sx:null,onAdd:function(){},onChange:function(){},onRemoveLocale:function(){},localeMap:{},locales:[]};var In=_n,Mn=t(17425),Dn=t(29054),Wn="en",zn={title:(0,B.Z)({},Wn,""),link:(0,B.Z)({},Wn,"")};function Jn(n){var e=n.icon,t=(0,a.useState)(!1),i=(0,F.Z)(t,2),l=i[0],c=i[1];return(0,U.Z)((0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!1),n.next=3,(0,k.GL)(e);case 3:c(!0);case 4:case"end":return n.stop()}}),n)}))),[e]),e?l?(0,M.jsx)(k.JO,{icon:e}):(0,M.jsx)(k.JO,{color:"#f06f6e",icon:"ic:baseline-error"}):(0,M.jsx)(k.JO,{icon:"codicon:blank"})}Jn.propTypes={icon:w().string.isRequired};var Fn=(0,a.forwardRef)((function(n,e){var t=n.section,c=n.components,s=n.rawNavigations,d=(0,Mn.DJ)().roles,f=(0,Z.PE)(),v=f.t,m=f.locale,p=(0,Dn.y0)().blocklet.environments.find((function(n){return"BLOCKLET_APP_LANGUAGES"===n.key})),g=(p?p.value.split(","):["en","zh"]).filter((function(n){return kn.SUPPORTED_LANGUAGES[n]})).reduce((function(n,e){return n[e]=kn.SUPPORTED_LANGUAGES[e].nativeName,n}),{}),y=(0,a.useRef)((function(){})),L=(0,Q.Z)(!1),N=(0,F.Z)(L,2),S=N[0],w=N[1],P=w.setFalse,C=w.setTrue,O=(0,b.Z)({isRoot:!0,type:"add",linkDisabled:!1,locale:Wn,formState:dn()(zn),get localeList(){return rn()(Object.keys(this.formState.title),Wn)}}),E=(0,fn.cI)({mode:"onChange",defaultValues:{id:void 0,title:void 0,icon:void 0,link:void 0,component:void 0,parent:void 0,role:[]}}),R=E.handleSubmit,T=E.control,_=E.watch,I=E.setValue,D=E.clearErrors,W=E.formState.errors;(0,a.useEffect)((function(){I("title",O.formState.title[O.locale]),I("link",O.formState.link[O.locale])}),[I,O.locale,S]);var z=_("component"),J=_("title"),U=_("link"),Y=_("icon"),$=_("parent");(0,a.useEffect)((function(){O.formState.title[O.locale]=J}),[J]),(0,a.useEffect)((function(){O.formState.link[O.locale]=U}),[U]);var en=(0,a.useMemo)((function(){return s.find((function(n){return z?c.find((function(n){return n.name===z})).did===n.id:n.id===$}))}),[c,s,z,$]),on=(0,a.useMemo)((function(){if(null!==en&&void 0!==en&&en.component){var n=(c.find((function(n){return n.name===en.component}))||{}).link,e=A()(n)?n[O.locale]:n;if(z)return(0,hn.QT)(e);var t=A()(en.link)?en.link[O.locale]:en.link;return(0,hn.QT)(pn()(e,t||"/"))}return null}),[c,O.locale,en,z]),an=(0,a.useMemo)((function(){var n=(en||{}).component,e=(c.find((function(e){return e.name===n}))||{}).navigation,i=void 0===e?[]:e;return(0,vn.flattenNavigation)(i,{transform:function(n,e){return null!==e&&void 0!==e&&e.section&&(n.section=n.section||e.section),n}}).filter((function(n){return n.link})).filter((function(n){return(0,vn.isMatchSection)(n.section,t)})).map((function(n){return{label:n.link,title:n.title[m]||n.title}}))}),[en,c,t,m]),cn=(0,a.useMemo)((function(){var n={add:v("common.create"),edit:v("common.edit")}[O.type];return n?"".concat(n," ").concat(v("navigation.navigation")):"--"}),[O.type,v]),un=(0,a.useCallback)((function(){O.isRoot=!0,O.locale=Wn,O.type="add",O.linkDisabled=!1,y.current=function(){},I("id",void 0),I("icon",void 0),I("title",void 0),I("link",void 0),I("component",void 0),I("parent",void 0),I("role",[]),O.formState=dn()(zn),D()}),[D,I,O]),mn=(0,a.useCallback)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O.localeList.length>0&&(new Set(tn()(O.formState.title)).size>1&&(n.title=O.formState.title),new Set(tn()(O.formState.link)).size>1&&(n.link=O.formState.link)),ln()(n.role)&&(n.role=void 0),n}),[O.formState.link,O.formState.title,O.localeList]),gn=(0,a.useCallback)((function(){P(),setTimeout((function(){un()}))}),[un,P]),bn=(0,a.useCallback)((function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).parent,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};O.type="add",O.isRoot=!n,I("parent",null===n||void 0===n?void 0:n.id),y.current=function(n){e(gn,n)},C()}),[gn,C,I,O]),jn=(0,a.useCallback)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},t=n.id,i=n.title,o=n.icon,r=n.link,a=n.parent,l=n.component,c=n.role,s=void 0===c?[]:c;I("id",t),I("icon",o),"tmpl"===n.from&&(O.linkDisabled=!0),sn()(i)?O.formState.title=O.localeList.reduce((function(n,e){return n[e]=i,n}),(0,B.Z)({},Wn,i)):A()(i)?O.formState.title=dn()(i):O.formState.title={},sn()(r)?O.formState.link=O.localeList.reduce((function(n,e){return n[e]=r,n}),(0,B.Z)({},Wn,r)):A()(r)?O.formState.link=dn()(r):O.formState.link={},I("component",l),I("parent",a),I("role",s||[]),C(),O.type="edit",O.isRoot=!a,y.current=function(n){var t=nn()(n,["id","title","icon","link","role"]);e(gn,t)}}),[gn,C,I,O]);function Zn(n){var e=null===n||void 0===n?void 0:n.trim();return e?!(e.length>24)||v("navigation.form.titleTooLong",{len:24}):v("common.requiredErrorText",{name:v("navigation.form.title")})}function yn(){return(yn=(0,r.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:if(!(t=null===e||void 0===e?void 0:e.trim())){n.next=10;break}return n.prev=2,n.next=5,(0,k.GL)(t);case 5:n.next=10;break;case 7:return n.prev=7,n.t0=n.catch(2),n.abrupt("return",v("navigation.form.invalidIcon"));case 10:return n.abrupt("return",!0);case 11:case"end":return n.stop()}}),n,null,[[2,7]])})))).apply(this,arguments)}function Ln(n){var e=null===n||void 0===n?void 0:n.trim();return e?!!(0,vn.checkLink)(e)||v("navigation.form.invalidLink"):!!O.isRoot||v("common.requiredErrorText",{name:v("navigation.form.link")})}(0,a.useImperativeHandle)(e,(function(){return{add:bn,edit:jn,close:gn}}),[bn,gn,jn]);var Nn=(0,a.useCallback)((function(n){O.locale=n,O.formState.title[n]||(O.formState.title[n]=""),O.formState.link[n]||(O.formState.link[n]=""),setTimeout((function(){D()}))}),[D,O]),Sn=(0,a.useCallback)((function(){for(var n=O.formState,e=n.title,t=n.link,i=0,o=Object.keys(e);i<o.length;i++){var r=Zn(e[o[i]]);if(!0!==r)return r}for(var a=0,l=Object.keys(t);a<l.length;a++){var c=Ln(t[l[a]]);if(!0!==c)return c}return!0}),[O.formState]),wn=(0,a.useCallback)((function(n){var e=Sn();!0===e?y.current(mn(n)):x.Z.error(e)}),[Sn,mn]),Pn=(0,a.useCallback)((function(n){O.formState.title=X()(O.formState.title,n),O.formState.link=X()(O.formState.link,n)}),[O.formState]),Cn=(0,a.useCallback)((function(n){var e,t;O.locale=n,O.formState.title[n]=null===(e=O.formState.title)||void 0===e?void 0:e[Wn],O.formState.link[n]=null===(t=O.formState.link)||void 0===t?void 0:t[Wn],setTimeout((function(){D()}))}),[D,O]);return(0,M.jsxs)(j.ZP,{open:S,title:cn,onClose:gn,actions:(0,M.jsx)(q.Z,{onClick:R(wn),color:"primary",autoFocus:!0,variant:"contained",children:v("common.confirm")}),children:[(0,M.jsx)(In,{sx:{mb:1},onAdd:Cn,onChange:Nn,onRemoveLocale:Pn,localeMap:g,locales:O.localeList}),(0,M.jsxs)("form",{noValidate:!0,autoComplete:"off",children:[(0,M.jsx)(fn.Qr,{name:"title",control:T,rules:{validate:Zn},render:function(n){var e,t,o=n.field;return(0,M.jsx)(H.Z,(0,i.Z)({fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:v("navigation.form.titlePlaceholder"),label:v("navigation.form.title"),disabled:O.isEdit,error:!(null===W||void 0===W||null===(e=W.title)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.title)||void 0===t?void 0:t.message)||" "},o))}}),(0,M.jsx)(fn.Qr,{name:"icon",control:T,rules:{validate:function(n){return yn.apply(this,arguments)}},render:function(n){var e,t,o=n.field;return(0,M.jsx)(H.Z,(0,i.Z)((0,i.Z)({fullWidth:!0,variant:"outlined",margin:"dense",placeholder:v("navigation.form.iconPlaceholder"),label:v("navigation.form.icon"),error:!(null===W||void 0===W||null===(e=W.icon)||void 0===e||!e.message),disabled:O.locale!==Wn,helperText:(null===W||void 0===W||null===(t=W.icon)||void 0===t?void 0:t.message)||(0,M.jsx)(l.Z,{display:"flex",children:(0,M.jsxs)(l.Z,{component:"a",href:"https://icones.js.org",target:"_blank",display:"flex",alignItems:"center",children:[v("navigation.form.findMoreIcon")," ",(0,M.jsx)(k.JO,{style:{marginLeft:4},icon:"radix-icons:external-link"})]})})},o),{},{InputProps:{endAdornment:(0,M.jsx)(K.Z,{position:"end",children:(0,M.jsx)(V.Z,{sx:{cursor:"default"},disableFocusRipple:!0,disableRipple:!0,children:Y&&(0,M.jsx)(Jn,{icon:Y})})})}}))}}),O.isRoot&&(0,M.jsx)(fn.Qr,{name:"component",control:T,render:function(n){var e,t,o=n.field;return(0,M.jsx)(Rn,(0,i.Z)({fullWidth:!0,margin:"dense",disabled:"edit"===O.type||O.locale!==Wn,label:v("navigation.form.component"),placeholer:v("navigation.form.componentPlaceholder"),options:c.map((function(n){return{title:n.title,value:n.name,description:n.link}})),error:!(null===W||void 0===W||null===(e=W.component)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.component)||void 0===t?void 0:t.message)||" "},X()(o,"ref")))}}),(0,M.jsx)(fn.Qr,{name:"link",control:T,rules:{validate:Ln},render:function(n){var e=n.field;return(0,M.jsx)(u.Z,{fullWidth:!0,margin:"dense",children:(0,M.jsx)(G.Z,(0,i.Z)((0,i.Z)({disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:O.linkDisabled,isOptionEqualToValue:function(n){return n.label},options:an,renderInput:function(n){var e,t;return(0,M.jsx)(H.Z,(0,i.Z)((0,i.Z)({},n),{},{placeholder:v("navigation.form.linkPlaceholder"),label:v("navigation.form.link"),error:!(null===W||void 0===W||null===(e=W.link)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.link)||void 0===t?void 0:t.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:on?(0,M.jsx)(K.Z,{position:"start",sx:{textDecoration:xn()(U||"")?"line-through":""},children:on}):null}}))},renderOption:function(n,e){return(0,M.jsxs)(l.Z,(0,i.Z)((0,i.Z)({component:"li"},n),{},{children:[e.label,(0,M.jsx)(h.Z,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:e.title})]}))},margin:"dense"},e),{},{onChange:function(){},onInputChange:function(n,t){e.onChange(t)}}))})}}),["dashboard","sessionManager"].includes(t)&&(0,M.jsx)(fn.Qr,{name:"role",control:T,render:function(n){var e,t,o=n.field;return(0,M.jsx)(Rn,(0,i.Z)({fullWidth:!0,multiple:!0,margin:"dense",label:v("navigation.form.role"),placeholer:v("navigation.form.rolePlaceholder"),options:d.map((function(n){return{title:n.title,value:n.name}})),error:!(null===W||void 0===W||null===(e=W.role)||void 0===e||!e.message),helperText:(null===W||void 0===W||null===(t=W.role)||void 0===t?void 0:t.message)||" "},X()(o,"ref")))}})]})]})}));Fn.propTypes={section:w().string,components:w().array,rawNavigations:w().array},Fn.defaultProps={section:"",components:[],rawNavigations:[]};var Bn=Fn;function qn(n){var e=n.className,t=n.add,i=n.edit,o=n.toggle,r=n.del,l=n.data,c=n.section,s=(0,Z.PE)().t,u=["yaml","tmpl"].includes(l.from),d=(0,a.isValidElement)(l.subtitle);function f(n){n.preventDefault(),n.stopPropagation()}var v=(0,a.useCallback)((function(n){f(n),t(l)}),[t,l]),m=(0,a.useCallback)((function(n){f(n),i(l)}),[i,l]),p=(0,a.useCallback)((function(n){f(n),o(l)}),[o,l]),h=(0,a.useCallback)((function(n){f(n),r(l)}),[r,l]);return(0,M.jsxs)("div",{className:e,children:[!l.parent&&["header","footer","dashboard"].includes(c)&&(0,M.jsx)("span",{title:s(d?"navigation.action.noAddSub":"navigation.action.addSub"),children:(0,M.jsx)(V.Z,{size:"small",color:"success",onClick:v,disabled:d,children:(0,M.jsx)(k.JO,{icon:"mdi:plus-box-outline"})})}),(0,M.jsx)("span",{title:s(d?"navigation.action.noEdit":"navigation.action.edit"),children:(0,M.jsx)(V.Z,{size:"small",color:"primary",onClick:m,disabled:d,children:(0,M.jsx)(k.JO,{icon:"mdi:pencil"})})}),(0,M.jsx)("span",{title:d?s("navigation.action.noEdit"):l.visible?s("navigation.action.hide"):s("navigation.action.show"),children:(0,M.jsx)(V.Z,{size:"small",color:"warning",onClick:p,disabled:d,children:!1===l.visible?(0,M.jsx)(k.JO,{icon:"mdi:eye-off-outline"}):(0,M.jsx)(k.JO,{icon:"mdi:eye-outline"})})}),(0,M.jsx)("span",{title:s(u&&!d?"navigation.action.noDel":"navigation.action.del"),children:(0,M.jsx)(V.Z,{disabled:u&&!d,size:"small",color:"error",onClick:h,children:(0,M.jsx)(k.JO,{icon:"mdi:delete"})})})]})}qn.propTypes={data:w().object.isRequired,className:w().string,add:w().func,edit:w().func,toggle:w().func,del:w().func,section:w().string},qn.defaultProps={className:"",add:function(){},edit:function(){},toggle:function(){},del:function(){},section:""};var Gn=qn,Vn=t(3785),Kn=t.n(Vn),Hn=t(79683),Un=t.n(Hn),Qn=t(35432),Yn=t(14491),Xn="/",$n="header",ne={sessionManager:[{id:"/sessionManager",title:{en:"Manage",zh:"\u7ba1\u7406"},section:["sessionManager"],icon:"ion:settings-outline",link:"".concat(Qn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),role:["owner","admin"],from:"tmpl"}],dashboard:[{id:"/access",title:{en:"Access",zh:"\u8bbf\u95ee\u63a7\u5236"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"member",title:{en:"Members",zh:"\u6210\u5458"},icon:"ant-design:user-outlined",link:"".concat(Qn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/members"),from:"tmpl"},{id:"passport",title:{en:"Passport",zh:"\u901a\u884c\u8bc1"},icon:"icon-park-outline:passport",link:"".concat(Qn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/passports"),from:"tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"\u4eea\u8868\u76d8"},icon:"ant-design:dashboard-outlined",link:"".concat(Qn.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin"),from:"tmpl"}]}]};function ee(n,e){return n.section&&e.section?n.section===e.section&&n.id===e.id:n.id===e.id}function te(){var n=(0,Dn.y0)(),e=n.blocklet,t=n.actions,l=(0,vn.parseNavigation)(e,{beforeProcess:function(n){var e=dn()(n);return ne.dashboard.forEach((function(n){e.some((function(e){return e.id===n.id}))||e.push(n)})),e.some((function(n){return n.id&&(n.section||[]).includes("sessionManager")}))||e.push.apply(e,(0,bn.Z)(ne.sessionManager)),e}}),c=l.navigationList,s=l.components,u=l.builtinList,d=(0,b.Z)({rawNavigation:dn()(c),activeSection:$n,components:s}),f=(0,a.useMemo)((function(){return(0,vn.nestNavigationList)(d.rawNavigation)}),[d.rawNavigation]),v=(0,a.useMemo)((function(){var n=(0,vn.filterNavigation)(d.rawNavigation,s),e=(0,vn.joinLink)(n,s);return(0,vn.cleanOrphanNavigation)(e)}),[s,d.rawNavigation]);function m(n){if(!n.id)return"";var e=(0,vn.flattenNavigation)((0,vn.joinLink)(f,s)),t=e.find((function(e){return e.id===n.id}));function i(n){var e=n.name;return(0,M.jsx)(wn.Z,{label:"Uninstalled: ".concat(e),color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}if(null!==t&&void 0!==t&&t.component){if(!s.some((function(n){return n.name===t.component})))return(0,M.jsx)(i,{name:t.component})}else if(t.parent){var o=e.find((function(n){return n.id===t.parent}));if(null!==o&&void 0!==o&&o.component&&!s.some((function(n){return n.name===o.component})))return(0,M.jsx)(i,{name:o.component})}return null===t||void 0===t?void 0:t.link}function p(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xn;return n.map((function(n){var t=s.find((function(e){return e.name===n.component})),i=(null===t||void 0===t?void 0:t.link)||e,o=n.items||[],r=n.link;return{title:n.title,subtitle:m(n),link:r,icon:n.icon,children:p(o,r||Xn),section:n.section,visible:n.visible,parent:n.parent,component:n.component,id:n.id,role:n.role,from:n.from,__base:i}}))}function h(n){return g.apply(this,arguments)}function g(){return(g=(0,r.Z)((0,o.Z)().mark((function n(e){var r,a;return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.map((function(n){return Un()(n,Kn())})),a=r.map((function(n){var e=(0,i.Z)({},n);return e.role&&Array.isArray(e.role)&&(e.role=JSON.stringify(e.role)),e.section&&Array.isArray(e.section)&&(e.section=JSON.stringify(e.section)),e.title&&e.title instanceof Object&&(e.title=JSON.stringify(e.title)),e.link&&e.link instanceof Object&&(e.link=JSON.stringify(e.link)),e})),n.next=4,t.configNavigations(a);case 4:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function x(){return(x=(0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h([]);case 2:d.rawNavigation=dn()(u);case 3:case"end":return n.stop()}}),n)})))).apply(this,arguments)}return{state:d,navigation:v,components:s,getNavigationFullLink:m,updateActiveSection:function(n){d.activeSection=n},updateNavigationItem:function(n){!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=d.rawNavigation.map((function(e){var t=n.find((function(n){return ee((0,i.Z)((0,i.Z)({},n),{},{section:d.activeSection}),e)}));return t?(0,i.Z)((0,i.Z)({},e),t):e}));d.rawNavigation=e}([n])},delNavigationItem:function(n){var e=d.rawNavigation.filter((function(e){return e.id===n||e.parent===n})).map((function(n){return n.id}));d.rawNavigation=d.rawNavigation.filter((function(n){return!e.includes(n.id)}))},addNavigationItem:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,i.Z)((0,i.Z)({},n),{},{id:(0,Yn.x0)(),section:d.activeSection,visible:!0});d.rawNavigation=[].concat((0,bn.Z)(d.rawNavigation),[e])},updateNavigationTree:function(n){var e=[];(0,vn.deepWalk)(n,(function(n,t){var o=(0,i.Z)((0,i.Z)({},X()(n,["children","expand"])),{},{parent:null===t||void 0===t?void 0:t.id});e.push(o)}));var t=d.rawNavigation.filter((function(n){if(!d.activeSection)return!1;var t=e.find((function(e){return ee(e,n)}));return!t||!(0,vn.isMatchSection)(t.section,d.activeSection)}));d.rawNavigation=[].concat((0,bn.Z)(t),e)},getNavigation:function(n){return p(dn()(f).filter((function(e){return(0,vn.isMatchSection)(e.section,n)})))},saveNavigationList:h,resetNavigation:function(){return x.apply(this,arguments)}}}var ie,oe=t(71171),re=t(1192),ae=t(2484),le=t(5873),ce=t(88764),se=t(55402),ue=t(5939),de=t(33518),fe=t(49522);function ve(n){var e,t,i,o,r=n.className,a=n.navigation,c=(0,Dn.y0)().blocklet,s=(0,fe.Z)({blocklet:c}).logoUrl,u=null===c||void 0===c||null===(e=c.environments)||void 0===e||null===(t=e.find((function(n){return n.key===kn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER})))||void 0===t?void 0:t.value,d=null===c||void 0===c||null===(i=c.environments)||void 0===i||null===(o=i.find((function(n){return n.key===kn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR})))||void 0===o?void 0:o.value,f=u||d?{owner:u,year:d}:void 0,v={appId:c.appDid,appLogo:s,appName:c.meta.title,enableConnect:!0,enableLocale:!1,navigation:a,copyright:f};return(0,M.jsx)(ce.Z,{children:(0,M.jsxs)(l.Z,{className:r,children:[(0,M.jsx)(re.Z,{meta:v}),(0,M.jsx)(l.Z,{children:(0,M.jsx)(le.Z,{meta:v,invalidPathFallback:function(){},headerProps:{style:{display:"none"}},children:(0,M.jsx)(se.ZP,{container:!0,spacing:2,children:new Array(6).fill().map((function(n,e){return(0,M.jsxs)(se.ZP,{item:!0,xs:4,children:[(0,M.jsx)(ue.Z,{animation:!1,variant:"rectangular",width:"100%",height:120}),(0,M.jsxs)(l.Z,{sx:{pt:.5},children:[(0,M.jsx)(ue.Z,{animation:!1}),(0,M.jsx)(ue.Z,{width:"60%",animation:!1})]})]},e)}))})})}),(0,M.jsx)(ae.Z,{meta:v})]})})}ve.propTypes={className:w().string,navigation:w().array},ve.defaultProps={className:"",navigation:[]};var me=(0,de.Z)(ve)(ie||(ie=(0,oe.Z)(["\n .dashboard {\n height: auto !important;\n }\n .dashboard-content + div {\n display: none;\n }\n"]))),pe={login:N(),logout:N(),switch:N(),switchDid:N(),switchProfile:N(),switchPassport:N(),useDid:function(){return{walletDid:"abcdefghijklmnopqrstuvwxyz"}},useOAuth:function(){return{logoutOAuth:N(),bindOAuth:N(),configs:{},switchOAuthPassport:N()}}},he={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"SessionManager"};var ge=function(){var n=(0,Z.PE)().t,e=(0,Dn.y0)().blocklet,t=(0,a.useRef)(null),L=(0,Mn.DJ)().roles,N=(0,b.Z)({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),S=te(),w=S.state,P=S.navigation,C=S.getNavigation,O=S.saveNavigationList,E=S.resetNavigation,A=S.updateActiveSection,R=S.updateNavigationTree,T=S.updateNavigationItem,_=S.delNavigationItem,I=S.addNavigationItem,D=(0,a.useCallback)((function(n){t.current.add({parent:n},(function(n,e){I(e),n()}))}),[I]),W=(0,a.useCallback)((function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(n){case"edit":t.current.edit(e,(function(n,e){T(e),n()}));break;case"toggle":T({id:e.id,visible:!e.visible});break;case"del":_(e.id)}}),[_,T]),z=(0,a.useCallback)((0,r.Z)((0,o.Z)().mark((function e(){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,N.saveLoading=!0,e.next=4,O(w.rawNavigation);case 4:x.Z.success(n("common.succeeded")),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),x.Z.error((0,M.jsxs)(l.Z,{children:[(0,M.jsx)(h.Z,{variant:"subtitle2",children:n("navigation.actionFailed")}),(0,M.jsx)(h.Z,{variant:"body1",children:(0,Yn.Z)(e.t0)||e.t0.error})]}));case 10:return e.prev=10,N.saveLoading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])}))),[w.rawNavigation,N,O,n]),F=(0,a.useCallback)((0,r.Z)((0,o.Z)().mark((function e(){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,N.resetLoading=!0,e.next=4,E();case 4:x.Z.success("\u91cd\u7f6e\u6210\u529f",{variant:"success"}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),x.Z.error((0,M.jsxs)(l.Z,{children:[(0,M.jsx)(h.Z,{variant:"subtitle2",children:n("navigation.actionFailed")}),(0,M.jsx)(h.Z,{variant:"body1",children:(0,Yn.Z)(e.t0)||e.t0.error})]}));case 10:return e.prev=10,N.resetLoading=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])}))),[N,E,n]),B=(0,a.useMemo)((function(){return{session:(0,i.Z)((0,i.Z)({},pe),{},{user:{did:e.appDid,fullName:"Preview User",role:N.mockRole}})}}),[e.appDid,N.mockRole]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(s.Z,{variant:"outlined",children:Object.keys(he).map((function(n){return(0,M.jsxs)(c.Z,{variant:w.activeSection===n?"contained":void 0,onClick:function(){return A(n)},children:[he[n]," (".concat(C(n).length,")")]},n)}))}),(0,M.jsxs)(p.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[(0,M.jsx)(h.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Config"}),(0,M.jsx)(s.Z,{variant:"outlined",children:(0,M.jsx)(g.Z,{size:"small",variant:"outlined",color:"error",startIcon:(0,M.jsx)(k.JO,{icon:"system-uicons:reset"}),sx:{mr:2},loading:N.resetLoading,loadingPosition:"start",onClick:function(){N.showResetConfirm=!0},children:"\u91cd\u7f6e"})}),(0,M.jsxs)(s.Z,{variant:"outlined",children:[(0,M.jsx)(c.Z,{size:"small",variant:"outlined",startIcon:(0,M.jsx)(k.JO,{icon:"mdi:plus"}),onClick:function(){return D()},children:"\u65b0\u5efa"}),(0,M.jsx)(g.Z,{size:"small",variant:"contained",startIcon:(0,M.jsx)(k.JO,{icon:"mdi:content-save"}),loading:N.saveLoading,loadingPosition:"start",onClick:z,children:"\u4fdd\u5b58"})]})]}),(0,M.jsx)(v.Z,{variant:"outlined",sx:{display:"flex",height:280,overflow:"hidden"},children:(0,M.jsx)(v.Z,{elevation:0,sx:{flex:1,overflow:"auto"},children:(0,M.jsx)(J,{treeData:C(w.activeSection),setTreeData:R,renderActions:function(n){var e=n.data,t=n.className;return(0,M.jsx)(Gn,{data:e,className:t,section:w.activeSection,add:function(){return D.apply(void 0,arguments)},del:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["del"].concat(e))},edit:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["edit"].concat(e))},toggle:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return W.apply(void 0,["toggle"].concat(e))}})}})})}),(0,M.jsxs)(p.Z,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[(0,M.jsx)(h.Z,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Preview"}),(0,M.jsxs)(u.Z,{sx:{m:1,minWidth:120},size:"small",children:[(0,M.jsx)(d.Z,{children:"Role"}),(0,M.jsx)(m.Z,{value:N.mockRole,label:"Role",onChange:function(n){N.mockRole=n.target.value},children:L.map((function(n){return(0,M.jsx)(f.Z,{value:n.name,children:n.title},n.name)}))})]})]}),(0,M.jsx)(v.Z,{variant:"outlined",children:(0,M.jsx)(y.B3.Provider,{value:B,children:(0,M.jsx)(me,{navigation:P})})}),(0,M.jsx)(Bn,{ref:t,section:w.activeSection,components:w.components,rawNavigations:w.rawNavigation}),(0,M.jsx)(j.I4,{open:N.showResetConfirm,title:"\u662f\u5426\u6e05\u7a7a\u6240\u6709\u81ea\u5b9a\u4e49\u5bfc\u822a",onConfirm:function(){var n=(0,r.Z)((0,o.Z)().mark((function n(){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,F();case 2:N.showResetConfirm=!1;case 3:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),onCancel:function(){N.showResetConfirm=!1},children:(0,M.jsx)("p",{children:"\u6e05\u7a7a\u540e\uff0c\u5bfc\u822a\u4f1a\u6062\u590d\u5230 Blocklet \u539f\u6709\u9ed8\u8ba4\u7684\u914d\u7f6e"})})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4906],{44906:function(e,t,n){n.r(t),n.d(t,{default:function(){return ue}});var r=n(71171),o=n(96234),a=n(5057),i=n(6352),s=n.n(i),l=n(33518),c=n(67654),u=n(11750),d=n(39948),h=n(39434),f=n(68420),m=n(5952),p=n(75793),x=n(59740),b=n(33028),v=n(38898),g=n(52439),Z=n(71569),k=n(77121),y=n(35432),j=n(44727),w=n(4651),P=n(74094),S=n(85493),R=n(38242),C=n(44846),D=n(28726),E=n(547),F=n(86229),U=n(76811),L=n(23484),N=n(34937);var T=n(7199),_=n(10458),B=n.n(_),M=n(13128),W=n(73170),I=n(96266);function A(e){var t=e.meta,n=e.onCancel,r=e.handlePaySuccess,i=e.storeUrl,l=(0,f.PE)().t,c=(0,p.h6)().info,d=(0,a.useState)("both"),h=(0,o.Z)(d,2),m=h[0],x=h[1],b=(0,a.useState)(1),v=(0,o.Z)(b,2),g=v[0],Z=v[1],k=(0,P.yP)(c),y=(0,w.FM)(t,c,i),j=(0,R.getDisplayName)({meta:t});if("purchase"===m&&2===g)return(0,I.jsx)(E.default,{open:!0,popup:!0,baseUrl:i,action:"acquire-asset",checkFn:B().create({baseURL:s()(i,"/store")}).get,onSuccess:function(){r(y)},onClose:n,checkTimeout:3e5,extraParams:{factory:t.nftFactory},webWalletUrl:k,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:l("store.purchase.auth.title",{name:j}),scan:l("store.purchase.auth.scan"),confirm:l("store.purchase.auth.confirm"),success:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u.Z,{gutterBottom:!0,children:l("store.purchase.auth.success")}),(0,I.jsxs)(u.Z,{variant:"subtitle2",children:[" ",l("store.purchase.autoLaunch",{name:j})]})]})}});var S=M.ZP;return(0,I.jsx)(S,{title:l("store.purchase.title",{name:j}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:function(e,t){"backdropClick"!==t&&n()},children:(0,I.jsx)("div",{style:{marginBottom:16},children:(0,I.jsx)(W.AP,{action:m,onNext:function(){m&&(Z(2),"verify"===m&&(window.location.href=y))},onSelect:function(e){e!==m&&x(e)}})})})}A.defaultProps={handlePaySuccess:function(e){setTimeout((function(){window.location.href=e}),1e3)}};var K,O=A,z=n(25339);function H(e){var t=e.meta,n=e.buttonText,r=e.storeUrl,i=(0,f.PE)().t,s=(0,S.useNavigate)(),l=(0,p.h6)().info,u=(0,z.Tt)().api,d=!1===(0,R.isFreeBlocklet)(t),h=(0,a.useState)(!1),m=(0,o.Z)(h,2),x=m[0],b=m[1],v=function(e){var t=(0,L.Z)(),n=(0,S.useNavigate)(),r=(0,c.Z)("sid:blocklet:purchase:".concat(e)),i=(0,o.Z)(r,2),s=i[0],l=i[1],u=(0,a.useState)(!1),d=(0,o.Z)(u,2),h=d[0],f=d[1],m=(0,a.useState)(null),p=(0,o.Z)(m,2),x=p[0],b=p[1],v=function(){var e=new URL(window.location.href),t=e.pathname,r=e.searchParams,o=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";r.get("sid")&&(l(""),n(t.replace(o,"/"),{replace:!0}))},g=!(!t.get("assetDid")||!s||t.get("sid")!==s);return(0,N.mU)(U.BlockletEvents.purchaseChange,(function(t){t.did===e&&(b(t.session),["declined","confirmed","error"].includes(t.session.status)&&(f(!0),setTimeout(v,2e3)))})),(0,a.useEffect)((function(){x&&x.id!==s&&l(x.id)}),[x]),{hasCompleted:h,hasPurchased:g,session:x,setSession:b,doRedirect:v}}(t.did),g=v.hasPurchased,Z=(0,a.useState)(!1),k=(0,o.Z)(Z,2),y=k[0],_=k[1],B=(0,c.Z)("instant-blocklet-install",!1),M=(0,o.Z)(B,1)[0],W=(0,a.useState)(!1),A=(0,o.Z)(W,2),K=A[0],H=A[1],V=(0,a.useMemo)((function(){return x?i(d?"blocklet.status.purchasing":"blocklet.status.waiting"):""}),[x,i,d]),q=(0,a.useMemo)((function(){return d?n.purchase:n.launch}),[d,n]),$=function(e){e.preventDefault(),e.stopPropagation();try{if(b(!0),d)return void _(!0);if(M)return void H(!0);if(!d){var n=(0,w.FM)(t,l,r);return void(window.location.href=n)}}catch(o){F.Z.error((0,P.Z)(o),{autoHideDuration:5e3}),console.error("Blocklet installed failed",o)}finally{b(!1)}};return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(j.Kk,{children:(0,I.jsx)(T.Z,{permission:"mutate_blocklets",children:function(e){return(0,I.jsx)(D.Z,{onClick:$,size:"small",disabled:Boolean(V||!e),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:V?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(C.Z,{size:16,style:{marginRight:3}}),V]}):q},t.did)}})}),(g||y)&&(0,I.jsx)(O,{method:"launch",meta:t,mode:"both",onCancel:function(){b(!1),_(!1)},storeUrl:r}),K&&(0,I.jsx)(E.default,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:u.get,checkTimeout:3e5,onSuccess:function(e){b(!1),H(!1),s("/blocklets/".concat(e.appDid,"/components"))},extraParams:{title:t.title,blockletMetaUrl:decodeURIComponent((0,P.Rn)(r,t.did).trim())},messages:{title:i("setup.keyPair.title"),scan:i("setup.keyPair.scan"),confirm:i("setup.keyPair.confirm"),success:i("setup.keyPair.success")},onClose:function(){b(!1),H(!1)}})]})}H.defaultProps={};var V=["storeUrl","handleSearchSelect","extraFilter"],q=function(e,t,n){var r=(0,w.RU)(t);return s()(n,"/blocklets/".concat(e.did,"/?server-url=").concat(r))},$=function(e){var t=e.meta,n=e.attribute,r=e.value;return t._formatted?t._formatted[n]:r};function G(e){var t=e.blocklet,n=e.endpoint,r=(0,f.PE)().t,o=(0,p.h6)(),a=s()(o.imgPrefix,"blocklet.png"),i=n;if(i.startsWith("http")&&t.logo)a=s()(i,(0,P.lk)(t.did,t.logo));else{var l=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");l&&(l="/".concat(l)),a=s()(l,"/blocklet/logo/".concat(t.did))}var c=(null===o||void 0===o?void 0:o.info.mode)!==y.NODE_MODES.SERVERLESS,u={meta:t,buttonText:{purchase:r("common.purchase"),launch:r("common.launch")},storeUrl:i};return(0,I.jsx)(v.Z,{href:q(t,o.info,n),style:{color:"initial",textDecoration:"none"},onClick:function(e){return!!e.currentTarget.contains(e.target)||(e.preventDefault(),!1)},target:"_blank",children:(0,I.jsx)(Q,{title:$({meta:t,attribute:"title",value:t.title||t.name}),did:t.did,description:$({meta:t,attribute:"description",value:t.description}),cover:t.logo?a:"",version:t.version,button:c?(0,I.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,I.jsx)(H,(0,b.Z)({},u))}):null})})}function J(e){var t,n=e.storeUrl,r=e.handleSearchSelect,i=e.extraFilter,s=(0,x.Z)(e,V),l=(0,f.PE)().locale,c=(0,p.h6)(),u=(0,a.useState)({}),d=(0,o.Z)(u,2),h=d[0],m=d[1],v=n,y=null===c||void 0===c||null===(t=c.info)||void 0===t?void 0:t.version;return(0,a.useEffect)((function(){m({})}),[v]),(0,I.jsx)(g.ErrorBoundary,{FallbackComponent:Z.H,resetKeys:[v],children:(0,I.jsx)("div",(0,b.Z)((0,b.Z)({},s),{},{children:(0,I.jsx)(k.Z,{blockletRender:function(e){var t=(0,b.Z)((0,b.Z)({},e),{},{endpoint:v});return(0,I.jsx)(G,(0,b.Z)({},t))},baseSearch:!0,endpoint:v,locale:l,onFilterChange:function(e){m(e)},onSearchSelect:r,filters:h,extraFilter:i,serverVersion:y})}))})}G.defaultProps={endpoint:""},J.defaultProps={handleSearchSelect:null,extraFilter:void 0};var Q=(0,l.Z)(j.ZP)(K||(K=(0,r.Z)(["\n .ms-highlight {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),X=n(92877),Y=n(19577),ee=n(2478),te=n(44067),ne=n(46954),re=n(49390),oe=n(22714),ae=n(45170),ie=(0,X.Z)((function(){return{buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}})),se=(0,a.forwardRef)((function(e,t){var n=e.onChange,r=e.onDelete,i=(0,p.h6)().info,s=(0,f.PE)().t,l=(0,a.useState)(!1),d=(0,o.Z)(l,2),h=d[0],x=d[1],b=(0,a.useState)(!1),v=(0,o.Z)(b,2),g=v[0],Z=v[1],k=(0,a.useState)(-1),y=(0,o.Z)(k,2),j=y[0],w=y[1],S=ie(),R=(0,c.Z)(m.W),E=(0,o.Z)(R,2),U=E[0],L=E[1],N=Math.max(i.blockletRegistryList.findIndex((function(e){return e.url===U})),0);return(0,a.useImperativeHandle)(t,(function(){return{setOpen:Z}})),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(T.Z,{permission:"mutate_node",children:function(e){return(0,I.jsx)(D.Z,{disabled:!e,classes:{text:S.buttonText},color:"secondary","data-cy":"store-toggle",onClick:function(){Z(!0)},endIcon:(0,I.jsx)(re.Z,{}),children:(0,I.jsx)(u.Z,{color:"secondary",children:i.blockletRegistryList[N].name})})}}),(0,I.jsx)(M.ZP,{title:s("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:g,onClose:function(){return Z(!1)},children:(0,I.jsxs)(Y.Z,{className:S.tabPanel,children:[i.blockletRegistryList.map((function(e,t){return(0,I.jsxs)(ee.ZP,{button:!0,disabled:h,selected:N===t,"data-cy":"store-switch",onClick:function(){h||(t!==N?function(e){try{x(!0),w(e);var t=i.blockletRegistryList[e];L(t.url),n(t.url),Z(!1)}catch(r){console.error(r),F.Z.error("".concat(s("store.blockletRegistry.changeFailed")," ").concat((0,P.Z)(r)))}finally{x(!1)}}(t):Z(!1))},children:[(0,I.jsx)(ne.Z,{className:S.iconRoot,children:j===t&&h&&(0,I.jsx)(C.Z,{size:16})}),(0,I.jsx)(te.Z,{children:(0,I.jsx)(ae.Z,{teamDid:i.did,store:e,onDelete:function(){return r(e.url)}})})]},e.url)})),(0,I.jsx)(oe.Z,{disabled:h,onAdd:n,teamDid:i.did,blockletRegistryList:i.blockletRegistryList})]})})]})}));se.defaultProps={onChange:function(){},onDelete:function(){}};var le,ce=se;function ue(){var e=(0,f.PE)().t,t=(0,p.h6)().info,n=(0,c.Z)(m.W),r=(0,o.Z)(n,1)[0],i=t.blockletRegistryList,l=i.find((function(e){return r===e.url}))||i[0],x=(0,a.useState)(l.url),b=(0,o.Z)(x,2),v=b[0],g=b[1],Z=t.routing.adminPath,k=s()(window.location.origin,Z),y=(0,a.useRef)(null);return(0,I.jsxs)(de,{children:[(0,I.jsxs)(h.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,I.jsx)(u.Z,{color:"textPrimary",children:e("common.store")}),(0,I.jsx)(ce,{ref:y,onChange:function(e){return g(e)},onDelete:function(e){var n;v===e&&g(null===(n=t.blockletRegistryList[0])||void 0===n?void 0:n.url)}})]}),(0,I.jsx)(d.Z,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:(0,I.jsx)(u.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),(0,I.jsx)(J,{className:"blocklet-list",handleSearchSelect:function(e){var t=e.detailUrl,n=new URL(t);n.searchParams.set("server-url",k);var r=document.createElement("a");r.setAttribute("target","_blank"),r.setAttribute("href",n.href),r.click()},storeUrl:v})]})}var de=l.Z.main(le||(le=(0,r.Z)(["\n @media (max-width: ","px) {\n .store-header {\n flex-direction: column;\n margin-bottom: 32px !important;\n }\n\n .page-header {\n margin-bottom: 16px !important;\n }\n }\n .blocklet-list {\n aside:hover {\n height: calc(100vh - 235px);\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.sm}))}}]);