@abtnode/blocklet-services 1.16.18-beta-bb4ebacc → 1.16.18-beta-41b7fdb1
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/libs/image.js +19 -12
- package/api/routes/federated.js +4 -1
- package/api/routes/oauth.js +11 -2
- package/api/routes/user.js +4 -4
- package/build/asset-manifest.json +17 -17
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/css/{5547.5f9be15f.chunk.css → 5547.e016de4c.chunk.css} +3 -3
- package/build/static/js/4076.f5369a1d.chunk.js +2 -0
- package/build/static/js/{4461.26253c6a.chunk.js → 4461.3cd698bf.chunk.js} +2 -2
- package/build/static/js/5547.570ded36.chunk.js +3 -0
- package/build/static/js/{5547.d68bfde3.chunk.js.LICENSE.txt → 5547.570ded36.chunk.js.LICENSE.txt} +2 -3
- package/build/static/js/{5569.a7e151fc.chunk.js → 5569.e4bfe697.chunk.js} +2 -2
- package/build/static/js/6218.4f3036a7.chunk.js +2 -0
- package/build/static/js/{6629.376863d2.chunk.js → 6629.a4a3fb70.chunk.js} +3 -3
- package/build/static/js/main.bf370e0c.js +3 -0
- package/build/static/js/{main.36b0deea.js.LICENSE.txt → main.bf370e0c.js.LICENSE.txt} +1 -1
- package/package.json +23 -23
- package/build/static/js/4076.5ca97365.chunk.js +0 -2
- package/build/static/js/5547.d68bfde3.chunk.js +0 -3
- package/build/static/js/6218.9a4feced.chunk.js +0 -2
- package/build/static/js/main.36b0deea.js +0 -3
- /package/build/static/js/{6629.376863d2.chunk.js.LICENSE.txt → 6629.a4a3fb70.chunk.js.LICENSE.txt} +0 -0
package/build/static/js/{5547.d68bfde3.chunk.js.LICENSE.txt → 5547.570ded36.chunk.js.LICENSE.txt}
RENAMED
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
|
|
58
58
|
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
|
|
59
59
|
*
|
|
60
|
-
* @param
|
|
61
|
-
* @param
|
|
62
|
-
* @returns {any[]} interpolated
|
|
60
|
+
* @param phrase that needs interpolation, with placeholders
|
|
61
|
+
* @param options with values that will be used to replace placeholders
|
|
63
62
|
*/
|
|
@@ -1,2 +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.
|
|
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),b=n(99237),Z=n.n(b),j=n(22073),k=n(95973),D=n(18877),P=n(94308),I=n(3994),R=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)(R.Z,{sx:{fontSize:14},color:"text.secondary",children:n}),(0,ne.jsx)(R.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),b=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(b?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:Z(),bandwidth:Z()},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(b),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)(R.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:b,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)(I.ZP,{container:!0,spacing:4,children:le.map((function(e){return(0,ne.jsx)(I.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)(R.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:Z()(a)}),c&&p.push({title:s("system.free"),metric:Z()(d)},{title:s("system.total"),metric:Z()(r)}),(0,ne.jsx)(oe,{id:"mem-sparkline",title:n||s("common.memory"),current:"".concat(Z()(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:Z()})}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 be(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)(I.ZP,{className:"page-metrics",container:!0,spacing:5,children:[(0,ne.jsx)(I.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)(I.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")]})}))}be.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}))},be.defaultProps={cpuHistory:[],memoryHistory:[]};var Ze,je=(0,s.Z)(R.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 Z()((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"},{label:t("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return(0,ne.jsxs)(Ie,{component:"div",children:[(0,ne.jsx)(R.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)(be,{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)(R.Z,{children:t("blocklet.runtimeInfo.noRunning")})]})}De.propTypes={};var Pe,Ie=(0,s.Z)(R.Z)(Ze||(Ze=(0,a.Z)([""]))),Re=n(23938);function Fe(){var e=(0,i.useContext)(u.RD).t,t=(0,Re.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,b=c.variant,Z=x?function(){}:function(e){e.target.src="".concat(y.imgPrefix,"/blocklet.png")},j=(0,f.jsx)("img",{src:g,onError:Z,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:b||"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.e4bfe697.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[6218],{36218:function(e,n,o){o.r(n),o.d(n,{default:function(){return B}});var t=o(32723),i=o(34795),r=o(35147),a=o(49476),s=o(30969),c=o(30734),l=o(19611),d=o.n(l),u=o(94308),p=o(38361),f=o(238),h=o(1986),m=o(26022),v=o(48164),x=o(86776),g=o(32263),w=o(85300),Z=o(4485),j=o(38507),b=o(33028),k=o(59740),P=o(33359),I=o(6779),y=o(72097),C=o(70898),L=o(22797),T=o(23586),N=o(37574);function R(e){var n=e.blocklet;return(0,N.jsxs)(p.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between"},children:[(0,N.jsx)(L.Z,{variant:"rounded",shape:"square",did:n.appPid,src:n.appLogo,size:80}),(0,N.jsx)(P.Z,{component:"h2",variant:"h6",children:n.appName}),(0,N.jsx)(T.Z,{did:n.appPid})]})}var U=(0,s.memo)(R);R.defaultProps={blocklet:window.blocklet};var W=["children","cta"],S=["passports","onConnect","onClose","redirect"],_=function(){var e,n,o=null===(e=window.blocklet)||void 0===e||null===(n=e.componentMountPoints)||void 0===n?void 0:n.find((function(e){return"z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk"===e.did}));return null===o||void 0===o?void 0:o.mountPoint};function z(e){var n=e.children,o=e.cta,t=(0,k.Z)(e,W);return(0,N.jsxs)(p.Z,(0,b.Z)((0,b.Z)({},t),{},{children:[n?(0,N.jsx)(p.Z,{sx:{maxHeight:"50vh",overflow:"hidden",position:"relative",":after":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"80%",background:"linear-gradient(transparent, #fff 85%)"}},children:n}):null,o?(0,N.jsx)(p.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",py:4,borderRadius:2},children:o}):null]}))}function D(e){var n=e.passports,o=e.onConnect,t=(e.onClose,e.redirect),i=(0,k.Z)(e,S),r=(0,m.PE)().t,a=_();return(0,N.jsxs)(p.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",maxWidth:"400px",margin:"auto",paddingBottom:{sx:0,md:15}},children:[(0,N.jsx)(U,{}),(0,N.jsx)(z,(0,b.Z)((0,b.Z)({},i),{},{cta:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(P.Z,{variant:"h4",sx:{mx:2,textAlign:"center",fontWeight:"bold",color:"warning.main"},children:r("login.accessLimit.title")}),(0,N.jsx)(P.Z,{variant:"body1",sx:{maxWidth:620,mt:2,mx:2,textAlign:"center",color:"gray"},children:r("login.accessLimit.description")}),(0,N.jsx)(p.Z,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:1,mt:5},children:null===n||void 0===n?void 0:n.map((function(e){var n=function(e){var n=null===e||void 0===e?void 0:e.payable;return a&&n?d()(a,"/api/redirect/checkout/".concat(n,"?redirect=").concat(t)):null}(e);return n?(0,N.jsx)(I.Z,{title:r("login.accessLimit.buyPassport"),arrow:!0,placement:"top",children:(0,N.jsx)(y.Z,{color:"primary",variant:"contained",endIcon:(0,N.jsx)(C.Z,{}),href:n,target:"_blank",children:e.title||e.name})},e.name):(0,N.jsx)(I.Z,{title:r("login.connectWithPassport"),arrow:!0,placement:"top",children:(0,N.jsx)(y.Z,{color:"inherit",variant:"contained",onClick:o,children:e.title||e.name})},e.name)}))}),(0,N.jsxs)(P.Z,{variant:"body1",sx:{mt:2,color:"grey.400"},children:[(0,N.jsx)(p.Z,{component:"span",sx:{display:"inline-block",mr:1},children:r("login.accessLimit.alreadyHavePassport")}),(0,N.jsx)(p.Z,{component:"span",sx:{textDecoration:"underline",cursor:"pointer",color:"primary.main"},onClick:o,children:r("common.connect")})]})]})}))]})}z.defaultProps={children:null,cta:null},D.defaultProps={passports:[],onConnect:function(){},onClose:function(){}};var H=function(e){setTimeout((function(){var n=new URL(window.location.href).searchParams.get("redirect");if(n){var o=decodeURIComponent(n);o.startsWith(w.Bu)?e(o,{replace:!0}):window.location=o}else window.location=window.env.pathPrefix||"/"}),50)};function B(){var e=(0,s.useRef)(null),n=(0,Z.Tt)().session,o=(0,m.PE)(),l=o.t,b=o.locale,k=(0,x.Z)().getPassportId,P=(0,c.useNavigate)(),I=(0,g.OP)(),y=new URL(window.location.href).searchParams,C={passportId:k()},L=y.get("componentId"),T=y.get("authenticated"),R=y.get("sessionToken"),U=y.get("refreshToken"),W=y.get("requiredRoles"),S=y.get("redirect");L&&(C.componentId=L),I&&(C.visitorId=I);var _=[];try{_=JSON.parse(W)}catch(M){}var z=function(){var e=(0,i.Z)((0,t.Z)().mark((function e(o,i){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,j.ZB)(i(o.sessionToken)),(0,j.zI)(i(o.refreshToken)),o.visitorId&&(0,g.IA)(i(o.visitorId)),e.next=5,n.refresh();case 5:H(P);case 6:case"end":return e.stop()}}),e)})));return function(n,o){return e.apply(this,arguments)}}(),B=(0,r.Z)((function(){var e,n=null===(e=window)||void 0===e?void 0:e.blocklet,o={className:"connect",popup:!1,action:"login",onSuccess:z,onError:q,locale:b,messages:{title:l("login.dialog.title"),scan:l("login.dialog.scan"),confirm:l("login.dialog.confirm"),success:l("login.dialog.success")},extraParams:C,baseUrl:window.location.origin,prefix:window.location.origin+d()(w.Bu,w.nC)},t=(0,v.CF)(),i=(0,v.pS)()?t.appUrl:window.location.origin,r=new URL(d()(w.Bu,"connect"),i);r.searchParams.set("params",btoa(encodeURIComponent(JSON.stringify(o)))),r.searchParams.set("appPid",null===n||void 0===n?void 0:n.appPid),r.searchParams.set("appName",null===n||void 0===n?void 0:n.appName),r.searchParams.set("locale",b),r.searchParams.set("redirect",window.location.href),window.location.href=r.href}));(0,a.Z)((function(){y.get("sessionToken")?z({sessionToken:R,refreshToken:U,visitorId:y.get("visitorId")},(function(e){return e})):n.user?T||y.get("sessionToken")||H(P):B()}));var q=function(e){h.Z.error(e.message)};if(n.loading||n.user){if(!T||y.get("sessionToken"))return(0,N.jsx)(f.Z,{children:(0,N.jsx)(u.Z,{})});var A=S?new URL(S,window.location.origin).href:window.location.href;return(0,N.jsx)(D,{onConnect:B,passports:_,redirect:A})}return(0,N.jsx)(p.Z,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:e})}},86776:function(e,n,o){function t(){return{getPassportId:function(){var e=localStorage.getItem("passportId")||"";return localStorage.removeItem("passportId"),e},setPassportId:function(e){localStorage.setItem("passportId",e)}}}o.d(n,{Z:function(){return t}})},70898:function(e,n,o){var t=o(71600);n.Z=void 0;var i=t(o(48035)),r=o(37574),a=(0,i.default)((0,r.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"LaunchOutlined");n.Z=a}}]);
|
|
2
|
+
//# sourceMappingURL=6218.4f3036a7.chunk.js.map
|