@abtnode/blocklet-services 1.16.16-beta-d6c5ed65 → 1.16.16-beta-d11cb031
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +1 -1
- package/api/libs/connect/session.js +96 -82
- package/api/libs/connect/shared.js +33 -12
- package/api/libs/jwt.js +5 -3
- package/api/routes/federated.js +65 -12
- package/api/routes/oauth.js +134 -76
- package/api/routes/user.js +1 -0
- package/api/services/auth/connect/invite.js +10 -1
- package/api/services/auth/connect/login.js +0 -2
- package/api/services/auth/connect/receive-transfer-app-owner.js +2 -1
- package/api/services/auth/connect/switch-passport.js +5 -1
- package/api/services/auth/session.js +14 -2
- package/api/util/federated.js +97 -0
- package/build/asset-manifest.json +53 -53
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/{1480.36129849.chunk.js → 1480.88c590c2.chunk.js} +2 -2
- package/build/static/js/{1565.ad002b88.chunk.js → 1565.6df974b9.chunk.js} +2 -2
- package/build/static/js/{1760.71e0c151.chunk.js → 1760.70492184.chunk.js} +2 -2
- package/build/static/js/{2653.6f37e8a0.chunk.js → 2653.5dc29ed5.chunk.js} +2 -2
- package/build/static/js/2836.f4b10b64.chunk.js +2 -0
- package/build/static/js/{4042.3c8e0025.chunk.js → 2838.6fa46760.chunk.js} +3 -3
- package/build/static/js/{1660.9fb17942.chunk.js → 3025.7dc2fe04.chunk.js} +2 -2
- package/build/static/js/{4023.4be0c818.chunk.js → 4023.202dcd9a.chunk.js} +2 -2
- package/build/static/js/{4706.df5b600d.chunk.js → 4706.212c92c8.chunk.js} +3 -3
- package/build/static/js/4716.88f32cf2.chunk.js +2 -0
- package/build/static/js/{4802.b7fa8e82.chunk.js → 4802.3b60e453.chunk.js} +2 -2
- package/build/static/js/{5176.53f7f419.chunk.js → 5176.7e91bc3b.chunk.js} +2 -2
- package/build/static/js/{5628.aa14b1a7.chunk.js → 5628.e46ecc79.chunk.js} +2 -2
- package/build/static/js/{6380.2b96be29.chunk.js → 5673.ab67c509.chunk.js} +2 -2
- package/build/static/js/{6186.6462ea21.chunk.js → 6186.ebbdb4b8.chunk.js} +2 -2
- package/build/static/js/{6452.4226209b.chunk.js → 6452.143af37a.chunk.js} +2 -2
- package/build/static/js/{6629.785fe237.chunk.js → 6629.376863d2.chunk.js} +3 -3
- package/build/static/js/{6640.e453c619.chunk.js → 6640.a4431c82.chunk.js} +2 -2
- package/build/static/js/{6737.7fe9f13a.chunk.js → 6737.7d135225.chunk.js} +2 -2
- package/build/static/js/{6856.9aaf692c.chunk.js → 6856.e185e317.chunk.js} +2 -2
- package/build/static/js/{8706.3d16907a.chunk.js → 7367.60cb10e0.chunk.js} +2 -2
- package/build/static/js/{7465.999f0039.chunk.js → 7465.2bb961d7.chunk.js} +3 -3
- package/build/static/js/{9409.fe4a0af0.chunk.js → 9409.62a2aee0.chunk.js} +2 -2
- package/build/static/js/{9620.db1568ef.chunk.js → 9620.301493bc.chunk.js} +2 -2
- package/build/static/js/{9899.92626f0a.chunk.js → 9899.b8d8a5ca.chunk.js} +2 -2
- package/build/static/js/main.a58f939e.js +3 -0
- package/package.json +34 -34
- package/build/static/js/4716.17a45b6a.chunk.js +0 -2
- package/build/static/js/5662.522d3713.chunk.js +0 -2
- package/build/static/js/main.85d66eb2.js +0 -3
- /package/build/static/js/{4042.3c8e0025.chunk.js.LICENSE.txt → 2838.6fa46760.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4706.df5b600d.chunk.js.LICENSE.txt → 4706.212c92c8.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6629.785fe237.chunk.js.LICENSE.txt → 6629.376863d2.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7465.999f0039.chunk.js.LICENSE.txt → 7465.2bb961d7.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.85d66eb2.js.LICENSE.txt → main.a58f939e.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[1760],{75023:function(e,n,t){t.d(n,{NU:function(){return x},mc:function(){return v}});var r=t(32723),a=t(34795),o=t(96234),c=t(30969),s=t(17708),i=t(50576),u=t(30134),l=t(41395),p=t(59505),d=t(64864),f=t(37574),h=(0,c.createContext)({}),m=h.Provider;h.Consumer;function v(e){var n=e.children,t=(0,s.Z)("spaceGatewayForInstall",null),h=(0,o.Z)(t,2),v=h[0],x=h[1],y=(0,d.y0)(),k=y.blocklet,w=y.actions.refreshBlocklet,b=(0,c.useMemo)((function(){return(0,u.EJ)(k)}),[k]),g=(0,l.h6)().api,Z=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(n),e.next=3,E(n.endpoint);case 3:w();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.configBlocklet({input:{did:[k.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:n}]}});case 2:w();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){function e(){return(e=(0,a.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(v){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,u.nU)(v.endpoint,v.name);case 4:n=e.sent,t=(0,i.merge)(v,{name:n}),x(t);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),(0,f.jsx)(m,{value:{spaceGateway:v,deleteSpaceGateway:function(){x(null),w()},updateSpaceGateway:Z,storageEndpoint:b,settingStorageEndpoint:E},children:n})}function x(){return(0,c.useContext)(h)}v.defaultProps={}},5954:function(e,n,t){t.d(n,{cK:function(){return p},h6:function(){return d}});var r=t(30969),a=t(41395),o=t(20244),c=t(48952),s=t(90781),i=t(99042),u=t(37574),l=a.sy.Provider;a.sy.Consumer;function p(e){var n=e.children,t="".concat(o.WELLKNOWN_SERVICE_PATH_PREFIX,"/static/images"),r=window.env,a=r.serverDid,p=r.serverVersion,d=r.mode,f={imgPrefix:t,api:c.Z,restApi:i.Z,ws:{getWsClient:s.ZP,create:s.Ue,useSubscription:s.mU},type:"service",info:{did:a,version:p,mode:d}};return(0,u.jsx)(l,{value:{node:f},children:n})}function d(){return(0,r.useContext)(a.sy).node}},51760:function(e,n,t){t.r(n),t.d(n,{default:function(){return M}});var r,a,o,c=t(71171),s=t(33028),i=t(32723),u=t(34795),l=t(30969),p=t(30734),d=t(16380),f=t(19611),h=t.n(f),m=t(54470),v=t(38361),x=t(66629),y=t(43001),k=t(75255),w=t(26022),b=t(94308),g=t(99574),Z=t(19006),E=t(47650),P=t(20244),j=t(7017),C=t(59505),_=t(38507),L=t(64864),N=t(4485),S=d.Z.span(r||(r=(0,c.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(function(e){return e.theme.palette.error.main})),B=t(5954),I=t(75023),R=t(37574),O=(0,l.lazy)((function(){return Promise.all([t.e(5662),t.e(9409)]).then(t.bind(t,89409))})),A=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(4420)]).then(t.bind(t,91654))})),T=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(5662),t.e(7006),t.e(8143),t.e(6380),t.e(9657),t.e(5628)]).then(t.bind(t,45628))})),K=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(941)]).then(t.bind(t,11980))})),U=(0,l.lazy)((function(){return Promise.all([t.e(2686),t.e(6576)]).then(t.bind(t,26576))})),D=(0,l.lazy)((function(){return Promise.all([t.e(5662),t.e(5176)]).then(t.bind(t,5176))})),F=(0,l.lazy)((function(){return t.e(9102).then(t.bind(t,29102))}));function M(){var e,n,t,r=(0,k.Z)((function(e){return e.breakpoints.down("md")})),a=(0,w.PE)(),o=a.t,c=a.locale,d=(0,p.useNavigate)(),f=(0,L.y0)(),y=f.meta,M=f.blocklet,G=f.actions,H=f.loading,X=localStorage.getItem("blocklet-server-url"),$=(0,_.tX)("fromLauncher");(0,l.useEffect)((function(){G.refreshMeta(),G.refreshBlocklet({showError:!1}),(0,_.NU)()}),[]),(0,l.useEffect)((function(){G.refreshFuel({showError:!1})}),[null===M||void 0===M||null===(e=M.meta)||void 0===e?void 0:e.did]);var q="".concat(P.WELLKNOWN_SERVICE_PATH_PREFIX,"/setup"),V=[{key:"connect",name:o("setup.steps.connect"),path:h()(q,"connect")},{key:"access",name:o("setup.steps.access"),path:h()(q,"access")},{key:"domain",name:o("setup.steps.domain"),path:h()(q,"domain")},function(e){var n,t=null===e||void 0===e||null===(n=e.capabilities)||void 0===n?void 0:n.didSpace;if(!t)return null;if(t===C.BLOCKLET_APP_SPACE_ENDPOINTS.REQUIRED)return{key:"did-space",name:(0,R.jsxs)(R.Fragment,{children:[o("setup.steps.didSpace")," ",(0,R.jsx)(S,{})]}),path:h()(q,"did-space")};if(t===C.BLOCKLET_APP_SPACE_ENDPOINTS.OPTIONAL)return{key:"did-space",name:(0,R.jsx)(R.Fragment,{children:o("setup.steps.didSpace")}),path:h()(q,"did-space")};throw new Error("capabilities.didSpace cannot take the value ".concat(t))}(M),{key:"config",name:(0,R.jsxs)(R.Fragment,{children:[o("setup.steps.config")," ",(0,_.o2)(y)&&(0,R.jsx)(S,{})]}),path:h()(q,"config")},null!==y&&void 0!==y&&null!==(n=y.requirements)&&void 0!==n&&null!==(t=n.fuels)&&void 0!==t&&t.length?{key:"fuel",name:(0,R.jsxs)(R.Fragment,{children:[o("setup.steps.fuel")," ",(0,R.jsx)(S,{})]}),path:h()(q,"fuel")}:null].filter(Boolean),J=V.findIndex((function(e){return"".concat(_.Bq.replace(/\/$/,"")).concat(q,"/").concat(e.key)===window.location.pathname})),Y=h()(_.Bq,P.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),Q=function(){var e=(0,u.Z)((0,i.Z)().mark((function e(n){var t,r,a;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new URL(window.location.href),r=t.search,n?(a=V.findIndex((function(e){return e.key===n})),d(a>-1?"".concat(h()(q,V[a].key)).concat(r):"".concat(h()(q,"complete")).concat(r))):V[J+1]?d("".concat(h()(q,V[J+1].key)).concat(r)):d("".concat(h()(q,"complete")).concat(r)),e.next=4,G.refreshBlocklet();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ee=function(){d(-1)};function ne(e,n){return M?(0,R.jsx)(e,(0,s.Z)((0,s.Z)({blocklet:M},n),{},{onNext:Q,onPrevious:ee})):(0,R.jsx)(v.Z,{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:(0,R.jsx)(b.Z,{})})}var te=function(){window.open(X)},re=r?(0,R.jsx)(Z.Z,{onClick:te,width:"32",height:"32",style:{cursor:"pointer"}}):(0,R.jsx)(E.Z,{onClick:te,width:"128",height:"48",style:{marginTop:-1,cursor:"pointer"}}),ae=[{key:"install",name:o("launchBlocklet.steps.installApp"),path:h()(q,"install")},{key:"setup",name:o("setup.steps.launchApp"),children:V}],oe=[{key:"agreement",name:o("launchBlocklet.introduction"),path:h()(q,"agreement")}].concat(ae);return $&&(oe=[{key:"purchase-space",name:o("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:o("launchBlocklet.steps.prepareSpace")}].concat(ae)),(0,R.jsx)(z,{steps:oe,children:(0,R.jsx)(B.cK,{children:(0,R.jsxs)(I.mc,{children:[(0,R.jsx)(m.Global,{styles:W}),(0,R.jsx)(x.Z,{locale:c,loading:H,blockletMeta:(0,s.Z)((0,s.Z)({},y),{},{title:(0,j.getDisplayName)((0,s.Z)((0,s.Z)({},M),{},{meta:y}))}),navLogo:re,pcWidth:"80%",style:{height:"100%"},logoUrl:Y,useOfSkeleton:!1,headerEndAddons:(0,R.jsx)(g.Z,{SessionContext:N.B3,sessionManagerProps:{disableLogout:!0}}),launchingText:o("setup.title"),children:(0,R.jsxs)(p.Routes,{children:[(0,R.jsx)(p.Route,{path:"connect",element:(0,R.jsx)(O,{onNext:Q})}),(0,R.jsx)(p.Route,{path:"domain",element:ne(K)}),(0,R.jsx)(p.Route,{path:"did-space",element:ne(T)}),(0,R.jsx)(p.Route,{path:"config",element:ne(A)}),(0,R.jsx)(p.Route,{path:"access",element:ne(U)}),(0,R.jsx)(p.Route,{path:"fuel",element:ne(D)}),(0,R.jsx)(p.Route,{path:"complete",element:ne(F)}),(0,R.jsx)(p.Route,{path:"*",element:(0,R.jsx)(p.Navigate,{to:"connect".concat(window.location.search),replace:!0})})]})})]})})})}var W=(0,m.css)(a||(a=(0,c.Z)(["\n html,\n body,\n #root,\n #root > .wrapper {\n height: 100%;\n }\n"]))),z=(0,d.Z)(y.W)(o||(o=(0,c.Z)([""])))},41395:function(e,n,t){t.d(n,{h6:function(){return c},sy:function(){return o}});var r=t(33028),a=t(30969),o=(0,a.createContext)({});o.Provider,o.Consumer;function c(){var e=(0,a.useContext)(o).node;return(0,r.Z)((0,r.Z)({},e),{},{inService:"service"===e.type,inDaemon:"daemon"===e.type})}},99574:function(e,n,t){t.d(n,{Z:function(){return y}});var r,a=t(71171),o=t(33028),c=t(30969),s=t(16380),i=t(24974),u=t.n(i),l=t(94551),p=t(30734),d=t(81446),f=t(26681),h=t(26022),m=t(46513),v=t(91077),x=t(37574);function y(e){var n=e.SessionContext,t=e.extraItems,r=e.showLocale,a=e.showHelper,s=e.showSessionManager,i=e.sessionManagerProps,u=(0,c.useContext)(n).session,y=(0,c.useContext)(h.RD).locale,w=(0,p.useLocation)(),b={"/store":{endpoint:"https://store.blocklet.io"},"/dashboard":{path:"/conceptual/overview"},"/settings/router":{path:"/conceptual/server-architecture"}};return(0,x.jsxs)(k,{children:[t.map((function(e,n){return(0,c.cloneElement)(e,{key:n})})),r&&(0,x.jsx)(f.Z,{"data-cy":"locale-addon",icon:m.Z,size:23,showText:!1,className:"locale-addon"}),a&&(0,x.jsx)(l.Z,{onClick:function(){var e=w.pathname,n={};e.indexOf("/store")>-1?n=b["/store"]:b[e]&&(n=b[e]),window.open("".concat(n.endpoint||"https://developer.blocklet.io/docs","/").concat(y).concat(n.path||""),"_blank")},children:(0,x.jsx)(v.Z,{})}),s&&(0,x.jsx)(d.Z,(0,o.Z)((0,o.Z)({locale:y,session:u,size:24,showRole:!0},i),{},{showManageBlocklet:!1}))]})}y.propTypes={SessionContext:u().object.isRequired,webWalletUrl:u().string,extraItems:u().array,showLocale:u().bool,showSessionManager:u().bool,showHelper:u().bool,sessionManagerProps:u().object},y.defaultProps={webWalletUrl:"",extraItems:[],showLocale:!0,showSessionManager:!0,showHelper:!0,sessionManagerProps:{}};var k=s.Z.div(r||(r=(0,a.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n .MuiIconButton-root svg {\n width: 26px;\n height: 26px;\n }\n\n .user-addon {\n .user-avatar {\n width: 28px;\n border-radius: 14px;\n height: auto;\n }\n }\n\n "," {\n > button,\n > a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}))},54559:function(e,n,t){t.d(n,{hi:function(){return o},od:function(){return a.a}});var r=t(95803),a=t.n(r);a().defaults.timeout=1e4;var o=a().create()},30134:function(e,n,t){t.d(n,{EJ:function(){return g},Jf:function(){return b},LQ:function(){return f},Nb:function(){return h},Xv:function(){return p},mo:function(){return v},nD:function(){return d},nU:function(){return k},w2:function(){return x}});var r=t(32723),a=t(34795),o=t(92522),c=t.n(o),s=t(59505),i=t(50576),u=t(54559),l=t(19611);function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),a=t.at(-2);return l(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 l(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function h(e){return m.apply(this,arguments)}function m(){return(m=(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,c()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,u.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 v(e){var n;return(null===e||void 0===e||null===(n=e.find((function(e){return e.key===s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===n?void 0:n.value)||""}function x(e){return y.apply(this,arguments)}function y(){return(y=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o,s;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=l(n,"space/api/did/one-click-authorization/token"),e.next=6,u.hi.get(t,{timeout:5e3});case 6:return a=e.sent,o=a.status,s=a.data,e.abrupt("return",200===o&&(0,i.isObject)(s));case 12:return e.prev=12,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))).apply(this,arguments)}function k(e){return w.apply(this,arguments)}function w(){return(w=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,u.hi.head(n,{timeout:3e3});case 5:return t=e.sent,a=t.headers,o=a["x-space-name"],e.abrupt("return",o?decodeURIComponent(o):"");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 b(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return l(n,"/api/space/nft/display?spaceDid=".concat(t))}var g=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===s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null}}}]);
|
|
2
|
-
//# sourceMappingURL=1760.
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[1760],{75023:function(e,n,t){t.d(n,{NU:function(){return x},mc:function(){return v}});var r=t(32723),a=t(34795),o=t(96234),c=t(30969),s=t(17708),i=t(50576),u=t(30134),l=t(41395),p=t(59505),d=t(64864),f=t(37574),h=(0,c.createContext)({}),m=h.Provider;h.Consumer;function v(e){var n=e.children,t=(0,s.Z)("spaceGatewayForInstall",null),h=(0,o.Z)(t,2),v=h[0],x=h[1],y=(0,d.y0)(),k=y.blocklet,w=y.actions.refreshBlocklet,b=(0,c.useMemo)((function(){return(0,u.EJ)(k)}),[k]),g=(0,l.h6)().api,Z=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(n),e.next=3,E(n.endpoint);case 3:w();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){var e=(0,a.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g.configBlocklet({input:{did:[k.meta.did],configs:[{key:p.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:n}]}});case 2:w();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){function e(){return(e=(0,a.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(v){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,u.nU)(v.endpoint,v.name);case 4:n=e.sent,t=(0,i.merge)(v,{name:n}),x(t);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),(0,f.jsx)(m,{value:{spaceGateway:v,deleteSpaceGateway:function(){x(null),w()},updateSpaceGateway:Z,storageEndpoint:b,settingStorageEndpoint:E},children:n})}function x(){return(0,c.useContext)(h)}v.defaultProps={}},5954:function(e,n,t){t.d(n,{cK:function(){return p},h6:function(){return d}});var r=t(30969),a=t(41395),o=t(20244),c=t(48952),s=t(90781),i=t(99042),u=t(37574),l=a.sy.Provider;a.sy.Consumer;function p(e){var n=e.children,t="".concat(o.WELLKNOWN_SERVICE_PATH_PREFIX,"/static/images"),r=window.env,a=r.serverDid,p=r.serverVersion,d=r.mode,f={imgPrefix:t,api:c.Z,restApi:i.Z,ws:{getWsClient:s.ZP,create:s.Ue,useSubscription:s.mU},type:"service",info:{did:a,version:p,mode:d}};return(0,u.jsx)(l,{value:{node:f},children:n})}function d(){return(0,r.useContext)(a.sy).node}},51760:function(e,n,t){t.r(n),t.d(n,{default:function(){return M}});var r,a,o,c=t(71171),s=t(33028),i=t(32723),u=t(34795),l=t(30969),p=t(30734),d=t(16380),f=t(19611),h=t.n(f),m=t(54470),v=t(38361),x=t(66629),y=t(43001),k=t(75255),w=t(26022),b=t(94308),g=t(99574),Z=t(19006),E=t(47650),P=t(20244),j=t(7017),C=t(59505),_=t(38507),L=t(64864),N=t(4485),S=d.Z.span(r||(r=(0,c.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(function(e){return e.theme.palette.error.main})),B=t(5954),I=t(75023),R=t(37574),O=(0,l.lazy)((function(){return Promise.all([t.e(2836),t.e(9409)]).then(t.bind(t,89409))})),A=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(4319),t.e(4420)]).then(t.bind(t,91654))})),T=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(2836),t.e(7006),t.e(8143),t.e(5673),t.e(9657),t.e(5628)]).then(t.bind(t,45628))})),K=(0,l.lazy)((function(){return Promise.all([t.e(5683),t.e(7006),t.e(941)]).then(t.bind(t,11980))})),U=(0,l.lazy)((function(){return Promise.all([t.e(2686),t.e(6576)]).then(t.bind(t,26576))})),D=(0,l.lazy)((function(){return Promise.all([t.e(2836),t.e(5176)]).then(t.bind(t,5176))})),F=(0,l.lazy)((function(){return t.e(9102).then(t.bind(t,29102))}));function M(){var e,n,t,r=(0,k.Z)((function(e){return e.breakpoints.down("md")})),a=(0,w.PE)(),o=a.t,c=a.locale,d=(0,p.useNavigate)(),f=(0,L.y0)(),y=f.meta,M=f.blocklet,G=f.actions,H=f.loading,X=localStorage.getItem("blocklet-server-url"),$=(0,_.tX)("fromLauncher");(0,l.useEffect)((function(){G.refreshMeta(),G.refreshBlocklet({showError:!1}),(0,_.NU)()}),[]),(0,l.useEffect)((function(){G.refreshFuel({showError:!1})}),[null===M||void 0===M||null===(e=M.meta)||void 0===e?void 0:e.did]);var q="".concat(P.WELLKNOWN_SERVICE_PATH_PREFIX,"/setup"),V=[{key:"connect",name:o("setup.steps.connect"),path:h()(q,"connect")},{key:"access",name:o("setup.steps.access"),path:h()(q,"access")},{key:"domain",name:o("setup.steps.domain"),path:h()(q,"domain")},function(e){var n,t=null===e||void 0===e||null===(n=e.capabilities)||void 0===n?void 0:n.didSpace;if(!t)return null;if(t===C.BLOCKLET_APP_SPACE_ENDPOINTS.REQUIRED)return{key:"did-space",name:(0,R.jsxs)(R.Fragment,{children:[o("setup.steps.didSpace")," ",(0,R.jsx)(S,{})]}),path:h()(q,"did-space")};if(t===C.BLOCKLET_APP_SPACE_ENDPOINTS.OPTIONAL)return{key:"did-space",name:(0,R.jsx)(R.Fragment,{children:o("setup.steps.didSpace")}),path:h()(q,"did-space")};throw new Error("capabilities.didSpace cannot take the value ".concat(t))}(M),{key:"config",name:(0,R.jsxs)(R.Fragment,{children:[o("setup.steps.config")," ",(0,_.o2)(y)&&(0,R.jsx)(S,{})]}),path:h()(q,"config")},null!==y&&void 0!==y&&null!==(n=y.requirements)&&void 0!==n&&null!==(t=n.fuels)&&void 0!==t&&t.length?{key:"fuel",name:(0,R.jsxs)(R.Fragment,{children:[o("setup.steps.fuel")," ",(0,R.jsx)(S,{})]}),path:h()(q,"fuel")}:null].filter(Boolean),J=V.findIndex((function(e){return"".concat(_.Bq.replace(/\/$/,"")).concat(q,"/").concat(e.key)===window.location.pathname})),Y=h()(_.Bq,P.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),Q=function(){var e=(0,u.Z)((0,i.Z)().mark((function e(n){var t,r,a;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new URL(window.location.href),r=t.search,n?(a=V.findIndex((function(e){return e.key===n})),d(a>-1?"".concat(h()(q,V[a].key)).concat(r):"".concat(h()(q,"complete")).concat(r))):V[J+1]?d("".concat(h()(q,V[J+1].key)).concat(r)):d("".concat(h()(q,"complete")).concat(r)),e.next=4,G.refreshBlocklet();case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ee=function(){d(-1)};function ne(e,n){return M?(0,R.jsx)(e,(0,s.Z)((0,s.Z)({blocklet:M},n),{},{onNext:Q,onPrevious:ee})):(0,R.jsx)(v.Z,{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:(0,R.jsx)(b.Z,{})})}var te=function(){window.open(X)},re=r?(0,R.jsx)(Z.Z,{onClick:te,width:"32",height:"32",style:{cursor:"pointer"}}):(0,R.jsx)(E.Z,{onClick:te,width:"128",height:"48",style:{marginTop:-1,cursor:"pointer"}}),ae=[{key:"install",name:o("launchBlocklet.steps.installApp"),path:h()(q,"install")},{key:"setup",name:o("setup.steps.launchApp"),children:V}],oe=[{key:"agreement",name:o("launchBlocklet.introduction"),path:h()(q,"agreement")}].concat(ae);return $&&(oe=[{key:"purchase-space",name:o("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:o("launchBlocklet.steps.prepareSpace")}].concat(ae)),(0,R.jsx)(z,{steps:oe,children:(0,R.jsx)(B.cK,{children:(0,R.jsxs)(I.mc,{children:[(0,R.jsx)(m.Global,{styles:W}),(0,R.jsx)(x.Z,{locale:c,loading:H,blockletMeta:(0,s.Z)((0,s.Z)({},y),{},{title:(0,j.getDisplayName)((0,s.Z)((0,s.Z)({},M),{},{meta:y}))}),navLogo:re,pcWidth:"80%",style:{height:"100%"},logoUrl:Y,useOfSkeleton:!1,headerEndAddons:(0,R.jsx)(g.Z,{SessionContext:N.B3,sessionManagerProps:{disableLogout:!0}}),launchingText:o("setup.title"),children:(0,R.jsxs)(p.Routes,{children:[(0,R.jsx)(p.Route,{path:"connect",element:(0,R.jsx)(O,{onNext:Q})}),(0,R.jsx)(p.Route,{path:"domain",element:ne(K)}),(0,R.jsx)(p.Route,{path:"did-space",element:ne(T)}),(0,R.jsx)(p.Route,{path:"config",element:ne(A)}),(0,R.jsx)(p.Route,{path:"access",element:ne(U)}),(0,R.jsx)(p.Route,{path:"fuel",element:ne(D)}),(0,R.jsx)(p.Route,{path:"complete",element:ne(F)}),(0,R.jsx)(p.Route,{path:"*",element:(0,R.jsx)(p.Navigate,{to:"connect".concat(window.location.search),replace:!0})})]})})]})})})}var W=(0,m.css)(a||(a=(0,c.Z)(["\n html,\n body,\n #root,\n #root > .wrapper {\n height: 100%;\n }\n"]))),z=(0,d.Z)(y.W)(o||(o=(0,c.Z)([""])))},41395:function(e,n,t){t.d(n,{h6:function(){return c},sy:function(){return o}});var r=t(33028),a=t(30969),o=(0,a.createContext)({});o.Provider,o.Consumer;function c(){var e=(0,a.useContext)(o).node;return(0,r.Z)((0,r.Z)({},e),{},{inService:"service"===e.type,inDaemon:"daemon"===e.type})}},99574:function(e,n,t){t.d(n,{Z:function(){return y}});var r,a=t(71171),o=t(33028),c=t(30969),s=t(16380),i=t(24974),u=t.n(i),l=t(94551),p=t(30734),d=t(19230),f=t(26681),h=t(26022),m=t(46513),v=t(91077),x=t(37574);function y(e){var n=e.SessionContext,t=e.extraItems,r=e.showLocale,a=e.showHelper,s=e.showSessionManager,i=e.sessionManagerProps,u=(0,c.useContext)(n).session,y=(0,c.useContext)(h.RD).locale,w=(0,p.useLocation)(),b={"/store":{endpoint:"https://store.blocklet.io"},"/dashboard":{path:"/conceptual/overview"},"/settings/router":{path:"/conceptual/server-architecture"}};return(0,x.jsxs)(k,{children:[t.map((function(e,n){return(0,c.cloneElement)(e,{key:n})})),r&&(0,x.jsx)(f.Z,{"data-cy":"locale-addon",icon:m.Z,size:23,showText:!1,className:"locale-addon"}),a&&(0,x.jsx)(l.Z,{onClick:function(){var e=w.pathname,n={};e.indexOf("/store")>-1?n=b["/store"]:b[e]&&(n=b[e]),window.open("".concat(n.endpoint||"https://developer.blocklet.io/docs","/").concat(y).concat(n.path||""),"_blank")},children:(0,x.jsx)(v.Z,{})}),s&&(0,x.jsx)(d.Z,(0,o.Z)((0,o.Z)({locale:y,session:u,size:24,showRole:!0},i),{},{showManageBlocklet:!1}))]})}y.propTypes={SessionContext:u().object.isRequired,webWalletUrl:u().string,extraItems:u().array,showLocale:u().bool,showSessionManager:u().bool,showHelper:u().bool,sessionManagerProps:u().object},y.defaultProps={webWalletUrl:"",extraItems:[],showLocale:!0,showSessionManager:!0,showHelper:!0,sessionManagerProps:{}};var k=s.Z.div(r||(r=(0,a.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n .MuiIconButton-root svg {\n width: 26px;\n height: 26px;\n }\n\n .user-addon {\n .user-avatar {\n width: 28px;\n border-radius: 14px;\n height: auto;\n }\n }\n\n "," {\n > button,\n > a {\n padding-left: 8px;\n padding-right: 8px;\n }\n }\n"])),(function(e){return e.theme.breakpoints.down("md")}))},54559:function(e,n,t){t.d(n,{hi:function(){return o},od:function(){return a.a}});var r=t(95803),a=t.n(r);a().defaults.timeout=1e4;var o=a().create()},30134:function(e,n,t){t.d(n,{EJ:function(){return g},Jf:function(){return b},LQ:function(){return f},Nb:function(){return h},Xv:function(){return p},mo:function(){return v},nD:function(){return d},nU:function(){return k},w2:function(){return x}});var r=t(32723),a=t(34795),o=t(92522),c=t.n(o),s=t(59505),i=t(50576),u=t(54559),l=t(19611);function p(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/"),r=t.at(-4),a=t.at(-2);return l(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 l(n,"space",t)}function f(e){return e.replace(/\/$/,"").split("/").at(-4)}function h(e){return m.apply(this,arguments)}function m(){return(m=(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,c()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return e.next=5,u.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 v(e){var n;return(null===e||void 0===e||null===(n=e.find((function(e){return e.key===s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===n?void 0:n.value)||""}function x(e){return y.apply(this,arguments)}function y(){return(y=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o,s;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c()(n)){e.next=3;break}return e.abrupt("return",!1);case 3:return t=l(n,"space/api/did/one-click-authorization/token"),e.next=6,u.hi.get(t,{timeout:5e3});case 6:return a=e.sent,o=a.status,s=a.data,e.abrupt("return",200===o&&(0,i.isObject)(s));case 12:return e.prev=12,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))).apply(this,arguments)}function k(e){return w.apply(this,arguments)}function w(){return(w=(0,a.Z)((0,r.Z)().mark((function e(n){var t,a,o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c()(n)){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,u.hi.head(n,{timeout:3e3});case 5:return t=e.sent,a=t.headers,o=a["x-space-name"],e.abrupt("return",o?decodeURIComponent(o):"");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 b(e){var n=e.replace(/\/api\/space\/.+/,""),t=e.replace(/\/$/,"").split("/").at(-4);return l(n,"/api/space/nft/display?spaceDid=".concat(t))}var g=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===s.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===t?void 0:t.value)||null}}}]);
|
|
2
|
+
//# sourceMappingURL=1760.70492184.chunk.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[2653],{86384:function(e,n,t){n.h1=void 0;var r=t(59505);function i(e){return(null===e||void 0===e?void 0:e.connectedAccounts)||[]}function o(e){return i(e).find((function(e){return e.provider===r.LOGIN_PROVIDER.WALLET}))}n.h1=function(e){var n=o(e);return null===n||void 0===n?void 0:n.did}},80714:function(e,n,t){t.d(n,{Z:function(){return k}});var r,i=t(71171),o=t(32723),s=t(34795),a=t(33028),c=t(96234),l=t(59740),u=t(30969),d=t(24974),p=t.n(d),m=t(16380),f=t(94551),h=t(48082),v=t(2689),x=t(28722),g=t(93310),Z=t(86008),b=t(37574),j=["actions","size"],y=["icon","text","onClick","disabled"];function k(e){var n=e.actions,t=e.size,r=(0,l.Z)(e,j),i=(0,u.useState)(null),d=(0,c.Z)(i,2),p=d[0],m=d[1],k=Boolean(p),P=function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}m(null)};return(0,b.jsxs)(C,(0,a.Z)((0,a.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)(x.Z,{})}),(0,b.jsx)(h.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:p,keepMounted:!0,open:k,onClose:P,PaperProps:{},children:n.map((function(e,n){if("function"===typeof e)return e({close:P});var t=e.icon,r=e.text,i=e.onClick,c=e.disabled,d=void 0!==c&&c,p=(0,l.Z)(e,y);return(0,u.createElement)(v.Z,(0,a.Z)((0,a.Z)({},p),{},{disabled:d,dense:!0,onClick:function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i(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}))}))})]}))}k.propTypes={actions:p().array,size:p().oneOf(["small","medium","large"])},k.defaultProps={actions:[],size:"small"};var C=m.Z.div(r||(r=(0,i.Z)([""])))},73820:function(e,n,t){t.d(n,{Z:function(){return p}});var r=t(33028),i=t(59740),o=t(30969),s=t(24974),a=t.n(s),c=t(99631),l=t(26022),u=t(37574),d=["children"];function p(e){var n=e.children,t=(0,i.Z)(e,d),s=(0,o.useContext)(l.RD).t;return(0,u.jsx)(c.Z,(0,r.Z)((0,r.Z)({tip:s("common.copyTip"),copiedTip:s("common.copiedTip")},t),{},{children:n}))}p.propTypes={children:a().any.isRequired}},36558:function(e,n,t){var r=t(33028),i=t(59740),o=t(24974),s=t.n(o),a=t(86822),c=t(19638),l=t(23586),u=t(37574),d=["did","href","external","avatarProps"];function p(e){var n=e.did,t=e.href,o=e.external,s=(e.avatarProps,(0,i.Z)(e,d)),p=(0,u.jsx)(l.Z,(0,r.Z)({did:n},s));return t?o?(0,u.jsx)(c.Z,{target:"_blank",href:t,underline:"hover",children:p}):(0,u.jsx)(a.rU,{to:t,children:p}):p}p.propTypes={did:s().string.isRequired,to:s().string,href:s().string,avatarProps:s().object,external:s().bool},p.defaultProps={to:"",href:"",avatarProps:{},external:!1},n.Z=p},22572:function(e,n,t){t.d(n,{V:function(){return l},Z:function(){return c}});var r=t(33028),i=t(24974),o=t.n(i),s=t(77370),a=t(37574);function c(e){var n=e.permission,t=e.role,r=e.component,i=e.children,o=(0,s.T)().session,a=!0,c=[].concat(n).filter(Boolean),l=[].concat(t).filter(Boolean);if(c.length){var u=o.user&&o.user.permissions||[];a=c.some((function(e){return u.includes(e)}))}return a&&l.length&&(a=l.includes(o.user.role)),"function"===typeof r?r(a):"function"===typeof i?i(a):a&&(r||i)||null}function l(e,n,t){return function(i){return(0,a.jsx)(c,{permission:n,role:t,children:function(n){return(0,a.jsx)(e,(0,r.Z)((0,r.Z)({},i),{},{hasPermission:n}))}})}}c.propTypes={permission:o().oneOfType([o().string,o().arrayOf(o().string)]),role:o().oneOfType([o().string,o().arrayOf(o().string)]),component:o().oneOfType([o().func,o().node]),children:o().oneOfType([o().func,o().node])},c.defaultProps={permission:"",role:"",component:null,children:null}},92653:function(e,n,t){t.r(n),t.d(n,{default:function(){return xn}});var r,i=t(71171),o=t(33028),s=t(32723),a=t(34795),c=t(96234),l=t(30969),u=t(16380),d=t(76032),p=t.n(d),m=t(24974),f=t.n(m),h=t(65667),v=t.n(h),x=t(50496),g=t(6779),Z=t(38361),b=t(49884),j=t(88876),y=t(3715),k=t(13134),C=t(62399),P=t(26022),D=t(29996),w=t(90954),S=t(15378),R=t(52469),T=t(2291),I=t(16438),E=t(20244),N=t(35470),A=t(49476),z=t(94984),B=t(61472),_=t(36558),L=t(41395),O=t(80670),U=t(45008),W=t(22572),q=t(24891),F=t(94308),M=t(43207),V=t(33359),K=t(2689),J=t(39130),H=t(87006),X=t(51385),$=t(87535),G=t(23299),Y=t(73820),Q=t(37574);function ee(e){var n=e.teamDid,t=e.roles,r=e.onCancel,i=e.onSuccess,o=e.onError,u=e.endpoint,d=(0,L.h6)().api,p=(0,l.useState)(!1),m=(0,c.Z)(p,2),f=m[0],h=m[1],v=(0,l.useState)(""),g=(0,c.Z)(v,2),Z=g[0],b=g[1],j=(0,P.PE)(),y=j.t,k=j.locale,C=(0,l.useState)(0),w=(0,c.Z)(C,2),S=w[0],R=w[1],T=(0,l.useState)(""),I=(0,c.Z)(T,2),E=I[0],N=I[1],A=(0,l.useState)(""),z=(0,c.Z)(A,2),B=z[0],_=z[1],O=(0,l.useState)(""),U=(0,c.Z)(O,2),W=U[0],ee=U[1],ne=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(){var t,r,i,a;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B){e.next=3;break}return b(y("team.member.error.passportEmpty")),e.abrupt("return");case 3:return t=W.trim(),b(null),h(!0),e.prev=6,e.next=9,d.createMemberInvitation({input:{teamDid:n,role:B,remark:t}});case 9:r=e.sent,i=r.inviteInfo,N(i),R(1),e.next=20;break;case 15:e.prev=15,e.t0=e.catch(6),a=(0,q.Z)(e.t0),b(a),o(e.t0);case 20:return e.prev=20,h(!1),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[6,15,20,23]])})));return function(){return e.apply(this,arguments)}}(),re=[{body:(0,Q.jsxs)(V.Z,{component:"div",children:[(0,Q.jsxs)($.Z,{style:{width:"100%"},variant:"outlined",children:[(0,Q.jsx)(X.Z,{children:y("common.passport")}),(0,Q.jsx)(J.Z,{"data-cy":"invite-member-select-role",value:B,onChange:function(e){b(null),_(e.target.value)},fullWidth:!0,label:y("common.passport"),disabled:f,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),ne())},children:t.filter((function(e){return"owner"!==e.name})).map((function(e){return(0,Q.jsx)(K.Z,{value:e.name,"data-cy":"invite-member-select-option-".concat(e.name),children:(0,Q.jsx)("span",{children:e.title||e.name})},e.name)}))})]}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,Q.jsx)(H.Z,{label:y("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:W,onChange:function(e){b(null),ee(e.target.value)},disabled:f,"data-cy":"invite-member-input-remark"}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:y("common.cancel"),confirm:y("team.member.inviteDialog.createInviteLink"),onCancel:r,onConfirm:ne},{body:function(){var e=(0,q.ly)({inviteId:E.inviteId,endpoint:u});return(0,Q.jsxs)("div",{children:[(0,Q.jsx)(te,{children:y("team.member.inviteDialog.createSuccessTip",{expireDate:(0,q.B2)(E.expireDate,k)})}),(0,Q.jsx)("div",{style:{marginTop:"40px"}}),(0,Q.jsx)(Y.Z,{children:e})]})},confirm:y("common.confirm"),onConfirm:i}][S];return(0,Q.jsxs)(x.ZP,{title:y("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,Q.jsxs)(Q.Fragment,{children:[re.cancel&&(0,Q.jsx)(D.Z,{onClick:re.onCancel,color:"inherit",children:re.cancel}),(0,Q.jsxs)(D.Z,{onClick:re.onConfirm,color:"primary",disabled:f||!B,variant:"contained",autoFocus:!0,children:[f&&(0,Q.jsx)(F.Z,{size:16}),re.confirm]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:"function"===typeof re.body?re.body():re.body}),!!Z&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:Z})]})}ee.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,endpoint:f().string},ee.defaultProps={onError:function(){},roles:[],endpoint:""};var ne,te=u.Z.div(r||(r=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),re=t(17660),ie=t(46292),oe=t.n(ie),se=t(55662),ae=t(77370);function ce(e){var n=e.teamDid,t=e.onCancel,r=e.onSuccess,i=e.onError,o=e.endpoint,u=(0,L.h6)(),d=u.api,p=u.info,m=(0,l.useContext)(ae.B).api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),v=h[0],g=h[1],Z=(0,P.PE)(),b=Z.t,j=Z.locale,y=(0,l.useState)(""),k=(0,c.Z)(y,2),C=k[0],w=k[1],S=(0,l.useState)(!1),R=(0,c.Z)(S,2),T=R[0],I=R[1],E=(0,l.useState)(0),N=(0,c.Z)(E,2),A=N[0],z=N[1],B=(0,l.useState)(""),_=(0,c.Z)(B,2),O=_[0],U=_[1],W=(0,l.useState)(""),K=(0,c.Z)(W,2),J=K[0],X=K[1],$=!!oe()(p,"ownerNft.did"),ee=(0,re.default)((0,a.Z)((0,s.Z)().mark((function e(){var n,t;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!$){e.next=6;break}return e.next=3,d.getDelegationState();case 3:return n=e.sent,t=n.state,e.abrupt("return",t);case 6:return e.abrupt("return",{delegated:!0});case 7:case"end":return e.stop()}}),e)}))));if(ee.loading)return(0,Q.jsx)(x.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,Q.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,Q.jsx)(F.Z,{})})});if(ee.error)return(0,Q.jsx)(x.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:(0,q.Z)(ee.error)})});var ne=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(){var t,r,o;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(null),g(!0),e.prev=2,e.next=5,d.createTransferInvitation({input:{teamDid:n,role:"owner",remark:J.trim()}});case 5:t=e.sent,r=t.inviteInfo,U(r),z(ie.length-1),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(2),o=(0,q.Z)(e.t0),w(o),i(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,11,16,19]])})));return function(){return e.apply(this,arguments)}}(),te=function(){I(!1),z(0)},ie=[{body:(0,Q.jsxs)(V.Z,{component:"div",children:[(0,Q.jsxs)(G.Z,{type:"warning",children:[(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.progress")}),(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),(0,Q.jsx)(G.Z,{type:"warning",children:(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.revoke")})}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,Q.jsx)(H.Z,{label:b("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:J,onChange:function(e){w(null),X(e.target.value)},disabled:v,"data-cy":"transfer-node-input-remark"}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:b("common.cancel"),confirm:b("team.transferNode.inviteDialog.createInviteLink"),onCancel:t,onConfirm:$&&!oe()(ee,"value.delegated")?function(){I(!0),z(1)}:ne},{body:function(){return(0,Q.jsx)(se.default,{action:"delegate-transfer-nft",open:T,locale:j,checkFn:m.get,onClose:te,onSuccess:ne,checkTimeout:3e5,webWalletUrl:(0,q.yP)(p),extraParams:{targetDID:p.did},messages:{title:b("team.transferNode.delegateDialog.title"),scan:b("team.transferNode.delegateDialog.scan"),confirm:b("team.transferNode.delegateDialog.confirm"),success:b("team.transferNode.delegateDialog.success")},popup:!0})}},{body:function(){var e=(0,q.ly)({inviteId:O.inviteId,endpoint:o});return(0,Q.jsxs)("div",{children:[(0,Q.jsx)(ue,{children:b("team.transferNode.inviteDialog.createSuccessTip",{expireDate:(0,q.B2)(O.expireDate,j)})}),(0,Q.jsx)("div",{style:{marginTop:"40px"}}),(0,Q.jsx)(Y.Z,{children:e})]})},confirm:b("common.confirm"),onConfirm:r}],ce=ie[A];return(0,Q.jsxs)(x.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,Q.jsxs)(Q.Fragment,{children:[ce.cancel&&(0,Q.jsx)(D.Z,{onClick:ce.onCancel,color:"inherit",children:ce.cancel}),(0,Q.jsxs)(D.Z,{onClick:ce.onConfirm,color:"primary",disabled:v,variant:"contained",autoFocus:!0,children:[v&&(0,Q.jsx)(F.Z,{size:16}),ce.confirm]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:"function"===typeof ce.body?ce.body():ce.body}),!!C&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:C})]})}ce.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,endpoint:f().string},ce.defaultProps={onError:function(){},endpoint:""};var le,ue=u.Z.div(ne||(ne=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),de=t(59740),pe=t(59467),me=t(19865),fe=t(70177),he=t(48401),ve=t(83486),xe=t(28595),ge=t(59505),Ze=t(8479),be=t(88581),je=["passport","onDelete"];function ye(e){var n=e.passport,t=e.onDelete,r=(0,de.Z)(e,je);return(0,Q.jsxs)(Ce,(0,o.Z)((0,o.Z)({},r),{},{children:[n.title||n.name," ",!!t&&(0,Q.jsx)(be.default,{"data-cy":"delete-issuance",className:"delete",onClick:t})]}))}ye.propTypes={passport:f().object.isRequired,onDelete:f().func},ye.defaultProps={onDelete:null};var ke,Ce=u.Z.span(le||(le=(0,i.Z)(["\n display: inline-flex;\n padding: 2px 8px;\n background: ",";\n border-radius: 100vw;\n font-weight: 400;\n font-size: 12px;\n line-height: 22px;\n color: #fff;\n align-items: center;\n .delete {\n font-size: 1em;\n margin-left: 6px;\n cursor: pointer;\n }\n"])),(function(e){return e.theme.palette.primary.main}));function Pe(e){var n=e.issuances,t=e.teamDid,r=e.onRefresh,i=(0,L.h6)(),o=i.api,u=i.inService,d=(0,l.useContext)(P.RD),p=d.t,m=d.locale,f=(0,l.useState)(null),h=(0,c.Z)(f,2),v=h[0],x=h[1],g=(0,l.useState)(!1),b=(0,c.Z)(g,2),j=b[0],y=b[1],k=(0,O.DJ)().endpoint,C=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(n){var i;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.id,!j){e.next=3;break}return e.abrupt("return");case 3:return y(!0),e.prev=4,e.next=7,o.deletePassportIssuance({input:{teamDid:t,sessionId:i}});case 7:r(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),z.Z.error(e.t0.message);case 13:return e.prev=13,y(!1),x(null),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[4,10,13,17]])})));return function(n){return e.apply(this,arguments)}}(),D=function(){y(!1),x(null)},w=function(e){return k?(0,q._)({id:e.id,endpoint:k}):""};function S(e){var n=e.data;return(0,Q.jsxs)("div",{className:"issuance",children:[(0,Q.jsxs)(Z.Z,{display:"flex",justifyContent:"space-between",children:[(0,Q.jsx)(W.Z,{permission:u?"":"mutate_team",role:u?q.Wf:[],children:function(e){return e?(0,Q.jsx)(ye,{passport:{title:n.title,name:n.name},onDelete:function(){return x({title:p("team.passport.issuance.delete.title"),description:p("team.passport.issuance.delete.description",{link:w(n)}),confirm:p("common.delConfirm"),cancel:p("common.cancel"),onConfirm:function(){C(n)},onCancel:D})}}):(0,Q.jsx)(ye,{passport:{title:n.title,name:n.name}})}}),(0,Q.jsxs)("div",{style:{color:"#999"},children:[p("common.expires"),":\xa0",(0,q.B2)(n.expireDate,m)]})]}),(0,Q.jsx)(Z.Z,{mt:2,children:(0,Q.jsx)(Y.Z,{children:w(n)})})]})}return(0,Q.jsxs)(De,{children:[n.map((function(e){return(0,Q.jsx)(S,{data:e})})),v&&(0,Q.jsx)(Ze.Z,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]})}var De=u.Z.div(ke||(ke=(0,i.Z)(["\n .MuiTableHead-root {\n display: none;\n }\n .issuance {\n padding: 16px 0;\n border-bottom: 1px solid #f0f0f0;\n .MuiTypography-root {\n display: inline-block;\n width: 100%;\n background: #f3f3f3;\n border-radius: 4px;\n padding-top: 6px;\n padding-bottom: 6px;\n }\n }\n"])));Pe.propTypes={teamDid:f().string.isRequired,issuances:f().array,onRefresh:f().func},Pe.defaultProps={issuances:[],onRefresh:function(){}};var we,Se=t(68079),Re=t(70093),Te=t.n(Re),Ie=t(25177),Ee=t(86384),Ne=t(69936),Ae=t(78789),ze=t(83683),Be=t(36568);function _e(e){var n=e.teamDid,t=e.ownerDid,r=e.needReceive,i=e.roles,o=e.onCancel,u=e.onSuccess,d=e.onError,p=e.showOwnerPassport,m=(0,L.h6)().api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),v=h[0],g=h[1],Z=(0,l.useState)(""),b=(0,c.Z)(Z,2),j=b[0],y=b[1],k=(0,P.PE)().t,C=(0,l.useState)(""),w=(0,c.Z)(C,2),S=w[0],R=w[1],T=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(){var r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S){e.next=3;break}return y(k("team.member.error.passportEmpty")),e.abrupt("return");case 3:return y(null),g(!0),e.prev=5,e.next=8,m.createPassportIssuance({input:{teamDid:n,name:S,ownerDid:t}});case 8:u(),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(5),r=(0,q.Z)(e.t0),y(r),d(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[5,11,16,19]])})));return function(){return e.apply(this,arguments)}}();return(0,Q.jsxs)(x.ZP,{title:k("team.passport.issue"),fullWidth:!0,open:!0,onClick:function(e){return e.stopPropagation()},onClose:o,disableEscapeKeyDown:!0,PaperProps:{style:{minHeight:"auto"}},actions:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(D.Z,{onClick:o,color:"inherit",size:"small",children:k("common.cancel")}),(0,Q.jsxs)(D.Z,{onClick:T,color:"primary",size:"small",disabled:v||!S,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[v&&(0,Q.jsx)(F.Z,{size:16}),k(r?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:(0,Q.jsx)(V.Z,{component:"div",children:(0,Q.jsxs)($.Z,{style:{width:"100%"},variant:"outlined",children:[(0,Q.jsx)(X.Z,{children:k("common.passport")}),(0,Q.jsx)(J.Z,{"data-cy":"issue-passport-select-passport",value:S,onChange:function(e){y(null),R(e.target.value)},fullWidth:!0,label:k("common.passport"),disabled:v,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),T())},children:i.filter((function(e){return p||"owner"!==e.name})).map((function(e){return(0,Q.jsx)(K.Z,{value:e.name,"data-cy":"issue-passport-select-option-".concat(e.name),children:(0,Q.jsx)("span",{children:e.title||e.name})},e.name)}))})]})})}),!!j&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:j})]})}function Le(e){var n=e.action,t=e.passport,r=(0,P.PE)().t,i=(0,O.DJ)().roles.find((function(e){return e.name===t.role}));return(0,Q.jsxs)("div",{children:[(0,Q.jsx)("div",{children:r("enable"===n?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),i&&(0,Q.jsx)(Z.Z,{mt:3,fontWeight:"bold",children:r("team.member.passportPermissionTitle")}),i&&(0,Q.jsx)(Z.Z,{mt:1,children:i.description})]})}function Oe(e){var n,t=e.user,r=e.onCreate,i=e.createPassportSvg,u=(0,P.PE)().t,d=(0,ae.T)().session,p=(0,O.DJ)(),m=p.roles,f=p.teamDid,h=p.teamIssuerDid,v=p.refresh,x=p.enablePassportIssuance,b=p.trustedPassports,j=p.passportColor,k=p.blocklet,C=(0,U.y0)().appIdList,w=(0,L.h6)(),R=w.api,T=w.inService,I=(0,l.useState)(!1),N=(0,c.Z)(I,2),A=N[0],B=N[1],_=(0,l.useState)(null),F=(0,c.Z)(_,2),M=F[0],V=F[1],K=(0,l.useState)(!1),J=(0,c.Z)(K,2),H=J[0],X=J[1],$=(0,l.useState)(""),G=(0,c.Z)($,2),Y=G[0],ee=G[1],ne=[h].concat((0,Se.Z)(C||[])).filter(Boolean),te=(oe()(t,"passports")||[]).map((function(e){return(0,o.Z)((0,o.Z)({},e),{},{revoked:e.status===E.PASSPORT_STATUS.REVOKED})})),re=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(n){var r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A){e.next=2;break}return e.abrupt("return");case 2:return B(!0),e.prev=3,r=n.status===E.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport",e.next=7,R[r]({input:{teamDid:f,userDid:t.did,passportId:n.id}});case 7:v(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),z.Z.error((0,q.Z)(e.t0));case 13:return e.prev=13,B(!1),V(null),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[3,10,13,17]])})));return function(n){return e.apply(this,arguments)}}(),ie=function(e,n){return t.did===d.user.did&&d.user.passportId&&d.user.passportId===n.id?{revokable:!1,message:u("team.passport.shouldNotDeleteCurrent")}:e?f===n.issuer.id&&"owner"===n.name?{revokable:!1,message:u("team.passport.noPermission")}:{revokable:!0}:{revokable:!1,message:u("team.passport.noPermission")}},se=te.filter((function(e){return!Y||e.title.includes(Y)||e.name.includes(Y)}));return(0,Q.jsxs)(Ue,{children:[(0,Q.jsxs)(Be.Z,{children:[(0,Q.jsx)("div",{className:"left",children:(0,Q.jsx)(ze.Z,{placeholder:u("team.passport.search"),value:Y,onChange:function(e){return ee(e.target.value)}})}),(0,Q.jsx)("div",{className:"right",children:x&&!!t.approved&&(0,Q.jsx)(W.Z,{permission:T?"":"mutate_team",role:T?q.Wf:[],children:(0,Q.jsxs)(D.Z,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:function(){return X(!0)},children:[(0,Q.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}),u("team.passport.issue")]})})})]}),(0,Q.jsxs)(Z.Z,{children:[se.map((function(e){return(0,Q.jsx)(W.Z,{permission:T?"":"mutate_team",role:T?q.Wf:[],children:function(n){return(0,Q.jsxs)(Z.Z,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[(0,Q.jsxs)(Z.Z,{display:"flex",alignItems:"center",children:[(0,Q.jsx)("div",{dangerouslySetInnerHTML:{__html:i({title:e.title||e.name,issuer:e.issuer&&e.issuer.name,issuerDid:e.issuer&&e.issuer.id,ownerName:t.fullName,ownerDid:t.did,ownerAvatarUrl:t.avatar,revoked:e.revoked,preferredColor:j,width:"150px"})}}),(0,Q.jsxs)("div",{className:"body",children:[(0,Q.jsxs)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:[Te()(e.title),(0,Q.jsxs)("div",{className:"status-icons",children:[!!ne.length&&!ne.includes(e.issuer.id)&&(0,Q.jsx)(S.Z,{}),e.revoked&&(0,Q.jsx)(Ne.Z,{})]})]}),e.expirationDate&&(0,Q.jsx)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:u("team.passport.validUntil",{date:e.expirationDate})}),!!ne.length&&!ne.includes(e.issuer.id)&&(0,Q.jsxs)("div",{className:"tip",children:[e.issuer.id!==h&&!b.some((function(n){return n.issuerDid===e.issuer.id}))&&(0,Q.jsx)(g.Z,{title:u("team.passport.notTrustedIssuerTip"),children:(0,Q.jsx)(Z.Z,{component:Ie.Z,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),(0,Q.jsx)("span",{children:u("team.passport.issueBy",{name:e.issuer.name})})]})]})]}),(0,Q.jsx)(Z.Z,{children:ie(n,e).revokable?(0,Q.jsxs)(D.Z,{variant:"outlined",color:e.revoked?"primary":"secondary",onClick:function(){return(n=e).status===E.PASSPORT_STATUS.REVOKED?V({title:u("team.member.enablePassport"),description:(0,Q.jsx)(Le,{action:"enable",passport:n}),confirm:u("common.enable"),cancel:u("common.cancel"),onConfirm:function(){re(n)},onCancel:function(){B(!1),V(null)},color:"primary"}):V({title:u("team.member.revokePassport"),description:(0,Q.jsx)(Le,{action:"revoke",passport:n}),confirm:u("common.revoke"),cancel:u("common.cancel"),onConfirm:function(){re(n)},onCancel:function(){B(!1),V(null)}});var n},children:[e.revoked?(0,Q.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}):(0,Q.jsx)(Ne.Z,{style:{height:16,marginRight:4}}),e.revoked?u("common.enable"):u("common.revoke")]}):(0,Q.jsx)(g.Z,{title:ie(n,e).message,children:(0,Q.jsx)(Ie.Z,{style:{color:"#ddd"}})})})]})}},e.id)})),!se.length&&(0,Q.jsx)(Ae.Z,{children:u("common.empty")})]}),H&&(0,Q.jsx)(_e,{teamDid:f,ownerDid:t.did,needReceive:(0,Ee.h1)(t)===t.did,roles:m,onCancel:function(){return X(!1)},onSuccess:function(){r(),X(!1)},showOwnerPassport:k&&!(null!==(n=k.settings)&&void 0!==n&&n.owner)}),M&&(0,Q.jsx)(Ze.Z,{title:M.title,description:M.description,confirm:M.confirm,cancel:M.cancel,params:M.params,onConfirm:M.onConfirm,onCancel:M.onCancel,color:M.color})]})}_e.propTypes={teamDid:f().string.isRequired,ownerDid:f().string.isRequired,needReceive:f().bool,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,showOwnerPassport:f().bool},_e.defaultProps={onError:function(){},roles:[],showOwnerPassport:!1,needReceive:!0},Le.propTypes={action:f().string.isRequired,passport:f().object.isRequired},Le.defaultProps={},Oe.propTypes={user:f().object.isRequired,createPassportSvg:f().func.isRequired,onCreate:f().func},Oe.defaultProps={onCreate:function(){}};var Ue=u.Z.div(we||(we=(0,i.Z)(["\n .passport-item {\n .body {\n padding: 0;\n margin-left: 24px;\n margin-top: 0;\n }\n .title {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n color: #222222;\n }\n .tip {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-top: 6px;\n color: #bbb;\n }\n .status-icons {\n svg {\n fill: #bfbfbf;\n height: 1.2em;\n margin-left: 0.4em;\n }\n }\n .MuiButton-outlinedSecondary {\n color: #f16e6e;\n fill: #f16e6e;\n background: #fcf3f3;\n border: 0;\n &:hover {\n border: 0;\n }\n }\n }\n"]))),We=function(e,n){return e.nodeOwner&&e.nodeOwner.did===n},qe=function(e,n){return e&&e.did===n};function Fe(e){var n,t=e.user,r=e.onCancel,i=e.onSuccess,o=e.onError,u=e.children,d=(0,L.h6)(),p=d.api,m=d.info,f=d.inService,h=(0,ae.T)().session,v=(0,O.DJ)(),x=v.teamDid,g=v.refresh,Z=(0,P.PE)().t,b=(0,l.useState)(!1),j=(0,c.Z)(b,2),y=j[0],k=j[1],C=(0,l.useState)(!1),D=(0,c.Z)(C,2),w=D[0],S=D[1],R=function(){var e=(0,a.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.did,r=n.approved,!y){e.next=3;break}return e.abrupt("return");case 3:return k(!0),e.prev=4,e.next=7,p.updateUserApproval({input:{teamDid:x,user:{did:t,approved:!r}}});case 7:S(!1),i(),g(),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),z.Z.error((0,q.Z)(e.t0)),o();case 16:return e.prev=16,k(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,12,16,19]])})));return function(n){return e.apply(this,arguments)}}(),T={title:t.approved?Z("team.member.forbidLogin"):Z("team.member.allowLogin"),description:t.approved?Z("team.member.forbidLoginDescription"):Z("team.member.allowLoginDescription"),confirm:Z("common.confirm"),cancel:Z("common.cancel"),onConfirm:function(){R(t)},onCancel:function(){k(!1),S(!1),r()},color:t.approved?"error":"primary"};return(n=(f||m.nodeOwner&&!We(m,t.did))&&!qe(h.user,t.did))?(0,Q.jsxs)(Q.Fragment,{children:["function"===typeof u?u({can:n,open:function(){return S(!0)}}):u,w?(0,Q.jsx)(Ze.Z,{title:T.title,description:T.description,confirm:T.confirm,cancel:T.cancel,params:T.params,onConfirm:T.onConfirm,onCancel:T.onCancel,color:T.color}):null]}):null}Fe.propTypes={user:f().object,onSuccess:f().func,onCancel:f().func,onError:f().func,children:f().oneOfType([f().object,f().func])},Fe.defaultProps={user:{},onSuccess:function(){},onCancel:function(){},onError:function(){},children:null};var Me,Ve,Ke,Je=t(19611),He=t.n(Je);function Xe(e,n,t){if(e&&e.startsWith(E.USER_AVATAR_URL_PREFIX)){var r=window.env.apiPrefix||"/";return t?He()(r,E.USER_AVATAR_PATH_PREFIX,e.replace(E.USER_AVATAR_URL_PREFIX,"")):He()(r,E.USER_AVATAR_PATH_PREFIX,n,e.replace(E.USER_AVATAR_URL_PREFIX,""))}return e}function $e(e){return(e.user.connectedAccounts||[]).map((function(e){return(0,Q.jsx)(fe.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.provider,children:(0,Q.jsx)(_.Z,{did:e.did})},e.did)}))}f().string.isRequired,$e.propTypes={user:f().object.isRequired,onChangeUser:f().func},$e.defaultProps={onChangeUser:function(){}};var Ge="info";function Ye(e){var n=e.userDid,t=e.onCancel,r=e.initTab,i=e.createPassportSvg,o=(0,L.h6)(),c=o.api,u=o.ws.useSubscription,d=o.inService,p=(0,O.DJ)(),m=p.roles,f=p.teamDid,h=p.enablePassportIssuance,v=(0,P.PE)(),g=v.t,b=v.locale,j=(0,xe.Z)({user:null,issuances:null,tab:r||Ge}),y=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(n,t){var r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.doBatchQuery({getUser:{input:{teamDid:n,user:{did:t},options:{includeTags:!0}}},getPassportIssuances:{input:{teamDid:n,ownerDid:t}}});case 3:(r=e.sent).getUser.user&&(r.getUser.user.avatar=Xe(r.getUser.user.avatar,n,d),r.getUser.user.passports=(r.getUser.user.passports||[]).filter((function(e){return e.issuer}))),j.user=r.getUser.user||{},j.issuances=r.getPassportIssuances.list||[],e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),z.Z.error((0,q.Z)(e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n,t){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){f&&y(f,n)}),[n,f]);u(E.EVENTS.USER_UPDATED,(function(e){e.teamDid===f&&e.user&&e.user.did===n&&y(f,n)}),[n,f]),(0,l.useEffect)((function(){j.issuances&&!j.issuances.length&&"issuances"===j.tab&&(j.tab=Ge)}),[j.issuances]);var k=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(n){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y(f,n.did);case 2:j.tab=Ge;case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"},D={info:{label:g("common.basicInfo"),value:Ge,component:function(){var e,n;return(j.user?[{name:g("team.member.name"),value:j.user.fullName},{name:g("common.email"),value:j.user.email},{name:g("team.member.source"),value:(0,Q.jsx)(Z.Z,{display:"flex",alignItems:"center",children:C[(null===(e=j.user)||void 0===e?void 0:e.sourceProvider)||E.USER_TYPE.WALLET]||(null===(n=j.user)||void 0===n?void 0:n.sourceProvider)})},{name:g("team.member.allowLogin"),value:j.user.approved?g("common.yes"):g("common.no")},{name:g("team.member.lastLogin"),value:(0,q.B2)(j.user.lastLoginAt,b)},{name:g("team.member.lastLoginIp"),value:j.user.lastLoginIp||""},{name:g("common.createdAt"),value:(0,q.B2)(j.user.createdAt,b)},{name:g("common.remark"),value:j.user.remark||"--"},Array.isArray(j.user.tags)&&j.user.tags.length>0?{name:g("common.tags"),value:j.user.tags.map((function(e){return(0,Q.jsx)(B.Z,{style:{background:e.color,color:(0,R.getTextColor)(e.color),marginRight:4},children:e.title},e.id)}))}:null].filter(Boolean):[]).map((function(e){return e.name===g("common.did")?(0,Q.jsx)(fe.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return g("common.did")},children:e.value},e.name):(0,Q.jsx)(fe.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)}))}},oauth:{label:g("team.member.connectedAccounts"),value:"oauth",component:function(){return(0,Q.jsx)($e,{user:j.user,onChangeUser:k})}},passports:{label:g("common.passport"),value:"passports",component:function(){return(0,Q.jsx)(Oe,{user:j.user,teamDid:f,roles:m,createPassportSvg:i,onCreate:function(){y(f,n).then((function(){h&&j.issuances&&j.issuances.length&&(j.tab="issuances")}))},onRefresh:function(){y(f,n)}})}},issuances:{label:g("team.passport.issuance.pending"),value:"issuances",component:function(){return(0,Q.jsx)(Pe,{issuances:j.issuances||[],teamDid:f,onRefresh:function(){return y(f,n)}})}}},w=Object.values(D).map((function(e){return{label:e.label,value:e.value}})).filter((function(e){return"issuances"===e.value?h&&j.issuances&&!!j.issuances.length:"oauth"!==e.value||((null===(n=j.user)||void 0===n?void 0:n.connectedAccounts)||[]).find((function(e){var n;return e.provider!==((null===(n=j.user)||void 0===n?void 0:n.sourceProvider)||ge.LOGIN_PROVIDER.WALLET)}));var n})),S=D[j.tab]||D.info;return(0,Q.jsx)(x.ZP,{title:g("common.member"),onClose:t,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:j.user&&(0,Q.jsx)(W.Z,{permission:d?"":"mutate_team",role:d?q.Wf:[],children:(0,Q.jsx)(Fe,{user:j.user,children:function(e){var n=e.open;return(0,Q.jsxs)(tn,{onClick:n,children:[j.user.approved?(0,Q.jsx)(he.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):(0,Q.jsx)(ve.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),j.user.approved?g("team.member.forbidLogin"):g("team.member.allowLogin")]})}})}),children:(0,Q.jsxs)(en,{children:[!j.user&&(0,Q.jsx)(nn,{children:(0,Q.jsx)(F.Z,{})}),j.user&&(0,Q.jsxs)("div",{children:[(0,Q.jsxs)(Z.Z,{display:"flex",alignItems:"center",className:"info",children:[(0,Q.jsx)(pe.Z,{src:j.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),(0,Q.jsxs)(Z.Z,{children:[(0,Q.jsx)(Z.Z,{className:"name",children:j.user.fullName}),(0,Q.jsx)(Z.Z,{className:"did",mt:1,children:(0,Q.jsx)(_.Z,{did:j.user.did})})]})]}),(0,Q.jsx)(Z.Z,{mx:3,className:"tabs",children:(0,Q.jsx)(me.Z,{tabs:w,current:j.tab,onChange:function(e){j.tab=e},scrollButtons:"auto"})}),(0,Q.jsx)("div",{className:"body",children:(0,Q.jsx)(S.component,{})})]})]})})}Ye.propTypes={userDid:f().string.isRequired,onCancel:f().func.isRequired,createPassportSvg:f().func.isRequired,initTab:f().string},Ye.defaultProps={initTab:Ge};var Qe,en=u.Z.div(Me||(Me=(0,i.Z)(["\n .info {\n .name {\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n color: #222222;\n }\n }\n\n .tabs {\n margin-top: 24px;\n margin-left: 0;\n margin-right: 0;\n }\n\n .body {\n margin-top: 24px;\n }\n"]))),nn=u.Z.div(Ve||(Ve=(0,i.Z)(["\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 200px;\n"]))),tn=u.Z.div(Ke||(Ke=(0,i.Z)(["\n flex-shrink: 0;\n width: 100%;\n height: 64px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n color: #999;\n fill: #999;\n font-size: 16px;\n border-top: 1px solid #f0f0f0;\n position: sticky;\n bottom: 0;\n background: #fff;\n z-index: 10;\n"]))),rn=t(10814);function on(){var e=(0,L.h6)(),n=e.api,t=e.inService,r=(0,l.useContext)(P.RD),i=r.t,o=r.locale,u=(0,O.DJ)(),d=u.teamDid,p=u.invitations,m=u.refresh,f=u.endpoint,h=(0,l.useState)(null),v=(0,c.Z)(h,2),x=v[0],g=v[1],Z=(0,l.useState)(!1),b=(0,c.Z)(Z,2),j=b[0],y=b[1],k=function(){var e=(0,a.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:if(r=t.inviteId,!j){e.next=3;break}return e.abrupt("return");case 3:return y(!0),e.prev=4,e.next=7,n.deleteInvitation({input:{teamDid:d,inviteId:r}});case 7:return m(),e.next=10,(0,q._v)(800);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.error(e.t0);case 15:return e.prev=15,y(!1),g(null),e.finish(15);case 19:case"end":return e.stop()}}),e,null,[[4,12,15,19]])})));return function(n){return e.apply(this,arguments)}}(),C=function(){y(!1),g(null)},w=function(e){return f?(0,q.ly)({inviteId:e.inviteId,endpoint:f}):""},S=[{label:i("team.inviting.link"),name:"inviteId",options:{sort:!1,customBodyRenderLite:function(e){var n=p[e];return f?(0,Q.jsx)(Y.Z,{children:w(n)}):(0,Q.jsx)(F.Z,{size:16})}}},{label:i("common.role"),name:"role",widtn:70},{label:i("common.remark"),name:"remark",options:{customBodyRender:function(e){return e||"--"}}},{label:i("team.inviting.inviter"),name:"inviter.fullName",options:{sort:!1,customBodyRender:function(e,n){var t,r=n.rowIndex,i=p[r];return null===i||void 0===i||null===(t=i.inviter)||void 0===t?void 0:t.fullName}}},{label:i("common.expires"),name:"expireDate",options:{customBodyRender:function(e){return(0,Q.jsx)(I.Z,{value:e,locale:o})}}},{label:i("common.actions"),name:"",width:100,align:"center",options:{sort:!1,customBodyRenderLite:function(e){var n=p[e];return(0,Q.jsx)(W.Z,{permission:t?"":"mutate_team",role:t?q.Wf:[],children:(0,Q.jsxs)(D.Z,{onClick:function(){return g({title:i("team.inviting.delete.title"),description:i("team.inviting.delete.description",{link:w(n)}),confirm:i("common.delConfirm"),cancel:i("common.cancel"),onConfirm:function(){return k(n)},onCancel:C})},size:"small",color:"error",variant:"text",children:[(0,Q.jsx)(rn.default,{style:{fontSize:"1.2em"}}),i("common.delete")]})})}}}];return(0,Q.jsxs)(sn,{children:[p.length?(0,Q.jsx)(T.Z,{locale:o,data:(0,Se.Z)(p),columns:S,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):(0,Q.jsx)(Ae.Z,{children:i("common.empty")}),x&&(0,Q.jsx)(Ze.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}var sn=u.Z.div(Qe||(Qe=(0,i.Z)(["\n margin-top: -20px;\n"])));on.propTypes={},on.defaultProps={};var an,cn=t(93310),ln=t(86008),un=t(80714);function dn(e){var n=e.user,t=e.onIssuePassport,r=(0,O.DJ)(),i=r.teamDid,o=r.roles,s=(0,l.useContext)(P.RD).t,a=(0,l.useState)(!1),u=(0,c.Z)(a,2),d=u[0],p=u[1];return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(un.Z,{"data-cy":"member-actions",actions:[{icon:(0,Q.jsx)(y.Z,{fontSize:"small"}),text:s("team.passport.issue"),"data-cy":"action-issue-passport",onClick:function(e){e.stopPropagation(),p(!0)}},function(e){var t=e.close;return(0,Q.jsx)(Fe,{user:n,children:function(e){var r=e.open;return(0,Q.jsxs)(K.Z,{dense:!0,onClick:function(e){e.stopPropagation(),t(),r(e)},"data-cy":"action-toggle-block",children:[(0,Q.jsx)(cn.Z,{style:{minWidth:24,marginRight:8},children:n.approved?(0,Q.jsx)(he.Z,{}):(0,Q.jsx)(ve.Z,{})}),(0,Q.jsx)(ln.Z,{primary:n.approved?s("team.member.forbidLogin"):s("team.member.allowLogin")})]})}},"toggle-approval")}]}),d&&(0,Q.jsx)(_e,{teamDid:i,ownerDid:n.did,needReceive:(0,Ee.h1)(n)===n.did,roles:o,onCancel:function(){return p(!1)},onSuccess:function(){t(),p(!1)}})]})}dn.propTypes={user:f().object.isRequired,onIssuePassport:f().func},dn.defaultProps={onIssuePassport:function(){}};var pn="$all",mn="$none",fn=function(e,n){var t=e.find((function(e){return e.key===n}));return(null===t||void 0===t?void 0:t.value)||0},hn=function(e,n){var t=e.passports||[];return!!t.length&&!t.some((function(e){var t;return n.includes(null===(t=e.issuer)||void 0===t?void 0:t.id)}))};function vn(e){var n=e.user,t=(0,l.useContext)(P.RD).t,r=(0,Q.jsxs)("div",{className:"member-block",children:[(0,Q.jsxs)("div",{className:"member-avatar",children:[(0,Q.jsx)(C.Z,{src:"".concat(n.avatar,"?imageFilter=resize&w=48&h=48"),size:32,did:n.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!n.approved&&(0,Q.jsx)("did",{className:"badge-block"}),n.isFromExternal&&(0,Q.jsx)(g.Z,{title:t("team.passport.externalPassport"),children:(0,Q.jsx)(Z.Z,{ml:1,className:"icon",children:(0,Q.jsx)(S.Z,{})})})]}),(0,Q.jsxs)("div",{className:"member-meta",children:[(0,Q.jsx)("div",{className:"member-text",children:n.fullName}),Array.isArray(n.tags)&&n.tags.length>0&&(0,Q.jsx)("div",{className:"member-tags",children:n.tags.map((function(e){return(0,Q.jsx)(B.Z,{style:{background:e.color,color:(0,R.getTextColor)(e.color),marginRight:4},children:e.title},e.id)}))})]})]});return n.approved?r:(0,Q.jsx)(Z.Z,{display:"flex",alignItems:"center",children:(0,Q.jsx)(g.Z,{title:t("team.member.forbidLoginDescription"),children:r})})}function xn(e){var n=e.type,t=e.createPassportSvg,r=(0,U.y0)().appIdList,i=void 0===r?[]:r,u=(0,O.DJ)(),d=u.teamDid,m=u.invitations,f=u.teamIssuerDid,h=u.roles,g=u.refresh,C=u.enablePassportIssuance,S=u.endpoint,R=u.api,B=(0,L.h6)(),F=B.inService,M=B.ws.useSubscription,V=(0,l.useContext)(P.RD),K=V.t,J=V.locale,H=(0,l.useState)(!1),X=(0,c.Z)(H,2),$=X[0],G=X[1],Y=(0,l.useState)(!1),ne=(0,c.Z)(Y,2),te=ne[0],re=ne[1],ie=(0,l.useState)(!1),oe=(0,c.Z)(ie,2),se=oe[0],ae=oe[1],le=(0,l.useState)(!1),ue=(0,c.Z)(le,2),de=ue[0],pe=ue[1],me=(0,l.useState)(!1),fe=(0,c.Z)(me,2),he=fe[0],ve=fe[1],xe=(0,l.useState)([]),ge=(0,c.Z)(xe,2),Ze=ge[0],be=ge[1],je=(0,l.useState)(),ye=(0,c.Z)(je,2),ke=ye[0],Ce=ye[1],Pe=(0,l.useState)([]),De=(0,c.Z)(Pe,2),we=De[0],Se=De[1],Re=(0,N.Z)({did:void 0}),Te=(0,c.Z)(Re,1)[0],Ie="members-".concat(d),Ee=(0,T.$)(Ie),Ne=(0,l.useState)({role:pn,searchText:Ee.searchText||"",hideBlocked:!1,pageSize:Ee.rowsPerPage||10,page:Ee.page?Ee.page+1:1}),Ae=(0,c.Z)(Ne,2),ze=Ae[0],Be=Ae[1];(0,A.Z)((0,a.Z)((0,s.Z)().mark((function e(){var n,t;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Te.did){e.next=6;break}return e.next=3,R.getUser({did:Te.did});case 3:n=e.sent,(t=n.user)&&pe(t);case 6:case"end":return e.stop()}}),e)}))));var _e=(h||[]).map((function(e){return{name:e.name,title:e.title,num:fn(we,e.name)}}));_e.unshift({name:pn,title:"All Members",num:fn(we,pn)}),_e.push({name:mn,title:"Other",num:fn(we,mn)});var Le=function(){var e={includeTags:!0};ze.hideBlocked&&(e.approved=!0),e.role=ze.role,ze.searchText&&(e.search=ze.searchText),ve(!0),R.getUsers({query:e,paging:{page:ze.page,pageSize:ze.pageSize}}).then((function(e){ve(!1),(e.users||[]).forEach((function(e){e.isFromExternal=hn(e,p()(i)?[f]:i),e.avatar=Xe(e.avatar,d,F),e.passports=(e.passports||[]).filter((function(e){return e.issuer}))})),be(e.users||[]),Ce(e.paging.total)})).catch((function(e){ve(!1),z.Z.error(e.message)}))},Oe=function(){R.getUsersCountPerRole().then((function(e){Se(e.counts||[])})).catch((function(e){z.Z.error(e.message)}))},Ue=function(e){e.teamDid===d&&(Le(),Oe())};(0,l.useEffect)((function(){Le()}),["".concat(ze.hideBlocked,"-").concat(ze.role,"-").concat(ze.page,"-").concat(ze.pageSize,"-").concat(ze.searchText)]),(0,l.useEffect)((function(){Oe()}),[]),M(E.EVENTS.USER_UPDATED,Ue,[ze]),M(E.EVENTS.USER_ADDED,Ue,[ze]);var We=C,qe=[{label:K("common.name"),name:"fullName",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,Q.jsx)("div",{"data-cy":"member-name-".concat(n.fullName),children:(0,Q.jsx)(vn,{user:n})},n.did)}}},{label:K("common.address"),name:"did",options:{customBodyRender:function(e){return(0,Q.jsx)(_.Z,{size:14,responsive:!0,copyable:!1,did:e})}}},{label:K("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:function(e){return(0,Q.jsx)(I.Z,{value:e,locale:J})}}},{label:K("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:function(e){return e||"-"}}},{label:K("team.member.source"),name:"sourceProvider",options:{customBodyRenderLite:function(e){var n=Ze[e],t=n.sourceProvider||E.USER_TYPE.WALLET,r={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"}[t]||t;return n.sourceAppPid?"".concat(r," (").concat(K("team.member.federated"),")"):r}}},{label:K("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,Q.jsx)(W.Z,{permission:F?"":"mutate_team",role:F?q.Wf:[],children:(0,Q.jsx)(dn,{user:n,onIssuePassport:function(){return pe((0,o.Z)((0,o.Z)({},n),{},{initTab:"issuances"}))}})})}}}],Fe=[];We&&(Fe.push((0,Q.jsxs)(D.Z,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:function(){ae(!0)},children:[(0,Q.jsx)(w.Z,{style:{height:"1em",marginRight:4}}),K("common.inviting"),m.length?" (".concat(m.length,")"):""]}),(0,Q.jsx)(W.Z,{permission:F?"":"mutate_team",role:F?q.Wf:[],children:(0,Q.jsxs)(D.Z,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:function(){return G(!0)},children:[(0,Q.jsx)(y.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.invite")]})})),"server"===n&&Fe.push((0,Q.jsx)(W.Z,{role:"owner",children:(0,Q.jsxs)(D.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:function(){return re(!0)},children:[(0,Q.jsx)(k.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.transferNode.name")]})})));var Me={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick:function(e,n){var t=n.dataIndex,r=Ze[t];pe(r)},page:ze.page-1,rowsPerPage:ze.pageSize,count:ke,searchDebounceTime:600};return(0,Q.jsxs)(gn,{children:[(0,Q.jsxs)(Z.Z,{className:"main",display:"flex",children:[(0,Q.jsx)("div",{className:"left",children:(0,Q.jsx)("div",{className:"tabs",children:_e.map((function(e){return(0,Q.jsxs)("div",{className:"tab ".concat(ze.role===e.name?"active":""),onClick:function(){return n=e.name,void(he||Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{role:n,hideBlocked:!1,searchText:"",page:1})})));var n},children:[(0,Q.jsx)("span",{className:"text",children:e.title}),(0,Q.jsx)("span",{className:v()("badge",{"is-rect":e.num>999}),children:e.num})]},e.name)}))})}),(0,Q.jsx)("div",{className:"right",children:(0,Q.jsx)(T.Z,{className:"main-table",verticalKeyWidth:100,locale:J,durable:Ie,durableKeys:["page","rowsPerPage"],title:(0,Q.jsx)("div",{className:"table-toolbar-left",children:(0,Q.jsx)(b.Z,{control:(0,Q.jsx)(j.Z,{sx:{display:"flex !important"},disabled:he,color:"primary",checked:ze.hideBlocked,onChange:function(e){return n=e.target.checked,void Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{hideBlocked:n,page:1})}));var n}}),label:K("team.member.hideBlockedMember")})}),data:Ze,columns:qe,customButtons:Fe,options:Me,loading:he,onChange:function(e){var n=e.page,t=e.rowsPerPage,r=e.searchText;ze.pageSize!==t?Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{pageSize:t,page:1})})):ze.page!==n+1?Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{page:n+1})})):ze.searchText!==r&&Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{searchText:r,page:1})}))}})})]}),(0,Q.jsx)(x.ZP,{title:K("common.inviting"),onClose:function(){return ae(!1)},open:se,maxWidth:"lg",fullWidth:!0,children:(0,Q.jsx)(on,{})}),de&&(0,Q.jsx)(Ye,{onCancel:function(){return pe(null)},userDid:de.did,createPassportSvg:t,initTab:de.initTab}),$&&(0,Q.jsx)(ee,{teamDid:d,endpoint:S,roles:h,onCancel:function(){return G(!1)},onSuccess:function(){g(),G(!1)}}),te&&(0,Q.jsx)(ce,{teamDid:d,endpoint:S,roles:h,onCancel:function(){return re(!1)},onSuccess:function(){g(),re(!1)}})]})}vn.propTypes={user:f().object.isRequired};var gn=u.Z.div(an||(an=(0,i.Z)(["\n .main {\n .left {\n width: 168px;\n flex-shrink: 0;\n margin-right: 65px;\n .tabs {\n padding-top: 16px;\n .tab {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n transition: background 0.4s;\n\n width: 168px;\n height: 36px;\n border-radius: 8px;\n\n cursor: pointer;\n user-select: none;\n\n &:nth-child(n + 2) {\n margin-top: 24px;\n }\n\n &.active {\n background: #f2f2f2;\n }\n\n &:hover {\n background: #f2f2f2;\n }\n\n .text {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n\n color: #222222;\n }\n\n .badge {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n color: #fff;\n background: #666666;\n font-size: 10px;\n font-weight: 400;\n &.is-rect {\n width: auto;\n border-radius: 8px;\n padding: 0 4px;\n }\n }\n }\n }\n @media (max-width: ","px) {\n display: none;\n }\n }\n .right {\n flex-grow: 1;\n }\n }\n\n .member-block {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .member-avatar {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .member-meta {\n margin-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n }\n .badge-block {\n width: 14px;\n height: 14px;\n position: absolute;\n right: -4px;\n top: -4px;\n background: #ff5757;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n &::after {\n content: '';\n width: 6px;\n height: 2px;\n background: #fefefe;\n }\n }\n }\n\n .table-toolbar-left {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 7px 0;\n }\n"])),(function(e){return e.theme.breakpoints.values.md}));xn.propTypes={type:f().oneOf(["server","blocklet"]).isRequired,createPassportSvg:f().func.isRequired}},83683:function(e,n,t){var r,i=t(33028),o=t(59740),s=t(71171),a=t(16380),c=t(87006),l=t(90713),u=t(37574),d=["children"],p=(0,a.Z)((function(e){var n=e.children,t=(0,o.Z)(e,d);return(0,u.jsx)(c.Z,(0,i.Z)((0,i.Z)({},t),{},{id:"outlined-basic",variant:"outlined",InputProps:{startAdornment:(0,u.jsx)(l.default,{})},size:"small",children:n}))}))(r||(r=(0,s.Z)(["\n .MuiOutlinedInput-root {\n color: #999;\n &.MuiInputBase-adornedStart .MuiSvgIcon-root {\n color: #bfbfbf;\n }\n opacity: 1;\n border-radius: 36px;\n background: #f8f8f8;\n padding-left: 16px;\n input {\n padding-left: 8px;\n font-weight: bold;\n &::placeholder {\n opacity: 1;\n color: #bfbfbf;\n }\n padding-top: 8.5px;\n padding-bottom: 8.5px;\n }\n }\n\n .MuiOutlinedInput-notchedOutline,\n .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline,\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: #eee;\n border-width: 1px;\n }\n"])));n.Z=p},36568:function(e,n,t){var r,i=t(71171),o=t(16380).Z.div(r||(r=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 14px;\n .left,\n .right {\n }\n .right {\n display: flex;\n align-items: center;\n }\n .tabs {\n .MuiButton-root {\n border: none;\n color: #999;\n &.active {\n color: #222;\n }\n }\n }\n\n @media (max-width: 600px) {\n display: block;\n .right {\n margin-top: 12px;\n }\n }\n"])));n.Z=o}}]);
|
|
2
|
-
//# sourceMappingURL=2653.
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[2653],{86384:function(e,n,t){n.h1=void 0;var r=t(59505);function i(e){return(null===e||void 0===e?void 0:e.connectedAccounts)||[]}function o(e){return i(e).find((function(e){return e.provider===r.LOGIN_PROVIDER.WALLET}))}n.h1=function(e){var n=o(e);return null===n||void 0===n?void 0:n.did}},80714:function(e,n,t){t.d(n,{Z:function(){return k}});var r,i=t(71171),o=t(32723),s=t(34795),a=t(33028),c=t(96234),l=t(59740),u=t(30969),d=t(24974),p=t.n(d),m=t(16380),f=t(94551),h=t(48082),v=t(2689),x=t(28722),g=t(93310),Z=t(86008),b=t(37574),j=["actions","size"],y=["icon","text","onClick","disabled"];function k(e){var n=e.actions,t=e.size,r=(0,l.Z)(e,j),i=(0,u.useState)(null),d=(0,c.Z)(i,2),p=d[0],m=d[1],k=Boolean(p),P=function(e){try{e.stopPropagation(),e.preventDefault()}catch(n){}m(null)};return(0,b.jsxs)(C,(0,a.Z)((0,a.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)(x.Z,{})}),(0,b.jsx)(h.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:p,keepMounted:!0,open:k,onClose:P,PaperProps:{},children:n.map((function(e,n){if("function"===typeof e)return e({close:P});var t=e.icon,r=e.text,i=e.onClick,c=e.disabled,d=void 0!==c&&c,p=(0,l.Z)(e,y);return(0,u.createElement)(v.Z,(0,a.Z)((0,a.Z)({},p),{},{disabled:d,dense:!0,onClick:function(){var e=(0,s.Z)((0,o.Z)().mark((function e(n){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i(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}))}))})]}))}k.propTypes={actions:p().array,size:p().oneOf(["small","medium","large"])},k.defaultProps={actions:[],size:"small"};var C=m.Z.div(r||(r=(0,i.Z)([""])))},73820:function(e,n,t){t.d(n,{Z:function(){return p}});var r=t(33028),i=t(59740),o=t(30969),s=t(24974),a=t.n(s),c=t(99631),l=t(26022),u=t(37574),d=["children"];function p(e){var n=e.children,t=(0,i.Z)(e,d),s=(0,o.useContext)(l.RD).t;return(0,u.jsx)(c.Z,(0,r.Z)((0,r.Z)({tip:s("common.copyTip"),copiedTip:s("common.copiedTip")},t),{},{children:n}))}p.propTypes={children:a().any.isRequired}},36558:function(e,n,t){var r=t(33028),i=t(59740),o=t(24974),s=t.n(o),a=t(86822),c=t(19638),l=t(23586),u=t(37574),d=["did","href","external","avatarProps"];function p(e){var n=e.did,t=e.href,o=e.external,s=(e.avatarProps,(0,i.Z)(e,d)),p=(0,u.jsx)(l.Z,(0,r.Z)({did:n},s));return t?o?(0,u.jsx)(c.Z,{target:"_blank",href:t,underline:"hover",children:p}):(0,u.jsx)(a.rU,{to:t,children:p}):p}p.propTypes={did:s().string.isRequired,to:s().string,href:s().string,avatarProps:s().object,external:s().bool},p.defaultProps={to:"",href:"",avatarProps:{},external:!1},n.Z=p},22572:function(e,n,t){t.d(n,{V:function(){return l},Z:function(){return c}});var r=t(33028),i=t(24974),o=t.n(i),s=t(77370),a=t(37574);function c(e){var n=e.permission,t=e.role,r=e.component,i=e.children,o=(0,s.T)().session,a=!0,c=[].concat(n).filter(Boolean),l=[].concat(t).filter(Boolean);if(c.length){var u=o.user&&o.user.permissions||[];a=c.some((function(e){return u.includes(e)}))}return a&&l.length&&(a=l.includes(o.user.role)),"function"===typeof r?r(a):"function"===typeof i?i(a):a&&(r||i)||null}function l(e,n,t){return function(i){return(0,a.jsx)(c,{permission:n,role:t,children:function(n){return(0,a.jsx)(e,(0,r.Z)((0,r.Z)({},i),{},{hasPermission:n}))}})}}c.propTypes={permission:o().oneOfType([o().string,o().arrayOf(o().string)]),role:o().oneOfType([o().string,o().arrayOf(o().string)]),component:o().oneOfType([o().func,o().node]),children:o().oneOfType([o().func,o().node])},c.defaultProps={permission:"",role:"",component:null,children:null}},92653:function(e,n,t){t.r(n),t.d(n,{default:function(){return xn}});var r,i=t(71171),o=t(33028),s=t(32723),a=t(34795),c=t(96234),l=t(30969),u=t(16380),d=t(76032),p=t.n(d),m=t(24974),f=t.n(m),h=t(65667),v=t.n(h),x=t(50496),g=t(6779),Z=t(38361),b=t(49884),j=t(88876),y=t(3715),k=t(13134),C=t(62399),P=t(26022),D=t(29996),w=t(90954),S=t(15378),R=t(52469),T=t(2291),I=t(16438),E=t(20244),N=t(35470),A=t(49476),z=t(94984),B=t(61472),_=t(36558),L=t(41395),O=t(80670),U=t(45008),W=t(22572),q=t(24891),F=t(94308),M=t(43207),V=t(33359),K=t(2689),J=t(39130),H=t(87006),X=t(51385),$=t(87535),G=t(23299),Y=t(73820),Q=t(37574);function ee(e){var n=e.teamDid,t=e.roles,r=e.onCancel,i=e.onSuccess,o=e.onError,u=e.endpoint,d=(0,L.h6)().api,p=(0,l.useState)(!1),m=(0,c.Z)(p,2),f=m[0],h=m[1],v=(0,l.useState)(""),g=(0,c.Z)(v,2),Z=g[0],b=g[1],j=(0,P.PE)(),y=j.t,k=j.locale,C=(0,l.useState)(0),w=(0,c.Z)(C,2),S=w[0],R=w[1],T=(0,l.useState)(""),I=(0,c.Z)(T,2),E=I[0],N=I[1],A=(0,l.useState)(""),z=(0,c.Z)(A,2),B=z[0],_=z[1],O=(0,l.useState)(""),U=(0,c.Z)(O,2),W=U[0],ee=U[1],ne=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(){var t,r,i,a;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B){e.next=3;break}return b(y("team.member.error.passportEmpty")),e.abrupt("return");case 3:return t=W.trim(),b(null),h(!0),e.prev=6,e.next=9,d.createMemberInvitation({input:{teamDid:n,role:B,remark:t}});case 9:r=e.sent,i=r.inviteInfo,N(i),R(1),e.next=20;break;case 15:e.prev=15,e.t0=e.catch(6),a=(0,q.Z)(e.t0),b(a),o(e.t0);case 20:return e.prev=20,h(!1),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[6,15,20,23]])})));return function(){return e.apply(this,arguments)}}(),re=[{body:(0,Q.jsxs)(V.Z,{component:"div",children:[(0,Q.jsxs)($.Z,{style:{width:"100%"},variant:"outlined",children:[(0,Q.jsx)(X.Z,{children:y("common.passport")}),(0,Q.jsx)(J.Z,{"data-cy":"invite-member-select-role",value:B,onChange:function(e){b(null),_(e.target.value)},fullWidth:!0,label:y("common.passport"),disabled:f,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),ne())},children:t.filter((function(e){return"owner"!==e.name})).map((function(e){return(0,Q.jsx)(K.Z,{value:e.name,"data-cy":"invite-member-select-option-".concat(e.name),children:(0,Q.jsx)("span",{children:e.title||e.name})},e.name)}))})]}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,Q.jsx)(H.Z,{label:y("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:W,onChange:function(e){b(null),ee(e.target.value)},disabled:f,"data-cy":"invite-member-input-remark"}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:y("common.cancel"),confirm:y("team.member.inviteDialog.createInviteLink"),onCancel:r,onConfirm:ne},{body:function(){var e=(0,q.ly)({inviteId:E.inviteId,endpoint:u});return(0,Q.jsxs)("div",{children:[(0,Q.jsx)(te,{children:y("team.member.inviteDialog.createSuccessTip",{expireDate:(0,q.B2)(E.expireDate,k)})}),(0,Q.jsx)("div",{style:{marginTop:"40px"}}),(0,Q.jsx)(Y.Z,{children:e})]})},confirm:y("common.confirm"),onConfirm:i}][S];return(0,Q.jsxs)(x.ZP,{title:y("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,Q.jsxs)(Q.Fragment,{children:[re.cancel&&(0,Q.jsx)(D.Z,{onClick:re.onCancel,color:"inherit",children:re.cancel}),(0,Q.jsxs)(D.Z,{onClick:re.onConfirm,color:"primary",disabled:f||!B,variant:"contained",autoFocus:!0,children:[f&&(0,Q.jsx)(F.Z,{size:16}),re.confirm]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:"function"===typeof re.body?re.body():re.body}),!!Z&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:Z})]})}ee.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,endpoint:f().string},ee.defaultProps={onError:function(){},roles:[],endpoint:""};var ne,te=u.Z.div(r||(r=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),re=t(17660),ie=t(46292),oe=t.n(ie),se=t(72836),ae=t(77370);function ce(e){var n=e.teamDid,t=e.onCancel,r=e.onSuccess,i=e.onError,o=e.endpoint,u=(0,L.h6)(),d=u.api,p=u.info,m=(0,l.useContext)(ae.B).api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),v=h[0],g=h[1],Z=(0,P.PE)(),b=Z.t,j=Z.locale,y=(0,l.useState)(""),k=(0,c.Z)(y,2),C=k[0],w=k[1],S=(0,l.useState)(!1),R=(0,c.Z)(S,2),T=R[0],I=R[1],E=(0,l.useState)(0),N=(0,c.Z)(E,2),A=N[0],z=N[1],B=(0,l.useState)(""),_=(0,c.Z)(B,2),O=_[0],U=_[1],W=(0,l.useState)(""),K=(0,c.Z)(W,2),J=K[0],X=K[1],$=!!oe()(p,"ownerNft.did"),ee=(0,re.default)((0,a.Z)((0,s.Z)().mark((function e(){var n,t;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!$){e.next=6;break}return e.next=3,d.getDelegationState();case 3:return n=e.sent,t=n.state,e.abrupt("return",t);case 6:return e.abrupt("return",{delegated:!0});case 7:case"end":return e.stop()}}),e)}))));if(ee.loading)return(0,Q.jsx)(x.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,Q.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,Q.jsx)(F.Z,{})})});if(ee.error)return(0,Q.jsx)(x.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:t,children:(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:(0,q.Z)(ee.error)})});var ne=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(){var t,r,o;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(null),g(!0),e.prev=2,e.next=5,d.createTransferInvitation({input:{teamDid:n,role:"owner",remark:J.trim()}});case 5:t=e.sent,r=t.inviteInfo,U(r),z(ie.length-1),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(2),o=(0,q.Z)(e.t0),w(o),i(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,11,16,19]])})));return function(){return e.apply(this,arguments)}}(),te=function(){I(!1),z(0)},ie=[{body:(0,Q.jsxs)(V.Z,{component:"div",children:[(0,Q.jsxs)(G.Z,{type:"warning",children:[(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.progress")}),(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),(0,Q.jsx)(G.Z,{type:"warning",children:(0,Q.jsx)(V.Z,{children:b("team.transferNode.inviteDialog.tips.revoke")})}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}}),(0,Q.jsx)(H.Z,{label:b("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:J,onChange:function(e){w(null),X(e.target.value)},disabled:v,"data-cy":"transfer-node-input-remark"}),(0,Q.jsx)("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:b("common.cancel"),confirm:b("team.transferNode.inviteDialog.createInviteLink"),onCancel:t,onConfirm:$&&!oe()(ee,"value.delegated")?function(){I(!0),z(1)}:ne},{body:function(){return(0,Q.jsx)(se.default,{action:"delegate-transfer-nft",open:T,locale:j,checkFn:m.get,onClose:te,onSuccess:ne,checkTimeout:3e5,webWalletUrl:(0,q.yP)(p),extraParams:{targetDID:p.did},messages:{title:b("team.transferNode.delegateDialog.title"),scan:b("team.transferNode.delegateDialog.scan"),confirm:b("team.transferNode.delegateDialog.confirm"),success:b("team.transferNode.delegateDialog.success")},popup:!0})}},{body:function(){var e=(0,q.ly)({inviteId:O.inviteId,endpoint:o});return(0,Q.jsxs)("div",{children:[(0,Q.jsx)(ue,{children:b("team.transferNode.inviteDialog.createSuccessTip",{expireDate:(0,q.B2)(O.expireDate,j)})}),(0,Q.jsx)("div",{style:{marginTop:"40px"}}),(0,Q.jsx)(Y.Z,{children:e})]})},confirm:b("common.confirm"),onConfirm:r}],ce=ie[A];return(0,Q.jsxs)(x.ZP,{title:b("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,Q.jsxs)(Q.Fragment,{children:[ce.cancel&&(0,Q.jsx)(D.Z,{onClick:ce.onCancel,color:"inherit",children:ce.cancel}),(0,Q.jsxs)(D.Z,{onClick:ce.onConfirm,color:"primary",disabled:v,variant:"contained",autoFocus:!0,children:[v&&(0,Q.jsx)(F.Z,{size:16}),ce.confirm]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:"function"===typeof ce.body?ce.body():ce.body}),!!C&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:C})]})}ce.propTypes={teamDid:f().string.isRequired,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,endpoint:f().string},ce.defaultProps={onError:function(){},endpoint:""};var le,ue=u.Z.div(ne||(ne=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n"]))),de=t(59740),pe=t(59467),me=t(19865),fe=t(70177),he=t(48401),ve=t(83486),xe=t(28595),ge=t(59505),Ze=t(8479),be=t(88581),je=["passport","onDelete"];function ye(e){var n=e.passport,t=e.onDelete,r=(0,de.Z)(e,je);return(0,Q.jsxs)(Ce,(0,o.Z)((0,o.Z)({},r),{},{children:[n.title||n.name," ",!!t&&(0,Q.jsx)(be.default,{"data-cy":"delete-issuance",className:"delete",onClick:t})]}))}ye.propTypes={passport:f().object.isRequired,onDelete:f().func},ye.defaultProps={onDelete:null};var ke,Ce=u.Z.span(le||(le=(0,i.Z)(["\n display: inline-flex;\n padding: 2px 8px;\n background: ",";\n border-radius: 100vw;\n font-weight: 400;\n font-size: 12px;\n line-height: 22px;\n color: #fff;\n align-items: center;\n .delete {\n font-size: 1em;\n margin-left: 6px;\n cursor: pointer;\n }\n"])),(function(e){return e.theme.palette.primary.main}));function Pe(e){var n=e.issuances,t=e.teamDid,r=e.onRefresh,i=(0,L.h6)(),o=i.api,u=i.inService,d=(0,l.useContext)(P.RD),p=d.t,m=d.locale,f=(0,l.useState)(null),h=(0,c.Z)(f,2),v=h[0],x=h[1],g=(0,l.useState)(!1),b=(0,c.Z)(g,2),j=b[0],y=b[1],k=(0,O.DJ)().endpoint,C=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(n){var i;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.id,!j){e.next=3;break}return e.abrupt("return");case 3:return y(!0),e.prev=4,e.next=7,o.deletePassportIssuance({input:{teamDid:t,sessionId:i}});case 7:r(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),z.Z.error(e.t0.message);case 13:return e.prev=13,y(!1),x(null),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[4,10,13,17]])})));return function(n){return e.apply(this,arguments)}}(),D=function(){y(!1),x(null)},w=function(e){return k?(0,q._)({id:e.id,endpoint:k}):""};function S(e){var n=e.data;return(0,Q.jsxs)("div",{className:"issuance",children:[(0,Q.jsxs)(Z.Z,{display:"flex",justifyContent:"space-between",children:[(0,Q.jsx)(W.Z,{permission:u?"":"mutate_team",role:u?q.Wf:[],children:function(e){return e?(0,Q.jsx)(ye,{passport:{title:n.title,name:n.name},onDelete:function(){return x({title:p("team.passport.issuance.delete.title"),description:p("team.passport.issuance.delete.description",{link:w(n)}),confirm:p("common.delConfirm"),cancel:p("common.cancel"),onConfirm:function(){C(n)},onCancel:D})}}):(0,Q.jsx)(ye,{passport:{title:n.title,name:n.name}})}}),(0,Q.jsxs)("div",{style:{color:"#999"},children:[p("common.expires"),":\xa0",(0,q.B2)(n.expireDate,m)]})]}),(0,Q.jsx)(Z.Z,{mt:2,children:(0,Q.jsx)(Y.Z,{children:w(n)})})]})}return(0,Q.jsxs)(De,{children:[n.map((function(e){return(0,Q.jsx)(S,{data:e})})),v&&(0,Q.jsx)(Ze.Z,{title:v.title,description:v.description,confirm:v.confirm,cancel:v.cancel,params:v.params,onConfirm:v.onConfirm,onCancel:v.onCancel})]})}var De=u.Z.div(ke||(ke=(0,i.Z)(["\n .MuiTableHead-root {\n display: none;\n }\n .issuance {\n padding: 16px 0;\n border-bottom: 1px solid #f0f0f0;\n .MuiTypography-root {\n display: inline-block;\n width: 100%;\n background: #f3f3f3;\n border-radius: 4px;\n padding-top: 6px;\n padding-bottom: 6px;\n }\n }\n"])));Pe.propTypes={teamDid:f().string.isRequired,issuances:f().array,onRefresh:f().func},Pe.defaultProps={issuances:[],onRefresh:function(){}};var we,Se=t(68079),Re=t(70093),Te=t.n(Re),Ie=t(25177),Ee=t(86384),Ne=t(69936),Ae=t(78789),ze=t(83683),Be=t(36568);function _e(e){var n=e.teamDid,t=e.ownerDid,r=e.needReceive,i=e.roles,o=e.onCancel,u=e.onSuccess,d=e.onError,p=e.showOwnerPassport,m=(0,L.h6)().api,f=(0,l.useState)(!1),h=(0,c.Z)(f,2),v=h[0],g=h[1],Z=(0,l.useState)(""),b=(0,c.Z)(Z,2),j=b[0],y=b[1],k=(0,P.PE)().t,C=(0,l.useState)(""),w=(0,c.Z)(C,2),S=w[0],R=w[1],T=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(){var r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S){e.next=3;break}return y(k("team.member.error.passportEmpty")),e.abrupt("return");case 3:return y(null),g(!0),e.prev=5,e.next=8,m.createPassportIssuance({input:{teamDid:n,name:S,ownerDid:t}});case 8:u(),e.next=16;break;case 11:e.prev=11,e.t0=e.catch(5),r=(0,q.Z)(e.t0),y(r),d(e.t0);case 16:return e.prev=16,g(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[5,11,16,19]])})));return function(){return e.apply(this,arguments)}}();return(0,Q.jsxs)(x.ZP,{title:k("team.passport.issue"),fullWidth:!0,open:!0,onClick:function(e){return e.stopPropagation()},onClose:o,disableEscapeKeyDown:!0,PaperProps:{style:{minHeight:"auto"}},actions:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(D.Z,{onClick:o,color:"inherit",size:"small",children:k("common.cancel")}),(0,Q.jsxs)(D.Z,{onClick:T,color:"primary",size:"small",disabled:v||!S,variant:"contained",autoFocus:!0,"data-cy":"issue-passport-create-btn",children:[v&&(0,Q.jsx)(F.Z,{size:16}),k(r?"team.passport.issuance.create.title":"oauth.issued")]})]}),children:[(0,Q.jsx)(M.Z,{component:"div",children:(0,Q.jsx)(V.Z,{component:"div",children:(0,Q.jsxs)($.Z,{style:{width:"100%"},variant:"outlined",children:[(0,Q.jsx)(X.Z,{children:k("common.passport")}),(0,Q.jsx)(J.Z,{"data-cy":"issue-passport-select-passport",value:S,onChange:function(e){y(null),R(e.target.value)},fullWidth:!0,label:k("common.passport"),disabled:v,onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),T())},children:i.filter((function(e){return p||"owner"!==e.name})).map((function(e){return(0,Q.jsx)(K.Z,{value:e.name,"data-cy":"issue-passport-select-option-".concat(e.name),children:(0,Q.jsx)("span",{children:e.title||e.name})},e.name)}))})]})})}),!!j&&(0,Q.jsx)(G.Z,{type:"error",variant:"icon",children:j})]})}function Le(e){var n=e.action,t=e.passport,r=(0,P.PE)().t,i=(0,O.DJ)().roles.find((function(e){return e.name===t.role}));return(0,Q.jsxs)("div",{children:[(0,Q.jsx)("div",{children:r("enable"===n?"team.member.enablePassportDescription":"team.member.revokePassportDescription")}),i&&(0,Q.jsx)(Z.Z,{mt:3,fontWeight:"bold",children:r("team.member.passportPermissionTitle")}),i&&(0,Q.jsx)(Z.Z,{mt:1,children:i.description})]})}function Oe(e){var n,t=e.user,r=e.onCreate,i=e.createPassportSvg,u=(0,P.PE)().t,d=(0,ae.T)().session,p=(0,O.DJ)(),m=p.roles,f=p.teamDid,h=p.teamIssuerDid,v=p.refresh,x=p.enablePassportIssuance,b=p.trustedPassports,j=p.passportColor,k=p.blocklet,C=(0,U.y0)().appIdList,w=(0,L.h6)(),R=w.api,T=w.inService,I=(0,l.useState)(!1),N=(0,c.Z)(I,2),A=N[0],B=N[1],_=(0,l.useState)(null),F=(0,c.Z)(_,2),M=F[0],V=F[1],K=(0,l.useState)(!1),J=(0,c.Z)(K,2),H=J[0],X=J[1],$=(0,l.useState)(""),G=(0,c.Z)($,2),Y=G[0],ee=G[1],ne=[h].concat((0,Se.Z)(C||[])).filter(Boolean),te=(oe()(t,"passports")||[]).map((function(e){return(0,o.Z)((0,o.Z)({},e),{},{revoked:e.status===E.PASSPORT_STATUS.REVOKED})})),re=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(n){var r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A){e.next=2;break}return e.abrupt("return");case 2:return B(!0),e.prev=3,r=n.status===E.PASSPORT_STATUS.REVOKED?"enableUserPassport":"revokeUserPassport",e.next=7,R[r]({input:{teamDid:f,userDid:t.did,passportId:n.id}});case 7:v(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),z.Z.error((0,q.Z)(e.t0));case 13:return e.prev=13,B(!1),V(null),e.finish(13);case 17:case"end":return e.stop()}}),e,null,[[3,10,13,17]])})));return function(n){return e.apply(this,arguments)}}(),ie=function(e,n){return t.did===d.user.did&&d.user.passportId&&d.user.passportId===n.id?{revokable:!1,message:u("team.passport.shouldNotDeleteCurrent")}:e?f===n.issuer.id&&"owner"===n.name?{revokable:!1,message:u("team.passport.noPermission")}:{revokable:!0}:{revokable:!1,message:u("team.passport.noPermission")}},se=te.filter((function(e){return!Y||e.title.includes(Y)||e.name.includes(Y)}));return(0,Q.jsxs)(Ue,{children:[(0,Q.jsxs)(Be.Z,{children:[(0,Q.jsx)("div",{className:"left",children:(0,Q.jsx)(ze.Z,{placeholder:u("team.passport.search"),value:Y,onChange:function(e){return ee(e.target.value)}})}),(0,Q.jsx)("div",{className:"right",children:x&&!!t.approved&&(0,Q.jsx)(W.Z,{permission:T?"":"mutate_team",role:T?q.Wf:[],children:(0,Q.jsxs)(D.Z,{variant:"contained",color:"primary","data-cy":"issue-passport",onClick:function(){return X(!0)},children:[(0,Q.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}),u("team.passport.issue")]})})})]}),(0,Q.jsxs)(Z.Z,{children:[se.map((function(e){return(0,Q.jsx)(W.Z,{permission:T?"":"mutate_team",role:T?q.Wf:[],children:function(n){return(0,Q.jsxs)(Z.Z,{className:"passport-item",display:"flex",justifyContent:"space-between",alignItems:"center",mt:3,children:[(0,Q.jsxs)(Z.Z,{display:"flex",alignItems:"center",children:[(0,Q.jsx)("div",{dangerouslySetInnerHTML:{__html:i({title:e.title||e.name,issuer:e.issuer&&e.issuer.name,issuerDid:e.issuer&&e.issuer.id,ownerName:t.fullName,ownerDid:t.did,ownerAvatarUrl:t.avatar,revoked:e.revoked,preferredColor:j,width:"150px"})}}),(0,Q.jsxs)("div",{className:"body",children:[(0,Q.jsxs)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:[Te()(e.title),(0,Q.jsxs)("div",{className:"status-icons",children:[!!ne.length&&!ne.includes(e.issuer.id)&&(0,Q.jsx)(S.Z,{}),e.revoked&&(0,Q.jsx)(Ne.Z,{})]})]}),e.expirationDate&&(0,Q.jsx)(Z.Z,{className:"title",display:"flex",alignItems:"center",children:u("team.passport.validUntil",{date:e.expirationDate})}),!!ne.length&&!ne.includes(e.issuer.id)&&(0,Q.jsxs)("div",{className:"tip",children:[e.issuer.id!==h&&!b.some((function(n){return n.issuerDid===e.issuer.id}))&&(0,Q.jsx)(g.Z,{title:u("team.passport.notTrustedIssuerTip"),children:(0,Q.jsx)(Z.Z,{component:Ie.Z,style:{fontSize:"1.3em"},color:"error.main",mr:.5})}),(0,Q.jsx)("span",{children:u("team.passport.issueBy",{name:e.issuer.name})})]})]})]}),(0,Q.jsx)(Z.Z,{children:ie(n,e).revokable?(0,Q.jsxs)(D.Z,{variant:"outlined",color:e.revoked?"primary":"secondary",onClick:function(){return(n=e).status===E.PASSPORT_STATUS.REVOKED?V({title:u("team.member.enablePassport"),description:(0,Q.jsx)(Le,{action:"enable",passport:n}),confirm:u("common.enable"),cancel:u("common.cancel"),onConfirm:function(){re(n)},onCancel:function(){B(!1),V(null)},color:"primary"}):V({title:u("team.member.revokePassport"),description:(0,Q.jsx)(Le,{action:"revoke",passport:n}),confirm:u("common.revoke"),cancel:u("common.cancel"),onConfirm:function(){re(n)},onCancel:function(){B(!1),V(null)}});var n},children:[e.revoked?(0,Q.jsx)(y.Z,{style:{fontSize:16,marginRight:4}}):(0,Q.jsx)(Ne.Z,{style:{height:16,marginRight:4}}),e.revoked?u("common.enable"):u("common.revoke")]}):(0,Q.jsx)(g.Z,{title:ie(n,e).message,children:(0,Q.jsx)(Ie.Z,{style:{color:"#ddd"}})})})]})}},e.id)})),!se.length&&(0,Q.jsx)(Ae.Z,{children:u("common.empty")})]}),H&&(0,Q.jsx)(_e,{teamDid:f,ownerDid:t.did,needReceive:(0,Ee.h1)(t)===t.did,roles:m,onCancel:function(){return X(!1)},onSuccess:function(){r(),X(!1)},showOwnerPassport:k&&!(null!==(n=k.settings)&&void 0!==n&&n.owner)}),M&&(0,Q.jsx)(Ze.Z,{title:M.title,description:M.description,confirm:M.confirm,cancel:M.cancel,params:M.params,onConfirm:M.onConfirm,onCancel:M.onCancel,color:M.color})]})}_e.propTypes={teamDid:f().string.isRequired,ownerDid:f().string.isRequired,needReceive:f().bool,onCancel:f().func.isRequired,onSuccess:f().func.isRequired,onError:f().func,roles:f().array,showOwnerPassport:f().bool},_e.defaultProps={onError:function(){},roles:[],showOwnerPassport:!1,needReceive:!0},Le.propTypes={action:f().string.isRequired,passport:f().object.isRequired},Le.defaultProps={},Oe.propTypes={user:f().object.isRequired,createPassportSvg:f().func.isRequired,onCreate:f().func},Oe.defaultProps={onCreate:function(){}};var Ue=u.Z.div(we||(we=(0,i.Z)(["\n .passport-item {\n .body {\n padding: 0;\n margin-left: 24px;\n margin-top: 0;\n }\n .title {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n color: #222222;\n }\n .tip {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-top: 6px;\n color: #bbb;\n }\n .status-icons {\n svg {\n fill: #bfbfbf;\n height: 1.2em;\n margin-left: 0.4em;\n }\n }\n .MuiButton-outlinedSecondary {\n color: #f16e6e;\n fill: #f16e6e;\n background: #fcf3f3;\n border: 0;\n &:hover {\n border: 0;\n }\n }\n }\n"]))),We=function(e,n){return e.nodeOwner&&e.nodeOwner.did===n},qe=function(e,n){return e&&e.did===n};function Fe(e){var n,t=e.user,r=e.onCancel,i=e.onSuccess,o=e.onError,u=e.children,d=(0,L.h6)(),p=d.api,m=d.info,f=d.inService,h=(0,ae.T)().session,v=(0,O.DJ)(),x=v.teamDid,g=v.refresh,Z=(0,P.PE)().t,b=(0,l.useState)(!1),j=(0,c.Z)(b,2),y=j[0],k=j[1],C=(0,l.useState)(!1),D=(0,c.Z)(C,2),w=D[0],S=D[1],R=function(){var e=(0,a.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.did,r=n.approved,!y){e.next=3;break}return e.abrupt("return");case 3:return k(!0),e.prev=4,e.next=7,p.updateUserApproval({input:{teamDid:x,user:{did:t,approved:!r}}});case 7:S(!1),i(),g(),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),z.Z.error((0,q.Z)(e.t0)),o();case 16:return e.prev=16,k(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,12,16,19]])})));return function(n){return e.apply(this,arguments)}}(),T={title:t.approved?Z("team.member.forbidLogin"):Z("team.member.allowLogin"),description:t.approved?Z("team.member.forbidLoginDescription"):Z("team.member.allowLoginDescription"),confirm:Z("common.confirm"),cancel:Z("common.cancel"),onConfirm:function(){R(t)},onCancel:function(){k(!1),S(!1),r()},color:t.approved?"error":"primary"};return(n=(f||m.nodeOwner&&!We(m,t.did))&&!qe(h.user,t.did))?(0,Q.jsxs)(Q.Fragment,{children:["function"===typeof u?u({can:n,open:function(){return S(!0)}}):u,w?(0,Q.jsx)(Ze.Z,{title:T.title,description:T.description,confirm:T.confirm,cancel:T.cancel,params:T.params,onConfirm:T.onConfirm,onCancel:T.onCancel,color:T.color}):null]}):null}Fe.propTypes={user:f().object,onSuccess:f().func,onCancel:f().func,onError:f().func,children:f().oneOfType([f().object,f().func])},Fe.defaultProps={user:{},onSuccess:function(){},onCancel:function(){},onError:function(){},children:null};var Me,Ve,Ke,Je=t(19611),He=t.n(Je);function Xe(e,n,t){if(e&&e.startsWith(E.USER_AVATAR_URL_PREFIX)){var r=window.env.apiPrefix||"/";return t?He()(r,E.USER_AVATAR_PATH_PREFIX,e.replace(E.USER_AVATAR_URL_PREFIX,"")):He()(r,E.USER_AVATAR_PATH_PREFIX,n,e.replace(E.USER_AVATAR_URL_PREFIX,""))}return e}function $e(e){return(e.user.connectedAccounts||[]).map((function(e){return(0,Q.jsx)(fe.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.provider,children:(0,Q.jsx)(_.Z,{did:e.did})},e.did)}))}f().string.isRequired,$e.propTypes={user:f().object.isRequired,onChangeUser:f().func},$e.defaultProps={onChangeUser:function(){}};var Ge="info";function Ye(e){var n=e.userDid,t=e.onCancel,r=e.initTab,i=e.createPassportSvg,o=(0,L.h6)(),c=o.api,u=o.ws.useSubscription,d=o.inService,p=(0,O.DJ)(),m=p.roles,f=p.teamDid,h=p.enablePassportIssuance,v=(0,P.PE)(),g=v.t,b=v.locale,j=(0,xe.Z)({user:null,issuances:null,tab:r||Ge}),y=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(n,t){var r;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.doBatchQuery({getUser:{input:{teamDid:n,user:{did:t},options:{includeTags:!0}}},getPassportIssuances:{input:{teamDid:n,ownerDid:t}}});case 3:(r=e.sent).getUser.user&&(r.getUser.user.avatar=Xe(r.getUser.user.avatar,n,d),r.getUser.user.passports=(r.getUser.user.passports||[]).filter((function(e){return e.issuer}))),j.user=r.getUser.user||{},j.issuances=r.getPassportIssuances.list||[],e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),z.Z.error((0,q.Z)(e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(n,t){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){f&&y(f,n)}),[n,f]);u(E.EVENTS.USER_UPDATED,(function(e){e.teamDid===f&&e.user&&e.user.did===n&&y(f,n)}),[n,f]),(0,l.useEffect)((function(){j.issuances&&!j.issuances.length&&"issuances"===j.tab&&(j.tab=Ge)}),[j.issuances]);var k=function(){var e=(0,a.Z)((0,s.Z)().mark((function e(n){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y(f,n.did);case 2:j.tab=Ge;case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"},D={info:{label:g("common.basicInfo"),value:Ge,component:function(){var e,n;return(j.user?[{name:g("team.member.name"),value:j.user.fullName},{name:g("common.email"),value:j.user.email},{name:g("team.member.source"),value:(0,Q.jsx)(Z.Z,{display:"flex",alignItems:"center",children:C[(null===(e=j.user)||void 0===e?void 0:e.sourceProvider)||E.USER_TYPE.WALLET]||(null===(n=j.user)||void 0===n?void 0:n.sourceProvider)})},{name:g("team.member.allowLogin"),value:j.user.approved?g("common.yes"):g("common.no")},{name:g("team.member.lastLogin"),value:(0,q.B2)(j.user.lastLoginAt,b)},{name:g("team.member.lastLoginIp"),value:j.user.lastLoginIp||""},{name:g("common.createdAt"),value:(0,q.B2)(j.user.createdAt,b)},{name:g("common.remark"),value:j.user.remark||"--"},Array.isArray(j.user.tags)&&j.user.tags.length>0?{name:g("common.tags"),value:j.user.tags.map((function(e){return(0,Q.jsx)(B.Z,{style:{background:e.color,color:(0,R.getTextColor)(e.color),marginRight:4},children:e.title},e.id)}))}:null].filter(Boolean):[]).map((function(e){return e.name===g("common.did")?(0,Q.jsx)(fe.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:function(){return g("common.did")},children:e.value},e.name):(0,Q.jsx)(fe.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)}))}},oauth:{label:g("team.member.connectedAccounts"),value:"oauth",component:function(){return(0,Q.jsx)($e,{user:j.user,onChangeUser:k})}},passports:{label:g("common.passport"),value:"passports",component:function(){return(0,Q.jsx)(Oe,{user:j.user,teamDid:f,roles:m,createPassportSvg:i,onCreate:function(){y(f,n).then((function(){h&&j.issuances&&j.issuances.length&&(j.tab="issuances")}))},onRefresh:function(){y(f,n)}})}},issuances:{label:g("team.passport.issuance.pending"),value:"issuances",component:function(){return(0,Q.jsx)(Pe,{issuances:j.issuances||[],teamDid:f,onRefresh:function(){return y(f,n)}})}}},w=Object.values(D).map((function(e){return{label:e.label,value:e.value}})).filter((function(e){return"issuances"===e.value?h&&j.issuances&&!!j.issuances.length:"oauth"!==e.value||((null===(n=j.user)||void 0===n?void 0:n.connectedAccounts)||[]).find((function(e){var n;return e.provider!==((null===(n=j.user)||void 0===n?void 0:n.sourceProvider)||ge.LOGIN_PROVIDER.WALLET)}));var n})),S=D[j.tab]||D.info;return(0,Q.jsx)(x.ZP,{title:g("common.member"),onClose:t,open:!0,PaperProps:{style:{maxWidth:632,minHeight:"80vh"}},fullWidth:!0,actions:j.user&&(0,Q.jsx)(W.Z,{permission:d?"":"mutate_team",role:d?q.Wf:[],children:(0,Q.jsx)(Fe,{user:j.user,children:function(e){var n=e.open;return(0,Q.jsxs)(tn,{onClick:n,children:[j.user.approved?(0,Q.jsx)(he.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}):(0,Q.jsx)(ve.Z,{style:{fontSize:"1.2em",marginRight:"0.4em"}}),j.user.approved?g("team.member.forbidLogin"):g("team.member.allowLogin")]})}})}),children:(0,Q.jsxs)(en,{children:[!j.user&&(0,Q.jsx)(nn,{children:(0,Q.jsx)(F.Z,{})}),j.user&&(0,Q.jsxs)("div",{children:[(0,Q.jsxs)(Z.Z,{display:"flex",alignItems:"center",className:"info",children:[(0,Q.jsx)(pe.Z,{src:j.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),(0,Q.jsxs)(Z.Z,{children:[(0,Q.jsx)(Z.Z,{className:"name",children:j.user.fullName}),(0,Q.jsx)(Z.Z,{className:"did",mt:1,children:(0,Q.jsx)(_.Z,{did:j.user.did})})]})]}),(0,Q.jsx)(Z.Z,{mx:3,className:"tabs",children:(0,Q.jsx)(me.Z,{tabs:w,current:j.tab,onChange:function(e){j.tab=e},scrollButtons:"auto"})}),(0,Q.jsx)("div",{className:"body",children:(0,Q.jsx)(S.component,{})})]})]})})}Ye.propTypes={userDid:f().string.isRequired,onCancel:f().func.isRequired,createPassportSvg:f().func.isRequired,initTab:f().string},Ye.defaultProps={initTab:Ge};var Qe,en=u.Z.div(Me||(Me=(0,i.Z)(["\n .info {\n .name {\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n color: #222222;\n }\n }\n\n .tabs {\n margin-top: 24px;\n margin-left: 0;\n margin-right: 0;\n }\n\n .body {\n margin-top: 24px;\n }\n"]))),nn=u.Z.div(Ve||(Ve=(0,i.Z)(["\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 200px;\n"]))),tn=u.Z.div(Ke||(Ke=(0,i.Z)(["\n flex-shrink: 0;\n width: 100%;\n height: 64px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n color: #999;\n fill: #999;\n font-size: 16px;\n border-top: 1px solid #f0f0f0;\n position: sticky;\n bottom: 0;\n background: #fff;\n z-index: 10;\n"]))),rn=t(10814);function on(){var e=(0,L.h6)(),n=e.api,t=e.inService,r=(0,l.useContext)(P.RD),i=r.t,o=r.locale,u=(0,O.DJ)(),d=u.teamDid,p=u.invitations,m=u.refresh,f=u.endpoint,h=(0,l.useState)(null),v=(0,c.Z)(h,2),x=v[0],g=v[1],Z=(0,l.useState)(!1),b=(0,c.Z)(Z,2),j=b[0],y=b[1],k=function(){var e=(0,a.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:if(r=t.inviteId,!j){e.next=3;break}return e.abrupt("return");case 3:return y(!0),e.prev=4,e.next=7,n.deleteInvitation({input:{teamDid:d,inviteId:r}});case 7:return m(),e.next=10,(0,q._v)(800);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),console.error(e.t0);case 15:return e.prev=15,y(!1),g(null),e.finish(15);case 19:case"end":return e.stop()}}),e,null,[[4,12,15,19]])})));return function(n){return e.apply(this,arguments)}}(),C=function(){y(!1),g(null)},w=function(e){return f?(0,q.ly)({inviteId:e.inviteId,endpoint:f}):""},S=[{label:i("team.inviting.link"),name:"inviteId",options:{sort:!1,customBodyRenderLite:function(e){var n=p[e];return f?(0,Q.jsx)(Y.Z,{children:w(n)}):(0,Q.jsx)(F.Z,{size:16})}}},{label:i("common.role"),name:"role",widtn:70},{label:i("common.remark"),name:"remark",options:{customBodyRender:function(e){return e||"--"}}},{label:i("team.inviting.inviter"),name:"inviter.fullName",options:{sort:!1,customBodyRender:function(e,n){var t,r=n.rowIndex,i=p[r];return null===i||void 0===i||null===(t=i.inviter)||void 0===t?void 0:t.fullName}}},{label:i("common.expires"),name:"expireDate",options:{customBodyRender:function(e){return(0,Q.jsx)(I.Z,{value:e,locale:o})}}},{label:i("common.actions"),name:"",width:100,align:"center",options:{sort:!1,customBodyRenderLite:function(e){var n=p[e];return(0,Q.jsx)(W.Z,{permission:t?"":"mutate_team",role:t?q.Wf:[],children:(0,Q.jsxs)(D.Z,{onClick:function(){return g({title:i("team.inviting.delete.title"),description:i("team.inviting.delete.description",{link:w(n)}),confirm:i("common.delConfirm"),cancel:i("common.cancel"),onConfirm:function(){return k(n)},onCancel:C})},size:"small",color:"error",variant:"text",children:[(0,Q.jsx)(rn.default,{style:{fontSize:"1.2em"}}),i("common.delete")]})})}}}];return(0,Q.jsxs)(sn,{children:[p.length?(0,Q.jsx)(T.Z,{locale:o,data:(0,Se.Z)(p),columns:S,verticalKeyWidth:100,options:{download:!1,filter:!1,print:!1}}):(0,Q.jsx)(Ae.Z,{children:i("common.empty")}),x&&(0,Q.jsx)(Ze.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}var sn=u.Z.div(Qe||(Qe=(0,i.Z)(["\n margin-top: -20px;\n"])));on.propTypes={},on.defaultProps={};var an,cn=t(93310),ln=t(86008),un=t(80714);function dn(e){var n=e.user,t=e.onIssuePassport,r=(0,O.DJ)(),i=r.teamDid,o=r.roles,s=(0,l.useContext)(P.RD).t,a=(0,l.useState)(!1),u=(0,c.Z)(a,2),d=u[0],p=u[1];return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(un.Z,{"data-cy":"member-actions",actions:[{icon:(0,Q.jsx)(y.Z,{fontSize:"small"}),text:s("team.passport.issue"),"data-cy":"action-issue-passport",onClick:function(e){e.stopPropagation(),p(!0)}},function(e){var t=e.close;return(0,Q.jsx)(Fe,{user:n,children:function(e){var r=e.open;return(0,Q.jsxs)(K.Z,{dense:!0,onClick:function(e){e.stopPropagation(),t(),r(e)},"data-cy":"action-toggle-block",children:[(0,Q.jsx)(cn.Z,{style:{minWidth:24,marginRight:8},children:n.approved?(0,Q.jsx)(he.Z,{}):(0,Q.jsx)(ve.Z,{})}),(0,Q.jsx)(ln.Z,{primary:n.approved?s("team.member.forbidLogin"):s("team.member.allowLogin")})]})}},"toggle-approval")}]}),d&&(0,Q.jsx)(_e,{teamDid:i,ownerDid:n.did,needReceive:(0,Ee.h1)(n)===n.did,roles:o,onCancel:function(){return p(!1)},onSuccess:function(){t(),p(!1)}})]})}dn.propTypes={user:f().object.isRequired,onIssuePassport:f().func},dn.defaultProps={onIssuePassport:function(){}};var pn="$all",mn="$none",fn=function(e,n){var t=e.find((function(e){return e.key===n}));return(null===t||void 0===t?void 0:t.value)||0},hn=function(e,n){var t=e.passports||[];return!!t.length&&!t.some((function(e){var t;return n.includes(null===(t=e.issuer)||void 0===t?void 0:t.id)}))};function vn(e){var n=e.user,t=(0,l.useContext)(P.RD).t,r=(0,Q.jsxs)("div",{className:"member-block",children:[(0,Q.jsxs)("div",{className:"member-avatar",children:[(0,Q.jsx)(C.Z,{src:"".concat(n.avatar,"?imageFilter=resize&w=48&h=48"),size:32,did:n.did,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),!n.approved&&(0,Q.jsx)("did",{className:"badge-block"}),n.isFromExternal&&(0,Q.jsx)(g.Z,{title:t("team.passport.externalPassport"),children:(0,Q.jsx)(Z.Z,{ml:1,className:"icon",children:(0,Q.jsx)(S.Z,{})})})]}),(0,Q.jsxs)("div",{className:"member-meta",children:[(0,Q.jsx)("div",{className:"member-text",children:n.fullName}),Array.isArray(n.tags)&&n.tags.length>0&&(0,Q.jsx)("div",{className:"member-tags",children:n.tags.map((function(e){return(0,Q.jsx)(B.Z,{style:{background:e.color,color:(0,R.getTextColor)(e.color),marginRight:4},children:e.title},e.id)}))})]})]});return n.approved?r:(0,Q.jsx)(Z.Z,{display:"flex",alignItems:"center",children:(0,Q.jsx)(g.Z,{title:t("team.member.forbidLoginDescription"),children:r})})}function xn(e){var n=e.type,t=e.createPassportSvg,r=(0,U.y0)().appIdList,i=void 0===r?[]:r,u=(0,O.DJ)(),d=u.teamDid,m=u.invitations,f=u.teamIssuerDid,h=u.roles,g=u.refresh,C=u.enablePassportIssuance,S=u.endpoint,R=u.api,B=(0,L.h6)(),F=B.inService,M=B.ws.useSubscription,V=(0,l.useContext)(P.RD),K=V.t,J=V.locale,H=(0,l.useState)(!1),X=(0,c.Z)(H,2),$=X[0],G=X[1],Y=(0,l.useState)(!1),ne=(0,c.Z)(Y,2),te=ne[0],re=ne[1],ie=(0,l.useState)(!1),oe=(0,c.Z)(ie,2),se=oe[0],ae=oe[1],le=(0,l.useState)(!1),ue=(0,c.Z)(le,2),de=ue[0],pe=ue[1],me=(0,l.useState)(!1),fe=(0,c.Z)(me,2),he=fe[0],ve=fe[1],xe=(0,l.useState)([]),ge=(0,c.Z)(xe,2),Ze=ge[0],be=ge[1],je=(0,l.useState)(),ye=(0,c.Z)(je,2),ke=ye[0],Ce=ye[1],Pe=(0,l.useState)([]),De=(0,c.Z)(Pe,2),we=De[0],Se=De[1],Re=(0,N.Z)({did:void 0}),Te=(0,c.Z)(Re,1)[0],Ie="members-".concat(d),Ee=(0,T.$)(Ie),Ne=(0,l.useState)({role:pn,searchText:Ee.searchText||"",hideBlocked:!1,pageSize:Ee.rowsPerPage||10,page:Ee.page?Ee.page+1:1}),Ae=(0,c.Z)(Ne,2),ze=Ae[0],Be=Ae[1];(0,A.Z)((0,a.Z)((0,s.Z)().mark((function e(){var n,t;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Te.did){e.next=6;break}return e.next=3,R.getUser({did:Te.did});case 3:n=e.sent,(t=n.user)&&pe(t);case 6:case"end":return e.stop()}}),e)}))));var _e=(h||[]).map((function(e){return{name:e.name,title:e.title,num:fn(we,e.name)}}));_e.unshift({name:pn,title:"All Members",num:fn(we,pn)}),_e.push({name:mn,title:"Other",num:fn(we,mn)});var Le=function(){var e={includeTags:!0};ze.hideBlocked&&(e.approved=!0),e.role=ze.role,ze.searchText&&(e.search=ze.searchText),ve(!0),R.getUsers({query:e,paging:{page:ze.page,pageSize:ze.pageSize}}).then((function(e){ve(!1),(e.users||[]).forEach((function(e){e.isFromExternal=hn(e,p()(i)?[f]:i),e.avatar=Xe(e.avatar,d,F),e.passports=(e.passports||[]).filter((function(e){return e.issuer}))})),be(e.users||[]),Ce(e.paging.total)})).catch((function(e){ve(!1),z.Z.error(e.message)}))},Oe=function(){R.getUsersCountPerRole().then((function(e){Se(e.counts||[])})).catch((function(e){z.Z.error(e.message)}))},Ue=function(e){e.teamDid===d&&(Le(),Oe())};(0,l.useEffect)((function(){Le()}),["".concat(ze.hideBlocked,"-").concat(ze.role,"-").concat(ze.page,"-").concat(ze.pageSize,"-").concat(ze.searchText)]),(0,l.useEffect)((function(){Oe()}),[]),M(E.EVENTS.USER_UPDATED,Ue,[ze]),M(E.EVENTS.USER_ADDED,Ue,[ze]);var We=C,qe=[{label:K("common.name"),name:"fullName",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,Q.jsx)("div",{"data-cy":"member-name-".concat(n.fullName),children:(0,Q.jsx)(vn,{user:n})},n.did)}}},{label:K("common.address"),name:"did",options:{customBodyRender:function(e){return(0,Q.jsx)(_.Z,{size:14,responsive:!0,copyable:!1,did:e})}}},{label:K("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:function(e){return(0,Q.jsx)(I.Z,{value:e,locale:J})}}},{label:K("team.member.lastLoginIp"),name:"lastLoginIp",options:{customBodyRender:function(e){return e||"-"}}},{label:K("team.member.source"),name:"sourceProvider",options:{customBodyRenderLite:function(e){var n=Ze[e],t=n.sourceProvider||E.USER_TYPE.WALLET,r={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"}[t]||t;return n.sourceAppPid?"".concat(r," (").concat(K("team.member.federated"),")"):r}}},{label:K("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite:function(e){var n=Ze[e];return(0,Q.jsx)(W.Z,{permission:F?"":"mutate_team",role:F?q.Wf:[],children:(0,Q.jsx)(dn,{user:n,onIssuePassport:function(){return pe((0,o.Z)((0,o.Z)({},n),{},{initTab:"issuances"}))}})})}}}],Fe=[];We&&(Fe.push((0,Q.jsxs)(D.Z,{variant:"outlined",style:{flexShrink:0,marginRight:16},color:"primary",size:"small",onClick:function(){ae(!0)},children:[(0,Q.jsx)(w.Z,{style:{height:"1em",marginRight:4}}),K("common.inviting"),m.length?" (".concat(m.length,")"):""]}),(0,Q.jsx)(W.Z,{permission:F?"":"mutate_team",role:F?q.Wf:[],children:(0,Q.jsxs)(D.Z,{style:{flexShrink:0,marginRight:16},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"invite-member",onClick:function(){return G(!0)},children:[(0,Q.jsx)(y.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.invite")]})})),"server"===n&&Fe.push((0,Q.jsx)(W.Z,{role:"owner",children:(0,Q.jsxs)(D.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"invite-member",onClick:function(){return re(!0)},children:[(0,Q.jsx)(k.Z,{style:{fontSize:"1.3em",marginRight:4}}),K("team.transferNode.name")]})})));var Me={sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick:function(e,n){var t=n.dataIndex,r=Ze[t];pe(r)},page:ze.page-1,rowsPerPage:ze.pageSize,count:ke,searchDebounceTime:600};return(0,Q.jsxs)(gn,{children:[(0,Q.jsxs)(Z.Z,{className:"main",display:"flex",children:[(0,Q.jsx)("div",{className:"left",children:(0,Q.jsx)("div",{className:"tabs",children:_e.map((function(e){return(0,Q.jsxs)("div",{className:"tab ".concat(ze.role===e.name?"active":""),onClick:function(){return n=e.name,void(he||Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{role:n,hideBlocked:!1,searchText:"",page:1})})));var n},children:[(0,Q.jsx)("span",{className:"text",children:e.title}),(0,Q.jsx)("span",{className:v()("badge",{"is-rect":e.num>999}),children:e.num})]},e.name)}))})}),(0,Q.jsx)("div",{className:"right",children:(0,Q.jsx)(T.Z,{className:"main-table",verticalKeyWidth:100,locale:J,durable:Ie,durableKeys:["page","rowsPerPage"],title:(0,Q.jsx)("div",{className:"table-toolbar-left",children:(0,Q.jsx)(b.Z,{control:(0,Q.jsx)(j.Z,{sx:{display:"flex !important"},disabled:he,color:"primary",checked:ze.hideBlocked,onChange:function(e){return n=e.target.checked,void Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{hideBlocked:n,page:1})}));var n}}),label:K("team.member.hideBlockedMember")})}),data:Ze,columns:qe,customButtons:Fe,options:Me,loading:he,onChange:function(e){var n=e.page,t=e.rowsPerPage,r=e.searchText;ze.pageSize!==t?Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{pageSize:t,page:1})})):ze.page!==n+1?Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{page:n+1})})):ze.searchText!==r&&Be((function(e){return(0,o.Z)((0,o.Z)({},e),{},{searchText:r,page:1})}))}})})]}),(0,Q.jsx)(x.ZP,{title:K("common.inviting"),onClose:function(){return ae(!1)},open:se,maxWidth:"lg",fullWidth:!0,children:(0,Q.jsx)(on,{})}),de&&(0,Q.jsx)(Ye,{onCancel:function(){return pe(null)},userDid:de.did,createPassportSvg:t,initTab:de.initTab}),$&&(0,Q.jsx)(ee,{teamDid:d,endpoint:S,roles:h,onCancel:function(){return G(!1)},onSuccess:function(){g(),G(!1)}}),te&&(0,Q.jsx)(ce,{teamDid:d,endpoint:S,roles:h,onCancel:function(){return re(!1)},onSuccess:function(){g(),re(!1)}})]})}vn.propTypes={user:f().object.isRequired};var gn=u.Z.div(an||(an=(0,i.Z)(["\n .main {\n .left {\n width: 168px;\n flex-shrink: 0;\n margin-right: 65px;\n .tabs {\n padding-top: 16px;\n .tab {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n transition: background 0.4s;\n\n width: 168px;\n height: 36px;\n border-radius: 8px;\n\n cursor: pointer;\n user-select: none;\n\n &:nth-child(n + 2) {\n margin-top: 24px;\n }\n\n &.active {\n background: #f2f2f2;\n }\n\n &:hover {\n background: #f2f2f2;\n }\n\n .text {\n font-weight: 400;\n font-size: 16px;\n line-height: 19px;\n\n color: #222222;\n }\n\n .badge {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 20px;\n height: 20px;\n border-radius: 100%;\n color: #fff;\n background: #666666;\n font-size: 10px;\n font-weight: 400;\n &.is-rect {\n width: auto;\n border-radius: 8px;\n padding: 0 4px;\n }\n }\n }\n }\n @media (max-width: ","px) {\n display: none;\n }\n }\n .right {\n flex-grow: 1;\n }\n }\n\n .member-block {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .member-avatar {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .member-meta {\n margin-left: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n }\n .badge-block {\n width: 14px;\n height: 14px;\n position: absolute;\n right: -4px;\n top: -4px;\n background: #ff5757;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n &::after {\n content: '';\n width: 6px;\n height: 2px;\n background: #fefefe;\n }\n }\n }\n\n .table-toolbar-left {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 7px 0;\n }\n"])),(function(e){return e.theme.breakpoints.values.md}));xn.propTypes={type:f().oneOf(["server","blocklet"]).isRequired,createPassportSvg:f().func.isRequired}},83683:function(e,n,t){var r,i=t(33028),o=t(59740),s=t(71171),a=t(16380),c=t(87006),l=t(90713),u=t(37574),d=["children"],p=(0,a.Z)((function(e){var n=e.children,t=(0,o.Z)(e,d);return(0,u.jsx)(c.Z,(0,i.Z)((0,i.Z)({},t),{},{id:"outlined-basic",variant:"outlined",InputProps:{startAdornment:(0,u.jsx)(l.default,{})},size:"small",children:n}))}))(r||(r=(0,s.Z)(["\n .MuiOutlinedInput-root {\n color: #999;\n &.MuiInputBase-adornedStart .MuiSvgIcon-root {\n color: #bfbfbf;\n }\n opacity: 1;\n border-radius: 36px;\n background: #f8f8f8;\n padding-left: 16px;\n input {\n padding-left: 8px;\n font-weight: bold;\n &::placeholder {\n opacity: 1;\n color: #bfbfbf;\n }\n padding-top: 8.5px;\n padding-bottom: 8.5px;\n }\n }\n\n .MuiOutlinedInput-notchedOutline,\n .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline,\n .Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: #eee;\n border-width: 1px;\n }\n"])));n.Z=p},36568:function(e,n,t){var r,i=t(71171),o=t(16380).Z.div(r||(r=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 14px;\n .left,\n .right {\n }\n .right {\n display: flex;\n align-items: center;\n }\n .tabs {\n .MuiButton-root {\n border: none;\n color: #999;\n &.active {\n color: #222;\n }\n }\n }\n\n @media (max-width: 600px) {\n display: block;\n .right {\n margin-top: 12px;\n }\n }\n"])));n.Z=o}}]);
|
|
2
|
+
//# sourceMappingURL=2653.5dc29ed5.chunk.js.map
|