@abtnode/blocklet-services 1.16.41-beta-20250325-154552-2bf78c26 → 1.16.41-beta-20250329-232306-53c45e3b
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/emails/_components/actions.js +9 -0
- package/api/emails/{components → _components}/article.js +1 -1
- package/api/emails/{components → _components}/asset.js +2 -2
- package/api/emails/{components → _components}/attachments.js +15 -13
- package/api/emails/{components → _components}/compose.js +2 -2
- package/api/emails/_components/content.js +15 -0
- package/api/emails/{components → _components}/footer.js +1 -1
- package/api/emails/{components → _components}/powered-by.js +1 -1
- package/api/emails/{components → _components}/token.js +2 -2
- package/api/emails/{components → _components}/transaction.js +1 -1
- package/api/emails/{pages → _templates}/notification.js +10 -10
- package/api/emails/_templates/verify-code-body.js +49 -0
- package/api/emails/_templates/verify-code.js +37 -0
- package/api/index.js +59 -71
- package/api/libs/auth/utils.js +20 -1
- package/api/libs/connect/session.js +55 -3
- package/api/libs/email.js +48 -16
- package/api/middlewares/body-parser.js +10 -0
- package/api/routes/blocklet.js +17 -4
- package/api/routes/federated.js +36 -13
- package/api/routes/mcp.js +87 -0
- package/api/routes/user-session.js +16 -1
- package/api/routes/user.js +442 -40
- package/api/services/auth/connect/issue-passport.js +4 -3
- package/api/services/auth/connect/receive-transfer-app-owner.js +17 -1
- package/api/services/auth/connect/verify-destroy.js +20 -0
- package/api/services/auth/connect/verify-elevated.js +20 -0
- package/api/services/auth/index.js +0 -2
- package/api/services/auth/session.js +1 -1
- package/api/services/kyc/index.js +1 -1
- package/api/services/mcp/server.js +37 -0
- package/api/services/notification/queue.js +5 -4
- package/api/services/studio/index.js +4 -0
- package/api/util/federated.js +16 -0
- package/dist/assets/{ArrowDropDown-DH8_DBvh.js → ArrowDropDown-odHjNJIs.js} +1 -1
- package/dist/assets/{CheckCircle-W4GlzCdu.js → CheckCircle-BqOSvJMp.js} +1 -1
- package/dist/assets/{ChevronLeft-B2SRhM5v.js → ChevronLeft-Dv7rlUf5.js} +1 -1
- package/dist/assets/{ChevronRight-ZvmzY6T1.js → ChevronRight-CWeJn1iz.js} +1 -1
- package/dist/assets/{Community-DxXfm8O3.js → Community-CMFBTMi_.js} +1 -1
- package/dist/assets/{DeleteOutline-ClZd2kP1.js → DeleteOutline-Cr-TyrUV.js} +1 -1
- package/dist/assets/{Done-DAdEZjfp.js → Done-C1TA1wbA.js} +1 -1
- package/dist/assets/{Download-fAYCJ3Zn.js → Download-DxhnUTM_.js} +1 -1
- package/dist/assets/{EditIcon-jPGouFji.js → EditIcon-Bgmg6UE0.js} +1 -1
- package/dist/assets/{Email-Cj6caJ_8.js → Email-BphlAPta.js} +1 -1
- package/dist/assets/{Error-DzDuzV0d.js → Error-pXXvJFxN.js} +1 -1
- package/dist/assets/{ExpandLess-CSwVcrV9.js → ExpandLess-Dc_dI20M.js} +1 -1
- package/dist/assets/{Google-DaNgbmbg.js → Google-DNUuYFIA.js} +1 -1
- package/dist/assets/{Holiday-1uY1QmAp.js → Holiday-DKefG3Bb.js} +1 -1
- package/dist/assets/{InfoOutlined-o8YCo8qy.js → InfoOutlined-CEUhR4DY.js} +1 -1
- package/dist/assets/{Launch-B5cUT_sx.js → Launch-BUTOr3cR.js} +1 -1
- package/dist/assets/{LaunchOutlined-CqJ3-tbE.js → LaunchOutlined-QHq-RUJt.js} +1 -1
- package/dist/assets/{Location-C1pAq6lI.js → Location-BuaxMxu4.js} +1 -1
- package/dist/assets/{LockIcon-CydBoNUN.js → LockIcon-CQ1tExIY.js} +1 -1
- package/dist/assets/{Meeting-tZebh2B1.js → Meeting-Cs60QtvP.js} +1 -1
- package/dist/assets/{MoreHoriz-C_oNEMFs.js → MoreHoriz-D1SOL47a.js} +1 -1
- package/dist/assets/{OffSick-BYC1oqk1.js → OffSick-DinPaelp.js} +1 -1
- package/dist/assets/{Phone-DIzOgVDd.js → Phone-BmouKMyi.js} +1 -1
- package/dist/assets/{PlayArrow-BVARrWHX.js → PlayArrow-D7cGSxeN.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-B5JWLChh.js → QuestionMarkCircle-Dt9XJWEe.js} +1 -1
- package/dist/assets/{ServerLogo-DIfW0NaH.js → ServerLogo-B33ZRE5q.js} +1 -1
- package/dist/assets/{Timezone-D7zhOyHu.js → Timezone-CyMhRxlx.js} +1 -1
- package/dist/assets/{ViewList-93ffk7kT.js → ViewList-vu1qOJ6P.js} +1 -1
- package/dist/assets/{WorkingRemotely-0VF9S3Zo.js → WorkingRemotely-BP_VIHeM.js} +1 -1
- package/dist/assets/access-control-CpxcJItK.js +14 -0
- package/dist/assets/{actions-D-igEkC_.js → actions-4oGfCMlR.js} +1 -1
- package/dist/assets/add-component-core-CE0nArG4.js +761 -0
- package/dist/assets/add-resource-BYM4JwzE.js +1 -0
- package/dist/assets/{addon-DKPnFM-d.js → addon-B9bb2bvM.js} +1 -1
- package/dist/assets/analytics-BXLe73MI.js +11 -0
- package/dist/assets/api-D9Yi7Zdr.js +1 -0
- package/dist/assets/appearance-DX7SoW1u.js +1 -0
- package/dist/assets/ar-2k9jaPIk.js +3 -0
- package/dist/assets/{audit-logs-BQlJ8qXs.js → audit-logs-D8H5E0fC.js} +3 -3
- package/dist/assets/{base32-CUcA0Dp2.js → base32-BNpDT-6Q.js} +1 -1
- package/dist/assets/{branding-DxSd76KG.js → branding-BW1rhy8d.js} +2 -2
- package/dist/assets/bundle-avatar-DHwmIozH.js +1 -0
- package/dist/assets/button-CNnuiac8.js +1 -0
- package/dist/assets/{click-to-copy-DiELz5Xb.js → click-to-copy-B0HMuCN_.js} +1 -1
- package/dist/assets/complete-BNf0-iqY.js +45 -0
- package/dist/assets/{component-DXUL6eiU.js → component-1r0VSsqq.js} +2 -2
- package/dist/assets/{config-CCTS8ZgJ.js → config-BeD5_8kr.js} +2 -2
- package/dist/assets/config-CqHmZdZv.js +1 -0
- package/dist/assets/{config-navigation-DH0a1AcG.js → config-navigation-DtN0_qFZ.js} +3 -3
- package/dist/assets/{config-space-CDBT30Fy.js → config-space-DlwZewcm.js} +1 -1
- package/dist/assets/{confirm-H5SukzMZ.js → confirm-DmMN-34s.js} +2 -2
- package/dist/assets/connect-BfSOEYV-.js +1 -0
- package/dist/assets/{connect-BQBuxZq7.js → connect-CC9dcVMV.js} +1 -1
- package/dist/assets/{connect-to-DqrgfOZi.js → connect-to-CzffwD9G.js} +1 -1
- package/dist/assets/{content-layout-CIzNOca5.js → content-layout-7vu3yv_f.js} +1 -1
- package/dist/assets/dashboard-C_Q4TjPa.js +216 -0
- package/dist/assets/de-B9cLhykn.js +3 -0
- package/dist/assets/{delete-confirm-CdzeQQ8r.js → delete-confirm-BTaU_6Kx.js} +1 -1
- package/dist/assets/did-address-BC-0j4Pt.js +1 -0
- package/dist/assets/{domain-B79dyXvl.js → domain-CLMRXecU.js} +1 -1
- package/dist/assets/{domain-action-card-DB2tCUnz.js → domain-action-card-DwQ7Q8wY.js} +2 -2
- package/dist/assets/domains-DF7TtN5q.js +1 -0
- package/dist/assets/{email-DArp9y3R.js → email-mj0bVFDS.js} +2 -2
- package/dist/assets/es-BoQohonz.js +3 -0
- package/dist/assets/{exchange-passport-CcBW-4OT.js → exchange-passport--DeUPzbW.js} +1 -1
- package/dist/assets/form-text-input-BYF6lVnE.js +11 -0
- package/dist/assets/fr-doSYAOrt.js +3 -0
- package/dist/assets/{fuel-BXqPbUK0.js → fuel-D-kOZuF6.js} +1 -1
- package/dist/assets/{fullpage-BAGs-W5J.js → fullpage-DO8Hcbkl.js} +1 -1
- package/dist/assets/{get-safe-url-Bs400iLS.js → get-safe-url-BKl2A9x2.js} +1 -1
- package/dist/assets/{get-safe-url-DtTGgWbn.js → get-safe-url-QFq5JNoE.js} +1 -1
- package/dist/assets/hi-B_BwhpD8.js +1 -0
- package/dist/assets/{home-C9GJ4K7b.js → home-CpnMpXiw.js} +1 -1
- package/dist/assets/id-BgYIZCvk.js +3 -0
- package/dist/assets/{iframe-_xmo1lin.js → iframe-B9mCpo4I.js} +1 -1
- package/dist/assets/{index-BHs362aB.js → index-79U1RPaq.js} +1 -1
- package/dist/assets/{index-CfSdyisA.js → index-B4Q2DAdn.js} +11 -11
- package/dist/assets/index-BJ2lJo7L.js +346 -0
- package/dist/assets/{index-Ca7t5vsG.js → index-BMSA5TdD.js} +1 -1
- package/dist/assets/{index-B8YUhcxT.js → index-BVOYP6aR.js} +2 -2
- package/dist/assets/{index-Dz061vzT.js → index-BZvVDfZ4.js} +1 -1
- package/dist/assets/index-BsUr7wGb.js +104 -0
- package/dist/assets/index-C44fECmB.js +138 -0
- package/dist/assets/{index-CHdEjF6N.js → index-CGK3FEjY.js} +2 -2
- package/dist/assets/{index-Cr3r3Dk2.js → index-CJCg9yIK.js} +1 -1
- package/dist/assets/index-CmKAznDh.js +109 -0
- package/dist/assets/{index-G1H3TvXv.js → index-Ct7s2LPI.js} +3 -3
- package/dist/assets/{index-cfNltkU-.js → index-DQ_RzIwU.js} +2 -2
- package/dist/assets/{index-Dq2tckVf.js → index-D_wVtHmh.js} +1 -1
- package/dist/assets/{index-CyBY00Un.js → index-DqC2o5PB.js} +1 -1
- package/dist/assets/index-DyTFEgKr.js +1 -0
- package/dist/assets/index-eCY24sH9.js +137 -0
- package/dist/assets/{index-CHtbhPPM.js → index-fWGZM-oP.js} +1 -1
- package/dist/assets/index-gTQQ3SoE.js +290 -0
- package/dist/assets/index-gcSQTx25.js +1 -0
- package/dist/assets/{index-rEtARSUO.js → index-m8CaSxXx.js} +1 -1
- package/dist/assets/{index-BI7HW_KL.js → index-u-lA6P_E.js} +1 -1
- package/dist/assets/invitation-B8Qx_pFq.js +176 -0
- package/dist/assets/invite-BBaF_vyc.js +1 -0
- package/dist/assets/{issue-passport-D2H1iXFG.js → issue-passport-DC-ly7xg.js} +1 -1
- package/dist/assets/{item-BZnflB1r.js → item-BSGXym2I.js} +1 -1
- package/dist/assets/ja-FMMLI8YD.js +3 -0
- package/dist/assets/ko-C0kmRXYE.js +3 -0
- package/dist/assets/{launch-result-message-JdCxLBHF.js → launch-result-message-ByEG8r_7.js} +1 -1
- package/dist/assets/{layout-BKTXvgtN.js → layout-BqhTD729.js} +1 -1
- package/dist/assets/list-BHs8uNT5.js +200 -0
- package/dist/assets/{list-header-C3JMIP96.js → list-header-BmTDmRY0.js} +1 -1
- package/dist/assets/localization-daPAWMzR.js +1 -0
- package/dist/assets/{log-DSC3nDef.js → log-o_Cadt8j.js} +7 -7
- package/dist/assets/{login-B_V3KWS7.js → login-BQozrLDm.js} +1 -1
- package/dist/assets/{login-oauth-callback-GH6m7W6J.js → login-oauth-callback-D7lIww1c.js} +1 -1
- package/dist/assets/{logo-uploader-B-xodQLr.js → logo-uploader-CUQ3aWZJ.js} +3 -3
- package/dist/assets/{lost-passport-BY5kSBj4.js → lost-passport-DkETH2Lu.js} +3 -3
- package/dist/assets/{omit-Ci0YZl3b.js → omit-DZNQhOf-.js} +1 -1
- package/dist/assets/{open-window-BZb1m3jN.js → open-window-BOl-kTC2.js} +1 -1
- package/dist/assets/{overview-5mVt0_gG.js → overview-Bxm05EH6.js} +1 -1
- package/dist/assets/{page-header-Mpx7DhlL.js → page-header-Dm1v9v5q.js} +1 -1
- package/dist/assets/{permission-EnWLSYpS.js → permission-B5jnw9r2.js} +1 -1
- package/dist/assets/{preferences-BzIch5vg.js → preferences-uri2RXdB.js} +1 -1
- package/dist/assets/profile-embed-DnIQcD-H.js +1 -0
- package/dist/assets/pt-C2UJZK-O.js +1 -0
- package/dist/assets/publish-resource-V53U1NNv.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-DMqCPytx.js → react-beautiful-dnd.esm-B9MfX9Xl.js} +1 -1
- package/dist/assets/{relative-time-DmrCbKZi.js → relative-time-RQnsWZQc.js} +1 -1
- package/dist/assets/ru-DDA5s4-r.js +1 -0
- package/dist/assets/sdk-BKSsfgrc.js +1 -0
- package/dist/assets/{session-hH9Eluc3.js → session-6ZeN-aF2.js} +1 -1
- package/dist/assets/{setup-BQ9DJQAR.js → setup-7Gq9K_8k.js} +3 -3
- package/dist/assets/{shorten-label-Blq5nIR4.js → shorten-label-DkFTGSoy.js} +1 -1
- package/dist/assets/simple-select-CqakAZFe.js +1 -0
- package/dist/assets/{slicedToArray-0JAP92RR.js → slicedToArray-BuQur6Mi.js} +2 -2
- package/dist/assets/{start-Cqxem84z.js → start-BSUY3DBl.js} +1 -1
- package/dist/assets/{status-BEcCvVw5.js → status-C52-BFuY.js} +1 -1
- package/dist/assets/{step-actions-D1R71ufh.js → step-actions-CA74dwgt.js} +1 -1
- package/dist/assets/{studio-CWSkuYqL.js → studio-CAnZfyBM.js} +1 -1
- package/dist/assets/{switch-control-j36Oahia.js → switch-control-BBlLGjaH.js} +1 -1
- package/dist/assets/th-DmqOUn4C.js +1 -0
- package/dist/assets/{traffic-G34OrdMK.js → traffic-CJDIGmp5.js} +3 -3
- package/dist/assets/{transfer-CN7lhztm.js → transfer-cG2e24sz.js} +1 -1
- package/dist/assets/{unsubscribe-DO25Mrza.js → unsubscribe-afXXIHEf.js} +1 -1
- package/dist/assets/{use-mobile-Cz1u01jc.js → use-mobile-CUT5hy9q.js} +1 -1
- package/dist/assets/{useAsync-C8pcYSnj.js → useAsync-DM8qaMe4.js} +1 -1
- package/dist/assets/{useAsyncRetry-Hh30zerD.js → useAsyncRetry-B7SbzXVI.js} +1 -1
- package/dist/assets/{useLocalStorage-CBIpQ2Ch.js → useLocalStorage-Dd4pybDP.js} +1 -1
- package/dist/assets/user-center-T8Xw464s.js +67 -0
- package/dist/assets/{util-0vNCtiZj.js → util-C_BCTHfw.js} +1 -1
- package/dist/assets/{util-BfC763vn.js → util-YyWTpLT7.js} +1 -1
- package/dist/assets/vendor-arcblock-DvaaLvvM.js +2361 -0
- package/dist/assets/{vendor-hooks-CBQlROWx.js → vendor-hooks-sw5wvnca.js} +2 -2
- package/dist/assets/vendor-mui-core-DxqV1NVn.js +266 -0
- package/dist/assets/{vendor-mui-x-Bv7Ku5uo.js → vendor-mui-x-BjL1xCkk.js} +1 -1
- package/dist/assets/{vendor-utils-C7-Bj8sT.js → vendor-utils-DR57WNxP.js} +7 -7
- package/dist/assets/{vendor-ux-did-connect-BH_4FkUq.js → vendor-ux-did-connect-Bciw9Ypu.js} +56 -56
- package/dist/assets/vi-Cf__CtPD.js +1 -0
- package/dist/assets/wrap-locale-CX50Vz0w.js +1 -0
- package/dist/assets/zh-NXspK2yu.js +4 -0
- package/dist/assets/zh-tw-DYYDVX5I.js +3 -0
- package/dist/index.html +6 -6
- package/dist/service-worker.js +2 -2
- package/package.json +41 -36
- package/api/emails/components/actions.js +0 -9
- package/api/emails/components/content.js +0 -15
- package/dist/assets/ExternalIssuerIcon-D0E4reWK.js +0 -1
- package/dist/assets/access-control-DjkJ52P9.js +0 -13
- package/dist/assets/add-component-core-CcInVCBe.js +0 -765
- package/dist/assets/add-resource-Bcw4sA7r.js +0 -1
- package/dist/assets/analytics-Co9lkVsN.js +0 -11
- package/dist/assets/api-tckMpb-p.js +0 -1
- package/dist/assets/ar-2G9aaruy.js +0 -3
- package/dist/assets/bundle-avatar-BwOOmJKx.js +0 -1
- package/dist/assets/button-DmhvlTQK.js +0 -1
- package/dist/assets/complete-ClE81Ny0.js +0 -45
- package/dist/assets/config-Bn72hRZH.js +0 -1
- package/dist/assets/connect-CWgAo1rD.js +0 -1
- package/dist/assets/dashboard-Bqm_hK4M.js +0 -218
- package/dist/assets/de-DuOaMdcm.js +0 -3
- package/dist/assets/did-address-xFa47-Qp.js +0 -1
- package/dist/assets/domains-A7coEqfv.js +0 -1
- package/dist/assets/es-B_z4kZV7.js +0 -3
- package/dist/assets/form-text-input-CFoWUNjT.js +0 -11
- package/dist/assets/fr-U4jlLji5.js +0 -3
- package/dist/assets/hi-CgWMOeSW.js +0 -1
- package/dist/assets/id-DcVdw_iD.js +0 -3
- package/dist/assets/index-BAJ44Gvx.js +0 -104
- package/dist/assets/index-BGBHkKrL.js +0 -109
- package/dist/assets/index-BPRjg-Ha.js +0 -346
- package/dist/assets/index-CJi_sgz3.js +0 -137
- package/dist/assets/index-CscSMswD.js +0 -1
- package/dist/assets/index-CvTkROvr.js +0 -1
- package/dist/assets/index-Dkv68xvd.js +0 -138
- package/dist/assets/index-DuWgtqAp.js +0 -134
- package/dist/assets/invitation-D8ocHjTZ.js +0 -176
- package/dist/assets/invite-CtafhjzX.js +0 -1
- package/dist/assets/ja-CqyNiw8I.js +0 -3
- package/dist/assets/ko-CwboHZNL.js +0 -3
- package/dist/assets/list-BiMW09TE.js +0 -195
- package/dist/assets/localization-B4PX_18r.js +0 -1
- package/dist/assets/login-bg-CBktcoss.jpg +0 -0
- package/dist/assets/profile-embed-BAeyCzz5.js +0 -1
- package/dist/assets/pt-UQ_ShTDa.js +0 -1
- package/dist/assets/publish-resource-OFt0IRNl.js +0 -1
- package/dist/assets/ru-BJ0AXHkS.js +0 -1
- package/dist/assets/sdk-B1fQwlHL.js +0 -1
- package/dist/assets/simple-select-DZdEq8ET.js +0 -1
- package/dist/assets/th-CxA-Ohjf.js +0 -1
- package/dist/assets/user-center-He8jbYsT.js +0 -79
- package/dist/assets/vendor-arcblock-CxRF9kO4.js +0 -2361
- package/dist/assets/vendor-mui-core-ClwXKILA.js +0 -266
- package/dist/assets/vi-Dp8eof12.js +0 -1
- package/dist/assets/wrap-locale-BI93VtNG.js +0 -1
- package/dist/assets/zh-D2dwMdph.js +0 -4
- package/dist/assets/zh-tw-9pjBCUZn.js +0 -3
- /package/api/emails/{components → _components}/copyright.js +0 -0
- /package/api/emails/{components → _components}/dapp.js +0 -0
- /package/api/emails/{components → _components}/header.js +0 -0
- /package/api/emails/{components → _components}/layout.js +0 -0
- /package/api/emails/{libs → _libs}/chain.js +0 -0
- /package/api/emails/{libs → _libs}/config.js +0 -0
- /package/api/emails/{libs → _libs}/constant.js +0 -0
- /package/api/emails/{libs → _libs}/explorer-url.js +0 -0
- /package/api/emails/{libs → _libs}/func.js +0 -0
- /package/api/emails/{libs → _libs}/highlight.js +0 -0
- /package/api/emails/{libs → _libs}/style.js +0 -0
- /package/api/emails/{libs → _libs}/util.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as A,v as R,p as w,e as p}from"./index-
|
|
1
|
+
import{d as A,v as R,p as w,e as p}from"./index-m8CaSxXx.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import{r as P,b as st,g as vi}from"./vendor-react-DoD83n6N.js";import{a as yi,m as ot}from"./vendor-hooks-sw5wvnca.js";import{a2 as ge,j as e,E as C,ae as xe,bi as us,T as q,a5 as Ce,s as zt,A as Mt,a4 as j,aa as ce,al as ji,a3 as Q,ad as zs,I as ne,M as ie,ak as nt,K as Si,bo as Ms,c0 as Ns,c1 as Ge,bN as Fs,bn as Bs,bs as Ci,bp as Ti,bM as ki,t as Ri,x as _i,bk as Pi}from"./vendor-mui-core-DxqV1NVn.js";import{r as be,u as H,R as Ii,ai as ps,ak as de,aq as Ai,W as F,a3 as Nt,p as fe,B as K,Y as Ft,bl as Hs,aj as Di,b1 as Ei,bE as ms,b9 as Oi,bD as Li}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{c as zi}from"./index-tUQxVYYQ.js";import{A as B,m as it,v as $s,O as Oe,D as Mi,aa as Ni,f as Fi,h as Bi,b as Ze,at as Hi,au as qs}from"./index-BsUr7wGb.js";import{e as $i,l as qi,m as Bt,y as Me}from"./vendor-arcblock-DvaaLvvM.js";import{W as Pe}from"./did-address-BC-0j4Pt.js";import{u as Z}from"./dashboard-C_Q4TjPa.js";import{p as Ht}from"./util-YyWTpLT7.js";import{w as we,P as Us}from"./permission-B5jnw9r2.js";import{C as Ui}from"./Google-DNUuYFIA.js";import{K as Ie,ar as fs,I as Wi}from"./vendor-utils-DR57WNxP.js";import{E as ut}from"./EditIcon-Bgmg6UE0.js";import{C as $t}from"./confirm-DmMN-34s.js";import{L as Ws}from"./list-header-BmTDmRY0.js";import{f as Ye}from"./format-error-LAoTjvJe.js";import{_ as Vi}from"./useSetState-BL3ktMon.js";import{L as Gi}from"./LockIcon-CQ1tExIY.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-Dd4pybDP.js";import"./PlayArrow-D7cGSxeN.js";import"./get-safe-url-QFq5JNoE.js";import"./index-DyTFEgKr.js";import"./session-6ZeN-aF2.js";import"./useAsyncRetry-B7SbzXVI.js";import"./useAsync-DM8qaMe4.js";import"./InfoOutlined-CEUhR4DY.js";import"./base32-BNpDT-6Q.js";var qt={},Yi=ge;Object.defineProperty(qt,"__esModule",{value:!0});var It=qt.default=void 0;Zi(P);var Ki=Yi(be()),Xi=e;function Vs(t){if(typeof WeakMap!="function")return null;var s=new WeakMap,i=new WeakMap;return(Vs=function(p){return p?i:s})(t)}function Zi(t,s){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var i=Vs(s);if(i&&i.has(t))return i.get(t);var p={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in t)if(d!=="default"&&Object.prototype.hasOwnProperty.call(t,d)){var m=n?Object.getOwnPropertyDescriptor(t,d):null;m&&(m.get||m.set)?Object.defineProperty(p,d,m):p[d]=t[d]}return p.default=t,i&&i.set(t,p),p}It=qt.default=(0,Ki.default)((0,Xi.jsx)("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"}),"Apple");var Ut={},Ji=ge;Object.defineProperty(Ut,"__esModule",{value:!0});var Gs=Ut.default=void 0,Qi=Ji(be()),er=e;Gs=Ut.default=(0,Qi.default)((0,er.jsx)("path",{d:"M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"}),"Laptop");var Wt={},tr=ge;Object.defineProperty(Wt,"__esModule",{value:!0});var rt=Wt.default=void 0,sr=tr(be()),ir=e;rt=Wt.default=(0,sr.default)((0,ir.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"}),"Web");var Vt={},rr=ge;Object.defineProperty(Vt,"__esModule",{value:!0});var Ys=Vt.default=void 0,ar=rr(be()),or=e;Ys=Vt.default=(0,ar.default)((0,or.jsx)("path",{d:"m17.6 9.48 1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-2.86-1.21-6.08-1.21-8.94 0L5.65 5.67c-.19-.29-.58-.38-.87-.2-.28.18-.37.54-.22.83L6.4 9.48C3.3 11.25 1.28 14.44 1 18h22c-.28-3.56-2.3-6.75-5.4-8.52M7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25m10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25"}),"Android");var Gt={},nr=ge;Object.defineProperty(Gt,"__esModule",{value:!0});var Ks=Gt.default=void 0,lr=nr(be()),cr=e;Ks=Gt.default=(0,lr.default)((0,cr.jsx)("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphone");var Yt={},dr=ge;Object.defineProperty(Yt,"__esModule",{value:!0});var Xs=Yt.default=void 0,ur=dr(be()),pr=e;Xs=Yt.default=(0,ur.default)((0,pr.jsx)("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"}),"Tablet");var Kt={},mr=ge;Object.defineProperty(Kt,"__esModule",{value:!0});var at=Kt.default=void 0,fr=mr(be()),hr=e;at=Kt.default=(0,fr.default)((0,hr.jsx)("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"}),"DesktopWindows");var xr="2.0.3",At=500,hs="user-agent",Ae="",xs="?",lt="function",he="undefined",De="object",Dt="string",V="browser",re="cpu",se="device",J="engine",X="os",Re="result",w="name",h="type",b="vendor",v="version",G="architecture",Ke="major",g="model",We="console",A="mobile",E="tablet",N="smarttv",te="wearable",wt="xr",Ve="embedded",Ne="inapp",Xt="brands",Se="formFactors",Zt="fullVersionList",_e="platform",Jt="platformVersion",pt="bitness",ve="sec-ch-ua",gr=ve+"-full-version-list",br=ve+"-arch",wr=ve+"-"+pt,vr=ve+"-form-factors",yr=ve+"-"+A,jr=ve+"-"+g,Zs=ve+"-"+_e,Sr=Zs+"-version",Js=[Xt,Zt,A,g,_e,Jt,G,Se,pt],Qe="Amazon",Te="Apple",gs="ASUS",bs="BlackBerry",je="Google",ws="Huawei",vs="Lenovo",ys="Honor",et="LG",vt="Microsoft",yt="Motorola",jt="Nvidia",js="OnePlus",St="OPPO",Fe="Samsung",Ss="Sharp",Be="Sony",Ct="Xiaomi",Tt="Zebra",Cs="Chrome",Ts="Chromium",ue="Chromecast",Cr="Edge",He="Firefox",$e="Opera",kt="Facebook",ks="Sogou",ke="Mobile ",qe=" Browser",Et="Windows",Tr=typeof window!==he,Y=Tr&&window.navigator?window.navigator:void 0,pe=Y&&Y.userAgentData?Y.userAgentData:void 0,kr=function(t,s){var i={},p=s;if(!ct(s)){p={};for(var n in s)for(var d in s[n])p[d]=s[n][d].concat(p[d]?p[d]:[])}for(var m in t)i[m]=p[m]&&p[m].length%2===0?p[m].concat(t[m]):t[m];return i},mt=function(t){for(var s={},i=0;i<t.length;i++)s[t[i].toUpperCase()]=t[i];return s},Ot=function(t,s){if(typeof t===De&&t.length>0){for(var i in t)if(ae(t[i])==ae(s))return!0;return!1}return Le(t)?ae(s).indexOf(ae(t))!==-1:!1},ct=function(t,s){for(var i in t)return/^(browser|cpu|device|engine|os)$/.test(i)||(s?ct(t[i]):!1)},Le=function(t){return typeof t===Dt},Rt=function(t){if(t){for(var s=[],i=Ee(/\\?\"/g,t).split(","),p=0;p<i.length;p++)if(i[p].indexOf(";")>-1){var n=Xe(i[p]).split(";v=");s[p]={brand:n[0],version:n[1]}}else s[p]=Xe(i[p]);return s}},ae=function(t){return Le(t)?t.toLowerCase():t},_t=function(t){return Le(t)?Ee(/[^\d\.]/g,t).split(".")[0]:void 0},oe=function(t){for(var s in t){var i=t[s];typeof i==De&&i.length==2?this[i[0]]=i[1]:this[i]=void 0}return this},Ee=function(t,s){return Le(s)?s.replace(t,Ae):s},Ue=function(t){return Ee(/\\?\"/g,t)},Xe=function(t,s){if(Le(t))return t=Ee(/^\s\s*/,t),typeof s===he?t:t.substring(0,At)},Pt=function(t,s){if(!(!t||!s))for(var i=0,p,n,d,m,r,c;i<s.length&&!r;){var a=s[i],u=s[i+1];for(p=n=0;p<a.length&&!r&&a[p];)if(r=a[p++].exec(t),r)for(d=0;d<u.length;d++)c=r[++n],m=u[d],typeof m===De&&m.length>0?m.length===2?typeof m[1]==lt?this[m[0]]=m[1].call(this,c):this[m[0]]=m[1]:m.length===3?typeof m[1]===lt&&!(m[1].exec&&m[1].test)?this[m[0]]=c?m[1].call(this,c,m[2]):void 0:this[m[0]]=c?c.replace(m[1],m[2]):void 0:m.length===4&&(this[m[0]]=c?m[3].call(this,c.replace(m[1],m[2])):void 0):this[m]=c||void 0;i+=2}},me=function(t,s){for(var i in s)if(typeof s[i]===De&&s[i].length>0){for(var p=0;p<s[i].length;p++)if(Ot(s[i][p],t))return i===xs?void 0:i}else if(Ot(s[i],t))return i===xs?void 0:i;return s.hasOwnProperty("*")?s["*"]:t},Rs={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},_s={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Ps={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[w,ke+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,v],[/opios[\/ ]+([\w\.]+)/i],[v,[w,$e+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[v,[w,$e+" GX"]],[/\bopr\/([\w\.]+)/i],[v,[w,$e]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[w,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[v,[w,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[w,v],[/quark(?:pc)?\/([-\w\.]+)/i],[v,[w,"Quark"]],[/\bddg\/([\w\.]+)/i],[v,[w,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[w,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[w,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[w,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[w,"Smart "+vs+qe]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure"+qe],v],[/\bfocus\/([\w\.]+)/i],[v,[w,He+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[w,$e+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[w,$e+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[w,"MIUI"+qe]],[/fxios\/([\w\.-]+)/i],[v,[w,ke+He]],[/\bqihoobrowser\/?([\w\.]*)/i],[v,[w,"360"]],[/\b(qq)\/([\w\.]+)/i],[[w,/(.+)/,"$1Browser"],v],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1"+qe],v],[/samsungbrowser\/([\w\.]+)/i],[v,[w,Fe+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[v,[w,ks+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[w,ks+" Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[w,v],[/(lbbrowser|rekonq)/i],[w],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[v,w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,kt],v,[h,Ne]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[w,v,[h,Ne]],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[w,"GSA"],[h,Ne]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[w,"TikTok"],[h,Ne]],[/\[(linkedin)app\]/i],[w,[h,Ne]],[/(chromium)[\/ ]([-\w\.]+)/i],[w,v],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[w,Cs+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,Cs+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[w,"Android"+qe]],[/chrome\/([\w\.]+) mobile/i],[v,[w,ke+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,v],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[v,[w,ke+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[w,ke+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[v,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[v,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[w,v],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[w,ke+He],v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],v],[/(wolvic|librewolf)\/([\w\.]+)/i],[w,v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[w,He+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[w,[v,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[w,[v,/[^\d\.]+./,Ae]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[G,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[G,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[G,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[G,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[G,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[G,/ower/,Ae,ae]],[/ sun4\w[;\)]/i],[[G,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[G,ae]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[b,Fe],[h,E]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[b,Fe],[h,A]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[b,Te],[h,A]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[b,Te],[h,E]],[/(macintosh);/i],[g,[b,Te]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[b,Ss],[h,A]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[b,ys],[h,E]],[/honor([-\w ]+)[;\)]/i],[g,[b,ys],[h,A]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[b,ws],[h,E]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[b,ws],[h,A]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[b,Ct],[h,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[b,Ct],[h,A]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[b,St],[h,A]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[b,me,{OnePlus:["304","403","203"],"*":St}],[h,E]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[g,[b,"BLU"],[h,A]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[b,"Vivo"],[h,A]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[b,"Realme"],[h,A]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[b,yt],[h,A]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[b,yt],[h,E]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[b,et],[h,E]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[b,et],[h,A]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[b,vs],[h,E]],[/(nokia) (t[12][01])/i],[b,g,[h,E]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[h,A],[b,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[b,je],[h,E]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[b,je],[h,A]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[b,Be],[h,A]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[b,Be],[h,E]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[b,js],[h,A]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[b,Qe],[h,E]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[b,Qe],[h,A]],[/(playbook);[-\w\),; ]+(rim)/i],[g,b,[h,E]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[b,bs],[h,A]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[b,gs],[h,E]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[b,gs],[h,A]],[/(nexus 9)/i],[g,[b,"HTC"],[h,E]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[g,/_/g," "],[h,A]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[h,E]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[h,A]],[/(itel) ((\w+))/i],[[b,ae],g,[h,me,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[b,"Acer"],[h,E]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[b,"Meizu"],[h,A]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[b,"Ulefone"],[h,A]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[b,"Energizer"],[h,A]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[b,"Cat"],[h,A]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[b,"Smartfren"],[h,A]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[b,"Nothing"],[h,A]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[b,"Archos"],[h,E]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[b,"Archos"],[h,A]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[b,g,[h,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[b,g,[h,A]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[b,g,[h,E]],[/(surface duo)/i],[g,[b,vt],[h,E]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[b,"Fairphone"],[h,A]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[b,jt],[h,E]],[/(sprint) (\w+)/i],[b,g,[h,A]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[b,vt],[h,A]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[b,Tt],[h,E]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[b,Tt],[h,A]],[/smart-tv.+(samsung)/i],[b,[h,N]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[b,Fe],[h,N]],[/tcast.+(lg)e?. ([-\w]+)/i],[b,g,[h,N]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,et],[h,N]],[/(apple) ?tv/i],[b,[g,Te+" TV"],[h,N]],[/crkey.*devicetype\/chromecast/i],[[g,ue+" Third Generation"],[b,je],[h,N]],[/crkey.*devicetype\/([^/]*)/i],[[g,/^/,"Chromecast "],[b,je],[h,N]],[/fuchsia.*crkey/i],[[g,ue+" Nest Hub"],[b,je],[h,N]],[/crkey/i],[[g,ue],[b,je],[h,N]],[/(portaltv)/i],[g,[b,kt],[h,N]],[/droid.+aft(\w+)( bui|\))/i],[g,[b,Qe],[h,N]],[/(shield \w+ tv)/i],[g,[b,jt],[h,N]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[b,Ss],[h,N]],[/(bravia[\w ]+)( bui|\))/i],[g,[b,Be],[h,N]],[/(mi(tv|box)-?\w+) bui/i],[g,[b,Ct],[h,N]],[/Hbbtv.*(technisat) (.*);/i],[b,g,[h,N]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,Xe],[g,Xe],[h,N]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[h,N]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,N]],[/(ouya)/i,/(nintendo) (\w+)/i],[b,g,[h,We]],[/droid.+; (shield)( bui|\))/i],[g,[b,jt],[h,We]],[/(playstation \w+)/i],[g,[b,Be],[h,We]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[b,vt],[h,We]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[b,Fe],[h,te]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[b,g,[h,te]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[b,St],[h,te]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[b,Te],[h,te]],[/(opwwe\d{3})/i],[g,[b,js],[h,te]],[/(moto 360)/i],[g,[b,yt],[h,te]],[/(smartwatch 3)/i],[g,[b,Be],[h,te]],[/(g watch r)/i],[g,[b,et],[h,te]],[/droid.+; (wt63?0{2,3})\)/i],[g,[b,Tt],[h,te]],[/droid.+; (glass) \d/i],[g,[b,je],[h,wt]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,g,[h,wt]],[/(quest( \d| pro)?s?).+vr/i],[g,[b,kt],[h,wt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[h,Ve]],[/(aeobc)\b/i],[g,[b,Qe],[h,Ve]],[/(homepod).+mac os/i],[g,[b,Te],[h,Ve]],[/windows iot/i],[[h,Ve]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[g,[h,me,{mobile:"Mobile",xr:"VR","*":E}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,E]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,A]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[w,Cr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[w,v],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[w,v],[/ladybird\//i],[[w,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,v],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[w,[v,me,Rs]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,me,Rs],[w,Et]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,"macOS"],[v,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[v,[w,ue+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[v,[w,ue+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[v,[w,ue+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[v,[w,ue+" Linux"]],[/crkey\/([\d\.]+)/i],[v,[w,ue]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,w],[/(ubuntu) ([\w\.]+) like android/i],[[w,/(.+)/,"$1 Touch"],v],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[w,v],[/\(bb(10);/i],[v,[w,bs]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[v,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[w,He+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[w,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[w,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[w,"Chrome OS"],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,v],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[w,v]]},tt=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return oe.call(t.init,[[V,[w,v,Ke,h]],[re,[G]],[se,[h,g,b]],[J,[w,v]],[X,[w,v]]]),oe.call(t.isIgnore,[[V,[v,Ke]],[J,[v]],[X,[v]]]),oe.call(t.isIgnoreRgx,[[V,/ ?browser$/i],[X,/ ?os$/i]]),oe.call(t.toString,[[V,[w,v]],[re,[G]],[se,[b,g]],[J,[w,v]],[X,[w,v]]]),t}(),Rr=function(t,s){var i=tt.init[s],p=tt.isIgnore[s]||0,n=tt.isIgnoreRgx[s]||0,d=tt.toString[s]||0;function m(){oe.call(this,i)}return m.prototype.getItem=function(){return t},m.prototype.withClientHints=function(){return pe?pe.getHighEntropyValues(Js).then(function(r){return t.setCH(new Qs(r,!1)).parseCH().get()}):t.parseCH().get()},m.prototype.withFeatureCheck=function(){return t.detectFeature().get()},s!=Re&&(m.prototype.is=function(r){var c=!1;for(var a in this)if(this.hasOwnProperty(a)&&!Ot(p,a)&&ae(n?Ee(n,this[a]):this[a])==ae(n?Ee(n,r):r)){if(c=!0,r!=he)break}else if(r==he&&c){c=!c;break}return c},m.prototype.toString=function(){var r=Ae;for(var c in d)typeof this[d[c]]!==he&&(r+=(r?" ":Ae)+this[d[c]]);return r||he}),pe||(m.prototype.then=function(r){var c=this,a=function(){for(var o in c)c.hasOwnProperty(o)&&(this[o]=c[o])};a.prototype={is:m.prototype.is,toString:m.prototype.toString};var u=new a;return r(u),u}),new m};function Qs(t,s){if(t=t||{},oe.call(this,Js),s)oe.call(this,[[Xt,Rt(t[ve])],[Zt,Rt(t[gr])],[A,/\?1/.test(t[yr])],[g,Ue(t[jr])],[_e,Ue(t[Zs])],[Jt,Ue(t[Sr])],[G,Ue(t[br])],[Se,Rt(t[vr])],[pt,Ue(t[wr])]]);else for(var i in t)this.hasOwnProperty(i)&&typeof t[i]!==he&&(this[i]=t[i])}function Is(t,s,i,p){return this.get=function(n){return n?this.data.hasOwnProperty(n)?this.data[n]:void 0:this.data},this.set=function(n,d){return this.data[n]=d,this},this.setCH=function(n){return this.uaCH=n,this},this.detectFeature=function(){if(Y&&Y.userAgent==this.ua)switch(this.itemType){case V:Y.brave&&typeof Y.brave.isBrave==lt&&this.set(w,"Brave");break;case se:!this.get(h)&&pe&&pe[A]&&this.set(h,A),this.get(g)=="Macintosh"&&Y&&typeof Y.standalone!==he&&Y.maxTouchPoints&&Y.maxTouchPoints>2&&this.set(g,"iPad").set(h,E);break;case X:!this.get(w)&&pe&&pe[_e]&&this.set(w,pe[_e]);break;case Re:var n=this.data,d=function(m){return n[m].getItem().detectFeature().get()};this.set(V,d(V)).set(re,d(re)).set(se,d(se)).set(J,d(J)).set(X,d(X))}return this},this.parseUA=function(){return this.itemType!=Re&&Pt.call(this.data,this.ua,this.rgxMap),this.itemType==V&&this.set(Ke,_t(this.get(v))),this},this.parseCH=function(){var n=this.uaCH,d=this.rgxMap;switch(this.itemType){case V:case J:var m=n[Zt]||n[Xt],r;if(m)for(var c in m){var a=m[c].brand||m[c],u=m[c].version;this.itemType==V&&!/not.a.brand/i.test(a)&&(!r||/chrom/i.test(r)&&a!=Ts)&&(a=me(a,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(w,a).set(v,u).set(Ke,_t(u)),r=a),this.itemType==J&&a==Ts&&this.set(v,u)}break;case re:var o=n[G];o&&(o&&n[pt]=="64"&&(o+="64"),Pt.call(this.data,o+";",d));break;case se:if(n[A]&&this.set(h,A),n[g]&&(this.set(g,n[g]),!this.get(h)||!this.get(b))){var l={};Pt.call(l,"droid 9; "+n[g]+")",d),!this.get(h)&&l.type&&this.set(h,l.type),!this.get(b)&&l.vendor&&this.set(b,l.vendor)}if(n[Se]){var f;if(typeof n[Se]!="string")for(var S=0;!f&&S<n[Se].length;)f=me(n[Se][S++],_s);else f=me(n[Se],_s);this.set(h,f)}break;case X:var y=n[_e];if(y){var x=n[Jt];y==Et&&(x=parseInt(_t(x),10)>=13?"11":"10"),this.set(w,y).set(v,x)}this.get(w)==Et&&n[g]=="Xbox"&&this.set(w,"Xbox").set(v,void 0);break;case Re:var k=this.data,T=function(I){return k[I].getItem().setCH(n).parseCH().get()};this.set(V,T(V)).set(re,T(re)).set(se,T(se)).set(J,T(J)).set(X,T(X))}return this},oe.call(this,[["itemType",t],["ua",s],["uaCH",p],["rgxMap",i],["data",Rr(this,t)]]),this}function le(t,s,i){if(typeof t===De?(ct(t,!0)?(typeof s===De&&(i=s),s=t):(i=t,s=void 0),t=void 0):typeof t===Dt&&!ct(s,!0)&&(i=s,s=void 0),i&&typeof i.append===lt){var p={};i.forEach(function(c,a){p[a]=c}),i=p}if(!(this instanceof le))return new le(t,s,i).getResult();var n=typeof t===Dt?t:i&&i[hs]?i[hs]:Y&&Y.userAgent?Y.userAgent:Ae,d=new Qs(i,!0),m=s?kr(Ps,s):Ps,r=function(c){return c==Re?function(){return new Is(c,n,m,d).set("ua",n).set(V,this.getBrowser()).set(re,this.getCPU()).set(se,this.getDevice()).set(J,this.getEngine()).set(X,this.getOS()).get()}:function(){return new Is(c,n,m[c],d).parseUA().get()}};return oe.call(this,[["getBrowser",r(V)],["getCPU",r(re)],["getDevice",r(se)],["getEngine",r(J)],["getOS",r(X)],["getResult",r(Re)],["getUA",function(){return n}],["setUA",function(c){return Le(c)&&(n=c.length>At?Xe(c,At):c),this}]]).setUA(n),this}le.VERSION=xr;le.BROWSER=mt([w,v,Ke,h]);le.CPU=mt([G]);le.DEVICE=mt([g,b,h,We,A,N,E,te,Ve]);le.ENGINE=le.OS=mt([w,v]);function _r(t){return!t||typeof t!="string"?"break-all":t.includes(" ")?"break-word":"break-all"}function Qt(t){const s={width:t.size,height:t.size,...t.sx},i=typeof t.name=="string"?t.name:t.logo,p=e.jsxs(xe,{direction:"row",alignItems:"center",spacing:1,className:`info-card-wrapper ${t.className}`,sx:{cursor:t.tooltip?"pointer":"default"},children:[t.logo?e.jsx(us,{src:t.logo,alt:t.logoName??i,variant:t.variant,sx:s}):e.jsx(us,{variant:t.variant,sx:s,children:i==null?void 0:i.slice(0,1)}),e.jsxs(xe,{direction:"column",alignItems:"flex-start",justifyContent:"space-around",sx:{wordBreak:_r(t.name),minWidth:{xs:100,sm:140}},children:[e.jsx(q,{variant:"body1",color:"text.primary",component:"div",children:t.name}),t.description&&e.jsx(q,{variant:"subtitle1",color:"text.secondary",children:t.description})]})]});return t.tooltip?e.jsx(Ce,{title:t.tooltip,placement:"top-start",componentsProps:{tooltip:{sx:{bgcolor:n=>n.palette.mode==="dark"?"#2a2e37":"#ffffff",color:n=>n.palette.mode==="dark"?"#ffffff":n.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:n=>n.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:n=>n.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:n=>n.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:n=>n.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:p}):p}Qt.propTypes={logo:C.string,name:C.oneOfType([C.string,C.node]).isRequired,description:C.oneOfType([C.string,C.node]),size:C.oneOfType([C.number,C.string]),variant:C.oneOf(["square","rounded","circular"]),sx:C.object,className:C.string,logoName:C.string,tooltip:C.oneOfType([C.string,C.node])};Qt.defaultProps={description:"",logo:"",size:40,variant:"rounded",sx:{},className:"",logoName:"",tooltip:null};function Pr(t){try{if(!t.trim())return{device:{icon:e.jsx(at,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(rt,{fontSize:"small"}),text:"Unknown Browser"}};const i=new le(t).getResult();let p="";const n=t.split(/\s+/).find(c=>c.startsWith("arcwallet"));if(n){const c=n.split("/");c.length>1&&ps.coerce(c[1])&&(p=ps.coerce(c[1]).version)}const d=(()=>{const{type:c="",model:a=""}=i.device;return c==="mobile"?{icon:e.jsx(Ks,{fontSize:"small"}),text:a||"Mobile Device"}:c==="tablet"?{icon:e.jsx(Xs,{fontSize:"small"}),text:a||"Tablet"}:{icon:e.jsx(Gs,{fontSize:"small"}),text:a||"Desktop"}})(),m=(()=>{const{name:c="",version:a=""}=i.os;return c.toLowerCase().includes("mac")?{icon:e.jsx(It,{fontSize:"small"}),text:`${c} ${a}`}:c.toLowerCase().includes("ios")?{icon:e.jsx(It,{fontSize:"small"}),text:`${c} ${a}`}:c.toLowerCase().includes("android")?{icon:e.jsx(Ys,{fontSize:"small"}),text:`${c} ${a}`}:c.toLowerCase().includes("windows")?{icon:e.jsx(at,{fontSize:"small"}),text:`${c} ${a}`}:{icon:null,text:c?`${c} ${a}`:"Unknown OS"}})(),r=(()=>{const{name:c="",version:a=""}=i.browser;return{icon:e.jsx(rt,{fontSize:"small"}),text:c?`${c} ${a}`:"Unknown Browser"}})();return{device:d,os:m,browser:r,...p?{walletVersion:{icon:null,text:p}}:{}}}catch(s){return console.error("Error parsing user agent:",s),{device:{icon:e.jsx(at,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(rt,{fontSize:"small"}),text:"Unknown Browser"}}}}function ei({ua:t}){const s=Pr(t);return e.jsx(xe,{spacing:1,children:Object.entries(s).map(([i,{icon:p,text:n}])=>e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(j,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:p}),e.jsx(q,{variant:"body2",sx:{display:"flex"},children:n})]},i))})}ei.propTypes={ua:C.string.isRequired};const ti=()=>{const{t}=H(),s={$all:t("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:s,formatRoleName:p=>p.startsWith("$")?s[p]||p.slice(1):s[p]||p}},Ir=(t,s=!1)=>{const i=s?1:.6;switch(t){case"owner":return`rgba(232, 222, 255, ${i})`;case"admin":return`rgba(227, 242, 253, ${i})`;case"member":return`rgba(232, 245, 233, ${i})`;case"guest":return`rgba(245, 245, 245, ${i})`;default:return`rgba(245, 245, 245, ${i})`}},Ar=zt(Mt)(({role:t})=>({backgroundColor:Ir(t),color:"#000000"})),Dr=t=>{switch(t){case"valid":return s=>s.palette.success.light;case"expired":return s=>s.palette.text.disabled;case"revoked":return s=>s.palette.error.light;default:return s=>s.palette.warning.light}},Er=zt(Mt)(({theme:t,status:s})=>({backgroundColor:Dr(s)(t),color:"#FFFFFF"}));function si({did:t}){return e.jsx(Pe,{size:14,responsive:!1,compact:!0,copyable:!1,did:t})}si.propTypes={did:C.string.isRequired};function ii({timestamp:t,locale:s}){return e.jsx(j,{sx:{minWidth:"100px"},children:e.jsx(Ii,{value:t,locale:s})})}ii.propTypes={timestamp:C.number.isRequired,locale:C.string.isRequired};function ri({role:t}){const{formatRoleName:s}=ti();return e.jsx(Ar,{label:s(t),size:"small",role:t,sx:{borderRadius:1}})}ri.propTypes={role:C.string.isRequired};function ai({status:t}){const{t:s}=H();return e.jsx(Er,{label:s(`team.passport.statusMap.${t}`),size:"small",status:t,sx:{borderRadius:1}})}ai.propTypes={status:C.string.isRequired};function oi({source:t}){const{t:s}=H();return t?s(`team.passport.sourceMaps.${t}`):"-"}oi.propTypes={source:C.string.isRequired};const es=st.memo(function({user:s,size:i="default",tooltip:p=!1,inService:n}){const{teamDid:d}=Z(),m=st.useMemo(()=>Ht(s.avatar,d,n),[s.avatar,d,n]),r=st.useMemo(()=>e.jsx(Pe,{did:s==null?void 0:s.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[s==null?void 0:s.did]);return e.jsx(Qt,{variant:"circular",logo:m,name:e.jsx(q,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:s.fullName||s.email}),...i==="small"?{tooltip:p?e.jsx(Pe,{did:s==null?void 0:s.did}):!1,size:24}:{description:r,size:36}})});es.propTypes={user:C.object.isRequired,size:C.string,tooltip:C.bool,inService:C.bool};es.defaultProps={size:"default",tooltip:!1,inService:!1};const Or=t=>e.jsx(si,{did:t}),ts=t=>e.jsx(ri,{role:t}),ss=t=>e.jsx(ai,{status:t}),ni=(t,s)=>e.jsx(ii,{timestamp:t,locale:s}),dt=t=>e.jsx(oi,{source:t}),is=(t,s=!1)=>e.jsx(es,{user:t,inService:s}),Lr=t=>e.jsx(ei,{ua:t}),As="info";function rs({createPassportSvg:t,passport:s,onCancel:i,onSwitchPassport:p}){const{t:n}=H(),d=yi({tab:As}),m={info:{label:n("common.basicInfo"),value:As,component:()=>e.jsx(li,{passport:s,createPassportSvg:t})},logs:{label:n("common.logs"),value:"logs",component:()=>e.jsx(ui,{passport:s})},related:{label:n("team.passport.related"),value:"related",component:()=>e.jsx(pi,{passport:s,onSwitchPassport:p})}},r=Object.values(m).map(({label:u,value:o})=>({label:u,value:o})).filter(u=>u.value==="related"?s.parentDid:!0),c=m[d.tab]||m.info,a=u=>{d.tab=u};return e.jsx(de,{title:n("common.passport"),onClose:i,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(zr,{children:[e.jsx(j,{className:"tabs",children:e.jsx(Ai,{tabs:r,current:d.tab,onChange:a,scrollButtons:"auto"})}),e.jsx(j,{className:"body",children:e.jsx(c.component,{})})]})})}rs.propTypes={createPassportSvg:C.func.isRequired,passport:C.object.isRequired,onCancel:C.func.isRequired,onSwitchPassport:C.func};rs.defaultProps={onSwitchPassport:()=>{}};const zr=ce(j)`
|
|
2
|
+
margin-top: -16px;
|
|
3
|
+
|
|
4
|
+
.tabs {
|
|
5
|
+
margin-left: 0;
|
|
6
|
+
margin-right: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.body {
|
|
10
|
+
margin-top: 24px;
|
|
11
|
+
}
|
|
12
|
+
`;function li({createPassportSvg:t,passport:s}){var c,a,u,o;const{t:i,locale:p}=H(),{teamDid:n}=Z(),{inService:d}=B(),m=[{items:[{label:i("common.role"),content:ts(s.role)},{label:i("common.did"),content:e.jsx(Pe,{did:s.id})},{label:i("team.passport.status"),content:ss(s.status)},{label:i("common.type"),content:e.jsx(j,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:(s.type||[]).map(l=>e.jsx(Mt,{label:l,variant:"outlined",size:"small",sx:{borderRadius:1}},l))})}]}],r=[{title:i("team.passport.owner"),items:[{label:i("team.passport.owner"),content:e.jsx(j,{children:is(s.user,d)})}]},{title:i("common.timeInfo"),items:[{label:i("team.passport.issuanceTime"),content:s.issuanceDate?it(s.issuanceDate,p):"-"},{label:i("team.member.lastLogin"),content:s.lastLoginAt?it(s.lastLoginAt,p):"-"},{label:i("common.expires"),content:s.expirationDate?it(s.expirationDate,p):"-"}]},{title:i("blocklet.overview.source"),items:[{label:i("blocklet.overview.source"),content:dt(s.source)}]}];return e.jsxs(Mr,{gap:3,children:[e.jsxs(j,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",overflow:"hidden",gap:5},children:[e.jsx(j,{sx:{display:"flex",p:1},className:"passport-image",dangerouslySetInnerHTML:{__html:t({scope:s.scope,role:s.role,title:s.scope==="kyc"?s.name:s.title,issuer:s.issuer&&s.issuer.name,issuerDid:s.issuer&&s.issuer.id,ownerName:(c=s.user)==null?void 0:c.fullName,ownerDid:(a=s.user)==null?void 0:a.did,ownerAvatarUrl:(u=s.user)!=null&&u.avatar?Ht((o=s.user)==null?void 0:o.avatar,n,d):"",revoked:s.revoked,width:"200px",extra:s!=null&&s.expirationDate?{key:"Exp",value:$s(s.expirationDate).format("YYYY-MM-DD HH:mm:ss")}:null})}}),e.jsx(j,{className:"info-area",children:m.map(l=>e.jsxs(j,{children:[l.title&&e.jsx(q,{variant:"h6",sx:{mb:2},children:l.title}),e.jsx(j,{className:"info-grid",sx:{gap:"12px !important"},children:l.items.map(f=>e.jsxs(j,{className:"info-item",children:[e.jsx(j,{className:"info-label",sx:{maxWidth:40},children:e.jsx(q,{variant:"subtitle2",color:"textSecondary",children:f.label})}),e.jsx(j,{children:f.content})]},f.label))})]},l.title))})]}),e.jsx(ji,{}),e.jsx(j,{className:"info-area",children:r.map(l=>e.jsxs(j,{children:[e.jsx(q,{variant:"h6",sx:{mb:1.5},children:l.title}),e.jsx(j,{className:"info-grid",children:l.items.map(f=>e.jsxs(j,{className:"info-item",children:[e.jsx(j,{className:"info-label",children:e.jsx(q,{variant:"subtitle2",color:"textSecondary",children:f.label})}),e.jsx(j,{children:f.content})]},f.label))})]},l.title))})]})}li.propTypes={passport:C.object.isRequired,createPassportSvg:C.func.isRequired};const Mr=ce(xe)`
|
|
13
|
+
.info-card {
|
|
14
|
+
margin-bottom: 24px;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.card-content {
|
|
19
|
+
display: flex;
|
|
20
|
+
gap: 32px;
|
|
21
|
+
padding: 24px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.passport-image {
|
|
25
|
+
width: 150px;
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
transition: transform 0.2s ease-in-out;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
transform: scale(1.05);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.info-area {
|
|
36
|
+
flex: 1;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 16px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.info-header {
|
|
43
|
+
padding-bottom: 16px;
|
|
44
|
+
border-bottom: 1px solid #eee;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.info-grid {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
gap: 8px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.info-item {
|
|
54
|
+
display: flex;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.info-label {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
width: 100px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.logs-card {
|
|
66
|
+
.card-header {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 8px;
|
|
70
|
+
padding: 16px 24px;
|
|
71
|
+
border-bottom: 1px solid #eee;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.MuiTimeline-root {
|
|
75
|
+
padding: 24px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.MuiTimelineContent-root {
|
|
79
|
+
padding: 0px 16px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.MuiTimelineDot-root {
|
|
83
|
+
margin: 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`,ci=10,di=1;function ui({passport:t}){const{api:s}=B(),{teamDid:i}=Z(),{t:p,locale:n}=H(),[d,m]=P.useState({pageSize:ci,page:di}),{data:r,loading:c}=ot(async()=>{const S={teamDid:i,query:{passportId:t.id},paging:{page:d.page,pageSize:d.pageSize}},y=await s.getPassportLogs({input:S});return{logs:y.passportLogs||[],total:y.paging.total}},{refreshDeps:[d.page,d.pageSize],onError:S=>F.error(S.message)}),a=P.useMemo(()=>(r==null?void 0:r.logs)||[],[r==null?void 0:r.logs]),u=S=>{var y,x,k,T,I,_,O,z,$;return S.action===fe.PASSPORT_LOG_ACTION.APPROVE||S.action===fe.PASSPORT_LOG_ACTION.REVOKE?(x=(y=S==null?void 0:S.metadata)==null?void 0:y.operator)!=null&&x.fullName?`${p("common.operator")}: ${(T=(k=S==null?void 0:S.metadata)==null?void 0:k.operator)==null?void 0:T.fullName}`:null:S.action===fe.PASSPORT_LOG_ACTION.ISSUE&&((I=S.metadata)==null?void 0:I.action)===fe.PASSPORT_ISSUE_ACTION.ISSUE_ON_INVITE?(O=(_=S==null?void 0:S.metadata)==null?void 0:_.inviter)!=null&&O.fullName?`${p("common.inviter")}: ${($=(z=S==null?void 0:S.metadata)==null?void 0:z.inviter)==null?void 0:$.fullName}`:null:`passportId: ${S.passportId}`},o=P.useMemo(()=>[{label:p("common.action"),name:"action",options:{customBodyRender:(S,{rowIndex:y})=>{var k;const x=a[y];return e.jsx(Ce,{title:u(x),children:`${S} ${(k=x.metadata)!=null&&k.action?`(${x.metadata.action})`:""}`})}}},{label:"IP",name:"operatorIp",options:{customBodyRender:S=>e.jsx(j,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:S||"-"})})}},{label:"UA",width:250,name:"operatorUa",options:{customBodyRender:(S,{rowIndex:y})=>{const x=a[y];return e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[x.operatorUa&&e.jsx(j,{children:Lr(x.operatorUa)}),x.operatorUa&&e.jsx(Ce,{title:x.operatorUa,children:e.jsx($i,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]})}}},{label:p("common.createdAt"),name:"createdAt",options:{customBodyRender:S=>it(S,n)}}],[p,n,a]),l=({page:S,rowsPerPage:y})=>{d.pageSize!==y?m(x=>({...x,pageSize:y,page:1})):d.page!==S+1&&m(x=>({...x,page:S+1}))},f={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,search:!1,page:d.page-1,rowsPerPage:d.pageSize,count:(r==null?void 0:r.total)||0};return c?e.jsx(j,{py:2,children:e.jsx(xe,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(Q,{})})}):e.jsx(j,{children:e.jsx(Nt,{className:"logs-table",verticalKeyWidth:100,locale:n,data:a,columns:o,options:f,loading:c,onChange:l})})}ui.propTypes={passport:C.object.isRequired};function pi({passport:t,onSwitchPassport:s}){const{api:i}=B(),{teamDid:p}=Z(),{t:n,locale:d}=H(),[m,r]=P.useState({pageSize:ci,page:di}),{data:c,loading:a}=ot(async()=>{const y={teamDid:p,passportId:t.parentDid,paging:{page:m.page,pageSize:m.pageSize}},x=await i.getRelatedPassports({input:y});return{passports:x.passports||[],total:x.paging.total}},{refreshDeps:[m.page,m.pageSize],onError:y=>F.error(y.message)}),u=P.useMemo(()=>(c==null?void 0:c.passports)||[],[c==null?void 0:c.passports]),o=P.useMemo(()=>[{label:n("team.passport.role"),name:"role",options:{customBodyRender:ts}},{label:n("team.passport.owner"),name:"user",options:{customBodyRender:is}},{label:n("team.passport.status"),name:"status",options:{customBodyRender:ss}},{label:n("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:y=>ni(y,d)}},{label:n("blocklet.overview.source"),name:"source",options:{customBodyRender:dt}}],[n,d]),l=({page:y,rowsPerPage:x})=>{m.pageSize!==x?r(k=>({...k,pageSize:x,page:1})):m.page!==y+1&&r(k=>({...k,page:y+1}))},f=P.useRef(null),S={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,search:!1,page:m.page-1,rowsPerPage:m.pageSize,count:(c==null?void 0:c.total)||0,onRowClick(y,{dataIndex:x},k){var T;if((T=f.current)!=null&&T.contains(k.target)){const I=u[x];s(I)}}};return a?e.jsx(j,{py:2,children:e.jsx(xe,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(Q,{})})}):e.jsxs(xe,{spacing:1,children:[e.jsx(zs,{severity:"warning",children:n("team.passport.relatedDescription")}),e.jsx(j,{ref:f,sx:{".MuiTableRow-root":{cursor:"pointer"}},children:e.jsx(Nt,{className:"related-table",verticalKeyWidth:100,locale:d,data:u.filter(y=>y.id!==t.id),columns:o,options:S,loading:a,onChange:l})})]})}pi.propTypes={passport:C.object.isRequired,onSwitchPassport:C.func.isRequired};function ft({onCancel:t,onSuccess:s}){const{api:i}=B(),{blocklet:p}=Mi(),{t:n}=H(),[d,m]=P.useState(!1),r=(p.environments.find(l=>l.key==="BLOCKLET_PASSPORT_COLOR")||{}).value||"auto",c=r==="auto"?qi.getPassportColorFromDid(p.appDid):r,[a,u]=P.useState(c),o=async()=>{const l=[{key:Bi.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,value:a}];try{m(!0),await i.configBlocklet({input:{did:p.meta.did,configs:l}}),s()}catch(f){F.error(f.message)}finally{m(!1)}};return e.jsx(de,{title:n("team.passport.color"),onClose:t,open:!0,fullWidth:!0,actions:e.jsxs(e.Fragment,{children:[e.jsx(K,{onClick:t,color:"inherit",children:n("common.cancel")}),e.jsxs(K,{onClick:o,color:"primary",disabled:d,variant:"contained",autoFocus:!0,"data-cy":"color-btn-confirm",children:[d&&e.jsx(Q,{size:16}),n("common.save")]})]}),children:e.jsxs(j,{display:"flex",justifyContent:"center",alignItems:"center",className:"dialog-content",children:[e.jsx(Ui,{disableAlpha:!0,color:a,onChange:l=>u(l.hex)}),e.jsx("div",{style:{width:220,marginLeft:24},dangerouslySetInnerHTML:{__html:Ni({scope:"passport",role:"owner",title:"Owner",issuer:Fi.getDisplayName(p),issuerDid:p.appDid,ownerName:"Your Name",ownerDid:p.appDid,preferredColor:a})}})]})})}const Nr=we(ft,"mutate_team"),Fr=we(ft,"",Oe);function Br(t){const{inService:s}=B();return s?e.jsx(Fr,{...t}):e.jsx(Nr,{...t})}ft.propTypes={onCancel:C.func.isRequired,onSuccess:C.func.isRequired};ft.defaultProps={};var ze=function(t){return e.jsx("svg",{...t,children:e.jsx("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"})})};ze.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};ze.displayName="delete";var as={},Hr=ge;Object.defineProperty(as,"__esModule",{value:!0});var os=as.default=void 0,$r=Hr(be()),qr=e;os=as.default=(0,$r.default)((0,qr.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack");var mi=function(s){return e.jsx("svg",{...s,children:e.jsx("path",{d:"M64.707 8.707a1 1 0 0 0 0-1.414L58.343.929a1 1 0 1 0-1.414 1.414L62.586 8l-5.657 5.657a1 1 0 0 0 1.414 1.414l6.364-6.364ZM0 9h64V7H0v2Z",fill:"#666"})})};mi.defaultProps={width:"65",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Ur=(t,s)=>t?!s.some(i=>!i.from.passport||!i.to.role):!1;function ns({onCancel:t,onSuccess:s,data:i,trustedPassports:p}){const{api:n}=B(),{roles:d,teamDid:m}=Z(),{t:r}=H(),[c,a]=P.useState(!1),[u,o]=P.useState(i.issuerDid||""),[l,f]=P.useState(i.remark||""),[S,y]=P.useState(Ie(i.mappings)||[]),x=p.findIndex(T=>T.issuerDid===i.issuerDid),k=async()=>{if(c)return;const T={issuerDid:u,remark:l,mappings:S.map(_=>({..._,to:{..._.to,ttl:_.to.ttl||0}}))},I=[...p];x===-1?I.unshift(T):I[x]=T;try{a(!0),await n.configTrustedPassports({input:{teamDid:m,trustedPassports:I}}),await Ze(800),a(!1),F.success(r("common.saveSuccess")),s()}catch(_){a(!1),F.error(Ye(_))}};return e.jsx(de,{title:r("team.passport.trustedIssuers"),open:!0,showCloseButton:!1,PaperProps:{style:{minHeight:"80vh"}},fullWidth:!0,prepend:e.jsx(ne,{onClick:t,"data-cy":"trusted-issuer-close",size:"large",children:e.jsx(os,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(K,{onClick:t,color:"inherit",children:r("common.cancel")}),e.jsxs(K,{onClick:()=>k(),color:"primary",disabled:!Ur(u,S)||!l||c,variant:"contained",autoFocus:!0,"data-cy":"save-mapping",children:[c&&e.jsx(Q,{size:16}),r("common.save")]})]}),children:e.jsx(Wr,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx(ie,{fullWidth:!0,"data-cy":"input-issuer-did",placeholder:r("team.passport.issuerDid"),value:u,onChange:T=>{o(T.target.value)}}),e.jsx(ie,{style:{marginTop:16},fullWidth:!0,"data-cy":"input-issuer-remark",placeholder:r("common.remark"),value:l,onChange:T=>{f(T.target.value)}}),e.jsxs(j,{mt:"30px",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(j,{className:"dialog-h1",children:r("team.passport.mappingRule")}),e.jsx(j,{children:e.jsx(K,{variant:"outlined",color:"primary","data-cy":"add-mapping",onClick:()=>{y(T=>{const I=[...T];return I.unshift({from:{passport:""},to:{role:fe.ROLES.GUEST}}),I})},children:r("team.add")})})]}),e.jsxs(j,{className:"list",mt:-.5,children:[S.map((T,I)=>e.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"space-between",my:3,children:[e.jsxs(j,{display:"flex",alignItems:"center",flexGrow:1,children:[e.jsx(j,{flexGrow:1,flexBasis:1,children:e.jsx(ie,{fullWidth:!0,size:"small","data-cy":`input-${I}-from`,placeholder:"Issuer’s Passport Name/ID",value:T.from.passport,onChange:_=>{const{value:O}=_.target;y(z=>{const $=[...z];return $[I].from.passport=O,$})}})}),e.jsx(j,{flexShrink:0,mx:4,children:e.jsx(mi,{})}),e.jsx(j,{flexGrow:1,flexBasis:1,children:e.jsx(ie,{fullWidth:!0,size:"small",select:!0,value:T.to.role,onChange:_=>{y(O=>{const z=[...O];return z[I].to.role=_.target.value,z})},variant:"outlined",children:d.filter(_=>_.name!=="owner").map(_=>e.jsx(nt,{value:_.name,"data-cy":`passport-mapping-select-option-${_.name}`,children:e.jsx("span",{children:_.title||_.name})},_.name))})})]}),e.jsx(j,{flexShrink:0,ml:4,children:e.jsx(ne,{onClick:()=>{y(_=>{const O=[..._];return O.splice(I,1),O})},size:"large",children:e.jsx(ze,{})})})]},`mapping-${I}`)),!S.length&&e.jsx(j,{my:2,color:"text.secondary",fontSize:"16px",children:e.jsx(Ft,{children:r("common.empty")})})]})]})})})}ns.propTypes={onCancel:C.func.isRequired,onSuccess:C.func.isRequired,trustedPassports:C.array,data:C.object};ns.defaultProps={data:{},trustedPassports:[]};const Wr=ce.div`
|
|
87
|
+
.dialog-h1 {
|
|
88
|
+
font-size: 18px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.list {
|
|
92
|
+
.MuiIconButton-root {
|
|
93
|
+
svg {
|
|
94
|
+
fill: #bfbfbf;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`;function ht({onCancel:t,hasPermission:s}){const{api:i}=B(),{teamDid:p,trustedPassports:n}=Z(),{t:d}=H(),[m,r]=P.useState(null),[c,a]=P.useState(!1),[u,o]=P.useState(!1),[l,f]=P.useState(""),S=async x=>{if(c)return;const k=n.findIndex(I=>I.issuerDid===x);k===-1&&F.error("Cannot find passports");const T=[...n];T.splice(k,1);try{a(!0),await i.configTrustedPassports({input:{teamDid:p,trustedPassports:T}}),await Ze(800),a(!1),F.success(d("common.saveSuccess")),r(!1)}catch(I){a(!1),F.error(I.message)}},y=n.filter(x=>!l||x.issuerDid.toLowerCase().includes(l.toLowerCase()));return e.jsxs(de,{title:d("team.passport.trustedIssuers"),open:!0,onClose:t,fullWidth:!0,PaperProps:{style:{minHeight:"80vh"}},children:[e.jsx(Kr,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx("div",{className:"dialog-h1",children:d("team.passport.trustedPassportIssuers")}),e.jsx(Ws,{sx:{mt:3},actions:e.jsxs(e.Fragment,{children:[e.jsx(Hs,{options:{searchPlaceholder:d("team.passport.searchIssuerDid"),searchDebounceTime:600},search:l,searchText:l,searchTextUpdate:f,searchClose:()=>f(""),onSearchOpen:()=>{}}),s&&e.jsxs(K,{variant:"contained",color:"primary","data-cy":"add-trusted-issuer",onClick:()=>o({mode:"add"}),children:[e.jsx(Bt,{style:{fontSize:16,marginRight:4}}),d("team.add")]})]})}),e.jsxs("div",{className:"list",children:[y.map(x=>e.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"20px",children:[e.jsxs(j,{flexShrink:0,children:[e.jsx(Pe,{copyable:!1,size:16,did:x.issuerDid,showDidLogo:!1}),!!x.remark&&e.jsx(j,{pl:3.5,fontSize:12,maxWidth:"300px",children:x.remark})]}),e.jsx(j,{color:"gray",ml:"28px",flexGrow:1,children:x.mappings&&x.mappings.length?`${x.mappings.length} ${d("team.passport.mappingRule")}`:d("team.passport.defaultRule")}),e.jsxs(j,{flexShrink:0,display:"flex",alignItems:"center",children:[e.jsx(ne,{onClick:()=>o({mode:"update",data:Ie(x)}),"data-cy":"edit-mapping-rule",size:"large",children:e.jsx(ut,{})}),e.jsx(ne,{"data-cy":"delete-mapping-rule",onClick:()=>r({title:d("common.delete"),description:d("common.delConfirmDescription",{data:x.issuerDid}),confirm:d("common.delConfirm"),cancel:d("common.cancel"),onConfirm:()=>S(x.issuerDid),onCancel:()=>{a(!1),r(null)}}),size:"large",children:e.jsx(ze,{})})]})]},x.issuerDid)),!n.length&&e.jsx(Ft,{children:d("common.empty")})]})]})}),u&&e.jsx(ns,{mode:u.mode,data:u.data,trustedPassports:Ie(n),onCancel:()=>o(null),onSuccess:()=>{o(null)}}),m&&e.jsx($t,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}ht.propTypes={onCancel:C.func.isRequired,hasPermission:C.bool};ht.defaultProps={hasPermission:!1};const Vr=we(ht,"mutate_team"),Gr=we(ht,"",Oe);function Yr(t){const{inService:s}=B();return s?e.jsx(Gr,{...t}):e.jsx(Vr,{...t})}const Kr=ce.div`
|
|
99
|
+
.list {
|
|
100
|
+
.MuiIconButton-root {
|
|
101
|
+
svg {
|
|
102
|
+
fill: #bfbfbf;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`;function ls({onCancel:t,onSuccess:s,data:i,trustedFactories:p}){var y,x,k;const{api:n}=B(),{roles:d,teamDid:m}=Z(),{t:r}=H(),[c,a]=Vi({loading:!1,fetching:!1,fetched:[],errored:[],factoryAddress:i.factoryAddress||"",remark:i.remark||"",role:((y=i.passport)==null?void 0:y.role)||"member",ttlPolicy:((x=i.passport)==null?void 0:x.ttlPolicy)||"never",ttl:fs(+((k=i.passport)==null?void 0:k.ttl)||365*24*60*60*1e3),error:""}),u=p.findIndex(T=>T.factoryAddress===i.factoryAddress),o=async()=>{if(c.loading)return;const{factoryAddress:T,remark:I,role:_,ttlPolicy:O,ttl:z}=c,$={factoryAddress:T,remark:I,passport:{role:_,ttlPolicy:O,ttl:O==="never"?0:fs(z)}},M=[...p];u===-1?M.unshift($):M[u]=$;try{a({loading:!0}),await n.configTrustedFactories({input:{teamDid:m,trustedFactories:M}}),await Ze(800),F.success(r("common.saveSuccess")),s()}catch(U){console.error(U),F.error(Ye(U))}finally{a({loading:!1})}};P.useEffect(()=>{const T=c.fetched.find(_=>_.address===c.factoryAddress),I=c.errored.find(_=>_.address===c.factoryAddress);Di.isValid(c.factoryAddress)&&!c.fetching&&!T&&!I&&(a({fetching:!0}),Hi(fe.MAIN_CHAIN_ENDPOINT).getFactoryState({address:c.factoryAddress}).then(O=>{O.state?a({fetching:!1,fetched:[...c.fetched.filter(z=>z.address!==c.factoryAddress),O.state],remark:O.state.name}):a({fetching:!1,errored:[...c.errored.filter(z=>z.address!==c.factoryAddress),{address:c.factoryAddress}],error:r("team.passport.factory404",c)})}).catch(O=>{console.error(O),a({fetching:!1,error:Ye(O)})}))},[c.factoryAddress,c.fetching]);let l=c.error;const f=c.factoryAddress?c.errored.find(T=>T.address===c.factoryAddress):null;!l&&f&&(l=r("team.passport.factory404",c));const S=c.factoryAddress?c.fetched.find(T=>T.address===c.factoryAddress):null;return!l&&S&&(l=S.description),l||(l=r("team.passport.factoryAddressTip")),e.jsx(de,{title:r("team.passport.trustedFactories"),open:!0,showCloseButton:!1,PaperProps:{style:{minHeight:"80vh"}},fullWidth:!0,prepend:e.jsx(ne,{onClick:t,"data-cy":"close-trusted-factory",size:"large",children:e.jsx(os,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(K,{onClick:t,color:"inherit",children:r("common.cancel")}),e.jsxs(K,{onClick:()=>o(),color:"primary",disabled:!c.factoryAddress||!c.remark||!c.role||c.loading||c.error||f,variant:"contained",autoFocus:!0,"data-cy":"save-trusted-factory",children:[c.loading&&e.jsx(Q,{size:16}),r("common.save")]})]}),children:e.jsx(Xr,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx(ie,{fullWidth:!0,error:!!c.error||!!f,"data-cy":"input-factory-address",label:r("team.passport.factoryAddress"),helperText:l,value:c.factoryAddress,InputProps:{endAdornment:c.fetching?e.jsx(Si,{position:"end",children:e.jsx(Q,{size:16})}):null},onChange:T=>{a({factoryAddress:T.target.value,error:""})}}),e.jsx(ie,{style:{marginTop:32},fullWidth:!0,"data-cy":"input-factory-remark",label:r("common.remark"),value:c.remark,onChange:T=>{a({remark:T.target.value})}}),e.jsx(ie,{style:{marginTop:32},fullWidth:!0,"data-cy":"input-passport-role",label:r("team.passport.role"),select:!0,value:c.role,onChange:T=>{a({role:T.target.value})},variant:"outlined",children:d.filter(T=>T.name!=="owner").map(T=>e.jsx(nt,{value:T.name,"data-cy":`passport-role-select-option-${T.name}`,children:e.jsx("span",{children:T.title||T.name})},T.name))}),e.jsxs("div",{style:{marginTop:32},children:[e.jsx(Ms,{children:r("team.passport.ttl")}),e.jsxs(Ns,{color:"primary",size:"small",value:c.ttlPolicy,exclusive:!0,style:{marginTop:16},onChange:(T,I)=>a({ttlPolicy:I}),"data-cy":"input-passport-ttl-since","aria-label":"Expire Policy",children:[e.jsx(Ge,{value:"never","data-cy":"input-passport-ttl-never",children:e.jsx(Ce,{title:r("team.passport.ttlNeverTip"),children:e.jsx(q,{children:r("team.passport.ttlNever")})})}),e.jsx(Ge,{value:"mint","data-cy":"input-passport-ttl-mint",children:e.jsx(Ce,{title:r("team.passport.ttlMintTip"),children:e.jsx(q,{children:r("team.passport.ttlMint")})})}),e.jsx(Ge,{value:"exchange","data-cy":"input-passport-ttl-exchange",children:e.jsx(Ce,{title:r("team.passport.ttlExchangeTip"),children:e.jsx(q,{children:r("team.passport.ttlExchange")})})})]}),c.ttlPolicy!=="never"&&e.jsxs(e.Fragment,{children:[e.jsx(Fs,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-passport-ttl",value:c.ttl,onChange:T=>{a({ttl:T.target.value})}}),e.jsx(Bs,{children:r("team.passport.ttlTip")})]})]})]})})})}ls.propTypes={onCancel:C.func.isRequired,onSuccess:C.func.isRequired,trustedFactories:C.array,data:C.object};ls.defaultProps={data:{},trustedFactories:[]};const Xr=ce.div`
|
|
107
|
+
.dialog-h1 {
|
|
108
|
+
font-size: 18px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.list {
|
|
112
|
+
.MuiIconButton-root {
|
|
113
|
+
svg {
|
|
114
|
+
fill: #bfbfbf;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
`;function xt({onCancel:t,hasPermission:s}){const{api:i}=B(),{teamDid:p,trustedFactories:n}=Z(),{t:d}=H(),[m,r]=P.useState(null),[c,a]=P.useState(!1),[u,o]=P.useState(null),[l,f]=P.useState(""),S=async x=>{if(!c)try{a(!0),await i.configTrustedFactories({input:{teamDid:p,trustedFactories:n.filter(k=>k.factoryAddress!==x)}}),await Ze(800),a(!1),F.success(d("common.saveSuccess")),r(null)}catch(k){a(!1),F.error(k.message)}},y=n.filter(x=>!l||x.factoryAddress.toLowerCase().includes(l.toLowerCase()));return e.jsxs(de,{title:d("team.passport.trustedFactories"),open:!0,onClose:t,fullWidth:!0,PaperProps:{style:{minHeight:"80vh"}},children:[e.jsx(ea,{children:e.jsxs("div",{className:"dialog-content",children:[e.jsx("div",{className:"dialog-h1",children:d("team.passport.trustedFactoriesTip")}),e.jsx(Ws,{sx:{mt:3},actions:e.jsxs(e.Fragment,{children:[e.jsx(Hs,{options:{searchPlaceholder:d("team.passport.searchFactoryAddress"),searchDebounceTime:600},search:l,searchText:l,searchTextUpdate:f,searchClose:()=>f(""),onSearchOpen:()=>{}}),s&&e.jsxs(K,{variant:"contained",color:"primary",size:"small","data-cy":"add-trusted-factory",onClick:()=>o({mode:"add"}),children:[e.jsx(Bt,{style:{fontSize:16,marginRight:4}}),d("team.add")]})]})}),e.jsxs("div",{className:"list",children:[y.map(x=>e.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"20px",children:[e.jsxs(j,{flexGrow:1,children:[e.jsx(Pe,{copyable:!1,did:x.factoryAddress,size:16,showDidLogo:!1}),!!x.remark&&e.jsx(j,{fontSize:12,maxWidth:"300px",children:x.remark})]}),e.jsx(j,{color:"gray",mr:"24px",children:e.jsx(Ei,{type:"success",children:x.passport.role})}),e.jsxs(j,{flexShrink:0,display:"flex",alignItems:"center",children:[e.jsx(ne,{onClick:()=>o({mode:"update",data:Ie(x)}),"data-cy":"edit-trusted-factory",size:"large",children:e.jsx(ut,{})}),e.jsx(ne,{"data-cy":"delete-trusted-factory",onClick:()=>r({title:d("common.delete"),description:d("common.delConfirmDescription",{data:x.factoryAddress}),confirm:d("common.delConfirm"),cancel:d("common.cancel"),onConfirm:()=>S(x.factoryAddress),onCancel:()=>{a(!1),r(null)}}),size:"large",children:e.jsx(ze,{})})]})]},x.factoryAddress)),!n.length&&e.jsx(Ft,{children:d("common.empty")})]})]})}),u&&e.jsx(ls,{data:u.data,trustedFactories:Ie(n),onCancel:()=>o(null),onSuccess:()=>{o(null)}}),m&&e.jsx($t,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}xt.propTypes={onCancel:C.func.isRequired,hasPermission:C.bool};xt.defaultProps={hasPermission:!1};const Zr=we(xt,"mutate_team"),Jr=we(xt,"",Oe);function Qr(t){const{inService:s}=B();return s?e.jsx(Jr,{...t}):e.jsx(Zr,{...t})}const ea=ce.div`
|
|
119
|
+
.list {
|
|
120
|
+
.MuiIconButton-root {
|
|
121
|
+
svg {
|
|
122
|
+
fill: #bfbfbf;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
`;var fi={exports:{}},hi={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s={rotl:function(i,p){return i<<p|i>>>32-p},rotr:function(i,p){return i<<32-p|i>>>p},endian:function(i){if(i.constructor==Number)return s.rotl(i,8)&16711935|s.rotl(i,24)&4278255360;for(var p=0;p<i.length;p++)i[p]=s.endian(i[p]);return i},randomBytes:function(i){for(var p=[];i>0;i--)p.push(Math.floor(Math.random()*256));return p},bytesToWords:function(i){for(var p=[],n=0,d=0;n<i.length;n++,d+=8)p[d>>>5]|=i[n]<<24-d%32;return p},wordsToBytes:function(i){for(var p=[],n=0;n<i.length*32;n+=8)p.push(i[n>>>5]>>>24-n%32&255);return p},bytesToHex:function(i){for(var p=[],n=0;n<i.length;n++)p.push((i[n]>>>4).toString(16)),p.push((i[n]&15).toString(16));return p.join("")},hexToBytes:function(i){for(var p=[],n=0;n<i.length;n+=2)p.push(parseInt(i.substr(n,2),16));return p},bytesToBase64:function(i){for(var p=[],n=0;n<i.length;n+=3)for(var d=i[n]<<16|i[n+1]<<8|i[n+2],m=0;m<4;m++)n*8+m*6<=i.length*8?p.push(t.charAt(d>>>6*(3-m)&63)):p.push("=");return p.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var p=[],n=0,d=0;n<i.length;d=++n%4)d!=0&&p.push((t.indexOf(i.charAt(n-1))&Math.pow(2,-2*d+8)-1)<<d*2|t.indexOf(i.charAt(n))>>>6-d*2);return p}};hi.exports=s})();var ta=hi.exports,Lt={utf8:{stringToBytes:function(t){return Lt.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(Lt.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var s=[],i=0;i<t.length;i++)s.push(t.charCodeAt(i)&255);return s},bytesToString:function(t){for(var s=[],i=0;i<t.length;i++)s.push(String.fromCharCode(t[i]));return s.join("")}}},Ds=Lt;/*!
|
|
127
|
+
* Determine if an object is a Buffer
|
|
128
|
+
*
|
|
129
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
130
|
+
* @license MIT
|
|
131
|
+
*/var sa=function(t){return t!=null&&(xi(t)||ia(t)||!!t._isBuffer)};function xi(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ia(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&xi(t.slice(0,0))}(function(){var t=ta,s=Ds.utf8,i=sa,p=Ds.bin,n=function(d,m){d.constructor==String?m&&m.encoding==="binary"?d=p.stringToBytes(d):d=s.stringToBytes(d):i(d)?d=Array.prototype.slice.call(d,0):!Array.isArray(d)&&d.constructor!==Uint8Array&&(d=d.toString());for(var r=t.bytesToWords(d),c=d.length*8,a=1732584193,u=-271733879,o=-1732584194,l=271733878,f=0;f<r.length;f++)r[f]=(r[f]<<8|r[f]>>>24)&16711935|(r[f]<<24|r[f]>>>8)&4278255360;r[c>>>5]|=128<<c%32,r[(c+64>>>9<<4)+14]=c;for(var S=n._ff,y=n._gg,x=n._hh,k=n._ii,f=0;f<r.length;f+=16){var T=a,I=u,_=o,O=l;a=S(a,u,o,l,r[f+0],7,-680876936),l=S(l,a,u,o,r[f+1],12,-389564586),o=S(o,l,a,u,r[f+2],17,606105819),u=S(u,o,l,a,r[f+3],22,-1044525330),a=S(a,u,o,l,r[f+4],7,-176418897),l=S(l,a,u,o,r[f+5],12,1200080426),o=S(o,l,a,u,r[f+6],17,-1473231341),u=S(u,o,l,a,r[f+7],22,-45705983),a=S(a,u,o,l,r[f+8],7,1770035416),l=S(l,a,u,o,r[f+9],12,-1958414417),o=S(o,l,a,u,r[f+10],17,-42063),u=S(u,o,l,a,r[f+11],22,-1990404162),a=S(a,u,o,l,r[f+12],7,1804603682),l=S(l,a,u,o,r[f+13],12,-40341101),o=S(o,l,a,u,r[f+14],17,-1502002290),u=S(u,o,l,a,r[f+15],22,1236535329),a=y(a,u,o,l,r[f+1],5,-165796510),l=y(l,a,u,o,r[f+6],9,-1069501632),o=y(o,l,a,u,r[f+11],14,643717713),u=y(u,o,l,a,r[f+0],20,-373897302),a=y(a,u,o,l,r[f+5],5,-701558691),l=y(l,a,u,o,r[f+10],9,38016083),o=y(o,l,a,u,r[f+15],14,-660478335),u=y(u,o,l,a,r[f+4],20,-405537848),a=y(a,u,o,l,r[f+9],5,568446438),l=y(l,a,u,o,r[f+14],9,-1019803690),o=y(o,l,a,u,r[f+3],14,-187363961),u=y(u,o,l,a,r[f+8],20,1163531501),a=y(a,u,o,l,r[f+13],5,-1444681467),l=y(l,a,u,o,r[f+2],9,-51403784),o=y(o,l,a,u,r[f+7],14,1735328473),u=y(u,o,l,a,r[f+12],20,-1926607734),a=x(a,u,o,l,r[f+5],4,-378558),l=x(l,a,u,o,r[f+8],11,-2022574463),o=x(o,l,a,u,r[f+11],16,1839030562),u=x(u,o,l,a,r[f+14],23,-35309556),a=x(a,u,o,l,r[f+1],4,-1530992060),l=x(l,a,u,o,r[f+4],11,1272893353),o=x(o,l,a,u,r[f+7],16,-155497632),u=x(u,o,l,a,r[f+10],23,-1094730640),a=x(a,u,o,l,r[f+13],4,681279174),l=x(l,a,u,o,r[f+0],11,-358537222),o=x(o,l,a,u,r[f+3],16,-722521979),u=x(u,o,l,a,r[f+6],23,76029189),a=x(a,u,o,l,r[f+9],4,-640364487),l=x(l,a,u,o,r[f+12],11,-421815835),o=x(o,l,a,u,r[f+15],16,530742520),u=x(u,o,l,a,r[f+2],23,-995338651),a=k(a,u,o,l,r[f+0],6,-198630844),l=k(l,a,u,o,r[f+7],10,1126891415),o=k(o,l,a,u,r[f+14],15,-1416354905),u=k(u,o,l,a,r[f+5],21,-57434055),a=k(a,u,o,l,r[f+12],6,1700485571),l=k(l,a,u,o,r[f+3],10,-1894986606),o=k(o,l,a,u,r[f+10],15,-1051523),u=k(u,o,l,a,r[f+1],21,-2054922799),a=k(a,u,o,l,r[f+8],6,1873313359),l=k(l,a,u,o,r[f+15],10,-30611744),o=k(o,l,a,u,r[f+6],15,-1560198380),u=k(u,o,l,a,r[f+13],21,1309151649),a=k(a,u,o,l,r[f+4],6,-145523070),l=k(l,a,u,o,r[f+11],10,-1120210379),o=k(o,l,a,u,r[f+2],15,718787259),u=k(u,o,l,a,r[f+9],21,-343485551),a=a+T>>>0,u=u+I>>>0,o=o+_>>>0,l=l+O>>>0}return t.endian([a,u,o,l])};n._ff=function(d,m,r,c,a,u,o){var l=d+(m&r|~m&c)+(a>>>0)+o;return(l<<u|l>>>32-u)+m},n._gg=function(d,m,r,c,a,u,o){var l=d+(m&c|r&~c)+(a>>>0)+o;return(l<<u|l>>>32-u)+m},n._hh=function(d,m,r,c,a,u,o){var l=d+(m^r^c)+(a>>>0)+o;return(l<<u|l>>>32-u)+m},n._ii=function(d,m,r,c,a,u,o){var l=d+(r^(m|~c))+(a>>>0)+o;return(l<<u|l>>>32-u)+m},n._blocksize=16,n._digestsize=16,fi.exports=function(d,m){if(d==null)throw new Error("Illegal argument "+d);var r=t.wordsToBytes(n(d,m));return m&&m.asBytes?r:m&&m.asString?p.bytesToString(r):t.bytesToHex(r)}})();var ra=fi.exports;const aa=vi(ra);function gt({teamDid:t,onCancel:s,onSuccess:i,onError:p,mode:n,item:d}){var z,$;const{api:m}=B(),[r,c]=P.useState(!1),[a,u]=P.useState(""),{t:o}=H(),[l,f]=P.useState(d.title||""),[S,y]=P.useState(d.description||""),[x,k]=P.useState(((z=d==null?void 0:d.extra)==null?void 0:z.display)||"builtin"),[T,I]=P.useState(($=d==null?void 0:d.extra)!=null&&$.types?d.extra.types.join(","):""),_=async()=>{const M=l.trim();if(!M){u(o("team.passport.error.titleEmpty"));return}if(M.length>64){u(o("team.passport.error.titleTooLong",{length:64}));return}const U=S.replace(/\n/g," ");if(!U){u(o("team.passport.error.descriptionEmpty"));return}const ye=n==="create"?aa(M):d.name;u(null),c(!0);try{if(n==="create"){const L={teamDid:t,name:ye,title:M,description:U};x==="custom"&&(L.extra=JSON.stringify({display:"custom",types:T.split(",")})),await m.createRole({input:L})}else{const L={teamDid:t,role:{name:ye,title:M,description:U}};await m.updateRole({input:L})}i()}catch(L){const R=Ye(L);u(R),p(L)}finally{c(!1)}},O=e.jsxs("div",{children:[n==="update"&&e.jsx(q,{component:"div",style:{paddingTop:16},children:e.jsx(ie,{label:"ID",autoComplete:"off",variant:"outlined",name:"url","data-cy":"mutate-role-input-name",fullWidth:!0,autoFocus:!0,value:d.name,disabled:!0})}),e.jsx(q,{component:"div",style:{marginTop:16},children:e.jsx(ie,{label:o("common.title"),autoComplete:"off",variant:"outlined",name:"title","data-cy":"mutate-role-input-title",fullWidth:!0,autoFocus:!0,value:l,onChange:M=>{u(null),f(M.target.value)},disabled:n==="update"||r,helperText:o("team.passport.create.titleTip")})}),e.jsx(q,{component:"div",style:{marginTop:16,marginBottom:16},children:e.jsx(ie,{label:o("common.description"),autoComplete:"off",variant:"outlined",name:"description","data-cy":"mutate-role-input-description",fullWidth:!0,autoFocus:!0,value:S,onChange:M=>{u(null),y(M.target.value)},disabled:r,multiline:!0,rows:3})}),n==="create"&&e.jsxs("div",{style:{marginBottom:16},children:[e.jsx(Ms,{children:o("common.display")}),e.jsxs(Ns,{color:"primary",size:"small",value:x,exclusive:!0,style:{marginTop:16},disabled:r,onChange:(M,U)=>k(U),"data-cy":"input-role-display",children:[e.jsx(Ge,{value:"builtin","data-cy":"input-role-display-builtin",children:e.jsx(q,{children:o("team.passport.displayBuiltin")})}),e.jsx(Ge,{value:"custom","data-cy":"input-role-display-custom",children:e.jsx(q,{children:o("team.passport.displayCustom")})})]}),x==="custom"&&e.jsxs(e.Fragment,{children:[e.jsx(Fs,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-role-types",value:T,disabled:r,onChange:M=>{I(M.target.value)}}),e.jsx(Bs,{children:o("team.passport.typesTip")})]})]})]});return e.jsxs(de,{title:n==="create"?o("team.passport.create.title"):"",fullWidth:!0,open:!0,onClose:s,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[e.jsx(K,{onClick:s,color:"inherit",children:o("common.cancel")}),e.jsxs(K,{"data-cy":"mutate-role-confirm",onClick:_,color:"primary",disabled:r,variant:"contained",autoFocus:!0,children:[r&&e.jsx(Q,{size:16}),o(n==="create"?"common.create":"common.update")]})]}),children:[e.jsx(Ci,{component:"div",children:O}),!!a&&e.jsx(zs,{severity:"error",variant:"icon",style:{width:"100%",margin:0},children:a})]})}gt.propTypes={teamDid:C.string.isRequired,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,mode:C.oneOf(["create","update"]),item:C.object};gt.defaultProps={onError:()=>{},mode:"create",item:{}};function bt({onCancel:t,onSuccess:s,onDelete:i,roleName:p,hasPermission:n}){const{api:d}=B(),{roles:m,permissions:r,teamDid:c,refresh:a,isNodeTeam:u}=Z(),{t:o}=H(),[l,f]=P.useState([]),[S,y]=P.useState(!1),[x,k]=P.useState(null),[T,I]=P.useState(!1),_=Ie(m.find(L=>L.name===p)),O=qs(p),z=async L=>{if(!T)try{I(!0),await d.deleteRole({input:{teamDid:c,name:L}}),i()}catch(R){F.error(R.message)}finally{I(!1),k(null)}},$=async(L,R)=>{const W=(await d.getPermissionsByRole({input:{teamDid:L,role:{name:R}}})).permissions||[],ee=r.map(Je=>({...Je,bind:W.some(wi=>wi.name===Je.name)}));f(ee)},M=async()=>{I(!0);const L=l.filter(R=>R.bind).map(R=>R.name);try{await d.updatePermissionsForRole({input:{teamDid:c,roleName:_.name,grantNames:L}}),F.success(o("common.saveSuccess")),s()}catch(R){F.error(Ye(R))}finally{I(!1)}};P.useEffect(()=>{c&&p&&$(c,p)},[c,p]);const U=u||!n;let ye=null;return u&&(ye=e.jsxs("div",{className:"bind",children:[e.jsx("div",{className:"title",children:o("common.permission")}),e.jsx("div",{className:"list",children:l.filter(L=>U?L.bind:!0).map(L=>e.jsx("div",{className:"item",children:e.jsx(Ti,{control:e.jsx(ki,{disabled:U,checked:L.bind,onChange:()=>{f(R=>R.map(D=>(D.name===L.name&&(D.bind=!D.bind),D)))},name:L.name}),label:L.description})}))})]})),e.jsxs(de,{title:o("common.passport"),onClose:t,open:!0,fullWidth:!0,toolbar:n&&!O&&e.jsxs(e.Fragment,{children:[e.jsx(ne,{onClick:()=>y(_),"data-cy":`edit-passport-${_.name}`,size:"large",children:e.jsx(ut,{fill:"#bfbfbf"})}),e.jsx(ne,{onClick:()=>k({title:o("team.passport.delete.title"),description:o("team.passport.delete.description",{name:_.title}),confirm:o("common.delConfirm"),cancel:o("common.cancel"),onConfirm:()=>{z(_.name)},onCancel:()=>{I(!1),k(null)}}),"data-cy":`delete-passport-${_.name}`,size:"large",children:e.jsx(ze,{"data-cy":"close-passport-dialog",fill:"#bfbfbf"})})]}),actions:u&&!U&&e.jsxs(e.Fragment,{children:[e.jsx(K,{onClick:t,color:"inherit",children:o("common.cancel")}),e.jsxs(K,{onClick:M,color:"primary",disabled:T||!_,variant:"contained",autoFocus:!0,"data-cy":"bind-permission-btn-confirm",children:[T&&e.jsx(Q,{size:16}),o("common.save")]})]}),children:[e.jsxs(ca,{children:[!_&&e.jsx(da,{children:e.jsx(Q,{})}),_&&e.jsxs("div",{className:"dialog-content",children:[e.jsxs("div",{className:"header",children:[e.jsx("div",{className:"title",children:_.title}),e.jsx("div",{className:"description",style:{marginTop:u?16:48},children:_.description})]}),ye]})]}),S&&e.jsx(gt,{teamDid:c,onCancel:()=>y(null),onSuccess:()=>{y(null),a()},mode:"update",roleName:S.name,item:S}),x&&e.jsx($t,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}const oa=we(bt,"mutate_team"),na=we(bt,"",Oe);function la(t){const{inService:s}=B();return s?e.jsx(na,{...t}):e.jsx(oa,{...t})}bt.propTypes={roleName:C.string.isRequired,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onDelete:C.func.isRequired,hasPermission:C.bool};bt.defaultProps={hasPermission:!1};const ca=ce.div`
|
|
132
|
+
.header {
|
|
133
|
+
.title {
|
|
134
|
+
font-weight: 400;
|
|
135
|
+
font-size: 24px;
|
|
136
|
+
line-height: 28px;
|
|
137
|
+
color: #222222;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.description {
|
|
141
|
+
margin-top: 16px;
|
|
142
|
+
font-weight: 400;
|
|
143
|
+
font-size: 16px;
|
|
144
|
+
line-height: 19px;
|
|
145
|
+
color: #999999;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.bind {
|
|
150
|
+
margin-top: 24px;
|
|
151
|
+
.title {
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
font-size: 16px;
|
|
154
|
+
line-height: 19px;
|
|
155
|
+
color: #666666;
|
|
156
|
+
margin-bottom: 24px;
|
|
157
|
+
}
|
|
158
|
+
.item {
|
|
159
|
+
margin-top: 24px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.MuiFormControlLabel-label {
|
|
163
|
+
font-weight: 400;
|
|
164
|
+
font-size: 16px;
|
|
165
|
+
line-height: 19px;
|
|
166
|
+
color: #666;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.PrivateSwitchBase-root-45 {
|
|
170
|
+
padding: 0;
|
|
171
|
+
padding-right: 12px;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
`,da=ce.div`
|
|
175
|
+
flex: 1;
|
|
176
|
+
display: flex;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
align-items: center;
|
|
179
|
+
height: 200px;
|
|
180
|
+
`,Es=P.memo(({field:t,value:s,copyable:i})=>{const{local:p}=H();return s?e.jsxs(j,{display:"flex",alignItems:"center",gap:1,onClick:n=>n.stopPropagation(),children:[t?e.jsxs(ms,{variant:"subtitle1",color:"textSecondary",sx:{width:50,textAlign:"right"},children:[t,":"]}):null,e.jsx(ms,{variant:"body1",children:e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx(Ce,{title:s,children:e.jsx("span",{className:"value-ellipsis",children:s})}),i?e.jsx(Oi,{content:Wi(s),locale:p,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}):null]})})]}):null});function cs({createPassportSvg:t}){const{inService:s}=B(),{roles:i,teamIssuerDid:p,teamName:n,refresh:d,passportColor:m,teamDid:r,isNodeTeam:c}=Z(),{t:a}=H(),[u,o]=P.useState(!1),[l,f]=P.useState(!1),S=Ri(x=>x.breakpoints.down("md")),y=P.useCallback(x=>x&&!fe.ROLES[x.toUpperCase()],[]);return e.jsxs(ua,{sx:{mt:0},children:[e.jsx(j,{display:"flex",justifyContent:"flex-end",children:!c&&e.jsxs(_i,{variant:"contained",edge:"end",color:"primary","data-cy":"create-role",onClick:()=>o(!0),children:[e.jsx(Bt,{style:{fontSize:16,marginRight:4}}),a("team.passport.create.title")]})}),e.jsx(j,{className:"list",children:i.map(x=>e.jsxs(j,{"data-cy":`passport-${x.name}`,sx:{display:"flex",justifyContent:"space-between"},className:"item",display:"flex",alignItems:"center",onClick:()=>f(x),children:[e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx("div",{style:{width:150},dangerouslySetInnerHTML:{__html:t({title:x.title,issuer:n,issuerDid:p,ownerName:"Your Name",ownerDid:p,preferredColor:m,width:"150px"})}}),e.jsxs(j,{ml:3,className:"title",children:[e.jsx(Es,{value:x.title}),y(x.name)?e.jsx(Es,{value:x.name,copyable:!0}):null]})]}),!S&&e.jsx(j,{className:"description",children:x.description}),e.jsx(Us,{permission:s?"":"mutate_team",role:s?Oe:[],children:e.jsx("div",{className:"action",children:qs(x.name)?e.jsx(Gi,{}):e.jsx(ut,{})})})]},x.name))}),l&&e.jsx(la,{onCancel:()=>f(!1),onSuccess:()=>{f(!1),d()},onDelete:()=>{f(!1),d()},mode:"update",roleName:l.name,item:l}),u&&e.jsx(gt,{teamDid:r,onCancel:()=>o(!1),onSuccess:()=>{o(!1),d()}})]})}const ua=ce(j)`
|
|
181
|
+
.list {
|
|
182
|
+
.item {
|
|
183
|
+
padding: 12px;
|
|
184
|
+
margin: 12px -12px;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
transition: box-shadow 0.4s;
|
|
187
|
+
&:hover {
|
|
188
|
+
box-shadow: 0 0 10px 4px rgba(0, 0, 0, 0.1);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.value-ellipsis {
|
|
192
|
+
display: inline-block;
|
|
193
|
+
max-width: 290px;
|
|
194
|
+
white-space: nowrap;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
text-overflow: ellipsis;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.title {
|
|
201
|
+
font-weight: 400;
|
|
202
|
+
font-size: 18px;
|
|
203
|
+
line-height: 21px;
|
|
204
|
+
color: #222222;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.description {
|
|
208
|
+
flex: 1;
|
|
209
|
+
margin-left: 24px;
|
|
210
|
+
margin-right: 24px;
|
|
211
|
+
color: #999999;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.action {
|
|
215
|
+
color: #bfbfbf;
|
|
216
|
+
fill: #bfbfbf;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
`;cs.propTypes={createPassportSvg:C.func.isRequired};cs.defaultProps={};function ds({createPassportSvg:t}){const{t:s}=H(),{api:i,inService:p}=B(),{teamDid:n,refresh:d,enablePassportIssuance:m,isNodeTeam:r}=Z(),[c,a]=P.useState(!1),[u,o]=P.useState(!1),[l,f]=P.useState(!1),[S,y]=P.useState(!1),[x,k]=P.useState(!1),T=async I=>{if(I.stopPropagation(),!S){y(!0);try{await i.configPassportIssuance({input:{teamDid:n,enable:!m}}),d(),await Ze(800),F.success(s("common.configSuccess"))}catch(_){F.error(_.message)}finally{y(!1)}}};return e.jsxs(j,{display:"flex",alignItems:"center",gap:1,sx:{ml:1},children:[e.jsx(Us,{permission:p?"":"mutate_team",role:p?Oe:[],children:e.jsx(Me,{variant:"outlined",menuButtonProps:{"data-cy":"trusted-issuers-more"},menu:e.jsxs(e.Fragment,{children:[e.jsx(Me.Item,{onClick:()=>o(!0),"data-cy":"config-trusted-issuers",children:e.jsxs(j,{children:[s("team.passport.trustedPassportIssuers"),e.jsx(j,{fontSize:12,color:"#888",children:s("team.passport.trustedPassportIssuersTip")})]})}),e.jsx(Me.Item,{onClick:()=>f(!0),"data-cy":"config-show-trusted-factories",children:e.jsxs(j,{children:[s("team.passport.configFactories"),e.jsx(j,{fontSize:12,color:"#888",children:s("team.passport.configFactoriesTip")})]})}),e.jsx(Me.Item,{"data-cy":"config-show-issue-passport",onClick:T,children:e.jsxs(j,{display:"flex",alignItems:"center",children:[S&&e.jsx(Q,{size:16,style:{marginRight:8}}),e.jsxs(j,{children:[s(m?"team.passport.disableIssuance":"team.passport.enableIssuance"),e.jsx(j,{fontSize:12,color:"#888",children:s(m?"team.passport.disableIssuanceTip":"team.passport.enableIssuanceTip")})]})]})}),!r&&e.jsx(Me.Item,{onClick:()=>a(!0),"data-cy":"config-passport-color",children:e.jsxs(j,{children:[s("team.passport.configColor"),e.jsx(j,{fontSize:12,color:"#888",children:s("team.passport.configColorTip")})]})})]}),children:()=>e.jsx(K,{variant:"outlined",onClick:()=>{k(!0)},children:s("team.passport.view")})})}),u&&e.jsx(Yr,{onCancel:()=>o(!1)}),l&&e.jsx(Qr,{onCancel:()=>f(!1)}),c&&e.jsx(Br,{onCancel:()=>a(!1),onSuccess:()=>a(!1)}),x&&e.jsx(de,{open:!0,maxWidth:"lg",onClose:()=>k(!1),onBackdropClick:()=>k(!1),onEscapeKeyDown:()=>k(!1),title:s("team.passport.view"),children:e.jsx(cs,{createPassportSvg:t,onCancel:()=>k(!1)})})]})}ds.propTypes={createPassportSvg:C.func.isRequired};ds.defaultProps={};const Os="$all",Ls="",gi=st.memo(({createPassportSvg:t,passport:s,teamDid:i,inService:p})=>{var n,d,m,r;return e.jsx(j,{sx:{display:"flex"},dangerouslySetInnerHTML:{__html:t({scope:s.scope,role:s.role,title:s.scope==="kyc"?s.name:s.title,issuer:s.issuer&&s.issuer.name,issuerDid:s.issuer&&s.issuer.id,ownerName:(n=s.user)==null?void 0:n.fullName,ownerDid:(d=s.user)==null?void 0:d.did,ownerAvatarUrl:(m=s.user)!=null&&m.avatar?Ht((r=s.user)==null?void 0:r.avatar,i,p):"",revoked:s.revoked,width:"36px",extra:s!=null&&s.expirationDate?{key:"Exp",value:$s(s.expirationDate).format("YYYY-MM-DD HH:mm:ss")}:null})}})});gi.propTypes={passport:C.object.isRequired,createPassportSvg:C.func.isRequired,teamDid:C.string.isRequired,inService:C.bool.isRequired};function bi({createPassportSvg:t}){const{api:s}=B(),{teamDid:i}=Z(),{t:p,locale:n}=H(),{SYSTEM_ROLES:d}=ti(),{inService:m}=B(),[r,c]=P.useState(!1),a=`passports-${i}`,u=Li(a),[o,l]=P.useState({role:Os,status:Ls,searchText:u.searchText||"",pageSize:u.rowsPerPage||10,page:u.page?u.page+1:1}),{data:f,loading:S}=ot(async()=>(await s.getPassportRoleCounts({input:{teamDid:i}})).counts||[],{refreshDeps:[i]}),{data:y,loading:x}=ot(async()=>{const R={};o.role!==Os&&(R.role=o.role),o.status&&(R.status=o.status);const D=await s.getPassportsByRole({input:{teamDid:i,query:R,paging:{page:o.page,pageSize:o.pageSize}}});return{passports:D.passports||[],total:D.paging.total}},{refreshDeps:[o.role,o.status,o.page,o.pageSize],onError:R=>F.error(R.message)}),k=R=>{const D=f==null?void 0:f.find(W=>W.key===R);return(D==null?void 0:D.value)||0},T=P.useMemo(()=>Object.keys(d).map(R=>({name:R,title:d[R],num:k(R)})),[f,k]),I=P.useMemo(()=>[{label:p("team.passport.role"),name:"role",options:{customBodyRender:(R,{rowIndex:D})=>{const W=y==null?void 0:y.passports[D];return e.jsxs(j,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(gi,{createPassportSvg:t,passport:W,teamDid:i}),e.jsx(j,{children:ts(W.role)})]})}}},{label:p("team.passport.owner"),name:"user",options:{customBodyRender:R=>is(R,m)}},{label:p("team.passport.status"),name:"status",options:{customBodyRender:ss}},{label:p("team.member.lastLogin"),name:"lastLoginAt",options:{customBodyRender:R=>ni(R,n)}},{label:p("common.address"),name:"id",options:{customBodyRender:Or}},{label:p("blocklet.overview.source"),name:"source",options:{customBodyRender:(R,{rowIndex:D})=>{const W=y==null?void 0:y.passports[D];return W.parentDid?dt("recover"):dt(W.source)}}}],[p,n,y==null?void 0:y.passports,i,t,m]),_=R=>{l(D=>({...D,role:R,page:1}))},O=({page:R,rowsPerPage:D,searchText:W})=>{o.pageSize!==D?l(ee=>({...ee,searchText:"",pageSize:D,page:1})):o.page!==R+1?l(ee=>({...ee,searchText:"",page:R+1})):o.searchText!==W&&l(ee=>({...ee,searchText:W,page:1}))},z=P.useRef(null),$=(y==null?void 0:y.passports)||[],M=o.searchText?$.filter(R=>{var D;return R.id.includes(o.searchText)||(((D=R==null?void 0:R.user)==null?void 0:D.fullName)||"").includes(o.searchText)}):$,U={sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,onRowClick(R,{dataIndex:D},W){var ee;if((ee=z.current)!=null&&ee.contains(W.target)){const Je=y==null?void 0:y.passports[D];c(Je)}},page:o.page-1,rowsPerPage:o.pageSize,count:(y==null?void 0:y.total)||0,searchDebounceTime:600},ye=R=>{l(D=>({...D,status:R.target.value,page:1}))},L=e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsxs(j,{sx:{fontSize:16,fontWeight:400},children:[p("team.passport.status"),":"]}),e.jsxs(Pi,{size:"small",value:o.status,onChange:ye,displayEmpty:!0,sx:{minWidth:120,height:36,".MuiSelect-select":{py:.5,px:1.5}},children:[e.jsx(nt,{value:Ls,children:p("common.all")}),Object.values(fe.PASSPORT_STATUS).map(R=>e.jsx(nt,{value:R,sx:{py:1},children:p(`team.passport.statusMap.${R}`)},R))]})]});return S?e.jsx(j,{py:2,children:e.jsx(xe,{direction:"row",spacing:1,sx:{position:"relative",pb:2},children:e.jsx(Q,{})})}):e.jsxs(pa,{children:[e.jsxs(j,{className:"main",display:"flex",sx:{mt:0},children:[e.jsx(j,{className:"left",children:e.jsx(j,{className:"tabs",children:T.map(R=>e.jsxs(j,{className:`tab ${o.role===R.name?"active":""}`,onClick:()=>_(R.name),children:[e.jsx("span",{className:"text",children:R.title}),e.jsx("span",{className:zi("badge",{"is-rect":R.num>999}),children:R.num})]},R.name))})}),e.jsx(j,{ref:z,className:"right",children:e.jsx(Nt,{className:"main-table",verticalKeyWidth:100,locale:n,durable:a,durableKeys:["page","rowsPerPage"],data:M,columns:I,options:U,loading:x,onChange:O,customButtons:[e.jsx(ds,{createPassportSvg:t})],title:L})})]}),r&&e.jsx(rs,{createPassportSvg:t,onCancel:()=>c(null),passport:r,onSwitchPassport:c})]})}bi.propTypes={createPassportSvg:C.func.isRequired};bi.defaultProps={};const pa=zt(j)`
|
|
220
|
+
.main {
|
|
221
|
+
.left {
|
|
222
|
+
width: 168px;
|
|
223
|
+
flex-shrink: 0;
|
|
224
|
+
margin-right: 65px;
|
|
225
|
+
.tabs {
|
|
226
|
+
padding-top: 16px;
|
|
227
|
+
.tab {
|
|
228
|
+
display: flex;
|
|
229
|
+
justify-content: space-between;
|
|
230
|
+
align-items: center;
|
|
231
|
+
padding: 8px 16px;
|
|
232
|
+
transition: background 0.4s;
|
|
233
|
+
|
|
234
|
+
width: 168px;
|
|
235
|
+
height: 36px;
|
|
236
|
+
border-radius: 8px;
|
|
237
|
+
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
user-select: none;
|
|
240
|
+
|
|
241
|
+
&:nth-child(n + 2) {
|
|
242
|
+
margin-top: 24px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&.active {
|
|
246
|
+
background: #f2f2f2;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&:hover {
|
|
250
|
+
background: #f2f2f2;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.text {
|
|
254
|
+
font-weight: 400;
|
|
255
|
+
font-size: 16px;
|
|
256
|
+
line-height: 19px;
|
|
257
|
+
|
|
258
|
+
color: #222222;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.badge {
|
|
262
|
+
display: flex;
|
|
263
|
+
flex-shrink: 0;
|
|
264
|
+
justify-content: center;
|
|
265
|
+
align-items: center;
|
|
266
|
+
width: 20px;
|
|
267
|
+
height: 20px;
|
|
268
|
+
border-radius: 100%;
|
|
269
|
+
color: #fff;
|
|
270
|
+
background: #666666;
|
|
271
|
+
font-size: 10px;
|
|
272
|
+
font-weight: 400;
|
|
273
|
+
&.is-rect {
|
|
274
|
+
width: auto;
|
|
275
|
+
border-radius: 8px;
|
|
276
|
+
padding: 0 4px;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
@media (max-width: ${t=>t.theme.breakpoints.values.md}px) {
|
|
282
|
+
display: none;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
.right {
|
|
286
|
+
flex: 1;
|
|
287
|
+
overflow: auto;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
`;export{bi as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,aa as r}from"./vendor-mui-core-DxqV1NVn.js";import{r as s}from"./vendor-react-DoD83n6N.js";import{aZ as a}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{R as e}from"./vendor-arcblock-DvaaLvvM.js";import"./vendor-utils-DR57WNxP.js";import"./vendor-hooks-sw5wvnca.js";import"./lottie-web-B6s7dDoL.js";function x(){const{t:o}=s.useContext(a);return t.jsx(n,{style:{paddingTop:"25vh"},children:t.jsx(e,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const n=r.main``;export{x as default};
|