@abtnode/blocklet-services 1.16.17-beta-3232a7af → 1.16.17-beta-703fb879
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +2 -0
- package/api/libs/connect/session.js +17 -2
- package/api/libs/open-graph/emoji.js +80 -0
- package/api/libs/open-graph/index.js +14 -1
- package/api/routes/federated.js +108 -2
- package/api/routes/oauth.js +46 -9
- package/api/routes/user-session.js +165 -0
- package/api/routes/user.js +21 -0
- package/api/services/auth/connect/login.js +13 -2
- package/api/services/auth/index.js +17 -8
- package/api/services/image/index.js +5 -0
- package/api/util/index.js +8 -1
- package/api/util/user-session.js +47 -0
- package/build/asset-manifest.json +79 -75
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/service-worker.js.map +1 -1
- package/build/static/css/{5982.ac464505.chunk.css → 8702.3ffd8486.chunk.css} +1 -1
- package/build/static/js/1148.e5dc907a.chunk.js +2 -0
- package/build/static/js/{6711.fa6dfc37.chunk.js → 1359.add26d23.chunk.js} +2 -2
- package/build/static/js/{2093.e2fce549.chunk.js → 2093.3192d241.chunk.js} +3 -3
- package/build/static/js/{2653.1307684f.chunk.js → 2653.6a6c1c6c.chunk.js} +2 -2
- package/build/static/js/2972.2d5268c3.chunk.js +2 -0
- package/build/static/js/3025.e2b1dac4.chunk.js +2 -0
- package/build/static/js/{9409.7d4a802c.chunk.js → 3033.1bbcc14e.chunk.js} +2 -2
- package/build/static/js/{1462.a4d2a902.chunk.js → 3131.f75fa792.chunk.js} +2 -2
- package/build/static/js/{3688.6edc63ba.chunk.js → 3688.2cea0226.chunk.js} +2 -2
- package/build/static/js/{4023.8cfc3ec6.chunk.js → 4023.a79b0858.chunk.js} +2 -2
- package/build/static/js/4076.e73cb63a.chunk.js +2 -0
- package/build/static/js/{6737.53cccea9.chunk.js → 4587.5b31e02e.chunk.js} +2 -2
- package/build/static/js/4716.1ecc2bb6.chunk.js +2 -0
- package/build/static/js/{4802.b2e38d47.chunk.js → 4802.d185b9f1.chunk.js} +2 -2
- package/build/static/js/5012.551dbbc3.chunk.js +2 -0
- package/build/static/js/5547.5a341867.chunk.js +3 -0
- package/build/static/js/5569.a7e151fc.chunk.js +2 -0
- package/build/static/js/{1565.f3579441.chunk.js → 5662.919cc4a2.chunk.js} +2 -2
- package/build/static/js/{9102.6dab0f45.chunk.js → 5982.d9eb7e90.chunk.js} +2 -2
- package/build/static/js/{6139.f7ca5bd6.chunk.js → 6139.cf6eb9b1.chunk.js} +2 -2
- package/build/static/js/6473.d89e783e.chunk.js +2 -0
- package/build/static/js/{8437.13d39ce4.chunk.js → 6637.b2e35031.chunk.js} +2 -2
- package/build/static/js/6658.0a27e04e.chunk.js +2 -0
- package/build/static/js/7050.3281ad5f.chunk.js +2 -0
- package/build/static/js/{716.cf9ba82c.chunk.js → 716.438b9c22.chunk.js} +3 -3
- package/build/static/js/779.99b3f0d2.chunk.js +2 -0
- package/build/static/js/7858.bac05f8f.chunk.js +2 -0
- package/build/static/js/8622.8478c900.chunk.js +2 -0
- package/build/static/js/8641.f2bb0ffc.chunk.js +2 -0
- package/build/static/js/{5982.0abe67c3.chunk.js → 8702.957f131a.chunk.js} +2 -2
- package/build/static/js/873.d6d31b32.chunk.js +3 -0
- package/build/static/js/{8792.fa2c5f5e.chunk.js → 8792.eff43237.chunk.js} +2 -2
- package/build/static/js/8944.09a1c53a.chunk.js +2 -0
- package/build/static/js/9403.b72e020c.chunk.js +2 -0
- package/build/static/js/9596.0e51cd6e.chunk.js +2 -0
- package/build/static/js/9900.b66896e6.chunk.js +2 -0
- package/build/static/js/{4682.f90d26fd.chunk.js → 9982.4f1ebb7f.chunk.js} +2 -2
- package/build/static/js/main.3cf7fedb.js +3 -0
- package/package.json +22 -22
- package/build/static/js/1480.88c590c2.chunk.js +0 -2
- package/build/static/js/1760.374a6e01.chunk.js +0 -2
- package/build/static/js/2393.528e5343.chunk.js +0 -2
- package/build/static/js/2836.f3dbcb77.chunk.js +0 -2
- package/build/static/js/3025.7dc2fe04.chunk.js +0 -2
- package/build/static/js/4164.5adbbbba.chunk.js +0 -2
- package/build/static/js/4420.05d9cb43.chunk.js +0 -2
- package/build/static/js/4716.bd8bed1b.chunk.js +0 -2
- package/build/static/js/5176.1963ce79.chunk.js +0 -2
- package/build/static/js/5547.e35129c6.chunk.js +0 -3
- package/build/static/js/6186.67c279db.chunk.js +0 -2
- package/build/static/js/6378.29466d9e.chunk.js +0 -2
- package/build/static/js/6576.02f6c898.chunk.js +0 -2
- package/build/static/js/6856.2eb98754.chunk.js +0 -2
- package/build/static/js/7226.4eca7c02.chunk.js +0 -3
- package/build/static/js/941.7757135a.chunk.js +0 -2
- package/build/static/js/9620.301493bc.chunk.js +0 -2
- package/build/static/js/9899.277d673f.chunk.js +0 -2
- package/build/static/js/main.f1e55cd8.js +0 -3
- /package/build/static/js/{2093.e2fce549.chunk.js.LICENSE.txt → 2093.3192d241.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5547.e35129c6.chunk.js.LICENSE.txt → 5547.5a341867.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{716.cf9ba82c.chunk.js.LICENSE.txt → 716.438b9c22.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7226.4eca7c02.chunk.js.LICENSE.txt → 873.d6d31b32.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.f1e55cd8.js.LICENSE.txt → main.3cf7fedb.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[5569],{65569:function(e,t,n){n.r(t),n.d(t,{default:function(){return Fe}});var r,a=n(71171),o=n(96234),i=n(30969),s=n(16380),l=n(86822),c=n(19865),u=n(26022),d=n(33028),m=n(32723),p=n(34795),f=n(19886),h=n.n(f),y=n(49725),v=n.n(y),g=n(19611),x=n.n(g),Z=n(99237),b=n.n(Z),j=n(22073),k=n(95973),D=n(18877),P=n(94308),R=n(3994),I=n(33359),F=n(72097),w=n(94551),S=n(83176),C=n(70898),z=n(36390),E=n(58323),T=n(89629),H=n(61171),L=n(20244),N=n(41046),q=n(3691),Y=n(29162),_=n(25841),M=n(64828),U=n(27575),W=n(36319),B=n(97930),O=n(4881),A=n(24891),V=n(41395),X=n(24974),K=n.n(X),G=n(28595),J=n(78879),Q=n(35016),$=n(22994),ee=n(42846),te=n(38361),ne=n(37574);function re(e){var t=e.style,n=e.title,r=e.value,a=e.graph,o=e.description;return(0,ne.jsx)(ae,{children:(0,ne.jsxs)(ee.Z,{style:(0,d.Z)({},t),children:[(0,ne.jsx)(I.Z,{sx:{fontSize:14},color:"text.secondary",children:n}),(0,ne.jsx)(I.Z,{variant:"h5",component:"div",mt:1,children:r}),a,!!o&&(0,ne.jsx)(te.Z,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:o})]})})}re.propTypes={style:K().object,title:K().node,value:K().node,graph:K().node,description:K().any},re.defaultProps={style:{},title:null,value:null,graph:null,description:null};var ae=(0,s.Z)($.Z)(r||(r=(0,a.Z)(["\n .card-content {\n height: 150px;\n }\n\n .card-sparkline {\n flex: 2;\n display: flex;\n position: relative;\n *[hidden] {\n display: none;\n }\n }\n .sparkline {\n stroke: ",";\n fill: ","1A;\n }\n .tooltip {\n position: absolute;\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n padding: 2px 5px;\n font-size: 12px;\n white-space: nowrap;\n z-index: 9999;\n }\n .sparkline--cursor {\n stroke: orange;\n }\n\n .sparkline--spot {\n fill: red;\n stroke: red;\n }\n"])),(function(e){return e.theme.palette.primary.main}),(function(e){return e.theme.palette.primary.main}));function oe(e){var t=e.id,n=e.title,r=e.current,a=e.description,s=e.data,l=e.dateFn,c=e.valueFn,u=(0,i.useRef)(null),m=(0,i.useRef)(null),p=(0,G.Z)({style:{top:0,left:0},hidden:!0,textContent:""}),f=(0,i.useState)(null),h=(0,o.Z)(f,2),y=h[0],v=h[1],g=(0,J.Z)(y),x={onmousemove:function(e,t){var n=t.date,r=t.value;p.textContent="".concat(l(n),": ").concat(c(r)),p.style.top=-30,p.style.left=80,p.hidden=!1},onmouseout:function(){p.hidden=!0}};return(0,i.useEffect)((function(){setTimeout((function(){v(document.querySelector(".".concat(t))),setTimeout((function(){u.current&&(0,Q.Z)(u.current,s||[],x)}),400)}))}),[s]),(0,ne.jsx)(re,{title:n,value:r,graph:(0,ne.jsxs)("div",{className:"card-sparkline ".concat(t),style:{marginTop:16},children:[(0,ne.jsx)("svg",{ref:u,className:"sparkline",width:(null===g||void 0===g?void 0:g.width)||100,height:30,strokeWidth:"2"}),(0,ne.jsx)("span",{className:"tooltip",ref:m,hidden:p.hidden,style:(0,d.Z)({},p.style),children:p.textContent})]}),description:a})}oe.propTypes={id:K().string.isRequired,title:K().string.isRequired,current:K().any.isRequired,description:K().any,data:K().array,dateFn:K().func,valueFn:K().func},oe.defaultProps={description:null,data:[],dateFn:function(e){return e},valueFn:function(e){return e}};var ie=v()(0),se=function(e,t){return[{label:"This Week",startDate:(0,N.Z)(e,{locale:t}),endDate:(0,q.Z)(e,{locale:t})},{label:"Last Week",startDate:(0,N.Z)((0,Y.Z)(e,-1),{locale:t}),endDate:(0,q.Z)((0,Y.Z)(e,-1),{locale:t})},{label:"Last 7 Days",startDate:(0,Y.Z)(e,-1),endDate:e},{label:"This Month",startDate:(0,_.Z)(e),endDate:(0,M.Z)(e)},{label:"Last Month",startDate:(0,_.Z)((0,U.Z)(e,-1)),endDate:(0,M.Z)((0,U.Z)(e,-1))},{label:"This Year",startDate:(0,W.Z)(e),endDate:(0,B.Z)(e)},{label:"Last Year",startDate:(0,W.Z)((0,O.Z)(e,-1)),endDate:(0,B.Z)((0,O.Z)(e,-1))}]};function le(e){var t=e.client,n=e.did,r=h()().subtract(1,"day").toDate(),a=(0,V.h6)(),s=a.info,l=a.inService,c=(0,u.PE)(),f=c.t,y=c.locale,v=(0,i.useState)(null),g=(0,o.Z)(v,2),Z=g[0],N=g[1],q=(0,i.useState)(!1),Y=(0,o.Z)(q,2),_=Y[0],M=Y[1],U=(0,i.useState)(r),W=(0,o.Z)(U,2),B=W[0],O=W[1],X=(0,i.useState)({startDate:h()().subtract(30,"day").toDate(),endDate:r}),K=(0,o.Z)(X,2),G=K[0],J=K[1],Q=(0,j.Z)((0,p.Z)((0,m.Z)().mark((function e(){var r;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getTrafficInsights({input:{did:n,startDate:h()(G.startDate).format("YYYY-MM-DD"),endDate:h()(G.endDate).format("YYYY-MM-DD")}});case 2:return r=e.sent,e.abrupt("return",r.list);case 4:case"end":return e.stop()}}),e)}))));(0,i.useEffect)((function(){Q.loading||G.startDate&&G.endDate&&Q.retry()}),[G]);var $=function(e){N(Z?null:e.currentTarget)},ee=Q.value||[],te=Q.loading,re=Q.error;if(!ee.length&&te)return(0,ne.jsx)(P.Z,{});if(re)return(0,ne.jsx)(D.Z,{severity:"error",children:(0,A.Z)(re)});var ae={totalRequests:ie,validRequests:ie,failedRequests:ie,uniqueVisitors:ie,uniqueFiles:ie,uniqueReferrers:ie,uniqueNotFound:ie,uniqueStaticFiles:ie,logSize:b(),bandwidth:b()},le=Object.keys(ae).map((function(e){return{id:"".concat(e,"_chart"),title:f("analytics.traffic.".concat(e)),current:ee.length?ae[e](ee[0][e]):0,data:ee.map((function(t){return{date:t.date,value:t[e]}})).reverse(),dateFn:ie,valueFn:ae[e]}})),ce=Boolean(Z),ue=ce?"date-range-picker-popover":void 0,de=l?L.WELLKNOWN_SERVICE_PATH_PREFIX:s.routing.adminPath,me=x()(window.location.origin,de,"/api/analytics/traffic?date=".concat(h()(B).format("YYYY-MM-DD"),"&did=").concat(n));return(0,ne.jsxs)("div",{children:[(0,ne.jsxs)(I.Z,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:[f("analytics.trend"),(0,ne.jsxs)(F.Z,{onClick:$,variant:"outlined",size:"small",color:"secondary",children:[(0,A.pz)(G.startDate,y)," - ",(0,A.pz)(G.endDate,y)]})]}),(0,ne.jsx)(S.ZP,{id:ue,open:ce,anchorEl:Z,onClose:function(){return N(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,ne.jsx)(z.D,{open:!0,toggle:$,maxDate:r,definedRanges:se(B),onChange:function(e){J(e),N(null)}})}),(0,ne.jsx)(R.ZP,{container:!0,spacing:4,children:le.map((function(e){return(0,ne.jsx)(R.ZP,{item:!0,lg:3,md:6,sm:6,xs:12,children:(0,ne.jsx)(oe,(0,d.Z)({},e))},e.id)}))}),(0,ne.jsxs)(I.Z,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mt:4,mb:1,children:[f("analytics.detail"),(0,ne.jsxs)("span",{children:[_&&(0,ne.jsx)(w.Z,{onClick:function(){window.open(me)},style:{marginRight:32},children:(0,ne.jsx)(C.Z,{})}),(0,ne.jsx)(H._,{dateAdapter:T.y,children:(0,ne.jsx)(E.M,{disableFuture:!0,format:"ll",value:h()(B),onChange:function(e){O(e.toDate()),M(!1)},slotProps:{textField:{size:"small"}}})})]})]}),(0,ne.jsx)(k.Z,{url:me,width:"100%",height:"100%",frameBorder:0,onLoad:function(){return M(!0)},styles:{border:0,minHeight:"400vh"}})]})}var ce,ue=n(93033),de=n.n(ue),me=n(2291),pe=n(7017),fe=n(45008),he=n(59740),ye=function(e){return"".concat(e,"%")};function ve(e){var t=e.cpus,n=e.currentLoad,r=e.history,a=(0,i.useContext)(u.RD),o=a.t,s=a.locale;return(0,ne.jsx)(oe,{id:"cpu-sparkline",title:o("common.cpu"),current:"".concat(Math.floor(n||0),"%"),data:r,description:"".concat(o("system.cores"),": ").concat((null===t||void 0===t?void 0:t.length)||0),dateFn:function(e){return(0,A.mr)(e,"HH:mm:ss",s)},valueFn:ye})}function ge(e){var t=e.instanceCount,n=e.title,r=e.total,a=e.used,o=e.history,i=(0,u.PE)(),s=i.t,l=i.locale,c=!!r,d=r-a,m=c?"(".concat(Math.floor(a/r*100),"%)"):"",p=[];return t&&p.push({title:s("system.instances"),metric:t}),p.push({title:s("system.used"),metric:b()(a)}),c&&p.push({title:s("system.free"),metric:b()(d)},{title:s("system.total"),metric:b()(r)}),(0,ne.jsx)(oe,{id:"mem-sparkline",title:n||s("common.memory"),current:"".concat(b()(Math.floor(a||0))," ").concat(m),data:o,description:p.map((function(e,t){return(0,ne.jsxs)(te.Z,{sx:{marginLeft:0===t?0:2},children:[e.title,": ",e.metric]},e.title)})),dateFn:function(e){return(0,A.mr)(e,"HH:mm:ss",l)},valueFn:b()})}ve.propTypes={cpus:K().array,currentLoad:K().number,history:K().array},ve.defaultProps={cpus:[],currentLoad:0,history:[]},ge.propTypes={title:K().string,instanceCount:K().number,total:K().number,used:K().number,history:K().array},ge.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[]};var xe=["blocklet","cpuHistory","memoryHistory"];function Ze(e){var t=e.blocklet,n=e.cpuHistory,r=e.memoryHistory,a=(0,he.Z)(e,xe),o=t.appRuntimeInfo||{};return(0,ne.jsx)(je,(0,d.Z)((0,d.Z)({component:"div"},a),{},{children:(0,ne.jsxs)(R.ZP,{className:"page-metrics",container:!0,spacing:5,children:[(0,ne.jsx)(R.ZP,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&(0,ne.jsx)(ve,{currentLoad:o.cpuUsage||0,history:n,style:{height:150}})},"cpu"),(0,ne.jsx)(R.ZP,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!r.length&&(0,ne.jsx)(ge,{used:o.memoryUsage||0,history:r,style:{height:150}})},"memory")]})}))}Ze.propTypes={blocklet:K().object.isRequired,cpuHistory:K().arrayOf(K().shape({date:K().number,value:K().number})),memoryHistory:K().arrayOf(K().shape({date:K().number,value:K().number}))},Ze.defaultProps={cpuHistory:[],memoryHistory:[]};var be,je=(0,s.Z)(I.Z)(ce||(ce=(0,a.Z)([""]))),ke=n(70998);function De(){var e=(0,u.PE)(),t=e.t,n=e.locale,r=(0,fe.y0)(),a=r.blocklet,o=r.runtimeHistory,s=r.actions.refreshBlocklet,l=(0,i.useMemo)((function(){var e=[];return(0,pe.forEachBlockletSync)(a,(function(t,n){var r=n.ancestors,o=n.id,i=n.level;t.runtimeInfo&&e.push({type:"blocklet",groupId:a.meta.did,groupName:(0,pe.getDisplayName)(a),id:o,name:(0,pe.getDisplayName)(t,!0),blocklet:a,component:t,level:i-1>=0?i-1:0,runtimeInfo:t.runtimeInfo,ancestors:r})})),e}),[a]);(0,i.useEffect)((function(){var e=setInterval((function(){s()}),1e4);return function(){clearInterval(e)}}),[]);var c=[{label:t("common.name"),name:"name",options:{customBodyRenderLite:function(e){var t=l[e],n=t.name,r=t.component,a=t.level,o=t.ancestors;return(0,ne.jsxs)(te.Z,{display:"flex",alignItems:"center",pl:2*a,children:[(0,ne.jsx)(ke.Z,{size:14,blocklet:r,ancestors:o}),(0,ne.jsx)(te.Z,{ml:1,children:n})]})}}},{label:t("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite:function(e){var t,r=l[e].runtimeInfo;return t=r.uptime,de()(Number(t||0),{locale:(0,A.FF)(n)})}}},{label:t("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite:function(e){var t=l[e].runtimeInfo;return b()((null===t||void 0===t?void 0:t.memoryUsage)||0)}}},{label:t("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite:function(e){var t=l[e].runtimeInfo;return"".concat((t.cpuUsage||0).toFixed(1),"%")}}},{label:t("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"}];return(0,ne.jsxs)(Re,{component:"div",children:[(0,ne.jsx)(I.Z,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:t("analytics.trend")}),"running"===a.status?[(0,ne.jsx)(te.Z,{children:(0,ne.jsx)(Ze,{blocklet:a,cpuHistory:o.cpu,memoryHistory:o.memory})}),(0,ne.jsx)(te.Z,{mt:3,children:(0,ne.jsx)(me.Z,{title:t("analytics.detail"),className:"monitor-table",locale:n,data:l,columns:c,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:(0,ne.jsx)(I.Z,{children:t("blocklet.runtimeInfo.noRunning")})]})}De.propTypes={};var Pe,Re=(0,s.Z)(I.Z)(be||(be=(0,a.Z)([""]))),Ie=n(23938);function Fe(){var e=(0,i.useContext)(u.RD).t,t=(0,Ie.y0)(),n=t.did,r=t.client,a=(0,l.lr)(),s=(0,o.Z)(a,2),d=s[0],m=s[1],p=(0,i.useState)(d.get("tab")||"traffic"),f=(0,o.Z)(p,2),h=f[0],y=f[1];(0,i.useEffect)((function(){d.set("tab",h),m(d,{replace:!0})}),[h]);var v=[{label:e("common.traffic"),value:"traffic"},{label:e("common.runtime"),value:"runtime"}],g={traffic:le,runtime:De},x=g[h]||g.traffic;return(0,ne.jsxs)(we,{children:[(0,ne.jsx)(c.Z,{tabs:v,current:h,onChange:function(e){y(e)}}),(0,ne.jsx)("div",{className:"page-content",children:(0,i.isValidElement)(x)?x:(0,ne.jsx)(x,{client:r,did:n})})]},h)}var we=s.Z.main(Pe||(Pe=(0,a.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .page-content {\n margin-top: 16px;\n }\n"])))},70998:function(e,t,n){n.d(t,{Z:function(){return y}});var r=n(33028),a=n(59740),o=n(24974),i=n.n(o),s=n(59467),l=n(62399),c=n(19611),u=n.n(c),d=n(20244),m=n(41395),p=n(24891);var f=n(37574),h=["blocklet","style","size","ancestors"];function y(e){var t=e.blocklet,n=e.style,o=e.size,i=e.ancestors,c=(0,a.Z)(e,h),y=(0,m.h6)(),v=function(e){var t,n=e.blocklet,r=e.ancestors,a=void 0===r?[]:r,o=(0,m.h6)(),i=o.inService,s="?v=".concat(null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.version).concat((0,p.XN)(null===n||void 0===n?void 0:n.status)?"~":""),l=i?u()(p.zn,d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",s):u()(o.imgPrefix,"blocklet.png");if("registry"===n.source&&n.deployedFrom&&n.meta.logo)l=u()(n.deployedFrom,(0,p.lk)(n.meta.bundleDid,n.meta.logo),s);else{var c=window.env.apiPrefix||"/",f=a.concat(n),h=i?f.slice(1):f;l=u()(c,"/blocklet/logo-bundle".concat(h.map((function(e){return"/".concat(e.meta.did)})).join("")),s)}return{logoUrl:l,inService:i}}({blocklet:t,ancestors:i}),g=v.logoUrl,x=v.inService,Z=c.variant,b=x?function(){}:function(e){e.target.src="".concat(y.imgPrefix,"/blocklet.png")},j=(0,f.jsx)("img",{src:g,onError:b,alt:t.meta.name,style:{width:o}});return t.meta.logo||(j=(0,f.jsx)(l.Z,{did:t.meta.did||"",responsive:!0})),(0,f.jsx)(s.Z,(0,r.Z)((0,r.Z)({variant:Z||"square",style:Object.assign({backgroundColor:"transparent",width:o,height:o,borderRadius:10},n)},c),{},{children:j}))}y.propTypes={blocklet:i().object.isRequired,style:i().object,size:i().oneOfType([i().number,i().string]),ancestors:i().array},y.defaultProps={style:{},size:40,ancestors:[]}}}]);
|
|
2
|
+
//# sourceMappingURL=5569.a7e151fc.chunk.js.map
|