@abtnode/blocklet-services 1.16.39-beta-20250212-101102-2d68fc2a → 1.16.39-beta-20250213-085550-20ef6d4f
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/connect/session.js +4 -4
- package/api/libs/kyc.js +0 -4
- package/dist/assets/add-component-core-CF05FURP.js +1 -1
- package/dist/assets/add-resource-u9CnYHQ7.js +1 -1
- package/dist/assets/analytics-sm8oL_To.js +1 -1
- package/dist/assets/audit-logs-Cre3WUIo.js +1 -1
- package/dist/assets/complete-DY43z8bC.js +1 -1
- package/dist/assets/component-C3wYVoFz.js +1 -1
- package/dist/assets/config-navigation-xcMpeduS.js +1 -1
- package/dist/assets/connect-hKwHeTo3.js +1 -1
- package/dist/assets/dashboard-DQnfagMU.js +2 -2
- package/dist/assets/email-D3sOIREb.js +1 -1
- package/dist/assets/exchange-passport-CS0Md1xZ.js +1 -1
- package/dist/assets/index-B9Bc9vnG.js +1 -1
- package/dist/assets/index-BoVroYzD.js +1 -1
- package/dist/assets/index-C9UnRN7C.js +1 -1
- package/dist/assets/index-C9lMjZBr.js +1 -1
- package/dist/assets/index-DVfi3VUs.js +1 -1
- package/dist/assets/index-Dq1yoqB-.js +1 -1
- package/dist/assets/index-p0322yKe.js +1 -1
- package/dist/assets/invite-Lcgs0Fhi.js +1 -1
- package/dist/assets/issue-passport-pkmrmS7N.js +1 -1
- package/dist/assets/item-B6N6t3kF.js +1 -1
- package/dist/assets/login-BbaHO4Ca.js +1 -1
- package/dist/assets/lost-passport-C9bxtr1Q.js +1 -1
- package/dist/assets/open-window-YQ4vV2tF.js +1 -1
- package/dist/assets/overview-GoLeUZDo.js +1 -1
- package/dist/assets/publish-resource-Czivui9b.js +1 -1
- package/dist/assets/setup-6BkYc-NJ.js +2 -2
- package/dist/assets/start-C6UPvOLP.js +1 -1
- package/package.json +21 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-GoLeUZDo.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-react-D-afvo_7.js","assets/vendor-arcblock-DE69EmW_.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/index-BdfWmlqh.js","assets/index-DVfi3VUs.js","assets/did-address-CsW_VsB3.js","assets/domain-list-Bc7A7RER.js","assets/Add-CuIZWfjH.js","assets/base32-LsxuOFGQ.js","assets/LockIcon-D-W4Rph6.js","assets/CheckCircle-D-unagro.js","assets/util-BTCA4Hee.js","assets/useSetState-Crt4S51m.js","assets/permission-BQ0E8FmL.js","assets/session-DKWhsUi1.js","assets/useAsyncRetry-Bmo6a1Zp.js","assets/useAsync-Ua5iss51.js","assets/confirm-DfsY08eB.js","assets/format-error-C0Ke3VXF.js","assets/InfoOutlined-C8xfkBe6.js","assets/api-K65cLqol.js","assets/actions-DDpgZ17S.js","assets/MoreHoriz-DbMNKpjF.js","assets/useLocalStorage-DYSzZAco.js","assets/PlayArrow-CZfWYrXK.js","assets/get-safe-url-
|
|
2
|
-
import{y as Ge,f as M,h as J,z as et,A as rs,b as ss,B as os,C as is,D as An,E as On,F as fe,G as $n,H as as,o as je,I as cs,J as ls,k as ln,g as us,j as ds,m as un,l as fs,n as ps,K as Oe,e as Re,L as hs,_ as B,M as ms,O as dn,N as gs,c as fn}from"./index-DVfi3VUs.js";import{a1 as U,j as o,E as m,aa as te,I as vt,ak as xs,ad as Mn,ah as yt,al as vs,bm as ys,a2 as re,bn as bs,bq as js,T as N,bx as ws,aN as pn,by as hn,a3 as I,a4 as ze,bz as Ss,t as Q,Z as Qe,bA as Cs,a5 as _s,bB as Is,bp as bt,am as Nn,bC as Es,aq as Ls,as as Ts,bD as zn,bE as Bn,bF as Un,A as ae,aj as Hn,aK as Ps}from"./vendor-mui-core-xF5F4eT7.js";import{$ as H,a9 as Rs,a1 as jt,aa as Ds,a2 as wt,b as $,Y as mn,j as ee,e as X,Z as ks,ab as As,ac as Fn,ad as Os,ae as $s,D as St,af as Vn,ag as Ms,ah as Ns,ai as zs,C as Be,aj as Bs,U as Us,ak as Hs,al as Fs,H as Vs,R as qs,am as Ws}from"./vendor-arcblock-DE69EmW_.js";import{r as x,L as qn,k as Wn,f as Ks,l as Gs}from"./vendor-react-D-afvo_7.js";import{d as Ue,s as Qs}from"./vendor-hooks-BKxTDk_P.js";import{x as Ct,a6 as Zs,a7 as Xs,y as $e,w as Ys}from"./vendor-utils-5TjOM6td.js";import{_ as gn}from"./useLocalStorage-DYSzZAco.js";import{C as xn}from"./confirm-DfsY08eB.js";import{d as Js}from"./PlayArrow-CZfWYrXK.js";import{g as vn}from"./get-safe-url-BVbIl2hB.js";import{f as _t}from"./format-error-C0Ke3VXF.js";import{c as ye,s as He,H as eo,h as Fe,f as Kn,p as Gn,B as to}from"./index-DUVrFM9m.js";import{u as Qn}from"./session-DKWhsUi1.js";import{D as no,_ as Zn}from"./useAsyncRetry-Bmo6a1Zp.js";import{d as ro}from"./InfoOutlined-C8xfkBe6.js";import{_ as Xn}from"./useSetState-Crt4S51m.js";var It={},so=U;Object.defineProperty(It,"__esModule",{value:!0});var Yn=It.default=void 0,oo=so(H()),io=o;Yn=It.default=(0,oo.default)((0,io.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Et={},ao=U;Object.defineProperty(Et,"__esModule",{value:!0});var Jn=Et.default=void 0,co=ao(H()),lo=o;Jn=Et.default=(0,co.default)((0,lo.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Lt={},uo=U;Object.defineProperty(Lt,"__esModule",{value:!0});var er=Lt.default=void 0,fo=uo(H()),po=o;er=Lt.default=(0,fo.default)((0,po.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var Tt={},ho=U;Object.defineProperty(Tt,"__esModule",{value:!0});var tr=Tt.default=void 0,mo=ho(H()),go=o;tr=Tt.default=(0,mo.default)((0,go.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var Pt={},xo=U;Object.defineProperty(Pt,"__esModule",{value:!0});var nr=Pt.default=void 0,vo=xo(H()),yo=o;nr=Pt.default=(0,vo.default)((0,yo.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var Rt={},bo=U;Object.defineProperty(Rt,"__esModule",{value:!0});var rr=Rt.default=void 0,jo=bo(H()),wo=o;rr=Rt.default=(0,jo.default)((0,wo.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Dt={},So=U;Object.defineProperty(Dt,"__esModule",{value:!0});var sr=Dt.default=void 0,Co=So(H()),_o=o;sr=Dt.default=(0,Co.default)((0,_o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var kt={};Object.defineProperty(kt,"__esModule",{value:!0});var or=kt.default=void 0;Io(x);var yn=o;function Io(e){return e&&e.__esModule?e:{default:e}}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bn(Object(n),!0).forEach(function(r){Eo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eo(e,t,n){return(t=Lo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lo(e){var t=To(e,"string");return typeof t=="symbol"?t:t+""}function To(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var At=function(t){return(0,yn.jsx)("svg",jn(jn({},t),{},{children:(0,yn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})}))};At.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};At.displayName="dashboard";or=kt.default=At;var Ot={},Po=U;Object.defineProperty(Ot,"__esModule",{value:!0});var ir=Ot.default=void 0,Ro=Po(H()),Do=o;ir=Ot.default=(0,Ro.default)((0,Do.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const de={Start:Js,Stop:Yn,Restart:Jn,Reload:er,Remove:Rs,Config:tr,Log:nr,Group:rr,Cancel:sr,Dashboard:or,Overview:ir},ko=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),s=new URL(Ct(n.origin,t));return s.search=r.toString(),s.toString()},Ao="internal",Oo="external";function $t({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:s,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=Ge(),[u,d]=x.useState(null),[f,p]=x.useState(null),[v,w]=x.useState(!1),[h,S]=x.useState(null),{t:y}=x.useContext(jt),[T]=gn("skip-blocklet-setup",!1),{loading:E,recommendedUrl:R}=a(e),[k]=gn("blocklet-type-filter",Ao),j=M.isInProgress(e.status),[b,C]=x.useState(!1);x.useEffect(()=>{var D,z;if(!(e!=null&&e.controller))return;C(((z=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:z.value)===J.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,Y,oe;try{const W=await l.api.getLauncherSession({input:{launcherSessionId:(q=e==null?void 0:e.controller)==null?void 0:q.launcherSessionId,launcherUrl:(Y=e==null?void 0:e.controller)==null?void 0:Y.launcherUrl}});if(W!=null&&W.error){console.error("get launcher session failed",W.error);return}C([$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((oe=W==null?void 0:W.launcherSession)==null?void 0:oe.status))}catch(W){console.error("call getLauncherSession error",W)}})()},[]);const{inService:_}=l,L=(g,D,z=!1)=>async()=>{const q=async Le=>{var Pe;t({action:g,blocklet:e}),w(!0),p(g);let Te=!1;try{if(g==="remove")await D(Le);else if(g==="start"){if(!M.hasRunnableComponent(e)){ee.error(y("blocklet.noComponent"));return}if(!_&&!T&&!((Pe=e.settings)!=null&&Pe.initialized)&&e.mode!==J.BLOCKLET_MODES.DEVELOPMENT){if(!R||!mn(R)){ee.error(y("blocklet.gotoVisitError"));return}const G=rs(l.info),cn=new URL(R);cn.searchParams.set("serverUrl",G),window.open(vn(cn.href,{allowDomains:null})),n({action:g,blocklet:e});return}const ie=e.children.filter(G=>!M.isInProgress(G.status)&&G.status!=="running").map(G=>G.meta.did),ue={did:e.meta.did,componentDids:ie};await D({input:ue})}else if(["stop","restart","reload"].includes(g)){const ie=e.children.filter(G=>G.status==="running").map(G=>G.meta.did),ue={did:e.meta.did,componentDids:ie};await D({input:ue})}else{const ie={did:e.meta.did};await D({input:ie})}g==="remove"?Te=!0:await ss(1e3),g==="reload"&&ee.success(y("blocklet.reloadSuccess")),S(null),n({action:g,blocklet:e})}catch(ie){const ue=`Blocklet ${g} failed: ${_t(ie)}`;throw n({action:g,blocklet:e,error:new Error(ue)}),new Error(ue)}finally{Te||w(!1)}},Y=()=>{w(!1),S(null)},oe=M.getDisplayName(e,!0),W=e.mode===J.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(N,{component:"div",children:o.jsx(N,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Le,Te)=>o.jsxs(N,{component:"div",children:[o.jsx(N,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")}),o.jsxs(ws,{name:"removeType",value:Le.removeType,onChange:Pe=>Te({...Le,removeType:Pe.target.value}),children:[o.jsx(pn,{value:"backup",control:o.jsx(hn,{}),label:y("blocklet.action.removeApplicationAfterBackup")}),o.jsx(pn,{value:"complete",control:o.jsx(hn,{}),label:y("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ns={stop:{title:`${y("common.stop")} ${oe}`,description:y("blocklet.action.stopDescription"),confirm:y("blocklet.action.confirmStop"),cancel:y("common.cancel"),onConfirm:q,onCancel:Y},restart:{title:`${y("common.restart")} ${oe}`,description:y("blocklet.action.restartDescription"),confirm:y("blocklet.action.confirmRestart"),cancel:y("common.cancel"),onConfirm:q,onCancel:Y},remove:{title:`${y("common.remove")} ${oe}`,confirm:y("blocklet.action.confirmRemove"),cancel:y("common.cancel"),onConfirm:q,onCancel:Y,...W},cancelDownload:{title:`${y("common.cancel")}`,description:y("blocklet.action.cancelDownloadDescription",{name:oe}),confirm:y("common.confirm"),cancel:y("common.cancel"),onConfirm:q,onCancel:Y}};z?S(ns[g]):await q()},P=!!u,F=g=>{try{g.stopPropagation(),g.preventDefault()}catch{}d(g.currentTarget)},V=g=>{try{g.stopPropagation(),g.preventDefault()}catch{}d(null)},Ie=async(g,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof g.handler=="function")try{w(!0),p(g.action),await g.handler()}catch(z){console.error(`Blocklet ${g.name} failed: `,z)}finally{w(!1),d(null)}else d(null)},Yr=!_&&M.isDeletableBlocklet(e)?{action:"remove",icon:de.Remove,name:y("common.remove"),handler:L("remove",async({removeType:g})=>{g==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,Jr={action:"remove",icon:({sx:g,...D})=>o.jsx(de.Cancel,{sx:{...g,paddingRight:"2px",zoom:.95},...D}),name:y("common.cancel"),handler:L("cancelDownload",l.api.cancelDownloadBlocklet,!0)},es=M.getAppMissingConfigs(e),ts=()=>{var q;const g=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=i==null?void 0:i({mountPoint:g,blocklet:e});if(!D||!mn(D)){ee.error(y("blocklet.gotoVisitError"));return}const z=(q=e==null?void 0:e.site)==null?void 0:q.domainAliases;window.open(vn(ko(D,".well-known/service/admin"),{allowDomains:z==null?void 0:z.map(Y=>Y.value)}))};let Ee=[{action:"start",icon:de.Start,inExternal:!0,name:y("common.start"),handler:L("start",l.api.startBlocklet),disabled:b||e.children.every(g=>g.status==="running")||et(e.status)||E||j},{action:"stop",icon:de.Stop,inExternal:!0,name:y("common.stop"),handler:L("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:de.Restart,name:y("common.restart"),handler:L("restart",l.api.restartBlocklet,!0),disabled:b||e.status!=="running"},et(e.status)?Jr:Yr,{separator:!0},_?null:{action:"dashboard",icon:({style:g,...D})=>o.jsx(de.Dashboard,{...D,style:{...g,width:"26px",height:"26px",paddingRight:"3px"}}),name:y("sidebar.dashboard"),handler:ts}].filter(Boolean);return k===Oo&&(Ee=Ee.filter(g=>g.inExternal)),r==="menu"?o.jsxs(wn,{"data-cy":"blocklet-actions",children:[o.jsx(vt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:F,size:"small",disabled:!s||!et(e.status)&&v,children:o.jsx(Ds,{})}),o.jsxs(xs,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:P,onClose:V,PaperProps:{},children:[es.length>0&&o.jsxs(Mn,{style:{maxWidth:"400px"},severity:"error",children:[y("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(qn,{to:`/blocklets/${e.meta.did}/components`,children:y("blocklet.config.gotoFix")})]}),Ee.map((g,D)=>g.separator?o.jsx(yt,{},`separator-${D}`):o.jsxs(vs,{dense:!0,onClick:z=>Ie(g,z),disabled:v||g.disabled,"data-cy":`${g.action}-blocklet`,children:[o.jsx(ys,{style:{minWidth:24},children:f===g.action&&v?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(g.icon,{fontSize:"small"})}),o.jsx(bs,{primary:g.name})]},g.name))]}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):o.jsxs(wn,{"data-cy":"blocklet-actions",...c,children:[o.jsx(js,{children:Ee.filter(g=>!g.separator&&!g.onlyInMenu).map(g=>o.jsxs(wt,{title:g.name,"data-cy":`${g.action}-blocklet`,onClick:()=>Ie(g),disabled:!!g.disabled||v,children:[f===g.action&&v?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(g.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:g.name})]},g.name))}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}$t.propTypes={getComponentUrl:m.func,blocklet:m.object.isRequired,onStart:m.func.isRequired,onComplete:m.func.isRequired,variant:m.oneOf(["menu","group"]),hasPermission:m.bool,useBlockletUrlEvaluation:m.func};$t.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const wn=te.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-GoLeUZDo.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-react-D-afvo_7.js","assets/vendor-arcblock-DE69EmW_.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/index-BdfWmlqh.js","assets/index-DVfi3VUs.js","assets/did-address-CsW_VsB3.js","assets/domain-list-Bc7A7RER.js","assets/Add-CuIZWfjH.js","assets/base32-LsxuOFGQ.js","assets/LockIcon-D-W4Rph6.js","assets/CheckCircle-D-unagro.js","assets/util-BTCA4Hee.js","assets/useSetState-Crt4S51m.js","assets/permission-BQ0E8FmL.js","assets/session-DKWhsUi1.js","assets/useAsyncRetry-Bmo6a1Zp.js","assets/useAsync-Ua5iss51.js","assets/confirm-DfsY08eB.js","assets/format-error-C0Ke3VXF.js","assets/InfoOutlined-C8xfkBe6.js","assets/api-K65cLqol.js","assets/actions-DDpgZ17S.js","assets/MoreHoriz-DbMNKpjF.js","assets/useLocalStorage-DYSzZAco.js","assets/PlayArrow-CZfWYrXK.js","assets/get-safe-url-SccGjxz4.js","assets/index-DUVrFM9m.js","assets/index-BoVroYzD.js","assets/index-DoZ2YM4T.js","assets/Loop-Dlnais4C.js","assets/ViewList-CV3Yxakp.js","assets/list-header-DxG3xooH.js","assets/click-to-copy-BLRxskBB.js","assets/DeleteOutline-CnjMnu1G.js","assets/util-BblN2lT9.js","assets/sdk-CBf7wJy0.js","assets/index-o2FFW-yx.js","assets/shorten-label-J69eHfMN.js","assets/index-C9lMjZBr.js","assets/EditIcon-BOr0kf6I.js","assets/Google-CSRPwRzS.js","assets/cloneDeep-BRiLvZjr.js","assets/index-Dq1yoqB-.js","assets/iframe-De6QHL_6.js","assets/config-5CfgPrCe.js","assets/form-text-input-AT4HfkHl.js","assets/Done-C8ZSABDp.js","assets/logo-uploader-DZitXtFf.js","assets/ArrowDropDown-Cv3eCDY6.js","assets/ChevronRight-DSecMzs8.js","assets/bundle-avatar-7g1gtR_Q.js","assets/simple-select-D06JmA0a.js","assets/isEmail-BWNRBSAy.js","assets/switch-control-1mrS2A0x.js","assets/audit-logs-Cre3WUIo.js","assets/index-ChSPqVLh.js","assets/index-D4PP6P2d.css","assets/relative-time-Bkhqzrgv.js","assets/index-DtwN19zv.js","assets/index-B9Bc9vnG.js","assets/list-D3MtvbeT.js","assets/index-CHFvfli7.js","assets/traffic-CoKCU9bb.js","assets/LaunchOutlined-DmwI20ey.js","assets/ChevronLeft-Gy0Fh2PP.js","assets/index-C-D-nCB1.js","assets/vendor-mui-x-CSUdon8K.js","assets/log-ZG0PJXpX.js","assets/Download-BpCGsakQ.js","assets/log-D33dFtt_.css","assets/index-C9UnRN7C.js","assets/Error-CIVKKbPu.js","assets/react-beautiful-dnd.esm-B0xxfe7i.js","assets/raf-schd.esm-Cxhj8umC.js","assets/QuestionMarkCircle-BvUTckGB.js","assets/item-B6N6t3kF.js","assets/Launch-BfiIdCmh.js","assets/config-navigation-xcMpeduS.js","assets/slicedToArray-CXBLQZX4.js","assets/index-C2fPoxDR.js","assets/index-p0322yKe.js","assets/use-mobile-DnWfrhc7.js","assets/connect-to-B_2lM0_9.js","assets/config-space-C59Z4PGK.js","assets/component-C3wYVoFz.js","assets/index-DcfIKM1A.js","assets/add-component-core-CF05FURP.js","assets/launch-result-message-keU5grqY.js","assets/page-header-DZTCF7io.js","assets/index-NTlhnYZO.js","assets/content-layout-cWwRTmIc.js","assets/add-component-core-D-IRi6XF.css","assets/analytics-sm8oL_To.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{y as Ge,f as M,h as J,z as et,A as rs,b as ss,B as os,C as is,D as An,E as On,F as fe,G as $n,H as as,o as je,I as cs,J as ls,k as ln,g as us,j as ds,m as un,l as fs,n as ps,K as Oe,e as Re,L as hs,_ as B,M as ms,O as dn,N as gs,c as fn}from"./index-DVfi3VUs.js";import{a1 as U,j as o,E as m,aa as te,I as vt,ak as xs,ad as Mn,ah as yt,al as vs,bm as ys,a2 as re,bn as bs,bq as js,T as N,bx as ws,aN as pn,by as hn,a3 as I,a4 as ze,bz as Ss,t as Q,Z as Qe,bA as Cs,a5 as _s,bB as Is,bp as bt,am as Nn,bC as Es,aq as Ls,as as Ts,bD as zn,bE as Bn,bF as Un,A as ae,aj as Hn,aK as Ps}from"./vendor-mui-core-xF5F4eT7.js";import{$ as H,a9 as Rs,a1 as jt,aa as Ds,a2 as wt,b as $,Y as mn,j as ee,e as X,Z as ks,ab as As,ac as Fn,ad as Os,ae as $s,D as St,af as Vn,ag as Ms,ah as Ns,ai as zs,C as Be,aj as Bs,U as Us,ak as Hs,al as Fs,H as Vs,R as qs,am as Ws}from"./vendor-arcblock-DE69EmW_.js";import{r as x,L as qn,k as Wn,f as Ks,l as Gs}from"./vendor-react-D-afvo_7.js";import{d as Ue,s as Qs}from"./vendor-hooks-BKxTDk_P.js";import{x as Ct,a6 as Zs,a7 as Xs,y as $e,w as Ys}from"./vendor-utils-5TjOM6td.js";import{_ as gn}from"./useLocalStorage-DYSzZAco.js";import{C as xn}from"./confirm-DfsY08eB.js";import{d as Js}from"./PlayArrow-CZfWYrXK.js";import{g as vn}from"./get-safe-url-SccGjxz4.js";import{f as _t}from"./format-error-C0Ke3VXF.js";import{c as ye,s as He,H as eo,h as Fe,f as Kn,p as Gn,B as to}from"./index-DUVrFM9m.js";import{u as Qn}from"./session-DKWhsUi1.js";import{D as no,_ as Zn}from"./useAsyncRetry-Bmo6a1Zp.js";import{d as ro}from"./InfoOutlined-C8xfkBe6.js";import{_ as Xn}from"./useSetState-Crt4S51m.js";var It={},so=U;Object.defineProperty(It,"__esModule",{value:!0});var Yn=It.default=void 0,oo=so(H()),io=o;Yn=It.default=(0,oo.default)((0,io.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Et={},ao=U;Object.defineProperty(Et,"__esModule",{value:!0});var Jn=Et.default=void 0,co=ao(H()),lo=o;Jn=Et.default=(0,co.default)((0,lo.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Lt={},uo=U;Object.defineProperty(Lt,"__esModule",{value:!0});var er=Lt.default=void 0,fo=uo(H()),po=o;er=Lt.default=(0,fo.default)((0,po.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var Tt={},ho=U;Object.defineProperty(Tt,"__esModule",{value:!0});var tr=Tt.default=void 0,mo=ho(H()),go=o;tr=Tt.default=(0,mo.default)((0,go.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var Pt={},xo=U;Object.defineProperty(Pt,"__esModule",{value:!0});var nr=Pt.default=void 0,vo=xo(H()),yo=o;nr=Pt.default=(0,vo.default)((0,yo.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var Rt={},bo=U;Object.defineProperty(Rt,"__esModule",{value:!0});var rr=Rt.default=void 0,jo=bo(H()),wo=o;rr=Rt.default=(0,jo.default)((0,wo.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Dt={},So=U;Object.defineProperty(Dt,"__esModule",{value:!0});var sr=Dt.default=void 0,Co=So(H()),_o=o;sr=Dt.default=(0,Co.default)((0,_o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var kt={};Object.defineProperty(kt,"__esModule",{value:!0});var or=kt.default=void 0;Io(x);var yn=o;function Io(e){return e&&e.__esModule?e:{default:e}}function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bn(Object(n),!0).forEach(function(r){Eo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eo(e,t,n){return(t=Lo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lo(e){var t=To(e,"string");return typeof t=="symbol"?t:t+""}function To(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var At=function(t){return(0,yn.jsx)("svg",jn(jn({},t),{},{children:(0,yn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})}))};At.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};At.displayName="dashboard";or=kt.default=At;var Ot={},Po=U;Object.defineProperty(Ot,"__esModule",{value:!0});var ir=Ot.default=void 0,Ro=Po(H()),Do=o;ir=Ot.default=(0,Ro.default)((0,Do.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const de={Start:Js,Stop:Yn,Restart:Jn,Reload:er,Remove:Rs,Config:tr,Log:nr,Group:rr,Cancel:sr,Dashboard:or,Overview:ir},ko=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),s=new URL(Ct(n.origin,t));return s.search=r.toString(),s.toString()},Ao="internal",Oo="external";function $t({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:s,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=Ge(),[u,d]=x.useState(null),[f,p]=x.useState(null),[v,w]=x.useState(!1),[h,S]=x.useState(null),{t:y}=x.useContext(jt),[T]=gn("skip-blocklet-setup",!1),{loading:E,recommendedUrl:R}=a(e),[k]=gn("blocklet-type-filter",Ao),j=M.isInProgress(e.status),[b,C]=x.useState(!1);x.useEffect(()=>{var D,z;if(!(e!=null&&e.controller))return;C(((z=(D=e==null?void 0:e.controller)==null?void 0:D.status)==null?void 0:z.value)===J.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,Y,oe;try{const W=await l.api.getLauncherSession({input:{launcherSessionId:(q=e==null?void 0:e.controller)==null?void 0:q.launcherSessionId,launcherUrl:(Y=e==null?void 0:e.controller)==null?void 0:Y.launcherUrl}});if(W!=null&&W.error){console.error("get launcher session failed",W.error);return}C([$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((oe=W==null?void 0:W.launcherSession)==null?void 0:oe.status))}catch(W){console.error("call getLauncherSession error",W)}})()},[]);const{inService:_}=l,L=(g,D,z=!1)=>async()=>{const q=async Le=>{var Pe;t({action:g,blocklet:e}),w(!0),p(g);let Te=!1;try{if(g==="remove")await D(Le);else if(g==="start"){if(!M.hasRunnableComponent(e)){ee.error(y("blocklet.noComponent"));return}if(!_&&!T&&!((Pe=e.settings)!=null&&Pe.initialized)&&e.mode!==J.BLOCKLET_MODES.DEVELOPMENT){if(!R||!mn(R)){ee.error(y("blocklet.gotoVisitError"));return}const G=rs(l.info),cn=new URL(R);cn.searchParams.set("serverUrl",G),window.open(vn(cn.href,{allowDomains:null})),n({action:g,blocklet:e});return}const ie=e.children.filter(G=>!M.isInProgress(G.status)&&G.status!=="running").map(G=>G.meta.did),ue={did:e.meta.did,componentDids:ie};await D({input:ue})}else if(["stop","restart","reload"].includes(g)){const ie=e.children.filter(G=>G.status==="running").map(G=>G.meta.did),ue={did:e.meta.did,componentDids:ie};await D({input:ue})}else{const ie={did:e.meta.did};await D({input:ie})}g==="remove"?Te=!0:await ss(1e3),g==="reload"&&ee.success(y("blocklet.reloadSuccess")),S(null),n({action:g,blocklet:e})}catch(ie){const ue=`Blocklet ${g} failed: ${_t(ie)}`;throw n({action:g,blocklet:e,error:new Error(ue)}),new Error(ue)}finally{Te||w(!1)}},Y=()=>{w(!1),S(null)},oe=M.getDisplayName(e,!0),W=e.mode===J.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(N,{component:"div",children:o.jsx(N,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Le,Te)=>o.jsxs(N,{component:"div",children:[o.jsx(N,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")}),o.jsxs(ws,{name:"removeType",value:Le.removeType,onChange:Pe=>Te({...Le,removeType:Pe.target.value}),children:[o.jsx(pn,{value:"backup",control:o.jsx(hn,{}),label:y("blocklet.action.removeApplicationAfterBackup")}),o.jsx(pn,{value:"complete",control:o.jsx(hn,{}),label:y("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ns={stop:{title:`${y("common.stop")} ${oe}`,description:y("blocklet.action.stopDescription"),confirm:y("blocklet.action.confirmStop"),cancel:y("common.cancel"),onConfirm:q,onCancel:Y},restart:{title:`${y("common.restart")} ${oe}`,description:y("blocklet.action.restartDescription"),confirm:y("blocklet.action.confirmRestart"),cancel:y("common.cancel"),onConfirm:q,onCancel:Y},remove:{title:`${y("common.remove")} ${oe}`,confirm:y("blocklet.action.confirmRemove"),cancel:y("common.cancel"),onConfirm:q,onCancel:Y,...W},cancelDownload:{title:`${y("common.cancel")}`,description:y("blocklet.action.cancelDownloadDescription",{name:oe}),confirm:y("common.confirm"),cancel:y("common.cancel"),onConfirm:q,onCancel:Y}};z?S(ns[g]):await q()},P=!!u,F=g=>{try{g.stopPropagation(),g.preventDefault()}catch{}d(g.currentTarget)},V=g=>{try{g.stopPropagation(),g.preventDefault()}catch{}d(null)},Ie=async(g,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof g.handler=="function")try{w(!0),p(g.action),await g.handler()}catch(z){console.error(`Blocklet ${g.name} failed: `,z)}finally{w(!1),d(null)}else d(null)},Yr=!_&&M.isDeletableBlocklet(e)?{action:"remove",icon:de.Remove,name:y("common.remove"),handler:L("remove",async({removeType:g})=>{g==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,Jr={action:"remove",icon:({sx:g,...D})=>o.jsx(de.Cancel,{sx:{...g,paddingRight:"2px",zoom:.95},...D}),name:y("common.cancel"),handler:L("cancelDownload",l.api.cancelDownloadBlocklet,!0)},es=M.getAppMissingConfigs(e),ts=()=>{var q;const g=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=i==null?void 0:i({mountPoint:g,blocklet:e});if(!D||!mn(D)){ee.error(y("blocklet.gotoVisitError"));return}const z=(q=e==null?void 0:e.site)==null?void 0:q.domainAliases;window.open(vn(ko(D,".well-known/service/admin"),{allowDomains:z==null?void 0:z.map(Y=>Y.value)}))};let Ee=[{action:"start",icon:de.Start,inExternal:!0,name:y("common.start"),handler:L("start",l.api.startBlocklet),disabled:b||e.children.every(g=>g.status==="running")||et(e.status)||E||j},{action:"stop",icon:de.Stop,inExternal:!0,name:y("common.stop"),handler:L("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:de.Restart,name:y("common.restart"),handler:L("restart",l.api.restartBlocklet,!0),disabled:b||e.status!=="running"},et(e.status)?Jr:Yr,{separator:!0},_?null:{action:"dashboard",icon:({style:g,...D})=>o.jsx(de.Dashboard,{...D,style:{...g,width:"26px",height:"26px",paddingRight:"3px"}}),name:y("sidebar.dashboard"),handler:ts}].filter(Boolean);return k===Oo&&(Ee=Ee.filter(g=>g.inExternal)),r==="menu"?o.jsxs(wn,{"data-cy":"blocklet-actions",children:[o.jsx(vt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:F,size:"small",disabled:!s||!et(e.status)&&v,children:o.jsx(Ds,{})}),o.jsxs(xs,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:P,onClose:V,PaperProps:{},children:[es.length>0&&o.jsxs(Mn,{style:{maxWidth:"400px"},severity:"error",children:[y("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(qn,{to:`/blocklets/${e.meta.did}/components`,children:y("blocklet.config.gotoFix")})]}),Ee.map((g,D)=>g.separator?o.jsx(yt,{},`separator-${D}`):o.jsxs(vs,{dense:!0,onClick:z=>Ie(g,z),disabled:v||g.disabled,"data-cy":`${g.action}-blocklet`,children:[o.jsx(ys,{style:{minWidth:24},children:f===g.action&&v?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(g.icon,{fontSize:"small"})}),o.jsx(bs,{primary:g.name})]},g.name))]}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):o.jsxs(wn,{"data-cy":"blocklet-actions",...c,children:[o.jsx(js,{children:Ee.filter(g=>!g.separator&&!g.onlyInMenu).map(g=>o.jsxs(wt,{title:g.name,"data-cy":`${g.action}-blocklet`,onClick:()=>Ie(g),disabled:!!g.disabled||v,children:[f===g.action&&v?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(g.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:g.name})]},g.name))}),h&&o.jsx(xn,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}$t.propTypes={getComponentUrl:m.func,blocklet:m.object.isRequired,onStart:m.func.isRequired,onComplete:m.func.isRequired,variant:m.oneOf(["menu","group"]),hasPermission:m.bool,useBlockletUrlEvaluation:m.func};$t.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const wn=te.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DVYdq7IA.js","assets/vendor-react-D-afvo_7.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{u as ee,_ as b,d as W}from"./index-DVfi3VUs.js";import{a1 as te,j as e,ac as g,T as w,x as R,bp as se,a3 as z,M as H,a2 as ne,aa as ie}from"./vendor-mui-core-xF5F4eT7.js";import{r,u as re}from"./vendor-react-D-afvo_7.js";import{H as h}from"./vendor-utils-5TjOM6td.js";import{i as oe}from"./isEmail-BWNRBSAy.js";import{b as p,$ as ae,e as ce,F as le,j as C,H as ue,D as de,S as fe,m as me}from"./vendor-arcblock-DE69EmW_.js";import{F as pe}from"./fullpage-Ce9Y2TSP.js";import{f as S}from"./format-error-C0Ke3VXF.js";import{d as ge}from"./CheckCircle-D-unagro.js";import{g as T}from"./get-safe-url-
|
|
2
|
+
import{u as ee,_ as b,d as W}from"./index-DVfi3VUs.js";import{a1 as te,j as e,ac as g,T as w,x as R,bp as se,a3 as z,M as H,a2 as ne,aa as ie}from"./vendor-mui-core-xF5F4eT7.js";import{r,u as re}from"./vendor-react-D-afvo_7.js";import{H as h}from"./vendor-utils-5TjOM6td.js";import{i as oe}from"./isEmail-BWNRBSAy.js";import{b as p,$ as ae,e as ce,F as le,j as C,H as ue,D as de,S as fe,m as me}from"./vendor-arcblock-DE69EmW_.js";import{F as pe}from"./fullpage-Ce9Y2TSP.js";import{f as S}from"./format-error-C0Ke3VXF.js";import{d as ge}from"./CheckCircle-D-unagro.js";import{g as T}from"./get-safe-url-BVbIl2hB.js";import"./vendor-hooks-BKxTDk_P.js";var M;(M=window.env)!=null&&M.groupPathPrefix;p.ROLES.ADMIN,p.ROLES.OWNER;const y=()=>{const{searchParams:a}=new URL(window.location.href);return a.get("fromWallet")==="1"};var P={},he=te;Object.defineProperty(P,"__esModule",{value:!0});var N=P.default=void 0,ye=he(ae()),xe=e;N=P.default=(0,ye.default)((0,xe.jsx)("path",{d:"M12 19c0-3.87 3.13-7 7-7 1.08 0 2.09.25 3 .68V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h8.08c-.05-.33-.08-.66-.08-1M4 6l8 5 8-5v2l-8 5-8-5zm13.34 16-3.54-3.54 1.41-1.41 2.12 2.12 4.24-4.24L23 16.34z"}),"MarkEmailRead");const Ee=ie.form`
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,a2 as C,a3 as T}from"./vendor-mui-core-xF5F4eT7.js";import{r as j,k}from"./vendor-react-D-afvo_7.js";import{e as W,C as S,Z as I,j as h,b as R,_ as U}from"./vendor-arcblock-DE69EmW_.js";import{F as b}from"./fullpage-Ce9Y2TSP.js";import{w as v}from"./wrap-locale-CLuwhKrO.js";import{g as L}from"./get-safe-url-
|
|
1
|
+
import{j as e,a2 as C,a3 as T}from"./vendor-mui-core-xF5F4eT7.js";import{r as j,k}from"./vendor-react-D-afvo_7.js";import{e as W,C as S,Z as I,j as h,b as R,_ as U}from"./vendor-arcblock-DE69EmW_.js";import{F as b}from"./fullpage-Ce9Y2TSP.js";import{w as v}from"./wrap-locale-CLuwhKrO.js";import{g as L}from"./get-safe-url-SccGjxz4.js";import{S as F,s as N,a as _}from"./index-DVfi3VUs.js";import"./vendor-utils-5TjOM6td.js";import"./vendor-hooks-BKxTDk_P.js";function D({SessionContext:a,webWalletUrl:n,onSuccess:s}){var d,g;const{api:t,session:i}=j.useContext(a),{t:o,locale:f}=W(),u=k(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),w=async(r,E)=>{s(r,E),await i.refresh(),h.success(o("exchangePassport.success")),setTimeout(()=>{if(p){const c=decodeURIComponent(p);c.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?u(c,{replace:!0}):window.location.href=L(c)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},P=r=>{h.error(r.message)},m={},x=l.get("componentId");return x&&(m.componentId=x),i.loading?e.jsx(S,{children:e.jsx(C,{})}):e.jsx(b,{did:((d=window==null?void 0:window.blocklet)==null?void 0:d.appPid)||((g=window==null?void 0:window.env)==null?void 0:g.appPid),children:e.jsx(T,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(I,{className:"connect",action:"exchange-passport",checkFn:t.get,checkTimeout:10*60*1e3,webWalletUrl:n,onSuccess:w,onError:P,locale:f,messages:{title:o("exchangePassport.dialog.title"),scan:o("exchangePassport.dialog.scan"),confirm:o("exchangePassport.dialog.confirm"),success:o("exchangePassport.dialog.success")},extraParams:m,extraContent:null})})})}const A=v(D);function y(){const a=U(),n=(s,t)=>{s.sessionToken&&(N(t(s.sessionToken)),_(t(s.refreshToken)))};return e.jsx(A,{SessionContext:F,webWalletUrl:a,onSuccess:n})}export{y as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as g}from"./vendor-react-D-afvo_7.js";import{j as e,a1 as Re,E as y,a4 as qe,T as K,a3 as C,aa as ce,a2 as pe,ah as Me,aj as De,x as Ne,R as Ue,bH as Te,bI as $e,aP as Ve,al as Se,V as He,cn as Ge,cm as Je,aN as Qe,bL as Xe,A as Ae}from"./vendor-mui-core-xF5F4eT7.js";import{b as ee,z as Ye,A as Ze,ap as ie}from"./vendor-utils-5TjOM6td.js";import{j as J,b as $,$ as Ie,aD as U,e as te,a6 as et,am as tt,B as ke,bj as st,aV as nt,bA as at}from"./vendor-arcblock-DE69EmW_.js";import{y as it,F as z,m as ot,H as ye}from"./index-DVfi3VUs.js";import{d as G,a as rt}from"./vendor-hooks-BKxTDk_P.js";import{b as he}from"./dashboard-DQnfagMU.js";import{p as lt}from"./util-BblN2lT9.js";import{W as Ee}from"./did-address-CsW_VsB3.js";import{S as Z}from"./shorten-label-J69eHfMN.js";import{I as je}from"./index-BdfWmlqh.js";import{c as ve}from"./index-DoZ2YM4T.js";import{S as ct,a as dt}from"./list-D3MtvbeT.js";import{R as Le}from"./relative-time-Bkhqzrgv.js";import{D as ut,g as pt}from"./traffic-CoKCU9bb.js";import{B as Oe}from"./bundle-avatar-7g1gtR_Q.js";import{B as ft}from"./index-DUVrFM9m.js";import"./useLocalStorage-DYSzZAco.js";import"./confirm-DfsY08eB.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-CZfWYrXK.js";import"./get-safe-url-BVbIl2hB.js";import"./session-DKWhsUi1.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-C8xfkBe6.js";import"./useSetState-Crt4S51m.js";import"./index-CHFvfli7.js";import"./iframe-De6QHL_6.js";import"./LaunchOutlined-DmwI20ey.js";import"./ChevronLeft-Gy0Fh2PP.js";import"./ChevronRight-DSecMzs8.js";import"./index-C-D-nCB1.js";import"./vendor-mui-x-CSUdon8K.js";const Pe=g.createContext({}),{Provider:mt,Consumer:Ss}=Pe;function ht({children:t,blocklet:i=""}){const{api:a,inService:f}=it(),[h,u]=g.useState([]),[c,j]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),[T,R]=g.useState(!1),I=G(()=>{var v;return(v=i.meta)==null?void 0:v.did},[i]),[W,q]=g.useState([]),X=async({page:v=1,pageSize:k=20,...m}={})=>{if(!(T||!I))try{R(!0);const A={paging:{page:v,pageSize:k},...m,userName:m.searchText||"",teamDid:I,dateRange:m.dateRange?[z(m.dateRange[0]).toISOString(),z(m.dateRange[1]).toISOString()]:void 0},{dids:_,...E}=A;let F="";_.includes("system")&&(F="system");const M=_.filter(O=>O!=="system"),H=await a.getNotificationSendLog({input:{...E,source:F,componentDids:M}}),Y=H.list.map(O=>({...O,receiverUser:{...O.receiverUser,avatar:lt(O.receiverUser.avatar,I,f)}}));u(Y),j(H.paging),R(!1)}catch(A){J.error(A.message),R(!1)}},L=async()=>{const v=await a.getNotificationComponents({input:{teamDid:I}});q(v.componentDids)},V=g.useCallback(v=>{const k=i.children.find(m=>{var A;return((A=m.meta)==null?void 0:A.did)===v});if(k)return k.ancestors=[i],k},[i]),B=async({notificationReceiverIds:v,channels:k,...m})=>{await a.resendNotification({input:{teamDid:I,notificationReceiverIds:v,channels:k.map(A=>A==="wallet"?$.NOTIFICATION_SEND_CHANNEL.WALLET:A==="pushKit"?$.NOTIFICATION_SEND_CHANNEL.PUSH:A),...m}})},x=g.useCallback(async v=>(await a.getUser({input:{teamDid:I,user:{did:v}}})).user,[a,I]);g.useEffect(()=>{I&&L()},[I]);const N={loading:T,fetch:X,data:h,paging:c,blocklet:i,getComponent:V,resendNotification:B,getUser:x,componentDids:W};return e.jsx(mt,{value:{notificationRecords:N},children:t})}function Fe(){const{notificationRecords:t}=g.useContext(Pe);return t}var xe={},gt=Re;Object.defineProperty(xe,"__esModule",{value:!0});var ze=xe.default=void 0,xt=gt(Ie()),bt=e;ze=xe.default=(0,xt.default)((0,bt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var be={},St=Re;Object.defineProperty(be,"__esModule",{value:!0});var Be=be.default=void 0,yt=St(Ie()),jt=e;Be=be.default=(0,yt.default)((0,jt.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");const vt=(t,i,a="")=>{if(!a||!i)return"";switch(a){case $.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:i});case $.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:i});case $.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:i});case $.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return a}};function le(t,i,a={}){const{status:f,updatedAt:h,reason:u="",channel:c="wallet"}=a,j=h?t("notification.sendStatus.sentTime",{date:ot(h,i)}):"",T=vt(t,c,u);return f===$.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:j,reason:T}:f===$.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:j}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:j}}const we={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ge=["wallet","pushKit","email"],wt=(t,i)=>{var h,u;const{settings:a}=t,f=ee(i,"extra.notifications.email",!0);return{available:(u=(h=a==null?void 0:a.notification)==null?void 0:h.email)==null?void 0:u.enabled,enabled:f}},Ct=(t,i)=>{var h,u;const{settings:a}=t,f=ee(i,"extra.notifications.push",!0);return{available:(u=(h=a==null?void 0:a.notification)==null?void 0:h.pushKit)==null?void 0:u.enabled,enabled:f}},Rt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),Dt=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),Ce=(t=3e3)=>new Promise(i=>{setTimeout(()=>{i()},t)}),Nt=(t,i)=>i==="wallet"||i==="webhook"?[{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:i==="pushKit"||i==="email"?[{channel:i,type:"available",pass:t("notification.sendStatus.reason.available",{channel:i}),fail:t("notification.sendStatus.reason.unavailable",{channel:i})},{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:[],Tt=t=>{const i={},a=z().startOf("day");ge.forEach(u=>{const c=`${u}SendRecord`,T=ee(t,c,[]).filter(R=>z(R.sendAt).isSame(a,"day")).length;i[u]=T});const f=ee(t,"webhook",{}),h=Object.keys(f??{})??[];return h.length>0&&h.forEach(u=>{const j=(f[u]??[]).filter(T=>z(T.sendAt).isSame(a,"day")).length;i[u]=j}),i};function Q({config:t,enableTooltip:i=!0,showTitle:a=!1}){const{status:f,title:h="",sentTime:u="",reason:c=""}=t,j=[h,c].filter(Boolean).join(", ");return e.jsx(qe,{title:i?e.jsxs(e.Fragment,{children:[e.jsx(K,{color:"inherit",sx:{fontSize:12},children:j}),e.jsx("span",{children:u})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},children:[e.jsxs(C,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(C,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:we[f],style:{opacity:.15}}),e.jsx(C,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:we[f]})]}),a?e.jsx(K,{color:"inherit",sx:{fontSize:12},children:h}):null]})})}Q.propTypes={config:y.object.isRequired,enableTooltip:y.bool,showTitle:y.bool};Q.defaultProps={enableTooltip:!0,showTitle:!1};_e.propTypes={notification:y.object.isRequired,onCancel:y.func,blocklet:y.object.isRequired,resendChannel:y.string,refresh:y.func,tab:y.string};function _e({notification:t,onCancel:i=()=>{},blocklet:a,resendChannel:f="",refresh:h=()=>{},tab:u="info"}){const{t:c,locale:j}=te(),{getComponent:T,resendNotification:R,getUser:I}=Fe(),[W,q]=g.useState([]),[X,L]=g.useState([]),[V,B]=g.useState(null),[x,N]=g.useState(null),v=g.useRef({}),k=G(()=>T(t.componentDid)||a,[a,t.componentDid]),m=G(()=>{var s;return(s=t==null?void 0:t.receivers)==null?void 0:s[0]},[t.receivers]),A=G(()=>m==null?void 0:m.receiver,[m]),_=G(()=>m==null?void 0:m.receiverUser,[m]),E=rt({tab:u||"info"}),F=G(()=>Tt(m),[m]),M=g.useCallback(async s=>{const{receiver:l}=m??{};if(!l)return!1;const p=await I(l);return p?s==="wallet"?Rt(p):s==="email"?wt(a,p):s==="pushKit"?Ct(a,p):s==="webhook"?Dt(p):!0:!1},[m,I,a]);g.useEffect(()=>{if(!m)q([]);else{const s=ge.map(p=>{const S=m[`${p}SendStatus`],w=m[`${p}SendAt`],P=m[`${p}SendFailedReason`],We=le(c,j,{status:S,updatedAt:w,reason:P,channel:p});return{type:p==="pushKit"?"Push Kit":p,extra:We}});q(s);const l=(m==null?void 0:m.webhook)||{};L(Object.entries(l))}},[m,j,c]);const H=g.useCallback(async(s,l="")=>{const{id:p}=m??{};if(p)try{await R({notificationReceiverIds:[p],channels:[s],...s==="webhook"&&l?{webhookUrls:[l]}:{}}),J.success("Message has been sent!"),s!=="webhook"&&(await Ce(1e3),B(null))}catch(S){console.error("handleResend error",{error:S}),J.error(S.response?S.response.statusText:S.message)}},[R,m]),Y=async(s,l)=>{if(l==null||l.stopPropagation(),F[s.type]>=4){J.warning(c("notification.resendLimit"));return}if(l&&B(l==null?void 0:l.currentTarget),N({channel:s.type}),!(!s||s.checking)){q(S=>S.map(w=>s.type===w.type?{...w,checking:!0}:w));try{const S=await M(s.type);await Ce(),N({channel:s.type,result:S}),(typeof S=="boolean"&&S||Ye(S)&&Object.values(S).every(w=>!!w))&&(await H(s.type),h()),q(w=>w.map(P=>s.type===P.type?{...P,checking:!1}:P))}catch(S){console.error("handleResend error",{error:S})}}},O=async(s,l=null)=>{if(l==null||l.stopPropagation(),F[s]>=4){J.warning(c("notification.resendLimit"));return}L(S=>S.map(w=>s===w[0]?[...w.slice(0,2),!0]:w));try{await H("webhook",s),L(S=>S.map(w=>s===w[0]?[...w.slice(0,2),!0]:w)),h()}catch(S){console.error("handleResend error",{error:S})}};g.useEffect(()=>{f&&(E.tab="status",setTimeout(()=>{const s=v.current[f];s&&(ge.includes(f)?(B(s),Y({type:f})):O(f))},500))},[f]);const de=()=>{B(null)},ue=g.useCallback(s=>Nt(c,s),[c]),se=!!V,o=se?"check-resend-popover":void 0;function n(){return[{name:c("notification.from"),value:e.jsx(ct,{size:32,blocklet:k,showName:!0,hideDot:!0})},{name:c("notification.to"),value:e.jsx(C,{children:_?e.jsxs(C,{"data-cy":`member-name-${_.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(ke,{src:`${_.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:A,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(Z,{children:_.fullName})]},A):e.jsx(Ee,{size:14,responsive:!1,compact:!0,copyable:!1,did:A})})},{name:c("notification.notificationTitle"),value:e.jsx(Z,{maxLength:50,children:t.title})},{name:c("notification.body"),value:e.jsx(dt,{notification:t,rows:0})},{name:c("notification.createdAt"),value:e.jsx(Le,{value:t.createdAt,locale:j,shouldUpdate:!0})}].map(l=>e.jsx(je,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:l.name,children:l.value},l.name))}const r={info:{label:c("common.basicInfo"),value:"info",component:n},status:{label:c("notification.status"),value:"status"}},d=Object.values(r).map(({label:s,value:l})=>({label:s,value:l})),b=r[E.tab]||r.info,D=s=>{E.tab=s};return e.jsx(et,{title:c("notification.notificationDetails"),onClose:()=>{E.tab="info",B(null),i()},open:!0,PaperProps:{style:{maxWidth:832,maxHeight:"80vh"}},sx:{"& .MuiDialogContent-root":{paddingTop:0}},fullWidth:!0,actionsPosition:"left",children:e.jsxs(At,{children:[e.jsx(C,{mx:3,className:"tabs",children:e.jsx(tt,{tabs:d,current:E.tab,onChange:D,scrollButtons:"auto"})}),e.jsx("div",{className:"body",children:E.tab==="info"?e.jsx(b.component,{}):e.jsxs(C,{children:[W.map(s=>e.jsx(je,{valueComponent:"div",nameWidth:120,name:s.type,children:e.jsxs(C,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:14},children:[e.jsx(C,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(Q,{config:s.extra,showTitle:!0})}),s.extra.status!=="success"&&e.jsxs(K,{ref:l=>{v.current[s.type]=l},component:"span",display:"flex",alignItems:"center",sx:{color:U.primary.main,fontSize:14},className:ve("resend-btn",{disabled:s.checking||F[s.type]>=4}),onClick:l=>Y(s,l),children:[s.checking?e.jsx(pe,{size:12,sx:{color:U.primary.main}}):e.jsx(he,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]})},s.type)),e.jsx(Me,{textAlign:"left",sx:{mt:1,mb:1},children:"Webhook"}),e.jsx(C,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,style:{paddingLeft:0},children:X.map(([s,l,p])=>{const S=l[0],w=le(c,j,{...S,updatedAt:S.sendAt,reason:S.failedReason,channel:"webhook"});return e.jsxs(C,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:12},children:[e.jsx(Z,{maxLength:30,children:s}),e.jsx(C,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(Q,{config:w,showTitle:!0})}),w.status!=="success"&&e.jsxs(K,{ref:P=>{v.current[s]=P},component:"span",sx:{color:U.primary.main},className:ve("resend-btn",{disabled:p||F[s]>=4}),onClick:P=>O(s,P),children:[p?e.jsx(pe,{size:12,sx:{color:U.primary.main}}):e.jsx(he,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},s)})})]})}),e.jsx(De,{id:o,open:se,anchorEl:V,onClose:de,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(It,{children:[e.jsxs(K,{variant:"body1",component:"div",className:"check-title",children:[x==null?void 0:x.channel," Checking"]}),e.jsx(C,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:ue(x==null?void 0:x.channel).map(s=>{var w,P;const{type:l,pass:p,fail:S}=s;return!(x!=null&&x.result)||(w=x==null?void 0:x.result)!=null&&w[l]?e.jsxs(K,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(P=x==null?void 0:x.result)!=null&&P[l]?U.success.main:"inherit"},children:[x!=null&&x.result?e.jsx(Be,{}):e.jsx(pe,{size:12,sx:{color:U.primary.main}}),e.jsx("span",{children:p})]},l):e.jsxs(K,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:U.error.main},children:[e.jsx(ze,{}),e.jsx("span",{children:S})]},l)})})]})})]})})}const At=ce.div`
|
|
1
|
+
import{r as g}from"./vendor-react-D-afvo_7.js";import{j as e,a1 as Re,E as y,a4 as qe,T as K,a3 as C,aa as ce,a2 as pe,ah as Me,aj as De,x as Ne,R as Ue,bH as Te,bI as $e,aP as Ve,al as Se,V as He,cn as Ge,cm as Je,aN as Qe,bL as Xe,A as Ae}from"./vendor-mui-core-xF5F4eT7.js";import{b as ee,z as Ye,A as Ze,ap as ie}from"./vendor-utils-5TjOM6td.js";import{j as J,b as $,$ as Ie,aD as U,e as te,a6 as et,am as tt,B as ke,bj as st,aV as nt,bA as at}from"./vendor-arcblock-DE69EmW_.js";import{y as it,F as z,m as ot,H as ye}from"./index-DVfi3VUs.js";import{d as G,a as rt}from"./vendor-hooks-BKxTDk_P.js";import{b as he}from"./dashboard-DQnfagMU.js";import{p as lt}from"./util-BblN2lT9.js";import{W as Ee}from"./did-address-CsW_VsB3.js";import{S as Z}from"./shorten-label-J69eHfMN.js";import{I as je}from"./index-BdfWmlqh.js";import{c as ve}from"./index-DoZ2YM4T.js";import{S as ct,a as dt}from"./list-D3MtvbeT.js";import{R as Le}from"./relative-time-Bkhqzrgv.js";import{D as ut,g as pt}from"./traffic-CoKCU9bb.js";import{B as Oe}from"./bundle-avatar-7g1gtR_Q.js";import{B as ft}from"./index-DUVrFM9m.js";import"./useLocalStorage-DYSzZAco.js";import"./confirm-DfsY08eB.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-CZfWYrXK.js";import"./get-safe-url-SccGjxz4.js";import"./session-DKWhsUi1.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-C8xfkBe6.js";import"./useSetState-Crt4S51m.js";import"./index-CHFvfli7.js";import"./iframe-De6QHL_6.js";import"./LaunchOutlined-DmwI20ey.js";import"./ChevronLeft-Gy0Fh2PP.js";import"./ChevronRight-DSecMzs8.js";import"./index-C-D-nCB1.js";import"./vendor-mui-x-CSUdon8K.js";const Pe=g.createContext({}),{Provider:mt,Consumer:Ss}=Pe;function ht({children:t,blocklet:i=""}){const{api:a,inService:f}=it(),[h,u]=g.useState([]),[c,j]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),[T,R]=g.useState(!1),I=G(()=>{var v;return(v=i.meta)==null?void 0:v.did},[i]),[W,q]=g.useState([]),X=async({page:v=1,pageSize:k=20,...m}={})=>{if(!(T||!I))try{R(!0);const A={paging:{page:v,pageSize:k},...m,userName:m.searchText||"",teamDid:I,dateRange:m.dateRange?[z(m.dateRange[0]).toISOString(),z(m.dateRange[1]).toISOString()]:void 0},{dids:_,...E}=A;let F="";_.includes("system")&&(F="system");const M=_.filter(O=>O!=="system"),H=await a.getNotificationSendLog({input:{...E,source:F,componentDids:M}}),Y=H.list.map(O=>({...O,receiverUser:{...O.receiverUser,avatar:lt(O.receiverUser.avatar,I,f)}}));u(Y),j(H.paging),R(!1)}catch(A){J.error(A.message),R(!1)}},L=async()=>{const v=await a.getNotificationComponents({input:{teamDid:I}});q(v.componentDids)},V=g.useCallback(v=>{const k=i.children.find(m=>{var A;return((A=m.meta)==null?void 0:A.did)===v});if(k)return k.ancestors=[i],k},[i]),B=async({notificationReceiverIds:v,channels:k,...m})=>{await a.resendNotification({input:{teamDid:I,notificationReceiverIds:v,channels:k.map(A=>A==="wallet"?$.NOTIFICATION_SEND_CHANNEL.WALLET:A==="pushKit"?$.NOTIFICATION_SEND_CHANNEL.PUSH:A),...m}})},x=g.useCallback(async v=>(await a.getUser({input:{teamDid:I,user:{did:v}}})).user,[a,I]);g.useEffect(()=>{I&&L()},[I]);const N={loading:T,fetch:X,data:h,paging:c,blocklet:i,getComponent:V,resendNotification:B,getUser:x,componentDids:W};return e.jsx(mt,{value:{notificationRecords:N},children:t})}function Fe(){const{notificationRecords:t}=g.useContext(Pe);return t}var xe={},gt=Re;Object.defineProperty(xe,"__esModule",{value:!0});var ze=xe.default=void 0,xt=gt(Ie()),bt=e;ze=xe.default=(0,xt.default)((0,bt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");var be={},St=Re;Object.defineProperty(be,"__esModule",{value:!0});var Be=be.default=void 0,yt=St(Ie()),jt=e;Be=be.default=(0,yt.default)((0,jt.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");const vt=(t,i,a="")=>{if(!a||!i)return"";switch(a){case $.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:i});case $.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:i});case $.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:i});case $.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return a}};function le(t,i,a={}){const{status:f,updatedAt:h,reason:u="",channel:c="wallet"}=a,j=h?t("notification.sendStatus.sentTime",{date:ot(h,i)}):"",T=vt(t,c,u);return f===$.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:j,reason:T}:f===$.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:j}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:j}}const we={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ge=["wallet","pushKit","email"],wt=(t,i)=>{var h,u;const{settings:a}=t,f=ee(i,"extra.notifications.email",!0);return{available:(u=(h=a==null?void 0:a.notification)==null?void 0:h.email)==null?void 0:u.enabled,enabled:f}},Ct=(t,i)=>{var h,u;const{settings:a}=t,f=ee(i,"extra.notifications.push",!0);return{available:(u=(h=a==null?void 0:a.notification)==null?void 0:h.pushKit)==null?void 0:u.enabled,enabled:f}},Rt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),Dt=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),Ce=(t=3e3)=>new Promise(i=>{setTimeout(()=>{i()},t)}),Nt=(t,i)=>i==="wallet"||i==="webhook"?[{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:i==="pushKit"||i==="email"?[{channel:i,type:"available",pass:t("notification.sendStatus.reason.available",{channel:i}),fail:t("notification.sendStatus.reason.unavailable",{channel:i})},{channel:i,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:i}),fail:t("notification.sendStatus.reason.disabled",{channel:i})}]:[],Tt=t=>{const i={},a=z().startOf("day");ge.forEach(u=>{const c=`${u}SendRecord`,T=ee(t,c,[]).filter(R=>z(R.sendAt).isSame(a,"day")).length;i[u]=T});const f=ee(t,"webhook",{}),h=Object.keys(f??{})??[];return h.length>0&&h.forEach(u=>{const j=(f[u]??[]).filter(T=>z(T.sendAt).isSame(a,"day")).length;i[u]=j}),i};function Q({config:t,enableTooltip:i=!0,showTitle:a=!1}){const{status:f,title:h="",sentTime:u="",reason:c=""}=t,j=[h,c].filter(Boolean).join(", ");return e.jsx(qe,{title:i?e.jsxs(e.Fragment,{children:[e.jsx(K,{color:"inherit",sx:{fontSize:12},children:j}),e.jsx("span",{children:u})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},children:[e.jsxs(C,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(C,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:we[f],style:{opacity:.15}}),e.jsx(C,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:we[f]})]}),a?e.jsx(K,{color:"inherit",sx:{fontSize:12},children:h}):null]})})}Q.propTypes={config:y.object.isRequired,enableTooltip:y.bool,showTitle:y.bool};Q.defaultProps={enableTooltip:!0,showTitle:!1};_e.propTypes={notification:y.object.isRequired,onCancel:y.func,blocklet:y.object.isRequired,resendChannel:y.string,refresh:y.func,tab:y.string};function _e({notification:t,onCancel:i=()=>{},blocklet:a,resendChannel:f="",refresh:h=()=>{},tab:u="info"}){const{t:c,locale:j}=te(),{getComponent:T,resendNotification:R,getUser:I}=Fe(),[W,q]=g.useState([]),[X,L]=g.useState([]),[V,B]=g.useState(null),[x,N]=g.useState(null),v=g.useRef({}),k=G(()=>T(t.componentDid)||a,[a,t.componentDid]),m=G(()=>{var s;return(s=t==null?void 0:t.receivers)==null?void 0:s[0]},[t.receivers]),A=G(()=>m==null?void 0:m.receiver,[m]),_=G(()=>m==null?void 0:m.receiverUser,[m]),E=rt({tab:u||"info"}),F=G(()=>Tt(m),[m]),M=g.useCallback(async s=>{const{receiver:l}=m??{};if(!l)return!1;const p=await I(l);return p?s==="wallet"?Rt(p):s==="email"?wt(a,p):s==="pushKit"?Ct(a,p):s==="webhook"?Dt(p):!0:!1},[m,I,a]);g.useEffect(()=>{if(!m)q([]);else{const s=ge.map(p=>{const S=m[`${p}SendStatus`],w=m[`${p}SendAt`],P=m[`${p}SendFailedReason`],We=le(c,j,{status:S,updatedAt:w,reason:P,channel:p});return{type:p==="pushKit"?"Push Kit":p,extra:We}});q(s);const l=(m==null?void 0:m.webhook)||{};L(Object.entries(l))}},[m,j,c]);const H=g.useCallback(async(s,l="")=>{const{id:p}=m??{};if(p)try{await R({notificationReceiverIds:[p],channels:[s],...s==="webhook"&&l?{webhookUrls:[l]}:{}}),J.success("Message has been sent!"),s!=="webhook"&&(await Ce(1e3),B(null))}catch(S){console.error("handleResend error",{error:S}),J.error(S.response?S.response.statusText:S.message)}},[R,m]),Y=async(s,l)=>{if(l==null||l.stopPropagation(),F[s.type]>=4){J.warning(c("notification.resendLimit"));return}if(l&&B(l==null?void 0:l.currentTarget),N({channel:s.type}),!(!s||s.checking)){q(S=>S.map(w=>s.type===w.type?{...w,checking:!0}:w));try{const S=await M(s.type);await Ce(),N({channel:s.type,result:S}),(typeof S=="boolean"&&S||Ye(S)&&Object.values(S).every(w=>!!w))&&(await H(s.type),h()),q(w=>w.map(P=>s.type===P.type?{...P,checking:!1}:P))}catch(S){console.error("handleResend error",{error:S})}}},O=async(s,l=null)=>{if(l==null||l.stopPropagation(),F[s]>=4){J.warning(c("notification.resendLimit"));return}L(S=>S.map(w=>s===w[0]?[...w.slice(0,2),!0]:w));try{await H("webhook",s),L(S=>S.map(w=>s===w[0]?[...w.slice(0,2),!0]:w)),h()}catch(S){console.error("handleResend error",{error:S})}};g.useEffect(()=>{f&&(E.tab="status",setTimeout(()=>{const s=v.current[f];s&&(ge.includes(f)?(B(s),Y({type:f})):O(f))},500))},[f]);const de=()=>{B(null)},ue=g.useCallback(s=>Nt(c,s),[c]),se=!!V,o=se?"check-resend-popover":void 0;function n(){return[{name:c("notification.from"),value:e.jsx(ct,{size:32,blocklet:k,showName:!0,hideDot:!0})},{name:c("notification.to"),value:e.jsx(C,{children:_?e.jsxs(C,{"data-cy":`member-name-${_.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(ke,{src:`${_.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:A,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(Z,{children:_.fullName})]},A):e.jsx(Ee,{size:14,responsive:!1,compact:!0,copyable:!1,did:A})})},{name:c("notification.notificationTitle"),value:e.jsx(Z,{maxLength:50,children:t.title})},{name:c("notification.body"),value:e.jsx(dt,{notification:t,rows:0})},{name:c("notification.createdAt"),value:e.jsx(Le,{value:t.createdAt,locale:j,shouldUpdate:!0})}].map(l=>e.jsx(je,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:l.name,children:l.value},l.name))}const r={info:{label:c("common.basicInfo"),value:"info",component:n},status:{label:c("notification.status"),value:"status"}},d=Object.values(r).map(({label:s,value:l})=>({label:s,value:l})),b=r[E.tab]||r.info,D=s=>{E.tab=s};return e.jsx(et,{title:c("notification.notificationDetails"),onClose:()=>{E.tab="info",B(null),i()},open:!0,PaperProps:{style:{maxWidth:832,maxHeight:"80vh"}},sx:{"& .MuiDialogContent-root":{paddingTop:0}},fullWidth:!0,actionsPosition:"left",children:e.jsxs(At,{children:[e.jsx(C,{mx:3,className:"tabs",children:e.jsx(tt,{tabs:d,current:E.tab,onChange:D,scrollButtons:"auto"})}),e.jsx("div",{className:"body",children:E.tab==="info"?e.jsx(b.component,{}):e.jsxs(C,{children:[W.map(s=>e.jsx(je,{valueComponent:"div",nameWidth:120,name:s.type,children:e.jsxs(C,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:14},children:[e.jsx(C,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(Q,{config:s.extra,showTitle:!0})}),s.extra.status!=="success"&&e.jsxs(K,{ref:l=>{v.current[s.type]=l},component:"span",display:"flex",alignItems:"center",sx:{color:U.primary.main,fontSize:14},className:ve("resend-btn",{disabled:s.checking||F[s.type]>=4}),onClick:l=>Y(s,l),children:[s.checking?e.jsx(pe,{size:12,sx:{color:U.primary.main}}):e.jsx(he,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]})},s.type)),e.jsx(Me,{textAlign:"left",sx:{mt:1,mb:1},children:"Webhook"}),e.jsx(C,{className:"notification-resend-section",display:"flex",flexDirection:"column",gap:1,style:{paddingLeft:0},children:X.map(([s,l,p])=>{const S=l[0],w=le(c,j,{...S,updatedAt:S.sendAt,reason:S.failedReason,channel:"webhook"});return e.jsxs(C,{className:"channel-item",display:"flex",alignItems:"center",sx:{gap:"4px",fontSize:12},children:[e.jsx(Z,{maxLength:30,children:s}),e.jsx(C,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(Q,{config:w,showTitle:!0})}),w.status!=="success"&&e.jsxs(K,{ref:P=>{v.current[s]=P},component:"span",sx:{color:U.primary.main},className:ve("resend-btn",{disabled:p||F[s]>=4}),onClick:P=>O(s,P),children:[p?e.jsx(pe,{size:12,sx:{color:U.primary.main}}):e.jsx(he,{}),e.jsx("span",{style:{marginLeft:4},children:c("notification.resend")})]})]},s)})})]})}),e.jsx(De,{id:o,open:se,anchorEl:V,onClose:de,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(It,{children:[e.jsxs(K,{variant:"body1",component:"div",className:"check-title",children:[x==null?void 0:x.channel," Checking"]}),e.jsx(C,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:ue(x==null?void 0:x.channel).map(s=>{var w,P;const{type:l,pass:p,fail:S}=s;return!(x!=null&&x.result)||(w=x==null?void 0:x.result)!=null&&w[l]?e.jsxs(K,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(P=x==null?void 0:x.result)!=null&&P[l]?U.success.main:"inherit"},children:[x!=null&&x.result?e.jsx(Be,{}):e.jsx(pe,{size:12,sx:{color:U.primary.main}}),e.jsx("span",{children:p})]},l):e.jsxs(K,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:U.error.main},children:[e.jsx(ze,{}),e.jsx("span",{children:S})]},l)})})]})})]})})}const At=ce.div`
|
|
2
2
|
& > .notification-row {
|
|
3
3
|
padding: 0;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as H,t as Zn,g as Qn,e as Dr,a as Xn}from"./vendor-react-D-afvo_7.js";import{j as i,a3 as se,bH as Jt,bI as er,aP as tr,al as jt,T as qe,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as Jn,x as mn,aM as ei,a1 as ti,bm as ri,bn as ni,I as ii,aK as oi,aN as ai,bL as si}from"./vendor-mui-core-xF5F4eT7.js";import{p as Ie,B as rr,b as nr,T as ci,al as li,n as Ur,x as ui,y as fi}from"./vendor-utils-5TjOM6td.js";import{c as di}from"./index-DoZ2YM4T.js";import{b1 as ft,b2 as pi,b3 as mi,b4 as hn,b5 as hi,b6 as gi,b7 as yi,b8 as gn,b9 as bi,ba as cr,bb as vi,bc as xi,bd as wi,be as ji,o as lr,bf as yn,m as Ei,n as Si,e as _e,B as bn,D as Pi,a6 as Ge,a2 as je,at as Ci,Z as Oi,ae as Ai,a1 as dt,j as Ke,a0 as Ii,bg as vn,b as Ye,au as xn,bh as Ri,aC as Ni,am as Ti,aG as _i,aU as wn,a9 as Di,aV as jn,$ as Ui,bi as En,bj as qi,bk as ki}from"./vendor-arcblock-DE69EmW_.js";import{d as St}from"./Add-CuIZWfjH.js";import{d as Li}from"./Loop-Dlnais4C.js";import{d as Bi}from"./ViewList-CV3Yxakp.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-DxG3xooH.js";import{$ as $i,f as Mi,y as Ce,ap as ur,m as Qe,a0 as Vi,M as Xe,aq as Wi,h as Ze,B as Pn,ar as Cn,b as zi}from"./index-DVfi3VUs.js";import{x as Hi,u as fr,a as On,k as Gi}from"./vendor-hooks-BKxTDk_P.js";import{u as De,d as qr,W as An}from"./dashboard-DQnfagMU.js";import{W as Pt}from"./did-address-CsW_VsB3.js";import{P as Be}from"./permission-BQ0E8FmL.js";import{C as Rt}from"./click-to-copy-BLRxskBB.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-Ua5iss51.js";import{I as Pe}from"./index-BdfWmlqh.js";import{d as Zi}from"./DeleteOutline-CnjMnu1G.js";import{C as pt}from"./confirm-DfsY08eB.js";import{u as mt}from"./session-DKWhsUi1.js";import{i as In,a as Ct,p as Rn}from"./util-BblN2lT9.js";import{b as Qi}from"./sdk-CBf7wJy0.js";import{p as Xi}from"./index-o2FFW-yx.js";import{A as Ji}from"./actions-DDpgZ17S.js";import{S as eo}from"./shorten-label-J69eHfMN.js";import"./useLocalStorage-DYSzZAco.js";import"./PlayArrow-CZfWYrXK.js";import"./get-safe-url-BVbIl2hB.js";import"./index-DUVrFM9m.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./InfoOutlined-C8xfkBe6.js";import"./useSetState-Crt4S51m.js";import"./MoreHoriz-DbMNKpjF.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Nn=dr.default=void 0;to(H);var et=i;function to(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ro(e,t,r){return(t=no(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e){var t=io(e,"string");return typeof t=="symbol"?t:t+""}function io(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=function(t){return(0,et.jsxs)("svg",Lr(Lr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};pr.displayName="person";Nn=dr.default=pr;var xt={},oo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Tn="%[a-f0-9]{2}",Br=new RegExp("("+Tn+")|([^%]+?)","gi"),Kr=new RegExp("("+Tn+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function ao(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Br)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Br)||[];return e}}function so(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ao(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var co=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return so(e)}},lo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},uo=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=oo,r=co,n=lo,s=uo,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const X=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=X};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=L(T[S],o);else f[g]=L(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const X=a[S];return X===void 0?"":X===null?x(S,o):Array.isArray(X)?X.reduce(f(S),[]).join("&"):x(S,o)+"="+x(X,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let X=P(a.url);return a.fragmentIdentifier&&(X=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${X}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=Zn,fo={parseNumbers:!1,parseBooleans:!1},po={skipNull:!1,skipEmptyString:!1},mo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},fo),l),j=Object.assign(Object.assign({},po),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Hi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),L=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[L,fr(a=>{const o=typeof a=="function"?a(L):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},ho=mo;var qt={exports:{}},kt={},Fr;function _n(){if(Fr)return kt;Fr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,X,Z){return typeof u=="string"?u:u(S,X,Z)}var T=function(S){n(Z,S);var X=l(Z);function Z(G,Y,F){var W;return r(this,Z),W=X.call(this,g(G,Y,F)),W.code=o,W}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function L(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),kt.codes=b,kt}var Lt,$r;function go(){if($r)return Lt;$r=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(z){return Object.getOwnPropertyDescriptor(O,z).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),z;if(A){var y=a(this).constructor;z=Reflect.construct(R,arguments,y)}else z=R.apply(this,arguments);return b(this,z)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,z)}function z(){return P(R,arguments,a(this).constructor)}return z.prototype=Object.create(R.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),w(z,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(z,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(z,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,z){return R.__proto__=z,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=_n(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function X(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",W={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",z="",y=0,p="",v=!1,D=de(O),N=D.split(`
|
|
1
|
+
import{r as H,t as Zn,g as Qn,e as Dr,a as Xn}from"./vendor-react-D-afvo_7.js";import{j as i,a3 as se,bH as Jt,bI as er,aP as tr,al as jt,T as qe,M as Et,a2 as nt,br as sr,ad as rt,E as B,aa as Te,a4 as ut,v as Jn,x as mn,aM as ei,a1 as ti,bm as ri,bn as ni,I as ii,aK as oi,aN as ai,bL as si}from"./vendor-mui-core-xF5F4eT7.js";import{p as Ie,B as rr,b as nr,T as ci,al as li,n as Ur,x as ui,y as fi}from"./vendor-utils-5TjOM6td.js";import{c as di}from"./index-DoZ2YM4T.js";import{b1 as ft,b2 as pi,b3 as mi,b4 as hn,b5 as hi,b6 as gi,b7 as yi,b8 as gn,b9 as bi,ba as cr,bb as vi,bc as xi,bd as wi,be as ji,o as lr,bf as yn,m as Ei,n as Si,e as _e,B as bn,D as Pi,a6 as Ge,a2 as je,at as Ci,Z as Oi,ae as Ai,a1 as dt,j as Ke,a0 as Ii,bg as vn,b as Ye,au as xn,bh as Ri,aC as Ni,am as Ti,aG as _i,aU as wn,a9 as Di,aV as jn,$ as Ui,bi as En,bj as qi,bk as ki}from"./vendor-arcblock-DE69EmW_.js";import{d as St}from"./Add-CuIZWfjH.js";import{d as Li}from"./Loop-Dlnais4C.js";import{d as Bi}from"./ViewList-CV3Yxakp.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-DxG3xooH.js";import{$ as $i,f as Mi,y as Ce,ap as ur,m as Qe,a0 as Vi,M as Xe,aq as Wi,h as Ze,B as Pn,ar as Cn,b as zi}from"./index-DVfi3VUs.js";import{x as Hi,u as fr,a as On,k as Gi}from"./vendor-hooks-BKxTDk_P.js";import{u as De,d as qr,W as An}from"./dashboard-DQnfagMU.js";import{W as Pt}from"./did-address-CsW_VsB3.js";import{P as Be}from"./permission-BQ0E8FmL.js";import{C as Rt}from"./click-to-copy-BLRxskBB.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-Ua5iss51.js";import{I as Pe}from"./index-BdfWmlqh.js";import{d as Zi}from"./DeleteOutline-CnjMnu1G.js";import{C as pt}from"./confirm-DfsY08eB.js";import{u as mt}from"./session-DKWhsUi1.js";import{i as In,a as Ct,p as Rn}from"./util-BblN2lT9.js";import{b as Qi}from"./sdk-CBf7wJy0.js";import{p as Xi}from"./index-o2FFW-yx.js";import{A as Ji}from"./actions-DDpgZ17S.js";import{S as eo}from"./shorten-label-J69eHfMN.js";import"./useLocalStorage-DYSzZAco.js";import"./PlayArrow-CZfWYrXK.js";import"./get-safe-url-SccGjxz4.js";import"./index-DUVrFM9m.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./InfoOutlined-C8xfkBe6.js";import"./useSetState-Crt4S51m.js";import"./MoreHoriz-DbMNKpjF.js";var dr={};Object.defineProperty(dr,"__esModule",{value:!0});var Nn=dr.default=void 0;to(H);var et=i;function to(e){return e&&e.__esModule?e:{default:e}}function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(n){ro(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ro(e,t,r){return(t=no(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function no(e){var t=io(e,"string");return typeof t=="symbol"?t:t+""}function io(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=function(t){return(0,et.jsxs)("svg",Lr(Lr({},t),{},{children:[(0,et.jsx)("g",{clipPath:"url(#clip0)",children:(0,et.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})}),(0,et.jsx)("defs",{children:(0,et.jsx)("clipPath",{id:"clip0",children:(0,et.jsx)("rect",{width:"18",height:"18",transform:"translate(0 0.5)"})})})]}))};pr.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};pr.displayName="person";Nn=dr.default=pr;var xt={},oo=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Tn="%[a-f0-9]{2}",Br=new RegExp("("+Tn+")|([^%]+?)","gi"),Kr=new RegExp("("+Tn+")+","gi");function ir(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ir(r),ir(n))}function ao(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Br)||[],r=1;r<t.length;r++)e=ir(t,r).join(""),t=e.match(Br)||[];return e}}function so(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Kr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ao(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Kr.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),l=0;l<s.length;l++){var h=s[l];e=e.replace(new RegExp(h,"g"),t[h])}return e}var co=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return so(e)}},lo=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},uo=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),l=0;l<n.length;l++){var h=n[l],C=e[h];(s?t.indexOf(h)!==-1:t(h,C,e))&&(r[h]=C)}return r};(function(e){const t=oo,r=co,n=lo,s=uo,l=a=>a==null;function h(a){switch(a.arrayFormat){case"index":return o=>(u,f)=>{const g=u.length;return f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[",g,"]"].join("")]:[...u,[x(o,a),"[",x(g,a),"]=",x(f,a)].join("")]};case"bracket":return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,[x(o,a),"[]"].join("")]:[...u,[x(o,a),"[]=",x(f,a)].join("")];case"comma":case"separator":return o=>(u,f)=>f==null||f.length===0?u:u.length===0?[[x(o,a),"=",x(f,a)].join("")]:[[u,x(f,a)].join(a.arrayFormatSeparator)];default:return o=>(u,f)=>f===void 0||a.skipNull&&f===null||a.skipEmptyString&&f===""?u:f===null?[...u,x(o,a)]:[...u,[x(o,a),"=",x(f,a)].join("")]}}function C(a){let o;switch(a.arrayFormat){case"index":return(u,f,g)=>{if(o=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!o){g[u]=f;return}g[u]===void 0&&(g[u]={}),g[u][o[1]]=f};case"bracket":return(u,f,g)=>{if(o=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!o){g[u]=f;return}if(g[u]===void 0){g[u]=[f];return}g[u]=[].concat(g[u],f)};case"comma":case"separator":return(u,f,g)=>{const T=typeof f=="string"&&f.includes(a.arrayFormatSeparator),S=typeof f=="string"&&!T&&b(f,a).includes(a.arrayFormatSeparator);f=S?b(f,a):f;const X=T||S?f.split(a.arrayFormatSeparator).map(Z=>b(Z,a)):f===null?f:b(f,a);g[u]=X};default:return(u,f,g)=>{if(g[u]===void 0){g[u]=f;return}g[u]=[].concat(g[u],f)}}}function j(a){if(typeof a!="string"||a.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function x(a,o){return o.encode?o.strict?t(a):encodeURIComponent(a):a}function b(a,o){return o.decode?r(a):a}function _(a){return Array.isArray(a)?a.sort():typeof a=="object"?_(Object.keys(a)).sort((o,u)=>Number(o)-Number(u)).map(o=>a[o]):a}function E(a){const o=a.indexOf("#");return o!==-1&&(a=a.slice(0,o)),a}function P(a){let o="";const u=a.indexOf("#");return u!==-1&&(o=a.slice(u)),o}function d(a){a=E(a);const o=a.indexOf("?");return o===-1?"":a.slice(o+1)}function L(a,o){return o.parseNumbers&&!Number.isNaN(Number(a))&&typeof a=="string"&&a.trim()!==""?a=Number(a):o.parseBooleans&&a!==null&&(a.toLowerCase()==="true"||a.toLowerCase()==="false")&&(a=a.toLowerCase()==="true"),a}function w(a,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),j(o.arrayFormatSeparator);const u=C(o),f=Object.create(null);if(typeof a!="string"||(a=a.trim().replace(/^[?#&]/,""),!a))return f;for(const g of a.split("&")){if(g==="")continue;let[T,S]=n(o.decode?g.replace(/\+/g," "):g,"=");S=S===void 0?null:["comma","separator"].includes(o.arrayFormat)?S:b(S,o),u(b(T,o),S,f)}for(const g of Object.keys(f)){const T=f[g];if(typeof T=="object"&&T!==null)for(const S of Object.keys(T))T[S]=L(T[S],o);else f[g]=L(T,o)}return o.sort===!1?f:(o.sort===!0?Object.keys(f).sort():Object.keys(f).sort(o.sort)).reduce((g,T)=>{const S=f[T];return S&&typeof S=="object"&&!Array.isArray(S)?g[T]=_(S):g[T]=S,g},Object.create(null))}e.extract=d,e.parse=w,e.stringify=(a,o)=>{if(!a)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),j(o.arrayFormatSeparator);const u=S=>o.skipNull&&l(a[S])||o.skipEmptyString&&a[S]==="",f=h(o),g={};for(const S of Object.keys(a))u(S)||(g[S]=a[S]);const T=Object.keys(g);return o.sort!==!1&&T.sort(o.sort),T.map(S=>{const X=a[S];return X===void 0?"":X===null?x(S,o):Array.isArray(X)?X.reduce(f(S),[]).join("&"):x(S,o)+"="+x(X,o)}).filter(S=>S.length>0).join("&")},e.parseUrl=(a,o)=>{o=Object.assign({decode:!0},o);const[u,f]=n(a,"#");return Object.assign({url:u.split("?")[0]||"",query:w(d(a),o)},o&&o.parseFragmentIdentifier&&f?{fragmentIdentifier:b(f,o)}:{})},e.stringifyUrl=(a,o)=>{o=Object.assign({encode:!0,strict:!0},o);const u=E(a.url).split("?")[0]||"",f=e.extract(a.url),g=e.parse(f,{sort:!1}),T=Object.assign(g,a.query);let S=e.stringify(T,o);S&&(S=`?${S}`);let X=P(a.url);return a.fragmentIdentifier&&(X=`#${x(a.fragmentIdentifier,o)}`),`${u}${S}${X}`},e.pick=(a,o,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:f,query:g,fragmentIdentifier:T}=e.parseUrl(a,u);return e.stringifyUrl({url:f,query:s(g,o),fragmentIdentifier:T},u)},e.exclude=(a,o,u)=>{const f=Array.isArray(o)?g=>!o.includes(g):(g,T)=>!o(g,T);return e.pick(a,f,u)}})(xt);const st=Zn,fo={parseNumbers:!1,parseBooleans:!1},po={skipNull:!1,skipEmptyString:!1},mo=(e,t)=>{var r,n;const{navigateMode:s="push",parseOptions:l,stringifyOptions:h}={},C=Object.assign(Object.assign({},fo),l),j=Object.assign(Object.assign({},po),h),x=st.useLocation(),b=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),_=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),E=Hi(),P=H.useRef(typeof e=="function"?e():e||{}),d=H.useMemo(()=>xt.parse(x.search,C),[x.search]),L=H.useMemo(()=>Object.assign(Object.assign({},P.current),d),[d]);return[L,fr(a=>{const o=typeof a=="function"?a(L):a;E(),b&&b[s]({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},x.state),_&&_({hash:x.hash,search:xt.stringify(Object.assign(Object.assign({},d),o),j)||"?"},{replace:s==="replace",state:x.state})})]},ho=mo;var qt={exports:{}},kt={},Fr;function _n(){if(Fr)return kt;Fr=1;function e(o){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},e(o)}function t(o,u,f){return Object.defineProperty(o,"prototype",{writable:!1}),o}function r(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}function n(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&s(o,u)}function s(o,u){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,T){return g.__proto__=T,g},s(o,u)}function l(o){var u=j();return function(){var g=x(o),T;if(u){var S=x(this).constructor;T=Reflect.construct(g,arguments,S)}else T=g.apply(this,arguments);return h(this,T)}}function h(o,u){if(u&&(e(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(o)}function C(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function j(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function x(o){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},x(o)}var b={},_,E;function P(o,u,f){f||(f=Error);function g(S,X,Z){return typeof u=="string"?u:u(S,X,Z)}var T=function(S){n(Z,S);var X=l(Z);function Z(G,Y,F){var W;return r(this,Z),W=X.call(this,g(G,Y,F)),W.code=o,W}return t(Z)}(f);b[o]=T}function d(o,u){if(Array.isArray(o)){var f=o.length;return o=o.map(function(g){return String(g)}),f>2?"one of ".concat(u," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(u," ").concat(o[0]," or ").concat(o[1]):"of ".concat(u," ").concat(o[0])}else return"of ".concat(u," ").concat(String(o))}function L(o,u,f){return o.substr(0,u.length)===u}function w(o,u,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-u.length,f)===u}function a(o,u,f){return typeof f!="number"&&(f=0),f+u.length>o.length?!1:o.indexOf(u,f)!==-1}return P("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),P("ERR_INVALID_ARG_TYPE",function(o,u,f){_===void 0&&(_=or()),_(typeof o=="string","'name' must be a string");var g;typeof u=="string"&&L(u,"not ")?(g="must not be",u=u.replace(/^not /,"")):g="must be";var T;if(w(o," argument"))T="The ".concat(o," ").concat(g," ").concat(d(u,"type"));else{var S=a(o,".")?"property":"argument";T='The "'.concat(o,'" ').concat(S," ").concat(g," ").concat(d(u,"type"))}return T+=". Received type ".concat(e(f)),T},TypeError),P("ERR_INVALID_ARG_VALUE",function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";E===void 0&&(E=ft);var g=E.inspect(u);return g.length>128&&(g="".concat(g.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(f,". Received ").concat(g)},TypeError),P("ERR_INVALID_RETURN_VALUE",function(o,u,f){var g;return f&&f.constructor&&f.constructor.name?g="instance of ".concat(f.constructor.name):g="type ".concat(e(f)),"Expected ".concat(o,' to be returned from the "').concat(u,'"')+" function but got ".concat(g,".")},TypeError),P("ERR_MISSING_ARGS",function(){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];_===void 0&&(_=or()),_(u.length>0,"At least one arg needs to be specified");var g="The ",T=u.length;switch(u=u.map(function(S){return'"'.concat(S,'"')}),T){case 1:g+="".concat(u[0]," argument");break;case 2:g+="".concat(u[0]," and ").concat(u[1]," arguments");break;default:g+=u.slice(0,T-1).join(", "),g+=", and ".concat(u[T-1]," arguments");break}return"".concat(g," must be specified")},TypeError),kt.codes=b,kt}var Lt,$r;function go(){if($r)return Lt;$r=1;function e(O,A){var K=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);A&&(R=R.filter(function(z){return Object.getOwnPropertyDescriptor(O,z).enumerable})),K.push.apply(K,R)}return K}function t(O){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?e(Object(K),!0).forEach(function(R){r(O,R,K[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(K)):e(Object(K)).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(K,R))})}return O}function r(O,A,K){return A=h(A),A in O?Object.defineProperty(O,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):O[A]=K,O}function n(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function s(O,A){for(var K=0;K<A.length;K++){var R=A[K];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,h(R.key),R)}}function l(O,A,K){return A&&s(O.prototype,A),Object.defineProperty(O,"prototype",{writable:!1}),O}function h(O){var A=C(O,"string");return o(A)==="symbol"?A:String(A)}function C(O,A){if(o(O)!=="object"||O===null)return O;var K=O[Symbol.toPrimitive];if(K!==void 0){var R=K.call(O,A||"default");if(o(R)!=="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(O)}function j(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),A&&w(O,A)}function x(O){var A=d();return function(){var R=a(O),z;if(A){var y=a(this).constructor;z=Reflect.construct(R,arguments,y)}else z=R.apply(this,arguments);return b(this,z)}}function b(O,A){if(A&&(o(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(O)}function _(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function E(O){var A=typeof Map=="function"?new Map:void 0;return E=function(R){if(R===null||!L(R))return R;if(typeof R!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A<"u"){if(A.has(R))return A.get(R);A.set(R,z)}function z(){return P(R,arguments,a(this).constructor)}return z.prototype=Object.create(R.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),w(z,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(z,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(z,v),N=new D;return p&&w(N,p.prototype),N},P.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function w(O,A){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,z){return R.__proto__=z,R},w(O,A)}function a(O){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(K){return K.__proto__||Object.getPrototypeOf(K)},a(O)}function o(O){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},o(O)}var u=ft,f=u.inspect,g=_n(),T=g.codes.ERR_INVALID_ARG_TYPE;function S(O,A,K){return(K===void 0||K>O.length)&&(K=O.length),O.substring(K-A.length,K)===A}function X(O,A){if(A=Math.floor(A),O.length==0||A==0)return"";var K=O.length*A;for(A=Math.floor(Math.log(A)/Math.log(2));A;)O+=O,A--;return O+=O.substring(0,K-O.length),O}var Z="",G="",Y="",F="",W={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},be=10;function Q(O){var A=Object.keys(O),K=Object.create(Object.getPrototypeOf(O));return A.forEach(function(R){K[R]=O[R]}),Object.defineProperty(K,"message",{value:O.message}),K}function de(O){return f(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(O,A,K){var R="",z="",y=0,p="",v=!1,D=de(O),N=D.split(`
|
|
2
2
|
`),q=de(A).split(`
|
|
3
3
|
`),$=0,ne="";if(K==="strictEqual"&&o(O)==="object"&&o(A)==="object"&&O!==null&&A!==null&&(K="strictEqualObject"),N.length===1&&q.length===1&&N[0]!==q[0]){var ue=N[0].length+q[0].length;if(ue<=be){if((o(O)!=="object"||O===null)&&(o(A)!=="object"||A===null)&&(O!==0||A!==0))return"".concat(W[K],`
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CxW3Q7hC.js","assets/vendor-arcblock-DE69EmW_.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-C2fPoxDR.js","assets/index-DVfi3VUs.js","assets/index-DoZ2YM4T.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as R,k as Tt,l as lt,L as le,f as Jn,h as Qn,i as pt}from"./vendor-react-D-afvo_7.js";import{a1 as he,j as t,t as ze,a3 as u,aM as Ho,E as d,a4 as de,I as oe,T as E,bU as Go,aa as ae,aE as Yn,bL as Ge,ad as Xo,aN as Xe,bq as jt,x as Y,a2 as et,P as Jo,G as Qo,v as _t,$ as Yo,ar as Zo,al as ue,ah as Zn,D as Pt,ab as Ko,r as en,bK as Kn,K as Be,y as tn,M as K,ac as ke,aL as es,L as ts,z as os,bn as ns,aA as on,az as tt,bt as ss,bu as rs,bV as is,bW as ls,aP as nn,bH as cs,bN as as,bx as ds,by as ft}from"./vendor-mui-core-xF5F4eT7.js";import{y as me,B as _e,h as re,a5 as us,f as xo,_ as sn,ad as go}from"./index-DVfi3VUs.js";import{$ as be,b as H,e as Q,a2 as ot,ab as rn,aU as ln,a9 as cn,Z as ps,aV as Lt,j as W,n as fs,aW as hs,aX as ms,Y as bs,aC as ne,aY as xs,ao as gs,aM as Ie,a6 as qt,aZ as ye,ah as js,am as ks}from"./vendor-arcblock-DE69EmW_.js";import{d as $t}from"./Add-CuIZWfjH.js";import{d as ys}from"./Error-CIVKKbPu.js";import{C as Nt}from"./confirm-DfsY08eB.js";import{u as ct}from"./session-DKWhsUi1.js";import{W as jo}from"./did-address-CsW_VsB3.js";import{E as Ve,D as ko,C as yo,P as vo}from"./react-beautiful-dnd.esm-B0xxfe7i.js";import{B as Et}from"./bundle-avatar-7g1gtR_Q.js";import{S as pe}from"./shorten-label-J69eHfMN.js";import{T as vs,x as ce,G as At,C as Je}from"./vendor-utils-5TjOM6td.js";import{d as ws}from"./Download-BpCGsakQ.js";import{d as Rs}from"./QuestionMarkCircle-BvUTckGB.js";import{u as Cs}from"./vendor-hooks-BKxTDk_P.js";import{_ as Se}from"./useSetState-Crt4S51m.js";import{c as Ot}from"./index-DoZ2YM4T.js";import{E as Mt}from"./index-CHFvfli7.js";import{p as nt}from"./index-o2FFW-yx.js";import"./api-K65cLqol.js";import{d as Ss}from"./ChevronRight-DSecMzs8.js";import{T as Is,a as Ds}from"./vendor-mui-x-CSUdon8K.js";import{d as wo}from"./DeleteOutline-CnjMnu1G.js";import{c as Ts,A as an,u as _s,S as Ps,U as Ls,a as ht,b as dn,n as qs,e as $s,f as Ro,g as Ns}from"./item-B6N6t3kF.js";import{d as Es}from"./ArrowDropDown-Cv3eCDY6.js";import{f as De}from"./format-error-C0Ke3VXF.js";import{C as As}from"./click-to-copy-BLRxskBB.js";import{d as Os}from"./Launch-BfiIdCmh.js";import{M as Ms}from"./index-ChSPqVLh.js";import{r as zs}from"./index-DtwN19zv.js";import{d as Bs}from"./Done-C8ZSABDp.js";import"./raf-schd.esm-Cxhj8umC.js";import"./get-safe-url-BVbIl2hB.js";var zt={},Vs=he;Object.defineProperty(zt,"__esModule",{value:!0});var un=zt.default=void 0,Ws=Vs(be()),Us=t;un=zt.default=(0,Ws.default)((0,Us.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var Bt={},Fs=he;Object.defineProperty(Bt,"__esModule",{value:!0});var pn=Bt.default=void 0,Hs=Fs(be()),Gs=t;pn=Bt.default=(0,Hs.default)((0,Gs.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Vt={},Xs=he;Object.defineProperty(Vt,"__esModule",{value:!0});var fn=Vt.default=void 0,Js=Xs(be()),Qs=t;fn=Vt.default=(0,Js.default)((0,Qs.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Wt({did:e,projectId:o,title:n,logo:r,describe:s}){const i=`${`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=R.useState(!1),f=ze(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Ho,{sx:{borderRadius:1},src:i}),t.jsxs(u,{children:[t.jsx(pe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(pe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Wt.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function Ut({initUrl:e}){const o=Tt(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=Q(),{api:l}=me(),{api:i}=ct(),[a,c]=R.useState(!0),{blocklet:f}=_e(),[h,k]=R.useState(null),[b,p]=R.useState(!1),v=ze(g=>g.breakpoints.down("xl")),{componentDid:w=""}=lt(),[I,y]=R.useState(null),x=()=>{l.getProjects({input:{did:f.meta.did,componentDid:w,tenantScope:n}}).then(g=>{const _=(g==null?void 0:g.projects)||[];c(!1),y(_)}).catch(g=>{c(!1),W.error(g.message)})},C=()=>{o(`${H.UNOWNED_DID}/create/none`,{replace:!0})},L=g=>{k(g)},D=()=>{c(!1),p(!0)},j=()=>{p(!1),k(null)},T=g=>{W.error(g.message),p(!1),k(null)},A=g=>{if(!(g!=null&&g.deleted)){W.error("Delete project failed");return}x(),p(!1),k(null)},U=(g,_,O)=>{let V=g==null?void 0:g.trim();return V?(V=fs.toAddress(V).toLocaleLowerCase(),O.some((z,S)=>{const P=_[S];return P&&z.searchable&&z.display!=="excluded"&&z.display!=="false"&&P.toLocaleLowerCase().includes(V)})):!0};if(R.useEffect(()=>{x()},[]),!I&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!I)return null;if(!I.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(ot,{onClick:C,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const q=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:g=>{const _=I[g];return t.jsx(le,{to:`${_.id}`,children:t.jsx(Wt,{did:f.meta.did,projectId:_.id,logo:_.blockletLogo,title:_.blockletTitle,describe:_.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:g=>g?t.jsx(rn,{type:"success",children:g}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:g=>g?t.jsx(jo,{size:14,compact:!0,responsive:!1,did:g}):null}},v||w?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:g=>g?t.jsx(jo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${g}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:g}):null}},v||w?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:g=>{const _=(f.children||[]).find(O=>O.meta.did===g);return _?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Et,{size:14,blocklet:_,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:_.meta.title})]},g):""}}},v||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:g=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(pe,{children:g})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:g=>t.jsx(ln,{value:Number(g),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:g=>{const _=I[g];return t.jsxs(u,{display:"flex",children:[t.jsx(le,{to:`${_.id}/new-release/${_.lastReleaseId}`,children:t.jsx(de,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"create",children:t.jsx(un,{style:{fontSize:18}})})})}),!!_.lastReleaseId&&t.jsx(de,{title:r("blocklet.publish.viewLastRelease",{name:_.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx(le,{style:{display:"flex"},to:`${_.id}/view/${_.lastReleaseId}`,children:t.jsx(pn,{sx:{fontSize:18}})})})}),t.jsx(de,{title:r("blocklet.publish.delete",{name:_.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>L(_),children:t.jsx(cn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),m=b?t.jsx(ps,{open:!0,popup:!0,onClose:j,action:"check-has-project-id",locale:s,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:A,onError:T,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(de,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(fn,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(ot,{onClick:C,variant:"contained",children:[t.jsx($t,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Lt,{className:"main-table",locale:s,data:I,columns:q,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:U}}),h&&t.jsx(Nt,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:D,onCancel:()=>k(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(g=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(ys,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(E,{component:"span",variant:"inherit",color:"text.secondary",children:g})]}))})}),m]})}Ut.propTypes={initUrl:d.object};Ut.defaultProps={initUrl:null};var Ft={},Ys=he;Object.defineProperty(Ft,"__esModule",{value:!0});var hn=Ft.default=void 0,Zs=Ys(be()),Co=t;hn=Ft.default=(0,Zs.default)([(0,Co.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,Co.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function Ks(){var D;const{t:e,locale:o}=Q(),{projectId:n}=lt(),{api:r}=me(),[s,l]=R.useState(!0),{blocklet:i}=_e(),a=ze(j=>j.breakpoints.down("md")),[c,f]=R.useState(null),[h,k]=R.useState(null),[b,p]=R.useState(null),v=(D=window.env)==null?void 0:D.serverEndpoint,w=()=>{r.getReleases({input:{did:i.meta.did,projectId:n}}).then(j=>{const T=(j==null?void 0:j.releases)||[];l(!1),f(T)}).catch(j=>{l(!1),W.error(j.message)})},I=()=>{r.doBatchQuery({getProject:{input:{did:i.meta.did,projectId:n}},getReleases:{input:{did:i.meta.did,projectId:n}}}).then(j=>{k(j.getProject.project||{}),f(j.getReleases.releases||[]),l(!1)}).catch(j=>{l(!1),W.error(j.message)})};R.useEffect(()=>{I()},[]);const y=()=>{l(!1);const j=b.id;r.deleteRelease({input:{did:i.meta.did,projectId:n,releaseId:j}}).then(()=>{l(!1),w(),W.success(e("common.removeSuccess")),p(null)}).catch(T=>{l(!1),W.error(T.message)})},x=j=>{p(j)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!c)return null;const C=t.jsxs(Go,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(le,{to:"..",children:e("common.blockletStudio")}),t.jsx(E,{color:"text.primary",children:t.jsx(pe,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[C,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(le,{to:"create/none",children:t.jsx(ot,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const L=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:j=>{const T=c[j];return t.jsx(le,{to:`view/${T.id}`,children:t.jsx(Wt,{did:i.meta.did,projectId:h.id,logo:T.blockletLogo,title:T.blockletVersion,describe:T.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:j=>{const T=c[j];return t.jsx(E,{className:"note",children:T.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:j=>t.jsx(rn,{type:j==="published"?"success":"warning",children:j==="published"?"Released":vs(j)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:j=>{const T=c[j];return T.status!==re.PROJECT.RELEASE_STATUS.published?"":t.jsx(ln,{value:Number(T.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:j=>{var g;const T=c[j];let A="",U="";const q=T.status==="published";if(q){const _=ce(v,`/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),O=new URL(v);O.pathname=ce(O.pathname,"/launch-blocklet/agreement"),O.searchParams.set("blocklet_meta_url",_),A=O.href,U=ce(`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const m=(g=h.blockletComponents)!=null&&g.some(_=>_.included)||T.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[q&&m==="pack"&&t.jsx(de,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:A,target:"_blank",rel:"noreferrer",children:t.jsx(hn,{sx:{fontSize:18}})})})}),q&&t.jsx(de,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:U,children:t.jsx(ws,{sx:{fontSize:18}})})})}),t.jsx(de,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>x(T),children:t.jsx(cn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(er,{children:[t.jsxs(u,{className:"header",children:[C,t.jsx(le,{to:"new-release/none",children:t.jsxs(ot,{variant:"contained",children:[t.jsx($t,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]}),t.jsx(Lt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:L,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),b&&t.jsx(Nt,{title:e(`${e("common.delete")} ${b.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:y,onCancel:()=>p(null)})]})}const er=ae(u)`
|
|
2
|
+
import{r as R,k as Tt,l as lt,L as le,f as Jn,h as Qn,i as pt}from"./vendor-react-D-afvo_7.js";import{a1 as he,j as t,t as ze,a3 as u,aM as Ho,E as d,a4 as de,I as oe,T as E,bU as Go,aa as ae,aE as Yn,bL as Ge,ad as Xo,aN as Xe,bq as jt,x as Y,a2 as et,P as Jo,G as Qo,v as _t,$ as Yo,ar as Zo,al as ue,ah as Zn,D as Pt,ab as Ko,r as en,bK as Kn,K as Be,y as tn,M as K,ac as ke,aL as es,L as ts,z as os,bn as ns,aA as on,az as tt,bt as ss,bu as rs,bV as is,bW as ls,aP as nn,bH as cs,bN as as,bx as ds,by as ft}from"./vendor-mui-core-xF5F4eT7.js";import{y as me,B as _e,h as re,a5 as us,f as xo,_ as sn,ad as go}from"./index-DVfi3VUs.js";import{$ as be,b as H,e as Q,a2 as ot,ab as rn,aU as ln,a9 as cn,Z as ps,aV as Lt,j as W,n as fs,aW as hs,aX as ms,Y as bs,aC as ne,aY as xs,ao as gs,aM as Ie,a6 as qt,aZ as ye,ah as js,am as ks}from"./vendor-arcblock-DE69EmW_.js";import{d as $t}from"./Add-CuIZWfjH.js";import{d as ys}from"./Error-CIVKKbPu.js";import{C as Nt}from"./confirm-DfsY08eB.js";import{u as ct}from"./session-DKWhsUi1.js";import{W as jo}from"./did-address-CsW_VsB3.js";import{E as Ve,D as ko,C as yo,P as vo}from"./react-beautiful-dnd.esm-B0xxfe7i.js";import{B as Et}from"./bundle-avatar-7g1gtR_Q.js";import{S as pe}from"./shorten-label-J69eHfMN.js";import{T as vs,x as ce,G as At,C as Je}from"./vendor-utils-5TjOM6td.js";import{d as ws}from"./Download-BpCGsakQ.js";import{d as Rs}from"./QuestionMarkCircle-BvUTckGB.js";import{u as Cs}from"./vendor-hooks-BKxTDk_P.js";import{_ as Se}from"./useSetState-Crt4S51m.js";import{c as Ot}from"./index-DoZ2YM4T.js";import{E as Mt}from"./index-CHFvfli7.js";import{p as nt}from"./index-o2FFW-yx.js";import"./api-K65cLqol.js";import{d as Ss}from"./ChevronRight-DSecMzs8.js";import{T as Is,a as Ds}from"./vendor-mui-x-CSUdon8K.js";import{d as wo}from"./DeleteOutline-CnjMnu1G.js";import{c as Ts,A as an,u as _s,S as Ps,U as Ls,a as ht,b as dn,n as qs,e as $s,f as Ro,g as Ns}from"./item-B6N6t3kF.js";import{d as Es}from"./ArrowDropDown-Cv3eCDY6.js";import{f as De}from"./format-error-C0Ke3VXF.js";import{C as As}from"./click-to-copy-BLRxskBB.js";import{d as Os}from"./Launch-BfiIdCmh.js";import{M as Ms}from"./index-ChSPqVLh.js";import{r as zs}from"./index-DtwN19zv.js";import{d as Bs}from"./Done-C8ZSABDp.js";import"./raf-schd.esm-Cxhj8umC.js";import"./get-safe-url-SccGjxz4.js";var zt={},Vs=he;Object.defineProperty(zt,"__esModule",{value:!0});var un=zt.default=void 0,Ws=Vs(be()),Us=t;un=zt.default=(0,Ws.default)((0,Us.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var Bt={},Fs=he;Object.defineProperty(Bt,"__esModule",{value:!0});var pn=Bt.default=void 0,Hs=Fs(be()),Gs=t;pn=Bt.default=(0,Hs.default)((0,Gs.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Vt={},Xs=he;Object.defineProperty(Vt,"__esModule",{value:!0});var fn=Vt.default=void 0,Js=Xs(be()),Qs=t;fn=Vt.default=(0,Js.default)((0,Qs.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Wt({did:e,projectId:o,title:n,logo:r,describe:s}){const i=`${`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=R.useState(!1),f=ze(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Ho,{sx:{borderRadius:1},src:i}),t.jsxs(u,{children:[t.jsx(pe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(pe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Wt.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function Ut({initUrl:e}){const o=Tt(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=Q(),{api:l}=me(),{api:i}=ct(),[a,c]=R.useState(!0),{blocklet:f}=_e(),[h,k]=R.useState(null),[b,p]=R.useState(!1),v=ze(g=>g.breakpoints.down("xl")),{componentDid:w=""}=lt(),[I,y]=R.useState(null),x=()=>{l.getProjects({input:{did:f.meta.did,componentDid:w,tenantScope:n}}).then(g=>{const _=(g==null?void 0:g.projects)||[];c(!1),y(_)}).catch(g=>{c(!1),W.error(g.message)})},C=()=>{o(`${H.UNOWNED_DID}/create/none`,{replace:!0})},L=g=>{k(g)},D=()=>{c(!1),p(!0)},j=()=>{p(!1),k(null)},T=g=>{W.error(g.message),p(!1),k(null)},A=g=>{if(!(g!=null&&g.deleted)){W.error("Delete project failed");return}x(),p(!1),k(null)},U=(g,_,O)=>{let V=g==null?void 0:g.trim();return V?(V=fs.toAddress(V).toLocaleLowerCase(),O.some((z,S)=>{const P=_[S];return P&&z.searchable&&z.display!=="excluded"&&z.display!=="false"&&P.toLocaleLowerCase().includes(V)})):!0};if(R.useEffect(()=>{x()},[]),!I&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!I)return null;if(!I.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(ot,{onClick:C,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const q=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:g=>{const _=I[g];return t.jsx(le,{to:`${_.id}`,children:t.jsx(Wt,{did:f.meta.did,projectId:_.id,logo:_.blockletLogo,title:_.blockletTitle,describe:_.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:g=>g?t.jsx(rn,{type:"success",children:g}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:g=>g?t.jsx(jo,{size:14,compact:!0,responsive:!1,did:g}):null}},v||w?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:g=>g?t.jsx(jo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${g}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:g}):null}},v||w?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:g=>{const _=(f.children||[]).find(O=>O.meta.did===g);return _?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Et,{size:14,blocklet:_,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:_.meta.title})]},g):""}}},v||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:g=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(pe,{children:g})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:g=>t.jsx(ln,{value:Number(g),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:g=>{const _=I[g];return t.jsxs(u,{display:"flex",children:[t.jsx(le,{to:`${_.id}/new-release/${_.lastReleaseId}`,children:t.jsx(de,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"create",children:t.jsx(un,{style:{fontSize:18}})})})}),!!_.lastReleaseId&&t.jsx(de,{title:r("blocklet.publish.viewLastRelease",{name:_.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx(le,{style:{display:"flex"},to:`${_.id}/view/${_.lastReleaseId}`,children:t.jsx(pn,{sx:{fontSize:18}})})})}),t.jsx(de,{title:r("blocklet.publish.delete",{name:_.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>L(_),children:t.jsx(cn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),m=b?t.jsx(ps,{open:!0,popup:!0,onClose:j,action:"check-has-project-id",locale:s,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:A,onError:T,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(de,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(fn,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(ot,{onClick:C,variant:"contained",children:[t.jsx($t,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Lt,{className:"main-table",locale:s,data:I,columns:q,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:U}}),h&&t.jsx(Nt,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:D,onCancel:()=>k(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(g=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(ys,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(E,{component:"span",variant:"inherit",color:"text.secondary",children:g})]}))})}),m]})}Ut.propTypes={initUrl:d.object};Ut.defaultProps={initUrl:null};var Ft={},Ys=he;Object.defineProperty(Ft,"__esModule",{value:!0});var hn=Ft.default=void 0,Zs=Ys(be()),Co=t;hn=Ft.default=(0,Zs.default)([(0,Co.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,Co.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function Ks(){var D;const{t:e,locale:o}=Q(),{projectId:n}=lt(),{api:r}=me(),[s,l]=R.useState(!0),{blocklet:i}=_e(),a=ze(j=>j.breakpoints.down("md")),[c,f]=R.useState(null),[h,k]=R.useState(null),[b,p]=R.useState(null),v=(D=window.env)==null?void 0:D.serverEndpoint,w=()=>{r.getReleases({input:{did:i.meta.did,projectId:n}}).then(j=>{const T=(j==null?void 0:j.releases)||[];l(!1),f(T)}).catch(j=>{l(!1),W.error(j.message)})},I=()=>{r.doBatchQuery({getProject:{input:{did:i.meta.did,projectId:n}},getReleases:{input:{did:i.meta.did,projectId:n}}}).then(j=>{k(j.getProject.project||{}),f(j.getReleases.releases||[]),l(!1)}).catch(j=>{l(!1),W.error(j.message)})};R.useEffect(()=>{I()},[]);const y=()=>{l(!1);const j=b.id;r.deleteRelease({input:{did:i.meta.did,projectId:n,releaseId:j}}).then(()=>{l(!1),w(),W.success(e("common.removeSuccess")),p(null)}).catch(T=>{l(!1),W.error(T.message)})},x=j=>{p(j)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!c)return null;const C=t.jsxs(Go,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(le,{to:"..",children:e("common.blockletStudio")}),t.jsx(E,{color:"text.primary",children:t.jsx(pe,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[C,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(le,{to:"create/none",children:t.jsx(ot,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const L=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:j=>{const T=c[j];return t.jsx(le,{to:`view/${T.id}`,children:t.jsx(Wt,{did:i.meta.did,projectId:h.id,logo:T.blockletLogo,title:T.blockletVersion,describe:T.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:j=>{const T=c[j];return t.jsx(E,{className:"note",children:T.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:j=>t.jsx(rn,{type:j==="published"?"success":"warning",children:j==="published"?"Released":vs(j)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:j=>{const T=c[j];return T.status!==re.PROJECT.RELEASE_STATUS.published?"":t.jsx(ln,{value:Number(T.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:j=>{var g;const T=c[j];let A="",U="";const q=T.status==="published";if(q){const _=ce(v,`/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),O=new URL(v);O.pathname=ce(O.pathname,"/launch-blocklet/agreement"),O.searchParams.set("blocklet_meta_url",_),A=O.href,U=ce(`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const m=(g=h.blockletComponents)!=null&&g.some(_=>_.included)||T.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[q&&m==="pack"&&t.jsx(de,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:A,target:"_blank",rel:"noreferrer",children:t.jsx(hn,{sx:{fontSize:18}})})})}),q&&t.jsx(de,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:U,children:t.jsx(ws,{sx:{fontSize:18}})})})}),t.jsx(de,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>x(T),children:t.jsx(cn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(er,{children:[t.jsxs(u,{className:"header",children:[C,t.jsx(le,{to:"new-release/none",children:t.jsxs(ot,{variant:"contained",children:[t.jsx($t,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]}),t.jsx(Lt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:L,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),b&&t.jsx(Nt,{title:e(`${e("common.delete")} ${b.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:y,onCancel:()=>p(null)})]})}const er=ae(u)`
|
|
3
3
|
.header {
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,g as qe}from"./vendor-react-D-afvo_7.js";import{j as e,T as O,M as R,bI as ke,bY as Le,bZ as Z,bK as Ne,bN as Ae,a2 as E,br as Ge,ad as Ve,E as w,aa as $,aN as Ke,bL as Ue,I as z,a3 as y,a1 as Ze,al as Be,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-xF5F4eT7.js";import{d as ce}from"./Add-CuIZWfjH.js";import{e as q,a6 as G,a2 as N,j as A,w as Qe,$ as Xe,b as de,au as ue,n as et,ab as tt,a1 as _e,bl as X,bm as be,av as st}from"./vendor-arcblock-DE69EmW_.js";import{d as te}from"./EditIcon-BOr0kf6I.js";import{d as rt}from"./LockIcon-D-W4Rph6.js";import{L as pe,S as me,d as nt}from"./list-header-DxG3xooH.js";import{L as V,am as Se,H as at}from"./vendor-utils-5TjOM6td.js";import{y as _,M as K,as as Re,B as ot,aa as it,f as lt,h as ct,b as J,at as dt}from"./index-DVfi3VUs.js";import{u as U}from"./dashboard-DQnfagMU.js";import{w as M,P as we}from"./permission-BQ0E8FmL.js";import{C as fe}from"./confirm-DfsY08eB.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-CSRPwRzS.js";import{W as ze}from"./did-address-CsW_VsB3.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-BKxTDk_P.js";import"./useLocalStorage-DYSzZAco.js";import"./PlayArrow-CZfWYrXK.js";import"./get-safe-url-
|
|
1
|
+
import{r as b,g as qe}from"./vendor-react-D-afvo_7.js";import{j as e,T as O,M as R,bI as ke,bY as Le,bZ as Z,bK as Ne,bN as Ae,a2 as E,br as Ge,ad as Ve,E as w,aa as $,aN as Ke,bL as Ue,I as z,a3 as y,a1 as Ze,al as Be,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-xF5F4eT7.js";import{d as ce}from"./Add-CuIZWfjH.js";import{e as q,a6 as G,a2 as N,j as A,w as Qe,$ as Xe,b as de,au as ue,n as et,ab as tt,a1 as _e,bl as X,bm as be,av as st}from"./vendor-arcblock-DE69EmW_.js";import{d as te}from"./EditIcon-BOr0kf6I.js";import{d as rt}from"./LockIcon-D-W4Rph6.js";import{L as pe,S as me,d as nt}from"./list-header-DxG3xooH.js";import{L as V,am as Se,H as at}from"./vendor-utils-5TjOM6td.js";import{y as _,M as K,as as Re,B as ot,aa as it,f as lt,h as ct,b as J,at as dt}from"./index-DVfi3VUs.js";import{u as U}from"./dashboard-DQnfagMU.js";import{w as M,P as we}from"./permission-BQ0E8FmL.js";import{C as fe}from"./confirm-DfsY08eB.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-CSRPwRzS.js";import{W as ze}from"./did-address-CsW_VsB3.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-BKxTDk_P.js";import"./useLocalStorage-DYSzZAco.js";import"./PlayArrow-CZfWYrXK.js";import"./get-safe-url-SccGjxz4.js";import"./index-DUVrFM9m.js";import"./session-DKWhsUi1.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-C8xfkBe6.js";import"./cloneDeep-BRiLvZjr.js";var he={};Object.defineProperty(he,"__esModule",{value:!0});var Q=he.default=void 0;mt(b);var Te=e;function mt(o){return o&&o.__esModule?o:{default:o}}function Pe(o,u){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(o);u&&(d=d.filter(function(m){return Object.getOwnPropertyDescriptor(o,m).enumerable})),i.push.apply(i,d)}return i}function Ie(o){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?Pe(Object(i),!0).forEach(function(d){ft(o,d,i[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach(function(d){Object.defineProperty(o,d,Object.getOwnPropertyDescriptor(i,d))})}return o}function ft(o,u,i){return(u=ht(u))in o?Object.defineProperty(o,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[u]=i,o}function ht(o){var u=xt(o,"string");return typeof u=="symbol"?u:u+""}function xt(o,u){if(typeof o!="object"||!o)return o;var i=o[Symbol.toPrimitive];if(i!==void 0){var d=i.call(o,u||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(o)}var xe=function(u){return(0,Te.jsx)("svg",Ie(Ie({},u),{},{children:(0,Te.jsx)("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"})}))};xe.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};xe.displayName="delete";Q=he.default=xe;var Oe={exports:{}},Ee={exports:{}};(function(){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u={rotl:function(i,d){return i<<d|i>>>32-d},rotr:function(i,d){return i<<32-d|i>>>d},endian:function(i){if(i.constructor==Number)return u.rotl(i,8)&16711935|u.rotl(i,24)&4278255360;for(var d=0;d<i.length;d++)i[d]=u.endian(i[d]);return i},randomBytes:function(i){for(var d=[];i>0;i--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(i){for(var d=[],m=0,c=0;m<i.length;m++,c+=8)d[c>>>5]|=i[m]<<24-c%32;return d},wordsToBytes:function(i){for(var d=[],m=0;m<i.length*32;m+=8)d.push(i[m>>>5]>>>24-m%32&255);return d},bytesToHex:function(i){for(var d=[],m=0;m<i.length;m++)d.push((i[m]>>>4).toString(16)),d.push((i[m]&15).toString(16));return d.join("")},hexToBytes:function(i){for(var d=[],m=0;m<i.length;m+=2)d.push(parseInt(i.substr(m,2),16));return d},bytesToBase64:function(i){for(var d=[],m=0;m<i.length;m+=3)for(var c=i[m]<<16|i[m+1]<<8|i[m+2],h=0;h<4;h++)m*8+h*6<=i.length*8?d.push(o.charAt(c>>>6*(3-h)&63)):d.push("=");return d.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],m=0,c=0;m<i.length;c=++m%4)c!=0&&d.push((o.indexOf(i.charAt(m-1))&Math.pow(2,-2*c+8)-1)<<c*2|o.indexOf(i.charAt(m))>>>6-c*2);return d}};Ee.exports=u})();var gt=Ee.exports,le={utf8:{stringToBytes:function(o){return le.bin.stringToBytes(unescape(encodeURIComponent(o)))},bytesToString:function(o){return decodeURIComponent(escape(le.bin.bytesToString(o)))}},bin:{stringToBytes:function(o){for(var u=[],i=0;i<o.length;i++)u.push(o.charCodeAt(i)&255);return u},bytesToString:function(o){for(var u=[],i=0;i<o.length;i++)u.push(String.fromCharCode(o[i]));return u.join("")}}},Fe=le;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|