@abtnode/blocklet-services 1.17.6-beta-20251217-144034-62fafb94 → 1.17.6-beta-20251218-120326-5b44dadf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +43 -34
- package/api/util/attach-shared-utils.js +8 -2
- package/api/util/federated.js +2 -2
- package/dist/assets/{AdapterDayjs-DqOr9LFk.js → AdapterDayjs-CyjsNBLx.js} +1 -1
- package/dist/assets/{Google-CQ1n6aSx.js → Google-qJPhO3Bv.js} +1 -1
- package/dist/assets/{access-control-Br0Q24U5.js → access-control-DnaC-ntN.js} +1 -1
- package/dist/assets/{add-component-core-BjIc5CSC.js → add-component-core-DppKYxsT.js} +1 -1
- package/dist/assets/{add-resource-Xb-x4g1C.js → add-resource-nZx6jcxt.js} +1 -1
- package/dist/assets/{addon-Bb-IvkBm.js → addon-CWepU-kl.js} +1 -1
- package/dist/assets/{advanced-J7PaqOkP.js → advanced-D8m1Ueie.js} +1 -1
- package/dist/assets/{aigne-BisxPU40.js → aigne-JZcfPzC6.js} +1 -1
- package/dist/assets/api-C_w0YD2j.js +1 -0
- package/dist/assets/{appearance-DB7npajX.js → appearance-0EszN89M.js} +1 -1
- package/dist/assets/{audit-logs-ChUneyZT.js → audit-logs-CI4WysnU.js} +2 -2
- package/dist/assets/{authorize-Y82VNxRU.js → authorize-D44ooZQv.js} +1 -1
- package/dist/assets/{base-chart-CRe-9w5H.js → base-chart-Cs8rd9f2.js} +1 -1
- package/dist/assets/{base32-BqL5pnrU.js → base32-Dms5J8BI.js} +1 -1
- package/dist/assets/{bind-account-D6v5gT9Q.js → bind-account-JV34J5Xm.js} +1 -1
- package/dist/assets/{branding-DMSOM95n.js → branding-BJCkGiFk.js} +1 -1
- package/dist/assets/{branding-CEFq0bR-.js → branding-CWSPHmrR.js} +1 -1
- package/dist/assets/branding-DdXH_RvS.js +1 -0
- package/dist/assets/{bundle-avatar-B4iapkc8.js → bundle-avatar-BtFusdVR.js} +1 -1
- package/dist/assets/{button-C2uxCAba.js → button-dwhnNiIp.js} +1 -1
- package/dist/assets/{click-to-copy-03_3P1nz.js → click-to-copy-P5mPeLGL.js} +1 -1
- package/dist/assets/{cloneDeep-DqDclz1x.js → cloneDeep-BbaR0xRl.js} +1 -1
- package/dist/assets/{complete-8l4TIdOc.js → complete-C2eZZOXC.js} +1 -1
- package/dist/assets/{component-wVyJUR9k.js → component-BaU5hHKk.js} +2 -2
- package/dist/assets/{config--7XaVDtf.js → config-CCnS9IQP.js} +1 -1
- package/dist/assets/{config-Cg-4HKDk.js → config-DVWLcvSS.js} +1 -1
- package/dist/assets/config-kfbhKizi.js +53 -0
- package/dist/assets/{config-navigation-C25bf49D.js → config-navigation-DGBH-fH3.js} +3 -3
- package/dist/assets/{config-space-a5CPzcRH.js → config-space-Cung-olH.js} +1 -1
- package/dist/assets/{confirm-Bae4Q6hA.js → confirm-8-up_m-t.js} +1 -1
- package/dist/assets/{connect-Kqg-Hvf0.js → connect-CO3sXyDi.js} +1 -1
- package/dist/assets/{connect-DcNJuYMP.js → connect-DUE3spg6.js} +1 -1
- package/dist/assets/{connect-to-CAxA9YCt.js → connect-to-R3QLEY0t.js} +1 -1
- package/dist/assets/{create-passport-svg-Cs4mVLsE.js → create-passport-svg-DisoTWuv.js} +1 -1
- package/dist/assets/{createClass-BRKh_6kd.js → createClass-BKsWaCf4.js} +1 -1
- package/dist/assets/dashboard-8MVLDFcc.js +103 -0
- package/dist/assets/{delete-confirm-BH4us77q.js → delete-confirm-D_45dT2a.js} +1 -1
- package/dist/assets/{did-address-DpdRECuJ.js → did-address-BjZvgDzc.js} +1 -1
- package/dist/assets/{domain-A_x2C7hZ.js → domain-BraDyagy.js} +1 -1
- package/dist/assets/{domain-action-card-qfAg2FOU.js → domain-action-card-BmOv4oe5.js} +2 -2
- package/dist/assets/domains-Dy7ECa6U.js +1 -0
- package/dist/assets/{email-B41P48YL.js → email-CkeAvsAa.js} +1 -1
- package/dist/assets/engine-Cm_CGBhX.js +1 -0
- package/dist/assets/{exchange-passport-DmJ-ZNn7.js → exchange-passport-Fp943JxR.js} +1 -1
- package/dist/assets/{form--M8l8TAR.js → form-jl_s7BGq.js} +1 -1
- package/dist/assets/{form-text-input-CsXLsIFW.js → form-text-input-DTxgomuw.js} +1 -1
- package/dist/assets/{fuel-CKdRvbMh.js → fuel-D-LdwjdC.js} +1 -1
- package/dist/assets/{gen-access-key-DpcudUJv.js → gen-access-key-BRr17t_H.js} +1 -1
- package/dist/assets/{gen-simple-access-key-bBIGQFVa.js → gen-simple-access-key-BxMBs7fK.js} +1 -1
- package/dist/assets/get-safe-url-dvWY0L5j.js +1 -0
- package/dist/assets/{home-Br4wv3nM.js → home-Bn4iii2m.js} +1 -1
- package/dist/assets/{iframe-DEDZfTQS.js → iframe-C0AgQvx8.js} +1 -1
- package/dist/assets/{index-CCV_gr1l.js → index-2gt9VfEc.js} +1 -1
- package/dist/assets/{index-gb3Omoer.js → index-B-I6un5k.js} +1 -1
- package/dist/assets/{index-DZnXlBSX.js → index-B5vc0eG5.js} +1 -1
- package/dist/assets/{index-DDNwkWcx.js → index-B8k8ZH-U.js} +1 -1
- package/dist/assets/{index-BMx1LEw9.js → index-BAp7_uhB.js} +1 -1
- package/dist/assets/{index-B09kmneh.js → index-BFym_Z-b.js} +1 -1
- package/dist/assets/{index-Drd8GwRz.js → index-BQ5NNc-7.js} +1 -1
- package/dist/assets/{index-D-PNqbj6.js → index-BR0Wem2b.js} +1 -1
- package/dist/assets/{index-B4sVJOOj.js → index-BTECQw0p.js} +1 -1
- package/dist/assets/{index-BuQB-bBx.js → index-BjNeXyVY.js} +6 -6
- package/dist/assets/{index-CbOKD65A.js → index-BjehQLKB.js} +2 -2
- package/dist/assets/{index-CCp_Tje1.js → index-BlSveGp8.js} +61 -61
- package/dist/assets/{index-DFIvDEic.js → index-C50skInm.js} +1 -1
- package/dist/assets/{index-B8FnxSR4.js → index-CJDEYakY.js} +1 -1
- package/dist/assets/{index-wfFuxfIU.js → index-CPxL8CpH.js} +1 -1
- package/dist/assets/{index-DFNR7XPL.js → index-CTE1ENlu.js} +12 -12
- package/dist/assets/{index-BTLkS2yC.js → index-CajO0kKX.js} +4 -4
- package/dist/assets/{index-CeGNmiXz.js → index-Cv24xb2K.js} +1 -1
- package/dist/assets/index-D0eI1uWt.js +270 -0
- package/dist/assets/{index-DzshGHRk.js → index-DIzANfR6.js} +1 -1
- package/dist/assets/{index-CiQKtWIW.js → index-DM9inqt9.js} +1 -1
- package/dist/assets/{index-ChsRYmOX.js → index-DQ-SL5-m.js} +1 -1
- package/dist/assets/{index-suU5cUfF.js → index-DS9mwDyh.js} +1 -1
- package/dist/assets/{index-Du-44Mnl.js → index-DoK2Rtvh.js} +2 -2
- package/dist/assets/{index-t-iCgvnA.js → index-Dp17qZ6C.js} +1 -1
- package/dist/assets/{index-ds5CY5te.js → index-DrhZQ_wV.js} +1 -1
- package/dist/assets/{index-BHZ1NI4D.js → index-Dtrjy5pJ.js} +5 -5
- package/dist/assets/{index-Dp5SQewL.js → index-DyLgcKhb.js} +1 -1
- package/dist/assets/{index-97PFSvcx.js → index-dfs551o8.js} +1 -1
- package/dist/assets/{index-Ck7gs4Oo.js → index-kbCgvprY.js} +1 -1
- package/dist/assets/{index-DZNC_-b1.js → index-rDhoTVbw.js} +1 -1
- package/dist/assets/{invitation-CmMAFxUf.js → invitation-BAxrjUDG.js} +1 -1
- package/dist/assets/{invitations-BGoj-6ca.js → invitations-CO0Ty2S9.js} +2 -2
- package/dist/assets/{invite-xCk-bD5o.js → invite-CYXl5uc3.js} +1 -1
- package/dist/assets/{isURL-FbWmvlGY.js → isURL-BxZzphzW.js} +1 -1
- package/dist/assets/{issue-passport-ogite141.js → issue-passport-DYOdrLjy.js} +1 -1
- package/dist/assets/{item-DB2BQlzi.js → item-Ccb0OQkt.js} +1 -1
- package/dist/assets/{landing-page-_7E5uTzY.js → landing-page-CmKJmT-U.js} +1 -1
- package/dist/assets/{layout-bs5efDjb.js → layout-CHuGuIJt.js} +1 -1
- package/dist/assets/{list-DzPoX6hE.js → list-B6W2DONO.js} +1 -1
- package/dist/assets/{list-CY3qo6ZZ.js → list-miYDTaUU.js} +1 -1
- package/dist/assets/localization-C3-q8joh.js +1 -0
- package/dist/assets/{log-YDgW4rdG.js → log-DdfRRLsZ.js} +1 -1
- package/dist/assets/logger-CzWbEvKU.js +1 -0
- package/dist/assets/{login-BX3PcB9B.js → login-92eabaMB.js} +1 -1
- package/dist/assets/{login-oauth-callback-74_L5-PV.js → login-oauth-callback-9GVt-otv.js} +1 -1
- package/dist/assets/{logo-uploader-BiccA0Y_.js → logo-uploader-ficxc3SB.js} +1 -1
- package/dist/assets/{lost-passport-DQpqnLzY.js → lost-passport-BDvFLXED.js} +1 -1
- package/dist/assets/{omit-5AwbF-Ja.js → omit-BgmLPtMY.js} +1 -1
- package/dist/assets/{open-window-DwdCOSRH.js → open-window-NxoiKlpc.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-vMGDLCRH.js → over-due-invoice-payment-Bag2QJw8.js} +1 -1
- package/dist/assets/{overview-DlaOwZTf.js → overview-B-FL9Ztc.js} +3 -3
- package/dist/assets/{passport-item-D-26SswO.js → passport-item-2TTg8u8i.js} +1 -1
- package/dist/assets/passport-ksgWSkVe.js +1 -0
- package/dist/assets/{permission-DSq5t-Gl.js → permission-BJlcNSeA.js} +1 -1
- package/dist/assets/{preferences-CU_TcWh8.js → preferences-vSJ26-Kf.js} +1 -1
- package/dist/assets/profile-embed-q0jzSGic.js +1 -0
- package/dist/assets/{publish-resource-CJMQG20J.js → publish-resource-N_xsM7eE.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-By1RE6ef.js → react-beautiful-dnd.esm-B8-BZPPH.js} +1 -1
- package/dist/assets/runtime-BK5XjM1-.js +1 -0
- package/dist/assets/{sanitize-BOo6OPJZ.js → sanitize-DyRfEGVu.js} +1 -1
- package/dist/assets/sdk-CIR3zRqK.js +1 -0
- package/dist/assets/{security-BtvdwO9M.js → security-CKHrp32s.js} +1 -1
- package/dist/assets/{session-BjDe0kgL.js → session-Cqrj8_SK.js} +1 -1
- package/dist/assets/{setup-Dznue6f2.js → setup-CHheNDuH.js} +1 -1
- package/dist/assets/{spaces-QwBC54Y6.js → spaces-BAJFHyzr.js} +1 -1
- package/dist/assets/{start-8dFdO02W.js → start-BOYluYHu.js} +1 -1
- package/dist/assets/{starting-progress-SGklUl5j.js → starting-progress-CkCYTd53.js} +1 -1
- package/dist/assets/{status-BVh3qQZF.js → status-P5i7qkCz.js} +1 -1
- package/dist/assets/{step-actions-YQj43Dic.js → step-actions-DS32mD8U.js} +1 -1
- package/dist/assets/{studio-Dse7ZOUk.js → studio-eOX0BkA6.js} +1 -1
- package/dist/assets/{switch-wqsJ2qIA.js → switch-BEaA4jUC.js} +1 -1
- package/dist/assets/{switch-control-BDwQ53GS.js → switch-control-Cz02PQSr.js} +1 -1
- package/dist/assets/{table-tips-BEPJMiqj.js → table-tips-D04ygJ3S.js} +1 -1
- package/dist/assets/{team-CMLIpBpv.js → team-BDtQ1KMK.js} +1 -1
- package/dist/assets/{traffic-CMz6_p1P.js → traffic-8-96Vd63.js} +1 -1
- package/dist/assets/{transfer-ZsNcWxY6.js → transfer-Ctl7gLHf.js} +1 -1
- package/dist/assets/{unsubscribe-C6wQSJz0.js → unsubscribe-BdG3wOyd.js} +1 -1
- package/dist/assets/{use-app-logo-C6aWxAKK.js → use-app-logo-CSWr6R3N.js} +1 -1
- package/dist/assets/{use-window-close-edYntLdV.js → use-window-close-Dyba-7KK.js} +1 -1
- package/dist/assets/{useAsync-DOpjtrvS.js → useAsync-VEqKX7rF.js} +1 -1
- package/dist/assets/{useAsync-BSd-eaZO.js → useAsync-xXSiXzwr.js} +1 -1
- package/dist/assets/{useAsyncRetry-v1aVMcV-.js → useAsyncRetry--1T7wYe2.js} +1 -1
- package/dist/assets/{useLocalStorage-8LihN_xG.js → useLocalStorage-C6lmxNb2.js} +1 -1
- package/dist/assets/{user-center-CySi62qy.js → user-center-CnMx7tGr.js} +1 -1
- package/dist/assets/{user-follower-DaQ4cmnn.js → user-follower-DJYfIqdF.js} +1 -1
- package/dist/assets/{util-LZOTlX2w.js → util-B7Ad6Wyn.js} +1 -1
- package/dist/assets/{util-CQLL-C6x.js → util-CKkTy1Qb.js} +1 -1
- package/dist/assets/{vendor-arcblock-DRfhQ9Yl.js → vendor-arcblock-BwnwoPBM.js} +1 -1
- package/dist/assets/{vendor-hooks-DpqqC65c.js → vendor-hooks-cYMUGE4V.js} +1 -1
- package/dist/assets/{vendor-utils-BqKQizRf.js → vendor-utils-drLlzTVq.js} +1 -1
- package/dist/assets/{vendor-ux-KtPBvlG0.js → vendor-ux-B5w9dHEo.js} +3 -3
- package/dist/assets/{wait-connect-D-KXzGB8.js → wait-connect-BqfPKCyo.js} +1 -1
- package/dist/assets/{wizard-DplFy6RF.js → wizard-BVhYBjmA.js} +1 -1
- package/dist/assets/{wizard-components-D5SEvV5d.js → wizard-components-DL5NPso6.js} +1 -1
- package/dist/assets/wrap-locale-PrRlPUBM.js +1 -0
- package/dist/assets/{zh-BEQJoajM.js → zh-ChCVOElr.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +34 -34
- package/dist/assets/api-2a4FTO9k.js +0 -1
- package/dist/assets/branding-Beas39XM.js +0 -1
- package/dist/assets/config-CAG_E71y.js +0 -53
- package/dist/assets/dashboard-4ch_JDWe.js +0 -106
- package/dist/assets/domains-BdyK4uC-.js +0 -1
- package/dist/assets/engine-ChxMyLlO.js +0 -1
- package/dist/assets/get-safe-url-DhW3uplX.js +0 -1
- package/dist/assets/index-Csq5V3mf.js +0 -270
- package/dist/assets/localization-DNXKCjZt.js +0 -1
- package/dist/assets/logger-D3ELa8t7.js +0 -1
- package/dist/assets/passport-BpAOwZW1.js +0 -1
- package/dist/assets/profile-embed-B0Xzyt0-.js +0 -1
- package/dist/assets/runtime-CV7GMTXM.js +0 -1
- package/dist/assets/sdk-CfmFeEbO.js +0 -1
- package/dist/assets/wrap-locale-BkGdB3jW.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n,a6 as g,T as w,s as k,W as l}from"./vendor-mui-core-DnR6WYuU.js";import{r as j}from"./vendor-react-CTtPmzVP.js";import{C as A,n as E}from"./vendor-utils-
|
|
1
|
+
import{j as n,a6 as g,T as w,s as k,W as l}from"./vendor-mui-core-DnR6WYuU.js";import{r as j}from"./vendor-react-CTtPmzVP.js";import{C as A,n as E}from"./vendor-utils-drLlzTVq.js";import{u as I}from"./useAsync-VEqKX7rF.js";import{u as R,z as T,J as d,aF as C,a as P,l as L}from"./index-BlSveGp8.js";import{V as M,ar as S,H as U}from"./vendor-ux-B5w9dHEo.js";import{o as m}from"./vendor-arcblock-BwnwoPBM.js";import"./useAsync-xXSiXzwr.js";import"./vendor-hooks-cYMUGE4V.js";import"./lottie-web-4koyQiv_.js";function b({children:f,skipBindAccount:i=!1}){const{t:c,locale:y}=M(),{api:u,session:r}=R(),{encryptKey:h,decrypt:x}=T(),s=j.useMemo(()=>{if(i||!r.user)return!1;const{sourceProvider:e,connectedAccounts:o=[]}=r.user,a=o.every(v=>v.provider===d.LOGIN_PROVIDER.EMAIL);return e===d.LOGIN_PROVIDER.EMAIL&&a},[r.user,i]),t=I(async()=>{if(s)return null;const e=new URL(window.location.href);e.pathname=A(window?.env?.apiPrefix??"/","/api/did/setup/token"),e.searchParams.set("_ek_",h);const{data:o}=await u.get(e.href);return o},[s]),p=async e=>{const o=Array.isArray(e)?e.find(a=>a.sessionToken):e;o.sessionToken&&P(x(o.sessionToken));try{await r.refresh()}catch(a){U.error(a.message)}};return!s&&(!t.value||t.loading||r.loading)?n.jsx(m,{relative:"parent",children:n.jsx(g,{})}):!s&&t.error?n.jsx(m,{relative:"parent",children:n.jsx(w,{children:t.error.message})}):r.user&&!s?f:n.jsx(O,{popup:!0,open:!0,hideCloseButton:!0,action:s?"bind-wallet":"pre-setup",checkFn:u.get,checkTimeout:10*60*1e3,webWalletUrl:S(),onSuccess:p,locale:y,messages:{title:c("setup.connect.title"),scan:c("setup.connect.scan"),confirm:c("setup.connect.confirm"),success:c("setup.connect.success")},customItems:s?[n.jsx(C,{behavior:"only-new",action:"connect",createMode:"connect",onSuccess:p,onError:E,dense:!0},"passkey")]:[],extraParams:s?{previousUserDid:r.user?.did,visitorId:t.value?.visitorId,skipMigrateAccount:!0,isService:!0}:{setup:!0,nw:t.value.url}})}b.propTypes={children:l.any.isRequired,skipBindAccount:l.bool};const O=k(L)`
|
|
2
2
|
.action-info-desc {
|
|
3
3
|
padding: 0 72px;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./vendor-react-CTtPmzVP.js";import{V as x,R as S,H as f}from"./vendor-ux-
|
|
1
|
+
import{r as h}from"./vendor-react-CTtPmzVP.js";import{V as x,R as S,H as f}from"./vendor-ux-B5w9dHEo.js";import{c as w,b,a as I}from"./index-DQ-SL5-m.js";import{q as y,J as R,Y as E,Z as T,bI as P,bX as U}from"./index-BlSveGp8.js";import{j as t,ak as m,T as g,I as q,bO as B,W as r,cq as O}from"./vendor-mui-core-DnR6WYuU.js";import"./index-Cv24xb2K.js";import"./index-BojVbZw0.js";import{u as F}from"./config-space-Cung-olH.js";import{f as D}from"./index-DBs9Ljax.js";import{a as N,D as W,C as A}from"./vendor-utils-drLlzTVq.js";import"./api-C_w0YD2j.js";function K(){const{t:e}=x();return t.jsx(m,{children:t.jsxs(m,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center"},children:[t.jsx(w,{style:{width:250,height:250}}),t.jsx(g,{sx:{marginTop:"24px"},children:e("storage.spaces.connect.providerForStorage")})]})})}function j({spaceGateway:e,onDeleteSpace:c=()=>{}}){const{t:n}=x(),[a,l]=h.useState(!1),[o,d]=h.useState(!1),u=(s,p)=>{s?.stopPropagation(),l(p)},i=async s=>{try{s?.stopPropagation(),d(!0),await c(e),l(!1)}catch(p){console.error(p),f.error(`${n("storage.spaces.gateway.delete.failed")}: ${D(p)}`)}finally{d(!1)}};return t.jsxs(t.Fragment,{children:[t.jsx(q,{size:"small",onClick:s=>u(s,!0),children:t.jsx(B,{})}),t.jsx(S,{title:n("storage.spaces.gateway.delete.title"),open:a,confirmButton:{text:n("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:o}},cancelButton:{text:n("common.cancel"),props:{size:"small",variant:"outlined"}},onConfirm:i,onCancel:s=>u(s,!1),children:t.jsx(g,{sx:{wordWrap:"break-word"},children:n("storage.spaces.gateway.delete.descForStorage",{name:`${e?.name}`})})})]})}j.propTypes={onDeleteSpace:r.func,spaceGateway:r.shape({name:r.string.isRequired,url:r.string.isRequired,protected:r.bool}).isRequired};function C({spaceGateway:e,onDisconnect:c=()=>{}}){const{t:n}=x(),a=async()=>{try{await c(),f.success(n("storage.spaces.gateway.delete.succeeded",{name:e.name?`(${e.name})`:""}))}catch(l){console.error(l),f.error(D(l))}};return t.jsx(j,{spaceGateway:e,onDeleteSpace:a})}C.propTypes={spaceGateway:r.shape({did:r.string.isRequired,name:r.string.isRequired,url:r.string.isRequired,endpoint:r.string.isRequired}).isRequired,onDisconnect:r.func};function M(){const{t:e}=x(),{spaceGateway:c,settingStorageEndpoint:n}=F();return t.jsxs(m,{sx:{display:"flex",flexDirection:"column"},children:[t.jsx(m,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:t.jsx(g,{sx:{fontSize:"1rem",fontWeight:"bold"},children:e("storage.spaces.connected.title")})}),t.jsx(m,{children:t.jsx(b,{sx:{marginTop:2},endpoint:c.endpoint,selected:!0,action:a=>t.jsx(C,{...a,onDisconnect:()=>n(null)})})})]})}function $({blocklet:e}){if(N(e))return{};const{appDid:c}=e,n=y.getAppName(e),a=y.getAppDescription(e),o=e?.site?.domainAliases?.sort((i,s)=>i.accessibility.accessible&&s.accessibility.accessible?+i.isProtected-+s.isProtected:+s.accessibility.accessible-+i.accessibility.accessible)?.map(i=>{const s=i?.domainStatus?.isHttps?"https://":"http://",p=i?.value;return`${s}${p}`}).filter(Boolean)?.[0],d=R.DID_SPACES.AUTHORIZE.DEFAULT_SCOPE,u=window.location.href;return{appDid:c,appName:n,appDescription:a,appUrl:o,scopes:d,referrer:u,isReady:!!o}}function v({onConnect:e=()=>{},...c}){const{blocklet:n}=E(),{info:a}=T(),{t:l}=x(),o=$({blocklet:n}),d=P(a),u={checkFn:W.create({baseURL:A(window.location.origin,U())}).get,webWalletUrl:d,extraParams:{appPid:n.appPid,appDid:o.appDid,appName:o.appName,appDescription:o.appDescription,appUrl:o.appUrl,referrer:o.referrer,scopes:o.scopes,nodeDid:a.did}},i=async({spaceGateway:s})=>{try{await e(s),f.success(l("storage.spaces.connectedWithName",{name:s.name}))}catch(p){console.error(p),f.error(D(p))}};return t.jsx(I,{...c,options:u,onSuccess:i})}v.propTypes={onConnect:O.func};export{M as C,K as D,v as a,$ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as D,g as F}from"./vendor-react-CTtPmzVP.js";import{e as L}from"./vendor-arcblock-
|
|
1
|
+
import{e as D,g as F}from"./vendor-react-CTtPmzVP.js";import{e as L}from"./vendor-arcblock-BwnwoPBM.js";var s={exports:{}};const N=D(L);var l;function R(){if(l)return s.exports;l=1;const{getNftBGColor:g,DEFAULT_COLORS:u,getNftBGColorFromDid:v,getSvg:f}=N,n=(e,r)=>{let t;return e==="default"?t=u["app-passport"]:e==="auto"?t=v(r):t=g(e),t},m=e=>{const r=parseInt(e.slice(1,3),16),t=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return(.299*r+.587*t+.114*o)/255>.5?"#111":"#EEE"},x=({issuer:e="",title:r="",issuerDid:t="",issuerAvatarUrl:o="",ownerDid:p="",ownerName:C="",ownerAvatarUrl:P="",preferredColor:S="default",revoked:c=!1,isDataUrl:E=!1,width:d="100%",height:$="100%",extra:I=null,scope:a="passport",role:q=""})=>{const y=n(S,t),i=f({width:d,height:$,tag:c?"revoked":"",tagVariant:c?"error":"info",color:y,did:p,variant:`app-${a}`,verifiable:!0,issuer:{name:e,icon:o},header:{name:a==="passport"?r:C,icon:P},extra:a==="kyc"?{key:q,value:r}:I||{key:"Exp",value:"2123-01-01"}});return E?`data:image/svg+xml;utf8,${encodeURIComponent(i)}`:i};return s.exports=x,s.exports.getPassportColor=n,s.exports.getTextColor=m,s.exports}var T=R();const B=F(T);export{B as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dJ as u,dx as c}from"./vendor-mui-core-DnR6WYuU.js";import{bU as f,cq as s}from"./vendor-ux-
|
|
1
|
+
import{dJ as u,dx as c}from"./vendor-mui-core-DnR6WYuU.js";import{bU as f,cq as s}from"./vendor-ux-B5w9dHEo.js";function n(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function y(e,t){if(e){if(typeof e=="string")return n(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function b(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(e)}function d(e,t){if(t&&(f(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,s(o.key),o)}}function O(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}export{y as _,i as a,d as b,b as c,O as d,_ as e,n as f};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrVXX4fX.css"),window.__toCdnUrl("assets/index-gnjjKJuC.css"),window.__toCdnUrl("assets/add-component-core-G0iZE90Q.css")])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as i,W as y,aZ as Je,ak as j,D as V,J as ce,ah as et,ao as ts,bc as ns,I as tt,aj as os,at as nt,bE as Dn,bF as Tn,bG as An,am as Se,a6 as Z,bb as Be,bH as Gt,U as ie,aN as Mn,T as B,s as Pt,ar as ss,n as Ye,b6 as Rn,Y as Pn,bI as rs,bJ as is,bK as as,Q as St,bL as ls,bM as cs,bN as us,bO as ds,bP as fs,bQ as ps,bR as ms,bS as hs,bT as gs,bU as bs,aQ as xs,aR as vs,a3 as ys,M as ws,aO as Ss,aP as ks,bV as Cs,bW as js,bX as Qt,bY as Xt,be as _s}from"./vendor-mui-core-DnR6WYuU.js";import{r as p,u as On,g as Es,L as Ot,i as Is,a as Ls,m as Ds}from"./vendor-react-CTtPmzVP.js";import{Y as G,Z as F,c as T,l as Ts,q as $,_ as As,$ as Nn,Q as de,a0 as $n,a1 as Ms,a2 as Rs,a3 as Ps,a4 as Os,a5 as Ns,a6 as $s,a7 as Bs,a8 as Hs,a9 as Us,aa as zs,ab as ct,ac as Vs,ad as Fs,ae as Ws,u as Bn,G as Nt,y as ot,af as Ys,k as qs,ag as Ks,A as Jt,ah as en,v as Zs,x as Gs,E as Qs,C as ge,B as Xs,D as Js,P as er,J as He,ai as ut,h as tn,aj as tr,e as nr,ak as or,al as Hn,am as sr,V as nn,an as rr,ao as ir}from"./index-BlSveGp8.js";import{o as qe}from"./vendor-arcblock-BwnwoPBM.js";import{V as R,w as $t,H as J,aH as Un,aG as ar,aU as lr,aT as zn,z as pe,ag as cr,aV as ur,s as dr,u as fr,aW as pr,M as Vn,a0 as on,aX as mr,_ as I}from"./vendor-ux-B5w9dHEo.js";import{a as K,b as Fn,d as Bt,x as hr,q as gr}from"./vendor-hooks-cYMUGE4V.js";import{a6 as br,r as Wn,a7 as xr,i as vr,J as Yn,C as te,$ as yr,e as wr}from"./vendor-utils-drLlzTVq.js";import{u as st}from"./session-Cqrj8_SK.js";import{f as Ht}from"./index-DBs9Ljax.js";import{i as Sr,u as kr,M as Cr,a as jr,b as Ce,T as _r,N as Er}from"./team-BDtQ1KMK.js";import{D as Ir,u as ne}from"./useAsyncRetry--1T7wYe2.js";import{u as qn}from"./useSetState-L-f8mSga.js";import{x as Lr,d as Dr}from"./index-BQ5NNc-7.js";import"./zh-ChCVOElr.js";import{O as Tr}from"./over-due-invoice-payment-Bag2QJw8.js";import{u as sn}from"./useLocalStorage-C6lmxNb2.js";import{C as rn}from"./confirm-8-up_m-t.js";import{g as dt}from"./get-safe-url-dvWY0L5j.js";import{c as an}from"./passport-ksgWSkVe.js";import{g as Ar}from"./spaces-BAJFHyzr.js";const Kn=p.createContext({});function Zn({children:e,type:t="blocklets"}){const[n,s]=p.useState([]),o=p.useRef([]),r=c=>{if(!o.current.includes(c)){const u=[...o.current,c];s(u),o.current=u}},a=c=>{if(o.current.includes(c)){const u=o.current.filter(d=>d!==c);s(u),o.current=u}},l=c=>{const u=n.filter(f=>c.find(m=>m===f));br(u,n).forEach(f=>a(f))};return i.jsx(Kn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:r,removeDeletingDid:a,matchDeletingDid:l},children:e})}Zn.propTypes={type:y.string,children:y.node.isRequired};function fc(){return p.useContext(Kn)}const Mr=e=>{const t={};let n=null;return $.forEachBlockletSync(e,s=>{t[s.meta.bundleDid]?n=$.getDisplayName(s,!0):s.meta.bundleDid&&(t[s.meta.bundleDid]=!0)}),n},Rr=(e,t,n)=>{const{hostname:s,href:o}=e;if(!t)return o;if(n){const a=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(s);if(!a)return o;const l=a[0],u=((t.site?.domainAliases||[]).map(d=>d.value).filter(Boolean).find(d=>d.endsWith(T.DEFAULT_DID_DOMAIN))||"").replace(`.${T.DEFAULT_DID_DOMAIN}`,"");return u?o.replace(s,`${u}-${l}.${T.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Pr(){const{t:e}=R(),{api:t}=st(),{blocklet:n}=G(),{inService:s}=F(),[o,r]=p.useState(!1),[a,l]=p.useState(5),c=n&&n.structVersion!==T.APP_STRUCT_VERSION,u=()=>{try{if($.isBlockletRunning(n)){J.error(e("blocklet.migrate.tip.running"));return}const m=Mr(n);if(m){J.error(e("blocklet.migrate.tip.duplicate",{name:m}));return}r(!0)}catch(m){J.error(Ht(m))}},d=()=>{const m=Rr(window.location,n,s);setTimeout(()=>{window.location.href=m},5e3),l(5),setInterval(()=>{l(g=>g-1)},1e3)},f=()=>r(!1);return[c&&i.jsxs(Je,{severity:"warning",style:{margin:"12px 0"},children:[i.jsxs(j,{sx:{display:"flex",alignItems:"center"},children:[i.jsx($t,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),i.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(m=>i.jsx(j,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${m}`)},m))]},"alert"),n&&i.jsx(Ts,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:As(n,!0),title:$.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:f},"connect")]}function Or(){const e=V();return[...e.breakpoints.keys].reverse().reduce((n,s)=>{const o=ce(e.breakpoints.up(s));return!n&&o?s:n},null)||"xs"}function Nr(e){return i.jsx(et,{...e,children:i.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function $r(e){return i.jsx(et,{...e,children:i.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Br(e){return i.jsx(et,{...e,children:i.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function Hr(e){return i.jsx(et,{...e,children:i.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const Re={fontSize:20,marginInlineEnd:8},Ur={success:i.jsx(Nr,{style:Re}),warning:i.jsx($r,{style:Re}),error:i.jsx(Br,{style:Re}),info:i.jsx(Hr,{style:Re})},zr={xl:"400px",lg:"400px",md:"400px",sm:"300px"};function Gn({keyId:e,notification:t={},viewAllUrl:n,content:s=null},o){const r=V(),a=Ur[t.severity],{closeSnackbar:l}=Un(),c=()=>l(e),u=On(),d=()=>{l(e),u(n)},f=K(()=>Sr(t),[t]),m=K(()=>t?.activity,[t]),g=kr({activity:m,users:[t?.actorInfo],actors:[t?.activity?.actor],extra:{linkColor:r.palette.primary.main,userDid:t?.receivers?.[0]?.did}}),h=Or();return i.jsxs(j,{component:ar,ref:o,sx:[{...r.typography.body2,display:"flex",backgroundColor:r.palette.background.default,color:"#fff",alignItems:"center",pl:2.5,pr:2,py:.75,borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)",width:zr[h]},t.severity==="success"?{backgroundColor:`${ts[600]} !important`}:{},t.severity==="error"?{backgroundColor:`${r.palette.error.dark} !important`}:{},t.severity==="info"?{backgroundColor:`${r.palette.primary.main} !important`}:{},t.severity==="warning"?{backgroundColor:`${ns[700]} !important`}:{}],children:[i.jsxs(j,{sx:{display:"flex",alignItems:"center",py:1,flex:1},children:[a,i.jsx(Fr,{onClick:d,sx:{flex:1},children:i.jsx(j,{children:f?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"title",children:g}),m.meta?i.jsx(Cr,{meta:m.meta,type:m.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"title",children:t.title}),s||i.jsx("span",{className:"desc",children:t.description})]})})})]}),i.jsx(j,{sx:{display:"flex",alignItems:"center",ml:"auto",mr:-1,width:44},children:i.jsx(tt,{"aria-label":"close",color:"inherit",onClick:c,size:"large",children:i.jsx(j,{component:os,sx:{fontSize:20}})},"close")})]})}const Vr=p.forwardRef(Gn);Gn.propTypes={viewAllUrl:y.string.isRequired,keyId:y.number.isRequired,notification:y.object.isRequired,content:y.node};const Fr=nt.div`
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
.title {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
text-overflow: ellipsis;
|
|
9
|
+
display: -webkit-box;
|
|
10
|
+
-webkit-line-clamp: 2;
|
|
11
|
+
-webkit-box-orient: vertical;
|
|
12
|
+
font-weight: bold;
|
|
13
|
+
}
|
|
14
|
+
.desc {
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
display: -webkit-box;
|
|
18
|
+
-webkit-line-clamp: 3;
|
|
19
|
+
-webkit-box-orient: vertical;
|
|
20
|
+
word-break: break-word;
|
|
21
|
+
}
|
|
22
|
+
`;var D=function(t,n,s){return Dn.call(n,"css")?i.jsx(Tn,An(t,n),s):i.jsx(t,n,s)},Pe=function(t,n,s){return Dn.call(n,"css")?i.jsxs(Tn,An(t,n),s):i.jsxs(t,n,s)};/**
|
|
23
|
+
* (c) Iconify
|
|
24
|
+
*
|
|
25
|
+
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
26
|
+
* files at https://github.com/iconify/iconify
|
|
27
|
+
*
|
|
28
|
+
* Licensed under MIT.
|
|
29
|
+
*
|
|
30
|
+
* @license MIT
|
|
31
|
+
* @version 3.1.1
|
|
32
|
+
*/const Qn=Object.freeze({left:0,top:0,width:16,height:16}),Ke=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),je=Object.freeze({...Qn,...Ke}),kt=Object.freeze({...je,body:"",hidden:!1});function Wr(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const s=((e.rotate||0)+(t.rotate||0))%4;return s&&(n.rotate=s),n}function ln(e,t){const n=Wr(e,t);for(const s in kt)s in Ke?s in e&&!(s in n)&&(n[s]=Ke[s]):s in t?n[s]=t[s]:s in e&&(n[s]=e[s]);return n}function Yr(e,t){const n=e.icons,s=e.aliases||Object.create(null),o=Object.create(null);function r(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=s[a]&&s[a].parent,c=l&&r(l);c&&(o[a]=[l].concat(c))}return o[a]}return Object.keys(n).concat(Object.keys(s)).forEach(r),o}function qr(e,t,n){const s=e.icons,o=e.aliases||Object.create(null);let r={};function a(l){r=ln(s[l]||o[l],r)}return a(t),n.forEach(a),ln(e,r)}function Kr(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const s=Yr(e);for(const o in s){const r=s[o];r&&(t(o,qr(e,o,r)),n.push(o))}return n}const ve=/^[a-z0-9]+(-[a-z0-9]+)*$/,me=(e,t,n,s="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),c=o.pop(),u={provider:o.length>0?o[0]:s,prefix:c,name:l};return t&&!Ue(u)?null:u}const r=o[0],a=r.split("-");if(a.length>1){const l={provider:s,prefix:a.shift(),name:a.join("-")};return t&&!Ue(l)?null:l}if(n&&s===""){const l={provider:s,prefix:"",name:r};return t&&!Ue(l,n)?null:l}return null},Ue=(e,t)=>e?!!((e.provider===""||e.provider.match(ve))&&(t&&e.prefix===""||e.prefix.match(ve))&&e.name.match(ve)):!1,Zr={provider:"",aliases:{},not_found:{},...Qn};function ft(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Gr(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ft(e,Zr))return null;const n=t.icons;for(const o in n){const r=n[o];if(!o.match(ve)||typeof r.body!="string"||!ft(r,kt))return null}const s=t.aliases||Object.create(null);for(const o in s){const r=s[o],a=r.parent;if(!o.match(ve)||typeof a!="string"||!n[a]&&!s[a]||!ft(r,kt))return null}return t}const Ze=Object.create(null);function Qr(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function z(e,t){const n=Ze[e]||(Ze[e]=Object.create(null));return n[t]||(n[t]=Qr(e,t))}function Ut(e,t){return Gr(t)?Kr(t,(n,s)=>{s?e.icons[n]=s:e.missing.add(n)}):[]}function Xr(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function Jr(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Ze)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Ze[o]||{})).forEach(a=>{const l=z(o,a);n=n.concat(Object.keys(l.icons).map(c=>(o!==""?"@"+o+":":"")+a+":"+c))})}),n}let zt=!1;function ei(e){return zt}function _e(e){const t=typeof e=="string"?me(e,!0,zt):e;if(t){const n=z(t.provider,t.prefix),s=t.name;return n.icons[s]||(n.missing.has(s)?null:void 0)}}function ti(e,t){const n=me(e,!0,zt);if(!n)return!1;const s=z(n.provider,n.prefix);return Xr(s,n.name,t)}function Xn(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Ue({provider:t,prefix:n,name:"a"}))return!1;const s=z(t,n);return!!Ut(s,e)}function ni(e){return!!_e(e)}function oi(e){const t=_e(e);return t?{...je,...t}:null}const Jn=Object.freeze({width:null,height:null}),eo=Object.freeze({...Jn,...Ke}),si=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ri=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ct(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const s=e.split(si);if(s===null||!s.length)return e;const o=[];let r=s.shift(),a=ri.test(r);for(;;){if(a){const l=parseFloat(r);isNaN(l)?o.push(r):o.push(Math.ceil(l*t*n)/n)}else o.push(r);if(r=s.shift(),r===void 0)return o.join("");a=!a}}const ii=e=>e==="unset"||e==="undefined"||e==="none";function rt(e,t){const n={...je,...e},s={...eo,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,s].forEach(h=>{const x=[],b=h.hFlip,k=h.vFlip;let v=h.rotate;b?k?v+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):k&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let C;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:C=o.height/2+o.top,x.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:C=o.width/2+o.left,x.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}v%2===1&&(o.left!==o.top&&(C=o.left,o.left=o.top,o.top=C),o.width!==o.height&&(C=o.width,o.width=o.height,o.height=C)),x.length&&(r='<g transform="'+x.join(" ")+'">'+r+"</g>")});const a=s.width,l=s.height,c=o.width,u=o.height;let d,f;a===null?(f=l===null?"1em":l==="auto"?u:l,d=Ct(f,c/u)):(d=a==="auto"?c:a,f=l===null?Ct(d,u/c):l==="auto"?u:l);const m={},g=(h,x)=>{ii(x)||(m[h]=x.toString())};return g("width",d),g("height",f),m.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:m,body:r}}const ai=/\sid="(\S+)"/g,li="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ci=0;function to(e,t=li){const n=[];let s;for(;s=ai.exec(e);)n.push(s[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(r=>{const a=typeof t=="function"?t(r):t+(ci++).toString(),l=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const ae={local:!0,session:!0},no={local:new Set,session:new Set};let Vt=!1;function ui(e){Vt=e}const cn="iconify2",ke="iconify",oo=ke+"-count",un=ke+"-version",so=36e5,di=168;function jt(e,t){try{return e.getItem(t)}catch{}}function Ft(e,t,n){try{return e.setItem(t,n),!0}catch{}}function dn(e,t){try{e.removeItem(t)}catch{}}function _t(e,t){return Ft(e,oo,t.toString())}function Et(e){return parseInt(jt(e,oo))||0}let Oe=typeof window>"u"?{}:window;function ro(e){const t=e+"Storage";try{if(Oe&&Oe[t]&&typeof Oe[t].length=="number")return Oe[t]}catch{}ae[e]=!1}function io(e,t){const n=ro(e);if(!n)return;const s=jt(n,un);if(s!==cn){if(s){const l=Et(n);for(let c=0;c<l;c++)dn(n,ke+c.toString())}Ft(n,un,cn),_t(n,0);return}const o=Math.floor(Date.now()/so)-di,r=l=>{const c=ke+l.toString(),u=jt(n,c);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,l))return!0}catch{}dn(n,c)}};let a=Et(n);for(let l=a-1;l>=0;l--)r(l)||(l===a-1?(a--,_t(n,a)):no[e].add(l))}function ao(){if(!Vt){ui(!0);for(const e in ae)io(e,t=>{const n=t.data,s=t.provider,o=n.prefix,r=z(s,o);if(!Ut(r,n).length)return!1;const a=n.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,a):a,!0})}}function lo(e,t){switch(e){case"local":case"session":ae[e]=t;break;case"all":for(const n in ae)ae[n]=t;break}}const It=Object.create(null);function co(e,t){It[e]=t}function Lt(e){return It[e]||It[""]}function Wt(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const it=Object.create(null),be=["https://api.simplesvg.com","https://api.unisvg.com"],ze=[];for(;be.length>0;)be.length===1||Math.random()>.5?ze.push(be.shift()):ze.push(be.pop());it[""]=Wt({resources:["https://api.iconify.design"].concat(ze)});function uo(e,t){const n=Wt(t);return n===null?!1:(it[e]=n,!0)}function at(e){return it[e]}function fi(){return Object.keys(it)}const pi=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ge=pi();function mi(e){Ge=e}function hi(){return Ge}function gi(e,t){const n=at(e);if(!n)return 0;let s;if(!n.maxURL)s=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const r=t+".json?icons=";s=n.maxURL-o-n.path.length-r.length}return s}function bi(e){return e===404}const xi=(e,t,n)=>{const s=[],o=gi(e,t),r="icons";let a={type:r,provider:e,prefix:t,icons:[]},l=0;return n.forEach((c,u)=>{l+=c.length+1,l>=o&&u>0&&(s.push(a),a={type:r,provider:e,prefix:t,icons:[]},l=c.length),a.icons.push(c)}),s.push(a),s};function vi(e){if(typeof e=="string"){const t=at(e);if(t)return t.path}return"/"}const yi=(e,t,n)=>{if(!Ge){n("abort",424);return}let s=vi(t.provider);switch(t.type){case"icons":{const r=t.prefix,l=t.icons.join(","),c=new URLSearchParams({icons:l});s+=r+".json?"+c.toString();break}case"custom":{const r=t.uri;s+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let o=503;Ge(e+s).then(r=>{const a=r.status;if(a!==200){setTimeout(()=>{n(bi(a)?"abort":"next",a)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?n("abort",r):n("next",o)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",o)})},wi={prepare:xi,send:yi};function Si(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let s={provider:"",prefix:"",name:""};return e.forEach(o=>{if(s.name===o.name&&s.prefix===o.prefix&&s.provider===o.provider)return;s=o;const r=o.provider,a=o.prefix,l=o.name,c=n[r]||(n[r]=Object.create(null)),u=c[a]||(c[a]=z(r,a));let d;l in u.icons?d=t.loaded:a===""||u.missing.has(l)?d=t.missing:d=t.pending;const f={provider:r,prefix:a,name:l};d.push(f)}),t}function fo(e,t){e.forEach(n=>{const s=n.loaderCallbacks;s&&(n.loaderCallbacks=s.filter(o=>o.id!==t))})}function ki(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const s=e.provider,o=e.prefix;t.forEach(r=>{const a=r.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==o)return!0;const u=c.name;if(e.icons[u])a.loaded.push({provider:s,prefix:o,name:u});else if(e.missing.has(u))a.missing.push({provider:s,prefix:o,name:u});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||fo([e],r.id),r.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),r.abort))})}))}let Ci=0;function ji(e,t,n){const s=Ci++,o=fo.bind(null,n,s);if(!t.pending.length)return o;const r={id:s,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(r)}),o}function _i(e,t=!0,n=!1){const s=[];return e.forEach(o=>{const r=typeof o=="string"?me(o,t,n):o;r&&s.push(r)}),s}var Ei={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ii(e,t,n,s){const o=e.resources.length,r=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let S=e.resources.slice(0);for(a=[];S.length>1;){const _=Math.floor(Math.random()*S.length);a.push(S[_]),S=S.slice(0,_).concat(S.slice(_+1))}a=a.concat(S)}else a=e.resources.slice(r).concat(e.resources.slice(0,r));const l=Date.now();let c="pending",u=0,d,f=null,m=[],g=[];typeof s=="function"&&g.push(s);function h(){f&&(clearTimeout(f),f=null)}function x(){c==="pending"&&(c="aborted"),h(),m.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),m=[]}function b(S,_){_&&(g=[]),typeof S=="function"&&g.push(S)}function k(){return{startTime:l,payload:t,status:c,queriesSent:u,queriesPending:m.length,subscribe:b,abort:x}}function v(){c="failed",g.forEach(S=>{S(void 0,d)})}function C(){m.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),m=[]}function L(S,_,A){const O=_!=="success";switch(m=m.filter(E=>E!==S),c){case"pending":break;case"failed":if(O||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){d=A,v();return}if(O){d=A,m.length||(a.length?P():v());return}if(h(),C(),!e.random){const E=e.resources.indexOf(S.resource);E!==-1&&E!==e.index&&(e.index=E)}c="completed",g.forEach(E=>{E(A)})}function P(){if(c!=="pending")return;h();const S=a.shift();if(S===void 0){if(m.length){f=setTimeout(()=>{h(),c==="pending"&&(C(),v())},e.timeout);return}v();return}const _={status:"pending",resource:S,callback:(A,O)=>{L(_,A,O)}};m.push(_),u++,f=setTimeout(P,e.rotate),n(S,t,_.callback)}return setTimeout(P),k}function po(e){const t={...Ei,...e};let n=[];function s(){n=n.filter(l=>l().status==="pending")}function o(l,c,u){const d=Ii(t,l,c,(f,m)=>{s(),u&&u(f,m)});return n.push(d),d}function r(l){return n.find(c=>l(c))||null}return{query:o,find:r,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:s}}function fn(){}const pt=Object.create(null);function Li(e){if(!pt[e]){const t=at(e);if(!t)return;const n=po(t),s={config:t,redundancy:n};pt[e]=s}return pt[e]}function mo(e,t,n){let s,o;if(typeof e=="string"){const r=Lt(e);if(!r)return n(void 0,424),fn;o=r.send;const a=Li(e);a&&(s=a.redundancy)}else{const r=Wt(e);if(r){s=po(r);const a=e.resources?e.resources[0]:"",l=Lt(a);l&&(o=l.send)}}return!s||!o?(n(void 0,424),fn):s.query(t,o,n)().abort}function Di(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const s in ae)io(s,o=>{const r=o.data;return o.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===t});return!0}function Ti(e,t){Vt||ao();function n(s){let o;if(!ae[s]||!(o=ro(s)))return;const r=no[s];let a;if(r.size)r.delete(a=Array.from(r).shift());else if(a=Et(o),!_t(o,a+1))return;const l={cached:Math.floor(Date.now()/so),provider:e.provider,data:t};return Ft(o,ke+a.toString(),JSON.stringify(l))}t.lastModified&&!Di(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function pn(){}function Ai(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ki(e)}))}function Mi(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:s}=e,o=e.iconsToLoad;delete e.iconsToLoad;let r;if(!o||!(r=Lt(n)))return;r.prepare(n,s,o).forEach(l=>{mo(n,l,c=>{if(typeof c!="object")l.icons.forEach(u=>{e.missing.add(u)});else try{const u=Ut(e,c);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),Ti(e,c)}catch(u){console.error(u)}Ai(e)})})}))}const Ri=e=>{const n=z(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Yt=(e,t)=>{const n=_i(e,!0,ei()),s=Si(n);if(!s.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(s.loaded,s.missing,s.pending,pn)}),()=>{c=!1}}const o=Object.create(null),r=[];let a,l;return s.pending.forEach(c=>{const{provider:u,prefix:d}=c;if(d===l&&u===a)return;a=u,l=d,r.push(z(u,d));const f=o[u]||(o[u]=Object.create(null));f[d]||(f[d]=[])}),s.pending.forEach(c=>{const{provider:u,prefix:d,name:f}=c,m=z(u,d),g=m.pendingIcons||(m.pendingIcons=new Set);g.has(f)||(g.add(f),o[u][d].push(f))}),r.forEach(c=>{const{provider:u,prefix:d}=c;o[u][d].length&&Mi(c,o[u][d])}),t?ji(t,s,r):pn},Pi=e=>new Promise((t,n)=>{const s=typeof e=="string"?me(e,!0):e;if(!s){n(e);return}Yt([s||e],o=>{if(o.length&&s){const r=_e(s);if(r){t({...je,...r});return}}n(e)})});function ho(e,t){const n={...e};for(const s in t){const o=t[s],r=typeof o;s in Jn?(o===null||o&&(r==="string"||r==="number"))&&(n[s]=o):r===typeof n[s]&&(n[s]=s==="rotate"?o%4:o)}return n}const lt={...eo,inline:!1},mt="iconify",Dt="iconify-inline",oe="iconifyData"+Date.now();let le=[];function Ee(e){for(let t=0;t<le.length;t++){const n=le[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function go(e,t=!1){let n=Ee(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},le.push(n),n)}function Oi(){if(document.documentElement)return go(document.documentElement);le.push({node:()=>document.documentElement})}function Ni(e){le=le.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Ie(){return le}function $i(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let ye=null;const Bi={childList:!0,subtree:!0,attributes:!0};function bo(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,ye&&ye(e)}))}function Hi(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let s=0;s<t.length;s++){const o=t[s];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[oe]!==void 0){n.paused||bo(e);return}}}function xo(e,t){e.observer.instance.observe(t,Bi)}function Qe(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Hi.bind(null,e)),xo(e,n),t.paused||bo(e))}function mn(){Ie().forEach(Qe)}function vo(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ui(e){const t=ye!==null;if(ye!==e&&(ye=e,t&&Ie().forEach(vo)),t){mn();return}$i(mn)}function Tt(e){(e?[e]:Ie()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function zi(e){if(e){const t=Ee(e);t&&Tt(t)}else Tt()}function At(e){(e?[e]:Ie()).forEach(t=>{if(!t.observer){Qe(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const s=typeof t.node=="function"?t.node():t.node;if(s)n.instance?xo(t,s):Qe(t);else return}})}function Vi(e){if(e){const t=Ee(e);t&&At(t)}else At()}function yo(e,t=!1){const n=go(e,t);return Qe(n),n}function wo(e){const t=Ee(e);t&&(vo(t),Ni(e))}function Fi(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,s=t.customisations;for(const o in lt)if(n[o]!==s[o])return!0;return!1}function Wi(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function s(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:s(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(e.slice(0,e.length-n.length));return isNaN(r)?0:(r=r/o,r%1===0?s(r):0)}}return t}const Yi=/[\s,]+/;function qi(e,t){t.split(Yi).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Ki=["width","height"],Zi=["inline","hFlip","vFlip"];function Gi(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function Qi(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&me(t,!0);if(!n)return null;const s={...lt,inline:e.classList&&e.classList.contains(Dt)};Ki.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(s[l]=c)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(s.rotate=Wi(o));const r=e.getAttribute("data-flip");typeof r=="string"&&qi(s,r),Zi.forEach(l=>{const c="data-"+l,u=Gi(e.getAttribute(c),c);typeof u=="boolean"&&(s[l]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:s,mode:a}}const Xi="svg."+mt+", i."+mt+", span."+mt+", i."+Dt+", span."+Dt;function Ji(e){const t=[];return e.querySelectorAll(Xi).forEach(n=>{const s=n[oe]||n.tagName.toLowerCase()!=="svg"?Qi(n):null;s&&t.push({node:n,props:s})}),t}function So(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in t)n+=" "+s+'="'+t[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let we;function ea(){try{we=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{we=null}}function ta(e){return we===void 0&&ea(),we?we.createHTML(e):e}function ko(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Co(e,t,n,s){const o=e.classList;if(s){const a=s.classList;Array.from(a).forEach(l=>{o.add(l)})}const r=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&r.push(a):(o.add(a),r.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),r}function jo(e,t,n){const s=e.style;(n||[]).forEach(r=>{s.removeProperty(r)});const o=[];for(const r in t)s.getPropertyValue(r)||(o.push(r),s.setProperty(r,t[r]));return o}function _o(e,t,n){let s;try{s=document.createElement("span")}catch{return e}const o=t.customisations,r=rt(n,o),a=e[oe],l=So(to(r.body),{"aria-hidden":"true",role:"img",...r.attributes});s.innerHTML=ta(l);const c=s.childNodes[0],u=e.attributes;for(let h=0;h<u.length;h++){const x=u.item(h),b=x.name;b!=="class"&&!c.hasAttribute(b)&&c.setAttribute(b,x.value)}const d=ko(t.icon),f=Co(c,d,new Set(a&&a.addedClasses),e),m=jo(c,o.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),g={...t,status:"loaded",addedClasses:f,addedStyles:m};return c[oe]=g,e.parentNode&&e.parentNode.replaceChild(c,e),c}function na(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function oa(e){return"data:image/svg+xml,"+na(e)}function sa(e){return'url("'+oa(e)+'")'}const ra={display:"inline-block"},Mt={"background-color":"currentColor"},Eo={"background-color":"transparent"},hn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},gn={"-webkit-mask":Mt,mask:Mt,background:Eo};for(const e in gn){const t=gn[e];for(const n in hn)t[e+"-"+n]=hn[n]}function bn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function ia(e,t,n,s){const o=t.customisations,r=rt(n,o),a=r.attributes,l=e[oe],c=So(r.body,{...a,width:n.width+"",height:n.height+""}),u=ko(t.icon),d=Co(e,u,new Set(l&&l.addedClasses)),m={"--svg":sa(c),width:bn(a.width),height:bn(a.height),...ra,...s?Mt:Eo};o.inline&&(m["vertical-align"]="-0.125em");const g=jo(e,m,l&&l.addedStyles),h={...t,status:"loaded",addedClasses:d,addedStyles:g};return e[oe]=h,e}let Ne=!1;function aa(){Ne||(Ne=!0,setTimeout(()=>{Ne&&(Ne=!1,fe())}))}function fe(e,t=!1){const n=Object.create(null);function s(o,r){const{provider:a,prefix:l,name:c}=o,u=z(a,l),d=u.icons[c];if(d)return{status:"loaded",icon:d};if(u.missing.has(c))return{status:"missing"};if(r&&!Ri(o)){const f=n[a]||(n[a]=Object.create(null));(f[l]||(f[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:Ie()).forEach(o=>{const r=typeof o.node=="function"?o.node():o.node;if(!r||!r.querySelectorAll)return;let a=!1,l=!1;function c(u,d,f){if(l||(l=!0,Tt(o)),u.tagName.toUpperCase()!=="SVG"){const m=d.mode,g=m==="mask"||(m==="bg"?!1:m==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof g=="boolean"){ia(u,d,{...je,...f},g);return}}_o(u,d,f)}Ji(r).forEach(({node:u,props:d})=>{const f=u[oe];if(!f){const{status:g,icon:h}=s(d.icon,!0);if(h){c(u,d,h);return}a=a||g==="loading",u[oe]={...d,status:g};return}let m;if(Fi(f,d)){if(m=s(d.icon,f.name!==d.name),!m.icon){a=a||m.status==="loading",Object.assign(f,{...d,status:m.status});return}}else{if(f.status!=="loading")return;if(m=s(d.icon,!1),!m.icon){f.status=m.status;return}}c(u,d,m.icon)}),o.temporary&&!a?wo(r):t&&a?yo(r,!0):l&&o.observer&&At(o)});for(const o in n){const r=n[o];for(const a in r){const l=r[a];Yt(Array.from(l).map(c=>({provider:o,prefix:a,name:c})),aa)}}}function la(e){const t=Ee(e);t?fe(t):fe({node:e,temporary:!0},!0)}function Io(e,t,n=!1){const s=_e(e);if(!s)return null;const o=me(e),r=ho(lt,t||{}),a=_o(document.createElement("span"),{name:e,icon:o,customisations:r},s);return n?a.outerHTML:a}function ca(){return"3.1.1"}function ua(e,t){return Io(e,t,!1)}function da(e,t){return Io(e,t,!0)}function fa(e,t){const n=_e(e);if(!n)return null;const s=ho(lt,t||{});return rt(n,s)}function pa(e){e?la(e):fe()}if(typeof document<"u"&&typeof window<"u"){Oi();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!Xn(s))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Ui(fe),fe()})}function ma(e,t){lo(e,t!==!1)}function ha(e){lo(e,!0)}co("",wi);if(typeof document<"u"&&typeof window<"u"){ao();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const s="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;uo(n,o)||console.error(s)}catch{console.error(s)}}}}const ga={getAPIConfig:at,setAPIModule:co,sendAPIQuery:mo,setFetch:mi,getFetch:hi,listAPIProviders:fi},ba={_api:ga,addAPIProvider:uo,loadIcons:Yt,loadIcon:Pi,iconExists:ni,getIcon:oi,listIcons:Jr,addIcon:ti,addCollection:Xn,replaceIDs:to,calculateSize:Ct,buildIcon:rt,getVersion:ca,renderSVG:ua,renderHTML:da,renderIcon:fa,scan:pa,observe:yo,stopObserving:wo,pauseObserver:zi,resumeObserver:Vi,enableCache:ma,disableCache:ha};try{self.Iconify===void 0&&(self.Iconify=ba)}catch{}function Lo({children:e,style:t={},...n}){return i.jsx(lr,{style:t,...n,children:e})}Lo.propTypes={children:y.any.isRequired,style:y.object};const N={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},Ve={added:N.grey,waiting:N.yellow,downloading:N.yellow,extracting:N.yellow,downloaded:N.grey,installing:N.yellow,installed:N.grey,starting:N.yellow,running:N.running,stopping:N.yellow,stopped:N.reverse,error:N.error,upgrading:N.yellow,restarting:N.yellow,corrupted:N.error,deleting:N.yellow,resource:N.primary},xn={added:"primary",waiting:"info",downloading:"info",extracting:"info",downloaded:"primary",installing:"info",installed:"primary",starting:"info",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"info",restarting:"info",corrupted:"error",deleting:"warning",resource:"primary"};function Do({isResource:e=!1,status:t,variant:n="tag",progress:s=0,tip:o="",...r}){const{t:a}=p.useContext(zn),l=$.isInProgress(t);let c=e&&t==="stopped"?"resource":t;xn[c]||(c="installed");const u=a(`blocklet.status.${c}`);return n==="pin"?i.jsx(Se,{title:a("blocklet.statusTip",{status:u}),children:i.jsxs(j,{...r,sx:[{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:[i.jsx(j,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Ve[c]}}),i.jsx(j,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Ve[c]}})]})}):n==="dot"?i.jsx(Se,{title:a("blocklet.statusTip",{status:u}),children:i.jsx(Ir,{color:Ve[c],...r})}):i.jsxs(Lo,{type:xn[c],...r,children:[l&&i.jsx(Z,{size:12,color:"inherit",style:{marginRight:5}}),u,o&&i.jsx("span",{style:{marginLeft:5},children:o}),c==="downloading"&&s?i.jsx("div",{style:{marginLeft:5},children:`${s} %`}):null]})}Do.propTypes={status:y.string.isRequired,variant:y.oneOf(["dot","tag","pin"]),source:y.string,progress:y.number,isResource:y.bool,tip:y.string};function To({infos:e=[]}){const{t}=R(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const s=e.map(o=>`* ${o.label}: ${o.value}`).join(`
|
|
33
|
+
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<!--
|
|
38
|
+
[Server Info]
|
|
39
|
+
${s}
|
|
40
|
+
* Page: ${window.location.href}
|
|
41
|
+
-->
|
|
42
|
+
`),D(j,{sx:{mx:{xs:0,md:2}},children:D(Be,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}To.propTypes={infos:y.arrayOf(y.shape({label:y.string,value:y.string}))};var ht,vn;function xa(){return vn||(vn=1,ht={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}}),ht}var gt,yn;function va(){return yn||(yn=1,gt={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}}),gt}var bt,wn;function Ao(){if(wn)return bt;wn=1;const e=new Map;return bt={registerLang:(s,o)=>{e.set(s,o)},getLang:(s="en_US")=>e.get(s)||e.get("en_US")},bt}var xt,Sn;function ya(){return Sn||(Sn=1,xt=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}),xt}var vt,kn;function wa(){if(kn)return vt;kn=1;const e=ya(),{getLang:t}=Ao(),n=(o,r)=>r===1?o:`${o}s`,s=1e-7;return vt=(o,r={})=>{if(!Number.isFinite(o))throw new TypeError("Expected a finite number");r.colonNotation&&(r.compact=!1,r.formatSubMilliseconds=!1,r.separateMilliseconds=!1,r.verbose=!1),r.compact&&(r.secondsDecimalDigits=0,r.millisecondsDecimalDigits=0);const a=t(r.locale),l=[],c=(f,m)=>{const g=Math.floor(f*10**m+s);return(Math.round(g)/10**m).toFixed(m)},u=(f,m,g)=>{if((l.length===0||!r.colonNotation)&&f===0&&!(r.colonNotation&&m==="minute"))return;const{long:h}=a[m]||t("en_US")[m],{short:x}=a[m]||t("en_US")[m];let b=(g||f||"0").toString(),k,v;if(r.colonNotation){k=l.length>0?":":"",v="";const C=b.includes(".")?b.split(".")[0].length:b.length,L=l.length>0?2:1;b="0".repeat(Math.max(0,L-C))+b}else k="",r.locale==="zh_CN"?Object.values(d).filter(C=>C>0).length>1?!d.days&&!d.hours&&d.minutes&&r.compact?v=h:v=x:d.minutes?v=h:v=x:v=r.verbose?` ${n(h,f)}`:x;l.push(k+b+v)},d=e(o);if(u(Math.trunc(d.days/365),"year"),u(d.days%365,"day"),u(d.hours,"hour"),u(d.minutes,"minute"),r.separateMilliseconds||r.formatSubMilliseconds||!r.colonNotation&&o<1e3)if(u(d.seconds,"second"),r.formatSubMilliseconds)u(d.milliseconds,"millisecond"),u(d.microseconds,"microsecond"),u(d.nanoseconds,"nanosecond");else{const f=d.milliseconds+d.microseconds/1e3+d.nanoseconds/1e6,m=typeof r.millisecondsDecimalDigits=="number"?r.millisecondsDecimalDigits:0,g=f>=1?Math.round(f):Math.ceil(f),h=m?f.toFixed(m):g;u(Number.parseFloat(h,10),"millisecond",h)}else{const f=o/1e3%60,m=typeof r.secondsDecimalDigits=="number"?r.secondsDecimalDigits:1,g=c(f,m),h=r.keepDecimalsOnWholeSeconds?g:g.replace(/\.0+$/,"");u(Number.parseFloat(h,10),"second",h)}if(l.length===0){const f=(a.millisecond||t("en_US").millisecond).long,m=(a.millisecond||t("en_US").millisecond).short;return r.locale==="zh_CN"?`0${r.verbose?`${f}`:m}`:`0${r.verbose?` ${f}s`:m}`}if(r.compact)return l[0];if(typeof r.unitCount=="number"){const f=r.colonNotation?"":" ";return l.slice(0,Math.max(r.unitCount,1)).join(f)}return r.colonNotation?l.join(""):l.join(" ")},vt}var yt,Cn;function Sa(){if(Cn)return yt;Cn=1;const e=xa(),t=va(),{registerLang:n}=Ao(),s=wa();return n("en_US",e),n("zh_CN",t),s.registerLang=n,yt=s,yt}var ka=Sa();const Mo=Es(ka);function ee({children:e}){return ce(n=>n.breakpoints.down("md"))?i.jsx(Se,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:i.jsx(j,{sx:{display:"flex",alignItems:"center",gap:1},children:i.jsx(Gt,{fontSize:"small"})})}):i.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.jsx(Gt,{fontSize:"small"}),e]})}ee.propTypes={children:y.node.isRequired};const Ca="https://launcher.arcblock.io/",ja=30*24*60*60*1e3;function Ro({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:s="",retention:o=0,sx:r={},...a}){const{t:l,locale:c}=R(),u=F(),[d,f]=qn({safeIframeRef:null,popoverAnchorEl:null}),m=p.useRef(null),g=V(),h=ce(S=>S.breakpoints.down("md")),x=h?"mobile":"desktop",b=ne(async()=>{const[S,_]=await Promise.all([u.api.getLauncherSession({input:{launcherSessionId:s,launcherUrl:e}}),Nn({launcherUrl:e||Ca,nftDid:n,launcherSessionId:s,locale:c,theme:g.palette.mode})]);if(S?.error)throw new Error(S.error);return{launcherSession:S.launcherSession,subscriptionURL:_}},[c]);if(b.loading)return i.jsx(ie,{label:i.jsxs(ee,{children:[!h&&l("expiration.desktop.loading"),i.jsx(Z,{size:16})]}),variant:"success",sx:{cursor:"pointer",...r},...a,retention:o});if(b.error)return console.error(b.error),i.jsx(ie,{label:i.jsx(ee,{children:l(`expiration.${x}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...r},...a,retention:o,onClick:()=>b.retry()});const k=S=>{f({popoverAnchorEl:S.currentTarget})},v=()=>{f({popoverAnchorEl:null})},C=b.value?.launcherSession;let L="success";[T.LAUNCH_SESSION_STATUS.overdue,T.LAUNCH_SESSION_STATUS.canceled,T.LAUNCH_SESSION_STATUS.terminated].includes(b.value?.launcherSession?.status)&&(L="error");let P=null;if(C.expirationDate&&!C.subscription){const S=de(C.expirationDate).diff(de(),"ms");P=l(`expiration.${x}.tips.${L}`,{validity:Mo(S,{locale:$n(c),compact:!0,verbose:!0})}),S>0&&S<=ja&&(L="warning")}return i.jsxs(i.Fragment,{children:[i.jsx(ie,{label:i.jsx(ee,{children:P||C?.subscription?.product?.name||l("common.subscription")}),color:L,variant:L!=="success"?"contained":"outlined",sx:{cursor:"pointer",...r},...a,retention:o,onClick:k}),i.jsx(Mn,{id:"popover-info",open:!!d.popoverAnchorEl,anchorEl:d.popoverAnchorEl,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiPopover-paper":{minHeight:0}},transformOrigin:{vertical:"top",horizontal:"right"},children:i.jsx(j,{sx:{width:{xs:"360px",md:"450px"},display:"flex",flexDirection:"column"},children:i.jsx("iframe",{ref:m,title:l("common.subscription"),width:"100%",height:"600px",style:{border:0,maxHeight:"800px"},src:b.value?.subscriptionURL})})})]})}Ro.propTypes={chainHost:y.string.isRequired,nftId:y.string,launcherSessionId:y.string,sx:y.object,retention:y.number,launcherUrl:y.string.isRequired};const _a=30*24*60*60*1e3,Ea="https://launcher.arcblock.io/";function Po({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:s="",sx:o={},retention:r=0,...a}){const{t:l,locale:c}=R(),[u,d]=qn({safeIframeRef:null,popoverAnchorEl:null}),f=p.useRef(null),m=ce(S=>S.breakpoints.down("md")),g=F(),h=m?"mobile":"desktop",x=ne(async()=>{const[S,_]=await Promise.all([g.api.getLauncherSession({input:{launcherSessionId:s||n,launcherUrl:e}}),Nn({launcherUrl:e||Ea,nftDid:n,launcherSessionId:s,locale:c})]);if(S?.error)throw new Error(S.error);return{launcherSession:S.launcherSession,subscriptionURL:_}},[c]);if(x.loading)return i.jsx(ie,{label:i.jsxs(ee,{children:[!m&&l("expiration.desktop.loading"),i.jsx(Z,{size:16})]}),variant:"success",sx:{cursor:"pointer",...o},...a,retention:r});if(x.error)return console.error(x.error),i.jsx(ie,{label:i.jsx(ee,{children:l(`expiration.${h}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...o},...a,retention:r,onClick:()=>x.retry()});const b=x.value?.launcherSession?.expirationDate,k=de(b).isBefore(de()),v=de(b).diff(de(),"ms");let C="success";v<=_a&&(C="warning"),k&&(C="error");const L=S=>{d({popoverAnchorEl:S.currentTarget})},P=()=>{d({popoverAnchorEl:null})};return i.jsxs(i.Fragment,{children:[x.value?.launcherSession?.subscription&&i.jsx(ie,{label:i.jsx(ee,{children:l("expiration.desktop.nextInvoice",{date:Ms(b,c)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...o},...a,retention:r,onClick:L}),!x.value?.launcherSession?.subscription&&i.jsx(ie,{label:i.jsx(ee,{children:l(`expiration.${h}.tips.${C}`,{validity:Mo(v,{locale:$n(c),compact:!0,verbose:!0})})}),color:C,variant:C!=="success"?"contained":"outlined",sx:{cursor:"pointer",...o},...a,retention:r,onClick:L}),i.jsx(Mn,{id:"popover-info",open:!!u.popoverAnchorEl,anchorEl:u.popoverAnchorEl,onClose:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:i.jsx(j,{sx:{width:{xs:"360px",md:"450px"}},children:i.jsx("iframe",{ref:f,title:l("common.subscription"),width:"100%",height:"600px",style:{border:0},src:x.value?.subscriptionURL})})})]})}Po.propTypes={chainHost:y.string.isRequired,nftId:y.string,launcherSessionId:y.string,sx:y.object,retention:y.number,launcherUrl:y.string.isRequired};var Fe={exports:{}},Ia=Fe.exports,jn;function La(){return jn||(jn=1,function(e,t){(function(n,s){e.exports=s(Wn())})(Ia,function(n){function s(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=s(n),r={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"週":a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var c=100*a+l;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return o.default.locale(r,null,!0),r})}(Fe)),Fe.exports}La();var We={exports:{}},Da=We.exports,_n;function Ta(){return _n||(_n=1,function(e,t){(function(n,s){e.exports=s(Wn())})(Da,function(n){function s(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=s(n),r={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a){return a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(a){return a<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return o.default.locale(r,null,!0),r})}(We)),We.exports}Ta();const Aa=(e="")=>e.startsWith("http:")||e.startsWith("https:"),Ma=e=>{try{return new URL(e).origin===window.location.origin}catch{return!1}};Pt("span")(({theme:e,color:t})=>({position:"relative",display:"inline-block",width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:t,marginRight:e.spacing(1)}));const $e=Pt(j)(({theme:e})=>({position:"relative",display:"inline-flex",alignItems:"center",height:e.spacing(3),paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),border:"1px solid",borderColor:e.palette.divider,borderRadius:e.shape.borderRadius*.5,fontSize:12,overflow:"hidden","& .app-badge-label":{display:"inline-flex",gap:e.spacing(1),alignItems:"center",lineHeight:e.spacing(3),marginLeft:e.spacing(-1.5),paddingLeft:e.spacing(1.5),marginRight:e.spacing(1),fontSize:12,backgroundColor:e.palette.grey[100],color:e.palette.text.secondary,"&::after":{content:'""',height:e.spacing(3),borderRight:"1px solid",borderColor:e.palette.divider,backgroundColor:e.palette.grey[100]}},"& .app-badge-value":{color:e.palette.text.primary,fontSize:12}}));function Le({loading:e=!1,children:t=null,to:n="",...s}){const o=i.jsx($e,{className:"app-badge",component:n?"a":"div",href:n,...s,children:t});if(e)return i.jsx(ss,{variant:"rounded",children:o});if(n){if(Aa(n)){const r=Ma(n)?"_self":"_blank";return i.jsx($e,{className:"app-badge",component:"a",href:n,target:r,rel:"noreferrer noopener",...s,children:t})}return i.jsx($e,{className:"app-badge",component:Ot,to:n,...s,children:t})}return i.jsx($e,{className:"app-badge",component:"div",...s,children:t})}function wt({icon:e="",label:t="",value:n="",loading:s=!1,...o}){return i.jsxs(Le,{loading:s,...o,children:[t&&i.jsxs(B,{className:"app-badge-label",children:[e&&i.jsx(pe,{icon:e}),t]}),i.jsx(B,{className:"app-badge-value",children:n})]})}function Ra({label:e="",value:t=void 0,trueValue:n=!0,falseValue:s=!1,loading:o=!1,onChange:r=void 0,...a}){const l=V();let c=!1;const u=Fn(()=>r?.(!c));return t===n?c=!0:t===s?c=!1:c=!!t,i.jsxs(Le,{loading:o,sx:{cursor:"pointer",backgroundColor:c?"primary.main":"grey.100",borderColor:c?"primary.main":"divider",transition:"background-color 0.3s ease"},onClick:u,...a,children:[i.jsx(B,{sx:{fontWeight:400,paddingLeft:c?0:l.spacing(2.5),paddingRight:c?l.spacing(2.5):0,color:c?"common.white":"text.secondary",transition:"color 0.3s ease"},children:e}),i.jsx(j,{sx:{width:l.spacing(2.5),height:l.spacing(2.5),borderRadius:`${l.shape.borderRadius*.5}px`,backgroundColor:"common.white",position:"absolute",top:"50%",left:c?`calc(100% - ${l.spacing(3)})`:l.spacing(.5),transform:"translateY(-50%)",transition:"left 0.3s ease",boxShadow:1}})]})}const Xe={primary:e=>e.palette.primary,info:e=>e.palette.info,success:e=>e.palette.success,error:e=>e.palette.error,warning:e=>e.palette.warning},Oo=(e,t)=>{if(Xe[t]){const n=Xe[t](e).main;return Ye(n,.1)}return Ye(t,.1)},Rt=(e,t)=>Xe[t]?Xe[t](e).main:t;function Pa({icon:e="",value:t="",color:n="info",loading:s=!1,...o}){const r=V(),a=Rt(r,n),l=Oo(r,n);return i.jsxs(Le,{loading:s,sx:{borderColor:Ye(a,.2),bgcolor:l},...o,children:[i.jsx(pe,{icon:e||"lucide:orbit",style:{marginRight:6}}),i.jsxs(B,{className:"app-badge-value",style:{color:a},children:["v ",t]})]})}const Oa=Pt("span")(({theme:e,color:t})=>({position:"relative",display:"inline-block",width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:t,marginRight:e.spacing(1)}));function Na({value:e="",color:t="primary",loading:n=!1,...s}){const o=V(),r=Rt(o,t),a=Oo(o,t);return i.jsxs(Le,{loading:n,sx:{borderColor:Ye(r,.2),bgcolor:a},...s,children:[i.jsx(Oa,{color:Rt(o,t)}),i.jsx(B,{className:"app-badge-value",style:{color:r},children:e})]})}function $a({value:e="",loading:t=!1,...n}){const s=K(()=>`DID:${cr(e)?"ETH":"ABT"}`,[e]);return i.jsxs(Le,{loading:t,...n,children:[i.jsx(B,{className:"app-badge-label",children:s}),i.jsx(B,{className:"app-badge-value",children:i.jsx(ur,{inline:!0,size:14,compact:!0,responsive:!1,children:e})})]})}Bt.extend(dr);Bt.extend(fr);const Ba=(e,t=0)=>{if(typeof e!="number")return"";const n=Math.abs(e);let s,o="";return n>=1e12?(o="T",s=`${(e/1e12).toFixed(t)}`):n>=1e9?(o="B",s=`${(e/1e9).toFixed(t)}`):n>=1e6?(o="M",s=`${(e/1e6).toFixed(t)}`):n>=1e3?(o="K",s=`${(e/1e3).toFixed(t)}`):s=e.toString(),t>0&&(s=s.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")),`${s}${o}`},Ha=(e,t="en")=>e?Bt(e).locale(t).fromNow():"",Ua={switch:Ra,version:Pa,state:Na,did:$a};function za(e){const{locale:t="en"}=R()||{};if(e.variant==="number"){const{value:n,round:s=0,...o}=e,r=Ba(Number(n),s);return i.jsx(wt,{value:r,...o})}if(e.variant==="time"){const{value:n,...s}=e,o=Ha(n,t);return i.jsx(wt,{value:o,...s})}if(e.variant){const n=Ua[e.variant];if(n)return i.jsx(n,{...e})}return i.jsx(wt,{...e})}const No=p.createContext({currentTab:"",TabComponent:null,navItem:void 0,updateAppInfo:()=>{}}),xe=(e,t,n="en")=>{const s=e?.[t];return vr(s)?s[n]||s.en:s};function Va({path:e=window?.location?.pathname||"",currentTab:t="",meta:n=void 0,children:s=null}){const{locale:o="en"}=R()||{},r=xr(e),a=r.startsWith(T.WELLKNOWN_BLOCKLET_ADMIN_PATH),l=K(()=>Object.assign({},window.blocklet,n),[n]),c=K(()=>{const g=l.navigation?.filter(k=>Array.isArray(k.section)?k.section.includes("dashboard"):k.section==="dashboard"),h=g?.flatMap(k=>k.items||[])?.find(k=>(xe(k,"link",o)||"").startsWith(r));if(!h)return;const x=g.find(k=>k.id===h.parent);let b=xe(h,"title",o)||"";return a||(b=`${xe(x,"title",o)||""} - ${b}`),{id:h.id,parent:h.parent,title:b,link:xe(h,"link",o)||"",description:xe(h,"description",o)||""}},[e,a,o,l]),[u,d]=p.useState({}),f=Fn(g=>{d(h=>({...h,...g}))}),m=p.useMemo(()=>{const{tabs:g=[]}=u,h=g.find(k=>k.value===t);let x=t,b=null;return!h&&g.length>0?(x=g[0].value,b=g[0].render||null):b=h?.render||null,{...u,navItem:c,currentTab:x,TabComponent:b,updateAppInfo:f}},[u,c,t,f]);return p.useEffect(()=>{a||f({name:c?.title||"",description:c?.description||""})},[c?.title,c?.description,a,f]),i.jsx(No.Provider,{value:m,children:s})}function W(){return p.useContext(No)}function $o(){return ce(e=>e.breakpoints.down("md"))}function En({sx:e={}}){const t=$o();return i.jsx(j,{sx:{mx:t?-2:-3,borderBottom:"1px solid",borderColor:"divider",mt:1.5,mb:1,...e}})}function Fa({onTabChange:e=void 0}){const t=$o(),{icon:n=void 0,name:s="",description:o=void 0,actions:r=void 0,badges:a=[],tabs:l=[],currentTab:c=""}=W();return s?i.jsxs(j,{className:"app-header",sx:{mt:3,mb:3},children:[i.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[n&&i.jsx(j,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:n}),i.jsxs(Rn,{sx:{flexGrow:1},children:[i.jsx(B,{variant:"h1",sx:{mb:.5},children:s}),o&&i.jsx(B,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.6,"& a":{color:"primary.main"},maxWidth:980},children:o})]}),!t&&r&&i.jsx(j,{sx:{ml:1},children:r})]}),a.length>0&&i.jsx(j,{sx:{display:"flex",flexWrap:"wrap",gap:1,alignItems:"center",mt:2},children:a.map((u,d)=>p.isValidElement(u)?u:i.jsx(za,{...u},u.label||d))}),t&&r&&i.jsx(j,{sx:{mt:t?2:0},children:r}),l.length<=1&&i.jsx(En,{}),l.length>1&&i.jsxs(i.Fragment,{children:[i.jsx(pr,{tabs:l,current:c,onChange:e,scrollButtons:"auto",sx:{mt:2.5}}),i.jsx(En,{sx:{mt:0}})]})]}):null}function Bo({meta:e={},fallbackUrl:t=ct,invalidPathFallback:n=null,headerAddons:s=void 0,sessionManagerProps:o={showRole:!0,onLogout:()=>{window.location.href=ct}},links:r=[],showDomainWarningDialog:a=!0,appPath:l=void 0,appTab:c=void 0,onAppTabChange:u=void 0,children:d=void 0,...f}){Rs();const m=p.use(Ps)?.session?.user,g=m?.role,{locale:h,defaultLocale:x}=R()||{},b=p.useMemo(()=>{const _=Object.assign({},window.blocklet,e);try{return Os(_)}catch(A){return console.error("Failed to format blocklet info",A,_),_}},[e]),{localizedNav:k,flattened:v,matchedIndex:C}=p.useMemo(()=>{let _=Ns({navigation:b?.navigation?.dashboard,locale:h,defaultLocale:x})||[];_=$s(_,g),_=Bs(_,E=>{let se=null;return E.icon&&(E.icon.startsWith("http")||E.icon.startsWith("data:")?se=i.jsx(Vn,{src:E.icon}):se=i.jsx("iconify-icon",{height:"100%",width:"100%",icon:E.icon})),{id:E.id,title:E.title,url:E.link,icon:se,external:!0,children:E.items}},"items");const A=Hs(_).filter(E=>!!E.url),O=Us(A.map(E=>E.url));return O!==-1&&(A[O].active=!0),{localizedNav:_,flattened:A,matchedIndex:O}},[b,h,x,g]),L=typeof r=="function"?r(k):[...k,...r],P=zs({meta:e});if(p.useLayoutEffect(()=>{m&&!v?.length&&t&&(window.location.href=t)},[t]),p.useLayoutEffect(()=>{m&&v?.length&&C===-1&&n&&n()},[n,v,C]),!b.appName)return null;const{appName:S}=b;return i.jsx(Lr,{title:S,fullWidth:!0,sidebarWidth:128,legacy:!1,links:L,...f,headerProps:{homeLink:ct,logo:i.jsx("img",{src:P,alt:"logo"}),addons:i.jsx(Vs,{formattedBlocklet:b,addons:s,sessionManagerProps:o,showDomainWarningDialog:a}),...f.headerProps},children:i.jsxs(Va,{path:l,currentTab:c,meta:e,children:[i.jsx(Fa,{onTabChange:u}),d]})})}Bo.propTypes={meta:Ws,fallbackUrl:y.string,invalidPathFallback:y.func,headerAddons:y.oneOfType([y.func,y.node]),sessionManagerProps:Fs,links:y.oneOfType([y.array,y.func]),showDomainWarningDialog:y.bool,appPath:y.string,appTab:y.string,onAppTabChange:y.func,children:y.node};const Wa={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'},Ya="/.well-known/service/onboard/bind-account";function Ho({onFinished:e=()=>{},show:t=!1,onChangeVisible:n=()=>{},loadingText:s="",defaultPath:o=Ya,...r}){const[a,l]=p.useState(t),[c,u]=p.useState(!1),[d,f]=p.useState(()=>{const C=localStorage.getItem("wizard-current-url");return C?.includes("/.well-known/service/onboard")?C:o}),m=p.useRef(e),g=p.useRef(),h=p.useRef(null),{locale:x}=R(),b=V(),k=ce(b.breakpoints.down("sm"));if(m.current=e,g.current=()=>{if(h.current?.contentWindow)try{const C=new URL(h.current.contentWindow.location.href).pathname;localStorage.setItem("wizard-current-url",C),f(C)}catch(C){f(o),console.warn("Failed to save wizard URL:",C)}localStorage.setItem("wizard-completed","true"),l(!1),n(!1)},p.useEffect(()=>{t!==a&&l(t)},[t]),p.useEffect(()=>{!a&&c&&u(!1)},[a]),p.useEffect(()=>{const C=L=>{if(L.origin!==window.location.origin)return;const{type:P,data:S}=L.data||{};switch(P){case"wizard.loaded":u(!0);break;case"wizard.finished":{l(!1),f(o),localStorage.removeItem("wizard-current-url"),localStorage.setItem("wizard-completed","true"),m.current?.(S);break}case"wizard.close":{g.current();break}}};return window.addEventListener("message",C),()=>{window.removeEventListener("message",C)}},[]),p.useEffect(()=>{localStorage.getItem("wizard-completed")||l(!0)},[]),!a)return null;const v=Yn(te(window.location.origin,d),{locale:x});return i.jsxs(Pn,{id:"wizard-dialog",open:a,onClose:()=>g.current(),fullWidth:!0,maxWidth:k?!1:"md",fullScreen:k,...r,slotProps:yr({},{paper:{sx:{margin:0,borderRadius:0,position:"relative",overflow:"hidden",...k?{borderRadius:0}:{borderRadius:1,height:"720px"}}}},r.slotProps),sx:{"& .MuiBackdrop-root":{backgroundColor:"rgba(0, 0, 0, 0.5)"},...r.sx},children:[i.jsx("iframe",{ref:h,id:"wizard-iframe",src:v,title:"Setup Wizard",style:{width:"100%",height:"100%",border:0,padding:0,margin:0,opacity:c?1:0,transition:"opacity 0.3s ease-in-out"},onLoad:()=>u(!0)}),c?null:i.jsx(j,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",bgcolor:"background.paper"},children:i.jsxs(j,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:1},children:[i.jsx(Z,{}),typeof s=="string"?i.jsx(B,{variant:"body1",children:s}):s]})})]})}Ho.propTypes={onFinished:y.func,show:y.bool,onChangeVisible:y.func,loadingText:y.node,defaultPath:y.string,...Pn.propTypes};const qa={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 21L21 6l-3-3L3 18l3 3m9-15l3 3M9 3a2 2 0 0 0 2 2a2 2 0 0 0-2 2a2 2 0 0 0-2-2a2 2 0 0 0 2-2m10 10a2 2 0 0 0 2 2a2 2 0 0 0-2 2a2 2 0 0 0-2-2a2 2 0 0 0 2-2"/>'};function Ka(){const{session:e}=Bn(),[t,n]=p.useState(!1),[s,o]=p.useState(!1),{t:r}=R(),a=p.useMemo(()=>!!localStorage.getItem("wizard-finished"),[]);return p.useMemo(()=>e.user?.role&&Nt.includes(e.user.role),[e])?i.jsxs(i.Fragment,{children:[i.jsx(Se,{title:r("setup.wizardTooltip"),open:t,placement:"bottom",arrow:!0,children:i.jsx(tt,{size:"small",onClick:()=>{o(!0),n(!1)},sx:{display:{xs:"none",md:"flex"},color:"text.secondary",...t&&{backgroundColor:"action.hover","@keyframes pulse":{"0%":{opacity:.8},"50%":{opacity:.5},"100%":{opacity:.8}},animation:"pulse 2s infinite"}},children:i.jsx(pe,{icon:qa,height:20})})},`wizard-toggle-${t}`),i.jsx(Ho,{show:s,loadingText:i.jsxs(j,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1,mt:2,maxWidth:"80vw"},children:[i.jsx(on,{variant:"h4",sx:{fontWeight:"bold"},children:r("setup.wizardLoading")}),!a&&i.jsx(on,{variant:"body2",sx:{textAlign:"center"},children:r("setup.wizardSubTitle")})]}),slotProps:{paper:{sx:{height:{xs:"100vh",md:"750px"}}}},onChangeVisible:c=>{o(c),!c&&s&&n(!0)},onClose:void 0,onFinished:()=>{o(!1),n(!1)}},"wizard-modal")]}):null}function Za(){const{inFullPage:e,toggleFullPage:t}=Dr();return D(tt,{onClick:t,children:e?D(is,{sx:{transform:"scale(1.3)"}}):D(as,{sx:{transform:"scale(1.3)"}})})}function Uo({children:e=null,title:t="",appPath:n=void 0,appTab:s=void 0,onAppTabChange:o=void 0}){const{t:r}=R(),{loading:a,error:l,actions:{refreshBlocklet:c},env:u,blocklet:d}=ot(),{info:f,imgPrefix:m}=Ys(),g=Is(),h=ce(_=>_.breakpoints.down("md")),x=V(),{appId:b,version:k}=u,v=[{label:"App ID",value:b},{label:"App Version",value:k},{label:"App Bundle Name",value:d?.meta?.bundleName},{label:"Server Id",value:f.did},{label:"Server Version",value:f.version}],C=_=>{const A=Array.isArray(_)?_:[_];if(A.unshift(D(Ka,{})),h||A.unshift(D(Za,{})),d){const O={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Ks(d)?A.unshift(D(Ro,{chainHost:d?.controller?.chainHost,nftId:d?.controller?.nftId,launcherSessionId:d?.controller?.launcherSessionId,launcherUrl:d?.controller?.launcherUrl,sx:O})):f.ownerNft&&f.launcher&&A.unshift(D(Po,{chainHost:f.launcher.chainHost,launcherUrl:f.launcher.url,nftId:f.ownerNft.did,launcherSessionId:f.ownerNft.launcherSessionId,sx:O}))}return A},L=jr({blocklet:d}),P={logo:L?D("img",{src:L,alt:"logo"}):null,brandAddon:D(j,{children:d&&Pe(j,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,py:.5,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[D(Se,{title:$.isRunning(d?.status)?void 0:r(`blocklet.status.${d?.status}`),children:D(j,{sx:{bgcolor:Ve[d?.status],width:8,height:8,borderRadius:"50%"}})}),D(j,{sx:{color:"text.secondary",maxWidth:h?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:$.getDisplayName(d)}),D(j,{component:pe,icon:Wa,sx:{color:"text.secondary"}})]})})};return Pe(Ga,{legacy:!1,fullWidth:!0,headerAddons:C,headerProps:P,links:_=>_?.map(O=>(O.children=O.children?.map(E=>{if(E.id==="/team/aigne"){const se=m?te(m,"/aigne-hub.png"):"/aigne-hub.pg";return{...E,icon:D(Vn,{src:se,alt:"AIGNE Hub",style:x.palette.mode==="dark"?{filter:"invert(1)"}:{},fallback:E.icon})}}return E}),O)),title:t,footerProps:{addon:D(To,{infos:v})},appPath:n,appTab:s,onAppTabChange:o,children:[!d&&a&&D(qe,{relative:"parent",children:D(Z,{})}),!d&&l&&Pe(qe,{relative:"parent",children:[Pe(j,{sx:{display:"flex",alignItems:"center"},children:[D(rs,{color:"error",sx:{marginRight:1}}),Ht(l)]}),D($t,{onClick:()=>c(),children:D("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!d&&D(j,{sx:{flex:1,display:"flex",flexDirection:"column"},children:D(mr,{FallbackComponent:qs,resetKeys:[g.pathname],children:e})})]})}Uo.propTypes={children:y.any,title:y.string,appPath:y.string,appTab:y.string,onAppTabChange:y.func};const Ga=nt(Bo)`
|
|
43
|
+
.header-addons .locales {
|
|
44
|
+
max-height: 400px;
|
|
45
|
+
overflow-y: auto;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.header-brand-addon {
|
|
49
|
+
display: block;
|
|
50
|
+
}
|
|
51
|
+
`;function Qa(){const{t:e,locale:t}=R(),{blocklet:n,launcherSession:s,refreshSubscription:o}=ot(),{connectApi:r,session:a,api:l}=Bn(),[c,u]=p.useState(!1),[d,f]=p.useState(""),[m,g]=hr({subscriptionURL:"#"});if(p.useEffect(()=>{(Jt(n,s)||en(s))&&Zs({launcherSessionId:n?.controller?.launcherSessionId,launcherUrl:n?.controller?.launcherUrl,locale:t}).then(k=>{g({subscriptionURL:k})}).catch(k=>{console.error("get subscription url error:",k)})},[n,s]),p.useEffect(()=>{if(n.controller?.launcherUrl){const k=te(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(k).then(v=>v.json()).then(v=>{const C=v.componentMountPoints?.find(P=>P.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,L=te(n.controller.launcherUrl,C);f(L)})}},[n.controller?.launcherUrl]),!n||!s)return"";let h=null,x="",b="error";return Gs(s)?(h=Qs(s)?i.jsx(Be,{href:m.subscriptionURL,children:e("blocklet.manageSubscription")}):i.jsx(St,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),x=e("blocklet.suspendedCausedByPastDue",{deadline:ge(s?.reservedUntil,t)})):en(s)?(h=i.jsx(Be,{href:m.subscriptionURL,children:e("blocklet.manageSubscription")}),x=e("blocklet.willBeSuspendedSoon",{deadline:ge((s?.subscription?.cancel_at||0)*1e3,t)}),b="warning"):Jt(n,s)?(h=i.jsx(Be,{href:m.subscriptionURL,children:e("blocklet.manageSubscription")}),x=e("blocklet.suspendedCausedByExpired",{deadline:ge(s?.reservedUntil,t),canceledAt:ge((s?.subscription?.canceled_at||0)*1e3,t)})):Xs(n,s)&&(h=i.jsx(Ot,{to:te(T.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),x=e("blocklet.suspendedCausedByTerminated",{canceledAt:ge(s?.terminatedAt,t),deadline:Js(s?.terminatedAt,t)})),x?i.jsxs(i.Fragment,{children:[i.jsxs(Je,{severity:b,sx:{mb:1},children:[x,i.jsx(B,{sx:{display:"inline-block",fontSize:"inherit",lineHeight:"inherit",ml:1,a:{textDecoration:"auto"},"& .MuiButtonBase-root":{p:0,minWidth:"auto"}},children:h})]}),c&&d&&s&&i.jsx(er,{session:a,connect:r,baseUrl:d,authToken:s.subscription.authToken,children:i.jsx(Tr,{dialogProps:{open:c,onClose:()=>u(!1)},subscriptionId:s.subscription.id,successToast:!0,onPaid:()=>{l.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})})]}):null}const Xa=e=>p.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})),zo={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m8 9l3 3l-3 3m5 0h3"/><path d="M3 6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></g>'},Ja={display:"inline-flex",width:"26px",height:"26px",paddingRight:"3px"};function el(e){return i.jsx("span",{style:Ja,children:i.jsx(pe,{icon:zo,width:"100%",height:"100%",...e})})}const re={Start:ls,Stop:cs,Restart:us,Reload:bs,Remove:ds,Config:gs,Log:hs,Group:ms,Cancel:fs,Dashboard:Xa,Overview:ps,LogIcon:el,TerminalIcon:zo},In=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),s=new URLSearchParams(n.searchParams),o=new URL(te(n.origin,t));return o.search=s.toString(),o.toString()},tl="internal",nl="external";function Vo({blocklet:e,onStart:t,onComplete:n,variant:s="menu",source:o="blocklet-list",hasPermission:r=!1,getComponentUrl:a=null,useBlockletUrlEvaluation:l=()=>({loading:!1,recommendedUrl:window?.location?.href}),...c}){const u=F(),[d,f]=p.useState(null),[m,g]=p.useState(null),[h,x]=p.useState(!1),[b,k]=p.useState(null),{t:v}=p.useContext(zn),[C]=sn("skip-blocklet-setup",!1),{loading:L,recommendedUrl:P}=l(e),[S]=sn("blocklet-type-filter",tl),_=$.isInProgress(e.status),[A,O]=p.useState(!1);p.useEffect(()=>{if(!e?.controller)return;O(e?.controller?.status?.value===He.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{try{const M=await u.api.getLauncherSession({input:{launcherSessionId:e?.controller?.launcherSessionId,launcherUrl:e?.controller?.launcherUrl}});if(M?.error){console.error("get launcher session failed",M.error);return}O([T.LAUNCH_SESSION_STATUS.overdue,T.LAUNCH_SESSION_STATUS.canceled,T.LAUNCH_SESSION_STATUS.terminated].includes(M?.launcherSession?.status))}catch(M){console.error("call getLauncherSession error",M)}})()},[]);const{inService:E}=u,se=o==="blocklet-detail",he=(w,M,U=!1)=>async()=>{const Q=async Ae=>{t({action:w,blocklet:e}),x(!0),g(w);let Me=!1;try{if(w==="remove")await M(Ae);else if(w==="start"){if(!$.hasRunnableComponent(e)){J.error(v("blocklet.noComponent"));return}if(!E&&!C&&!e.settings?.initialized&&e.mode!==He.BLOCKLET_MODES.DEVELOPMENT){if(!P||!tn(P)){J.error(v("blocklet.gotoVisitError"));return}const H=tr(u.info),Zt=new URL(P);Zt.searchParams.set("serverUrl",H),window.open(dt(Zt.href,{allowDomains:null})),n({action:w,blocklet:e});return}const q=e.children.filter(H=>!$.isInProgress(H.status)&&H.status!=="running"&&!$.isInProgress(H.greenStatus)&&H.greenStatus!=="running").map(H=>H.meta.did),ue={did:e.meta.did,componentDids:q};await M({input:ue})}else if(["stop","restart","reload"].includes(w)){const q=e.children.filter(H=>$.isBlockletRunning(H)).map(H=>H.meta.did),ue={did:e.meta.did,componentDids:q};await M({input:ue})}else{const q={did:e.meta.did};await M({input:q})}w==="remove"?Me=!0:await nr(1e3),w==="reload"&&J.success(v("blocklet.reloadSuccess")),k(null),n({action:w,blocklet:e})}catch(q){const ue=`Blocklet ${w} failed: ${Ht(q)}`;throw n({action:w,blocklet:e,error:new Error(ue)}),new Error(ue)}finally{Me||x(!1)}},X=()=>{x(!1),k(null)},Te=$.getDisplayName(e,!0),Jo=e.mode===He.BLOCKLET_MODES.DEVELOPMENT?{description:()=>i.jsx(B,{component:"div",children:i.jsx(B,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Ae,Me)=>i.jsxs(B,{component:"div",children:[i.jsx(B,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")}),i.jsxs(js,{name:"removeType",value:Ae.removeType,onChange:q=>Me({...Ae,removeType:q.target.value}),children:[i.jsx(Qt,{value:"backup",control:i.jsx(Xt,{}),label:v("blocklet.action.removeApplicationAfterBackup")}),i.jsx(Qt,{value:"complete",control:i.jsx(Xt,{}),label:v("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},es={stop:{title:`${v("common.stop")} ${Te}`,description:v("blocklet.action.stopDescription"),confirm:v("blocklet.action.confirmStop"),cancel:v("common.cancel"),onConfirm:Q,onCancel:X},restart:{title:`${v("common.restart")} ${Te}`,description:v("blocklet.action.restartDescription"),confirm:v("blocklet.action.confirmRestart"),cancel:v("common.cancel"),onConfirm:Q,onCancel:X},remove:{title:`${v("common.remove")} ${Te}`,confirm:v("blocklet.action.confirmRemove"),cancel:v("common.cancel"),onConfirm:Q,onCancel:X,...Jo},cancelDownload:{title:`${v("common.cancel")}`,description:v("blocklet.action.cancelDownloadDescription",{name:Te}),confirm:v("common.confirm"),cancel:v("common.cancel"),onConfirm:Q,onCancel:X}};U?k(es[w]):await Q()},qo=!!d,Ko=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}f(w.currentTarget)},Zo=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}f(null)},qt=async(w,M)=>{try{M.stopPropagation(),M.preventDefault()}catch{}if(typeof w.handler=="function")try{x(!0),g(w.action),await w.handler()}catch(U){console.error(`Blocklet ${w.name} failed: `,U)}finally{x(!1),f(null)}else f(null)},Go=!E&&$.isDeletableBlocklet(e)?{action:"remove",icon:re.Remove,name:v("common.remove"),handler:he("remove",async({removeType:w})=>{w==="backup"&&await u.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await u.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:_}:null,Qo={action:"remove",icon:({sx:w,...M})=>i.jsx(re.Cancel,{sx:{...w,paddingRight:"2px",zoom:.95},...M}),name:v("common.cancel"),handler:he("cancelDownload",u.api.cancelDownloadBlocklet,!0)},Xo=$.getAppMissingConfigs(e),Kt=(w="dashboard")=>{const M=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),U=a?.({mountPoint:M,blocklet:e});if(!U||!tn(U)){J.error(v("blocklet.gotoVisitError"));return}const Q=e?.site?.domainAliases;w==="logs"?window.open(dt(In(U,`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/developers/logs`),{allowDomains:Q?.map(X=>X.value)})):window.open(dt(In(U,`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`),{allowDomains:Q?.map(X=>X.value)}))};let De=[{action:"start",icon:re.Start,inExternal:!0,name:v("common.start"),handler:he("start",u.api.startBlocklet),disabled:A||e.children.every(w=>$.isBlockletRunning(w))||ut(e.status)||L||_},{action:"stop",icon:re.Stop,inExternal:!0,name:v("common.stop"),handler:he("stop",u.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:re.Restart,name:v("common.restart"),handler:he("restart",u.api.restartBlocklet,!0),disabled:A||e.status!=="running"},ut(e.status)?Qo:Go,{separator:!0},E?null:{action:"dashboard",icon:({style:w,...M})=>i.jsx(re.Dashboard,{...M,style:{...w,width:"26px",height:"26px",paddingRight:"3px"}}),name:v("sidebar.dashboard"),handler:Kt},!E&&!se?{action:"logs",icon:re.LogIcon,name:v("common.logs"),handler:()=>Kt("logs")}:null].filter(Boolean);return S===nl&&(De=De.filter(w=>w.inExternal)),s==="menu"?i.jsxs(Ln,{"data-cy":"blocklet-actions",children:[i.jsx(tt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:Ko,size:"small",disabled:!r||!ut(e.status)&&h,children:i.jsx(xs,{})}),i.jsxs(vs,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:qo,onClose:Zo,PaperProps:{},children:[Xo.length>0&&i.jsxs(Je,{style:{maxWidth:"400px"},severity:"error",children:[v("blocklet.config.missingRequired"),i.jsx("br",{}),i.jsx(Ot,{to:`/blocklets/${e.meta.did}/components`,children:v("blocklet.config.gotoFix")})]}),De.map((w,M)=>w.separator?i.jsx(ys,{},`separator-${M}`):i.jsxs(ws,{dense:!0,onClick:U=>qt(w,U),disabled:h||w.disabled,"data-cy":`${w.action}-blocklet`,children:[i.jsx(Ss,{style:{minWidth:24},children:m===w.action&&h?i.jsx(Z,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{fontSize:"small"})}),i.jsx(ks,{primary:w.name})]},w.name))]}),b&&i.jsx(rn,{title:b.title,description:b.description,confirm:b.confirm,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]}):i.jsxs(Ln,{"data-cy":"blocklet-actions",...c,children:[i.jsx(Cs,{children:De.filter(w=>!w.separator&&!w.onlyInMenu).map(w=>i.jsxs($t,{title:w.name,"data-cy":`${w.action}-blocklet`,onClick:()=>qt(w),disabled:!!w.disabled||h,children:[m===w.action&&h?i.jsx(Z,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{}),i.jsx("span",{className:"blocklet-action-text",children:w.name})]},w.name))}),b&&i.jsx(rn,{title:b.title,description:b.description,confirm:b.confirm,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]})}Vo.propTypes={getComponentUrl:y.func,blocklet:y.object.isRequired,onStart:y.func.isRequired,onComplete:y.func.isRequired,variant:y.oneOf(["menu","group"]),source:y.oneOf(["blocklet-list","blocklet-detail"]),hasPermission:y.bool,useBlockletUrlEvaluation:y.func};const Ln=nt.div`
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
|
|
55
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
56
|
+
.MuiButton-root {
|
|
57
|
+
padding: 4px;
|
|
58
|
+
font-size: 10px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`,ol=p.memo(Vo);function Y({component:e=void 0}){const{blocklet:t}=G();return e?i.jsx(j,{className:"page-content",children:i.jsx(p.Suspense,{fallback:i.jsx(qe,{relative:"parent",children:i.jsx(Z,{})}),children:p.isValidElement(e)?e:Ls.createElement(e,{blocklet:t})})}):null}Y.propTypes={component:y.any};const sl=p.lazy(()=>I(()=>import("./overview-B-FL9Ztc.js"),__vite__mapDeps([0,1]),import.meta.url)),rl=p.lazy(()=>I(()=>import("./component-BaU5hHKk.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),il=p.lazy(()=>I(()=>import("./advanced-D8m1Ueie.js"),__vite__mapDeps([0,1]),import.meta.url));function al(){const e=V(),{info:t,inService:n}=F(),{t:s}=R(),{navItem:o,updateAppInfo:r,TabComponent:a}=W(),{blocklet:l,actions:{refreshBlocklet:c}}=G(),u=!l||or(l.status)?[]:$.getAppMissingConfigs(l),f=!!(n?window.env?.gateway?.wafPolicy?.enabled:t?.routing.wafPolicy?.enabled)&&(l?.settings?.gateway?.wafPolicy?.enabled??!0);p.useEffect(()=>{r({name:o?.title||"",description:o?.description||s("navigation.overviewDesc")})},[o,s,r]),p.useEffect(()=>{r({actions:l?i.jsx(ol,{className:"page-actions",hasPermission:!0,blocklet:l,onStart:()=>{},onComplete:({error:h}={})=>{h&&J.error(h.message)},variant:"group"}):null})},[l,r]),p.useEffect(()=>{const g=[];l&&g.push(i.jsx(Do,{"data-cy":"blocklet-status","status-blocklet-did":l.meta?.did,status:l.status,source:l.source,progress:l.progress,style:{lineHeight:e.spacing(3),height:e.spacing(3)}},"blocklet-status")),g.push({label:"WAF",value:f?"ON":"OFF",to:`${o?.link}/settings`}),r({badges:g})},[l,r,f,o?.link,e]);const m=p.useMemo(()=>[{label:s("common.overview"),value:"overview",render:sl},{label:i.jsx(_s,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!u.length,children:s("common.components")}),labelText:s("common.components"),value:"components",render:rl},{label:s("common.globalSettings"),value:"settings",render:i.jsx(il,{blocklet:l,onUpdate:c})}],[s,u.length,l,c]);return p.useEffect(()=>{r({tabs:m})},[m,r]),i.jsx(Y,{component:a})}const ll=p.lazy(()=>I(()=>import("./traffic-8-96Vd63.js").then(e=>e.t),__vite__mapDeps([0,1]),import.meta.url)),cl=p.lazy(()=>I(()=>import("./audit-logs-CI4WysnU.js"),__vite__mapDeps([0,1,2]),import.meta.url)),ul=p.lazy(()=>I(()=>import("./log-DdfRRLsZ.js"),__vite__mapDeps([0,1]),import.meta.url)),dl=p.lazy(()=>I(()=>import("./runtime-BK5XjM1-.js"),__vite__mapDeps([0,1]),import.meta.url));function fl(){const{t:e}=R(),{navItem:t,updateAppInfo:n,TabComponent:s}=W(),{blocklet:o,client:r,did:a}=G(),{teamDid:l}=Ce(),{api:c}=F(),u=o?.meta?.did,d=ne(()=>c.getBlockletBaseInfo({input:{teamDid:l}}),[l,c]);p.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.operationsDesc")})},[t,e,n]),p.useEffect(()=>{const m=[],{totalRequests:g=0,failedRequests:h=0}=d.value?.traffic??{},{cpuUsage:x=0,memoryUsage:b=0}=d.value?.appRuntimeInfo??{};m.push({variant:"number",label:e("analytics.traffic.totalRequests"),value:g,round:0,to:`${t.link}/analytics`,loading:d.loading}),m.push({variant:"number",label:e("analytics.traffic.failedRequests"),value:h,round:0,to:`${t.link}/analytics`,loading:d.loading}),m.push({label:e("blocklet.runtimeInfo.cpuUsage"),value:`${x.toFixed(1)}%`,to:`${t.link}/performance`,loading:d.loading}),m.push({label:e("blocklet.runtimeInfo.memoryUsage"),value:Hn(b),to:`${t.link}/performance`,loading:d.loading}),n({badges:m})},[n,d.value,d.loading,t?.link,e]);const f=p.useMemo(()=>[o?.children?.length&&o.structVersion===T.APP_STRUCT_VERSION&&{label:e("common.logs"),value:"logs",render:ul},{label:e("common.auditLogs"),value:"audit-logs",render:i.jsx(cl,{scope:u,categories:["blocklet","team","security","certificates","gateway"]})},{label:e("common.performance"),value:"performance",render:i.jsx(dl,{client:r,did:a})},{label:e("common.analytics"),value:"analytics",render:i.jsx(ll,{client:r,did:a})}].filter(Boolean),[e,o,r,a,u]);return p.useEffect(()=>{n({tabs:f})},[f,n]),i.jsx(Y,{component:s})}const pl=p.lazy(()=>I(()=>import("./index-DyLgcKhb.js"),__vite__mapDeps([0,1]),import.meta.url)),ml=p.lazy(()=>I(()=>import("./index-CajO0kKX.js"),__vite__mapDeps([0,1]),import.meta.url)),hl=p.lazy(()=>I(()=>import("./list-B6W2DONO.js"),__vite__mapDeps([0,1]),import.meta.url));function gl(){const{t:e}=R(),{navItem:t,updateAppInfo:n,TabComponent:s}=W(),{api:o}=F(),{teamDid:r}=Ce(),{session:a}=st(),l=p.useMemo(()=>a?.user?.role&&Nt.includes(a.user.role),[a]),c=ne(()=>o.getBlockletBaseInfo({input:{teamDid:r}}),[r,o]);p.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.integrationsDesc")})},[t,e,n]),p.useEffect(()=>{const d=[],{webhooks:f=0,accessKeys:m=0,oauthApps:g=0}=c.value?.integrations??{};d.push({variant:"number",label:"Webhooks",value:f,to:`${t.link}/webhooks`,loading:c.loading}),d.push({variant:"number",label:"API Keys",value:m,to:`${t.link}/access-keys`,loading:c.loading}),d.push({variant:"number",label:"OAuth Apps",value:g,to:`${t.link}/oauth`,loading:c.loading}),n({badges:d})},[n,c.value,c.loading,t.link]);const u=p.useMemo(()=>[l&&{label:"Webhooks",value:"webhooks",render:i.jsx(pl,{})},{label:e("common.accessKeys"),value:"access-keys",render:i.jsx(ml,{})},{label:e("common.oauth"),value:"oauth",render:i.jsx(hl,{})}].filter(Boolean),[l,e]);return p.useEffect(()=>{n({tabs:u})},[u,n]),i.jsx(Y,{component:s})}var Fo=function(t){return i.jsx("svg",{...t,children:i.jsx("path",{d:"M79.425.7c5.688 0 10.3 4.612 10.3 10.3v43.234c0 5.689-4.612 10.3-10.3 10.3H11.156c-5.688 0-10.3-4.611-10.3-10.3v-.215h4.6v.215a5.7 5.7 0 0 0 5.7 5.7h68.269a5.7 5.7 0 0 0 5.7-5.7V11a5.7 5.7 0 0 0-5.7-5.7H11.156a5.7 5.7 0 0 0-5.7 5.7v.49h-4.6V11C.856 5.312 5.468.7 11.156.7h68.269ZM11.293 17.691c2.945 0 5.495.62 7.65 1.86 2.182 1.211 3.879 2.929 5.088 5.154 1.21 2.225 1.814 4.845 1.814 7.86 0 2.985-.604 5.577-1.814 7.774a12.78 12.78 0 0 1-5.088 5.112c-2.155 1.211-4.706 1.818-7.65 1.818H1V17.69h10.293ZM35.206 47.27h-5.324V17.69h5.324V47.27ZM50.883 17.69c2.944 0 5.494.62 7.65 1.86 2.182 1.21 3.878 2.929 5.087 5.154 1.21 2.225 1.815 4.846 1.815 7.86 0 2.985-.606 5.577-1.815 7.774a12.78 12.78 0 0 1-5.087 5.112c-2.156 1.211-4.706 1.818-7.65 1.818H40.59V17.69h10.293Zm22.595 19.066a2.98 2.98 0 1 1-.001 5.958 2.98 2.98 0 0 1 .001-5.958ZM6.325 42.494h4.812c2.97 0 5.257-.874 6.861-2.62 1.604-1.775 2.405-4.211 2.405-7.31 0-3.126-.801-5.591-2.405-7.394-1.604-1.803-3.89-2.704-6.861-2.704H6.324v20.028Zm39.59 0h4.81c2.971 0 5.26-.873 6.863-2.62 1.603-1.775 2.405-4.211 2.405-7.31 0-3.126-.801-5.591-2.405-7.394-1.604-1.803-3.892-2.704-6.862-2.704h-4.81v20.028Zm27.564-19.637a2.978 2.978 0 1 1 0 5.957 2.978 2.978 0 0 1 0-5.957Z",fill:"currentColor"})})};Fo.defaultProps={viewBox:"0 0 24 17",xmlns:"http://www.w3.org/2000/svg"};function Wo({width:e=24,color:t="black",backgroundColor:n="transparent"}){return i.jsx(j,{component:"span",sx:{width:e,display:"inline-block",verticalAlign:"middle",color:t,backgroundColor:n,fontSize:0},children:i.jsx(Fo,{viewBox:"0 0 90 65",xmlns:"http://www.w3.org/2000/svg",style:{position:"relative",top:-1,lineHeight:1}})})}Wo.propTypes={width:y.number,color:y.string,backgroundColor:y.string};const bl=p.lazy(()=>I(()=>import("./index-Dtrjy5pJ.js"),__vite__mapDeps([0,1]),import.meta.url)),xl=p.lazy(()=>I(()=>import("./index-BR0Wem2b.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url)),vl=p.lazy(()=>I(()=>import("./index-BjNeXyVY.js"),__vite__mapDeps([0,1]),import.meta.url)),yl=p.lazy(()=>I(()=>import("./index-2gt9VfEc.js"),__vite__mapDeps([0,1]),import.meta.url)),wl=p.lazy(()=>I(()=>import("./security-CKHrp32s.js"),__vite__mapDeps([0,1]),import.meta.url));function Sl(){const{t:e,locale:t}=R(),{navItem:n,updateAppInfo:s,TabComponent:o}=W(),{blocklet:r}=G(),{api:a}=F(),{teamDid:l}=Ce(),c=p.useMemo(()=>wr(r,"settings.org.enabled",!1),[r]),u=ne(()=>a.getBlockletBaseInfo({input:{teamDid:l}}),[l,a]),d=ne(async()=>{if(!r?.meta?.did)return null;const{securityRules:h}=await a.getBlockletSecurityRules({input:{did:r.meta.did,includeDisabled:!0}});return h.find(x=>x.id===T.SECURITY_RULE_DEFAULT_ID)},[r?.meta?.did,a]),f=p.useMemo(()=>{const h=r?.settings?.oauth||{},x=[];return["github","google","apple","twitter","auth0"].forEach(b=>{h[b]?.enabled&&x.push({name:b,icon:`simple-icons:${b}`,title:He.PROVIDER_NAME[b]||b})}),x},[r?.settings?.oauth]),m=p.useMemo(()=>(r?.settings?.federated?.sites||[]).length>0,[r?.settings?.federated?.sites]);p.useEffect(()=>{const h=e("navigation.didConnectDesc"),x=e("common.poweredBy",{brand:"$placeholder"}),b=h?h.slice(-1):"",[k,v]=x.split("$placeholder");s({name:n?.title||"",description:i.jsxs("span",{children:[h," ",k,i.jsxs("a",{href:`https://www.didconnect.io/${t}`,target:"_blank",style:{color:"#5bbec5"},rel:"noreferrer",children:[i.jsx(Wo,{color:"#5bbec5"})," Connect"]}),v," ",b]})})},[n,e,t,s]),p.useEffect(()=>{const h=[],{users:x=0}=u.value?.user??{},{passports:b=0}=u.value?.passport??{};h.push({variant:"number",label:e("common.members"),value:x,to:`${n.link}/members`,round:0}),h.push({variant:"number",label:e("team.member.passports"),value:b,to:`${n.link}/passports`,round:0}),f.length>0&&h.push({label:e("oauth.oauth"),value:i.jsx(Rn,{direction:"row",spacing:.5,children:f.map(v=>i.jsx(pe,{icon:v.icon}))}),to:`${n.link}/settings`}),h.push({label:e("oauth.federated"),value:m?"ON":"OFF",to:`${n.link}/settings`});const k=d.value?.accessPolicy?.name;k&&h.push({label:e("accessPolicy.title"),value:k,to:`${n.link}/security`}),s({badges:h})},[s,u.value,u.loading,e,f,m,d.value,d.loading,n.link]);const g=p.useMemo(()=>[{label:e("common.members"),value:"members",render:i.jsx(bl,{type:"blocklet",createPassportSvg:an})},c&&{label:e("common.orgs"),value:"orgs",render:i.jsx(xl,{editable:!1,mode:"dashboard",layout:"table"})},{label:e("team.member.passports"),value:"passports",render:i.jsx(vl,{createPassportSvg:an})},{label:e("common.setting"),value:"settings",render:i.jsx(yl,{orientation:"vertical"})},{label:e("common.policies"),value:"security",render:i.jsx(wl,{})}].filter(Boolean),[e,c]);return p.useEffect(()=>{s({tabs:g})},[g,s]),i.jsx(Y,{component:o})}const kl=p.lazy(()=>I(()=>import("./domains-Dy7ECa6U.js"),__vite__mapDeps([0,1]),import.meta.url)),Cl=p.lazy(()=>I(()=>import("./branding-CWSPHmrR.js"),__vite__mapDeps([0,1]),import.meta.url)),jl=p.lazy(()=>I(()=>import("./appearance-0EszN89M.js"),__vite__mapDeps([0,1]),import.meta.url)),_l=p.lazy(()=>I(()=>import("./config-navigation-DGBH-fH3.js"),__vite__mapDeps([0,1]),import.meta.url));function El(){const{t:e}=R(),{navItem:t,updateAppInfo:n,TabComponent:s}=W(),{blocklet:o,actions:{refreshBlocklet:r}}=G(),a=p.useMemo(()=>o?{domainCount:(o?.site?.domainAliases||[]).length}:null,[o]),l=p.useMemo(()=>o?.settings?.theme?.name??"Default",[o]);p.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.websiteDesc")})},[t,e,n]),p.useEffect(()=>{const u=[],{domainCount:d=0}=a;u.push({variant:"number",label:e("common.domains"),value:d,to:`${t.link}/domains`}),u.push({label:e("common.theme"),value:l,to:`${t.link}/theming`}),n({badges:u})},[n,a,l,e,t.link]);const c=p.useMemo(()=>[{label:e("common.domains"),value:"domains",render:kl},{label:e("common.branding"),value:"branding",render:i.jsx(Cl,{blocklet:o,onUpdate:r})},{label:e("common.theming"),value:"theming",render:i.jsx(jl,{})},{label:e("common.navigation"),value:"navigation",render:_l}],[e,o,r]);return p.useEffect(()=>{n({tabs:c})},[c,n]),i.jsx(Y,{component:s})}const Il=p.lazy(()=>I(()=>import("./index-DIzANfR6.js"),__vite__mapDeps([0,1]),import.meta.url)),Ll=p.lazy(()=>I(()=>import("./index-rDhoTVbw.js"),__vite__mapDeps([0,1]),import.meta.url));function Dl(){const{t:e}=R(),{navItem:t,updateAppInfo:n,TabComponent:s}=W(),{blocklet:o}=G(),{session:r}=st(),{teamDid:a}=Ce(),l=p.useMemo(()=>r?.user?.role&&Nt.includes(r.user.role),[r]),c=ne(async()=>(await sr.get(`${T.WELLKNOWN_BLOCKLET_HEALTH_PATH}/notification`,{params:{since:"24h"}})).data?.data,[a]),u=p.useMemo(()=>{const f=o?.settings?.notification||{},m=[];return m.push({name:"Email",icon:"lucide:mail",enabled:f.email?.enabled}),m.push({name:"Push Kit",icon:"lucide:bell",enabled:f.pushKit?.enabled}),m.push({name:"Wallet",icon:"lucide:wallet",enabled:!0}),m.push({name:"Webhook",icon:"lucide:webhook",enabled:!0}),m},[o]);p.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.websiteDesc")})},[t,e,n]),p.useEffect(()=>{const f=[],m=c.value?.channels||[];let g=0,h=0;Object.values(m).forEach(x=>{g+=x.state?.total??0,h+=x.state?.success??0}),f.push({label:`${e("notification.sendStatus.success")}(24h)`,value:i.jsxs("span",{children:[h," / ",g]}),to:`${t.link}/notifications`}),u.forEach(x=>{f.push({label:x.name,value:x.enabled?"ON":"OFF",to:`${t.link}/settings`})}),n({badges:f})},[n,u,c.value,e,t.link]);const d=p.useMemo(()=>[{label:e("notification.history"),value:"notifications",render:l?i.jsx(Il,{blocklet:o}):i.jsx(nn,{status:403})},{label:e("common.settings"),value:"settings",render:l?i.jsx(Ll,{}):i.jsx(nn,{status:403})}].filter(Boolean),[l,e,o]);return p.useEffect(()=>{n({tabs:d})},[d,n]),i.jsx(Y,{component:s})}const Tl=p.lazy(()=>I(()=>import("./config-kfbhKizi.js").then(e=>e.c),__vite__mapDeps([0,1]),import.meta.url)),Al=p.lazy(()=>I(()=>import("./index-BFym_Z-b.js"),__vite__mapDeps([0,1]),import.meta.url));function Ml(){const{t:e}=R(),{navItem:t,updateAppInfo:n,TabComponent:s}=W();p.useEffect(()=>{const r=t?.description||i.jsx(j,{dangerouslySetInnerHTML:{__html:e("navigation.aigneDesc",{aigneHubUrl:"https://store.blocklet.dev/blocklets/z8ia3xzq2tMq8CRHfaXj1BTYJyYnEcHbqP8cJ",mcpUrl:"https://modelcontextprotocol.io/"})}});n({name:t?.title||"",description:r})},[t,e,n]),p.useEffect(()=>{n({badges:[]})},[n]);const o=p.useMemo(()=>[{label:e("setup.steps.aigne"),value:"aigne-config",render:i.jsx(j,{sx:{maxWidth:1536},children:i.jsx(Tl,{})})},{label:e("common.mcpServers"),value:"mcp-servers",render:i.jsx(Al,{})}],[e]);return p.useEffect(()=>{n({tabs:o})},[o,n]),i.jsx(Y,{component:s})}const Rl=e=>p.createElement("svg",{viewBox:"0 0 24 17",xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("path",{d:"M79.4248 0.700195C85.1132 0.700234 89.7244 5.31169 89.7246 11V54.2344C89.7244 59.9227 85.1132 64.5341 79.4248 64.5342H11.1562C5.46786 64.5342 0.856682 59.9227 0.856445 54.2344V54.0186H5.45605V54.2344C5.45629 57.3822 8.00837 59.9336 11.1562 59.9336H79.4248C82.5726 59.9336 85.1248 57.3822 85.125 54.2344V11C85.1248 7.8522 82.5727 5.29984 79.4248 5.2998H11.1562C8.00837 5.2998 5.45629 7.85217 5.45605 11V11.4893H0.856445V11C0.856676 5.31166 5.46786 0.700195 11.1562 0.700195H79.4248ZM11.293 17.6914C14.2375 17.6914 16.7876 18.3114 18.9434 19.5508C21.1254 20.762 22.8219 22.4798 24.0312 24.7051C25.2406 26.9304 25.8447 29.5504 25.8447 32.5645C25.8447 35.5502 25.2405 38.1418 24.0312 40.3389C22.8219 42.536 21.1255 44.2399 18.9434 45.4512C16.7875 46.6624 14.2375 47.2686 11.293 47.2686H1V17.6914H11.293ZM35.2061 47.2686H29.8818V17.6914H35.2061V47.2686ZM50.8828 17.6914C53.8272 17.6914 56.3774 18.3114 58.5332 19.5508C60.7151 20.7619 62.4108 22.48 63.6201 24.7051C64.8295 26.9304 65.4346 29.5505 65.4346 32.5645C65.4346 35.5503 64.8295 38.1417 63.6201 40.3389C62.4108 42.5359 60.7152 44.2399 58.5332 45.4512C56.3774 46.6624 53.8272 47.2685 50.8828 47.2686H40.5898V17.6914H50.8828ZM73.4785 36.7568C75.1235 36.7568 76.457 38.0913 76.457 39.7363C76.4568 41.3811 75.1234 42.7148 73.4785 42.7148C71.8338 42.7147 70.5003 41.381 70.5 39.7363C70.5 38.0914 71.8336 36.757 73.4785 36.7568ZM6.32422 42.4941H11.1357C14.1064 42.4941 16.3934 41.6204 17.9971 39.874C19.6008 38.0994 20.4023 35.663 20.4023 32.5645C20.4023 29.4378 19.6008 26.9727 17.9971 25.1699C16.3934 23.3674 14.1063 22.4659 11.1357 22.4658H6.32422V42.4941ZM45.9141 42.4941H50.7246C53.6954 42.4941 55.9832 41.6205 57.5869 39.874C59.1905 38.0994 59.9922 35.6628 59.9922 32.5645C59.9922 29.4378 59.1906 26.9727 57.5869 25.1699C55.9832 23.3672 53.6954 22.4658 50.7246 22.4658H45.9141V42.4941ZM73.4785 22.8574C75.1235 22.8574 76.457 24.1909 76.457 25.8359C76.457 27.4809 75.1235 28.8145 73.4785 28.8145C71.8336 28.8143 70.5 27.4808 70.5 25.8359C70.5 24.191 71.8337 22.8576 73.4785 22.8574Z",fill:"currentColor"}));function Yo({width:e=24,color:t="black",backgroundColor:n="transparent"}){return i.jsx(j,{component:"span",sx:{width:e,display:"inline-block",verticalAlign:"middle",color:t,backgroundColor:n,fontSize:0},children:i.jsx(Rl,{viewBox:"0 0 90 65",xmlns:"http://www.w3.org/2000/svg",style:{position:"relative",top:-1,lineHeight:1}})})}Yo.propTypes={width:y.number,color:y.string,backgroundColor:y.string};function Pl(){const{api:e}=F(),{blocklet:t}=G(),{data:n,loading:s}=gr(()=>e.getBlocklet({input:{did:t?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!t?.meta?.did,refreshDeps:[t?.meta?.did]});return{blocklet:n?.blocklet??null,loading:s}}const Ol=p.lazy(()=>I(()=>import("./index-DoK2Rtvh.js"),__vite__mapDeps([0,1]),import.meta.url));function Nl(){const{palette:e}=V(),{t,locale:n}=R(),{navItem:s,updateAppInfo:o,TabComponent:r}=W(),{blocklet:a}=G(),{blocklet:l,loading:c}=Pl(),u=p.useMemo(()=>!!Ar(a?.environments),[a?.environments]);p.useEffect(()=>{const f=t("navigation.didSpacesDesc"),m=t("common.poweredBy",{brand:"$placeholder"}),g=f?f.slice(-1):"",[h,x]=m.split("$placeholder");o({name:s?.title||"",description:i.jsxs("span",{children:[f," ",h,i.jsxs("a",{href:`https://www.didspaces.com/${n}`,target:"_blank",style:{color:"#876bf4"},rel:"noreferrer",children:[i.jsx(Yo,{color:"#876bf4"})," Spaces"]}),x," ",g]})})},[s,t,n,o]),p.useEffect(()=>{const f=[];f.push({variant:"state",value:t(u?"storage.spaces.connected.tag":"storage.spaces.disconnected.tag"),color:u?"success":e.text.secondary,loading:c}),f.push({label:t("blocklet.runtimeInfo.dataStorage"),value:Hn(l?.diskInfo?.data??0),loading:c}),o({badges:f})},[o,u,l,c,t,e]);const d=p.useMemo(()=>[{label:t("common.backup"),value:"did-spaces",render:i.jsx(Ol,{navOrientation:"horizontal"})}],[t]);return p.useEffect(()=>{o({tabs:d})},[d,o]),i.jsx(Y,{component:r})}const $l=p.lazy(()=>I(()=>import("./index-CTE1ENlu.js"),__vite__mapDeps([0,1,2]),import.meta.url));function Bl(){const{t:e}=R(),{navItem:t,updateAppInfo:n,TabComponent:s}=W(),{teamDid:o}=Ce(),{api:r}=F(),a=ne(()=>r.getBlockletBaseInfo({input:{teamDid:o}}),[o,r]);p.useEffect(()=>{n({name:t?.title||"",description:t?.description||e("navigation.publishDesc")})},[t,e,n]),p.useEffect(()=>{const c=[],{blocklets:u=0,releases:d=0}=a.value?.studio??{};c.push({variant:"number",label:e("common.blocklets"),value:u,round:0,loading:a.loading}),c.push({variant:"number",label:e("common.releases"),value:d,round:0,loading:a.loading}),n({badges:c})},[n,a.value,a.loading,e]);const l=p.useMemo(()=>[{label:e("common.blocklets"),value:"publish",render:i.jsx($l,{})}],[e]);return p.useEffect(()=>{n({tabs:l})},[l,n]),i.jsx(Y,{component:s})}const Hl=new Map([["overview",al],["operations",fl],["integrations",gl],["did-connect",Sl],["website",El],["notification",Dl],["aigne",Ml],["did-spaces",Nl],["publish",Bl]]),Ul=te(T.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),zl=e=>{const{enqueueSnackbar:t}=Un(),n=p.useCallback(s=>Yn(Ul,{id:s.id,severity:s.severity||"all",componentDid:s.source==="system"?"system":s.componentDid||"all"}),[]);ir(`${e}/${T.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,s=>{const o=n(s),{severity:r,description:a}=s||{},l=["error","warning"].includes(r)||s.sticky;s.source==="system"&&t(a,{variant:r,autoHideDuration:l?null:5e3,anchorOrigin:{vertical:"top",horizontal:"center"},content:c=>i.jsx(Vr,{viewAllUrl:o,keyId:c,notification:s,content:i.jsx(Er,{notification:s,minimal:!0,rows:0})})})},[],"user")};function Vl(){const{t:e}=R(),t=On(),{app:n="overview",tab:s}=Ds(),{blocklet:o,refreshFlag:r}=ot(),{session:a}=st(),l=K(()=>a?.user?.did,[a]);zl(l);const c=Hl.get(n),u=K(()=>te(T.WELLKNOWN_BLOCKLET_ADMIN_PATH,n==="overview"?"":n),[n]),d=K(()=>(o?.site?.domainAliases||[]).map(h=>h.value),[o]),f=K(()=>{if(!o)return!0;try{const h=o.configs?.find(b=>b.key==="BLOCKLET_APP_URL")?.value;if(!h||!d.length)return!0;const{host:x}=new URL(h);return d.some(b=>b===x)}catch{return!1}},[o,d]),m=p.useCallback(h=>{t(`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${n}/${h}`)},[t,n]),g=o?i.jsx(Zn,{type:"components",children:i.jsx(c,{})}):i.jsx(qe,{relative:"parent",children:i.jsx(Z,{})});return i.jsx(_r,{children:i.jsx(Uo,{appPath:u,appTab:s,onAppTabChange:m,children:i.jsxs(Wl,{children:[!f&&i.jsx(Je,{severity:"warning",sx:{mb:2,py:2},action:i.jsxs(j,{sx:{display:"flex",gap:1,alignItems:"center"},children:[i.jsx(St,{size:"small",onClick:()=>{t(`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/website/branding`)},children:e("invalidAppUrl.viewConfig")}),i.jsx(St,{variant:"contained",size:"small",onClick:()=>{t(`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/website/domains`)},children:e("invalidAppUrl.viewDomains")})]}),children:e("invalidAppUrl.desc")}),i.jsx(Pr,{}),i.jsx(Qa,{}),g]})},`${r}`)})}function Fl(){const{blocklet:e}=ot(),t=e?.meta?.did;return p.useEffect(()=>{const n=rr();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),i.jsx(Vl,{})}const Wl=nt.main`
|
|
62
|
+
.page-header {
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: space-between;
|
|
65
|
+
align-items: center;
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
gap: 16px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.page-title {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
|
|
74
|
+
.page-link {
|
|
75
|
+
font-size: 15px;
|
|
76
|
+
margin-top: 8px;
|
|
77
|
+
margin-left: 8px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
82
|
+
.page-header {
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
.page-actions,
|
|
86
|
+
.MuiButtonGroup-root {
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
.MuiButtonGroup-root {
|
|
90
|
+
.MuiButtonBase-root {
|
|
91
|
+
flex: 1;
|
|
92
|
+
}
|
|
93
|
+
.blocklet-action-text {
|
|
94
|
+
display: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.page-title {
|
|
100
|
+
margin-bottom: 15px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
`,pc=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"}));export{Do as B,Lo as W,Bo as Z,Pl as a,re as b,pc as d,xn as m,Mo as p,fc as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,ak as o,aZ as h,T as j,z as g,W as i}from"./vendor-mui-core-DnR6WYuU.js";import{V as _}from"./vendor-ux-
|
|
1
|
+
import{j as e,ak as o,aZ as h,T as j,z as g,W as i}from"./vendor-mui-core-DnR6WYuU.js";import{V as _}from"./vendor-ux-B5w9dHEo.js";import{C as b}from"./click-to-copy-P5mPeLGL.js";import{C as k}from"./confirm-8-up_m-t.js";function R({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=_(),n={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(h,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(b,{"data-cy":"click-copy",children:t})]}),e.jsx(j,{component:"div",children:e.jsx(g,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(k,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})}R.propTypes={title:i.any.isRequired,keyName:i.any.isRequired,description:i.any.isRequired,confirmPlaceholder:i.any.isRequired,cancel:i.string,confirm:i.string,params:i.object,onCancel:i.func,onConfirm:i.func.isRequired};export{R as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,bb as p,W as r}from"./vendor-mui-core-DnR6WYuU.js";import{L as f}from"./vendor-react-CTtPmzVP.js";import{J as l}from"./vendor-ux-
|
|
1
|
+
import{j as o,bb as p,W as r}from"./vendor-mui-core-DnR6WYuU.js";import{L as f}from"./vendor-react-CTtPmzVP.js";import{J as l}from"./vendor-ux-B5w9dHEo.js";function m({did:s,href:t="",external:i=!1,avatarProps:n={},to:a="",...d}){const e=o.jsx(l,{did:s,...d,avatarProps:n,to:a});return t?i?o.jsx(p,{target:"_blank",href:t,underline:"hover",children:e}):o.jsx(f,{to:t,children:e}):e}m.propTypes={did:r.string.isRequired,to:r.string,href:r.string,avatarProps:r.object,external:r.bool};export{m as W};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o,ak as i,at as g,W as u}from"./vendor-mui-core-DnR6WYuU.js";import{y as v,q as C,aA as b,o as B}from"./index-
|
|
1
|
+
import{j as o,ak as i,at as g,W as u}from"./vendor-mui-core-DnR6WYuU.js";import{y as v,q as C,aA as b,o as B}from"./index-BlSveGp8.js";import{D as E,a as I,b as w}from"./domain-action-card-BmOv4oe5.js";import{aT as T}from"./vendor-ux-B5w9dHEo.js";import{a as A}from"./page-header-CHAwrgX-.js";import{r,j as W}from"./vendor-react-CTtPmzVP.js";import{u as L}from"./useSetState-L-f8mSga.js";import{S as x}from"./button-dwhnNiIp.js";import{S as $}from"./layout-CHuGuIJt.js";import{S as z}from"./step-actions-DS32mD8U.js";import"./vendor-arcblock-BwnwoPBM.js";import"./vendor-utils-drLlzTVq.js";import"./vendor-hooks-cYMUGE4V.js";import"./lottie-web-4koyQiv_.js";import"./permission-BJlcNSeA.js";import"./session-Cqrj8_SK.js";import"./useAsyncRetry--1T7wYe2.js";import"./useAsync-xXSiXzwr.js";import"./confirm-8-up_m-t.js";import"./index-DBs9Ljax.js";import"./actions-Dfiiwkit.js";import"./delete-confirm-D_45dT2a.js";import"./click-to-copy-P5mPeLGL.js";import"./useAsync-VEqKX7rF.js";import"./index-DM9inqt9.js";import"./util-B7Ad6Wyn.js";import"./engine-Cm_CGBhX.js";import"./content-layout-DmSBGGVm.js";import"./use-mobile-D5clNlrm.js";function h({onNext:a=()=>{},onPrevious:f=()=>{}}){const{t:s}=r.useContext(T),[D,d]=r.useState(!1),{blocklet:e}=v(),[p,S]=r.useState(""),j=((e?.site||{}).domainAliases||[]).map(t=>C.replaceSlotToIp(t.value,p)),[n,m]=L({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),c=e.environments?.find(t=>t.key==="BLOCKLET_APP_PK")?.value,y=j.find(t=>b.isDidDomain(t)),[l,P]=W();return r.useEffect(()=>{B.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:t})=>{S(t.address||"")}).catch(t=>{console.error(t.message)})},[]),o.jsxs(H,{children:[o.jsx(i,{className:"header",children:o.jsx(A,{title:s("setup.domain.title"),subTitle:s("setup.domain.subTitle"),onClickBack:f})}),o.jsxs(i,{className:"form form-container",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[o.jsxs(i,{children:[o.jsx(i,{sx:{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem"},children:o.jsx(i,{sx:{display:"inline"},children:`${s("setup.domain.buyOrConnect")} (${s("common.optional")})`})}),o.jsx(i,{sx:{mt:1},children:o.jsx(I,{blocklet:e,bugDidDomainProps:{appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,inBlockletSetup:!0},connectDomainProps:{autoFocus:!1,appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,cnameDomain:y,currentIp:p,inBlockletSetup:!0,shouldCheckDomain:!0,onInputDomain:t=>{m({domain:t.domain,type:t.type}),d(t.error)},onStateChange:t=>m({addDomainState:t}),onSuccess:t=>{const k={domain:t.domain,type:t.type,nftDid:t.nftDid,chainHost:t.chainHost};l.set("redirect",t.domain),P(l,{replace:!0}),m(k),a()},onError:d}})})]}),o.jsx(i,{children:o.jsx(w,{inSetup:!0,showAllDomains:!0,systemTips:o.jsx(i,{sx:{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",mb:1},children:o.jsx(i,{sx:{display:"inline"},children:s("setup.domain.skipDescription")})})})})]}),o.jsx(z,{mt:8,disabled:!!n.addDomainState.text,blocklet:e,onStartNow:()=>a("complete"),children:n.domain?o.jsx(x,{variant:"contained",loading:!!n.addDomainState.text,disabled:D||!!n.addDomainState.text||!n.domain,onClick:()=>a(),children:n.addDomainState.text||s("setup.continue")}):o.jsx(x,{variant:"contained",disabled:!!n.addDomainState.text,onClick:()=>a(),children:s("setup.continue")})})]})}function ht(a){return o.jsx(E,{children:o.jsx(h,{...a})})}h.propTypes={onNext:u.func,onPrevious:u.func};const H=g($)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: hidden;
|
|
4
4
|
|