@abtnode/blocklet-services 1.16.39-beta-20250208-101442-7280c143 → 1.16.39-beta-20250209-032436-5ceca2cb
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 +2 -0
- package/dist/assets/{Add-_iRymiOl.js → Add-BKkOI8kr.js} +1 -1
- package/dist/assets/{ArrowDropDown-DyEwa2F9.js → ArrowDropDown-Cj_5MpNL.js} +1 -1
- package/dist/assets/{CheckCircle-Tp5VOipm.js → CheckCircle-Dc8yF4jd.js} +1 -1
- package/dist/assets/{ChevronLeft-D2Ho6WQh.js → ChevronLeft-BKCFH_7s.js} +1 -1
- package/dist/assets/{ChevronRight-gE0lOnIo.js → ChevronRight-mqM60WjL.js} +1 -1
- package/dist/assets/{DeleteOutline-C6VkRbFK.js → DeleteOutline-D6WRSywd.js} +1 -1
- package/dist/assets/{Done-DVvDyJtD.js → Done-B19I_hTo.js} +1 -1
- package/dist/assets/{Download-B1t0EslI.js → Download-D8gClHbi.js} +1 -1
- package/dist/assets/{Error-DEnZKIyw.js → Error-C036vLpd.js} +1 -1
- package/dist/assets/{Google-C5Apqxhw.js → Google-BDjjtixD.js} +1 -1
- package/dist/assets/{InfoOutlined-C5fMx7-l.js → InfoOutlined-CJxRYyjF.js} +1 -1
- package/dist/assets/{Launch-vt_CNjmC.js → Launch-ChAa9OLi.js} +1 -1
- package/dist/assets/{LaunchOutlined-DxGn2DKz.js → LaunchOutlined-CJ2Mgn9y.js} +1 -1
- package/dist/assets/{Loop-OLIg6dh7.js → Loop-0uHSVzVg.js} +1 -1
- package/dist/assets/{MoreHoriz-BkVO_QXB.js → MoreHoriz-D_AgpVtE.js} +1 -1
- package/dist/assets/{PlayArrow-CyaFn-Ol.js → PlayArrow-DjBGNK_J.js} +1 -1
- package/dist/assets/{ViewList-PZwK-0pV.js → ViewList-C6uTrCwG.js} +1 -1
- package/dist/assets/{access-control-C_I9vnpS.js → access-control-C2T3sxUP.js} +1 -1
- package/dist/assets/{actions-CS0A6ZvH.js → actions-caLBBlX_.js} +1 -1
- package/dist/assets/{add-component-core-CDWBeeS1.js → add-component-core-jBUQht_3.js} +1 -1
- package/dist/assets/{add-resource-E7327Bws.js → add-resource-5eij1EQ2.js} +1 -1
- package/dist/assets/{addon-bMI-7aOZ.js → addon-BKFsk9qg.js} +1 -1
- package/dist/assets/{analytics-D32wGcj3.js → analytics-CxElQEQc.js} +1 -1
- package/dist/assets/audit-logs-W6E8clAj.js +18 -0
- package/dist/assets/{base32-Bb5-8D4h.js → base32-BTrVqdDB.js} +1 -1
- package/dist/assets/{branding-DR_L569O.js → branding-CNHSPWmv.js} +2 -2
- package/dist/assets/{bundle-avatar-BcIG01qq.js → bundle-avatar-DsrUOZA3.js} +1 -1
- package/dist/assets/button-muv2pKA-.js +1 -0
- package/dist/assets/{click-to-copy-BixfYLPy.js → click-to-copy-GbkBj9-M.js} +1 -1
- package/dist/assets/{complete-ZFv3syW1.js → complete-3tT09UKh.js} +4 -4
- package/dist/assets/{component-Cq51erjd.js → component-BNZa9Xug.js} +1 -1
- package/dist/assets/{config-D-gLxJK_.js → config-BBPB9jNr.js} +1 -1
- package/dist/assets/{config-BQiB23JZ.js → config-CK54nGqg.js} +1 -1
- package/dist/assets/{config-navigation-JwYI5c3u.js → config-navigation-CXoO_ww-.js} +3 -3
- package/dist/assets/{config-space-Q6HENzum.js → config-space-CKZD0O9k.js} +1 -1
- package/dist/assets/{confirm-CPtiZE0r.js → confirm-Cg9hPCJr.js} +1 -1
- package/dist/assets/connect-BzODMkFA.js +1 -0
- package/dist/assets/{connect-HQAAv30Q.js → connect-DgEXpEwR.js} +1 -1
- package/dist/assets/{connect-to-Bt8_yfyU.js → connect-to-DBKq6Esd.js} +1 -1
- package/dist/assets/{dashboard-BxMHOYyh.js → dashboard-BI-BX7tJ.js} +10 -10
- package/dist/assets/{did-address-Bpb9HTRt.js → did-address-BwvGS0Z4.js} +1 -1
- package/dist/assets/{domain-BaqHASeF.js → domain-BigaYRFA.js} +2 -2
- package/dist/assets/{domain-list-DxhvsNeW.js → domain-list-Caw2busb.js} +2 -2
- package/dist/assets/{email-CI0YNxDH.js → email-BXwnQPgX.js} +2 -2
- package/dist/assets/{exchange-passport--ITba_8X.js → exchange-passport-BBh5j_bb.js} +1 -1
- package/dist/assets/{form-text-input-C3pP_SCY.js → form-text-input-DGmQTvTb.js} +2 -2
- package/dist/assets/{fuel-BzjjfKxQ.js → fuel-D3Pm6S5_.js} +1 -1
- package/dist/assets/{fullpage-Bxt7Lsx9.js → fullpage-DCmKoQcJ.js} +1 -1
- package/dist/assets/{get-safe-url-ClvIGbO9.js → get-safe-url-1p-YuOdC.js} +1 -1
- package/dist/assets/{get-safe-url-DBA3YcFh.js → get-safe-url-BF6AgHuB.js} +1 -1
- package/dist/assets/{home-h-b1y9y8.js → home-CmZzWlw6.js} +1 -1
- package/dist/assets/{iframe-DuaKUdqD.js → iframe-U1FevMj-.js} +1 -1
- package/dist/assets/{index-C3EMCJb1.js → index-BJ8kDugj.js} +1 -1
- package/dist/assets/{index-D6xvEfk8.js → index-BMlnr8ok.js} +1 -1
- package/dist/assets/{index-BvvY74m1.js → index-BQQG2pi0.js} +3 -3
- package/dist/assets/{index-Cp0o05oj.js → index-BzJecSS8.js} +1 -1
- package/dist/assets/{index-1soveoNH.js → index-CIZ-6weB.js} +3 -3
- package/dist/assets/{index-gRh_ocU8.js → index-CJHEwaI7.js} +1 -1
- package/dist/assets/{index-DswiSRuh.js → index-COUN--i8.js} +3 -3
- package/dist/assets/{index-B8ZVPR0B.js → index-CPUZHn0F.js} +4 -4
- package/dist/assets/{index-BFDq4CA-.js → index-CVFyE6Sl.js} +1 -1
- package/dist/assets/{index-DfOPIsLs.js → index-D3M3VZra.js} +1 -1
- package/dist/assets/{index-DH7yV8cM.js → index-DEq8S4-I.js} +1 -1
- package/dist/assets/{index-C8EWVV7E.js → index-DUWG1KqB.js} +1 -1
- package/dist/assets/{index-BzmHWq6G.js → index-DmOpbC_Q.js} +1 -1
- package/dist/assets/{index-Fyc9Yh32.js → index-DvZ_TLdU.js} +1 -1
- package/dist/assets/{index-CT2kaEsJ.js → index-NO9AJ1dn.js} +1 -1
- package/dist/assets/{invitation-B1_YvDcH.js → invitation-BaO_F6sL.js} +3 -3
- package/dist/assets/{invite-DJGa7dsX.js → invite-Vyg0B--e.js} +1 -1
- package/dist/assets/{issue-passport-Cy103t5H.js → issue-passport-Bj7JTsXA.js} +1 -1
- package/dist/assets/{item-DC2b5v0Z.js → item-BZcF6J-s.js} +1 -1
- package/dist/assets/{layout-D9K6IZdV.js → layout-WoEg-ZDx.js} +1 -1
- package/dist/assets/{list-D3k0O0Xi.js → list-D8KZ_085.js} +1 -1
- package/dist/assets/{list-header-CegSwHre.js → list-header-DfHbQVcL.js} +1 -1
- package/dist/assets/{localization-wwWSGBBO.js → localization-DqiVqCQK.js} +1 -1
- package/dist/assets/{log-B5shqSVV.js → log-q8WOeeqF.js} +1 -1
- package/dist/assets/login-BgJ9dTuh.js +1 -0
- package/dist/assets/{login-oauth-callback-s99_h6fH.js → login-oauth-callback-BnRQTkBq.js} +1 -1
- package/dist/assets/{logo-uploader-BeSpYnSl.js → logo-uploader-BgvRj-1f.js} +3 -3
- package/dist/assets/{lost-passport-DlMMmOpM.js → lost-passport-D9QUmr6L.js} +3 -3
- package/dist/assets/{open-window-Zq1x7xKe.js → open-window-Dw5QIWq6.js} +1 -1
- package/dist/assets/{overview-BOIsSliU.js → overview-DsBm8pO-.js} +1 -1
- package/dist/assets/{page-header-DqhVsAOw.js → page-header-BR1xofie.js} +1 -1
- package/dist/assets/{permission-C4wOllow.js → permission-DLT57IZZ.js} +1 -1
- package/dist/assets/{preferences-M821Nbub.js → preferences-DzQwzTc-.js} +1 -1
- package/dist/assets/publish-resource-CE-sYI4f.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-CWDllqTB.js → react-beautiful-dnd.esm-BtA3JVog.js} +1 -1
- package/dist/assets/{relative-time-cOKPNX1U.js → relative-time-yqjvLxNC.js} +1 -1
- package/dist/assets/sdk-CpE7sbD_.js +1 -0
- package/dist/assets/session-D-F-iijZ.js +1 -0
- package/dist/assets/{setup-Cm--NvZ1.js → setup-TRiUB1Px.js} +3 -3
- package/dist/assets/{start-C_nc1AIm.js → start-ROppIq-j.js} +1 -1
- package/dist/assets/{step-actions-DLkXmgm2.js → step-actions-BfPRhdBV.js} +1 -1
- package/dist/assets/{studio-BBxcN5pm.js → studio-TADgck-O.js} +1 -1
- package/dist/assets/{switch-control-CyqD0Juh.js → switch-control--0xPf_7K.js} +1 -1
- package/dist/assets/{traffic-CS576wme.js → traffic-Bfk2lmR-.js} +3 -3
- package/dist/assets/{transfer-DC-nnm4b.js → transfer-DizfAsbo.js} +1 -1
- package/dist/assets/{unsubscribe-DDgZq9Y7.js → unsubscribe-elexh-kW.js} +1 -1
- package/dist/assets/{useLocalStorage-CVBgwJgU.js → useLocalStorage-DnlK9tHz.js} +1 -1
- package/dist/assets/{user-center-BxglHi8W.js → user-center-m1aTOIEE.js} +1 -1
- package/dist/assets/{util-5SXnNpj9.js → util-B9yvyJKW.js} +1 -1
- package/dist/assets/{util-DMMg7Sbk.js → util-eME8uaMf.js} +1 -1
- package/dist/assets/{vendor-arcblock-oqH5gsLR.js → vendor-arcblock-DbrmIue2.js} +1 -1
- package/dist/assets/{wrap-locale-D4yZwBtm.js → wrap-locale-fB5m4Aoq.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/service-worker.js +1 -1
- package/package.json +21 -21
- package/dist/assets/audit-logs-Ct6NbUiV.js +0 -18
- package/dist/assets/button-C4NPz_vA.js +0 -1
- package/dist/assets/connect-BkKF9mgk.js +0 -1
- package/dist/assets/login-3tpx-b2O.js +0 -1
- package/dist/assets/publish-resource-B-y64yfT.js +0 -1
- package/dist/assets/sdk-Dwpx68pe.js +0 -1
- package/dist/assets/session-B07p7iif.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as ae,aF as $e,z as mt,f as Me,L as pt,e as E,a5 as ft,j as O,aY as ht,aZ as Be,a_ as xt,C as Pe,Y as gt,a1 as V,a8 as Ue,aU as Dt,at as yt}from"./vendor-arcblock-oqH5gsLR.js";import{a1 as le,j as e,bX as ze,a3 as p,a2 as U,T as F,ad as ce,e as Z,t as de,aj as Ne,E as s,a4 as B,M as jt,al as Oe,bm as vt,bn as bt,am as wt,ao as Ct,aa as St,I as Rt}from"./vendor-mui-core-xF5F4eT7.js";import{x as Y,w as At,y as It,H as ue,C as Pt,n as Ee,b as Et}from"./vendor-utils-5TjOM6td.js";import{r as A,g as Tt}from"./vendor-react-D-afvo_7.js";import{d as kt}from"./Add-_iRymiOl.js";import{b as Lt}from"./base32-Bb5-8D4h.js";import{ah as _t,ai as We,y as q,B as He,h as Te,aj as Ve,T as Ft,ak as qt,ag as Ye,b as $t,H as ke,al as Mt,M as Bt,J as Ut,am as zt,an as Nt,f as Le}from"./index-1soveoNH.js";import{d as Ot}from"./LockIcon-D-W4Rph6.js";import{s as Wt,n as Ht,u as H,o as Vt,w as Yt}from"./vendor-hooks-BKxTDk_P.js";import{d as Zt}from"./CheckCircle-Tp5VOipm.js";import{d as Gt,p as _e}from"./util-DMMg7Sbk.js";import{_ as G}from"./useSetState-Crt4S51m.js";import{w as Ze}from"./permission-C4wOllow.js";import{_ as Kt,D as Fe}from"./useAsyncRetry-Bmo6a1Zp.js";import{C as K}from"./confirm-CPtiZE0r.js";import{d as Qt}from"./InfoOutlined-C5fMx7-l.js";import{_ as Xt}from"./useAsync-Ua5iss51.js";import"./api-K65cLqol.js";import{I as Jt}from"./index-Fyc9Yh32.js";import{A as en}from"./actions-CS0A6ZvH.js";var me={},tn=le;Object.defineProperty(me,"__esModule",{value:!0});var Ge=me.default=void 0,nn=tn(ae()),sn=e;Ge=me.default=(0,nn.default)((0,sn.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");const on=$e({});on.interceptors.request.use(n=>{const t=window.blocklet?window.blocklet.prefix:"/";return n.baseURL=t||"",n.url=Y("/api",String(n.url)),n.timeout=2e5,n.params=n.params||{},new URLSearchParams(n.url.split("?")[1]).has("locale")||(n.params.locale=mt()),n},n=>Promise.reject(n));const Ke=(...n)=>$e(...n),rn=(n,t)=>t?n?[n,...Array.isArray(t)?t:[t]]:t:n,an=(n,{width:t=600,height:i=700,name:o="did-domain:popup"}={})=>{const a=window.screenX+(window.innerWidth-t)/2,r=window.screenY+(window.innerHeight-i)/2,l=[`left=${a}`,`top=${r}`,`width=${t}`,`height=${i}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],c=window.open("",o,l.join(","));if(c===null)throw new Error("Failed to open popup");return c.location.href=At(n,{opener:window.location.origin}),c},ln="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Qe=async n=>{var d;if(!n||!(n!=null&&n.trim()))return null;const t=Ke(),i=new URL(n);i.pathname="__blocklet__.js",i.searchParams.set("type","json");const{data:o}=await t.get(i.toString()),a=(d=o==null?void 0:o.componentMountPoints)==null?void 0:d.find(h=>h.did===ln),r=new URL(n);r.pathname=a==null?void 0:a.mountPoint;const l=r.toString(),c=Y(l,"/api");return{base:l,api:c}},cn=Me({buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),dn=Me({buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),un={zh:dn,en:cn},mn=async({didDomainURL:n,delegatee:t,delegateePk:i})=>{const o=await Qe(n);if(!o)return null;const a=Ke({baseURL:o.api}),{data:r}=await a.post("/payment/session",{delegatee:t,delegateePk:i});return{sessionId:r.sessionId,baseURL:o.base}};function Xe({delegatee:n,delegateePk:t,didDomainURL:i,locale:o,title:a,onSuccess:r,...l}){const{t:c}=E(),[d,h]=Wt({currentState:1}),f=A.useRef(null),g=Ht(async()=>{const x=await mn({didDomainURL:i,delegatee:n,delegateePk:t});return x},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(x){console.error(x)}}),C=H(x=>{var m,S,I,v;x.data.type==="didDomain.success"&&(r==null||r({nftDid:(m=x.data)==null?void 0:m.nftDid,domain:(S=x.data)==null?void 0:S.domain,chainHost:(I=x.data)==null?void 0:I.chainHost}),(v=f.current)==null||v.close(),f.current=null,h({currentState:4}),setTimeout(()=>{h({currentState:8})},2e3))});Vt(()=>{var x;try{window.removeEventListener("message",C),(x=f.current)==null||x.close(),f.current=null}catch(m){console.warn("Failed to close popup",m)}});const D=H(()=>{h({currentState:1})}),j=H(()=>{if(h({currentState:2}),!g.data){console.error("Failed to create session");return}T({sessionId:g.data.sessionId,baseURL:g.data.baseURL})}),T=H(({sessionId:x,baseURL:m})=>{window.addEventListener("message",C);const S=new URL(m);S.searchParams.set("sessionId",x),S.searchParams.set("locale",o),f.current=an(S.toString());const I=setInterval(()=>{var v;(v=f.current)!=null&&v.closed&&(clearInterval(I),D())},1e3);return()=>clearInterval(I)});return e.jsxs(e.Fragment,{children:[e.jsx(ze,{loading:g.loading,onClick:j,variant:"contained",startIcon:e.jsx(Gt,{}),...l,children:a||c("buy.button.title")}),e.jsxs(ft,{fullWidth:!0,maxWidth:"xs",open:d.currentState>1&&d.currentState<8,onClose:D,children:[!g.error&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[d.currentState===2&&e.jsx(U,{size:50}),d.currentState===4&&e.jsx(Zt,{sx:{color:"primary.main",fontSize:"5rem"}}),d.currentState===2&&e.jsx(F,{children:c("buy.status.inProgress")}),d.currentState===4&&e.jsx(F,{children:c("buy.status.success")})]}),g.error&&e.jsx(ce,{severity:"error",children:c("buy.error.failedToCreateSession")})]})]})}const Je={onSuccess:()=>{},title:""};Xe.defaultProps=Je;function et(n){return e.jsx(pt,{locale:n.locale,translations:un,children:e.jsx(Xe,{...n})})}et.defaultProps=Je;function tt({nftDid:n,didDomainURL:t,locale:i,sx:o}){const{t:a}=E(),[r,l]=G({safeIframeRef:null,popoverAnchorEl:null}),c=A.useRef(null),d=Z(),h=de(d.breakpoints.down("md")),f=j=>{l({popoverAnchorEl:j.currentTarget})},g=()=>{l({popoverAnchorEl:null})},C=Yt(async()=>{const j=await Qe(t);return j?j.base:null});if(!C.value)return null;if(C.loading)return e.jsx(U,{});const D=Y(C.value,`/embed/domain?nft-did=${n}&locale=${i}`);return e.jsxs(e.Fragment,{children:[e.jsx(p,{component:"img",src:Y(t,"/.well-known/service/blocklet/logo"),alt:"logo",width:16,height:16,onClick:f,sx:rn({cursor:"pointer"},o)}),e.jsx(Ne,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:g,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:c,title:a("common.subscription"),width:h?"320px":"400px",height:h?"600px":"680px",style:{border:0},src:D})})]})}tt.defaultProps={sx:{}};const pn=n=>["waiting","creating","renewaling"].includes(n);function pe(n){var w,R;const{t}=E(),[i,o]=A.useState(!1),{inService:a}=q(),[r,l]=A.useState(null),{siteId:c,domain:d,onAdd:h,children:f,did:g}=n,[C,D]=A.useState(!1),{api:j,ws:{useSubscription:T}}=q(),{mode:x,actions:{refreshDomainStatus:m}}=He(),S=Kt(async()=>{const{cert:b}=await j.findCertificateByDomain({input:{domain:d,did:g}});return b}),I=(b,z)=>{b.domain===d&&(D(!1),o(!1),a&&x!=="setup"&&(z==="success"?O.success(t("setup.domain.genCertSuccess",{domain:b.domain})):z==="error"&&O.error(t("setup.domain.genCertFailed",{domain:b.domain,message:b.message}))))};if(A.useEffect(()=>{var b;S.loading||D(pn((b=S.value)==null?void 0:b.status))},[S.loading,(w=S.value)==null?void 0:w.status]),T(Te.BlockletEvents.certError,b=>I(b,"error")),T(Te.BlockletEvents.certIssued,b=>{S.retry(),m(b.domain),I(b,"success")}),S.loading||((R=S.value)==null?void 0:R.status)==="normal")return"";const v=()=>{o(!1),l(null)},k=async()=>{o(!0);try{await j.issueLetsEncryptCert({input:{siteId:c,domain:d,did:g,inBlockletSetup:x==="setup"}}),h(),D(!0)}catch(b){console.error(b),D(!1)}finally{o(!1),l(null)}},u={title:t("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(ce,{severity:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:k,onCancel:v},L=b=>{b.stopPropagation(),l(u)};return e.jsxs(e.Fragment,{children:[C?e.jsx(B,{title:t("router.cert.issuing"),children:e.jsx(U,{size:12})}):f({loading:i,open:L}),r&&e.jsx(K,{color:"primary",title:r.title,description:r.description,confirm:r.confirm,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}pe.propTypes={domain:s.string.isRequired,did:s.string.isRequired,siteId:s.string.isRequired,onAdd:s.func,children:s.any};pe.defaultProps={onAdd:()=>{},children:null};function fe(n){const{domain:t,domainStatus:i,...o}=n;return _t(t)||!We(t)||It(i)||i!=null&&i.isHttps?"":e.jsx(pe,{domain:t,...o})}fe.propTypes={domain:s.string.isRequired,domainStatus:s.shape({isHttps:s.bool}).isRequired,did:s.string.isRequired,onAdd:s.func,children:s.any};fe.defaultProps={onAdd:()=>{},children:null};var he={},fn=le;Object.defineProperty(he,"__esModule",{value:!0});var nt=he.default=void 0,hn=fn(ae()),xn=e;nt=he.default=(0,hn.default)((0,xn.jsx)("path",{d:"M17 20.41 18.41 19 15 15.59 13.59 17zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5z"}),"CallMerge");const st=A.createContext({}),{Provider:gn,Consumer:ts}=st;function Dn({children:n}){const[t,i]=G({domain:"",error:null}),{locale:o}=E(),a={error:t.error,domain:t.domain,setError:r=>{i({error:r})},setDomain:r=>{const l=ue(r),c=Ve(l,o);i({domain:l,error:c})}};return e.jsx(gn,{value:{value:a},children:n})}function yn(){const{value:n}=A.useContext(st);return n}const{joinURL:qe}=Ft,jn=qt,ot="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",vn=async n=>{var c;if(!n||!(n!=null&&n.trim()))return null;const t=new URL(n);t.pathname="__blocklet__.js",t.searchParams.set("type","json");const{data:i}=await jn.get(t.toString()),o=(c=i==null?void 0:i.componentMountPoints)==null?void 0:c.find(d=>d.did===ot),a=new URL(n);a.pathname=o==null?void 0:o.mountPoint;const r=a.toString(),l=qe(r,"/api");return{base:r,api:l,domain:qe(l,"/domains")}};var bn={DID_DOMAIN_SERVICE_DID:ot,getDidDomainServiceURL:vn},Q={exports:{}};const wn=ht,Cn=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class it extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const Sn=(n,t,i)=>{const o=i.retries-(t-1);return n.attemptNumber=t,n.retriesLeft=o,n},Rn=n=>Cn.includes(n),rt=(n,t)=>new Promise((i,o)=>{t={onFailedAttempt:()=>{},retries:10,...t};const a=wn.operation(t);a.attempt(async r=>{try{i(await n(r))}catch(l){if(!(l instanceof Error)){o(new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`));return}if(l instanceof it)a.stop(),o(l.originalError);else if(l instanceof TypeError&&!Rn(l.message))a.stop(),o(l);else{Sn(l,r,t);try{await t.onFailedAttempt(l)}catch(c){o(c);return}a.retry(l)||o(a.mainError())}}})});Q.exports=rt;Q.exports.default=rt;Q.exports.AbortError=it;var An=Q.exports;const In=Tt(An);function xe({domain:n,resolvedTarget:t,...i}){const{t:o,locale:a}=E();return e.jsxs(p,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...i,children:[e.jsxs(p,{display:"flex",children:[o("router.domain.setup.tipStart"),n&&e.jsx(p,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),o("router.domain.setup.tipEnd"),":"]}),e.jsxs(p,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[e.jsx(se,{label:o("router.domain.setup.recordType"),value:"CNAME",locale:a}),e.jsx(se,{label:o("router.domain.setup.recordValue"),value:t,locale:a})]})]})}xe.propTypes={domain:s.string,resolvedTarget:s.string.isRequired};xe.defaultProps={domain:""};function se({locale:n,label:t,value:i}){const o=de(r=>r.breakpoints.down("md")),a=Z();return e.jsx(Jt,{name:t,nameWidth:120,children:e.jsxs(p,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(F,{component:"span",color:"primary.main",overflow:"auto",sx:o?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:i}),e.jsx(Be,{content:i,locale:n,style:{marginLeft:"4px",color:a.palette.text.secondary}})]})})}se.propTypes={locale:s.string.isRequired,label:s.string.isRequired,value:s.string.isRequired};function ge({siteId:n,teamDid:t,cnameDomain:i,defaultCustomDomain:o,onInputDomain:a,appId:r,appPk:l,onSuccess:c,onError:d,disabled:h,autoFocus:f,inBlockletSetup:g,shouldCheckDomain:C,onStateChange:D,currentIp:j,resolveDomain:T,...x}){const{t:m,locale:S}=E(),{api:I,info:v}=q(),k=yn(),u=Z(),L=xt({key:"sm"}),[w,R]=G({submittingDomain:!1,domain:o,error:null,type:v!=null&&v.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1}),b=Xt(()=>bn.getDidDomainServiceURL(v==null?void 0:v.nftDomainUrl));if(v!=null&&v.nftDomainUrl&&b.loading)return e.jsx(p,{...x,children:e.jsx(Pe,{relative:"parent",children:e.jsx(U,{})})});if(b.error)return e.jsx(p,{...x,children:e.jsx(Pe,{relative:"parent",children:b.error.message})});const z=b.value,lt=()=>{R({invalidDNSDomain:null})},ee=async y=>{D(m("setup.domain.addingDomain")),await I.addDomainAlias({input:{id:n,domainAlias:y,teamDid:t,inBlockletSetup:!0}}),R({submittingDomain:!1}),c({domain:y,type:"inputDomain"})},Se=async({domain:y,type:P,nftDid:N,chainHost:_})=>{try{if(!C){if(P==="inputDomain"){await ee(y);return}c({domain:y,type:P,nftDid:N,chainHost:_});return}D({text:m("setup.domain.checkingResolvable")});let $=30;const te=3e3,ut=$*1e3/te,Ae=setInterval(()=>{if($<=0){clearInterval(Ae);return}D({text:`${m("setup.domain.checkingResolvable")} (${$--}s)`})},1e3),Ie=await In(async()=>{const{data:M}=await T(y);if(!M.address)throw new Error("Cannot resolve domain");return M.address},{retries:ut,minTimeout:te,maxTimeout:te,onFailedAttempt:console.error}).catch(console.error);if(clearInterval(Ae),!Ie){const M=m("setup.domain.cannotResolve",{domain:y});if(P==="nftDomain"){O.error(M),c({domain:y,type:"nftDomain"});return}D({text:""}),R({invalidDNSDomain:{domain:y,error:M},domain:y,type:P,submittingDomain:!1});return}if(Ie!==j){const M=m("setup.domain.resolvedAddressError",{domain:y,curDomain:window.location.hostname});if(P==="nftDomain"){O.error(M),c({domain:y,type:"nftDomain"});return}D({text:""}),R({invalidDNSDomain:{domain:y,error:M},domain:y,type:P,submittingDomain:!1});return}if(P==="nftDomain"){c({domain:y,type:"nftDomain"});return}await ee(y)}catch($){O.error($.message),D({text:""}),R({submittingDomain:!1})}},ct=async({domain:y,nftDid:P,chainHost:N})=>{try{const _=_e(y);R({submittingDomain:!0}),await I.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:_,nftDid:P,chainHost:N,teamDid:t,inBlockletSetup:g}});const $="nftDomain";R({showNFTDomainAuth:!1,type:$}),await Se({domain:_,type:$,nftDid:P,chainHost:N})}catch(_){O.error(_.message)}finally{R({showNFTDomainAuth:!1,submittingDomain:!1})}},dt=async()=>{try{R({submittingDomain:!0});const y=_e(w.domain);if(v.nftDomainUrl&&z&&(await I.isDidDomain({input:{domain:y}})).value===!0){R({showNFTDomainAuth:!0});return}await Se({domain:y,type:w.type})}catch(y){R({submittingDomain:!1}),k.setError(y.message)}},Re=k.error||w.error;return e.jsx(p,{...x,children:e.jsxs(p,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(p,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[e.jsx(F,{sx:{color:u.palette.text.primary},children:m("router.domainAlias.add.tips")}),e.jsx(jt,{sx:{display:"block",marginTop:"8px"},label:m("router.domainAlias.add.domainDescription"),helperText:w.type==="inputDomain"&&Re||m("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:h,value:w.domain,size:"small",variant:"outlined",error:!!Re&&w.type==="inputDomain",onChange:y=>{var _;const P=ue((_=y.target)==null?void 0:_.value);k.setDomain(P);const N=Ve(P,S);R({domain:P,error:N,type:"inputDomain"}),a({domain:P,error:N,type:"inputDomain"})},autoFocus:f,onBlur:()=>{k.domain||(R({error:null}),k.setError(null))}}),e.jsx(p,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(ze,{"data-cy":"confirm-add-domain",fullWidth:L,variant:"contained",loading:w.submittingDomain,onClick:dt,children:m("common.add")})}),e.jsxs(p,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:u.palette.primary.main},onClick:()=>R({showDnsTip:!w.showDnsTip}),children:[e.jsx(Qt,{fontSize:"1em"}),m("router.domainAlias.showTipHint")]}),w.showDnsTip&&e.jsx(xe,{domain:w.domain,resolvedTarget:i,style:{marginTop:"4px"}})]}),w.invalidDNSDomain&&e.jsx(K,{title:m("common.reminder"),description:m("setup.domain.invalidDNSReminder",{error:w.invalidDNSDomain.error}),color:"primary",confirm:m("setup.domain.continueAdd"),onConfirm:()=>ee(w.invalidDNSDomain.domain,w.type),onCancel:lt}),z&&e.jsx(gt,{open:w.showNFTDomainAuth,popup:!0,useSocket:!1,forceConnected:!1,action:"authorize",baseUrl:z.api,checkFn:Pt.create({baseURL:z.api}).get,extraParams:{delegatee:r,delegateePk:l,domain:w.domain},onSuccess:ct,onClose:()=>R({showNFTDomainAuth:!1,submittingDomain:!1}),checkTimeout:60*5e3,showDownload:!1,messages:{title:m("router.domainAlias.addDomainNFT.connect.title"),scan:m("router.domainAlias.addDomainNFT.connect.scan"),confirm:m("router.domainAlias.addDomainNFT.connect.confirm"),success:m("router.domainAlias.addDomainNFT.connect.success")}})]})})}ge.propTypes={siteId:s.string.isRequired,currentIp:s.string,teamDid:s.string.isRequired,cnameDomain:s.string.isRequired,defaultCustomDomain:s.string,onInputDomain:s.func,onSuccess:s.func,appId:s.string,appPk:s.string,disabled:s.bool,autoFocus:s.bool,inBlockletSetup:s.bool,shouldCheckDomain:s.bool,onStateChange:s.func,resolveDomain:s.func,onError:s.func};ge.defaultProps={defaultCustomDomain:"",currentIp:"",onInputDomain:Ee,onSuccess:Ee,appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1,shouldCheckDomain:!1,onStateChange:()=>{},resolveDomain:()=>{},onError:()=>{}};function De({id:n,children:t,title:i,teamDid:o,systemDomains:a,appId:r,appPk:l}){const{t:c}=E(),[d,h]=G({loading:!1,confirmSetting:null}),f=a.find(j=>Ye.isDidDomain(j)),g=()=>{h({loading:!1,confirmSetting:null})},C={title:i||c("router.domainAlias.add.title"),description:function(T,x,m){return e.jsx(ge,{siteId:n,teamDid:o,cnameDomain:f,onSuccess:()=>h({confirmSetting:null}),onInputDomain:({domain:S,type:I,error:v})=>{x({...T,domain:S,type:I,__disableConfirm:!!v}),m(v)},appId:r,appPk:l})},confirm:c("common.confirm"),cancel:c("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:g},D=j=>{j.stopPropagation(),h({confirmSetting:C})};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:d.loading,open:D}):e.jsxs(Oe,{onClick:D,className:"rule-action","data-cy":"action-add-domain-alias",children:[d.loading?e.jsx(U,{size:16}):e.jsx(nt,{style:{fontSize:18,marginRight:5}}),c("router.domainAlias.add.title")]}),d.confirmSetting&&e.jsx(K,{title:d.confirmSetting.title,description:d.confirmSetting.description,confirm:d.confirmSetting.confirm,cancel:d.confirmSetting.cancel,params:d.confirmSetting.params,onCancel:d.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:d.loading,maxWidth:"sm"})]})}De.propTypes={id:s.string.isRequired,children:s.any,title:s.string,teamDid:s.string,systemDomains:s.arrayOf(s.string).isRequired,appId:s.string,appPk:s.string.isRequired};De.defaultProps={children:null,title:"",teamDid:"",appId:null};function Pn(n){return e.jsx(Dn,{children:e.jsx(De,{...n})})}function ye({appId:n,appPk:t,siteId:i,inBlockletSetup:o,teamDid:a,sx:r,...l}){const{api:c,info:d}=q(),{locale:h,t:f}=E(),g=async({domain:C,nftDid:D,chainHost:j})=>{await c.addDomainAlias({input:{id:i,type:"nft-domain",domainAlias:C,nftDid:D,chainHost:j,teamDid:a,inBlockletSetup:o}})};return e.jsx(et,{delegatee:n,delegateePk:t,didDomainURL:d.nftDomainUrl,onSuccess:g,locale:h,variant:"outlined",sx:r,title:f("router.domainAlias.addDomainNFT.buy"),...l})}ye.propTypes={appId:s.string.isRequired,appPk:s.string.isRequired,siteId:s.string.isRequired,inBlockletSetup:s.bool.isRequired,teamDid:s.string.isRequired,sx:s.object};ye.defaultProps={sx:{}};function je(n){const{t}=E(),[i,o]=A.useState(!1),[a,r]=A.useState(null),{id:l,domain:c,children:d,teamDid:h}=n,{api:f}=q(),g=()=>{o(!1),r(null)},C=async()=>{o(!0);try{await f.deleteDomainAlias({input:{id:l,domainAlias:c,teamDid:h}}),await $t(2e3)}catch(T){O.error(T.message)}finally{r(null),o(!1)}},D={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:C,onCancel:g},j=T=>{T.stopPropagation(),r(D)};return e.jsxs(e.Fragment,{children:[typeof d=="function"?d({loading:i,open:j}):e.jsxs(V,{edge:"end",onClick:j,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[i?e.jsx(U,{size:16}):e.jsx(Ue,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),a&&e.jsx(K,{title:a.title,description:a.description,confirm:a.confirm,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}je.propTypes={id:s.string.isRequired,domain:s.string.isRequired,children:s.any,teamDid:s.string};je.defaultProps={children:null,teamDid:""};function ve({site:n,domain:t,blocklet:i}){const{t:o}=E(),a=t.value===window.location.hostname;return e.jsx(en,{"data-cy":"domain-actions",size:"large",actions:[({close:r})=>{var l;return e.jsx(je,{id:n.id,domain:t.value,teamDid:(l=i==null?void 0:i.meta)==null?void 0:l.did,children:({open:c})=>e.jsx(B,{title:a?o("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(Oe,{disabled:t.isProtected||a,dense:!0,onClick:d=>{r(),c(d)},"data-cy":"action-toggle-block",children:[e.jsx(vt,{style:{minWidth:24,marginRight:8},children:e.jsx(Ue,{})}),e.jsx(bt,{primary:o("common.delete")})]},"remove")})})})}]})}ve.propTypes={site:s.object.isRequired,domain:s.object.isRequired,blocklet:s.object.isRequired};ve.defaultProps={};var be={},En=le;Object.defineProperty(be,"__esModule",{value:!0});var we=be.default=void 0,Tn=En(ae()),kn=e;we=be.default=(0,Tn.default)((0,kn.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Https");const X=s.shape({href:s.string,accessibility:s.shape({loading:s.bool,accessible:s.bool}),domainStatus:s.shape({isHttps:s.bool,matchedCert:s.object}),dns:s.shape({resolved:s.bool,ip:s.string})});function Ce({certificate:n}){const[t,i]=A.useState(null),o=q(),{t:a,locale:r}=E(),l=h=>{i(h.currentTarget)},c=()=>{i(null)},d=!!t;return e.jsxs(e.Fragment,{children:[e.jsx(we,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:l,onMouseLeave:c,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),e.jsx(Ne,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:c,disableRestoreFocus:!0,children:e.jsx(wt,{children:e.jsxs(Ct,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${o.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(F,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(F,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(F,{component:"div",children:`${a("common.issuer")}: ${Et(n,"issuer.commonName","")}`}),e.jsx(F,{component:"div",children:`${a("router.cert.issuedOn")}: ${ke(n.validFrom,r)}`}),e.jsx(F,{component:"div",children:`${a("router.cert.expiryOn")}: ${ke(n.validTo,r)}`})]})]})})})]})}Ce.propTypes={certificate:s.object};Ce.defaultProps={certificate:{}};function W({domain:n,filters:t}){const{t:i}=E(),{value:o,domainStatus:a}=n;if(!We(o))return null;let r=null,l=null;const{isHttps:c,matchedCert:d}=a;if(!Mt(o)){const{dns:{resolved:f,ip:g}={}}=a;f||g==="127.0.0.1"?r=e.jsx(B,{title:i("router.domain.verify.ok"),children:e.jsx(Fe,{color:"success"})}):r=e.jsx(B,{title:i("router.domain.verify.notResolved"),children:e.jsx(Fe,{color:"error"})})}c?l=e.jsx(Ce,{certificate:d}):l=e.jsx(B,{title:i("router.domain.https.bad"),children:e.jsx(we,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const h=t.map(f=>f==="domain"?r:f==="http"?l:null);return A.createElement(A.Fragment,null,...h)}W.propTypes={domain:X.isRequired,filters:s.array};W.defaultProps={filters:["domain","http"]};const Ln=Ze(J,"mutate_blocklets"),_n=Ze(J,"",Bt);function at(n){const{inService:t}=q(),{blocklet:i,loadingRuntimeInfo:o}=He();let a=Ln;return t&&(a=_n),e.jsx(a,{...n,blocklet:i,inService:t,loadingRuntimeInfo:o})}at.propTypes={listOnly:s.bool};at.defaultProps={listOnly:!1};function J({hasPermission:n,blocklet:t,loadingRuntimeInfo:i,inService:o,listOnly:a}){var S,I,v,k;const{t:r}=E(),{info:l}=q(),[c,d]=A.useState(!1),h=de(u=>u.breakpoints.down("md")),f=A.useMemo(()=>{let u=n;return Ut(t)&&(u=u&&o),u},[n,o,t]),{site:g}=t,C=A.useMemo(()=>{var u;return zt((u=t.site)==null?void 0:u.domainAliases)},[(S=t.site)==null?void 0:S.domainAliases]),D=[],j=[],T=Lt.encode(t.appPid),x=(v=(I=t.environments)==null?void 0:I.find(u=>u.key==="BLOCKLET_APP_PK"))==null?void 0:v.value,m=Nt(C);return C.forEach(u=>{const L=u.value||"";Ye.isDidDomain(L)&&!L.startsWith(T)?j.push(u):D.push(u)}),e.jsxs(e.Fragment,{children:[!a&&e.jsxs(e.Fragment,{children:[e.jsxs(p,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(p,{children:r("common.domain")}),f&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Pn,{id:g.id,title:r("router.domain.add.title"),teamDid:(k=t.meta)==null?void 0:k.did,appId:t.appPid,appPk:x,systemDomains:m==null?void 0:m.map(u=>u.value),children:({open:u})=>e.jsxs(V,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:u,disabled:Le.isInProgress(t.status),children:[e.jsx(kt,{style:{fontSize:"1.3em",marginRight:4}}),r("common.add")]})}),l.nftDomainUrl&&e.jsx(ye,{variant:"outlined",appId:t.appPid,appPk:x,siteId:g.id,inBlockletSetup:!1,teamDid:t.meta.did})]})]}),Le.isAccessible(t.status)===!1&&e.jsx(p,{mt:1.5,mb:1.5,children:e.jsx(ce,{severity:"warning",children:r("blocklet.router.noRunning")})})]}),e.jsx(p,{sx:{display:"flex",flexDirection:"column",gap:1},children:(c?C:D).map(u=>{var w,R;const L=u.value;return e.jsxs(A.Fragment,{children:[h&&e.jsxs(p,{display:"flex",flexDirection:"column",children:[e.jsx(p,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:e.jsx(oe,{domain:u,target:"_blank",children:u.value})}),e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[e.jsx(W,{domain:u,filters:["domain"]},`${u.value}-domain`),e.jsx(re,{siteId:(w=t.site)==null?void 0:w.id,domain:u,blocklet:t,hasMutatePermission:f})]}),e.jsx(p,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:f,site:g,domain:u,blocklet:t})})]})]},L),!h&&e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[e.jsx(W,{domain:u,filters:["domain"]},`${u.value}-domain`),e.jsx(p,{sx:{ml:2,mr:.5},children:e.jsx(oe,{domain:u,target:"_blank",children:u.value})}),e.jsx(re,{siteId:(R=t.site)==null?void 0:R.id,domain:u,blocklet:t,hasMutatePermission:f})]}),e.jsx(p,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:f,site:g,domain:u,blocklet:t})})]},L)]},L)})}),j.length>0&&e.jsx("div",{style:{marginLeft:"20px",marginTop:"12px"},children:e.jsx(V,{endIcon:c?e.jsx(Ge,{}):e.jsx(Dt,{}),onClick:()=>d(!c),children:r(c?"common.collapseAll":"blocklet.router.showAllDomains")})}),!C.length&&(i?e.jsx(U,{size:16}):e.jsx(yt,{children:r("common.empty")}))]})}J.propTypes={hasPermission:s.bool,blocklet:s.object.isRequired,loadingRuntimeInfo:s.bool,inService:s.bool.isRequired,listOnly:s.bool};J.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1};function oe({domain:n,children:t,...i}){const{t:o,locale:a}=E(),{href:r,accessibility:l,value:c}=n,d=A.useCallback(()=>e.jsx(Be,{content:ue(c),locale:a,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}),[c,a]);return!l||l.loading?e.jsxs(ne,{...i,children:[t,d(),e.jsx(B,{title:o("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx("span",{className:"status",children:e.jsx(U,{size:12})})})]}):l.accessible?e.jsxs(ne,{...i,children:[e.jsx(p,{component:"a",href:r,target:"_blank",rel:"noopener noreferrer",children:t}),d()]}):e.jsxs(ne,{...i,children:[e.jsx(B,{title:o("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx("span",{children:t})}),d()]})}oe.propTypes={domain:X.isRequired,children:s.any.isRequired};const ne=St.span`
|
|
1
|
+
import{$ as ae,aG as $e,z as mt,f as Me,L as pt,e as E,a6 as ft,j as O,aZ as ht,a_ as Be,a$ as xt,C as Pe,Z as gt,a2 as V,a9 as ze,aV as Dt,au as yt}from"./vendor-arcblock-DbrmIue2.js";import{a1 as le,j as e,bX as Ue,a3 as p,a2 as z,T as q,ad as ce,e as G,t as de,aj as Ne,E as s,a4 as B,M as jt,al as Oe,bm as vt,bn as bt,am as wt,ao as Ct,aa as St,I as Rt}from"./vendor-mui-core-xF5F4eT7.js";import{x as Z,w as At,y as It,H as ue,C as Pt,n as Ee,b as Et}from"./vendor-utils-5TjOM6td.js";import{r as A,g as Tt}from"./vendor-react-D-afvo_7.js";import{d as kt}from"./Add-BKkOI8kr.js";import{b as Lt}from"./base32-BTrVqdDB.js";import{ah as _t,ai as We,y as F,B as He,h as Te,aj as Ve,T as qt,ak as Ft,ag as Ze,b as $t,H as ke,al as Mt,M as Bt,J as zt,am as Ut,an as Nt,f as Le}from"./index-CIZ-6weB.js";import{d as Ot}from"./LockIcon-D-W4Rph6.js";import{s as Wt,n as Ht,u as H,o as Vt,w as Zt}from"./vendor-hooks-BKxTDk_P.js";import{d as Gt}from"./CheckCircle-Dc8yF4jd.js";import{d as Kt,p as _e}from"./util-eME8uaMf.js";import{_ as K}from"./useSetState-Crt4S51m.js";import{w as Ge}from"./permission-DLT57IZZ.js";import{_ as Qt,D as qe}from"./useAsyncRetry-Bmo6a1Zp.js";import{C as Q}from"./confirm-Cg9hPCJr.js";import{d as Xt}from"./InfoOutlined-CJxRYyjF.js";import{_ as Yt}from"./useAsync-Ua5iss51.js";import"./api-K65cLqol.js";import{I as Jt}from"./index-DvZ_TLdU.js";import{A as en}from"./actions-caLBBlX_.js";var me={},tn=le;Object.defineProperty(me,"__esModule",{value:!0});var Ke=me.default=void 0,nn=tn(ae()),sn=e;Ke=me.default=(0,nn.default)((0,sn.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");const on=$e({});on.interceptors.request.use(n=>{const t=window.blocklet?window.blocklet.prefix:"/";return n.baseURL=t||"",n.url=Z("/api",String(n.url)),n.timeout=2e5,n.params=n.params||{},new URLSearchParams(n.url.split("?")[1]).has("locale")||(n.params.locale=mt()),n},n=>Promise.reject(n));const Qe=(...n)=>$e(...n),rn=(n,t)=>t?n?[n,...Array.isArray(t)?t:[t]]:t:n,an=(n,{width:t=600,height:i=700,name:o="did-domain:popup"}={})=>{const a=window.screenX+(window.innerWidth-t)/2,r=window.screenY+(window.innerHeight-i)/2,l=[`left=${a}`,`top=${r}`,`width=${t}`,`height=${i}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],c=window.open("",o,l.join(","));if(c===null)throw new Error("Failed to open popup");return c.location.href=At(n,{opener:window.location.origin}),c},ln="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Xe=async n=>{var d;if(!n||!(n!=null&&n.trim()))return null;const t=Qe(),i=new URL(n);i.pathname="__blocklet__.js",i.searchParams.set("type","json");const{data:o}=await t.get(i.toString()),a=(d=o==null?void 0:o.componentMountPoints)==null?void 0:d.find(h=>h.did===ln),r=new URL(n);r.pathname=a==null?void 0:a.mountPoint;const l=r.toString(),c=Z(l,"/api");return{base:l,api:c}},cn=Me({buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),dn=Me({buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),un={zh:dn,en:cn},mn=async({didDomainURL:n,delegatee:t,delegateePk:i})=>{const o=await Xe(n);if(!o)return null;const a=Qe({baseURL:o.api}),{data:r}=await a.post("/payment/session",{delegatee:t,delegateePk:i});return{sessionId:r.sessionId,baseURL:o.base}};function Ye({delegatee:n,delegateePk:t,didDomainURL:i,locale:o,title:a,onSuccess:r,...l}){const{t:c}=E(),[d,h]=Wt({currentState:1}),f=A.useRef(null),g=Ht(async()=>{const x=await mn({didDomainURL:i,delegatee:n,delegateePk:t});return x},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(x){console.error(x)}}),C=H(x=>{var m,S,I,v;x.data.type==="didDomain.success"&&(r==null||r({nftDid:(m=x.data)==null?void 0:m.nftDid,domain:(S=x.data)==null?void 0:S.domain,chainHost:(I=x.data)==null?void 0:I.chainHost}),(v=f.current)==null||v.close(),f.current=null,h({currentState:4}),setTimeout(()=>{h({currentState:8})},2e3))});Vt(()=>{var x;try{window.removeEventListener("message",C),(x=f.current)==null||x.close(),f.current=null}catch(m){console.warn("Failed to close popup",m)}});const D=H(()=>{h({currentState:1})}),j=H(()=>{if(h({currentState:2}),!g.data){console.error("Failed to create session");return}T({sessionId:g.data.sessionId,baseURL:g.data.baseURL})}),T=H(({sessionId:x,baseURL:m})=>{window.addEventListener("message",C);const S=new URL(m);S.searchParams.set("sessionId",x),S.searchParams.set("locale",o),f.current=an(S.toString());const I=setInterval(()=>{var v;(v=f.current)!=null&&v.closed&&(clearInterval(I),D())},1e3);return()=>clearInterval(I)});return e.jsxs(e.Fragment,{children:[e.jsx(Ue,{loading:g.loading,onClick:j,variant:"contained",startIcon:e.jsx(Kt,{}),...l,children:a||c("buy.button.title")}),e.jsxs(ft,{fullWidth:!0,maxWidth:"xs",open:d.currentState>1&&d.currentState<8,onClose:D,children:[!g.error&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[d.currentState===2&&e.jsx(z,{size:50}),d.currentState===4&&e.jsx(Gt,{sx:{color:"primary.main",fontSize:"5rem"}}),d.currentState===2&&e.jsx(q,{children:c("buy.status.inProgress")}),d.currentState===4&&e.jsx(q,{children:c("buy.status.success")})]}),g.error&&e.jsx(ce,{severity:"error",children:c("buy.error.failedToCreateSession")})]})]})}const Je={onSuccess:()=>{},title:""};Ye.defaultProps=Je;function et(n){return e.jsx(pt,{locale:n.locale,translations:un,children:e.jsx(Ye,{...n})})}et.defaultProps=Je;function tt({nftDid:n,didDomainURL:t,locale:i,sx:o}){const{t:a}=E(),[r,l]=K({safeIframeRef:null,popoverAnchorEl:null}),c=A.useRef(null),d=G(),h=de(d.breakpoints.down("md")),f=j=>{l({popoverAnchorEl:j.currentTarget})},g=()=>{l({popoverAnchorEl:null})},C=Zt(async()=>{const j=await Xe(t);return j?j.base:null});if(!C.value)return null;if(C.loading)return e.jsx(z,{});const D=Z(C.value,`/embed/domain?nft-did=${n}&locale=${i}`);return e.jsxs(e.Fragment,{children:[e.jsx(p,{component:"img",src:Z(t,"/.well-known/service/blocklet/logo"),alt:"logo",width:16,height:16,onClick:f,sx:rn({cursor:"pointer"},o)}),e.jsx(Ne,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:g,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:c,title:a("common.subscription"),width:h?"320px":"400px",height:h?"600px":"680px",style:{border:0},src:D})})]})}tt.defaultProps={sx:{}};const pn=n=>["waiting","creating","renewaling"].includes(n);function pe(n){var w,R;const{t}=E(),[i,o]=A.useState(!1),{inService:a}=F(),[r,l]=A.useState(null),{siteId:c,domain:d,onAdd:h,children:f,did:g}=n,[C,D]=A.useState(!1),{api:j,ws:{useSubscription:T}}=F(),{mode:x,actions:{refreshDomainStatus:m}}=He(),S=Qt(async()=>{const{cert:b}=await j.findCertificateByDomain({input:{domain:d,did:g}});return b}),I=(b,U)=>{b.domain===d&&(D(!1),o(!1),a&&x!=="setup"&&(U==="success"?O.success(t("setup.domain.genCertSuccess",{domain:b.domain})):U==="error"&&O.error(t("setup.domain.genCertFailed",{domain:b.domain,message:b.message}))))};if(A.useEffect(()=>{var b;S.loading||D(pn((b=S.value)==null?void 0:b.status))},[S.loading,(w=S.value)==null?void 0:w.status]),T(Te.BlockletEvents.certError,b=>I(b,"error")),T(Te.BlockletEvents.certIssued,b=>{S.retry(),m(b.domain),I(b,"success")}),S.loading||((R=S.value)==null?void 0:R.status)==="normal")return"";const v=()=>{o(!1),l(null)},k=async()=>{o(!0);try{await j.issueLetsEncryptCert({input:{siteId:c,domain:d,did:g,inBlockletSetup:x==="setup"}}),h(),D(!0)}catch(b){console.error(b),D(!1)}finally{o(!1),l(null)}},u={title:t("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(ce,{severity:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:k,onCancel:v},L=b=>{b.stopPropagation(),l(u)};return e.jsxs(e.Fragment,{children:[C?e.jsx(B,{title:t("router.cert.issuing"),children:e.jsx(z,{size:12})}):f({loading:i,open:L}),r&&e.jsx(Q,{color:"primary",title:r.title,description:r.description,confirm:r.confirm,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}pe.propTypes={domain:s.string.isRequired,did:s.string.isRequired,siteId:s.string.isRequired,onAdd:s.func,children:s.any};pe.defaultProps={onAdd:()=>{},children:null};function fe(n){const{domain:t,domainStatus:i,...o}=n;return _t(t)||!We(t)||It(i)||i!=null&&i.isHttps?"":e.jsx(pe,{domain:t,...o})}fe.propTypes={domain:s.string.isRequired,domainStatus:s.shape({isHttps:s.bool}).isRequired,did:s.string.isRequired,onAdd:s.func,children:s.any};fe.defaultProps={onAdd:()=>{},children:null};var he={},fn=le;Object.defineProperty(he,"__esModule",{value:!0});var nt=he.default=void 0,hn=fn(ae()),xn=e;nt=he.default=(0,hn.default)((0,xn.jsx)("path",{d:"M17 20.41 18.41 19 15 15.59 13.59 17zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5z"}),"CallMerge");const st=A.createContext({}),{Provider:gn,Consumer:ts}=st;function Dn({children:n}){const[t,i]=K({domain:"",error:null}),{locale:o}=E(),a={error:t.error,domain:t.domain,setError:r=>{i({error:r})},setDomain:r=>{const l=ue(r),c=Ve(l,o);i({domain:l,error:c})}};return e.jsx(gn,{value:{value:a},children:n})}function yn(){const{value:n}=A.useContext(st);return n}const{joinURL:Fe}=qt,jn=Ft,ot="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",vn=async n=>{var c;if(!n||!(n!=null&&n.trim()))return null;const t=new URL(n);t.pathname="__blocklet__.js",t.searchParams.set("type","json");const{data:i}=await jn.get(t.toString()),o=(c=i==null?void 0:i.componentMountPoints)==null?void 0:c.find(d=>d.did===ot),a=new URL(n);a.pathname=o==null?void 0:o.mountPoint;const r=a.toString(),l=Fe(r,"/api");return{base:r,api:l,domain:Fe(l,"/domains")}};var bn={DID_DOMAIN_SERVICE_DID:ot,getDidDomainServiceURL:vn},X={exports:{}};const wn=ht,Cn=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class it extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const Sn=(n,t,i)=>{const o=i.retries-(t-1);return n.attemptNumber=t,n.retriesLeft=o,n},Rn=n=>Cn.includes(n),rt=(n,t)=>new Promise((i,o)=>{t={onFailedAttempt:()=>{},retries:10,...t};const a=wn.operation(t);a.attempt(async r=>{try{i(await n(r))}catch(l){if(!(l instanceof Error)){o(new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`));return}if(l instanceof it)a.stop(),o(l.originalError);else if(l instanceof TypeError&&!Rn(l.message))a.stop(),o(l);else{Sn(l,r,t);try{await t.onFailedAttempt(l)}catch(c){o(c);return}a.retry(l)||o(a.mainError())}}})});X.exports=rt;X.exports.default=rt;X.exports.AbortError=it;var An=X.exports;const In=Tt(An);function xe({domain:n,resolvedTarget:t,...i}){const{t:o,locale:a}=E();return e.jsxs(p,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...i,children:[e.jsxs(p,{display:"flex",children:[o("router.domain.setup.tipStart"),n&&e.jsx(p,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),o("router.domain.setup.tipEnd"),":"]}),e.jsxs(p,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[e.jsx(se,{label:o("router.domain.setup.recordType"),value:"CNAME",locale:a}),e.jsx(se,{label:o("router.domain.setup.recordValue"),value:t,locale:a})]})]})}xe.propTypes={domain:s.string,resolvedTarget:s.string.isRequired};xe.defaultProps={domain:""};function se({locale:n,label:t,value:i}){const o=de(r=>r.breakpoints.down("md")),a=G();return e.jsx(Jt,{name:t,nameWidth:120,children:e.jsxs(p,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(q,{component:"span",color:"primary.main",overflow:"auto",sx:o?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:i}),e.jsx(Be,{content:i,locale:n,style:{marginLeft:"4px",color:a.palette.text.secondary}})]})})}se.propTypes={locale:s.string.isRequired,label:s.string.isRequired,value:s.string.isRequired};function ge({siteId:n,teamDid:t,cnameDomain:i,defaultCustomDomain:o,onInputDomain:a,appId:r,appPk:l,onSuccess:c,onError:d,disabled:h,autoFocus:f,inBlockletSetup:g,shouldCheckDomain:C,onStateChange:D,currentIp:j,resolveDomain:T,...x}){const{t:m,locale:S}=E(),{api:I,info:v}=F(),k=yn(),u=G(),L=xt({key:"sm"}),[w,R]=K({submittingDomain:!1,domain:o,error:null,type:v!=null&&v.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1}),b=Yt(()=>bn.getDidDomainServiceURL(v==null?void 0:v.nftDomainUrl));if(v!=null&&v.nftDomainUrl&&b.loading)return e.jsx(p,{...x,children:e.jsx(Pe,{relative:"parent",children:e.jsx(z,{})})});if(b.error)return e.jsx(p,{...x,children:e.jsx(Pe,{relative:"parent",children:b.error.message})});const U=b.value,lt=()=>{R({invalidDNSDomain:null})},ee=async y=>{D(m("setup.domain.addingDomain")),await I.addDomainAlias({input:{id:n,domainAlias:y,teamDid:t,inBlockletSetup:!0}}),R({submittingDomain:!1}),c({domain:y,type:"inputDomain"})},Se=async({domain:y,type:P,nftDid:N,chainHost:_})=>{try{if(!C){if(P==="inputDomain"){await ee(y);return}c({domain:y,type:P,nftDid:N,chainHost:_});return}D({text:m("setup.domain.checkingResolvable")});let $=30;const te=3e3,ut=$*1e3/te,Ae=setInterval(()=>{if($<=0){clearInterval(Ae);return}D({text:`${m("setup.domain.checkingResolvable")} (${$--}s)`})},1e3),Ie=await In(async()=>{const{data:M}=await T(y);if(!M.address)throw new Error("Cannot resolve domain");return M.address},{retries:ut,minTimeout:te,maxTimeout:te,onFailedAttempt:console.error}).catch(console.error);if(clearInterval(Ae),!Ie){const M=m("setup.domain.cannotResolve",{domain:y});if(P==="nftDomain"){O.error(M),c({domain:y,type:"nftDomain"});return}D({text:""}),R({invalidDNSDomain:{domain:y,error:M},domain:y,type:P,submittingDomain:!1});return}if(Ie!==j){const M=m("setup.domain.resolvedAddressError",{domain:y,curDomain:window.location.hostname});if(P==="nftDomain"){O.error(M),c({domain:y,type:"nftDomain"});return}D({text:""}),R({invalidDNSDomain:{domain:y,error:M},domain:y,type:P,submittingDomain:!1});return}if(P==="nftDomain"){c({domain:y,type:"nftDomain"});return}await ee(y)}catch($){O.error($.message),D({text:""}),R({submittingDomain:!1})}},ct=async({domain:y,nftDid:P,chainHost:N})=>{try{const _=_e(y);R({submittingDomain:!0}),await I.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:_,nftDid:P,chainHost:N,teamDid:t,inBlockletSetup:g}});const $="nftDomain";R({showNFTDomainAuth:!1,type:$}),await Se({domain:_,type:$,nftDid:P,chainHost:N})}catch(_){O.error(_.message)}finally{R({showNFTDomainAuth:!1,submittingDomain:!1})}},dt=async()=>{try{R({submittingDomain:!0});const y=_e(w.domain);if(v.nftDomainUrl&&U&&(await I.isDidDomain({input:{domain:y}})).value===!0){R({showNFTDomainAuth:!0});return}await Se({domain:y,type:w.type})}catch(y){R({submittingDomain:!1}),k.setError(y.message)}},Re=k.error||w.error;return e.jsx(p,{...x,children:e.jsxs(p,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(p,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[e.jsx(q,{sx:{color:u.palette.text.primary},children:m("router.domainAlias.add.tips")}),e.jsx(jt,{sx:{display:"block",marginTop:"8px"},label:m("router.domainAlias.add.domainDescription"),helperText:w.type==="inputDomain"&&Re||m("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:h,value:w.domain,size:"small",variant:"outlined",error:!!Re&&w.type==="inputDomain",onChange:y=>{var _;const P=ue((_=y.target)==null?void 0:_.value);k.setDomain(P);const N=Ve(P,S);R({domain:P,error:N,type:"inputDomain"}),a({domain:P,error:N,type:"inputDomain"})},autoFocus:f,onBlur:()=>{k.domain||(R({error:null}),k.setError(null))}}),e.jsx(p,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(Ue,{"data-cy":"confirm-add-domain",fullWidth:L,variant:"contained",loading:w.submittingDomain,onClick:dt,children:m("common.add")})}),e.jsxs(p,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:u.palette.primary.main},onClick:()=>R({showDnsTip:!w.showDnsTip}),children:[e.jsx(Xt,{fontSize:"1em"}),m("router.domainAlias.showTipHint")]}),w.showDnsTip&&e.jsx(xe,{domain:w.domain,resolvedTarget:i,style:{marginTop:"4px"}})]}),w.invalidDNSDomain&&e.jsx(Q,{title:m("common.reminder"),description:m("setup.domain.invalidDNSReminder",{error:w.invalidDNSDomain.error}),color:"primary",confirm:m("setup.domain.continueAdd"),onConfirm:()=>ee(w.invalidDNSDomain.domain,w.type),onCancel:lt}),U&&e.jsx(gt,{open:w.showNFTDomainAuth,popup:!0,useSocket:!1,forceConnected:!1,action:"authorize",baseUrl:U.api,checkFn:Pt.create({baseURL:U.api}).get,extraParams:{delegatee:r,delegateePk:l,domain:w.domain},onSuccess:ct,onClose:()=>R({showNFTDomainAuth:!1,submittingDomain:!1}),checkTimeout:60*5e3,showDownload:!1,messages:{title:m("router.domainAlias.addDomainNFT.connect.title"),scan:m("router.domainAlias.addDomainNFT.connect.scan"),confirm:m("router.domainAlias.addDomainNFT.connect.confirm"),success:m("router.domainAlias.addDomainNFT.connect.success")}})]})})}ge.propTypes={siteId:s.string.isRequired,currentIp:s.string,teamDid:s.string.isRequired,cnameDomain:s.string.isRequired,defaultCustomDomain:s.string,onInputDomain:s.func,onSuccess:s.func,appId:s.string,appPk:s.string,disabled:s.bool,autoFocus:s.bool,inBlockletSetup:s.bool,shouldCheckDomain:s.bool,onStateChange:s.func,resolveDomain:s.func,onError:s.func};ge.defaultProps={defaultCustomDomain:"",currentIp:"",onInputDomain:Ee,onSuccess:Ee,appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1,shouldCheckDomain:!1,onStateChange:()=>{},resolveDomain:()=>{},onError:()=>{}};function De({id:n,children:t,title:i,teamDid:o,systemDomains:a,appId:r,appPk:l}){const{t:c}=E(),[d,h]=K({loading:!1,confirmSetting:null}),f=a.find(j=>Ze.isDidDomain(j)),g=()=>{h({loading:!1,confirmSetting:null})},C={title:i||c("router.domainAlias.add.title"),description:function(T,x,m){return e.jsx(ge,{siteId:n,teamDid:o,cnameDomain:f,onSuccess:()=>h({confirmSetting:null}),onInputDomain:({domain:S,type:I,error:v})=>{x({...T,domain:S,type:I,__disableConfirm:!!v}),m(v)},appId:r,appPk:l})},confirm:c("common.confirm"),cancel:c("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:g},D=j=>{j.stopPropagation(),h({confirmSetting:C})};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:d.loading,open:D}):e.jsxs(Oe,{onClick:D,className:"rule-action","data-cy":"action-add-domain-alias",children:[d.loading?e.jsx(z,{size:16}):e.jsx(nt,{style:{fontSize:18,marginRight:5}}),c("router.domainAlias.add.title")]}),d.confirmSetting&&e.jsx(Q,{title:d.confirmSetting.title,description:d.confirmSetting.description,confirm:d.confirmSetting.confirm,cancel:d.confirmSetting.cancel,params:d.confirmSetting.params,onCancel:d.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:d.loading,maxWidth:"sm"})]})}De.propTypes={id:s.string.isRequired,children:s.any,title:s.string,teamDid:s.string,systemDomains:s.arrayOf(s.string).isRequired,appId:s.string,appPk:s.string.isRequired};De.defaultProps={children:null,title:"",teamDid:"",appId:null};function Pn(n){return e.jsx(Dn,{children:e.jsx(De,{...n})})}function ye({appId:n,appPk:t,siteId:i,inBlockletSetup:o,teamDid:a,sx:r,...l}){const{api:c,info:d}=F(),{locale:h,t:f}=E(),g=async({domain:C,nftDid:D,chainHost:j})=>{await c.addDomainAlias({input:{id:i,type:"nft-domain",domainAlias:C,nftDid:D,chainHost:j,teamDid:a,inBlockletSetup:o}})};return e.jsx(et,{delegatee:n,delegateePk:t,didDomainURL:d.nftDomainUrl,onSuccess:g,locale:h,variant:"outlined",sx:r,title:f("router.domainAlias.addDomainNFT.buy"),...l})}ye.propTypes={appId:s.string.isRequired,appPk:s.string.isRequired,siteId:s.string.isRequired,inBlockletSetup:s.bool.isRequired,teamDid:s.string.isRequired,sx:s.object};ye.defaultProps={sx:{}};function je(n){const{t}=E(),[i,o]=A.useState(!1),[a,r]=A.useState(null),{id:l,domain:c,children:d,teamDid:h}=n,{api:f}=F(),g=()=>{o(!1),r(null)},C=async()=>{o(!0);try{await f.deleteDomainAlias({input:{id:l,domainAlias:c,teamDid:h}}),await $t(2e3)}catch(T){O.error(T.message)}finally{r(null),o(!1)}},D={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:C,onCancel:g},j=T=>{T.stopPropagation(),r(D)};return e.jsxs(e.Fragment,{children:[typeof d=="function"?d({loading:i,open:j}):e.jsxs(V,{edge:"end",onClick:j,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[i?e.jsx(z,{size:16}):e.jsx(ze,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),a&&e.jsx(Q,{title:a.title,description:a.description,confirm:a.confirm,params:a.params,onConfirm:a.onConfirm,onCancel:a.onCancel})]})}je.propTypes={id:s.string.isRequired,domain:s.string.isRequired,children:s.any,teamDid:s.string};je.defaultProps={children:null,teamDid:""};function ve({site:n,domain:t,blocklet:i}){const{t:o}=E(),a=t.value===window.location.hostname;return e.jsx(en,{"data-cy":"domain-actions",size:"large",actions:[({close:r})=>{var l;return e.jsx(je,{id:n.id,domain:t.value,teamDid:(l=i==null?void 0:i.meta)==null?void 0:l.did,children:({open:c})=>e.jsx(B,{title:a?o("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(Oe,{disabled:t.isProtected||a,dense:!0,onClick:d=>{r(),c(d)},"data-cy":"action-toggle-block",children:[e.jsx(vt,{style:{minWidth:24,marginRight:8},children:e.jsx(ze,{})}),e.jsx(bt,{primary:o("common.delete")})]},"remove")})})})}]})}ve.propTypes={site:s.object.isRequired,domain:s.object.isRequired,blocklet:s.object.isRequired};ve.defaultProps={};var be={},En=le;Object.defineProperty(be,"__esModule",{value:!0});var we=be.default=void 0,Tn=En(ae()),kn=e;we=be.default=(0,Tn.default)((0,kn.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Https");const Y=s.shape({href:s.string,accessibility:s.shape({loading:s.bool,accessible:s.bool}),domainStatus:s.shape({isHttps:s.bool,matchedCert:s.object}),dns:s.shape({resolved:s.bool,ip:s.string})});function Ce({certificate:n}){const[t,i]=A.useState(null),o=F(),{t:a,locale:r}=E(),l=h=>{i(h.currentTarget)},c=()=>{i(null)},d=!!t;return e.jsxs(e.Fragment,{children:[e.jsx(we,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:l,onMouseLeave:c,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),e.jsx(Ne,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:c,disableRestoreFocus:!0,children:e.jsx(wt,{children:e.jsxs(Ct,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${o.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(q,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(q,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(q,{component:"div",children:`${a("common.issuer")}: ${Et(n,"issuer.commonName","")}`}),e.jsx(q,{component:"div",children:`${a("router.cert.issuedOn")}: ${ke(n.validFrom,r)}`}),e.jsx(q,{component:"div",children:`${a("router.cert.expiryOn")}: ${ke(n.validTo,r)}`})]})]})})})]})}Ce.propTypes={certificate:s.object};Ce.defaultProps={certificate:{}};function W({domain:n,filters:t}){const{t:i}=E(),{value:o,domainStatus:a}=n;if(!We(o))return null;let r=null,l=null;const{isHttps:c,matchedCert:d}=a;if(!Mt(o)){const{dns:{resolved:f,ip:g}={}}=a;f||g==="127.0.0.1"?r=e.jsx(B,{title:i("router.domain.verify.ok"),children:e.jsx(qe,{color:"success"})}):r=e.jsx(B,{title:i("router.domain.verify.notResolved"),children:e.jsx(qe,{color:"error"})})}c?l=e.jsx(Ce,{certificate:d}):l=e.jsx(B,{title:i("router.domain.https.bad"),children:e.jsx(we,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const h=t.map(f=>f==="domain"?r:f==="http"?l:null);return A.createElement(A.Fragment,null,...h)}W.propTypes={domain:Y.isRequired,filters:s.array};W.defaultProps={filters:["domain","http"]};const Ln=Ge(J,"mutate_blocklets"),_n=Ge(J,"",Bt);function at(n){const{inService:t}=F(),{blocklet:i,loadingRuntimeInfo:o}=He();let a=Ln;return t&&(a=_n),e.jsx(a,{...n,blocklet:i,inService:t,loadingRuntimeInfo:o})}at.propTypes={listOnly:s.bool};at.defaultProps={listOnly:!1};function J({hasPermission:n,blocklet:t,loadingRuntimeInfo:i,inService:o,listOnly:a}){var S,I,v,k;const{t:r}=E(),{info:l}=F(),[c,d]=A.useState(!1),h=de(u=>u.breakpoints.down("md")),f=A.useMemo(()=>{let u=n;return zt(t)&&(u=u&&o),u},[n,o,t]),{site:g}=t,C=A.useMemo(()=>{var u;return Ut((u=t.site)==null?void 0:u.domainAliases)},[(S=t.site)==null?void 0:S.domainAliases]),D=[],j=[],T=Lt.encode(t.appPid),x=(v=(I=t.environments)==null?void 0:I.find(u=>u.key==="BLOCKLET_APP_PK"))==null?void 0:v.value,m=Nt(C);return C.forEach(u=>{const L=u.value||"";Ze.isDidDomain(L)&&!L.startsWith(T)?j.push(u):D.push(u)}),e.jsxs(e.Fragment,{children:[!a&&e.jsxs(e.Fragment,{children:[e.jsxs(p,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(p,{children:r("common.domain")}),f&&e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Pn,{id:g.id,title:r("router.domain.add.title"),teamDid:(k=t.meta)==null?void 0:k.did,appId:t.appPid,appPk:x,systemDomains:m==null?void 0:m.map(u=>u.value),children:({open:u})=>e.jsxs(V,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:u,disabled:Le.isInProgress(t.status),children:[e.jsx(kt,{style:{fontSize:"1.3em",marginRight:4}}),r("common.add")]})}),l.nftDomainUrl&&e.jsx(ye,{variant:"outlined",appId:t.appPid,appPk:x,siteId:g.id,inBlockletSetup:!1,teamDid:t.meta.did})]})]}),Le.isAccessible(t.status)===!1&&e.jsx(p,{mt:1.5,mb:1.5,children:e.jsx(ce,{severity:"warning",children:r("blocklet.router.noRunning")})})]}),e.jsx(p,{sx:{display:"flex",flexDirection:"column",gap:1},children:(c?C:D).map(u=>{var w,R;const L=u.value;return e.jsxs(A.Fragment,{children:[h&&e.jsxs(p,{display:"flex",flexDirection:"column",children:[e.jsx(p,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:e.jsx(oe,{domain:u,target:"_blank",children:u.value})}),e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[e.jsx(W,{domain:u,filters:["domain"]},`${u.value}-domain`),e.jsx(re,{siteId:(w=t.site)==null?void 0:w.id,domain:u,blocklet:t,hasMutatePermission:f})]}),e.jsx(p,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:f,site:g,domain:u,blocklet:t})})]})]},L),!h&&e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[e.jsx(W,{domain:u,filters:["domain"]},`${u.value}-domain`),e.jsx(p,{sx:{ml:2,mr:.5},children:e.jsx(oe,{domain:u,target:"_blank",children:u.value})}),e.jsx(re,{siteId:(R=t.site)==null?void 0:R.id,domain:u,blocklet:t,hasMutatePermission:f})]}),e.jsx(p,{sx:{button:{padding:0}},children:e.jsx(ie,{hasMutatePermission:f,site:g,domain:u,blocklet:t})})]},L)]},L)})}),j.length>0&&e.jsx("div",{style:{marginLeft:"20px",marginTop:"12px"},children:e.jsx(V,{endIcon:c?e.jsx(Ke,{}):e.jsx(Dt,{}),onClick:()=>d(!c),children:r(c?"common.collapseAll":"blocklet.router.showAllDomains")})}),!C.length&&(i?e.jsx(z,{size:16}):e.jsx(yt,{children:r("common.empty")}))]})}J.propTypes={hasPermission:s.bool,blocklet:s.object.isRequired,loadingRuntimeInfo:s.bool,inService:s.bool.isRequired,listOnly:s.bool};J.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1};function oe({domain:n,children:t,...i}){const{t:o,locale:a}=E(),{href:r,accessibility:l,value:c}=n,d=A.useCallback(()=>e.jsx(Be,{content:ue(c),locale:a,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}),[c,a]);return!l||l.loading?e.jsxs(ne,{...i,children:[t,d(),e.jsx(B,{title:o("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx("span",{className:"status",children:e.jsx(z,{size:12})})})]}):l.accessible?e.jsxs(ne,{...i,children:[e.jsx(p,{component:"a",href:r,target:"_blank",rel:"noopener noreferrer",children:t}),d()]}):e.jsxs(ne,{...i,children:[e.jsx(B,{title:o("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx("span",{children:t})}),d()]})}oe.propTypes={domain:Y.isRequired,children:s.any.isRequired};const ne=St.span`
|
|
2
2
|
&,
|
|
3
3
|
& > * {
|
|
4
4
|
color: #222;
|
|
@@ -12,4 +12,4 @@ import{_ as ae,aF as $e,z as mt,f as Me,L as pt,e as E,a5 as ft,j as O,aY as ht,
|
|
|
12
12
|
.status {
|
|
13
13
|
margin-left: 8px;
|
|
14
14
|
}
|
|
15
|
-
`;function ie({hasMutatePermission:n,site:t,domain:i,blocklet:o}){const a=
|
|
15
|
+
`;function ie({hasMutatePermission:n,site:t,domain:i,blocklet:o}){const a=G(),{t:r}=E();return n&&!i.isProtected?e.jsx(ve,{site:t,domain:i,blocklet:o}):e.jsx(B,{title:r("blocklet.router.domainLockTooltip"),placement:"top",children:e.jsx(Rt,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0},children:e.jsx(Ot,{style:{fill:a.palette.text.disabled}})})})}ie.propTypes={hasMutatePermission:s.bool.isRequired,site:s.object.isRequired,domain:Y.isRequired,blocklet:s.object.isRequired};function re({siteId:n,domain:t,blocklet:i,hasMutatePermission:o}){const{info:a}=F(),{t:r,locale:l}=E();return e.jsxs(p,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1},children:[t.type==="nft-domain"&&e.jsx(tt,{locale:l,nftDid:t.nftDid,didDomainURL:a.nftDomainUrl}),e.jsx(W,{domain:t,filters:["http"]},`${t.value}-http`),o&&e.jsx(fe,{siteId:n,domain:t.value,domainStatus:t.domainStatus,did:i.meta.did,children:({open:c})=>e.jsx(V,{sx:{padding:0},size:"small",onClick:d=>c(d),children:r("router.cert.genLetsEncryptCert.title")})})]})}re.propTypes={siteId:s.string.isRequired,domain:Y.isRequired,blocklet:s.object.isRequired,hasMutatePermission:s.bool.isRequired};export{ge as A,ye as B,Dn as D,at as a};
|
|
@@ -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
|
|
2
|
+
import{u as ee,_ as b,d as W}from"./index-CIZ-6weB.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-DbrmIue2.js";import{F as pe}from"./fullpage-DCmKoQcJ.js";import{f as S}from"./format-error-C0Ke3VXF.js";import{d as ge}from"./CheckCircle-Dc8yF4jd.js";import{g as T}from"./get-safe-url-BF6AgHuB.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;
|
|
@@ -15,4 +15,4 @@ import{u as ee,_ as b,d as $}from"./index-1soveoNH.js";import{a1 as te,j as e,ac
|
|
|
15
15
|
div.Mui-focused input {
|
|
16
16
|
caret-color: ${a=>a.theme.palette.primary.main};
|
|
17
17
|
}
|
|
18
|
-
`,ve=a=>{try{if(!a)return null;const o=me.fromBase64(a).toString();return oe(o)?o:null}catch{return null}};function Te(){var B
|
|
18
|
+
`,ve=a=>{try{if(!a)return null;const o=me.fromBase64(a).toString();return oe(o)?o:null}catch{return null}};function Te(){var B,$;const a=r.useRef(null),{session:o,connectApi:I}=ee(),{t:s,locale:d}=ce(),[x,L]=r.useState(((B=o.user)==null?void 0:B.email)||""),[c,A]=r.useState(""),[E,_]=r.useState(!1),[U,q]=r.useState(!1),[u,G]=r.useState(!1),[Y,K]=r.useState(!1),[v,Q]=r.useState(!1),{wallet:f}=le(),[l]=re(),O=l.get("inviter")||localStorage.getItem("inviter"),m=l.get("updateKyc")==="1";r.useEffect(()=>{const n=l.get("subject"),t=ve(n);t&&L(t)},[]),r.useEffect(()=>{var n;(n=o.user)!=null&&n.emailVerified&&m&&(K(!0),setTimeout(()=>{if(f&&y()){b(()=>import("./index-DVYdq7IA.js").then(t=>t.i),__vite__mapDeps([0,1])).then(t=>{t.call("arcClosePage")});return}window.location.href=T(l.get("redirect")||"/")},1e3))},[o.user,m,f,l]);const J=r.useCallback(async n=>{var t;n.preventDefault(),_(!0);try{await W.post(`/kyc/email/send?locale=${d}`,{email:x}),G(!0),C.success(s("login.issueKyc.codeSentSuccess"))}catch(i){C.error(S(i)),(t=document.getElementById("email-input"))==null||t.focus()}finally{_(!1)}},[x,d,s]),k=r.useCallback(async n=>{var t;n&&n.preventDefault(),_(!0);try{await W.post(`/kyc/email/verify?locale=${d}`,{code:c}),K(!0),I.open({locale:d,action:"issue-kyc",extraParams:{code:c,updateKyc:l.get("updateKyc")||"0",inviter:O||""},containerEl:a.current,className:"connect",popup:!1,saveConnect:!1,forceConnected:!0,messages:{title:s("login.issueKyc.claim"),scan:s("login.issueKyc.scan"),confirm:s("login.issueKyc.confirm"),success:s("login.issueKyc.success")},useSocket:!0,onSuccess:()=>{Q(!0),I.close(),m?(o.refresh({showProgress:!1,forceRefreshToken:!0}),setTimeout(()=>{if(f&&y()){b(()=>import("./index-DVYdq7IA.js").then(i=>i.i),__vite__mapDeps([0,1])).then(i=>{i.call("arcClosePage")});return}window.location.href=T(l.get("redirect")||"/")},1e3)):f&&y()&&b(()=>import("./index-DVYdq7IA.js").then(i=>i.i),__vite__mapDeps([0,1])).then(i=>{i.call("arcClosePage")})},onError:i=>{C.error(S(i))}})}catch(i){K(!1),C.error(S(i)),(t=document.getElementById(`code-input-${h(c).length-1}`))==null||t.focus()}finally{_(!1)}},[c,d,l,m,f,O]);r.useEffect(()=>{u&&h(c).length===p.VERIFY_CODE_LENGTH&&k()},[c,k,u]);const X=r.useCallback(()=>{q(!0),I.open({locale:d,action:"update-kyc",containerEl:a.current,className:"connect",popup:!1,saveConnect:!1,forceConnected:!0,messages:{title:s("login.updateKyc.title"),scan:s("login.updateKyc.scan"),confirm:s("login.updateKyc.confirm"),success:s("login.updateKyc.success")},useSocket:!0,onSuccess:()=>{o.refresh({showProgress:!1,forceRefreshToken:!0}),setTimeout(()=>{if(f&&y()){b(()=>import("./index-DVYdq7IA.js").then(n=>n.i),__vite__mapDeps([0,1])).then(n=>{n.call("arcClosePage")});return}window.location.href=T(l.get("redirect")||"/")},2e3)},onError:n=>{C.error(S(n))}})},[d,l,f]),D=r.useCallback(n=>{if(!u)return;n.preventDefault();const t=h(n.clipboardData.getData("text/plain").slice(0,p.VERIFY_CODE_LENGTH));if(!/^\d+$/.test(t))return;A(t.padEnd(p.VERIFY_CODE_LENGTH," "));const i=document.getElementById(`code-input-${t.length}`);i&&i.focus()},[u]);r.useEffect(()=>(document.addEventListener("paste",D),()=>{document.removeEventListener("paste",D)}),[D]);const V=y()?s("login.issueKyc.issueTitle"):s("login.issueKyc.verifyTitle"),Z=y()?s("login.issueKyc.issueAction"):s("login.issueKyc.verifyAction");return e.jsxs(pe,{did:($=window.blocklet)==null?void 0:$.appPid,children:[e.jsx(ue,{children:e.jsx("title",{children:V})}),e.jsxs(g,{direction:"column",justifyContent:"center",alignItems:"center",sx:{width:"560px",px:2,boxSizing:"border-box",maxWidth:"100%",height:"100%"},children:[e.jsxs(g,{spacing:1,justifyContent:"center",alignItems:"center",sx:{mb:3},children:[v?e.jsx(ge,{sx:{fontSize:72},color:"success"}):e.jsx(N,{sx:{fontSize:72},color:"primary"}),e.jsx(w,{variant:"h5",sx:{textAlign:"center"},children:V}),!v&&e.jsx(w,{variant:"body2",color:"text.secondary",sx:{textAlign:"center"},children:s("login.issueKyc.pageDescription")}),v&&e.jsx(w,{variant:"body1",sx:{textAlign:"center"},children:s("login.issueKyc.success")}),v&&e.jsx(R,{variant:"contained",color:"primary",component:se,href:"/",size:"large",children:s("login.issueKyc.backToHome")}),!v&&o.user&&e.jsxs(g,{direction:"column",justifyContent:"center",alignItems:"center",children:[e.jsx(w,{variant:"body2",color:"info.main",sx:{textAlign:"center",mt:1},children:s("login.issueKyc.issueTarget",{action:Z})}),e.jsxs(g,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{width:"100%",maxWidth:360},children:[e.jsx(de,{did:o.user.did,responsive:!0,copyable:!0,showQrcode:!1}),e.jsx(fe,{locale:d,session:o,showRole:!0,showManageBlocklet:!1})]})]})]}),e.jsx(z,{ref:a,sx:{width:"100%"},children:!Y&&!U&&e.jsxs(Ee,{onSubmit:u?k:J,children:[!u&&e.jsx(H,{type:"email",id:"email-input",placeholder:s("login.issueKyc.emailPlaceholder"),sx:{width:"100%",maxWidth:360},value:x,onChange:n=>L(n.target.value),disabled:E,required:!0}),u&&e.jsxs(g,{direction:"column",justifyContent:"center",alignItems:"center",spacing:2,children:[e.jsx(w,{variant:"body2",textAlign:"center",children:s("login.issueKyc.codeSentMessage",{email:x})}),e.jsx(z,{sx:{width:"100%",maxWidth:360,display:"flex",justifyContent:"space-between"},children:[...Array(p.VERIFY_CODE_LENGTH)].map((n,t)=>e.jsx(H,{value:h(c[t])||"",type:"number",inputProps:{maxLength:1,style:{textAlign:"center",fontSize:"1.5rem"},autoComplete:"off"},sx:{width:"14%"},onChange:i=>{var F;const j=c.split("");j[t]=i.target.value,A(j.join("")),i.target.value&&t<5&&((F=document.getElementById(`code-input-${t+1}`))==null||F.focus())},onKeyDown:i=>{var j;i.key==="Backspace"&&!h(c[t])&&t>0&&((j=document.getElementById(`code-input-${t-1}`))==null||j.focus())},disabled:E,required:!0,id:`code-input-${t}`,autoComplete:"off"},`code-input-${t}`))})]}),e.jsxs(g,{direction:"row",justifyContent:m?"space-between":"center",alignItems:"center",spacing:2,sx:{width:"100%",maxWidth:360},children:[m&&e.jsx(R,{variant:"text",disabled:E,onClick:X,size:"large",children:s("login.updateKyc.button")}),e.jsx(R,{type:"submit",size:"large",variant:"contained",disabled:E||!x||u&&h(c).length!==p.VERIFY_CODE_LENGTH,sx:{width:m?"auto":"100%"},children:E?e.jsx(ne,{size:24}):s(u?"login.issueKyc.verifyButton":"login.issueKyc.sendCodeButton")})]})]})})]})]})}export{Te as default};
|
|
@@ -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,
|
|
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-DbrmIue2.js";import{F as b}from"./fullpage-DCmKoQcJ.js";import{w as v}from"./wrap-locale-fB5m4Aoq.js";import{g as L}from"./get-safe-url-1p-YuOdC.js";import{S as F,s as N,a as _}from"./index-CIZ-6weB.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{a1 as X,j as e,E as t,I as k,bq as A,x as U,P as V,v as W,$ as G,ar as H,al as J,bS as Q,M as Y,a3 as u,a2 as Z}from"./vendor-mui-core-xF5F4eT7.js";import{
|
|
1
|
+
import{a1 as X,j as e,E as t,I as k,bq as A,x as U,P as V,v as W,$ as G,ar as H,al as J,bS as Q,M as Y,a3 as u,a2 as Z}from"./vendor-mui-core-xF5F4eT7.js";import{$ as ee,a1 as te,ae as se}from"./vendor-arcblock-DbrmIue2.js";import{b as P,r as i}from"./vendor-react-D-afvo_7.js";import{d as ae}from"./Done-B19I_hTo.js";import{F as le,R as ne}from"./logo-uploader-BgvRj-1f.js";import{d as re}from"./EditIcon-BOr0kf6I.js";import{d as ie}from"./ArrowDropDown-Cj_5MpNL.js";var R={},oe=X;Object.defineProperty(R,"__esModule",{value:!0});var ce=R.default=void 0,ue=oe(ee()),de=e;ce=R.default=(0,ue.default)((0,de.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"SettingsOutlined");function I({triggers:l,onEnterEdit:a,disabled:m}){const n=P.useRef(null),[p,o]=P.useState(!1),b=s=>{o(!1),s()},C=()=>{o(s=>!s)},d=s=>{n.current&&n.current.contains(s.target)||o(!1)};return l.length===0?e.jsx(k,{"data-cy":"schema-form-item-edit",onClick:a,disabled:m,size:"large",children:e.jsx(re,{})}):e.jsxs(e.Fragment,{children:[e.jsx(A,{variant:"outlined",ref:n,"aria-label":"split button",children:e.jsx(U,{size:"large","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:C,children:e.jsx(ie,{})})}),e.jsx(V,{sx:{zIndex:9999},open:p,anchorEl:n.current,role:void 0,placement:"bottom-end",children:e.jsx(W,{children:e.jsx(G,{onClickAway:d,children:e.jsx(H,{id:"split-button-menu",autoFocusItem:!0,children:l.map(s=>e.jsx(J,{onClick:()=>b(s.handler),children:s.title},s.key))})})})})]})}I.propTypes={triggers:t.arrayOf(t.shape({key:t.string.isRequired,title:t.string.isRequired,handler:t.func.isRequired})),onEnterEdit:t.func.isRequired,disabled:t.bool.isRequired};I.defaultProps={triggers:[]};const T=(l,a,m)=>l===null&&a&&m?"******":l?a?"******":l:"",fe=Q`
|
|
2
2
|
0%, 100% {
|
|
3
3
|
transform: scale(1) translateX(0);
|
|
4
4
|
}
|
|
@@ -8,4 +8,4 @@ import{a1 as X,j as e,E as t,I as k,bq as A,x as U,P as V,v as W,$ as G,ar as H,
|
|
|
8
8
|
25%, 75% {
|
|
9
9
|
transform: scale(1.1) translateX(3px);
|
|
10
10
|
}
|
|
11
|
-
`;function w({label:l,disabled:a,required:m,initialValue:n,onChange:p,placeholder:o,style:b,onSubmit:C,secure:d,triggers:s,formatterBeforeSubmit:
|
|
11
|
+
`;function w({label:l,disabled:a,required:m,initialValue:n,onChange:p,placeholder:o,style:b,onSubmit:C,secure:d,triggers:s,formatterBeforeSubmit:_,...N}){const[q,g]=i.useState(!1),[h,v]=i.useState(!1),{t:L}=i.useContext(te),[y,$]=i.useState(d&&n==="__encrypted__"?null:n),[c,x]=i.useState(y),[f,j]=i.useState(!1),[B,E]=i.useState(!1),F=async()=>{v(!0);try{if(await C(c)===!1)x(y);else{let S=c;typeof _=="function"&&(S=_(c)),x(S),$(S),j(!1)}}catch{x(y)}finally{v(!1),g(!1)}},M=r=>{j(r!==c),x(r),p(r)},O=r=>{r.key==="Enter"&&F()},z=i.useCallback(()=>{E(!0),setTimeout(()=>{E(!1)},500)},[]),D=i.useCallback(()=>{f&&z(),!f&&!a&&!h&&(g(!1),j(!1))},[f,a,h,z]),K=q?e.jsx(Y,{style:{flex:1},fullWidth:!0,value:c,onChange:r=>{M(r.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o,onKeyDown:O,onBlur:D,disabled:a,type:d?"password":"text",...N}):e.jsx(u,{px:1,"data-cy":"schema-form-item-edit",className:"form-item-input slot",style:{whiteSpace:"pre-wrap",cursor:"text"},onClick:()=>{a||g(!0)},children:T(c,d,n)?T(c,d,n):e.jsx("span",{className:"placeholder",children:L("common.requiredInputPlaceholder",{name:o||l})})});return e.jsx(le,{className:"form",style:b,children:e.jsxs(u,{className:"form-item",children:[e.jsxs(u,{className:"form-item-label",children:[l,m&&e.jsx(ne,{})]}),e.jsxs(u,{className:"form-item-body",style:{alignItems:"flex-start"},children:[e.jsx(u,{className:"form-item-input",children:K}),e.jsx(u,{className:"form-item-action",style:{marginLeft:s.length?12:0},children:q?e.jsxs(e.Fragment,{children:[f?e.jsx(k,{"data-cy":"schema-form-item-confirm",onClick:F,disabled:a||h||!f,sx:{animation:B?`${fe} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:h?e.jsx(Z,{size:24}):e.jsx(ae,{})}):null,e.jsx(k,{"data-cy":"schema-form-item-cancel",onClick:()=>{x(y),g(!1),j(!1)},style:{paddingLeft:f?4:8},disabled:a||h,size:"large",children:e.jsx(se,{})})]}):e.jsx(u,{children:s.length?e.jsx(I,{triggers:s,disabled:a}):null})})]})]})})}w.propTypes={style:t.object,onSubmit:t.func,onChange:t.func,label:t.string,initialValue:t.string,placeholder:t.string,required:t.bool,disabled:t.bool,secure:t.bool,triggers:t.array,formatterBeforeSubmit:t.func};w.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",placeholder:"",required:!1,disabled:!1,secure:!1,triggers:[],formatterBeforeSubmit:null};export{w as F,ce as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,a3 as t,a2 as P,bp as W,E as d,aa as B}from"./vendor-mui-core-xF5F4eT7.js";import{r as l}from"./vendor-react-D-afvo_7.js";import{x as v}from"./vendor-utils-5TjOM6td.js";import{d as E}from"./Launch-
|
|
1
|
+
import{j as e,a3 as t,a2 as P,bp as W,E as d,aa as B}from"./vendor-mui-core-xF5F4eT7.js";import{r as l}from"./vendor-react-D-afvo_7.js";import{x as v}from"./vendor-utils-5TjOM6td.js";import{d as E}from"./Launch-ChAa9OLi.js";import{a1 as I,Z as L}from"./vendor-arcblock-DbrmIue2.js";import{W as $}from"./did-address-BwvGS0Z4.js";import{P as D}from"./page-header-BR1xofie.js";import{o as T,u as z}from"./index-CIZ-6weB.js";import{S as A}from"./layout-WoEg-ZDx.js";import{S as F}from"./step-actions-BfPRhdBV.js";import{S as m}from"./button-muv2pKA-.js";import"./vendor-hooks-BKxTDk_P.js";import"./content-layout-cWwRTmIc.js";function u({onNext:n,onPrevious:f}){const{locale:x,t:s}=l.useContext(I),{blocklet:a,gas:c,tokenInfo:h,actions:j}=T(),{api:y}=z(),[g,o]=l.useState(!1),{need:p="",current:b="",owe:r=99999,deficiency:k,symbol:C="",endpoint:i}=c||{},{origin:S="/"}=i?new URL(i):{};l.useEffect(()=>{const N=setInterval(()=>{j.refreshFuel()},2e3);return()=>{clearInterval(N)}},[]);const w=()=>{o(!1)};return c?e.jsxs(R,{children:[e.jsx("div",{className:"header",children:e.jsx(D,{title:s("setup.fuel.title"),onClickBack:f})}),e.jsxs(t,{className:"qr-body",children:[e.jsxs(t,{mb:6,className:"tip",children:[s("setup.fuel.tipStart").replace("slot",""),e.jsx("span",{className:"amount",children:`${p} ${C}`}),s("setup.fuel.tipEnd")]}),e.jsx(t,{fontSize:16,fontWeight:"fontWeightBold",mb:.5,children:s("setup.fuel.addressTitle")}),e.jsxs(t,{display:"flex",alignItems:"center",children:[e.jsx($,{className:"address",did:a.appDid}),e.jsx(W,{style:{lineHeight:1},target:"_blank",href:v(S,"/explorer/accounts/",a.appDid),underline:"hover",children:e.jsx(E,{className:"icon-launch"})})]}),e.jsx(t,{my:2,children:e.jsx(m,{color:"primary",onClick:()=>o(!0),disabled:!r,children:s("setup.fuel.fuelApp")})}),e.jsx(L,{popup:!0,open:g,action:"fuel",checkFn:y.get,checkTimeout:10*60*1e3,onSuccess:w,onClose:()=>o(!1),locale:x,messages:{title:s("setup.connect.title"),scan:s("setup.connect.scan"),confirm:s("setup.connect.confirm"),success:s("setup.connect.success")},extraParams:{amount:k,...h,endpoint:i}}),e.jsxs(t,{display:"flex",color:"text.secondary",children:[e.jsxs(t,{display:"flex",children:[e.jsxs(t,{children:[s("setup.fuel.need"),":"]}),e.jsx(t,{ml:.5,color:"primary.main",fontWeight:"fontWeightBold",children:p})]}),e.jsxs(t,{display:"flex",ml:3,children:[e.jsxs(t,{children:[s("setup.fuel.current"),":"]}),e.jsx(t,{ml:.5,color:r>0?"error.main":"primary.main",fontWeight:"fontWeightBold",children:b})]})]})]}),e.jsx(F,{mt:8,children:e.jsx(m,{disabled:r>0,onClick:()=>n(),children:s("setup.next")})})]}):e.jsx(t,{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",children:e.jsx(P,{})})}u.propTypes={onNext:d.func,onPrevious:d.func};u.defaultProps={onNext:()=>{},onPrevious:()=>{}};const R=B(A)`
|
|
2
2
|
.qr-body {
|
|
3
3
|
width: 580px;
|
|
4
4
|
${n=>n.theme.breakpoints.down("md")} {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,T as x,bp as h,a3 as o,E as r}from"./vendor-mui-core-xF5F4eT7.js";import{
|
|
1
|
+
import{j as e,T as x,bp as h,a3 as o,E as r}from"./vendor-mui-core-xF5F4eT7.js";import{as as j,B as v,af as a}from"./vendor-arcblock-DbrmIue2.js";function w({linkProps:t,...d}){return e.jsxs(x,{...d,children:["Powered by"," ",e.jsx(h,{href:"https://www.arcblock.io",target:"_blank",underline:"hover",...t,children:"ArcBlock"}),"'s"," ",e.jsx(h,{href:"https://www.blocklet.io",target:"_blank",underline:"hover",...t,children:"Blocklet Technology"}),", the decentralized web engine."]})}const y="/.well-known/service/static/assets/login-bg-Cbfh9Uc2.png";function k({did:t,children:d,title:l,description:c,logo:n,logoSize:g,appUrl:i}){var b,f,p,m;if(!t)return d;let s;try{s=j(t)}catch{console.warn("Invalid did:",t)}const u=(globalThis==null?void 0:globalThis.blocklet)||(globalThis==null?void 0:globalThis.env)||{};return l===void 0&&(l=u.appName),c===void 0&&(c=u.appDescription),n===void 0&&(n=((b=globalThis==null?void 0:globalThis.blocklet)==null?void 0:b.appLogoRect)||((f=globalThis==null?void 0:globalThis.blocklet)==null?void 0:f.appLogo)||""),typeof n=="string"&&(n?n=e.jsx(o,{sx:{height:g,maxHeight:g,maxWidth:"50%",objectFit:"contain"},component:"img",src:n,alt:`${l}'s logo`}):n=e.jsx(v,{size:g,did:t,src:n,variant:"rounded"})),typeof i=="string"&&(i=((p=globalThis==null?void 0:globalThis.blocklet)==null?void 0:p.appUrl)||"",!i&&(globalThis!=null&&globalThis.env)&&(i=(m=globalThis==null?void 0:globalThis.env)==null?void 0:m.baseUrl)),e.jsxs(o,{sx:{width:"100vw",height:"100vh",overflowX:"auto",display:"flex",backgroundColor:a.backgroundsBgSubtile},children:[e.jsxs(o,{sx:{position:"relative",fontSize:0,flex:30,display:{xs:"none",lg:"flex"},minWidth:"400px",backgroundColor:a.surfaceBgSubtitle},children:[e.jsx(o,{sx:{position:"absolute",top:0,bottom:0,left:0,right:0,background:s?`linear-gradient(0deg, ${s} 0%, ${s} 100%), url(${y}), lightgray 50% / cover no-repeat`:`url(${y}), lightgray 50% / cover no-repeat`,backgroundPosition:"center",backgroundSize:"cover",backgroundBlendMode:s?"soft-light, normal":"unset",mask:"linear-gradient(172deg, rgba(0, 0, 0, 0.0) 24.62%, rgba(0, 0, 0, 0.80) 44.47%, #000 100%)"}}),e.jsxs(o,{sx:{display:"flex",flexDirection:"column",position:"absolute",top:0,left:0,width:"100%",p:3},children:[i?e.jsx(o,{children:e.jsx(h,{href:i,underline:"none",color:"inherit",children:n})}):n,l&&e.jsx(x,{variant:"h5",sx:{mt:3,mb:1,p:0,mx:0,fontWeight:"bold"},children:i?e.jsx(h,{href:i,underline:"none",color:"inherit",children:l}):l}),c&&e.jsx(x,{variant:"body2",sx:{m:0,p:0,color:a.foregroundsFgSubtile,fontSize:"12px",lineHeight:"20px"},children:c})]}),e.jsx(w,{linkProps:{underline:"always",color:a.textSubtitle},sx:{zIndex:10,position:"absolute",bottom:40,left:20,right:20,textAlign:"center",fontSize:"12px",color:a.textSubtitle}})]}),e.jsx(o,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flex:70,maxWidth:{xs:"100%",md:"90%"},margin:"auto",height:"auto"},children:d})]})}k.propTypes={did:r.string.isRequired,children:r.any.isRequired,title:r.any,description:r.any,logo:r.any,logoSize:r.number,appUrl:r.string};k.defaultProps={title:void 0,description:void 0,logo:void 0,logoSize:40,appUrl:""};export{k as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ar as t,j as o}from"./vendor-arcblock-DbrmIue2.js";function i(...e){try{return t(...e)}catch(r){throw o.error("Invalid redirect url"),console.error("Invalid redirect url",r),r}}export{i as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ar as t,j as o}from"./vendor-arcblock-DbrmIue2.js";function i(...e){try{return t(...e)}catch(r){throw o.error("Invalid redirect url"),console.error("Invalid redirect url",r),r}}export{i as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,ac as n}from"./vendor-mui-core-xF5F4eT7.js";import{L as r}from"./vendor-react-D-afvo_7.js";import{
|
|
1
|
+
import{j as o,ac as n}from"./vendor-mui-core-xF5F4eT7.js";import{L as r}from"./vendor-react-D-afvo_7.js";import{a2 as i,b as t}from"./vendor-arcblock-DbrmIue2.js";import{S as e}from"./studio-TADgck-O.js";import"./vendor-utils-5TjOM6td.js";import"./vendor-hooks-BKxTDk_P.js";function p(){return o.jsx(e,{children:o.jsxs(n,{direction:"row",m:4,spacing:2,children:[o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/preferences`,size:"large",color:"primary",variant:"outlined",children:"Preference Builder"}),o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/branding`,size:"large",color:"primary",variant:"outlined",children:"Branding Images"}),o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/localization`,size:"large",color:"primary",variant:"outlined",children:"Localization"})]})})}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as x}from"./vendor-react-D-afvo_7.js";import{
|
|
1
|
+
import{b as x}from"./vendor-react-D-afvo_7.js";import{av as E}from"./vendor-arcblock-DbrmIue2.js";const L=({url:r,allowFullScreen:o,position:a,display:i,height:u,width:c,overflow:f,styles:y,onLoad:p,onMouseOver:m,onMouseOut:b,scrolling:w,id:d,frameBorder:n,ariaHidden:O,sandbox:s,allow:j,className:g,title:h,ariaLabel:k,ariaLabelledby:v,name:I,target:P,loading:A,importance:F,referrerpolicy:M,allowpaymentrequest:S,src:$,key:q})=>{const t=E({src:$||r,target:P||null,style:{position:a||null,display:i||"initial",overflow:f||null},scrolling:w||null,allowpaymentrequest:S||null,importance:F||null,sandbox:s&&[...s].join(" ")||null,loading:A||null,styles:y||null,name:I||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:M||null,title:h||null,allow:j||null,id:d||null,"aria-labelledby":v||null,"aria-hidden":O||null,"aria-label":k||null,width:c||null,height:u||null,onLoad:p||null,onMouseOver:m||null,onMouseOut:b||null,key:q||"iframe"});let l=Object.create(null);for(let e of Object.keys(t))t[e]!=null&&(l[e]=t[e]);for(let e of Object.keys(l.style))l.style[e]==null&&delete l.style[e];if(l.styles)for(let e of Object.keys(l.styles))l.styles.hasOwnProperty(e)&&(l.style[e]=l.styles[e]),Object.keys(l.styles).pop()==e&&delete l.styles;if(o)if("allow"in l){const e=l.allow.replace("fullscreen","");l.allow=`fullscreen ${e.trim()}`.trim()}else l.allow="fullscreen";return n>=0&&(l.style.hasOwnProperty("border")||(l.style.border=n)),x.createElement("iframe",Object.assign({},l))},z=L;export{z as I};
|
|
@@ -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{b0 as ft,b1 as pi,b2 as mi,b3 as hn,b4 as hi,b5 as gi,b6 as yi,b7 as gn,b8 as bi,b9 as cr,ba as vi,bb as xi,bc as wi,bd as ji,o as lr,be as yn,m as Ei,n as Si,e as _e,B as bn,D as Pi,a5 as Ge,a1 as je,as as Ci,Y as Oi,ad as Ai,a0 as dt,j as Ke,$ as Ii,bf as vn,b as Ye,at as xn,bg as Ri,aA as Ni,al as Ti,aE as _i,aS as wn,a8 as Di,aT as jn,_ as Ui,bh as En,bi as qi,bj as ki}from"./vendor-arcblock-oqH5gsLR.js";import{d as St}from"./Add-_iRymiOl.js";import{d as Li}from"./Loop-OLIg6dh7.js";import{d as Bi}from"./ViewList-PZwK-0pV.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-CegSwHre.js";import{$ as $i,f as Mi,y as Ce,ap as ur,m as Qe,a0 as Wi,M as Xe,aq as zi,h as Ze,B as Pn,ar as Cn,b as Vi}from"./index-1soveoNH.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-BxMHOYyh.js";import{W as Pt}from"./did-address-Bpb9HTRt.js";import{P as Be}from"./permission-C4wOllow.js";import{C as Rt}from"./click-to-copy-BixfYLPy.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-Ua5iss51.js";import{I as Pe}from"./index-Fyc9Yh32.js";import{d as Zi}from"./DeleteOutline-C6VkRbFK.js";import{C as pt}from"./confirm-CPtiZE0r.js";import{u as mt}from"./session-B07p7iif.js";import{i as In,a as Ct,p as Rn}from"./util-5SXnNpj9.js";import{b as Qi}from"./sdk-Dwpx68pe.js";import{p as Xi}from"./index-BFDq4CA-.js";import{A as Ji}from"./actions-CS0A6ZvH.js";import{S as eo}from"./shorten-label-J69eHfMN.js";import"./useLocalStorage-CVBgwJgU.js";import"./PlayArrow-CyaFn-Ol.js";import"./get-safe-url-ClvIGbO9.js";import"./index-gRh_ocU8.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./InfoOutlined-C5fMx7-l.js";import"./useSetState-Crt4S51m.js";import"./MoreHoriz-BkVO_QXB.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 z;return r(this,Z),z=X.call(this,g(G,Y,F)),z.code=o,z}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(V){return Object.getOwnPropertyDescriptor(O,V).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),V;if(A){var y=a(this).constructor;V=Reflect.construct(R,arguments,y)}else V=R.apply(this,arguments);return b(this,V)}}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,V)}function V(){return P(R,arguments,a(this).constructor)}return V.prototype=Object.create(R.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),w(V,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(V,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(V,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,V){return R.__proto__=V,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="",z={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="",V="",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,aB as Ni,am as Ti,aF as _i,aT as wn,a9 as Di,aU as jn,$ as Ui,bi as En,bj as qi,bk as ki}from"./vendor-arcblock-DbrmIue2.js";import{d as St}from"./Add-BKkOI8kr.js";import{d as Li}from"./Loop-0uHSVzVg.js";import{d as Bi}from"./ViewList-C6uTrCwG.js";import{L as Ki,S as Fi,d as Sn}from"./list-header-DfHbQVcL.js";import{$ as $i,f as Mi,y as Ce,ap as ur,m as Qe,a0 as Wi,M as Xe,aq as zi,h as Ze,B as Pn,ar as Cn,b as Vi}from"./index-CIZ-6weB.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-BI-BX7tJ.js";import{W as Pt}from"./did-address-BwvGS0Z4.js";import{P as Be}from"./permission-DLT57IZZ.js";import{C as Rt}from"./click-to-copy-GbkBj9-M.js";import{f as Fe}from"./format-error-C0Ke3VXF.js";import{_ as Yi}from"./useAsync-Ua5iss51.js";import{I as Pe}from"./index-DvZ_TLdU.js";import{d as Zi}from"./DeleteOutline-D6WRSywd.js";import{C as pt}from"./confirm-Cg9hPCJr.js";import{u as mt}from"./session-D-F-iijZ.js";import{i as In,a as Ct,p as Rn}from"./util-B9yvyJKW.js";import{b as Qi}from"./sdk-CpE7sbD_.js";import{p as Xi}from"./index-CVFyE6Sl.js";import{A as Ji}from"./actions-caLBBlX_.js";import{S as eo}from"./shorten-label-J69eHfMN.js";import"./useLocalStorage-DnlK9tHz.js";import"./PlayArrow-DjBGNK_J.js";import"./get-safe-url-1p-YuOdC.js";import"./index-CJHEwaI7.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./InfoOutlined-CJxRYyjF.js";import"./useSetState-Crt4S51m.js";import"./MoreHoriz-D_AgpVtE.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 z;return r(this,Z),z=X.call(this,g(G,Y,F)),z.code=o,z}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(V){return Object.getOwnPropertyDescriptor(O,V).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),V;if(A){var y=a(this).constructor;V=Reflect.construct(R,arguments,y)}else V=R.apply(this,arguments);return b(this,V)}}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,V)}function V(){return P(R,arguments,a(this).constructor)}return V.prototype=Object.create(R.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),w(V,R)},E(O)}function P(O,A,K){return d()?P=Reflect.construct.bind():P=function(V,y,p){var v=[null];v.push.apply(v,y);var D=Function.bind.apply(V,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,V){return R.__proto__=V,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="",z={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="",V="",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(z[K],`
|
|
4
4
|
|
|
@@ -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 _e,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-xF5F4eT7.js";import{d as ce}from"./Add-
|
|
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 _e,K as Ye,a4 as ee,t as Je}from"./vendor-mui-core-xF5F4eT7.js";import{d as ce}from"./Add-BKkOI8kr.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 Be,bl as X,bm as be,a_ as st}from"./vendor-arcblock-DbrmIue2.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-DfHbQVcL.js";import{L as V,am as Se,H as at}from"./vendor-utils-5TjOM6td.js";import{y as B,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-CIZ-6weB.js";import{u as U}from"./dashboard-BI-BX7tJ.js";import{w as M,P as we}from"./permission-DLT57IZZ.js";import{C as fe}from"./confirm-Cg9hPCJr.js";import{f as Y}from"./format-error-C0Ke3VXF.js";import{C as ut}from"./Google-BDjjtixD.js";import{W as ze}from"./did-address-BwvGS0Z4.js";import{_ as pt}from"./useSetState-Crt4S51m.js";import"./vendor-hooks-BKxTDk_P.js";import"./useLocalStorage-DnlK9tHz.js";import"./PlayArrow-DjBGNK_J.js";import"./get-safe-url-1p-YuOdC.js";import"./index-CJHEwaI7.js";import"./session-D-F-iijZ.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-CJxRYyjF.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>
|