@abtnode/webapp 1.16.17-beta-1cab4b42 → 1.16.17-beta-ce49fe0e

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.
@@ -83,7 +83,7 @@ object-assign
83
83
  */
84
84
 
85
85
  /**
86
- * @mui/styled-engine v5.14.12
86
+ * @mui/styled-engine v5.14.13
87
87
  *
88
88
  * @license MIT
89
89
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/webapp",
3
- "version": "1.16.17-beta-1cab4b42",
3
+ "version": "1.16.17-beta-ce49fe0e",
4
4
  "keywords": [
5
5
  "arcblock",
6
6
  "react"
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[373],{44784:function(e,n,t){var s,a=t(71171),i=t(33028),r=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,r.Z)(e,p),o=(0,i.Z)((0,i.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,i.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},90373:function(e,n,t){t.r(n),t.d(n,{default:function(){return Ke}});var s=t(5057),a=t(33028),i=t(39948),r=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(55152),v=t(6352),A=t.n(v),y=t(86229),j=t(17682),Z=t(13128),C=t(88574),k=t(35432),B=t(60344),I=t(14491),S=t(58238),b=t(38242);var w=function(e){var n,t,s,a=e.blocklet,i=a.appDid,r=(0,b.getAppName)(a),o=(0,b.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:i,appName:r,appDescription:o,appUrl:l,scopes:"list:object read:object write:object",referrer:window.location.href,isReady:Boolean(l)}},U=t(84584),R=t(49946),E=t(96266);function D(e){var n=Object.assign({},((0,h.Z)(e),e)),t=(0,c.y0)().blocklet,v=(0,S.h6)().info,b=(0,o.PE)(),D=b.t,F=b.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,I.yP)(v),$=(0,R.XN)(),ee=$.spaceGateways,ne=$.addSpaceGateway,te=(0,s.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:A()(k.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(k.PROD_DID_SPACES.CORE_URL).origin,checkFn:B.od.create({baseURL:A()(k.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)(r.Z,{gutterBottom:!0,children:D("storage.spaces.provideNFT.success")})},onClose:function(){ie((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}))}}),se=(0,d.Z)(te,2),ae=se[0],ie=se[1],re=(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)(r.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)(re,2),ce=oe[0],le=oe[1],pe=function(){var e=(0,p.Z)((0,l.Z)().mark((function e(n,t){var s,i;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s=t(n.endpoint),i=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"}),i));case 5:le((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})})),z(null),ie((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,I.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,i,r,o,c,p;return(0,l.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.endpoint,r=n.name,o=n.did,(c=null===i||void 0===i||null===(t=i.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===i}))){e.next=12;break}return y.Z.error(D("storage.spaces.gateway.add.duplicate",{name:r})),e.abrupt("return");case 12:return p={name:r,did:o,url:c,endpoint:i},e.next=15,ne(p,i);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,i;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),i="".concat(D("storage.spaces.gateway.add.failed",F),": ").concat((0,I.Z)(e.t0)),W(i);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)(i.Z,{children:[(0,E.jsx)(j.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:function(){ie((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)(r.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)(r.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)(C.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),i=(0,s.useContext)(o.RD).t;if(!n.diskInfo)return(0,E.jsx)(r.Z,{children:i("blocklet.diskInfo.empty")});var c=function(e,n,t){return(0,E.jsxs)(r.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:i("blocklet.diskInfo.appDir"),value:c(l.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:i("blocklet.diskInfo.dataDir"),value:c(l.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:i("blocklet.diskInfo.logDir"),value:c(l.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:i("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)(r.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+qWzJhVfdIJqzuG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m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]}))};function Y(){var e=(0,o.PE)().t,n=(0,c.y0)().blocklet;return(0,E.jsxs)(i.Z,{children:[(0,E.jsxs)(i.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)(r.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.provider")}),(0,E.jsx)(O,{})]}),(0,E.jsx)(r.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),ie=t(44784),re=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,i=(0,s.useState)(!1),r=(0,d.Z)(i,2),c=r[0],h=r[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,I.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,i=e.onDelete,r=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],C=j[1],k=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,C(!0),k(t,!1),e.next=5,r(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,C(!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)(re.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 k(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 k(e,!1)},children:[(0,E.jsxs)(ce.Z,{onClick:function(e){k(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){k(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:i})]})]})}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),Ce=t(22256),ke=t(37541),Be=t(7278),Ie=t(29042),Se=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/PM6AmJouW4cVge9pZuMJga2NQH918Sp4VIXddVCKizUTFu3CbUMxyxgOUoSpidf+JEuRy/g3EyyCTz0yw2KRGtDs4fE8btEktCKZzL3J6mFoLZdlcJKLW33guKRC44aAhkhSW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APaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]}))};function be(e){var n=e.src,t=e.alt,a=(0,s.useState)(!1),i=(0,d.Z)(a,2),r=i[0],o=i[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)(Ce.Z,{ready:r,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)(Se,{style:{cursor:"pointer",width:"58px",height:"58px"},onClick:u})}),(0,E.jsx)(ke.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)(re.Z,{color:"inherit",onClick:f,"aria-label":"close",style:{position:"absolute",top:8,right:8,color:"white"},children:(0,E.jsx)(Ie.Z,{})}),r?(0,E.jsx)(Se,{style:{width:"100%",height:"75vh"}}):(0,E.jsx)("img",{src:n,alt:"",style:{width:"100%",height:"75vh",objectFit:"contain"}})]})})]})}Se.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"},be.propTypes={src:J.string.isRequired,alt:J.string.isRequired};var we,Ue=be,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,C=(0,c.y0)().blocklet,k=(0,S.h6)(),I=k.api,b=k.info.did,D=w({blocklet:C}),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)(r.Z,{gutterBottom:!0,children:j("storage.spaces.authorize.success")})},onClose:function(){ce((function(e){return(0,a.Z)((0,a.Z)({},e),{},{open:!1})}))}}),re=(0,d.Z)(W,2),oe=re[0],ce=re[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,I.configBlocklet({input:{did:[C.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:b,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 i,r,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!==(i=p.name)&&void 0!==i?i:"DID Space",did:null!==(r=p.did)&&void 0!==r?r:(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)(i.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)(i.Z,{display:"flex",children:(0,E.jsx)(Ue,{alt:n.did,src:(0,U.Jf)(n.endpoint)})}),(0,E.jsxs)(i.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)(i.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,E.jsx)(r.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)(i.Z,{className:"spaces-address",display:fe?"none":"flex",color:"#9397A1",marginTop:"8px",children:(0,E.jsx)(r.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)(i.Z,{className:"spaces-backup",display:"flex",alignItems:"center",flex:x&&fe&&1,children:[ue&&(0,E.jsxs)(i.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)(ie.Z,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:(0,E.jsx)(r.Z,{sx:{marginRight:"8px",fontSize:"16px"},children:(0,E.jsx)("span",{children:j("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),fe&&(0,E.jsxs)(i.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)(r.Z,{color:"primary",children:null===P||void 0===P?void 0:P.message}),(0,E.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[(0,E.jsx)(i.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)(i.Z,{sx:{maxWidth:"100%"},children:(0,E.jsxs)(r.Z,{variant:"body2",color:"text.secondary",children:[null===P||void 0===P?void 0:P.progress,"%"]})})]})]}),xe&&(0,E.jsx)(i.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)(i.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)(i.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,i=t.status,o=t.createdAt,c=i===k.BACKUPS.STATUS.PROGRESS&&Ne()().diff(o,"hours")>=k.BACKUPS.TIMEOUT_HOURS,l=i===k.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)(r.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===k.BACKUPS.STATUS.PROGRESS&&Ne()().diff(c,"hours")>=k.BACKUPS.TIMEOUT_HOURS,p=l&&s("common.timeoutError"),h=a===k.BACKUPS.STATUS.PROGRESS&&!l,f=a===k.BACKUPS.STATUS.SUCCEEDED&&!l;return h?(0,E.jsxs)(r.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)(i.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)(i.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)(r.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)(i.Z,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:(0,E.jsx)(r.Z,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),(0,E.jsx)(i.Z,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})}))}Pe.propTypes={};var Ve=Pe;var He=function(){var e=(0,o.PE)().t,n=(0,c.y0)().blocklet,t=(0,S.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)(i.Z,{display:"flex",flexDirection:"column",children:[(0,E.jsxs)(i.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:[(0,E.jsx)(r.Z,{fontSize:"1.2rem",fontWeight:"bold",children:e("storage.spaces.connected.title")}),(0,E.jsx)(O,{})]}),(0,E.jsx)(i.Z,{children:x?(0,E.jsx)(i.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)(r.Z,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:e("common.dataStorage")}),(0,E.jsx)(H,{blocklet:n})]})};function Xe(){return(0,R.XN)().backupEndpoint?(0,E.jsx)(He,{}):(0,E.jsx)(W,{})}Xe.propTypes={};var Ke=Xe},54063:function(e,n,t){t.d(n,{C:function(){return s}});var s="true"===localStorage.getItem("enableDebug")}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6511],{86511:function(e,n,t){t.r(n),t.d(n,{default:function(){return re}});var r=t(71171),a=t(5057),i=t(33518),o=t(85493),c=t(15849),s=t(68420),u=t(11750),l=t(39434),p=t(39948),d=t(10697),f=t(94464),m=t(88574),v=t(28726),h=t(38242),b=t(81010),x=t(87363),g=(t(68534),t(86229)),k=t(1722),y=t(96234),Z=t(35432),w=t(55152),j=t(58238),P=t(29054),S=t(73545),B=t(14491),L=t(4651),D=t(96266),E=function(e){var n={},t=null;return(0,h.forEachBlockletSync)(e,(function(e){n[e.meta.bundleDid]?t=(0,h.getDisplayName)(e,!0):e.meta.bundleDid&&(n[e.meta.bundleDid]=!0)})),t},_=function(e,n,t){var r=e.hostname,a=e.href;if(!n)return a;if(t){var i,o=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!o)return a;var c=o[0],s=(((null===(i=n.site)||void 0===i?void 0:i.domainAliases)||[]).map((function(e){return e.value})).filter(Boolean).find((function(e){return e.endsWith(Z.DEFAULT_DID_DOMAIN)}))||"").replace(".".concat(Z.DEFAULT_DID_DOMAIN),"");return s?a.replace(r,"".concat(s,"-").concat(c,".").concat(Z.DEFAULT_IP_DOMAIN_SUFFIX)):a}return a.replace(n.meta.bundleDid,n.appPid)};function C(){var e=(0,s.PE)().t,n=(0,S.T)().api,t=(0,P.y0)().blocklet,r=(0,j.h6)().inService,i=(0,a.useState)(!1),o=(0,y.Z)(i,2),c=o[0],u=o[1],l=(0,a.useState)(5),d=(0,y.Z)(l,2),f=d[0],b=d[1],x=t&&t.structVersion!==Z.APP_STRUCT_VERSION;return[x&&(0,D.jsxs)(m.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,D.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,D.jsx)(v.Z,{variant:"contained",size:"small",color:"primary",onClick:function(){return function(){try{if("running"===t.status)return void g.Z.error(e("blocklet.migrate.tip.running"));var n=E(t);if(n)return void g.Z.error(e("blocklet.migrate.tip.duplicate",{name:n}));u(!0)}catch(r){g.Z.error((0,B.Z)(r))}}()},style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,D.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((function(n){return(0,D.jsx)(p.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(n))},n)}))]},"alert"),t&&(0,D.jsx)(w.default,{popup:!0,open:c,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:n.get,checkTimeout:3e5,onSuccess:function(){var e=_(window.location,t,r);setTimeout((function(){window.location.href=e}),5e3),b(5),setInterval((function(){b((function(e){return e-1}))}),1e3)},extraParams:{appDid:t.appDid,did:t.meta.did,wt:(0,L.iK)(t,!0),title:(0,h.getDisplayName)(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:f>=0?e("blocklet.migrate.success",{sec:f}):"Redirecting..."},onClose:function(){return u(!1)}},"connect")]}C.propTypes={};var N,G=t(35966),A=t(49946),I=t(44846),T=t(78123),O=t(75793),U=t(17022),z=t(13671),K=t(74094),R=t(7199),F=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(6457),t.e(6591)]).then(t.bind(t,86591))})),M=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(2452),t.e(8059),t.e(5808),t.e(8973)]).then(t.bind(t,5119))})),V=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(105),t.e(6547),t.e(2452),t.e(5953),t.e(1035),t.e(4775)]).then(t.bind(t,14775))})),$=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(442),t.e(9662),t.e(7676),t.e(8986)]).then(t.bind(t,13239))})),X=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(1237),t.e(2305),t.e(5979),t.e(2537)]).then(t.bind(t,75979))})),Y=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(2657),t.e(6412),t.e(3216)]).then(t.bind(t,46412))})),W=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(4901),t.e(1685),t.e(5555)]).then(t.bind(t,85555))})),q=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(4901),t.e(442),t.e(9366),t.e(5526),t.e(1237),t.e(7638),t.e(1685),t.e(4407),t.e(5953),t.e(3135),t.e(875),t.e(2264),t.e(7126)]).then(t.bind(t,77126))})),J=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(9327),t.e(8219)]).then(t.bind(t,92379))})),Q=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(7534)]).then(t.bind(t,87534))})),H=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(4901),t.e(2743),t.e(2611)]).then(t.bind(t,42611))})),ee=(0,a.lazy)((function(){return Promise.all([t.e(7718),t.e(7020),t.e(8537),t.e(105),t.e(2294),t.e(3716),t.e(6547),t.e(5760),t.e(9366),t.e(9354),t.e(373)]).then(t.bind(t,90373))})),ne=function(e){return e.children};function te(){var e,n=(0,o.useNavigate)(),t=(0,o.useParams)().tab,r=void 0===t?"overview":t,i=(0,z.y0)(),y=i.did,w=i.blocklet,j=i.error,P=i.client,S=i.actions,B=S.setBlocklet,L=S.refreshBlocklet,E=(0,O.h6)().refresh,_=(0,s.PE)().t,N=(0,a.useCallback)((function(){return(0,D.jsx)($,{scope:y})}),[y]),A=(null===w||void 0===w||null===(e=w.environments.find((function(e){return"BLOCKLET_APP_URL"===e.key})))||void 0===e?void 0:e.value)||window.location.origin,te=function(e){return(0,K.bV)(e,A)},re=function(e){n("/blocklets/".concat(y,"/").concat(e))},ie=!w||(0,K.wS)(w.status)?[]:(0,h.getAppMissingConfigs)(w),oe=null,ce=[{label:_("common.overview"),value:"overview"},{breadcrumbsLabel:_("common.components"),label:(0,D.jsx)(d.Z,{color:"error",variant:"dot",invisible:!ie.length,children:_("common.components")}),value:"components"}];if(j)oe=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(m.Z,{type:"error",variant:"icon",children:(0,K.Z)(j)}),(0,D.jsx)(v.Z,{onClick:function(){return L()},children:(0,D.jsx)("span",{style:{textDecoration:"underline"},children:_("common.retry")})})]});else if(w){var se,ue={overview:(0,D.jsx)(F,{}),configuration:M,navigation:V,services:W,members:(0,D.jsx)(Y,{type:"blocklet",createPassportSvg:te}),passports:X,components:q,"audit-logs":N,logs:J,runtime:(0,D.jsx)(Q,{}),traffic:(0,D.jsx)(H,{client:P,did:y}),storage:(0,D.jsx)(ee,{})};"configuration"===r&&(0,K.wS)(w.status)&&re("overview"),(0,K.wS)(w.status)||(ce.push({label:_("common.members"),value:"members"}),ce.push({label:_("common.passport"),value:"passports"}),ce.push({label:_("common.configuration"),value:"configuration"})),ce.push({label:_("common.auditLogs"),value:"audit-logs"}),w&&null!==(se=w.children)&&void 0!==se&&se.length&&w.structVersion===Z.APP_STRUCT_VERSION&&ce.push({label:_("common.logs"),value:"logs"}),ce.push({label:_("common.configNavigation"),value:"navigation"}),ce.push({label:_("common.runtime"),value:"runtime"}),ce.push({label:_("common.traffic"),value:"traffic"}),ce.push({label:_("common.storage"),value:"storage"}),(0,h.getBlockletServices)(w).length&&ce.splice(2,0,{label:_("blocklet.services"),value:"services"});var le=ue[r]||ue.overview;oe=(0,D.jsxs)(x.g,{type:"components",children:[!(0,h.isExternalBlocklet)(w)&&(0,D.jsx)(f.Z,{tabs:ce,current:r,onChange:re,scrollButtons:"auto"}),(0,D.jsx)("div",{className:"page-content",children:(0,D.jsx)(a.Suspense,{fallback:(0,D.jsx)(G.Z,{children:(0,D.jsx)(I.Z,{})}),children:(0,a.isValidElement)(le)?le:(0,D.jsx)(le,{blocklet:w,onUpdate:function(e){e&&B(e),L()},createPassportSvg:te})})})]})}else oe=(0,D.jsx)(G.Z,{children:(0,D.jsx)(I.Z,{})});var pe=ce.find((function(e){return e.value===r})),de=w?U.G6:ne;return(0,D.jsx)(de,{teamDid:y,children:(0,D.jsxs)(ae,{children:[(0,D.jsxs)(l.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,D.jsx)(c.Link,{color:"textSecondary",to:"/blocklets",children:_("common.blocklets")}),(0,D.jsx)(c.NavLink,{to:"/blocklets/".concat(y,"/overview"),style:function(e){return e?{color:"inherit"}:{}},children:_("common.detail")}),(0,D.jsx)(u.Z,{color:"textSecondary",children:pe?pe.breadcrumbsLabel||pe.label:""})]}),(0,D.jsxs)(u.Z,{component:"div",className:"page-header",children:[(0,D.jsxs)(u.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[w?(0,D.jsx)(k.Z,{blocklet:w,style:{marginRight:16}}):null,w?(0,D.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,D.jsx)(p.Z,{children:(0,h.getDisplayName)(w)}),"unknown"!==(null===w||void 0===w?void 0:w.status)&&(0,D.jsx)(b.Z,{size:"12px",style:{marginLeft:8},status:w.status,source:w.source})]}):"".concat(_("common.blocklet")," ").concat(_("common.detail"))]}),(0,D.jsx)(R.Z,{permission:"mutate_blocklets",children:!!w&&!(0,h.isExternalBlocklet)(w)&&(0,D.jsx)(T.Z,{className:"page-actions",blocklet:w,onStart:function(){},onComplete:function(e){var t=e.action,r=e.error;r?g.Z.error(r.message):"remove"===t?(E(),n("/blocklets")):L()},variant:"group"})})]}),(0,D.jsx)(C,{}),oe]})})}function re(){var e=(0,o.useParams)().did;return e?(0,D.jsx)(z.$8,{did:e,children:(0,D.jsx)(A.wV,{children:(0,D.jsx)(te,{})})}):null}var ae=i.Z.main(N||(N=(0,r.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 16px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.md}))},49946:function(e,n,t){t.d(n,{wV:function(){return B},XN:function(){return L}});var r=t(32723),a=t(33028),i=t(34795),o=t(96234),c=t(5057),s=t(55898),u=t.n(s),l=t(86229),p=t(68420),d=t(76811),f=t(29054),m=t(84584),v=t(41899),h=t(58238),b=t(65873);function x(e){return g.apply(this,arguments)}function g(){return g=(0,i.Z)((0,r.Z)().mark((function e(n){var t,o,c,s,u;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.blockletDid,o=n.nodeApi,c=n.spaceGateways,s=!1,e.next=4,Promise.all(c.map(function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){var t,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.name,e.next=3,(0,m.nU)(n.endpoint);case 3:return i=e.sent,(0,b.isEmpty)(i)||i===t||(t=i,s=!0),e.abrupt("return",(0,a.Z)((0,a.Z)({},n),{},{name:t}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()));case 4:if(u=e.sent,!s){e.next=8;break}return e.next=8,Promise.all(u.filter((function(e){return e.did})).map((function(e){return o.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:(0,a.Z)({},e)}})})));case 8:return e.abrupt("return",u);case 9:case"end":return e.stop()}}),e)}))),g.apply(this,arguments)}var k=t(99875);var y=t(14491);function Z(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:function(){}},t=n.deps,a=n.setLoading,s=(0,f.y0)().blocklet,u=(0,c.useState)([]),p=(0,o.Z)(u,2),d=p[0],m=p[1],x=(0,h.h6)().api,g=(0,b.debounce)((0,i.Z)((0,r.Z)().mark((function e(){var n,t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a(!0),s){e.next=5;break}return m([]),e.abrupt("return");case 5:return e.next=7,x.getBlockletBackups({input:{did:s.meta.did}});case 7:n=e.sent,t=n.backups,m(null!==t&&void 0!==t?t:[]),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),console.error(e.t0),l.Z.error((0,y.Z)(e.t0));case 16:return e.prev=16,a(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,12,16,19]])}))),2e3);return(0,v.Z)((0,i.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g();case 1:case"end":return e.stop()}}),e)}))),[null===s||void 0===s||null===(e=s.meta)||void 0===e?void 0:e.did].concat(t)),{backups:d}}var w=function(e){var n=e.appDid,t=Z().backups,r=(0,c.useState)({message:"",progress:0,completed:!1}),i=(0,o.Z)(r,2),s=i[0],u=i[1];return(0,(0,h.h6)().ws.useSubscription)(d.BlockletEvents.backupProgress,(function(e){n===(null===e||void 0===e?void 0:e.appDid)&&u((function(){return(0,a.Z)({},e)}))}),[n]),(0,c.useEffect)((function(){var e;if(null!==t&&void 0!==t&&t.length&&(0,b.isNull)(null===(e=t[0])||void 0===e?void 0:e.status)){var n=(0,o.Z)(t,1)[0];u((function(){return{message:n.message,progress:n.progress,completed:Boolean(n.progress>=100)}}))}}),[t]),s},j=t(96266),P=(0,c.createContext)({}),S=P.Provider;P.Consumer;function B(e){var n=e.children,t=(0,p.PE)().t,s=(0,h.h6)().api,u=(0,f.y0)().blocklet,b=(0,c.useState)(!1),g=(0,o.Z)(b,2),y=g[0],P=g[1],B=(0,c.useState)(!1),L=(0,o.Z)(B,2),D=L[0],E=L[1],_=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.setLoading,a=n.refresh,s=(0,f.y0)(),u=s.blocklet,p=s.actions.refreshBlocklet,d=null===u||void 0===u||null===(e=u.meta)||void 0===e?void 0:e.did,m=(0,c.useState)([]),b=(0,o.Z)(m,2),g=b[0],y=b[1],Z=(0,h.h6)().api;return(0,v.Z)((0,i.Z)((0,r.Z)().mark((function e(){var n,a,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,d){e.next=4;break}return y([]),e.abrupt("return");case 4:return null===t||void 0===t||t(!0),e.next=7,Z.getBlockletSpaceGateways({input:{did:d}});case 7:return n=e.sent,a=n.spaceGateways,e.next=11,x({blockletDid:d,nodeApi:Z,spaceGateways:a});case 11:i=e.sent,y(null!==i&&void 0!==i?i:[]),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),l.Z.error((0,k.Z)(e.t0));case 19:return e.prev=19,null===t||void 0===t||t(!1),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[0,15,19,22]])}))),[d,p,a]),{spaceGateways:g}}({refresh:D,setLoading:P}),C=_.spaceGateways,N=w({appDid:null===u||void 0===u?void 0:u.appDid}),G=(0,c.useState)(!1),A=(0,o.Z)(G,2),I=A[0],T=A[1],O=(0,c.useMemo)((function(){return(0,m.mo)(null===u||void 0===u?void 0:u.environments)}),[u,D,I]),U=(0,c.useState)(!1),z=(0,o.Z)(U,2),K=z[0],R=Z({deps:[N],setLoading:z[1]}).backups,F=(0,c.useState)(null===C||void 0===C?void 0:C.find((function(e){return e.endpoint===O}))),M=(0,o.Z)(F,2),V=M[0],$=M[1],X=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n,t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C.push((0,a.Z)((0,a.Z)({},n),{},{loading:!0})),e.next=3,s.addBlockletSpaceGateway({input:{did:u.meta.did,spaceGateway:n}});case 3:if(O===t){e.next=6;break}return e.next=6,s.configBlocklet({input:{did:[u.meta.did],configs:[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}});case 6:q(),$(n);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Y=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:if(n.endpoint!==O){e.next=5;break}return l.Z.warning(t("storage.spaces.gateway.delete.failedForConnected")),e.abrupt("return");case 5:return e.next=7,s.deleteBlockletSpaceGateway({input:{did:u.meta.did,spaceGatewayDid:null===n||void 0===n?void 0:n.did}});case 7:q(),$(n);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),W=function(){var e=(0,i.Z)((0,r.Z)().mark((function e(n){var a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.updateBlockletSpaceGateway({input:{did:u.meta.did,where:{did:n.did},spaceGateway:n}});case 2:if(O===n.endpoint){e.next=5;break}return e.next=5,s.configBlocklet({input:{did:[u.meta.did],configs:[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:n.endpoint}]}});case 5:l.Z.success(t("storage.spaces.connectedWithName",{name:null!==(a=null===n||void 0===n?void 0:n.name)&&void 0!==a?a:"DID Spaces"})),q();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){E((function(e){return!e}))};return(0,j.jsx)(S,{value:{spaceGateways:C,selectedSpaceGateway:V,addSpaceGateway:X,deleteSpaceGateway:Y,updateSpaceGateway:W,refreshSpaceGateways:q,spaceGatewaysLoading:y,spaceGatewayIsSelected:function(e){return(null===e||void 0===e?void 0:e.endpoint)===O},backupEndpoint:O,backupProgress:N,backups:R,backupsLoading:K,refreshBackupEndpoint:function(){T((function(e){return!e}))}},children:n})}function L(){return(0,c.useContext)(P)}B.propTypes={children:u().any.isRequired},B.defaultProps={}},60344:function(e,n,t){t.d(n,{hi:function(){return i},od:function(){return a.a}});var r=t(10458),a=t.n(r);a().defaults.timeout=1e4;var i=a().create()},84584:function(e,n,t){t.d(n,{Jf:function(){return Z},LQ:function(){return f},Nb:function(){return m},Xv:function(){return p},ag:function(){return b},mo:function(){return h},nD:function(){return d},nU:function(){return k},w2:function(){return x}});var r=t(32723),a=t(34795),i=t(82434),o=t.n(i),c=t(76811),s=t(65873),u=t(2842),l=t(60344);function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),a=t.at(-2);return(0,u.xn)(n,"space",r,"apps",a,"explorer?key=/apps/".concat(a,"/.did-objects/").concat(a,"/"))}function d(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return(0,u.xn)(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function m(e){return v.apply(this,arguments)}function v(){return(v=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,l.hi.head(n,{timeout:5e3});case 5:return t=e.sent,a=t.headers,e.abrupt("return","true"===a["x-listable"]&&"true"===a["x-readable"]&&"true"===a["x-writeable"]);case 10:return e.prev=10,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function h(e){var n;return(null===e||void 0===e||null===(n=e.find((function(e){return e.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===n?void 0:n.value)||""}function b(e){var n=new URL(e);return(0,u.xn)(n.origin,n.pathname)}function x(e){return g.apply(this,arguments)}function g(){return(g=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,i,c,p;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=b(n),a=(0,u.xn)(t,"space/api/did/one-click-authorization/token"),e.next=7,l.hi.get(a,{timeout:5e3});case 7:return i=e.sent,c=i.status,p=i.data,e.abrupt("return",200===c&&(0,s.isObject)(p));case 13:return e.prev=13,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function k(e){return y.apply(this,arguments)}function y(){return(y=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,i;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,l.hi.head(n,{timeout:3e3});case 5:return t=e.sent,a=t.headers,i=a["x-space-name"],e.abrupt("return",i?decodeURIComponent(i):"");case 11:return e.prev=11,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return","");case 15:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function Z(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return(0,u.xn)(n,"/api/space/nft/display?spaceDid=".concat(t))}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7126],{77126:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Vr}});var r=t(33028),o=t(5057),i=t(68420),a=t(68079),l=t(59740),c=t(71171),s=t(32723),u=t(34795),d=t(96234),p=t(33518),m=t(55898),f=t.n(m),h=t(37541),x=t(39948),v=t(7278),g=t(6838),Z=t(87971),b=t(99194),y=t(67680),k=t(44919),j=t(10697),C=t(48037),P=t(34966),E=t(94552),w=t(55402),R=t(75239),T=t(48086),S=t(88092),_=t(32207),U=t(35258),I=t(27773),N=t(26174),L=t(36554),D=t(55498),O=t(35432),B=t(44846),F=t(64886),z=t(28726),q=t(25710),A=t(38242),G=t(57156),W=t.n(G),M=t(86229),K=t(87363),V=t(17450),Y=t(22228),H=t(6352),X=t.n(H),$=t(2078),J=t.n($),Q=t(19778),ee=t(38898),ne=t(96266);function te(e){var n,t=e.sourceInfo,r=e.blocklet,a=(0,o.useContext)(i.RD).t;return(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,ne.jsx)(Q.Z,{type:"success",children:J()(t.source)},"source"),"registry"===t.source&&(0,ne.jsx)(ee.Z,{href:X()(t.deployedFrom,"blocklets",(null===r||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.bundleDid)||""),target:"_blank",className:"page-link",underline:"hover",style:{display:"flex",alignItems:"center",marginLeft:8},children:a("blocklet.overview.viewInStore")})]})}te.propTypes={sourceInfo:f().shape({source:f().string,deployedFrom:f().string}),blocklet:f().object},te.defaultProps={sourceInfo:{},blocklet:{}};var re=t(81010),oe=t(40736),ie=t(76811),ae=t(70461),le=t(58238),ce=t(14491),se=t(63406),ue=["blocklet","checkUpgrade","hasPermission"];function de(e){var n=e.blocklet,t=e.checkUpgrade,a=e.hasPermission,c=(0,l.Z)(e,ue),p=(0,le.h6)().api,m=(0,o.useContext)(i.RD).t,f=(0,o.useState)(!1),h=(0,d.Z)(f,2),x=h[0],v=h[1],g=(0,o.useState)(""),Z=(0,d.Z)(g,2),b=Z[0],k=Z[1],j=(0,o.useState)(null),C=(0,d.Z)(j,2),P=C[0],E=C[1],w=(0,o.useState)(null),T=(0,d.Z)(w,2),S=T[0],_=T[1];(0,o.useEffect)((function(){E(null),t&&(n.mode,ie.BLOCKLET_MODES.DEVELOPMENT)}),[n,t]);var U=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){var t;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!0),e.prev=1,t={did:n.meta.did,version:P.version,storeUrl:P.registryUrl||""},e.next=5,(0,ce._v)(2e3);case 5:return e.next=7,p.upgradeBlocklet({input:t});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),M.Z.error("Blocklet upgrade failed: ".concat((0,ce.Z)(e.t0)));case 12:return e.prev=12,v(!1),_(null),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[1,9,12,16]])})));return function(){return e.apply(this,arguments)}}(),I={title:"".concat(m("common.upgrade")," ").concat(m("common.blocklet")," ").concat((0,A.getDisplayName)(n)),description:m("blocklet.action.upgradeDescription"),confirm:m("blocklet.action.confirmUpgrade"),cancel:m("common.cancel"),onConfirm:U,onCancel:function(){v(!1),_(null)}};return a&&P&&!(0,A.isInProgress)(n.status)?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(Y.Z,(0,r.Z)((0,r.Z)({},c),{},{children:n.meta.version})),(0,ne.jsx)(R.Z,{title:m("common.updateAvailable",{version:P.version}),children:(0,ne.jsx)(y.Z,{size:"small",style:{marginLeft:8},disabled:x,onClick:function(){return _(I)},children:x?(0,ne.jsx)(B.Z,{size:16}):(0,ne.jsx)(oe.Z,{style:{fontSize:16,color:"red"}})})}),!!b&&(0,ne.jsx)(M.Z,{variant:"error",message:b,onClose:function(){return k("")}}),S&&(0,ne.jsx)(ae.Z,{title:S.title,description:S.description,confirm:S.confirm,cancel:S.cancel,params:S.params,onConfirm:S.onConfirm,onCancel:S.onCancel})]}):(0,ne.jsx)(Y.Z,(0,r.Z)((0,r.Z)({},c),{},{children:n.meta.version}))}de.propTypes={blocklet:f().object.isRequired,checkUpgrade:f().bool,hasPermission:f().bool},de.defaultProps={checkUpgrade:!1,hasPermission:!1};var pe=(0,se.V)(de,"mutate_blocklets"),me=(0,se.V)(de,"",ce.Wf);function fe(e){return(0,le.h6)().inService?(0,ne.jsx)(me,(0,r.Z)({},e)):(0,ne.jsx)(pe,(0,r.Z)({},e))}var he,xe,ve=t(80378),ge=t(32349),Ze=t(76667),be=t(13128),ye=t(94464),ke=t(28358),je=t(47020),Ce=t(93938),Pe=t(50185),Ee=t(35918),we=t(74782),Re=t(55419),Te=function(e,n){var t=e.description;return(Object.values(ie.CHAIN_PROP_MAP).includes(e.key)||(0,A.isEnvShareable)(e))&&(t=t?"".concat(t," (").concat(n("blocklet.config.sharedToAllComponents"),")"):n("blocklet.config.sharedToAllComponents")),t&&(0,ne.jsx)("div",{style:{marginLeft:12},children:t})},Se=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!(null!==t&&void 0!==t&&t.length||e.custom||["CHAIN_ID","CHAIN_HOST"].includes(e.key)||n.meta.environments.find((function(n){return n.name===e.key}))||!n.children.every((function(n){return!n.meta.environments.find((function(n){return n.name===e.key}))})))||e.custom};function _e(e){var n=e.blocklet,t=e.ancestors,l=(0,le.h6)(),c=l.inService,d=(0,o.useContext)(i.RD).t,p=[].concat((0,a.Z)(t.map((function(e){return e.meta.did}))),[n.meta.did]),m=function(){return M.Z.success(d("blocklet.config.changedTip"))},f=function(e){return Se(e,n,t)};if((0,ce.wS)(n.status))return null;if("unknown"===n.status&&(0,ce.wS)(n.status))return null;var h=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(n){var t;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.key.trim()&&n.value.trim()){e.next=3;break}return M.Z.error(d("blocklet.config.environment.keyValueRequired")),e.abrupt("return");case 3:if(!n.key.startsWith("BLOCKLET_")&&!n.key.startsWith("COMPONENT_")){e.next=6;break}return M.Z.error(d("blocklet.config.environment.invalidKey")),e.abrupt("return");case 6:return n.custom=!0,e.next=9,l.api.configBlocklet({input:{did:p,configs:[n]}});case 9:"ok"===(t=e.sent).code&&m(t.blocklet);case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(r,o){var i,a,c;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.required||r.key.trim()&&r.value.trim()){e.next=3;break}return M.Z.error(d("blocklet.config.environment.keyValueRequired")),e.abrupt("return");case 3:if(!r.key.startsWith("BLOCKLET_")||ie.BLOCKLET_CONFIGURABLE_KEY[r.key]){e.next=6;break}return M.Z.error(d("blocklet.config.environment.invalidKey")),e.abrupt("return");case 6:if(r.key!==ie.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){e.next=11;break}if(!(i=(0,ce.I)(r))){e.next=11;break}return M.Z.error(i),e.abrupt("return");case 11:if(a=[r],r.key===o.key){e.next=17;break}if(Se(r,n,t)){e.next=16;break}return M.Z.error("Only key of custom env can be changed"),e.abrupt("return");case 16:a.push({key:o.key,custom:!0});case 17:return e.prev=17,e.next=20,l.api.configBlocklet({input:{did:p,configs:a}});case 20:"ok"===(c=e.sent).code&&m(c.blocklet),e.next=27;break;case 24:e.prev=24,e.t0=e.catch(17),M.Z.error((0,ce.Z)(e.t0));case 27:case"end":return e.stop()}}),e,null,[[17,24]])})));return function(n,t){return e.apply(this,arguments)}}(),v=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(r){var o;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.required){e.next=3;break}return M.Z.error(d("blocklet.config.environment.deleteForbidden")),e.abrupt("return");case 3:if(Se(r,n,t)){e.next=6;break}return M.Z.error("Only key of custom env can be changed"),e.abrupt("return");case 6:return e.next=8,l.api.configBlocklet({input:{did:p,configs:[{key:r.key,custom:!0}]}});case 8:"ok"===(o=e.sent).code&&m(o.blocklet);case 10:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),g=(n.configs||[]).filter((function(e){return!ie.BLOCKLET_CONFIGURABLE_KEY[e.key]})),Z=(0,A.getSharedConfigObj)(t[0],n),b=(0,A.getComponentMissingConfigs)(n,t[0]),y=g.map((function(e){return(0,r.Z)((0,r.Z)({},e),{},{value:Object.values(ie.CHAIN_PROP_MAP).includes(e.key)&&Object.keys(Z).includes(e.key)?Z[e.key]:Z[e.key]||e.value})})),k=y.some((function(e){return e.key&&e.key.startsWith("BWA_")})),j={onRowAdd:h,onRowUpdate:x,onRowDelete:v,isDeletable:f};return(0,ne.jsxs)(Ie,{children:[!!b.length&&(0,ne.jsx)(Ce.Z,{severity:"error",style:{marginTop:24},children:d("blocklet.config.missingRequired")}),k&&(0,ne.jsx)(Ce.Z,{severity:"info",children:d("blocklet.config.environment.tip")}),(0,ne.jsx)(se.Z,{permission:c?"":"mutate_blocklets",role:c?ce.Wf:[],children:function(e){return(0,ne.jsx)(we.Z,{className:"config-table",children:(0,ne.jsx)(ke.ZP,{title:(0,ne.jsx)("h4",{children:d("common.environment")}),columns:[{title:d("common.key"),field:"key",initialEditValue:"Key",width:"30%",render:function(e){return(0,ne.jsx)(Pe.Z,{value:e.value,style:{color:e.required&&!e.value?"#ff4436":"#222222",fontWeight:e.required?"bold":"normal"},children:e.key})},editComponent:function(e){var n=e.value,t=e.rowData,r=e.onChange;return(0,ne.jsx)(Ne,{children:(0,ne.jsx)(je.Z,{fullWidth:!0,size:"small",disabled:!1===f(t),value:n,onChange:function(e){return r(e.target.value)},variant:"outlined",label:"Key",placeholder:d("blocklet.config.environment.key"),margin:"dense",autoFocus:!0})})}},{title:d("common.value"),field:"value",initialEditValue:"Value",width:"calc((100% - (96px + 30%)) / 1)",render:function(e){return e.value?e.secure?"******":(0,ne.jsx)(Pe.Z,{unstyled:!0,value:e.value,style:{wordBreak:"break-all"},children:e.value}):null},editComponent:function(e){var n=e.value,t=e.rowData,r=e.onChange;return(0,ne.jsxs)(Ne,{children:[(0,ne.jsx)(je.Z,{fullWidth:!0,size:"small",value:"__encrypted__"===n?"":n,onChange:function(e){return r(e.target.value)},variant:"outlined",label:d("common.value"),placeholder:d("blocklet.config.environment.value"),margin:"dense",autoFocus:!0}),Te(t,d)]})}}],icons:(0,r.Z)((0,r.Z)({},Re.Z),Ee.Z),options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1},localization:{header:{actions:d("common.actions")},body:{emptyDataSourceMessage:d("common.noData")}},data:y,editable:e?j:{}})})}})]})}_e.propTypes={blocklet:f().object.isRequired,ancestors:f().array},_e.defaultProps={ancestors:[]};var Ue,Ie=p.Z.div(he||(he=(0,c.Z)(["\n .config-table {\n margin-bottom: 24px;\n position: relative;\n .hide-control {\n position: absolute;\n top: 10px;\n left: 200px;\n @media (max-width: ","px) {\n left: 160px;\n }\n }\n\n .MuiToolbar-root {\n display: flex;\n }\n\n .MuiTableRow-head {\n display: none;\n }\n\n &.hide-header {\n .MuiToolbar-root {\n display: none;\n }\n }\n }\n\n .accordion {\n margin-bottom: 16px;\n &:last-of-type {\n margin-bottom: 0;\n }\n padding: 8px 0 8px 0px;\n &.MuiAccordion-root {\n background: transparent;\n box-shadow: none;\n border: 1px solid #ddd;\n border-radius: 4px;\n &::before,\n &::after {\n height: 0;\n }\n .MuiAccordionSummary-root {\n padding-left: 0;\n }\n .accordion-title {\n font-weight: bold;\n padding-left: 16px;\n }\n }\n }\n"])),(function(e){return e.theme.breakpoints.values.sm})),Ne=p.Z.div(xe||(xe=(0,c.Z)(["\n height: 60px;\n"]))),Le=t(45239),De=t.n(Le),Oe=t(28641),Be=["blocklet","ancestors","hasPermission"];function Fe(e){var n=e.blocklet,t=e.ancestors,a=e.hasPermission,c=(0,l.Z)(e,Be),p=(0,i.PE)().t,m=(0,le.h6)().api,f=!t.length,h=f?n.meta.did:t.map((function(e){return e.meta.did}))[0],v=(0,o.useState)(""),g=(0,d.Z)(v,2),Z=g[0],b=g[1],y=(0,o.useState)(""),k=(0,d.Z)(y,2),j=k[0],C=k[1],P=Z||!a;if(!h)return null;if("unknown"===n.status&&(0,ce.wS)(n.status))return null;var E=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(t){var r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.prev=1,r={rootDid:h,mountPoint:De()(t)},f||(r.did=n.meta.did),e.next=6,m.updateComponentMountPoint({input:r});case 6:return b(!1),e.abrupt("return",!0);case 10:throw e.prev=10,e.t0=e.catch(1),b(!1),e.t0.message=(0,ce.Z)(e.t0),M.Z.error(e.t0.message),e.t0;case 16:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(n){return e.apply(this,arguments)}}();return(0,ne.jsx)(We,(0,r.Z)((0,r.Z)({component:"div"},c),{},{children:(0,ne.jsx)(x.Z,{mt:3,children:(0,ne.jsx)(Oe.Z,{label:p("blocklet.component.mountPoint"),style:{marginTop:-24},disabled:Z||P,loading:Z,required:!0,initialValue:n.mountPoint,onSubmit:E,onChange:function(e){C(p("common.slugifyHint",{value:(0,ce.LN)(e)}))},helperText:j,formatterBeforeSubmit:function(e){return De()(e)}})})}))}var ze=(0,se.V)(Fe,"mutate_blocklets"),qe=(0,se.V)(Fe,"",ce.Wf);function Ae(e){return(0,le.h6)().inService?(0,ne.jsx)(qe,(0,r.Z)({},e)):(0,ne.jsx)(ze,(0,r.Z)({},e))}Fe.propTypes={blocklet:f().object.isRequired,ancestors:f().array,hasPermission:f().bool},Fe.defaultProps={ancestors:[],hasPermission:!1};var Ge,We=p.Z.div(Ue||(Ue=(0,c.Z)([""])));function Me(e){var n=e.blocklet,t=e.ancestors,r=e.children,a=(0,o.useState)(""),l=(0,d.Z)(a,2),c=l[0],s=l[1],u=(0,i.PE)().t,p=!!t.length,m=(0,o.useState)("settings"),f=(0,d.Z)(m,2),h=f[0],v=f[1],g=p?(0,A.getDisplayName)(n,!0):u("blocklet.component.container");if((0,ce.wS)(n.status))return null;if("unknown"===n.status&&(0,ce.wS)(n.status))return null;var Z=function(e){e.stopPropagation(),s(!0)},b={settings:{label:u("blocklet.component.setting"),value:"settings",component:(0,ne.jsx)(Ae,{blocklet:n,ancestors:t})},environments:{label:u("common.environment"),value:"environments",component:(0,ne.jsx)(_e,{blocklet:n,ancestors:t})}},k=Object.values(b).map((function(e){return{label:e.label,value:e.value}})),j=b[h]||b.settings;return["function"===typeof r?r({open:Z}):(0,ne.jsx)(y.Z,{onClick:Z,"data-cy":"action-config-component",children:(0,ne.jsx)(Ze.default,{})}),c&&(0,ne.jsx)(Ve,{open:!0,fullWidth:!0,maxWidth:"md",title:g,onClose:function(){s(!1)},PaperProps:{style:{minHeight:"auto"}},children:p?(0,ne.jsxs)(x.Z,{mt:1,children:[(0,ne.jsx)(ye.Z,{tabs:k,current:h,onChange:function(e){v(e)},scrollButtons:"auto"}),j.component]}):(0,ne.jsx)(_e,{blocklet:n,ancestors:t})})]}Me.propTypes={blocklet:f().object.isRequired,ancestors:f().array,children:f().any},Me.defaultProps={ancestors:[],children:null};var Ke,Ve=(0,p.Z)(be.ZP)(Ge||(Ge=(0,c.Z)(["\n .MuiDialogContent-root {\n padding-top: 0;\n margin-top: -32px;\n }\n .MuiToolbar-root {\n padding-right: 12px;\n }\n .ux-dialog_right {\n padding-right: 20px;\n }\n"]))),Ye=t(11750),He=t(65140),Xe=t(87916);function $e(e){var n=e.component,t=e.remove,a=e.disabled,l=e.tip,c=e.showConfirm,p=e.hideBtn,m=e.onCancel,f=(0,o.useContext)(i.RD).t,h=(0,o.useState)(!1),x=(0,d.Z)(h,2),v=x[0],g=x[1],Z=(0,o.useState)(null),b=(0,d.Z)(Z,2),y=b[0],k=b[1],j=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(n){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(!0),e.next=3,t(n.component,n.removeType);case 3:g(!1),k(null);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C=a||v,P=function(){k({title:"".concat(f("common.delete")," ").concat(n.meta.title||n.meta.name),description:function(e,n){return(0,ne.jsxs)(Ye.Z,{component:"div",children:[(0,ne.jsx)(Ye.Z,{gutterBottom:!0,children:f("blocklet.action.removeComponentDescription")}),(0,ne.jsxs)(Xe.Z,{name:"removeType",value:e.removeType,onChange:function(t){return n((0,r.Z)((0,r.Z)({},e),{},{removeType:t.target.value}))},children:[(0,ne.jsx)(N.Z,{value:"keepData",control:(0,ne.jsx)(He.Z,{}),label:f("blocklet.action.removeComponentKeepData")}),(0,ne.jsx)(N.Z,{value:"complete",control:(0,ne.jsx)(He.Z,{}),label:f("blocklet.action.removeComponentComplete")})]})]})},confirm:f("common.confirm"),cancel:f("common.cancel"),params:{component:n,removeType:"keepData"},onConfirm:j,onCancel:function(){k(null),m()}})};(0,o.useEffect)((function(){c?P():(g(!1),k(null))}),[c]);var E=(0,ne.jsx)(Qe,{size:"small",disabled:C,onClick:function(){return P},"data-cy":"delete-component-btn",children:(0,ne.jsx)(I.default,{disabled:C})}),w=(0,ne.jsx)(R.Z,{title:l||f("common.delete"),children:(0,ne.jsx)("span",{children:E})});return(0,ne.jsxs)(ne.Fragment,{children:[!p&&w,y&&(0,ne.jsx)(ae.Z,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})]})}$e.propTypes={component:f().object.isRequired,remove:f().func,onCancel:f().func,disabled:f().bool,showConfirm:f().bool,hideBtn:f().bool,tip:f().string},$e.defaultProps={remove:function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),disabled:!1,showConfirm:!1,hideBtn:!1,onCancel:function(){},tip:""};var Je,Qe=(0,p.Z)(y.Z)(Ke||(Ke=(0,c.Z)(["\n &.Mui-disabled {\n opacity: 0.5;\n }\n"]))),en=t(22754),nn=t(98451);function tn(e){var n=e.component,t=e.onStart,r=e.onStop,a=e.disabled,l=e.tip,c=(0,o.useContext)(i.RD).t,p=(0,o.useState)(!1),m=(0,d.Z)(p,2),f=m[0],h=m[1],x=(0,o.useState)(),v=(0,d.Z)(x,2),g=v[0],Z=v[1],b=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.prev=1,e.next=4,t(n);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),M.Z.error(e.t0.message);case 9:h(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.prev=1,e.next=4,r(n);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),M.Z.error(e.t0.message);case 9:h(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}(),k=a||f,j=["starting","running","stopping"].includes(n.status),C=j?nn.Z:en.Z,P=(0,ne.jsx)(rn,{disabled:k,onClick:function(){var e;j?Z({title:"".concat(c("common.stop")," ").concat(null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.title),description:c("blocklet.action.stopComponentDescription"),confirm:c("blocklet.action.confirmStop"),cancel:c("common.cancel"),onConfirm:function(){return Z(null),y()},onCancel:function(){return Z(null)}}):b()},"data-cy":"".concat(j?"stop":"start","-component-btn"),children:(0,ne.jsx)(C,{disabled:k})});return[(0,ne.jsx)(R.Z,{title:l||c("common.".concat(j?"stop":"start")),children:(0,ne.jsx)("span",{children:P})},"btn"),g&&(0,ne.jsx)(ae.Z,{title:g.title,description:g.description,confirm:g.confirm,cancel:g.cancel,params:g.params,onConfirm:g.onConfirm,onCancel:g.onCancel},"connect")]}tn.propTypes={component:f().object.isRequired,onStart:f().func,onStop:f().func,disabled:f().bool,tip:f().string},tn.defaultProps={onStart:function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onStop:function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),disabled:!1,tip:""};var rn=(0,p.Z)(y.Z)(Je||(Je=(0,c.Z)(["\n &.Mui-disabled {\n opacity: 0.5;\n }\n"]))),on=t(74286),an=t(30278),ln=t.n(an),cn=t(79077),sn=t.n(cn),un=t(75506),dn=t.n(un),pn=t(3785),mn=t.n(pn),fn=t(2660),hn=t(55372),xn=t(74490),vn=t(33271),gn=t(42876),Zn=t(72904),bn=t(63902),yn=t(51703),kn=t(88574),jn=t(35266),Cn=t(55309),Pn=t(29054),En=t(56666),wn=t(24558),Rn=t(13727),Tn=t(56184),Sn=t(11819),_n=t(67486),Un={description:f().string,editing:f().bool,onChange:f().func,required:f().bool,value:f().any,componentProps:f().object,render:f().func,renderFormItem:f().func};function In(e){var n=e.editing,t=e.value,r=e.onChange,i=(0,o.useState)(!1),a=(0,d.Z)(i,2),l=a[0],c=a[1],s=(0,o.useRef)(),u=(0,o.useRef)(t);(0,o.useEffect)((function(){var e=null;return n&&(e=setTimeout((function(){c(!0)}),50)),function(){clearTimeout(e)}}),[n]);var p=function(e){u.current=e,r(e)},m=(0,ne.jsx)(x.Z,{className:"form-item-input slot",px:1,children:(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[t,"auto"!==t&&(0,ne.jsx)("div",{style:{marginLeft:4,backgroundColor:t,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=(0,ne.jsxs)(x.Z,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:function(){c(!1),r(u.current)},children:[(0,ne.jsx)(x.Z,{display:"flex",alignItems:"center",onClick:function(){return c(!0)},children:(0,ne.jsx)("div",{ref:s,style:{flexShrink:0,marginLeft:"8px",backgroundColor:t,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:"auto"===t?"default":"pointer"}})}),(0,ne.jsx)(Sn.ZP,{open:l,anchorEl:s.current,onClose:function(){return c(!1)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,ne.jsx)(_n.AI,{color:t,onChange:function(e){return p(e.hex)}})})]});return n?f:m}In.propTypes=Un;var Nn=["editing","description","value","onChange","componentProps"];function Ln(e){var n=e.editing,t=e.description,i=e.value,a=e.onChange,c=e.componentProps,s=(0,l.Z)(e,Nn),u=c.placeholder,d=(0,o.useRef)(i),p=function(e){d.current=e,a(e)};return n?(0,ne.jsx)(je.Z,(0,r.Z)({style:{flex:1},fullWidth:!0,value:i,onChange:function(e){e.persist(),p(e.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:t||u,onKeyDown:function(e){"Enter"===e.key&&a(d.current,"confirm")}},s)):(0,ne.jsx)(x.Z,{px:1,className:"form-item-input slot",children:i})}Ln.propTypes=Un,Ln.defaultProps={componentProps:{}};var Dn=t(49777),On=t.n(Dn),Bn=t(76818),Fn=["editing","value","onChange","componentProps"];function zn(e){var n=e.editing,t=e.value,o=e.onChange,i=e.componentProps,a=(0,l.Z)(e,Fn),c=i.blocklet,s="auto"===t?(0,Bn.getPassportColorFromDid)(c.appDid):t;return(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,ne.jsx)("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:On()({title:"Owner",issuer:(0,A.getDisplayName)(c),issuerDid:c.appDid,ownerName:"Your Name",ownerDid:c.appDid,preferredColor:t||"auto"})}}),(0,ne.jsx)(In,(0,r.Z)((0,r.Z)({},a),{},{editing:n,value:n?s:t,onChange:o,componentProps:i}))]})}zn.propTypes=(0,r.Z)((0,r.Z)({},Un),{},{componentProps:f().shape({blocklet:f().object.isRequired}).isRequired}),zn.defaultProps={};var qn,An=t(35406),Gn=t(11875);function Wn(e){var n=e.schema,t=e.loading,i=e.value,a=e.defaultValue,l=e.onChange,c=e.style,s=e.disabled,u="[object Object]"===Object.prototype.toString.call(i),p=(0,o.useState)(null),m=(0,d.Z)(p,2),f=m[0],h=m[1],v=(0,o.useState)(u?i:a),g=(0,d.Z)(v,2),Z=g[0],b=g[1],k=(0,o.useRef)();function j(e,n,t){var o=e.key,i=e.secure,a=Z[o]!==n,c=(0,r.Z)((0,r.Z)({},Z),{},(0,En.Z)({},o,n));a&&b(c),l((0,En.Z)({},o,n),{allValues:c,action:t,currentItem:e}),"confirm"===t&&i&&b((0,r.Z)((0,r.Z)({},Z),{},(0,En.Z)({},o,"__encrypted__"))),["confirm","cancel"].includes(t)?C(null):C(e)}function C(e){if(e)return k.current=Z[e.key],void h(e);k.current=null,h(null)}return(0,ne.jsx)(Mn,{className:"form",style:c,children:null===n||void 0===n?void 0:n.map((function(e){var n=e.key,o=e.description,a=e.required,l=e.hidden,c=void 0!==l&&l,d=e.componentProps,p=void 0===d?{}:d;if(c)return null;var m=!(!f||n!==f.key),h=function(e,n){var t=n.editing,r=void 0!==t&&t,o=e.key,a=u?i[o]:Z[o];return"__encrypted__"===a?r?"":"******":a}(e,{editing:m}),v=function(e,n){var t=n.editing,r=void 0!==t&&t,o=e.componentType,i=void 0===o?"input":o,a=e.render,l=e.renderFormItem;return r&&l?l:!r&&a?a:{input:Ln,color:In,passport:zn}[null===i||void 0===i?void 0:i.toLowerCase()]}(e,{editing:m}),g={inputProps:{"data-cy":"schema-form-item-component"},key:n,description:o,editing:m,value:h,onChange:function(n){return j(e,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change")},componentProps:p};return(0,ne.jsxs)(x.Z,{className:"form-item",children:[(0,ne.jsxs)(x.Z,{className:"form-item-label",style:{color:a&&!h?"#ff0000":"#333"},children:[o,a&&(0,ne.jsx)(An.Z,{})]}),(0,ne.jsxs)(x.Z,{className:"form-item-body",children:[(0,ne.jsx)(x.Z,{className:"form-item-input",children:(0,ne.jsx)(v,(0,r.Z)({},g))}),(0,ne.jsx)(x.Z,{className:"form-item-action",children:m?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(y.Z,{"data-cy":"schema-form-item-confirm",onClick:function(){j(e,h,"confirm")},disabled:s||t,size:"large",children:t?(0,ne.jsx)(B.Z,{size:24}):(0,ne.jsx)(Tn.Z,{})}),(0,ne.jsx)(y.Z,{"data-cy":"schema-form-item-cancel",onClick:function(){j(e,k.current,"cancel")},disabled:s||t,size:"large",children:(0,ne.jsx)(Rn.default,{})})]}):(0,ne.jsx)(y.Z,{"data-cy":"schema-form-item-edit",onClick:function(){j(e,Z[n],"edit")},disabled:s||f,size:"large",children:(0,ne.jsx)(wn.Z,{})})})]})]},n)}))})}Wn.propTypes={schema:f().array.isRequired,loading:f().bool,onChange:f().func.isRequired,value:f().object,defaultValue:f().object,style:f().object,disabled:f().bool},Wn.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};var Mn=(0,p.Z)(Gn.Z)(qn||(qn=(0,c.Z)([""]))),Kn=t(55152),Vn=t(28018),Yn=t.n(Vn),Hn=t(60344),Xn=t(73170),$n=["mode"];function Jn(e){var n=e.meta,t=e.onCancel,a=e.mode,l=e.handlePaySuccess,c=(0,i.PE)(),p=c.t,m=c.locale,f=(0,le.h6)().info,h=(0,ce.yP)(f),x=(0,o.useState)(null),v=(0,d.Z)(x,2),g=v[0],Z=v[1],b=new URL(null===n||void 0===n?void 0:n.registryUrl).origin,y=(0,A.getDisplayName)({meta:n}),k=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(n,r){var o,i,c,d,m;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=function(e){return Yn()((function(){return Hn.hi.get(e).then(function(){var e=(0,u.Z)((0,s.Z)().mark((function e(n){var t,r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.data,r=null===t||void 0===t?void 0:t.downloadTokenList,"succeed"!==t.status){e.next=12;break}if(!r||!r.length){e.next=8;break}return e.next=6,o({downloadTokenList:r});case 6:e.next=11;break;case 8:return e.next=10,i(p("blocklet.component.missDownloadTokenTip"));case 10:case 11:case 16:return e.abrupt("return",!0);case 12:if("error"!==t.status){e.next=17;break}return console.error("vc error: ",t),e.next=16,i(null===t||void 0===t?void 0:t.error);case 17:return e.abrupt("return",!1);case 18:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}())}),{interval:1e3})},o=function(e){var n=e.downloadTokenList;l({downloadTokenList:n})},i=function(e){M.Z.error(e),t(e)},"purchase"!==a||!g){e.next=9;break}return d=(0,ce.Pi)(g),m=d.statusUrl,e.next=7,c(m);case 7:e.next=11;break;case 9:return e.next=11,o({downloadTokenList:n.downloadTokenList&&r(n.downloadTokenList)});case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();if((0,o.useEffect)((function(){if("purchase"===a){var e=new URL(b);e.pathname="/api/did/verify-purchase-blocklet/token",e.searchParams.set("serverDid",f.did),e.searchParams.set("blockletDid",null===n||void 0===n?void 0:n.did);try{Hn.hi.get(e.href).then((function(e){var n=e.data,t="".concat(n.url);Z(t)}))}catch(t){console.error("get next workflow url error: ",t)}}return function(){Z(null)}}),[a]),"purchase"===a&&!g)return"";var j={verify:{action:"verify-purchase-blocklet",checkFn:Hn.od.create({baseURL:b}).get,extraParams:{serverDid:f.did,blockletDid:null===n||void 0===n?void 0:n.did},messages:{title:p("store.purchase.verify.auth.title",{name:y}),scan:p("store.purchase.verify.auth.scan"),confirm:p("store.purchase.verify.auth.confirm"),success:p("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:Hn.od.create({baseURL:X()(b,"/store")}).get,extraParams:{factory:n.nftFactory,nw:g},messages:{title:p("store.purchase.auth.title",{name:y}),scan:p("store.purchase.auth.scan"),confirm:p("store.purchase.auth.confirm"),success:(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)("p",{children:p("store.purchase.auth.success")}),(0,ne.jsx)("p",{children:p("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return(0,ne.jsx)(Kn.default,(0,r.Z)({open:!0,locale:m,popup:!1,saveConnect:!1,className:"connect",baseUrl:b,onSuccess:k,cancelWhenScanned:t,onClose:t,checkTimeout:3e5,webWalletUrl:h,disableClose:!0,showDownload:!1},j[a]))}Jn.propTypes=(0,r.Z)((0,r.Z)({},Xn.$7),{},{handlePaySuccess:f().func,mode:f().oneOf(["verify","purchase"]).isRequired}),Jn.defaultProps={handlePaySuccess:function(){}};var Qn=(0,o.forwardRef)((function(e,n){var t=e.mode,i=(0,l.Z)(e,$n),a=(0,o.useState)("both"!==t?t:"verify"),c=(0,d.Z)(a,2),s=c[0],u=c[1],p=(0,o.useState)("both"!==t?2:1),m=(0,d.Z)(p,2),f=m[0],h=m[1],x=function(){s&&2!==f&&h(2)};return(0,o.useImperativeHandle)(n,(function(){return{onNext:x,getCurrentStep:function(){return f}}})),1===f?(0,ne.jsx)("div",{style:{maxWidth:520},children:(0,ne.jsx)(Xn.AP,{action:s,onNext:null,onSelect:function(e){e!==s&&u(e)}})}):(0,ne.jsx)(Jn,(0,r.Z)((0,r.Z)({},i),{},{mode:s}))}));Qn.propTypes={mode:f().oneOf(["both","verify","purchase"]).isRequired,ref:f().any},Qn.defaultProps={ref:{}};var et,nt=Qn,tt=t(51233),rt=t(31440),ot=t(61813),it=t(49390),at=t(67654),lt=t(5952),ct=t(22714),st=t(45170);function ut(e){var n=e.onChange,t=e.loading,r=e.children,a=e.extra,l=(0,i.PE)().t,c=(0,le.h6)(),s=c.info,u=c.inService,p=(0,Pn.y0)().blocklet,m=(0,o.useState)(!1),f=(0,d.Z)(m,2),h=f[0],x=f[1],v=(0,o.useRef)(null),g=u?lt.K:lt.W,Z=(0,at.Z)(g),b=(0,d.Z)(Z,2),y=b[0],k=b[1],j=(0,ce.dX)({fromBlocklet:u,blocklet:p,nodeInfo:s}),C=j.storeList,P=j.teamDid,E=y&&C.find((function(e){return y===e.url}))||C[0],w=s.mode===O.NODE_MODES.SERVERLESS;return(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsxs)(pt,{children:[(0,ne.jsx)(z.Z,{ref:v,color:"secondary","data-cy":"add-component-select-store",endIcon:(0,ne.jsx)(it.Z,{color:"secondary"}),onClick:function(){x(!0)},style:{padding:"0 2px"},children:(0,ne.jsx)(Ye.Z,{color:"secondary",children:E.name})}),(0,ne.jsx)(Ye.Z,{color:"secondary",children:a})]}),(0,ne.jsxs)(je.Z,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:l("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:E,autoFocus:!0,onChange:function(e){var t=e.target.value;k(t.url),n(t)},SelectProps:{open:h,MenuProps:{anchorEl:v.current},renderValue:function(e){return null===e||void 0===e?void 0:e.name},onClose:function(){x(!1)}},style:{display:"none"},margin:"normal",children:[null===C||void 0===C?void 0:C.map((function(e){return(0,ne.jsx)(xn.Z,{value:e,"data-cy":e.url,children:(0,ne.jsx)(st.Z,{teamDid:P,store:e,onDelete:function(){var n;y===e.url&&k(null===(n=C[0])||void 0===n?void 0:n.url)}})},e.url)})),!w&&(0,ne.jsx)(ct.Z,{disabled:t,storeList:C,teamDid:P,onAdd:function(e){k(e)}})]}),r({currentRegistry:E})]})}ut.propTypes={onChange:f().func,loading:f().bool,children:f().any.isRequired,extra:f().node},ut.defaultProps={onChange:function(){},loading:!1,extra:""};var dt,pt=p.Z.div(et||(et=(0,c.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n\n span {\n font-size: 16px;\n color: ",";\n // font-weight: bold;\n }\n"])),(function(e){return e.theme.palette.common.black})),mt=t(71569),ft=t(52439),ht=t(61951),xt=t(44727),vt=["handleButtonClick","handleSearchSelect","storeUrl","handleBlockletRender","extraFilter","serverVersion"],gt=function(e,n){return X()(n,"/blocklets/".concat(e.did))},Zt=function(e){var n=e.blocklet,t=e.attribute,r=e.value;return n._formatted?n._formatted[t]:r},bt=function(e){return e.inStore&&!1===(0,A.isFreeBlocklet)(e)};function yt(e){var n=e.blocklet,t=e.blocklets,r=e.handleButtonClick,a=e.endpoint,l=(0,i.PE)().t,c=X()(a,(0,ce.lk)(n.did,n.logo||"")),p=(0,o.useState)(!1),m=(0,d.Z)(p,2),f=m[0],h=m[1],x=bt(n)?l("common.purchase"):l("blocklet.component.choose"),v=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(o){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.preventDefault(),o.stopPropagation(),e.prev=2,h(!0),e.next=6,r({meta:n,registryUrl:a,blocklets:t});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),M.Z.error(e.t0.message);case 11:return e.prev=11,h(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[2,8,11,14]])})));return function(n){return e.apply(this,arguments)}}();return(0,ne.jsx)(ee.Z,{href:gt(n,a),style:{color:"initial",textDecoration:"none"},onClick:function(e){return!!e.currentTarget.contains(e.target)||(e.preventDefault(),!1)},target:"_blank",children:(0,ne.jsx)(Ct,{title:Zt({blocklet:n,attribute:"title",value:n.title||n.name}),did:n.did,description:Zt({blocklet:n,attribute:"description",value:n.description}),cover:n.logo?c:"",version:n.version,button:(0,ne.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,ne.jsx)(xt.Kk,{children:(0,ne.jsx)(z.Z,{onClick:v,size:"small",disabled:f,variant:"outlined",color:"primary","data-cy":"install-blocklet",children:f?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(B.Z,{size:16,style:{marginRight:3}}),x]}):x},n.did)})})})})}function kt(e){var n=e.handleButtonClick,t=e.handleSearchSelect,a=e.storeUrl,c=e.handleBlockletRender,s=e.extraFilter,u=e.serverVersion,p=(0,l.Z)(e,vt),m=(0,i.PE)().locale,f=(0,o.useState)({}),h=(0,d.Z)(f,2),x=h[0],v=h[1],g=a;return(0,o.useEffect)((function(){v({})}),[g]),(0,ne.jsx)(ft.ErrorBoundary,{FallbackComponent:mt.H,resetKeys:[g],children:(0,ne.jsx)("div",(0,r.Z)((0,r.Z)({},p),{},{children:(0,ne.jsx)(ht.Z,{blockletRender:function(e){var t=(0,r.Z)((0,r.Z)({},e),{},{handleButtonClick:n,endpoint:g});return c((0,r.Z)((0,r.Z)({},e),{},{defaultRender:(0,ne.jsx)(yt,(0,r.Z)({},t))}))},baseSearch:!0,endpoint:g,locale:m,onFilterChange:function(e){v(e)},onSearchSelect:t,filters:x,extraFilter:s,serverVersion:u})}))})}yt.propTypes={blocklet:f().object.isRequired,blocklets:f().array,handleButtonClick:f().func,endpoint:f().string},yt.defaultProps={handleButtonClick:null,endpoint:"",blocklets:[]},kt.propTypes={storeUrl:f().string.isRequired,handleButtonClick:f().func,handleSearchSelect:f().func,handleBlockletRender:f().func,extraFilter:f().func,serverVersion:f().string},kt.defaultProps={handleButtonClick:null,handleSearchSelect:null,handleBlockletRender:null,extraFilter:void 0,serverVersion:""};var jt,Ct=(0,p.Z)(xt.ZP)(dt||(dt=(0,c.Z)(["\n .ms-highlight {\n color: ",";\n }\n"])),(function(e){return e.theme.palette.primary.main})),Pt=t(10458),Et=t.n(Pt),wt=t(65873),Rt=t(82434),Tt=t.n(Rt),St=t(2478),_t=t(42761),Ut=t(62681),It=t(44067),Nt=t(3182),Lt=t(75953),Dt=t(73545),Ot=["onSelect","endpoint","gatewayUrl","loading","size","helperText"],Bt=[{value:"https://www.didspaces.com/app",label:"Prod DID Spaces",avatar:"P"},{value:"https://storage.staging.abtnet.io/app",label:"Staging DID Spaces",avatar:"S"}],Ft=(0,Nt.D)();function zt(e){var n=e.onSelect,t=e.endpoint,c=e.gatewayUrl,s=e.loading,u=e.size,p=e.helperText,m=(0,l.Z)(e,Ot),f=(0,at.Z)("did-space-gateway-list",Bt),h=(0,d.Z)(f,2),x=h[0],v=h[1],g=(0,o.useState)(c||Bt[0].value),Z=(0,d.Z)(g,2),b=Z[0],y=Z[1],k=(0,i.PE)().t,j=(0,Dt.T)().api;return(0,o.useEffect)((function(){b&&!x.find((function(e){return e.value===b}))&&j.get(X()(b,"/__blocklet__.js?type=json")).then((function(e){v([].concat((0,a.Z)(x),[{value:b,label:e.data.appName}]))})).catch((function(e){console.error(e),M.Z.error("Can not add this gateway, please check the url and try again")}))}),[b]),(0,ne.jsx)(qt,(0,r.Z)((0,r.Z)({},m),{},{freeSolo:!0,selectOnFocus:!0,clearOnBlur:!0,handleHomeEndKeys:!0,value:b,options:x,onChange:function(e,n){if(n)if("string"===typeof n){var t=x.find((function(e){return e.label===n}));t&&y(t.value)}else n.inputValue?y(n.inputValue):n.value&&y(n.value)},getOptionLabel:function(e){return"string"===typeof e?e:e.inputValue?e.inputValue:e.label},renderOption:function(e,n){return(0,ne.jsxs)(St.ZP,(0,r.Z)((0,r.Z)({},e),{},{children:[(0,ne.jsx)(_t.Z,{children:(0,ne.jsx)(Ut.Z,{children:n.avatar})}),(0,ne.jsx)(It.Z,{primary:n.label,secondary:n.value})]}),n.value)},filterOptions:function(e,n){var t=Ft(e,n);n.inputValue&&Tt()(n.inputValue)&&(e.some((function(e){return n.inputValue===e.value}))||t.push({value:n.inputValue,label:"Add new gateway"}));return t},renderInput:function(e){return(0,ne.jsx)(je.Z,(0,r.Z)((0,r.Z)({},e),{},{helperText:p,label:k("storage.spaces.label"),size:u,InputProps:(0,r.Z)((0,r.Z)({},e.InputProps),{},{type:"search",endAdornment:(0,ne.jsx)(z.Z,{variant:"contained",onClick:function(){return n(b)},size:"small",loading:s,disable:s,sx:{position:"absolute",right:0,display:"flex",justifyContent:"center",alignItems:"center",width:"100px",height:"100%"},children:k(t?"storage.spaces.reconnect":"storage.spaces.connect.now")})})}))}}))}var qt=(0,p.Z)(Lt.Z)(jt||(jt=(0,c.Z)(["\n height: 40px;\n width: 100%;\n max-width: 720px;\n "," {\n width: 75%;\n }\n input.MuiInputBase-input {\n max-width: calc(100% - 80px);\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}));zt.propTypes={onSelect:f().func.isRequired,endpoint:f().string,loading:f().bool,size:f().string,helperText:f().string,gatewayUrl:f().string},zt.defaultProps={endpoint:void 0,loading:!1,size:"small",helperText:"",gatewayUrl:""};var At=zt,Gt=["onConnect"];var Wt=(0,o.forwardRef)((function(e,n){var t=e.onConnect,a=(0,l.Z)(e,Gt),c=(0,le.h6)(),p=c.api,m=c.info.did,f=(0,o.useContext)(i.RD),h=f.t,x=f.locale,v=(0,Pn.y0)(),g=v.blocklet,Z=v.actions.refreshBlocklet,b=(0,o.useState)(""),y=(0,d.Z)(b,2),k=y[0],j=y[1],C=(0,o.useMemo)((function(){var e,n,t,r;return{endpoint:(null===g||void 0===g||null===(e=g.environments)||void 0===e||null===(n=e.find((function(e){return e.key===ie.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===n?void 0:n.value)||"",gatewayUrl:(null===g||void 0===g||null===(t=g.environments)||void 0===t||null===(r=t.find((function(e){return e.key===ie.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACES_URL})))||void 0===r?void 0:r.value)||""}}),[g]),P=(0,A.getAppName)(g),E=(0,A.getAppDescription)(g),w=function(e){var n,t,r,o=null===e||void 0===e||null===(n=e.site)||void 0===n||null===(t=n.domainAliases)||void 0===t||null===(r=t.sort((function(e,n){return e.accessibility.accessible&&n.accessibility.accessible?+e.isProtected-+n.isProtected:+n.accessibility.accessible-+e.accessibility.accessible})))||void 0===r?void 0:r.map((function(e){var n,t=null!==e&&void 0!==e&&null!==(n=e.domainStatus)&&void 0!==n&&n.isHttps?"https://":"http://",r=null===e||void 0===e?void 0:e.value;return"".concat(t).concat(r)})).filter(Boolean),i=null===o||void 0===o?void 0:o[0];return{appUrl:i,isReady:Boolean(i)}}(g),R=w.appUrl,T=w.isReady;function S(e,n){return _.apply(this,arguments)}function _(){return(_=(0,u.Z)((0,s.Z)().mark((function e(n,t){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p.configBlocklet({input:{did:[n],configs:[{key:ie.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACES_URL,value:k},{key:ie.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:t}]}}).then((function(){M.Z.success(h("storage.spaces.connect.succeeded",x))})).catch((function(e){console.error(e),M.Z.error(e.message)}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var U=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(n,o){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(g.meta.did,o(n.endpoint));case 2:setTimeout((function(){D((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})})),null===t||void 0===t||t(),Z()}),3e3);case 3:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),I=(0,o.useState)({open:!1}),N=(0,d.Z)(I,2),L=N[0],D=N[1];return(0,o.useEffect)((function(){D((function(e){return(0,r.Z)((0,r.Z)({},e),{},{messages:{title:h("storage.spaces.authorize.title",{appName:P}),scan:h("storage.spaces.authorize.scan",{appName:P}),confirm:"",success:(0,ne.jsx)(Ye.Z,{gutterBottom:!0,children:h("storage.spaces.authorize.success")})}})}))}),[P,x,h]),(0,o.useImperativeHandle)(n,(function(){return{getEndpoint:function(){return C.endpoint},getGatewayUrl:function(){return C.gatewayUrl}}})),(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(At,(0,r.Z)((0,r.Z)((0,r.Z)({},a),C),{},{onSelect:function(e){(0,wt.isEmpty)(e)?M.Z.error(h("storage.spaces.addressCannotEmpty",x)):(j(e),D((function(n){return(0,r.Z)((0,r.Z)({},n),{},{action:"one-click-authorization",checkTimeout:3e5,prefix:X()(e,"space/api/did"),baseUrl:new URL(e).origin,checkFn:Et().create({baseURL:X()(e,"space")}).get,extraParams:{appDid:g.appDid,appName:P,appDescription:E,scopes:"list:object read:object write:object",appUrl:R,referrer:window.location.href,nodeDid:m},onClose:function(){D((function(e){return(0,r.Z)((0,r.Z)({},e),{},{open:!1})}))},open:!0})})))},loading:!T})),(0,ne.jsx)(Kn.default,{forceConnected:!1,saveConnect:!1,prefix:L.prefix,open:L.open,popup:!0,action:L.action,baseUrl:L.baseUrl,checkFn:L.checkFn,onSuccess:U,onClose:L.onClose,checkTimeout:L.checkTimeout,extraParams:L.extraParams,messages:L.messages,locale:x})]})}));Wt.propTypes={onConnect:f().func},Wt.defaultProps={onConnect:function(){}};var Mt,Kt,Vt,Yt,Ht,Xt,$t,Jt=Wt,Qt=["name","validation"],er=["default","key"],nr=function(e){return e.inStore&&!1===(0,A.isFreeBlocklet)(e)},tr=function(e){var n;return null===e||void 0===e||null===(n=e.capabilities)||void 0===n?void 0:n.didSpace},rr=function(e){var n,t;return(null===e||void 0===e||null===(n=e.configs)||void 0===n||null===(t=n.find((function(e){return e.key===ie.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null},or=function(e){return(e.environments||[]).some((function(e){return e.required}))},ir=function(e,n){return null===e||void 0===e?void 0:e.some((function(e){return e.required&&!n[e.key]}))},ar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.title||e.name},lr=(0,o.forwardRef)((function(e,n){var t=e.meta,a=e.isMobile,l=e.onStepChange,c=(0,yn.s)(),s=c.steps,u=c.activeStep,d=c.setActiveStepByKey,p=c.setActiveStepByIndex,m=(0,i.PE)(),f=m.t,h=m.locale,x=s[u];return(0,o.useEffect)((function(){l(u)}),[l,u]),(0,o.useImperativeHandle)(n,(function(){return{setActiveStepByKey:d,setActiveStepByIndex:p}})),(0,ne.jsx)(mr,{component:"div",className:a?"mobileStyle":"",children:(0,ne.jsx)(bn.Z,{locale:h,blockletMeta:(0,r.Z)({title:" "},t),pcWidth:"100%",pcHeight:"100%",logoUrl:t&&t.logo&&t.registryUrl?(0,ce.aZ)({did:t.did,baseUrl:t.registryUrl,logoPath:t.logo}):null,stepTip:f("blocklet.component.add"),children:(0,ne.jsx)(dr,{children:null!==x&&void 0!==x&&x.body&&"function"===typeof x.body?x.body():x.body})})})}));function cr(e){var n,t,c,p,m,f,h,v=e.blocklet,g=e.children,Z=(0,i.PE)(),b=Z.t,y=Z.locale,k=(0,o.useState)(!1),j=(0,d.Z)(k,2),C=j[0],P=j[1],E=(0,o.useState)(null),w=(0,d.Z)(E,2),R=w[0],T=w[1],S=(0,o.useState)(""),_=(0,d.Z)(S,2),U=_[0],I=_[1],N=(0,o.useState)(""),L=(0,d.Z)(N,2),D=L[0],F=L[1],q=(0,o.useState)(""),G=(0,d.Z)(q,2),W=G[0],K=G[1],V=(0,le.h6)(),Y=V.api,H=V.ws.useSubscription,X=V.inService,$=V.info,J=(0,Pn.y0)().actions.refreshBlocklet,Q=(0,o.useState)(null),ee=(0,d.Z)(Q,2),te=ee[0],re=ee[1],oe=(0,o.useState)(!1),ae=(0,d.Z)(oe,2),se=ae[0],ue=ae[1],de={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceCapability:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},pe=(0,o.useState)(de),me=(0,d.Z)(pe,2),fe=me[0],he=me[1],xe=(0,o.useState)(0),ve=(0,d.Z)(xe,2),ge=ve[0],Ze=ve[1],be=(0,o.useRef)({}),ye=(0,o.useRef)({}),ke=(0,o.useRef)({}),Ce=(0,Zn.Z)((function(e){return e.breakpoints.down("md")})),Pe=be.current.meta,Ee=(ye.current||{}).setActiveStepByIndex,we=$.mode===O.NODE_MODES.SERVERLESS,Re=function(e){return he((function(n){return(0,r.Z)((0,r.Z)({},n),e)}))};(0,o.useEffect)((function(){if(fe.pathPrefix){var e=Ne((0,r.Z)((0,r.Z)({},fe),{},{pathPrefix:fe.pathPrefix,locale:y})).errMsg;I(e)}}),[fe.pathPrefix]),(0,o.useEffect)((function(){0===ge&&he(de)}),[ge]);var Te=function(){var e;return null!==be&&void 0!==be&&null!==(e=be.current)&&void 0!==e&&e.meta?(0,A.getDisplayName)(be.current):""},Se=function(e){!function n(t){Re({installResultProps:{variant:"error",title:Te(),subTitle:e,footer:(0,ne.jsx)(z.Z,{className:"bottom-button",disabled:t,"data-cy":"retry-install-component",onClick:function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),e.next=3,Ie(be.current.installInput);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),children:(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[t&&(0,ne.jsx)(B.Z,{size:16,style:{marginRight:8}}),b("common.retry")]})})}})}()},_e=function(e){return function(n){var t,r;((null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.did)||(null===n||void 0===n?void 0:n.meta))===(null===v||void 0===v||null===(r=v.meta)||void 0===r?void 0:r.did)&&e(n)}};H(ie.BlockletEvents.statusChange,_e((function(e){if(e.status===ie.BlockletStatus.upgrading)Re({installResultProps:{variant:"success",title:Te(),subTitle:b("blocklet.component.installSuccessTip")}})})),[null===v||void 0===v||null===(n=v.meta)||void 0===n?void 0:n.did]),H(ie.BlockletEvents.downloadFailed,_e((function(){Se(b("blocklet.component.installComponentError"))})),[null===v||void 0===v||null===(t=v.meta)||void 0===t?void 0:t.did]),H(ie.BlockletEvents.installFailed,_e((function(){Se(b("blocklet.component.installComponentError"))})),[null===v||void 0===v||null===(c=v.meta)||void 0===c?void 0:c.did]);var Ue=function(){P(!1),F(!1),he({}),be.current={}},Ie=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(n){var t,o,i,a,l,c,u,d,p,m,f,h,x,g,Z,b,y,k,j,C,E,w,R,T,S;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=fe.pathPrefix,a=fe.bundleDid,l=fe.title,c=fe.componentName,u=void 0===c?"":c,d=fe.componentDid,p=void 0===d?"":d,m=(null===(t=be.current)||void 0===t?void 0:t.meta)||{},f=m.configs,h=void 0===f?[]:f,x=m.registryUrl,g=m.inStore,Z=m.inputUrl,b=null===(o=be.current)||void 0===o?void 0:o.downloadTokenList,y=g?(0,ce.Rn)(x,a):Z,P(!0),k=(0,r.Z)((0,r.Z)((0,r.Z)({rootDid:v.meta.did,url:y,mountPoint:De()(i),title:l,name:u,did:p},fe.hasEnvironmentsStep&&h.length>0?{configs:h.map((function(e){return(0,r.Z)((0,r.Z)({},e),{},{value:fe.configsValue[e.key]||""})}))}:{}),b?{downloadTokenList:b}:{}),n),e.prev=6,e.next=9,Y.installComponent({input:k});case 9:if(!x){e.next=15;break}if(j=(0,ce.dX)({fromBlocklet:X,nodeInfo:$,blocklet:v}),C=j.teamDid,E=j.storeList,w=(0,ce.bQ)(x,E),R=w.isNew,T=w.decoded,!R){e.next=15;break}return e.next=15,Y.addBlockletStore({input:{teamDid:C,url:T}});case 15:Re({installResultProps:{}}),J({showError:!1,attachRuntimeInfo:!1}),e.next=25;break;case 19:e.prev=19,e.t0=e.catch(6),S=(0,ce.Z)(e.t0),M.Z.error(S),console.error("installComponent error: ",e.t0),Se(S);case 25:return e.prev=25,P(!1),be.current.installInput=k,e.finish(25);case 29:case"end":return e.stop()}}),e,null,[[6,19,25,29]])})));return function(n){return e.apply(this,arguments)}}(),Ne=function(e){return{errMsg:(0,tt.Rw)({params:(0,r.Z)((0,r.Z)({},e),{},{did:e.bundleDid}),blocklets:[v],blocklet:v,locale:y})}},Le=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(n){var t,o;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Ne((0,r.Z)((0,r.Z)({},fe),{},{locale:y})),o=t.errMsg,I(o),ge!==Fe.length-2){e.next=5;break}return e.next=5,Ie(n);case 5:Ee((function(e){return e+1}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Oe=function(){Ee((function(e){return e-1}))},Be=function(e){var n,t,o=e.chooseParams,i=void 0===o?be.current:o,c=e.componentDid,s=e.isInit,u=void 0!==s&&s,d=i.meta,p=i.registryUrl,m=i.inStore,f=i.inputUrl,h=d.did,x=d.title,g=d.name,Z=((null===(n=v.settings)||void 0===n?void 0:n.children)||[]).filter((function(e){return"deleted"===e.status&&e.meta.bundleDid===h})),b=c||"",y=null===(t=d.environments)||void 0===t?void 0:t.map((function(e){var n=e.name,t=e.validation,o=(0,l.Z)(e,Qt),i={validation:mn()(t)?"":t};return(0,r.Z)((0,r.Z)({},o),{},{key:n},i)}));be.current=(0,r.Z)((0,r.Z)({},i),{},{meta:(0,r.Z)((0,r.Z)({},d),{},{configs:y,registryUrl:p,inStore:m,inputUrl:f})});var k={};if(u){var j=[v],C=y||[],P=ln()(sn()([].concat((0,a.Z)(C),[])),"key").filter((function(e){return!!e.key})).sort((function(e,n){return e.required&&!n.required?-1:n.required&&!e.required?1:0})),E=(0,A.getSharedConfigObj)(j[0],{configs:P}),w={},R=P.map((function(e){var n=e.default,t=e.key,o=(0,l.Z)(e,er);return w[t]=E[t]||n,(0,r.Z)((0,r.Z)({},o),{},{key:t,hidden:!!ie.BLOCKLET_CONFIGURABLE_KEY[t]})}));k=(0,r.Z)((0,r.Z)({},k),{},{configsList:R,configsValue:w,hasMissRequiredConfigs:ir(R,w)})}var T,S,_=v.children.some((function(e){return"/"===e.mountPoint})),U=Z.find((function(e){return e.meta.bundleDid===h}));U?k=(0,r.Z)((0,r.Z)({},k),{},{pathPrefix:U.mountPoint,title:x||"",componentName:U.meta.name,hasEnvironmentsStep:!1}):k=(0,r.Z)((0,r.Z)({},k),{},{pathPrefix:_?"/".concat(De()(g)):"/",title:x||"",componentName:"",hasEnvironmentsStep:(null===(T=be.current.meta)||void 0===T||null===(S=T.environments)||void 0===S?void 0:S.length)>0});var I=nr(be.current.meta),N=tr(be.current.meta),L=rr(v);Re((0,r.Z)((0,r.Z)({bundleDid:h,componentDid:b},k),{},{hasRequiredEnvironments:or(be.current.meta),requirePurchase:I,didSpaceCapability:N,didSpaceEndpoint:L})),u&&I&&function(){var e=fe.pathPrefix,n=fe.bundleDid,t=fe.title,r=fe.componentName,o=void 0===r?"":r,i=fe.componentDid,a=void 0===i?"":i,l=(be.current||{}).meta,c=void 0===l?{}:l,s=c.registryUrl,u=c.inStore,d=c.inputUrl,p=u?(0,ce.Rn)(s,n):d;re({meta:c,installOpts:{type:"component",rootDid:v.meta.did,mountPoint:e,url:p,title:t,name:o,did:a}})}()},Fe=[{key:"selectComponent",name:b("blocklet.component.selectComponent"),body:(0,ne.jsxs)(ur,{component:"div",children:[fe.showFromUrlDialog&&(0,ne.jsx)(ot.Z,{mode:"component",onCancel:function(){Re({showFromUrlDialog:!1})},onSuccess:function(e){var n=e.meta,t=e.inputUrl,r=e.inStore,o=e.registryUrl;Be({chooseParams:{meta:n,inputUrl:t,inStore:r,registryUrl:o},isInit:!0}),Re({showFromUrlDialog:!1}),Le()},handleText:{title:b("blocklet.component.addComponentTip.fromUrl"),confirm:b("blocklet.component.choose")}}),(0,ne.jsx)(ut,{extra:we?null:(0,ne.jsxs)(z.Z,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:function(){Re({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[(0,ne.jsx)(vn.Z,{style:{fontSize:20,marginRight:4}})," ",b("blocklet.component.addComponentTip.fromUrl")," "]}),loading:C,onChange:function(){he({}),be.current={}},children:function(e){var n=e.currentRegistry;return(0,ne.jsx)(kt,{serverVersion:null===$||void 0===$?void 0:$.version,style:Ce?{height:"calc(100vh - 56px - 80px - 32px - 40px )"}:{height:"calc(100% - 40px)"},storeUrl:n.url,handleButtonClick:function(e){Be({chooseParams:(0,r.Z)((0,r.Z)({},e),{},{inStore:!0}),isInit:!0})},handleBlockletRender:function(e){var n=e.blocklet,t=e.defaultRender,r=(null===fe||void 0===fe?void 0:fe.bundleDid)&&(null===fe||void 0===fe?void 0:fe.bundleDid)===(null===n||void 0===n?void 0:n.did);return(0,ne.jsxs)(hr,{children:[r&&(0,ne.jsx)("div",{className:"check-container",children:(0,ne.jsx)(gn.default,{className:"check-icon"})}),(0,ne.jsx)("div",{className:r?"choose-blocklet":"",style:{marginLeft:16},children:t})]})},extraFilter:function(e){return null===e||void 0===e?void 0:e.filter((function(e){return!(v.children||[]).some((function(n){return n.meta.did===e.did}))}))}})}})]}),cancel:b("common.cancel"),confirm:ar(fe)?b("blocklet.component.addNext",{name:ar(fe)}):b("common.next"),onCancel:Ue,onConfirm:function(){Le()}},{key:"agreement",name:b("launchBlocklet.introduction"),body:(0,ne.jsxs)(ur,{component:"div",className:"agreement-wrapper",children:[(0,ne.jsx)(fn.Z,{title:b("launchBlocklet.introduction"),subTitle:b("blocklet.component.addComponentTip.introduction")}),(0,ne.jsx)(rt.Z,{meta:Pe,onClickNext:Le,handleDescEle:(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)("p",{children:(0,ne.jsx)("div",{dangerouslySetInnerHTML:{__html:b("blocklet.component.addComponentTip.".concat(fe.requirePurchase?"isPurchase":"isFree"),{name:Te()})}})}),(0,ne.jsx)("p",{children:b("blocklet.component.addComponentTip.belowInformation")})]})})]}),cancel:b("common.pre"),confirm:b("launchBlocklet.next"),onCancel:Oe,onConfirm:function(){ue(!1),Le()}},Pe&&fe.requirePurchase&&{key:"purchase",name:(0,ne.jsxs)(ne.Fragment,{children:[b("common.verifyNFT"),(0,ne.jsx)(An.Z,{})]}),body:(0,ne.jsxs)(ur,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(2===(null===(p=ke.current)||void 0===p||null===(m=p.getCurrentStep)||void 0===m?void 0:m.call(p))||se)&&(0,ne.jsx)(fr,{title:b("common.verifyNFT"),subTitle:b("blocklet.component.addComponentTip.verifyNFT")}),dn()(fe.purchaseResultProps)?te&&(0,ne.jsx)(nt,{ref:ke,meta:te.meta,mode:fe.componentDid?"verify":"both",onCancel:function(e){ue(!1),Re({purchaseResultProps:{variant:"error",title:Te(),subTitle:e,style:{paddingTop:120},footer:(0,ne.jsx)(z.Z,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:function(){Re({purchaseResultProps:{}})},children:b("common.retry")})}})},installOpts:te.installOpts,handlePaySuccess:function(e){var n=e.downloadTokenList;be.current.downloadTokenList=n,ue(!1),Le()}}):(0,ne.jsx)("div",{className:"flex-align-center flex-justify-center",children:(0,ne.jsx)(Cn.Z,(0,r.Z)({},fe.purchaseResultProps))})]}),disabled:2===(null===(f=ke.current)||void 0===f||null===(h=f.getCurrentStep)||void 0===h?void 0:h.call(f))||se,cancel:b("common.pre"),confirm:b("common.next"),onConfirm:function(){"function"===typeof ke.current.onNext&&(ke.current.onNext(),ue(!0))},onCancel:function(){Oe()}},(0,A.hasStartEngine)(Pe)&&{key:"config",name:b("common.config"),error:U,body:(0,ne.jsxs)(ur,{component:"div",children:[(0,ne.jsx)(fr,{title:b("common.config"),subTitle:b("blocklet.component.addComponentTip.config")}),(0,ne.jsx)(je.Z,{label:b("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"mount-point-input"},fullWidth:!0,helperText:W||b("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:fe.pathPrefix,onChange:function(e){var n=e.target.value;Re({pathPrefix:n}),K(b("common.slugifyHint",{value:(0,ce.LN)(n)}))}}),!!U&&(0,ne.jsx)(kn.Z,{type:"error",style:{width:"100%",marginTop:8},children:U})]}),cancel:b("common.pre"),confirm:b("common.next"),onCancel:Oe,onConfirm:function(){Le()}},Pe&&(null===fe||void 0===fe?void 0:fe.hasEnvironmentsStep)&&{key:"environment",name:(0,ne.jsxs)(ne.Fragment,{children:[b("common.environment")," ",fe.hasRequiredEnvironments&&(0,ne.jsx)(An.Z,{})]}),disabled:!!R||(null===fe||void 0===fe?void 0:fe.hasMissRequiredConfigs),body:function(){return(0,ne.jsxs)(ur,{component:"div",children:[(0,ne.jsx)(fr,{title:b("common.environment"),subTitle:b("blocklet.component.addComponentTip.environment")}),(0,ne.jsx)(Wn,{style:{marginTop:-12,width:"100%"},schema:fe.configsList,defaultValue:fe.configsValue,onChange:function(e,n){var t=n.action,r=n.currentItem,o=n.allValues;"confirm"===t&&Re({hasMissRequiredConfigs:ir(fe.configsList,o),configsValue:o}),"edit"===t?T(r):["cancel","confirm"].includes(t)&&T(null)}})]})},cancel:b("common.pre"),confirm:b("common.next"),onCancel:Oe,onConfirm:Le},Pe&&(null===fe||void 0===fe?void 0:fe.didSpaceCapability)&&{key:"didSpace",name:(0,ne.jsxs)(ne.Fragment,{children:[b("blocklet.component.didSpaceConfig")," ","required"===fe.didSpaceCapability&&(0,ne.jsx)(An.Z,{})]}),disabled:"required"===fe.didSpaceCapability&&!fe.didSpaceEndpoint,body:function(){return(0,ne.jsxs)(ur,{component:"div",children:[(0,ne.jsx)(fr,{title:b("blocklet.component.didSpaceConfig"),subTitle:b("blocklet.component.didSpaceConfigTip")}),(0,ne.jsx)(x.Z,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:(0,ne.jsx)(Jt,{sx:{"& .MuiFormHelperText-root":{wordBreak:"break-all"}},helperText:fe.didSpaceEndpoint&&b("blocklet.component.didSpaceConnected",{endpoint:fe.didSpaceEndpoint}),onConnect:function(){Le()}})})]})},cancel:b("common.pre"),confirm:b("common.next"),onCancel:Oe,onConfirm:Le},{key:"install",name:b("common.install"),disabled:!1,loading:!1,body:(0,ne.jsx)(ur,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:dn()(fe.installResultProps)?(0,ne.jsx)(jn.Z,{message:(0,ne.jsx)(xr,{children:b("blocklet.component.installingCanCloseWindowTip")}),increaseSpeed:.3,messageLoop:!1}):(0,ne.jsx)("div",{style:{marginTop:120},children:(0,ne.jsx)(Cn.Z,(0,r.Z)({},fe.installResultProps))})}),confirm:b("common.complete"),onConfirm:function(){Ue(),setTimeout((function(){var e=document.getElementsByClassName("dashboard-main")[0];e&&(e.scrollTop=e.scrollHeight)}),200)}}].filter((function(e){return e})),ze=Fe[ge]||{},qe=function(e){e.stopPropagation(),F(!0)},Ae=ge<Fe.length-1;return(0,ne.jsxs)(ne.Fragment,{children:["function"===typeof g?g({loading:C,open:qe}):(0,ne.jsxs)(xn.Z,{onClick:qe,className:"component-action","data-cy":"action-add-component",children:[C?(0,ne.jsx)(B.Z,{size:16}):(0,ne.jsx)(vn.Z,{style:{fontSize:18,marginRight:5}}),b("blocklet.component.add")]}),D&&(0,ne.jsx)(sr,{title:b("blocklet.component.addWithName",{name:(0,A.getDisplayName)(v)}),maxWidth:!1,fullWidth:!1,PaperProps:{style:Ce?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:function(e,n){var t,r;"backdropClick"!==n&&(null===(t=Fe[0])||void 0===t||null===(r=t.onCancel)||void 0===r||r.call(t))},showCloseButton:Ae,disableEscapeKeyDown:!0,open:!0,actions:(0,ne.jsxs)(ne.Fragment,{children:[ze.cancel&&(0,ne.jsx)(z.Z,{onClick:function(e){e.stopPropagation(),ze.onCancel()},disabled:ge===Fe.length-2&&C,color:"inherit",children:ze.cancel||b("common.cancel")}),ze.confirm&&(0,ne.jsx)(z.Z,{onClick:function(e){e.stopPropagation(),ze.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:C||("boolean"===typeof ze.disabled?ze.disabled:!(!C&&!ze.error&&fe.bundleDid)||ge>0&&!fe.pathPrefix),variant:"contained",autoFocus:!0,title:ze.confirm,style:{marginLeft:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"280px",display:"inline-block"},children:(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[("boolean"===typeof ze.loading?ze.loading:C)&&(0,ne.jsx)(B.Z,{size:16}),ze.confirm]})})]}),children:(0,ne.jsx)(yn.W,{steps:Fe,mode:"memory",children:(0,ne.jsx)(lr,{ref:ye,meta:Pe,isMobile:Ce,onStepChange:function(e){Ze(e)}})})})]})}lr.propTypes={meta:f().any,onStepChange:f().func.isRequired,isMobile:f().bool.isRequired},lr.defaultProps={meta:null},cr.propTypes={children:f().any,blocklet:f().object.isRequired},cr.defaultProps={children:null};var sr=(0,p.Z)(be.ZP)(Mt||(Mt=(0,c.Z)(["\n .MuiDialogContent-root {\n padding-left: 0;\n padding-right: 0;\n padding-bottom: 0;\n }\n\n .MuiDialogActions-root {\n padding: 16px 24px;\n }\n"]))),ur=(0,p.Z)(Ye.Z)(Kt||(Kt=(0,c.Z)(["\n width: 100%;\n height: 100%;\n"]))),dr=p.Z.div(Vt||(Vt=(0,c.Z)(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n\n .bottom-button {\n min-width: 200px;\n }\n\n // blocklet-select-side\n aside {\n width: 140px;\n }\n"]))),pr=function(e){return e.isMobile?"\n height: calc(100vh - 56px - 64px - 48px);\n ":""},mr=(0,p.Z)(hn.Z)(Yt||(Yt=(0,c.Z)(["\n ","\n\n & .flex-justify-center {\n display: flex;\n justify-content: center;\n }\n\n & .flex-align-center {\n display: flex;\n height: 100%;\n align-items: center;\n ","\n }\n\n & .agreement-wrapper {\n ","\n max-height: 60vh;\n .eula-trigger {\n padding-right: 0;\n }\n .next-button {\n display: none;\n }\n }\n\n & .connect {\n background: white;\n }\n"])),(function(e){return"mobileStyle"===e.className?"\n height: 100%;\n\n & > div{\n height: 100%;\n }\n .root-header {\n .app-name-content {\n display: none;\n }\n }\n\n\n\n // content-panel\n .root-header + div{\n padding-top: 0;\n position: relative;\n & > div {\n padding-top: 0;\n }\n }\n\n header + div {\n padding-top: 0;\n }\n\n header {\n .header-title {\n margin-left: 0;\n }\n\n .header-title-name {\n max-width: 100% !important;\n }\n }\n ":"\n height: 72vh;\n position: relative;\n .root-header {\n z-index: auto !important;\n position: fixed !important;\n }\n & > div {\n height: 100%;\n width: 100%;\n max-width: 100%;\n & > div {\n max-height: unset !important;\n max-width: 100%;\n & > div {\n // left-panel\n &:first-child {\n padding-top: 0;\n // padding-left: 0;\n width: 25%;\n min-width: 240px;\n & > div:first-child {\n display: none;\n }\n // step\n & > div:last-child {\n // margin-top: 32px;\n margin-top: 0;\n }\n }\n // right-panel\n &:last-child {\n padding-top: 0;\n padding-right: 24px;\n overflow-y: auto;\n .app-content {\n padding: 0 0 24px 0;\n }\n .button-container {\n padding-right: 0;\n }\n }\n }\n }\n }\n\n "}),(function(e){return pr(e)}),(function(e){return pr(e)})),fr=(0,p.Z)(fn.Z)(Ht||(Ht=(0,c.Z)(["\n margin-bottom: 24px;\n"]))),hr=p.Z.div(Xt||(Xt=(0,c.Z)(["\n position: relative;\n\n .choose-blocklet {\n background-color: rgb(236, 251, 253);\n border-color: rgb(236, 251, 253);\n border-radius: 8px;\n }\n\n .check-container {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: flex-end;\n width: 30px;\n height: 30px;\n border-radius: 0 0 8px 0;\n color: ",";\n overflow: hidden;\n transition: all ease 0.3s;\n &:after {\n position: absolute;\n z-index: 0;\n display: block;\n width: 0;\n height: 0;\n border-top: transparent solid 15px;\n border-left: transparent solid 15px;\n border-bottom: "," solid 15px;\n border-right: "," solid 15px;\n transition: all ease 0.1s;\n content: '';\n }\n\n .check-icon {\n position: relative;\n z-index: 2;\n margin: 0 1px 1px 0;\n font-size: 16px;\n transition: all ease 0.2s;\n }\n }\n"])),(function(e){return e.theme.palette.common.white}),(function(e){return e.theme.palette.primary.main}),(function(e){return e.theme.palette.primary.main})),xr=p.Z.div($t||($t=(0,c.Z)(["\n color: ",";\n .msg-before {\n display: inline-block;\n color: #aaa;\n font-size: 14px;\n margin-right: 6px;\n }\n"])),(function(e){return e.theme.palette.primary.main})),vr=function(e){return e.children.filter((function(e){return e.meta.interfaces.find((function(e){return e.type===ie.BLOCKLET_INTERFACE_TYPE_WEB}))}))};function gr(e){var n=e.params,t=e.setParams,a=e.setError,l=e.serviceTypes,c=(0,i.PE)().t,s=(0,Pn.y0)().blocklet,u=s.meta.did,p=vr(s),m=(0,o.useState)([]),f=(0,d.Z)(m,2),h=f[0],x=f[1],v={301:c("common.redirectPermanently"),302:c("common.redirectTemporary"),307:c("common.redirectTemporary"),308:c("common.redirectPermanently")};return(0,o.useEffect)((function(){if(n.type===O.ROUTING_RULE_TYPES.COMPONENT&&n.componentId){var e=p.find((function(e){return e.meta.did===n.componentId})),o=(0,A.findWebInterface)(e.meta),i=(Array.isArray(null===o||void 0===o?void 0:o.pageGroups)?o.pageGroups:[]).map((function(e){return{value:e,label:"".concat(e," pages")}}));i.length&&i.unshift({value:"",label:"All pages"}),x(i),n.pageGroup&&!1===i.find((function(e){return e.value===n.pageGroup}))&&t((0,r.Z)((0,r.Z)({},n),{},{pageGroups:""}))}}),[n.componentId,n.type]),(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)(je.Z,{select:!0,label:c("router.domain.add.type"),autoComplete:"off",variant:"outlined",name:"type","data-cy":"domain-add-type",fullWidth:!0,value:n.type,onChange:function(e){a(""),t((0,r.Z)((0,r.Z)({},n),{},{type:e.target.value,did:e.target.value===O.ROUTING_RULE_TYPES.BLOCKLET?u:"",__disableConfirm:!1}))},style:{marginBottom:32},SelectProps:{},children:l.map((function(e){var n=e.name,t=e.value;return(0,ne.jsx)(xn.Z,{value:t,children:n},t)}))}),n.type===O.ROUTING_RULE_TYPES.REDIRECT&&[(0,ne.jsx)(je.Z,{select:!0,label:c("router.domain.add.redirect"),autoComplete:"off",variant:"outlined",name:"type",fullWidth:!0,value:n.redirectCode,onChange:function(e){return t((0,r.Z)((0,r.Z)({},n),{},{redirectCode:e.target.value}))},style:{marginBottom:32},SelectProps:{},children:Object.keys(v).map((function(e){return(0,ne.jsx)(xn.Z,{value:e,children:"".concat(v[e]," - ").concat(e)},e)}))},"redirectCode"),(0,ne.jsx)(je.Z,{label:c("common.redirectUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"redirect-url-input",fullWidth:!0,value:n.url,helperText:c("router.urlHelperText"),style:{marginBottom:32},onChange:function(e){t((0,r.Z)((0,r.Z)({},n),{},{url:e.target.value,__disableConfirm:!e.target.value.trim()})),e.target.value.trim()?a(""):a(c("router.validation.redirectUrlRequired"))}},"redirectUrl")],n.type===O.ROUTING_RULE_TYPES.COMPONENT&&[(0,ne.jsx)(je.Z,{select:!0,label:c("router.domain.add.component"),autoComplete:"off",variant:"outlined","data-cy":"select-component-input",name:"componentId",fullWidth:!0,value:n.componentId,onChange:function(e){t((0,r.Z)((0,r.Z)({},n),{},{componentId:e.target.value}))},style:{marginBottom:32},SelectProps:{},children:p.map((function(e){return(0,ne.jsx)(xn.Z,{value:e.meta.did,selected:e.meta.did===n.componentId,children:(0,A.getDisplayName)(e,!0)},e.meta.did)}))},"componentId"),h.length?(0,ne.jsx)(je.Z,{select:!0,label:c("router.domain.add.pageGroup"),autoComplete:"off",variant:"outlined",name:"pageGroup","data-cy":"route-group-input",fullWidth:!0,value:n.pageGroup,helperText:c("router.domain.add.pageGroupTip"),style:{marginBottom:32},onChange:function(e){t((0,r.Z)((0,r.Z)({},n),{},{pageGroup:e.target.value}))},SelectProps:{},children:h.map((function(e){return(0,ne.jsx)(xn.Z,{value:e.value,selected:e.value===n.pageGroup,children:e.label},e.label)}))},"pageGroup"):null].filter(Boolean),n.type===O.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(0,ne.jsx)(je.Z,{label:c("common.rewriteUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"rewrite-url-input",fullWidth:!0,value:n.url,helperText:c("router.urlHelperText"),style:{marginBottom:32},onChange:function(e){t((0,r.Z)((0,r.Z)({},n),{},{url:e.target.value,__disableConfirm:!e.target.value.trim()})),e.target.value.trim()?a(""):a(c("router.validation.rewriteUrlRequired"))}},"url")]})}function Zr(e){var n=e.children,t=(0,i.PE)().t,a=(0,le.h6)().api,l=(0,Pn.y0)().blocklet,c=(0,o.useState)(!1),p=(0,d.Z)(c,2),m=p[0],f=p[1],h=(0,o.useState)(null),x=(0,d.Z)(h,2),v=x[0],g=x[1],Z=l.meta.did,b=l.site.id,y=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(n){var r,o;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,tt.fX)(n,t);case 3:if(!(r=e.sent)){e.next=6;break}throw r;case 6:return f(!0),o={from:{pathPrefix:De()(n.pathPrefix)},to:{type:n.type}},n.type===O.ROUTING_RULE_TYPES.REDIRECT&&(o.to.url=n.url.trim(),o.to.redirectCode=n.redirectCode),n.type===O.ROUTING_RULE_TYPES.COMPONENT&&(o.to.did=Z,o.to.componentId=n.componentId,o.to.pageGroup=n.pageGroup),n.type===O.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(o.to.url=De()(n.url)),e.next=13,a.addRoutingRule({input:{id:b,rule:o,teamDid:Z}});case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),M.Z.error(e.t0.message);case 18:return e.prev=18,f(!1),g(null),e.finish(18);case 22:case"end":return e.stop()}}),e,null,[[0,15,18,22]])})));return function(n){return e.apply(this,arguments)}}(),k={title:t("router.rule.add.title"),description:function(e,n,o){return(0,ne.jsxs)(Ye.Z,{component:"div",children:[(0,ne.jsx)(je.Z,{label:t("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix","data-cy":"path-prefix-input",fullWidth:!0,autoFocus:!0,helperText:e.pathPrefixHint||t("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:e.pathPrefix,onChange:function(i){var a=!1,c=(0,tt.Rw)({params:(0,r.Z)((0,r.Z)({},e),{},{pathPrefix:i.target.value}),blocklets:[l]});o(c),e.type===O.ROUTING_RULE_TYPES.BLOCKLET&&c&&(a=!0),e.type!==O.ROUTING_RULE_TYPES.REDIRECT||e.url||(a=!0),e.type!==O.ROUTING_RULE_TYPES.GENERAL_REWRITE||e.url||(a=!0),i.target.value.trim()||(a=!0,o(t("router.validation.pathPrefixRequired"))),a||o("");var s=t("common.slugifyHint",{value:(0,ce.LN)(i.target.value)});n((0,r.Z)((0,r.Z)({},e),{},{pathPrefix:i.target.value,pathPrefixHint:s,__disableConfirm:a}))}}),(0,ne.jsx)(gr,{params:e,setParams:function(e){o(null),(0,tt.fX)(e,t)?n((0,r.Z)((0,r.Z)({},e),{},{__disableConfirm:!0})):n((0,r.Z)({},e))},setError:o})]})},confirm:t("router.rule.add.confirm"),cancel:t("common.cancel"),params:{did:"",pathPrefix:"",type:O.ROUTING_RULE_TYPES.REDIRECT,componentId:"",pageGroup:"",redirectCode:302,__disableConfirm:!0},onConfirm:y,onCancel:function(){f(!1),g(null)}},j=function(e){e.stopPropagation(),g(k)};return(0,ne.jsxs)(ne.Fragment,{children:["function"===typeof n?n({loading:m,open:j}):(0,ne.jsxs)(xn.Z,{onClick:j,className:"rule-action","data-cy":"action-add-rule",children:[m?(0,ne.jsx)(B.Z,{size:16}):(0,ne.jsx)(vn.Z,{style:{fontSize:18,marginRight:5}}),t("router.rule.add.title")]}),v&&(0,ne.jsx)(ae.Z,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel,color:"primary"})]})}gr.propTypes={params:f().object,serviceTypes:f().array,setParams:f().func,setError:f().func},gr.defaultProps={params:{},serviceTypes:[{name:"Redirect",value:O.ROUTING_RULE_TYPES.REDIRECT},{name:"Default - User will see the 404 page",value:O.ROUTING_RULE_TYPES.NONE},{name:"Rewrite - Route traffic without redirect",value:O.ROUTING_RULE_TYPES.GENERAL_REWRITE},{name:"Component - Pass traffic to blocklet component",value:O.ROUTING_RULE_TYPES.COMPONENT}],setParams:function(){},setError:function(){}},Zr.propTypes={children:f().any},Zr.defaultProps={children:null};var br=t(96366),yr=t(18067),kr=t(71363);function jr(e){var n=e.id,t=e.from,r=e.children,a=(0,i.PE)().t,l=(0,le.h6)().api,c=(0,Pn.y0)().blocklet,p=(0,o.useState)(!1),m=(0,d.Z)(p,2),f=m[0],h=m[1],x=(0,o.useState)(null),v=(0,d.Z)(x,2),g=v[0],Z=v[1],b=c.meta.did,y=c.site.id,k=t.pathPrefix,j=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.prev=1,e.next=4,l.deleteRoutingRule({input:{id:y,ruleId:n,teamDid:b}});case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),M.Z.error(e.t0.message);case 9:return e.prev=9,Z(null),h(!1),e.finish(9);case 13:case"end":return e.stop()}}),e,null,[[1,6,9,13]])})));return function(){return e.apply(this,arguments)}}(),C={keyName:k,title:a("router.rule.delete.title"),description:a("router.rule.delete.description",{name:"<b>".concat(k,"</b>")}),confirmPlaceholder:a("router.rule.delete.confirm_desc",{name:k}),confirm:a("common.delConfirm"),cancel:a("router.rule.delete.cancel"),onConfirm:j,onCancel:function(){h(!1),Z(null)}},P=function(e){e.stopPropagation(),Z(C)};return(0,ne.jsxs)(ne.Fragment,{children:["function"===typeof r?r({loading:f,open:P}):(0,ne.jsxs)(xn.Z,{onClick:P,className:"rule-action","data-cy":"action-delete-rule",children:[f?(0,ne.jsx)(B.Z,{size:16}):(0,ne.jsx)(I.default,{style:{fontSize:18,marginRight:5}}),a("router.rule.delete.title")]}),g&&(0,ne.jsx)(kr.Z,{keyName:g.keyName,title:g.title,description:g.description,confirmPlaceholder:g.confirmPlaceholder,confirm:g.confirm,cancel:g.cancel,params:g.params,onConfirm:g.onConfirm,onCancel:g.onCancel})]})}function Cr(e){var n=e.id,t=e.from,a=e.to,l=e.children,c=(0,i.PE)().t,p=(0,le.h6)().api,m=(0,Pn.y0)().blocklet,f=(0,o.useState)(!1),h=(0,d.Z)(f,2),x=h[0],v=h[1],g=(0,o.useState)(null),Z=(0,d.Z)(g,2),b=Z[0],y=Z[1],k=m.meta.did,j=m.site.id,C=t.pathPrefix,P=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(t){var r,o;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,tt.fX)(t,c);case 3:if(!(r=e.sent)){e.next=6;break}throw r;case 6:return v(!0),o={id:n,from:{pathPrefix:De()(t.pathPrefix)},to:{type:t.type}},t.type===O.ROUTING_RULE_TYPES.REDIRECT&&(o.to.url=t.url,o.to.redirectCode=t.redirectCode),t.type===O.ROUTING_RULE_TYPES.COMPONENT&&(o.to.did=k,o.to.componentId=t.componentId,o.to.pageGroup=t.pageGroup),t.type===O.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(o.to.url=De()(t.url)),e.next=13,p.updateRoutingRule({input:{id:j,rule:o,teamDid:k}});case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),M.Z.error(e.t0.message);case 18:return e.prev=18,v(!1),y(null),e.finish(18);case 22:case"end":return e.stop()}}),e,null,[[0,15,18,22]])})));return function(n){return e.apply(this,arguments)}}(),E={title:c("router.rule.update.title"),description:function(e,n,t){return(0,ne.jsxs)(Ye.Z,{component:"div",children:[(0,ne.jsx)(je.Z,{label:c("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix","data-cy":"path-prefix-input",fullWidth:!0,autoFocus:!0,helperText:e.helperText||c("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:e.pathPrefix,onChange:function(o){var i=!1;e.type!==O.ROUTING_RULE_TYPES.REDIRECT||e.url||(i=!0),e.type!==O.ROUTING_RULE_TYPES.GENERAL_REWRITE||e.url||(i=!0),o.target.value.trim()||(i=!0,t(c("router.validation.pathPrefixRequired"))),i||t("");var a=c("common.slugifyHint",{value:(0,ce.LN)(o.target.value)});n((0,r.Z)((0,r.Z)({},e),{},{pathPrefix:o.target.value,helperText:a,__disableConfirm:i}))}}),(0,ne.jsx)(gr,{params:e,setParams:function(e){(0,tt.fX)(e,c)?n((0,r.Z)((0,r.Z)({},e),{},{__disableConfirm:!0})):n((0,r.Z)({},e))},setError:t})]})},confirm:c("router.rule.update.confirm"),cancel:c("router.rule.update.cancel"),color:"primary",params:{did:a.did||"",pathPrefix:"/"===C?C:C.replace(/^\/+/,"").replace(/\/+$/,""),type:a.type||O.ROUTING_RULE_TYPES.BLOCKLET,redirectCode:a.redirectCode||302,componentId:a.componentId||"",pageGroup:a.pageGroup||"",url:a.url||"",__disableConfirm:!1},onConfirm:P,onCancel:function(){v(!1),y(null)}},w=function(e){e.stopPropagation(),y(E)};return(0,ne.jsxs)(ne.Fragment,{children:["function"===typeof l?l({loading:x,open:w}):(0,ne.jsxs)(xn.Z,{onClick:w,className:"rule-action","data-cy":"action-update-rule",children:[x?(0,ne.jsx)(B.Z,{size:16}):(0,ne.jsx)(Ze.default,{style:{fontSize:18,marginRight:5}}),c("router.rule.update.title")]}),b&&(0,ne.jsx)(ae.Z,{title:b.title,description:b.description,confirm:b.confirm,color:b.color,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]})}function Pr(e){var n=(0,i.PE)().locale,t=(0,Pn.y0)(),o=t.blocklet,a=t.recommendedDomain,l=(0,ce.Sk)(a,e.from.pathPrefix,(0,ce.f0)(o,n));return(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,ne.jsx)("a",{target:"_blank",href:l,rel:"noopener noreferrer",title:l,children:(0,ne.jsx)(y.Z,{size:"small",children:(0,ne.jsx)(E.Z,{})})}),(0,ne.jsx)(Cr,(0,r.Z)((0,r.Z)({},e),{},{children:function(n){var t=n.open;return(0,ne.jsx)(y.Z,{size:"small",onClick:t,disabled:e.isProtected,"data-cy":"action-update-rule",children:(0,ne.jsx)(C.Z,{})})}})),(0,ne.jsx)(jr,(0,r.Z)((0,r.Z)({},e),{},{children:function(n){var t=n.open;return(0,ne.jsx)(y.Z,{size:"small",onClick:t,disabled:e.isProtected,"data-cy":"action-delete-rule",children:(0,ne.jsx)(I.default,{})})}}))]})}jr.propTypes={id:f().string.isRequired,from:f().object.isRequired,children:f().any},jr.defaultProps={children:null},Cr.propTypes={id:f().string.isRequired,from:f().object.isRequired,to:f().object.isRequired,children:f().any},Cr.defaultProps={children:null},Pr.propTypes={isProtected:f().bool},Pr.defaultProps={isProtected:!1};var Er=["group"];function wr(e){var n=e.group,t=(0,l.Z)(e,Er);return n?(0,ne.jsx)(Y.Z,(0,r.Z)((0,r.Z)({type:"reverse"},t),{},{children:n})):null}function Rr(e){var n=e.domain,t=e.isHttps,r=e.toUrl,o=t?"https":"http",i=r;return Tt()(i)||(i="".concat(o,"://").concat(n).concat(r)),(0,ne.jsx)(ee.Z,{href:i,target:"_blank",style:{fontSize:14},underline:"hover",children:r},i)}function Tr(e){var n=e.hasPermission,t=(0,i.PE)(),o=t.t,a=t.locale,l=(0,br.Z)(),c=(0,Pn.y0)(),s=c.blocklet,u=c.recommendedDomain;return s.site.rules.filter((function(e){return e.to.type!==O.ROUTING_RULE_TYPES.BLOCKLET})).map((function(e){var t=null,i=null;e.to.type===O.ROUTING_RULE_TYPES.NONE?t="404":e.to.type===O.ROUTING_RULE_TYPES.REDIRECT?t=e.to.redirectCode:e.to.type===O.ROUTING_RULE_TYPES.GENERAL_REWRITE?t="R":e.to.type===O.ROUTING_RULE_TYPES.COMPONENT&&(i=s.children.find((function(n){return n.meta.did===e.to.componentId})),t="C");var c=e.isProtected?(0,ne.jsx)(R.Z,{title:o("blocklet.router.urlLockTooltip"),placement:"top",children:(0,ne.jsx)("span",{children:(0,ne.jsx)(y.Z,{disabled:!0,size:"small",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0,margin:"12px 0"},children:(0,ne.jsx)(yr.Z,{style:{fill:l.palette.text.disabled}})})})}):(0,ne.jsx)(Pr,(0,r.Z)({},e));return[(0,ne.jsxs)(x.Z,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,ne.jsxs)(x.Z,{width:{xs:300,md:400},display:"flex",alignItems:"center",children:[(0,ne.jsx)(x.Z,{width:28}),"object"===typeof t?t:(0,ne.jsx)(Ut.Z,{children:t}),(0,ne.jsxs)(x.Z,{ml:2,children:[(0,ne.jsxs)(x.Z,{style:{color:"#222",fontSize:16},children:[e.to.type===O.ROUTING_RULE_TYPES.NONE&&o("common.page404"),e.to.type===O.ROUTING_RULE_TYPES.REDIRECT&&o("common.redirect"),e.to.type===O.ROUTING_RULE_TYPES.GENERAL_REWRITE&&o("common.rewrite"),e.to.type===O.ROUTING_RULE_TYPES.COMPONENT&&(0,A.getDisplayName)(i,!0)]}),(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[e.to.type===O.ROUTING_RULE_TYPES.REDIRECT&&(0,ne.jsx)(Rr,{domain:u,toUrl:e.to.url}),e.to.type===O.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(0,ne.jsx)(Rr,{domain:u,toUrl:e.to.url}),e.to.type===O.ROUTING_RULE_TYPES.COMPONENT&&(0,ne.jsx)(wr,{group:e.to.pageGroup})]})]})]}),(0,ne.jsx)(x.Z,{px:2,sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:(0,ne.jsx)(ee.Z,{href:(0,ce.Sk)(u,e.from.pathPrefix,(0,ce.f0)(s,a)),target:"_blank",style:{fontSize:16},underline:"hover",children:e.from.pathPrefix})},e.from.pathPrefix),(0,ne.jsx)(x.Z,{children:n&&(0,ne.jsx)("div",{style:{textAlign:"right"},children:c})},"actions")]},"rule"),(0,ne.jsx)(on.Z,{},"divider")]}))}wr.propTypes={group:f().string.isRequired},Rr.propTypes={domain:f().string.isRequired,toUrl:f().string.isRequired,isHttps:f().bool},Rr.defaultProps={isHttps:!1},Tr.propTypes={hasPermission:f().bool},Tr.defaultProps={hasPermission:!1};var Sr=(0,se.V)(Tr,"mutate_blocklets"),_r=(0,se.V)(Tr,"",ce.Wf);function Ur(e){return(0,le.h6)().inService?(0,ne.jsx)(_r,(0,r.Z)({},e)):(0,ne.jsx)(Sr,(0,r.Z)({},e))}var Ir,Nr,Lr,Dr=t(92726),Or=["blocklet","onUpdate","getComponentUrl"],Br=function(e,n){return e?[{name:n("common.name"),value:e.displayName},{name:n("common.description"),value:e.description},{name:n("common.version"),value:(0,ne.jsx)(Y.Z,{children:e.version})}]:[]},Fr=function(e){var n=e.source,t=e.deployedFrom,r=e.bundleSource;return n?{source:n,deployedFrom:t}:r?r.url?{source:"url",deployedFrom:t||Array.isArray(r.url)?r.url[0]:r.url}:r.store?{source:"registry",deployedFrom:t||Array.isArray(r.store)?r.store[0]:r.store}:{}:{source:"upload",deployedFrom:t}},zr=function(e,n){for(var t=e.split("/").slice(1),r=n,o=0,i=[];r&&o<t.length;){var a=r.children.find((function(e){return e.meta.did===t[o]}));r=a,o++,a&&i.push(a.meta.title)}return i.join(" / ")};function qr(e){var n,t,r,a,l=e.blocklet,c=e.ancestors,p=e.depth,m=e.onRemove,f=e.onStart,Z=e.onStop,b=e.onRestart,k=e.onReload,j=e.getComponentUrl,w=e.app,T=(0,o.useContext)(i.RD),S=T.t,N=T.locale,L=(0,o.useState)(),O=(0,d.Z)(L,2),B=O[0],z=O[1],q=(0,o.useState)(!1),G=(0,d.Z)(q,2),M=G[0],H=G[1],X=(0,o.useState)(!1),$=(0,d.Z)(X,2),J=$[0],Q=$[1],ee=(0,o.useState)(null),oe=(0,d.Z)(ee,2),ie=oe[0],le=oe[1],se=(0,K.K)().deletingBlocklets,ue=l.status;1===p&&se.includes(l.meta.did)&&(ue="deleting");var de,pe="/".concat(l.mountPoint||"/").replace(/\/+/g,"/"),me=j(pe),he=B?Fr(B):{},xe=B?[{name:S("common.name"),value:(0,A.getDisplayName)(B,!0)},{name:S("common.version"),value:(0,ne.jsx)(fe,{blocklet:B,checkUpgrade:!1})},{name:S("common.status"),value:(0,ne.jsx)(re.Z,{status:ue,source:B.source})},"running"===l.status?{name:S("blocklet.startedAt"),value:(0,ce.B2)(l.startedAt,N)}:null,"running"!==l.status?{name:S("blocklet.stoppedAt"),value:(0,ce.B2)(l.stoppedAt,N)}:null,l.installedAt?{name:S("blocklet.installedAt"),value:(0,ce.B2)(l.installedAt,N)}:null,(0,A.hasStartEngine)(l.meta)?{name:S("common.mountPoint"),value:pe}:null,B.meta.group?{name:S("common.group"),value:(0,ne.jsx)(Y.Z,{type:"success",children:B.meta.group})}:null,{name:S("blocklet.overview.source"),value:(0,ne.jsx)(te,{sourceInfo:he,blocklet:l})},{name:S("blocklet.overview.deployedFrom"),value:he.deployedFrom||"-"},{name:S("common.did"),value:(0,ne.jsx)(V.Z,{did:B.meta.did})},{name:S("common.author"),value:(0,ce.rq)(B.meta.author)},{name:S("common.engine"),value:Br(B.engine,S).map((function(e){var n=e.name,t=e.value;return(0,ne.jsx)(F.Z,{style:{marginBottom:4},nameWidth:120,name:n,children:t},n)}))},null!==(n=l.dependents)&&void 0!==n&&n.length?{name:S("common.dependents"),value:(0,ne.jsx)(x.Z,{children:l.dependents.map((function(e){return(0,ne.jsx)(x.Z,{children:"".concat(zr(e.id,w)," ").concat(e.required?"(".concat(S("common.required"),")"):"")})}))})}:null,null!==(t=l.meta.resources)&&void 0!==t&&t.length?{name:S("common.resource"),value:l.meta.resources.join(", ")}:null].filter(Boolean):[],Ze=(0,A.isInProgress)(w.status),be=(0,A.isInProgress)(l.status),ye="";if(Ze||be||1===p&&se.includes(l.meta.did))ye=S("blocklet.component.tip.stopBlocklet");else if(null!==(r=l.dependents)&&void 0!==r&&r.length){var ke=l.dependents.filter((function(e){return e.required}));if(ke.length){var je=ke.map((function(e){return zr(e.id,w)}));ye=S("blocklet.component.tip.requiredBy",{name:je.join(", ")})}}return[(0,ne.jsxs)(Gr,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,ne.jsxs)(x.Z,{pl:2,width:{xs:300,md:400},display:"flex",alignItems:"center",children:[(0,ne.jsx)(ve.Z,{blocklet:l,ancestors:c}),(0,ne.jsxs)(x.Z,{ml:"16px",children:[(0,ne.jsx)(x.Z,{className:"component-name",onClick:function(){return z(l)},children:(0,A.getDisplayName)(l,!0)}),(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,ne.jsx)(fe,{blocklet:l,checkUpgrade:!1}),(0,ne.jsx)(ge.Z,{style:{marginLeft:4},mode:l.mode||""}),"unknown"!==ue&&(0,ne.jsx)(re.Z,{style:{marginLeft:4},status:ue,source:l.source}),!(null===(a=l.dependents)||void 0===a||!a.length)&&(0,ne.jsx)(R.Z,{title:["".concat(S("common.dependents"),": "),l.dependents.map((function(e){return(0,ne.jsx)(x.Z,{pl:1,children:"".concat(zr(e.id,w)," ").concat(e.required?"(".concat(S("common.required"),")"):"")})}))],children:(0,ne.jsx)(x.Z,{display:"flex",color:"primary.main",ml:1,children:(0,ne.jsx)(D.JO,{icon:"octicon:package-dependents-16"})})})]})]})]},l),(0,A.hasStartEngine)(l.meta)&&(0,ne.jsx)(x.Z,{sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:(0,ne.jsx)("a",{target:"_blank",href:me,rel:"noopener noreferrer",title:me,children:(0,ne.jsx)(x.Z,{maxWidth:400,sx:{color:"secondary.main",fontSize:18,px:2},overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",children:W()(pe)})})},pe),(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,A.hasStartEngine)(l.meta)&&(0,ne.jsx)(R.Z,{title:S("common.visit"),children:(0,ne.jsx)("a",{target:"_blank",href:me,rel:"noopener noreferrer",children:(0,ne.jsx)(y.Z,{size:"small",children:(0,ne.jsx)(E.Z,{})})})}),(0,A.hasStartEngine)(l.meta)&&(0,ne.jsx)(Me,{blocklet:l,ancestors:c,children:function(e){var n=e.open;return(0,ne.jsx)(R.Z,{title:S("common.config"),children:(0,ne.jsx)(Ar,{color:"error",badgeContent:"",variant:"dot",invisible:!(0,A.getComponentMissingConfigs)(l,c[0]).length,children:(0,ne.jsx)(y.Z,{onClick:n,size:"small",children:(0,ne.jsx)(C.Z,{})})})},"config")}}),(0,ne.jsx)(tn,{blocklet:w,component:l,onStart:f,onStop:Z,disabled:!["starting","stopping"].includes(w.status)&&(0,A.isInProgress)(w.status)}),(0,ne.jsx)(Dr.Z,{"data-cy":"component-actions",actions:[(0,A.hasStartEngine)(l.meta)?{icon:(0,ne.jsx)(P.Z,{}),text:S("common.detail"),onClick:function(){z(l)}}:null,{icon:(0,ne.jsx)(_.default,{}),text:S("common.restart"),onClick:function(){le({title:"".concat(S("common.restart")," ").concat(l.meta.title),description:S("blocklet.action.restartDescription"),confirm:S("blocklet.action.confirmRestart"),cancel:S("common.cancel"),onConfirm:function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(!0),e.next=3,b(l);case 3:Q(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){return le(null)}})},disabled:Ze||be||"running"!==l.status},{icon:(0,ne.jsx)(U.Z,{}),text:S("common.reload"),onClick:function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(!0),e.next=3,k(l);case 3:Q(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),disabled:J||Ze||be||"running"!==l.status},{icon:(0,ne.jsx)(I.default,{}),text:S("common.delete"),onClick:function(){H(!0)},disabled:Ze||be||!!ye,tip:ye}].filter(Boolean)})]},"actions")]},"group-not-gateway-box"),(0,ne.jsx)(on.Z,{depth:2}),!!B&&(0,ne.jsx)(h.Z,{open:!0,fullWidth:!0,maxWidth:"md",onClose:function(){z(null)},children:(0,ne.jsxs)(x.Z,{paddingY:1.5,children:[(0,ne.jsx)(g.Z,{children:S("common.componentBasicInfo")}),(0,ne.jsx)(v.Z,{children:(de=xe,de.map((function(e){return e.name===S("common.did")||e.name===S("blocklet.appId")?(0,ne.jsx)(F.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return e.name},children:e.value},e.name):(0,ne.jsx)(F.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)})))})]},"dialog-wrapper")},"base-info-dialog"),(0,ne.jsx)($e,{blocklet:w,component:l,remove:function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){var n=arguments;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(!0),e.prev=1,e.next=4,m.apply(void 0,n);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:Q(!1),H(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}(),onCancel:function(){return H(!1)},hideBtn:!0,showConfirm:M}),ie&&(0,ne.jsx)(ae.Z,{title:ie.title,description:ie.description,confirm:ie.confirm,cancel:ie.cancel,params:ie.params,onConfirm:ie.onConfirm,onCancel:ie.onCancel})]}qr.propTypes={blocklet:f().object.isRequired,ancestors:f().array,depth:f().number,onRemove:f().func,onStart:f().func,onStop:f().func,onRestart:f().func,onReload:f().func,getComponentUrl:f().func,app:f().object},qr.defaultProps={ancestors:[],depth:0,onRemove:function(){},onStart:function(){},onStop:function(){},onRestart:function(){},onReload:function(){},getComponentUrl:function(){return window.location.origin},app:null};var Ar=(0,p.Z)(j.Z)(Ir||(Ir=(0,c.Z)(["\n .BaseBadge-badge {\n top: ","px;\n right: ","px;\n }\n"])),(function(e){return 8*e.top||6}),(function(e){return 8*e.right||6})),Gr=(0,p.Z)(x.Z)(Nr||(Nr=(0,c.Z)(["\n .component-name {\n color: #222;\n font-size: 16px;\n cursor: pointer;\n }\n"])));function Wr(e){var n=e.blocklet,t=(e.onUpdate,e.getComponentUrl),c=(0,l.Z)(e,Or),p=(0,o.useContext)(i.RD).t,m=(0,le.h6)(),f=m.api,j=m.inService,P=m.info,E=(0,K.K)(),_=E.addDeletingDid,U=E.removeDeletingDid,I=E.matchDeletingDid,D=(0,o.useState)(!1),F=(0,d.Z)(D,2),G=F[0],W=F[1],V=(0,o.useState)(null),Y=(0,d.Z)(V,2),H=Y[0],X=Y[1],$=(0,o.useState)(null),J=(0,d.Z)($,2),Q=J[0],ee=J[1],te=(0,o.useState)(!1),re=(0,d.Z)(te,2),oe=re[0],ie=re[1],ae=n&&n.structVersion!==O.APP_STRUCT_VERSION,ue=(0,o.useState)(!1),de=(0,d.Z)(ue,2),pe=de[0],me=de[1],fe=(0,a.Z)(n.children)||[];"gateway"!==n.meta.group&&fe.unshift(n),I(fe.map((function(e){return e.meta.did})));var he=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){var t,r,o,i,a;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G){e.next=2;break}return e.abrupt("return");case 2:return W(!0),e.prev=3,e.next=6,f.checkComponentsForUpdates({input:{did:n.meta.did}});case 6:if(e.t0=e.sent.preUpdateInfo,e.t0){e.next=9;break}e.t0={};case 9:if(t=e.t0,r=t.updateId,o=t.updateList,W(!1),r){e.next=16;break}return M.Z.info(p("blocklet.component.noUpdate")),e.abrupt("return");case 16:i=[],(0,A.forEachChildSync)(n,(function(e,n){var t=n.id,r=n.ancestors,a=o.find((function(e){return e.id===t}));if(a){var l=r.slice(1).concat(e).map((function(e){return e.meta.title||e.meta.name})).join(" / "),c=(r[1]||e).meta.did;i.push({groupId:c,name:l,version:e.meta.version,newVersion:a.meta.version})}})),a={},i.forEach((function(e){a[e.groupId]?e.disabled=!0:a[e.groupId]=!0})),X({params:{updateId:r},list:i,checks:a,hasChecks:!0}),e.next=27;break;case 23:e.prev=23,e.t1=e.catch(3),W(!1),M.Z.error((0,ce.Z)(e.t1));case 27:case"end":return e.stop()}}),e,null,[[3,23]])})));return function(){return e.apply(this,arguments)}}(),xe=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(){var t,r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,W(!0),t=Object.keys(H.checks).filter((function(e){return H.checks[e]})),r={updateId:H.params.updateId,rootDid:n.meta.did,selectedComponents:t},e.next=8,f.upgradeComponents({input:r});case 8:W(!1),X(null),me(null),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(2),W(!1),M.Z.error((0,ce.Z)(e.t0));case 17:case"end":return e.stop()}}),e,null,[[2,13]])})));return function(){return e.apply(this,arguments)}}(),ve=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(t,r){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _(t.meta.did),e.prev=1,e.next=4,f.deleteComponent({input:{did:t.meta.did,keepData:"keepData"===r,rootDid:n.meta.did}});case 4:return e.next=6,(0,ce._v)(800);case 6:e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),M.Z.error((0,ce.Z)(e.t0)),U(t.meta.did);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(n,t){return e.apply(this,arguments)}}(),ge=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(t){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.startBlocklet({input:{did:n.meta.did,componentDids:[t.meta.did]}});case 3:return e.next=5,(0,ce._v)(800);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),M.Z.error((0,ce.Z)(e.t0));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),Ze=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(t){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.stopBlocklet({input:{did:n.meta.did,componentDids:[t.meta.did]}});case 3:return e.next=5,(0,ce._v)(800);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),M.Z.error((0,ce.Z)(e.t0));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),be=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(t){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.restartBlocklet({input:{did:n.meta.did,componentDids:[t.meta.did]}});case 3:return e.next=5,(0,ce._v)(800);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),M.Z.error((0,ce.Z)(e.t0));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),ye=function(){var e=(0,u.Z)((0,s.Z)().mark((function e(t){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.reloadBlocklet({input:{did:n.meta.did,componentDids:[t.meta.did]}});case 3:return e.next=5,(0,ce._v)(800);case 5:M.Z.success(p("blocklet.reloadSuccess")),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),M.Z.error((0,ce.Z)(e.t0));case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(n){return e.apply(this,arguments)}}();return(0,ne.jsxs)(Mr,(0,r.Z)((0,r.Z)({component:"div"},c),{},{children:[(0,ne.jsxs)(x.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,ne.jsxs)("div",{className:"title",children:[p("common.components"),!ae&&(0,ne.jsx)(se.Z,{permission:j?"":"mutate_blocklets",role:j?ce.Wf:[],children:(0,ne.jsx)(Ar,{top:1.2,right:.4,color:"error",badgeContent:"",variant:"dot",invisible:!pe,children:(0,ne.jsxs)(z.Z,{disabled:G||(0,A.isInProgress)(n.status),color:"secondary",onClick:function(){he()},"data-cy":"check-for-updates",children:[(0,ne.jsx)(x.Z,{mr:.5,display:"flex",children:G?(0,ne.jsx)(B.Z,{size:16}):(0,ne.jsx)(b.Z,{style:{fontSize:"1em"}})}),p("blocklet.component.checkUpdateTitle")]})})})]}),(0,ne.jsx)(se.Z,{permission:j?"":"mutate_blocklets",role:j?ce.Wf:[],children:(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,ne.jsx)(Zr,{children:function(e){var t=e.open;return(0,ne.jsxs)(z.Z,{disabled:G||(0,A.isInProgress)(n.status),variant:"text",color:"primary","data-cy":"add-rule",onClick:t,children:[(0,ne.jsx)(k.Z,{style:{fontSize:"1.3em",marginRight:4}}),p("router.rule.add.title")]})}}),!ae&&(0,ne.jsx)(cr,{blocklet:n,serverVersion:P.version,children:function(e){var t=e.open;return(0,ne.jsxs)(z.Z,{disabled:G||(0,A.isInProgress)(n.status),variant:"text",color:"primary","data-cy":"add-component",onClick:t,children:[(0,ne.jsx)(k.Z,{style:{fontSize:"1.3em",marginRight:4}}),p("blocklet.component.add")]})}}),!ae&&(0,ne.jsx)(Me,{blocklet:n,ancestors:[],children:function(e){var n=e.open;return(0,ne.jsx)(R.Z,{title:"".concat(p("blocklet.component.container")).concat(p("common.config")),children:(0,ne.jsx)(y.Z,{onClick:n,size:"small",color:"primary",children:(0,ne.jsx)(C.Z,{style:{fontSize:18}})})},"config")}})]})})]}),fe&&fe.length?(0,ne.jsxs)(x.Z,{mt:2,ml:{xs:"-12px",md:"-24px"},children:["gateway"!==n.meta.group&&(0,ne.jsx)(qr,{blocklet:n,app:n,onRemove:ve,onStart:ge,onStop:Ze,onReload:ye,onRestart:be,getComponentUrl:t},"0-".concat(n.meta.did)),n.children.map((function(e){return(0,ne.jsx)(qr,{depth:1,blocklet:e,ancestors:[n],app:n,onRemove:ve,onStart:ge,onStop:Ze,onReload:ye,onRestart:be,getComponentUrl:t},"1-".concat(e.meta.did))}))]},"top-blocklet-".concat(n.meta.did)):(0,ne.jsx)(x.Z,{mt:8,children:(0,ne.jsx)(q.Z,{children:p("blocklet.component.noComponent")})}),!!n.site.rules.length&&(0,ne.jsx)(x.Z,{mt:0,ml:{xs:"-16px",md:"-28px"},children:(0,ne.jsx)(Ur,{})}),!!H&&(0,ne.jsx)(h.Z,{open:!0,fullWidth:!0,children:(0,ne.jsxs)(x.Z,{paddingY:1.5,children:[(0,ne.jsx)(g.Z,{children:p("blocklet.component.updateTitle")}),(0,ne.jsx)(x.Z,{component:v.Z,py:4,children:H.list.map((function(e){return(0,ne.jsxs)(x.Z,{display:"flex",alignItems:"center",children:[(0,ne.jsx)(S.Z,{checked:H.checks[e.groupId],onChange:function(n){return function(e,n){var t=e.target.checked;X((function(e){var o=Object.entries(e.checks).reduce((function(e,r){var o=(0,d.Z)(r,2),i=o[0],a=o[1];return e[i]=n===i?t:a,e}),{}),i=Object.values(o).includes(!0);return(0,r.Z)((0,r.Z)({},e),{},{checks:o,hasChecks:i})}))}(n,e.groupId)},style:{marginLeft:e.disabled?16:0},defaultChecked:!0,disabled:e.disabled}),(0,ne.jsxs)(x.Z,{flexGrow:1,mt:3,children:[(0,ne.jsx)(x.Z,{item:!0,xs:8,children:e.name}),e.version&&(0,ne.jsxs)(w.ZP,{fontSize:"h6.fontSize",container:!0,spacing:2,alignItems:"center",children:[(0,ne.jsx)(w.ZP,{item:!0,xs:3,children:e.version}),(0,ne.jsx)(w.ZP,{item:!0,xs:1,children:(0,ne.jsx)(T.Z,{style:{fontSize:"0.9em"}})}),(0,ne.jsx)(w.ZP,{item:!0,xs:3,children:(0,ne.jsx)(x.Z,{color:"secondary.main",children:e.newVersion})})]})]},"".concat(e.name,"-").concat(e.newVersion))]})}))}),(0,ne.jsxs)(Z.Z,{style:{padding:"8px 24px 24px"},children:[(0,ne.jsx)(z.Z,{onClick:function(){X(null)},children:p("common.cancel")}),(0,ne.jsxs)(z.Z,{onClick:function(e){e.stopPropagation(),xe()},color:"primary",disabled:G||!H.hasChecks,variant:"contained",autoFocus:!0,children:[G&&(0,ne.jsx)(B.Z,{size:16}),p("common.update")]})]})]})}),!!Q&&(0,ne.jsx)(h.Z,{open:!0,fullWidth:!0,onClose:function(){return ee(!1)},children:(0,ne.jsxs)(x.Z,{paddingY:1.5,children:[(0,ne.jsx)(g.Z,{children:p("common.configuration")}),(0,ne.jsx)(v.Z,{children:(0,ne.jsx)(x.Z,{py:2,children:(0,ne.jsx)(N.Z,{control:(0,ne.jsx)(L.Z,{checked:oe,onChange:function(e){return ie(!!e.target.checked)}}),label:p("blocklet.component.showContainer")})})})]})})]}))}Wr.propTypes={blocklet:f().object.isRequired,onUpdate:f().func,getComponentUrl:f().func},Wr.defaultProps={onUpdate:function(){},getComponentUrl:function(){return window.location.origin}};var Mr=p.Z.div(Lr||(Lr=(0,c.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-bottom: ",";\n }\n\n @keyframes showDelay {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n .component-item {\n animation: showDelay 0.75s ease 1;\n }\n"])),(function(e){return e.theme.spacing(1)})),Kr=t(13671);function Vr(e){var n=(0,o.useContext)(i.RD).locale,t=(0,Kr.y0)(),a=t.blocklet,l=t.recommendedDomain;return(0,ne.jsx)(Wr,(0,r.Z)({blocklet:a,getComponentUrl:function(e){return(0,ce.vH)({blocklet:a,domain:{value:l},mountPoint:e,params:(0,ce.f0)(a,n)})}},e))}Vr.defaultProps={}},44543:function(e,n,t){var r=t(57156);e.exports=function(e,n){return r(e)===r(n)}},92726:function(e,n,t){"use strict";t.d(n,{Z:function(){return j}});var r,o=t(71171),i=t(32723),a=t(34795),l=t(33028),c=t(96234),s=t(59740),u=t(5057),d=t(55898),p=t.n(d),m=t(33518),f=t(67680),h=t(61533),x=t(74490),v=t(45267),g=t(46954),Z=t(44067),b=t(96266),y=["actions","size"],k=["icon","text","onClick","disabled"];function j(e){var n=e.actions,t=e.size,r=(0,s.Z)(e,y),o=(0,u.useState)(null),d=(0,c.Z)(o,2),p=d[0],m=d[1],j=Boolean(p),P=function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}m(null)};return(0,b.jsxs)(C,(0,l.Z)((0,l.Z)({},r),{},{children:[(0,b.jsx)(f.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}m(e.currentTarget)},size:t,children:(0,b.jsx)(v.Z,{})}),(0,b.jsx)(h.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:p,keepMounted:!0,open:j,onClose:P,PaperProps:{},children:n.map((function(e,n){if("function"===typeof e)return e({close:P});var t=e.icon,r=e.text,o=e.onClick,c=e.disabled,d=void 0!==c&&c,p=(0,s.Z)(e,k);return(0,u.createElement)(x.Z,(0,l.Z)((0,l.Z)({},p),{},{disabled:d,dense:!0,onClick:function(){var e=(0,a.Z)((0,i.Z)().mark((function e(n){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o(n);case 2:P();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),key:n,"data-cy":"actions-menu-".concat(n)}),(0,b.jsx)(g.Z,{style:{minWidth:24,marginRight:8},children:t}),(0,b.jsx)(Z.Z,{primary:r}))}))})]}))}j.propTypes={actions:p().array,size:p().oneOf(["small","medium","large"])},j.defaultProps={actions:[],size:"small"};var C=m.Z.div(r||(r=(0,o.Z)([""])))},31440:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var r,o=t(71171),i=t(55898),a=t.n(i),l=t(85493),c=t(33518),s=t(68420),u=t(40265),d=t(44566),p=t(33028),m=t(33665),f=t(35432),h=t(96266);function x(e){var n=Object.assign({},((0,m.Z)(e),e));return(0,h.jsxs)("div",(0,p.Z)((0,p.Z)({},n),{},{style:{width:"100%"},children:[(0,h.jsx)("h3",{children:"End User License Agreement for Application"}),(0,h.jsxs)("p",{children:["Blocklet Server License Agreement ",f.COPYRIGHT_OWNER," version 2020-08-28"]}),(0,h.jsx)("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),(0,h.jsx)("p",{children:"\u6682\u65e0"})]}))}function v(e){var n=e.meta,t=e.onClickNext,r=e.handleDescEle,o=(0,l.useNavigate)(),i=(0,s.PE)(),a=i.t,c=i.locale,p=t||function(){o("/launch-blocklet/install".concat(window.location.search))};return(0,h.jsxs)(g,{children:[(0,h.jsx)("div",{className:"app-content",children:(0,h.jsx)("div",{className:"agreement",children:(0,h.jsx)("div",{className:"agreement-content",children:(0,h.jsx)(d.Z,{blockletMeta:{data:n},locale:c,handleDescEle:r})})})}),(0,h.jsx)("div",{className:"button-container","data-cy":"agree-all",children:(0,h.jsx)(u.Z,{onContinue:p,description:(0,h.jsx)(x,{}),texts:{listenName:a("launchBlocklet.license"),buttonNext:a("launchBlocklet.next")}})})]})}v.propTypes={meta:a().object.isRequired,onClickNext:a().func,handleDescEle:a().node},v.defaultProps={onClickNext:null,handleDescEle:""};var g=c.Z.div(r||(r=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n flex: 1;\n .app-content {\n padding: 2px 24px 24px;\n "," {\n padding-top: 10px;\n }\n width: 100%;\n flex: 1;\n letter-spacing: normal;\n }\n .agreement {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n border: 1px solid ",";\n border-radius: 12px;\n "," {\n margin-top: 24px;\n }\n "," {\n margin-top: 16px;\n }\n .agreement-content {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n font-size: 14px;\n overflow-y: auto;\n "," {\n padding: 0 24px;\n }\n "," {\n padding: 0 16px;\n }\n &:after {\n display: block;\n content: '';\n height: 24px;\n }\n }\n }\n .button-container {\n padding-top: 24px;\n padding-bottom: 34px;\n "," {\n padding-right: 24px;\n margin-left: auto;\n }\n "," {\n padding-top: 0;\n padding-bottom: 16px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.palette.grey[100]}),(function(e){return e.theme.breakpoints.up("md")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.up("md")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.up("md")}),(function(e){return e.theme.breakpoints.down("md")}))},80378:function(e,n,t){"use strict";t.d(n,{Z:function(){return x}});var r=t(33028),o=t(59740),i=t(55898),a=t.n(i),l=t(62681),c=t(72333),s=t(6352),u=t.n(s),d=t(35432),p=t(58238),m=t(14491);var f=t(96266),h=["blocklet","style","size","ancestors"];function x(e){var n=e.blocklet,t=e.style,i=e.size,a=e.ancestors,s=(0,o.Z)(e,h),x=(0,p.h6)(),v=function(e){var n,t=e.blocklet,r=e.ancestors,o=void 0===r?[]:r,i=(0,p.h6)(),a=i.inService,l="?v=".concat(null===t||void 0===t||null===(n=t.meta)||void 0===n?void 0:n.version).concat((0,m.XN)(null===t||void 0===t?void 0:t.status)?"~":""),c=a?u()(m.zn,d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",l):u()(i.imgPrefix,"blocklet.png");if("registry"===t.source&&t.deployedFrom&&t.meta.logo)c=u()(t.deployedFrom,(0,m.lk)(t.meta.bundleDid,t.meta.logo),l);else{var s=window.env.apiPrefix||"/",f=o.concat(t),h=a?f.slice(1):f;c=u()(s,"/blocklet/logo-bundle".concat(h.map((function(e){return"/".concat(e.meta.did)})).join("")),l)}return{logoUrl:c,inService:a}}({blocklet:n,ancestors:a}),g=v.logoUrl,Z=v.inService,b=s.variant,y=Z?function(){}:function(e){e.target.src="".concat(x.imgPrefix,"/blocklet.png")},k=(0,f.jsx)("img",{src:g,onError:y,alt:n.meta.name,style:{width:i}});return n.meta.logo||(k=(0,f.jsx)(c.Z,{did:n.meta.did||"",responsive:!0})),(0,f.jsx)(l.Z,(0,r.Z)((0,r.Z)({variant:b||"square",style:Object.assign({backgroundColor:"transparent",width:i,height:i,borderRadius:10},t)},s),{},{children:k}))}x.propTypes={blocklet:a().object.isRequired,style:a().object,size:a().oneOfType([a().number,a().string]),ancestors:a().array},x.defaultProps={style:{},size:40,ancestors:[]}},74286:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(55898),o=t.n(r),i=t(39948),a=t(96266);function l(e){var n=e.depth;return(0,a.jsx)(i.Z,{ml:Math.max(2*(n-1),0),sx:{borderBottom:1,borderColor:"rgba(0,0,0,0.12)"}},"group-collapse-box")}l.propTypes={depth:o().number},l.defaultProps={depth:1}},61813:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var r=t(33028),o=t(32723),i=t(34795),a=t(96234),l=t(5057),c=t(55898),s=t.n(c),u=t(13128),d=t(44846),p=t(55372),m=t(11750),f=t(47020),h=t(20870),x=t(31089),v=t(71767),g=t(64886),Z=t(55152),b=t(68420),y=t(28726),k=t(88574),j=t(38242),C=t(58238),P=t(73545),E=t(14491),w=t(4651),R=t(17450),T=t(96266);function S(e){var n=e.defaultUrl,t=e.onCancel,c=e.onSuccess,s=e.onError,S=e.mode,_=e.handleText,U=(0,C.h6)().api,I=(0,P.T)().api,N=(0,l.useState)(!1),L=(0,a.Z)(N,2),D=L[0],O=L[1],B=(0,l.useState)(""),F=(0,a.Z)(B,2),z=F[0],q=F[1],A=(0,b.PE)().t,G={dist:{}},W=(0,l.useState)(n),M=(0,a.Z)(W,2),K=M[0],V=M[1],Y=(0,l.useState)(n?1:0),H=(0,a.Z)(Y,2),X=H[0],$=H[1],J=(0,l.useState)(G),Q=(0,a.Z)(J,2),ee=Q[0],ne=Q[1],te=(0,l.useState)(!1),re=(0,a.Z)(te,2),oe=re[0],ie=re[1],ae=(0,l.useState)({}),le=(0,a.Z)(ae,2),ce=le[0],se=le[1],ue="component"===S,de=!!ue||!n,pe=function(){var e=(0,i.Z)((0,o.Z)().mark((function e(){var n,t,r,i,a,l;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ne(G),q(null),O(!0),e.prev=3,n=decodeURIComponent(K.trim()),e.prev=5,new URL(n),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(5),new Error("Invalid URL");case 12:return e.next=14,U.getBlockletMetaFromUrl({input:{url:n}});case 14:t=e.sent,r=t.meta,i=t.inStore,a=t.registryUrl,ne(r),se({inStore:i,registryUrl:a,inputUrl:K.trim()}),e.next=28;break;case 22:e.prev=22,e.t1=e.catch(3),console.error(e.t1),l="Blocklet Install failed: ".concat((0,E.Z)(e.t1)),q(l),s(e.t1);case 28:return e.prev=28,O(!1),e.finish(28);case 31:case"end":return e.stop()}}),e,null,[[3,22,28,31],[5,9]])})));return function(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){n&&pe()}),[n]);var me=[{name:A("common.name"),value:(0,j.getDisplayName)({meta:ee},!0)},{name:A("common.version"),value:ee.version},{name:A("common.did"),value:(0,T.jsx)(R.Z,{did:ee.did})},{name:A("common.author"),value:(0,E.rq)(ee.author)},{name:A("blocklet.dist.downloadLink"),value:ee.dist.tarball}],fe=[{label:A("blocklet.fromUrl.step0"),body:(0,T.jsx)(m.Z,{component:"div",children:(0,T.jsx)(f.Z,{label:A("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:A("blocklet.fromUrl.description"),value:K,onChange:function(e){q(null),V(e.target.value)},disabled:D,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),pe(),$(1))}})}),cancel:A("common.cancel"),confirm:A("common.next"),onCancel:t,onConfirm:function(){pe(),$(1)}},{label:A("blocklet.fromUrl.step1"),body:D?(0,T.jsx)("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:(0,T.jsx)(d.Z,{})}):ee.did?(0,T.jsx)("div",{style:{paddingLeft:"10%"},children:me.map((function(e){return e.name===A("common.did")?(0,T.jsx)(g.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return A("common.did")},children:e.value},e.name):(0,T.jsx)(g.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)}))}):null,cancel:A(de?"common.pre":"common.cancel"),confirm:(null===_||void 0===_?void 0:_.confirm)||A("blocklet.fromUrl.confirm"),onCancel:function(){de?$((function(e){return e-1})):t()},onConfirm:function(){!function(){if(ue)return c((0,r.Z)({meta:ee},ce)),void t();O(!0),ie(!0)}()}}],he=fe[X];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(u.ZP,{title:(null===_||void 0===_?void 0:_.title)||A("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:function(){return he.onCancel()},showCloseButton:0===X,disableEscapeKeyDown:!0,open:!0,actions:(0,T.jsxs)(T.Fragment,{children:[he.cancel&&(0,T.jsx)(y.Z,{onClick:function(e){e.stopPropagation(),q(null),he.onCancel()},color:"inherit",children:he.cancel||A("common.cancel")}),(0,T.jsxs)(y.Z,{onClick:function(e){e.stopPropagation(),he.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:D||!K||z,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[D&&0===X&&(0,T.jsx)(d.Z,{size:16}),he.confirm]})]}),children:[de&&(0,T.jsx)(h.Z,{alternativeLabel:!0,activeStep:X,children:fe.map((function(e){var n=e.label;return(0,T.jsx)(x.Z,{children:(0,T.jsx)(v.Z,{children:n})},n)}))}),(0,T.jsx)(p.Z,{component:"div",style:{marginTop:24},children:he.body}),!!z&&(0,T.jsx)(k.Z,{type:"error",style:{width:"100%",marginTop:8},children:z})]}),ee&&oe&&(0,T.jsx)(Z.default,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:I.get,checkTimeout:3e5,onSuccess:function(){O(!1),ie(!1),c((0,r.Z)({meta:ee},ce)),t()},extraParams:{title:ee.title,wt:(0,w.iK)(ee),blockletMetaUrl:decodeURIComponent(K.trim())},messages:{title:A("setup.keyPair.title"),scan:A("setup.keyPair.scan"),confirm:A("setup.keyPair.confirm"),success:A("setup.keyPair.success")},onClose:function(){O(!1),ie(!1)}})]})}S.propTypes={defaultUrl:s().string,onCancel:s().func.isRequired,onSuccess:s().func.isRequired,onError:s().func,mode:s().oneOf(["install","component"]),handleText:s().object},S.defaultProps={onError:function(){},defaultUrl:"",mode:"install",handleText:{}}},32349:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(33028),o=t(59740),i=t(55898),a=t.n(i),l=t(22228),c=t(96266),s=["mode"];function u(e){var n=e.mode,t=(0,o.Z)(e,s);return"development"===n?(0,c.jsx)(l.Z,(0,r.Z)((0,r.Z)({type:"primary"},t),{},{children:"DEV"})):null}u.propTypes={mode:a().string.isRequired}},51233:function(e,n,t){"use strict";t.d(n,{Rw:function(){return d},fX:function(){return u},sf:function(){return p},ub:function(){return s}});var r=t(35432),o=t(44543),i=t.n(o),a=t(76811),l=t(32828),c=function(e,n){if(e.type===r.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error("".concat(n("router.validation.redirectUrlRequired")));if(!e.redirectCode)return new Error("redirect ".concat(n("router.validation.redirectCodeRequired")))}else if(e.type===r.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(n("router.validation.didRequired"));return null},s=function(e,n){return e?e.endsWith(r.DEFAULT_IP_DOMAIN_SUFFIX)?n("router.domain.validate.suffixTip",{suffix:r.DEFAULT_IP_DOMAIN_SUFFIX}):null:n("router.domain.validate.emptyTip")},u=function(e,n){var t=c(e,n);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(n("router.validation.pathPrefixTooLong",{length:150})):null:new Error(n("router.validation.pathPrefixCannotBeEmpty")))},d=function(e){var n=e.params,t=e.blocklets,r=e.blocklet,o=e.locale,c=void 0===o?"en":o;if(r){var s=(r.children||[]).find((function(e){return(0,l.default)(e.meta)&&i()(e.mountPoint,n.pathPrefix)}));if("gateway"!==r.meta.group&&"/"===n.pathPrefix&&(s="/"),s)return{zh:"\u6302\u8f7d\u70b9 ".concat(n.pathPrefix," \u5df2\u5b58\u5728\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6302\u8f7d\u70b9"),en:"The mount point ".concat(n.pathPrefix," already exist, please use another mount point")}[c]}var u=t.find((function(e){return e.meta.did===n.did}));if(!u)return"";var d=u.meta.interfaces.find((function(e){return"web"===e.type}));return d&&d.prefix!==a.BLOCKLET_DYNAMIC_PATH_PREFIX&&n.pathPrefix!==d.prefix?{zh:"\u8be5 blocklet \u53ea\u80fd\u6302\u8f7d\u5728 ".concat(d.prefix),en:"This blocklet can only be mounted on ".concat(d.prefix)}[c]:""},p=function(e){if(!e||"string"!==typeof e)return e;var n=e.trim();try{return(n=n.toLowerCase()).startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n}catch(t){return console.error("format domain failed",t),n}}},28641:function(e,n,t){"use strict";t.d(n,{Z:function(){return j}});var r=t(33028),o=t(32723),i=t(34795),a=t(96234),l=t(59740),c=t(5057),s=t(55898),u=t.n(s),d=t(39948),p=t(47020),m=t(44846),f=t(13727),h=t(56184),x=t(67680),v=t(35406),g=t(11875),Z=t(95890),b=t(96266),y=["label","disabled","required","initialValue","onChange","placeholder","style","onSubmit","secure","triggers","formatterBeforeSubmit"],k=function(e,n,t){return null===e&&n&&t?"******":e?n?"******":e:""};function j(e){var n=e.label,t=e.disabled,s=e.required,u=e.initialValue,j=e.onChange,C=e.placeholder,P=e.style,E=e.onSubmit,w=e.secure,R=e.triggers,T=e.formatterBeforeSubmit,S=(0,l.Z)(e,y),_=(0,c.useState)(!1),U=(0,a.Z)(_,2),I=U[0],N=U[1],L=(0,c.useState)(!1),D=(0,a.Z)(L,2),O=D[0],B=D[1],F=(0,c.useState)(w&&"__encrypted__"===u?null:u),z=(0,a.Z)(F,2),q=z[0],A=z[1],G=(0,c.useState)(q),W=(0,a.Z)(G,2),M=W[0],K=W[1],V=function(){var e=(0,i.Z)((0,o.Z)().mark((function e(){var n;return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!0),e.prev=1,e.next=4,E(M);case 4:!1===e.sent?K(q):(n=M,"function"===typeof T&&(n=T(M)),K(n),A(n)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),K(q);case 11:return e.prev=11,B(!1),N(!1),e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[1,8,11,15]])})));return function(){return e.apply(this,arguments)}}(),Y=function(e){K(e),j(e)},H=I?(0,b.jsx)(p.Z,(0,r.Z)({style:{flex:1},fullWidth:!0,value:M,onChange:function(e){Y(e.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:C,onKeyDown:function(e){"Enter"===e.key&&V()},disabled:t,type:w?"password":"text"},S)):(0,b.jsx)(d.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:k(M,w,u)});return(0,b.jsx)(g.Z,{className:"form",style:P,children:(0,b.jsxs)(d.Z,{className:"form-item",children:[(0,b.jsxs)(d.Z,{className:"form-item-label",children:[n,s&&(0,b.jsx)(v.Z,{})]}),(0,b.jsxs)(d.Z,{className:"form-item-body",children:[(0,b.jsx)(d.Z,{className:"form-item-input",children:H}),(0,b.jsx)(d.Z,{className:"form-item-action",children:I?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.Z,{"data-cy":"schema-form-item-confirm",onClick:V,disabled:t||O,size:"large",children:O?(0,b.jsx)(m.Z,{size:24}):(0,b.jsx)(h.Z,{})}),(0,b.jsx)(x.Z,{"data-cy":"schema-form-item-cancel",onClick:function(){K(q),N(!1)},disabled:t||O,size:"large",children:(0,b.jsx)(f.default,{})})]}):(0,b.jsx)(Z.Z,{triggers:R,onEnterEdit:function(){return N(!0)},disabled:t})})]})]})})}j.propTypes={style:u().object,onSubmit:u().func,onChange:u().func,label:u().string,initialValue:u().string,placeholder:u().string,required:u().bool,disabled:u().bool,secure:u().bool,triggers:u().array,formatterBeforeSubmit:u().func},j.defaultProps={style:{},onSubmit:function(){},onChange:function(){},label:"",initialValue:"",placeholder:"",required:!1,disabled:!1,secure:!1,triggers:[],formatterBeforeSubmit:null}},11875:function(e,n,t){"use strict";var r,o=t(71171),i=t(33518),a=t(39948);n.Z=(0,i.Z)(a.Z)(r||(r=(0,o.Z)(["\n width: 100%;\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n /* max-height: 60vh; */\n }\n\n .form-item {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n "," {\n flex-wrap: wrap;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n }\n\n .form-item-body {\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 4px;\n }\n\n .form-item-label {\n line-height: 1.2;\n font-size: 14px;\n color: #888;\n font-weight: bold;\n\n "," {\n text-align: left;\n width: auto;\n flex-grow: 1;\n }\n }\n\n .form-item-input {\n flex-grow: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &.slot {\n height: 40px;\n line-height: 40px;\n background: #f8f8f8;\n font-size: 16px;\n\n .MuiChip-root {\n margin-top: -4px;\n }\n }\n\n .MuiSelect-select {\n padding: 8px;\n }\n }\n\n .form-item-action {\n // width: 100px;\n text-align: left;\n margin-left: 12px;\n flex-shrink: 0;\n "," {\n width: auto;\n margin-left: 0px;\n }\n .MuiIconButton-root {\n padding: 8px;\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.down("md")}),(function(e){return e.theme.breakpoints.down("md")}))},95890:function(e,n,t){"use strict";t.d(n,{Z:function(){return g}});var r=t(96234),o=t(5057),i=t(55898),a=t.n(i),l=t(24558),c=t(67680),s=t(56556),u=t(49127),d=t(49390),p=t(37200),m=t(25228),f=t(24202),h=t(74490),x=t(1733),v=t(96266);function g(e){var n=e.triggers,t=e.onEnterEdit,i=e.disabled,a=o.useRef(null),g=o.useState(!1),Z=(0,r.Z)(g,2),b=Z[0],y=Z[1];return 0===n.length?(0,v.jsx)(c.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:i,size:"large",children:(0,v.jsx)(l.Z,{})}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(u.Z,{variant:"outlined",ref:a,"aria-label":"split button",children:[(0,v.jsx)(s.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:i,size:"large",children:(0,v.jsx)(l.Z,{})}),(0,v.jsx)(s.Z,{size:"small","aria-controls":b?"split-button-menu":void 0,"aria-expanded":b?"true":void 0,onClick:function(){y((function(e){return!e}))},children:(0,v.jsx)(d.Z,{})})]}),(0,v.jsx)(f.Z,{sx:{zIndex:9999},open:b,anchorEl:a.current,role:void 0,placement:"bottom-end",children:(0,v.jsx)(m.Z,{children:(0,v.jsx)(p.d,{onClickAway:function(e){a.current&&a.current.contains(e.target)||y(!1)},children:(0,v.jsx)(x.Z,{id:"split-button-menu",autoFocusItem:!0,children:n.map((function(e){return(0,v.jsx)(h.Z,{onClick:function(){return n=e.handler,y(!1),void n();var n},children:e.title},e.key)}))})})})})]})}g.propTypes={triggers:a().arrayOf(a().shape({key:a().string.isRequired,title:a().string.isRequired,handler:a().func.isRequired})),onEnterEdit:a().func.isRequired,disabled:a().bool.isRequired},g.defaultProps={triggers:[]}},35406:function(e,n,t){"use strict";var r,o=t(71171),i=t(33518).Z.span(r||(r=(0,o.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(function(e){return e.theme.palette.error.main}));n.Z=i},35918:function(e,n,t){"use strict";var r=t(44919),o=t(42876),i=t(27773),a=t(11997),l=t(93734),c=t(76667),s=t(39293),u=t(36903),d=t(3422),p=t(92273),m=t(72906),f=t(57201),h=t(49390),x=t(33225),v=t(30770);n.Z={Add:r.Z,Check:o.default,Delete:i.default,Edit:c.default,Clear:a.default,DetailPanel:p.default,Filter:s.Z,FirstPage:u.default,LastPage:d.default,NextPage:p.default,PreviousPage:m.default,Search:f.default,ResetSearch:a.default,SortArrow:h.Z,Export:l.default,ThirdStateCheck:x.default,ViewColumn:v.default}},74782:function(e,n,t){"use strict";var r,o=t(71171),i=t(33518).Z.div(r||(r=(0,o.Z)(["\n .MuiPaper-root {\n box-shadow: none !important;\n border: none !important;\n border-radius: 0 !important;\n background: transparent;\n }\n .MuiToolbar-root {\n background: transparent;\n padding-left: 0;\n display: none;\n }\n\n &.show-pagination {\n .MuiTablePagination-toolbar {\n display: flex;\n }\n }\n\n .MuiTableHead-root th {\n min-width: 100px;\n background: transparent;\n }\n\n .MuiTable-root {\n overflow-y: hidden;\n }\n .MuiTableRow-root {\n border: none !important;\n }\n\n .MuiTableCell-root {\n padding-right: 16px;\n &:last-of-type {\n padding-right: 0;\n }\n }\n\n /* @material-table/core@next \u517c\u5bb9 mui v5, \u4f46 pagination \u6837\u5f0f\u4f3c\u4e4e\u6709\u4e9b\u95ee\u9898, \u6682\u5730\u5b9a\u5236\u4e0b\u9762\u7684\u6837\u5f0f\u4fee\u590d, \u540e\u9762\u8003\u8651\u5f03\u7528 material-table */\n .MuiTablePagination-selectLabel,\n .MuiTablePagination-displayedRows {\n display: none;\n }\n .MuiTypography-caption {\n display: inline-block;\n }\n .MuiTablePagination-selectLabel + .MuiInputBase-root {\n margin-right: 8px;\n }\n"])));n.Z=i}}]);