@abtnode/blocklet-services 1.16.31-beta-4246ab25 → 1.16.31-beta-a0cc72cf
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/routes/user.js +7 -2
- package/dist/assets/{Add-CtuOts08.js → Add-I80IZ6n7.js} +1 -1
- package/dist/assets/{AddBox-BEozRxtr.js → AddBox-DZneyqwz.js} +1 -1
- package/dist/assets/{Alert-C8bmV94C.js → Alert-zOnAbv2N.js} +1 -1
- package/dist/assets/{ArrowDropDown-BXgf18Oe.js → ArrowDropDown-BAI37_Gq.js} +1 -1
- package/dist/assets/{Avatar-BFetDMjX.js → Avatar-I4LrexTj.js} +1 -1
- package/dist/assets/{ButtonGroup-4rs4O4kq.js → ButtonGroup-lq54G41C.js} +1 -1
- package/dist/assets/{CheckCircle-DTVdjeqk.js → CheckCircle-DYAGJy_x.js} +1 -1
- package/dist/assets/{ChevronRight-DJc4PiWZ.js → ChevronRight-BRnAN7b1.js} +1 -1
- package/dist/assets/{Close-CQy5q5kE.js → Close-BTC0-_wc.js} +1 -1
- package/dist/assets/{CloseOutlined-9hT_S7vV.js → CloseOutlined-C9xrS2j0.js} +1 -1
- package/dist/assets/{Delete-v2KnFPpc.js → Delete-cMnabl-R.js} +1 -1
- package/dist/assets/{DeleteOutline-D-H_BT5g.js → DeleteOutline-BIO4C7JH.js} +1 -1
- package/dist/assets/{Done-Cg0F76Fb.js → Done-O71rXdD5.js} +1 -1
- package/dist/assets/{Download-xUlajQ0m.js → Download-DLpabTh2.js} +1 -1
- package/dist/assets/{Edit-CLeS4wAm.js → Edit-CmcAptnE.js} +1 -1
- package/dist/assets/{EditIcon-Bv8uXQxv.js → EditIcon-BuoKkmB1.js} +1 -1
- package/dist/assets/{Error-ke6eGotz.js → Error-Dfzerimh.js} +1 -1
- package/dist/assets/{ExpandMore-C2VxPPft.js → ExpandMore-C8uCTD8b.js} +1 -1
- package/dist/assets/{FilterList-Bm69psLt.js → FilterList-D-UubHll.js} +1 -1
- package/dist/assets/{FormControl-BsXCFEZS.js → FormControl-OvOdEegG.js} +1 -1
- package/dist/assets/{FormControlLabel-DImktg38.js → FormControlLabel-CihXnmsn.js} +1 -1
- package/dist/assets/{FormGroup-DaX4v3-4.js → FormGroup-bSyoAX3O.js} +1 -1
- package/dist/assets/{Google-TWzgXpTH.js → Google-BGGVcwSc.js} +1 -1
- package/dist/assets/{Hidden-cGmlvPpU.js → Hidden-BQDFSM76.js} +1 -1
- package/dist/assets/{InfoOutlined-B8pG85_Z.js → InfoOutlined-DBWAnpQx.js} +1 -1
- package/dist/assets/{InputAdornment-C6qOb1bH.js → InputAdornment-BD2B7KXz.js} +1 -1
- package/dist/assets/{InputLabel-CgXPR_2f.js → InputLabel-D84lrsDr.js} +1 -1
- package/dist/assets/{LastPage-DJY3kolG.js → LastPage-CYe3NEpf.js} +1 -1
- package/dist/assets/{Launch-CMhSFuNV.js → Launch-D4UdpeqK.js} +1 -1
- package/dist/assets/{LaunchOutlined-DSyzpk6k.js → LaunchOutlined-CCNsoMJq.js} +1 -1
- package/dist/assets/{Link-DOOEUv0s.js → Link-yMVGUiQU.js} +1 -1
- package/dist/assets/{ListItemText-EkATTCYw.js → ListItemText-CKNC4df7.js} +1 -1
- package/dist/assets/{LoadingButton-Cbp2GFzD.js → LoadingButton-CQXrQzbw.js} +1 -1
- package/dist/assets/{LockIcon-BEU0_8Ic.js → LockIcon-HnjLCHYb.js} +1 -1
- package/dist/assets/{Loop-BueHJmrR.js → Loop-BOj32-EN.js} +1 -1
- package/dist/assets/{MoreHoriz-Drbf_Pvd.js → MoreHoriz-BAiNkoIT.js} +1 -1
- package/dist/assets/{MoreVert-C7sQuxig.js → MoreVert-Bh_9XRgK.js} +1 -1
- package/dist/assets/{OpenInNew-C4QXGxL_.js → OpenInNew-C7zQWaJQ.js} +1 -1
- package/dist/assets/{Pagination-B8kJW6gb.js → Pagination-BrpPdQzH.js} +1 -1
- package/dist/assets/{PlayArrow-CYrln-Kc.js → PlayArrow-C9C45emm.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-DTOYeWeD.js → QuestionMarkCircle-DIZZk7yo.js} +1 -1
- package/dist/assets/{RadioGroup-CmTDruGg.js → RadioGroup-sWPe7aB5.js} +1 -1
- package/dist/assets/{Search-CZ97KNMp.js → Search-Cgo3NMCI.js} +1 -1
- package/dist/assets/{Select-CiXWOKZU.js → Select-BBu0WXuJ.js} +1 -1
- package/dist/assets/{ServerLogo-Cr53R7IJ.js → ServerLogo-CWawb3Zp.js} +1 -1
- package/dist/assets/{Skeleton-HvFaI-R8.js → Skeleton-CkIVGU1D.js} +1 -1
- package/dist/assets/{Slider-BUNOUzy3.js → Slider-Cn9FLGlV.js} +1 -1
- package/dist/assets/{Stepper-B-zipvzv.js → Stepper-C_FjBtqi.js} +1 -1
- package/dist/assets/{TextField-Cb2e0-k4.js → TextField-CJ7QYMjw.js} +1 -1
- package/dist/assets/{Toolbar-CmSNHGuN.js → Toolbar-Q23C-iDI.js} +1 -1
- package/dist/assets/{ViewList-DzP1BYln.js → ViewList-BoKWsY80.js} +1 -1
- package/dist/assets/{access-control-fQTJIcIl.js → access-control-EwNEzlpi.js} +1 -1
- package/dist/assets/{actions-Db7l4CqQ.js → actions-BKSdyNqT.js} +1 -1
- package/dist/assets/{add-component-core-DkGv9RyG.js → add-component-core-RC7Fs2pT.js} +1 -1
- package/dist/assets/{add-resource-B8-Fd7hl.js → add-resource-DIR7_dPH.js} +1 -1
- package/dist/assets/{addon-D3OhbJEi.js → addon-ONOe2S8L.js} +1 -1
- package/dist/assets/{analytics-BNwjU7d3.js → analytics-Bhag2G5L.js} +1 -1
- package/dist/assets/api-BSu5xlAU.js +1 -0
- package/dist/assets/{ar-CqvGG4eC.js → ar-2JePd-i1.js} +1 -1
- package/dist/assets/{audit-logs-CxzQNS32.js → audit-logs-BU-xvmln.js} +1 -1
- package/dist/assets/{button-BSfqa6UD.js → button-7TJATba9.js} +1 -1
- package/dist/assets/{click-to-copy-DdF2xqop.js → click-to-copy-Dl9rmVPj.js} +1 -1
- package/dist/assets/{complete-DvEcFSqc.js → complete-DkNOyV_P.js} +1 -1
- package/dist/assets/{component-B8W7o8FZ.js → component-BXR5INzc.js} +1 -1
- package/dist/assets/{config-qbPWLYt1.js → config-Plcj7Z1g.js} +1 -1
- package/dist/assets/{config-D7luuyWR.js → config-fW9tZ5OS.js} +1 -1
- package/dist/assets/{config-navigation-asIRdIHI.js → config-navigation-B48CL-zI.js} +1 -1
- package/dist/assets/{confirm-BMHhcHat.js → confirm-3NbF1L_x.js} +1 -1
- package/dist/assets/{connect-BiWyubdJ.js → connect-CbCtfK-J.js} +1 -1
- package/dist/assets/{connect-hN5_Shp6.js → connect-aFCVU3El.js} +1 -1
- package/dist/assets/{connect-to-DfkUklQ5.js → connect-to-EW7Q1E_v.js} +1 -1
- package/dist/assets/{content-layout-DiWC1J4K.js → content-layout-Cc54lTYS.js} +1 -1
- package/dist/assets/{dashboard-XyLI0qCZ.js → dashboard-BKagq2iF.js} +3 -3
- package/dist/assets/{de-l0XzFKav.js → de-DFRVy5eA.js} +1 -1
- package/dist/assets/{did-address-DpvI-gvi.js → did-address-DKoES_ji.js} +1 -1
- package/dist/assets/{domain-BSIv0NhM.js → domain-BgClmH_C.js} +1 -1
- package/dist/assets/{domain-list-DuyWKGsk.js → domain-list-CvFnbmld.js} +1 -1
- package/dist/assets/{es-DYmEeFzA.js → es-D3TLX5Mb.js} +1 -1
- package/dist/assets/{exchange-passport-texx7vZK.js → exchange-passport-B464PWKR.js} +1 -1
- package/dist/assets/{fallback-BwmWTfvT.js → fallback-CBYR9h-e.js} +1 -1
- package/dist/assets/{format-error-Cly-PKJi.js → format-error-BaAV9G7k.js} +1 -1
- package/dist/assets/{fr-DwS-xj4v.js → fr-B2p5dLWr.js} +1 -1
- package/dist/assets/{fuel-CxlptVAT.js → fuel-BDHaADt3.js} +1 -1
- package/dist/assets/{fullpage-BS2tcmjR.js → fullpage-BnFto_Qs.js} +1 -1
- package/dist/assets/{hi-Dj91QHv6.js → hi-DmXVnjfE.js} +1 -1
- package/dist/assets/{home--VzEOnFl.js → home-a6Wm9NpF.js} +1 -1
- package/dist/assets/{id-CzhlCzfQ.js → id-BPCkzz44.js} +1 -1
- package/dist/assets/{iframe-DlpSvIZn.js → iframe-CBtn_TBO.js} +1 -1
- package/dist/assets/{index-DiJCHCJQ.js → index-8gFOBGo_.js} +1 -1
- package/dist/assets/{index-BoqN1cez.js → index-B3paoq5_.js} +1 -1
- package/dist/assets/{index-DEPlCG8R.js → index-B4hUQJhX.js} +1 -1
- package/dist/assets/{index-BTAdP21P.js → index-BDlLDYvt.js} +3 -3
- package/dist/assets/{index-b39g55oS.js → index-BKLCLOA9.js} +1 -1
- package/dist/assets/{index-CbGiX9t1.js → index-BOgiLbtH.js} +1 -1
- package/dist/assets/{index-SOr8TZG4.js → index-BpVGDF04.js} +1 -1
- package/dist/assets/{index-pO1GnrcK.js → index-BtM-vyTe.js} +1 -1
- package/dist/assets/{index-B4CQ80Yw.js → index-C0cETyyP.js} +1 -1
- package/dist/assets/{index-N3bV1fPM.js → index-C80uWXRm.js} +1 -1
- package/dist/assets/{index-mD8SG0jv.js → index-CeJkM0v0.js} +5 -5
- package/dist/assets/{index-B5nEIEWt.js → index-CetmzgXE.js} +1 -1
- package/dist/assets/{index-C1caLcNJ.js → index-CqAbJ70W.js} +1 -1
- package/dist/assets/{index-CieFHkS_.js → index-CuelF_jl.js} +1 -1
- package/dist/assets/{index-BqSFfNnu.js → index-Cwh-4NKd.js} +1 -1
- package/dist/assets/{index-D1pqWkt2.js → index-D4pJnFVI.js} +1 -1
- package/dist/assets/{index-B4uw4r9c.js → index-DF3k62Ty.js} +1 -1
- package/dist/assets/{index-BIzJJSjX.js → index-DGtbPi0N.js} +1 -1
- package/dist/assets/{index-Cw44iEdL.js → index-DLia2Jhf.js} +1 -1
- package/dist/assets/{index-DCGVoYKL.js → index-DMw4Feqc.js} +1 -1
- package/dist/assets/{index-B3lhXfcq.js → index-DVbwRv7P.js} +1 -1
- package/dist/assets/{index-BquWLMx9.js → index-DXjrORHu.js} +1 -1
- package/dist/assets/{index-BB6k-EGG.js → index-DaCuyf8Z.js} +1 -1
- package/dist/assets/{index-B2WTvZE_.js → index-DdCK795w.js} +1 -1
- package/dist/assets/{index-DlGzjxDp.js → index-DePrwIuq.js} +1 -1
- package/dist/assets/{index-BDMqvDjm.js → index-KzRn9Uki.js} +1 -1
- package/dist/assets/{index-BKSYmDJM.js → index-N5X8rYLb.js} +1 -1
- package/dist/assets/{index-CIqhUvIF.js → index-NJO-AV3k.js} +4 -4
- package/dist/assets/{index-DuAuh_Qj.js → index-R_qcDhvO.js} +1 -1
- package/dist/assets/{index-CVRkgzxH.js → index-agl_dRQV.js} +1 -1
- package/dist/assets/{index-B8xBf8Wa.js → index-gGHBBe5W.js} +1 -1
- package/dist/assets/{index-DXtRwHZx.js → index-rA68FgXF.js} +1 -1
- package/dist/assets/{index.es-Dn-9AeYW.js → index.es-DFdctp2x.js} +1 -1
- package/dist/assets/{index.esm-BoTu77Ll.js → index.esm-CFsU8w0K.js} +1 -1
- package/dist/assets/{invitation-CjSjQDE9.js → invitation-BlOWLFne.js} +1 -1
- package/dist/assets/{invite-BqTMGcAv.js → invite-CFlZFfg1.js} +1 -1
- package/dist/assets/{issue-passport-C-_NcTdl.js → issue-passport-St9nHFvC.js} +1 -1
- package/dist/assets/{item-BbixSUZ4.js → item-DOgjriFM.js} +1 -1
- package/dist/assets/{ja-Ut-jFS9r.js → ja-DdBhyqmR.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-DZWDNslx.js → jss-plugin-props-sort.esm-c-SBfCOD.js} +1 -1
- package/dist/assets/{ko-Clp4qzRT.js → ko-DagkAgw5.js} +1 -1
- package/dist/assets/{launch-result-message-t8NtPfuc.js → launch-result-message-D3CziAcu.js} +1 -1
- package/dist/assets/{layout-CsM3bk7r.js → layout-MACoKNsG.js} +1 -1
- package/dist/assets/{list-header-DXbrT6CB.js → list-header-DhwSnJnp.js} +1 -1
- package/dist/assets/localization-xFD_U4gq.js +1 -0
- package/dist/assets/{log-BWAyxwAa.js → log-B-JblZ0r.js} +1 -1
- package/dist/assets/{login-KizuTJVS.js → login-C83bYG8j.js} +1 -1
- package/dist/assets/{login-oauth-callback-BhWnqy5G.js → login-oauth-callback-Ctd8Dcwv.js} +1 -1
- package/dist/assets/{logo-uploader-B4fp_c-2.js → logo-uploader-rFAlv-AM.js} +3 -3
- package/dist/assets/{lost-passport-5g_wfjCg.js → lost-passport-4ilrc0t6.js} +3 -3
- package/dist/assets/{lottie-CoQLIbP3.js → lottie-Bs_qDpq1.js} +1 -1
- package/dist/assets/{notifications-BZOTKwjU.js → notifications-B2TXlNM3.js} +1 -1
- package/dist/assets/{open-window-OYk_-NDp.js → open-window-BKDECXFb.js} +1 -1
- package/dist/assets/{overview-BdlskfN-.js → overview-CTaMouVs.js} +1 -1
- package/dist/assets/{page-header-T1Bp_mgt.js → page-header-Djdf8MqY.js} +1 -1
- package/dist/assets/{permission-Bg73hR5s.js → permission-1n-2KaUs.js} +1 -1
- package/dist/assets/{preferences-CWItrONZ.js → preferences-CRyQEGdV.js} +1 -1
- package/dist/assets/{pt-BXaJbqdY.js → pt-DTmAqAWs.js} +1 -1
- package/dist/assets/publish-resource-CD04R7uB.js +1 -0
- package/dist/assets/{react-DXe505Vk.js → react-CRxH9paf.js} +3 -3
- package/dist/assets/{redux-t7duEter.js → redux-C8lvFe8Y.js} +1 -1
- package/dist/assets/{resource-dialog-BbVyEJK6.js → resource-dialog-eUQ9Rieo.js} +1 -1
- package/dist/assets/{ru-p_K_7IoQ.js → ru-BZQlsXeO.js} +1 -1
- package/dist/assets/sdk-BXUiACrc.js +1 -0
- package/dist/assets/{selector-G5cR85qZ.js → selector-BLtj8aBh.js} +1 -1
- package/dist/assets/session-Dan-0IB6.js +1 -0
- package/dist/assets/{setup-CokXt_nD.js → setup-Bh9EEaAK.js} +3 -3
- package/dist/assets/{shorten-label-EXwW2h8a.js → shorten-label-DjqkCLzY.js} +1 -1
- package/dist/assets/{slicedToArray-Bt_4hqVg.js → slicedToArray-CFnOoRku.js} +1 -1
- package/dist/assets/{spaces-DlyQ1uJX.js → spaces-sWb-sM6K.js} +1 -1
- package/dist/assets/{start-BxnAS7F4.js → start-DM_Zrd60.js} +1 -1
- package/dist/assets/{step-actions-Dj2gkAXe.js → step-actions-ClgpxDjL.js} +1 -1
- package/dist/assets/{studio-B28kKr7m.js → studio-8ExST0OO.js} +1 -1
- package/dist/assets/{switch-control-DuZuSueD.js → switch-control-Ci_o7kPC.js} +1 -1
- package/dist/assets/{th-BJT9w_Lk.js → th-DSRLorcE.js} +1 -1
- package/dist/assets/{toUpper-DPQf9Liw.js → toUpper-CSIvaKYq.js} +1 -1
- package/dist/assets/{transfer-Z8bjhog8.js → transfer-Dp2qO4AW.js} +1 -1
- package/dist/assets/{uniqBy-Bdhm211i.js → uniqBy-DKCUtl0E.js} +1 -1
- package/dist/assets/{unsubscribe-DJEG2TOy.js → unsubscribe-YG--STBD.js} +1 -1
- package/dist/assets/{url-join-vYtMsJoM.js → url-join-BXSzjowB.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-CoBB3cqW.js → use-blocklet-info-for-connect-did-spaces-D8nRG2iM.js} +1 -1
- package/dist/assets/{use-mobile-Bgh27XUZ.js → use-mobile-CDGh6sE-.js} +1 -1
- package/dist/assets/{useAsync-BLR1bit_.js → useAsync-CnzzTKxD.js} +1 -1
- package/dist/assets/{useFormControl-CJQAQwNi.js → useFormControl-BFbYcjEq.js} +1 -1
- package/dist/assets/{useLocalStorage-BqRSbLpZ.js → useLocalStorage-Cw0scMnB.js} +1 -1
- package/dist/assets/{useSetState-Bgiqtk4Z.js → useSetState-DnqVazcm.js} +1 -1
- package/dist/assets/{useSlot-CgMgJNqB.js → useSlot-CBKrwC9m.js} +1 -1
- package/dist/assets/{useSlotProps-2VUaV6ss.js → useSlotProps-D1Us3MLI.js} +1 -1
- package/dist/assets/{useThemeProps-aetSbjSK.js → useThemeProps-C4TUmygR.js} +1 -1
- package/dist/assets/{user-center-B1Gsfz8w.js → user-center-Cgd_P5Em.js} +1 -1
- package/dist/assets/{user-sessions-DlIZI2bO.js → user-sessions-D_vg4EZo.js} +1 -1
- package/dist/assets/{util-BrJI9hcg.js → util-Bfxkvo2e.js} +1 -1
- package/dist/assets/{vi-CycHlNkN.js → vi-dE7BhTCc.js} +1 -1
- package/dist/assets/wrap-locale-Cm_sNVY7.js +1 -0
- package/dist/assets/{zh-Dv1l1HNj.js → zh-DfGqeTts.js} +1 -1
- package/dist/assets/{zh-tw-44W5osxR.js → zh-tw-COZAaB9V.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +25 -25
- package/dist/assets/api-8rjdlHSp.js +0 -1
- package/dist/assets/localization-BbbfeFcx.js +0 -1
- package/dist/assets/publish-resource-Q0hqmXfS.js +0 -1
- package/dist/assets/sdk-BsJqLCFt.js +0 -1
- package/dist/assets/session-t0W8qYc5.js +0 -1
- package/dist/assets/wrap-locale-DSIbwxKJ.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-
|
|
2
|
-
import{au as a2,j as o,aH as se,cJ as v0,aL as A,fw as K1,aK as je,aF as $e,aG as Fe,T as G,r as R,aJ as m1,aM as c2,aN as Ue,aO as qe,cP as d2,fx as l1,Z as Te,$ as Ne,B as z,n as Oe,P as h,a1 as We,G as X,e as v1,u as te,aQ as we,aZ as Ve,by as n1,a3 as e1,L as ue,bL as g0,a as ve,aD as ge,K as u2,t as $,a0 as ae,dw as p2,ab as ye,c as pe,I as h2,bW as g1,ch as b0,cE as f2,cN as He,cO as j0,ak as x2,d2 as m2,cI as Je,bF as re,c4 as Qe,fi as v2,a9 as X1,b as ne,bn as w0,dy as R0,aj as b1,bo as C0,co as y0,aU as Ae,aT as g2,a4 as z0,fy as J1,f7 as Me,bl as b2,av as S0,cV as j2,l as w2,aC as R2,ar as C2,as as i1}from"./index-mD8SG0jv.js";import{d as j1}from"./Add-CtuOts08.js";import{d as y2}from"./AddBox-BEozRxtr.js";import{d as k0}from"./Delete-v2KnFPpc.js";import{d as z2}from"./Error-ke6eGotz.js";import{D as w1}from"./index-B4CQ80Yw.js";import{T as I0,b as S2}from"./index-B3lhXfcq.js";import{C as R1}from"./confirm-BMHhcHat.js";import{u as s1}from"./session-t0W8qYc5.js";import{W as Q1}from"./did-address-DpvI-gvi.js";import{B as C1,d as k2}from"./ChevronRight-DJc4PiWZ.js";import{S as be}from"./shorten-label-EXwW2h8a.js";import{A as M0}from"./Avatar-BFetDMjX.js";import{d as I2}from"./Download-xUlajQ0m.js";import{d as M2}from"./QuestionMarkCircle-DTOYeWeD.js";import{b as P2,c as Y1,T as L2}from"./index-BB6k-EGG.js";import{_ as Ie}from"./useSetState-Bgiqtk4Z.js";import{c as y1}from"./index-BqSFfNnu.js";import{C as u1,F as p1,S as T2}from"./FormControlLabel-DImktg38.js";import{A as P0}from"./Alert-C8bmV94C.js";import{p as t1}from"./index-HqFqdQ4r.js";import"./api-8rjdlHSp.js";import{i as N2}from"./index-B5nEIEWt.js";import{d as V2}from"./ExpandMore-C2VxPPft.js";import{d as D2}from"./OpenInNew-C4QXGxL_.js";import{u as L0}from"./useThemeProps-aetSbjSK.js";import{u as _2}from"./useSlotProps-2VUaV6ss.js";import{d as E2}from"./DeleteOutline-D-H_BT5g.js";import{c as B2,A as T0,u as A2,S as O2,U as H2}from"./item-BbixSUZ4.js";import{d as $2}from"./ArrowDropDown-BXgf18Oe.js";import{f as Le}from"./format-error-Cly-PKJi.js";import{B as h1}from"./ButtonGroup-4rs4O4kq.js";import{T as Pe}from"./TextField-Cb2e0-k4.js";import{I as z1}from"./InputAdornment-C6qOb1bH.js";import{C as F2}from"./click-to-copy-DdF2xqop.js";import{d as U2}from"./Launch-CMhSFuNV.js";import{L as q2}from"./MoreVert-C7sQuxig.js";import{a as W2}from"./ListItemText-EkATTCYw.js";import{S as Z1}from"./index-DCGVoYKL.js";import{M as G2}from"./index-N3bV1fPM.js";import{r as K2}from"./index-BIzJJSjX.js";import{d as X2}from"./Done-Cg0F76Fb.js";import{c as N0,d as V0,b as J2,S as Q2,a as Y2}from"./Stepper-B-zipvzv.js";import{R as Z2,a as e0}from"./RadioGroup-CmTDruGg.js";import"./FilterList-Bm69psLt.js";import"./toPropertyKey-PLuKRk1e.js";import"./FormControl-BsXCFEZS.js";import"./useFormControl-CJQAQwNi.js";import"./FormGroup-DaX4v3-4.js";import"./InputLabel-CgXPR_2f.js";import"./Select-CiXWOKZU.js";import"./LastPage-DJY3kolG.js";import"./Toolbar-CmSNHGuN.js";import"./index-DlGzjxDp.js";import"./redux-t7duEter.js";import"./Search-CZ97KNMp.js";import"./index-C1caLcNJ.js";import"./Link-DOOEUv0s.js";import"./useSlot-CgMgJNqB.js";import"./jss-plugin-props-sort.esm-DZWDNslx.js";const et=a2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),tt=["slots","slotProps"],ot=se(v0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:K1(e.palette.grey[200],.12)}:{backgroundColor:K1(e.palette.grey[600],.12)})})),lt=se(et)({width:24,height:16});function nt(e){const{slots:t={},slotProps:l={}}=e,s=je(e,tt),r=e;return o.jsx("li",{children:o.jsx(ot,A({focusRipple:!0},s,{ownerState:r,children:o.jsx(lt,A({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function st(e){return Fe("MuiBreadcrumbs",e)}const rt=$e("MuiBreadcrumbs",["root","ol","li","separator"]),it=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],at=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,t)},ct=se(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${rt.li}`]:t.li},t.root]})({}),dt=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ut=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,t,l,s){return e.reduce((r,c,i)=>(i<e.length-1?r=r.concat(c,o.jsx(ut,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(c),r),[])}const D0=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:c,component:i="nav",slots:a={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,d=je(s,it),[m,b]=R.useState(!1),v=A({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=at(v),S=c2({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=I=>{const U=()=>{b(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(nt,{"aria-label":f,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:U},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,U)=>o.jsx("li",{className:C.li,children:I},`child-${U}`));return o.jsx(ct,A({ref:l,component:i,color:"text.secondary",className:Ue(C.root,c),ownerState:v},d,{children:o.jsx(dt,{className:C.ol,ref:N,ownerState:v,children:pt(m||y&&P.length<=y?P:T(P),C.separator,p,v)})}))});function ht(e){return Fe("MuiStepButton",e)}const t0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),ft=["children","className","icon","optional"],xt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},ht,t)},mt=se(v0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${t0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${t0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),vt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepButton"}),{children:r,className:c,icon:i,optional:a}=s,u=je(s,ft),{disabled:f,active:x}=R.useContext(N0),{orientation:g}=R.useContext(V0),y=A({},s,{orientation:g}),p=xt(y),d={icon:i,optional:a},m=d2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(J2,A({},d,{children:r}));return o.jsx(mt,A({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))});function gt(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const bt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],jt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},gt,t)},wt=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),Rt=se(l1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Ct=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepContent"}),{children:r,className:c,TransitionComponent:i=l1,transitionDuration:a="auto",TransitionProps:u}=s,f=je(s,bt);R.useContext(V0);const{active:x,last:g,expanded:y}=R.useContext(N0),p=A({},s,{last:g}),d=jt(p);let m=a;return a==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(wt,A({className:Ue(d.root,c),ref:l,ownerState:p},f,{children:o.jsx(Rt,A({as:i,in:x||y,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var S1={},yt=Ne;Object.defineProperty(S1,"__esModule",{value:!0});var _0=S1.default=void 0,zt=yt(Te()),St=o;_0=S1.default=(0,zt.default)((0,St.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var k1={},kt=Ne;Object.defineProperty(k1,"__esModule",{value:!0});var E0=k1.default=void 0,It=kt(Te()),Mt=o;E0=k1.default=(0,It.default)((0,Mt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Se({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(Oe,{size:e})})}Se.propTypes={size:h.number};Se.defaultProps={size:24};function I1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(M0,{sx:{borderRadius:1},src:i}),o.jsxs(z,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:r||"/"})]})]})}I1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function M1({initUrl:e}){const t=v1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:c}=we(),{api:i}=s1(),[a,u]=R.useState(!0),{blocklet:f}=Ve(),[x,g]=R.useState(null),[y,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=n1(),[b,v]=R.useState(null),C=()=>{c.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const L=(k==null?void 0:k.projects)||[];u(!1),v(L)}).catch(k=>{u(!1),$.error(k.message)})},S=()=>{t(`${X.UNOWNED_DID}/create/none`,{replace:!0})},N=k=>{g(k)},T=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{$.error(k.message),p(!1),g(null)},U=k=>{if(!(k!=null&&k.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Se,{})});if(!b)return null;if(!b.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(e1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const L=b[k];return o.jsx(ue,{to:`${L.id}`,children:o.jsx(I1,{did:f.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(I0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(Q1,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(Q1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${k}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:k}):null}},d||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:k=>{const L=(f.children||[]).find(E=>E.meta.did===k);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:14,blocklet:L,ancestors:[f]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(g0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const L=b[k];return o.jsxs(z,{display:"flex",children:[o.jsx(ue,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(y2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(_0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(k0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=y?o.jsx(u2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:U,onError:I,extraParams:{projectId:x.id,did:f.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Pt,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(E0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(e1,{onClick:S,variant:"contained",children:[o.jsx(j1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(w1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(R1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(z2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(G,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}M1.propTypes={initUrl:h.object};M1.defaultProps={initUrl:null};const Pt=ae(z)`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-CRxH9paf.js","assets/index-CeJkM0v0.js","assets/index-D8NuaJ66.css","assets/index-N5X8rYLb.js","assets/preact.module-DJUF--8d.js","assets/index-DdCK795w.js","assets/index-Cwh-4NKd.js","assets/toUpper-CSIvaKYq.js","assets/index-BKLCLOA9.js","assets/fallback-CBYR9h-e.js","assets/index-agl_dRQV.js","assets/Toolbar-Q23C-iDI.js","assets/Hidden-BQDFSM76.js","assets/index-R_qcDhvO.js","assets/MoreVert-Bh_9XRgK.js","assets/selector-BLtj8aBh.js","assets/ExpandMore-C8uCTD8b.js","assets/Avatar-I4LrexTj.js","assets/useSlot-CBKrwC9m.js","assets/resource-dialog-eUQ9Rieo.js","assets/OpenInNew-C7zQWaJQ.js","assets/CloseOutlined-C9xrS2j0.js","assets/use-mobile-CDGh6sE-.js","assets/Link-yMVGUiQU.js","assets/index-DaCuyf8Z.js","assets/index-CqAbJ70W.js","assets/index-DMw4Feqc.js","assets/FormControlLabel-CihXnmsn.js","assets/useFormControl-BFbYcjEq.js","assets/index-C0cETyyP.js","assets/FilterList-D-UubHll.js","assets/useThemeProps-C4TUmygR.js","assets/toPropertyKey-PLuKRk1e.js","assets/FormControl-OvOdEegG.js","assets/FormGroup-bSyoAX3O.js","assets/InputLabel-D84lrsDr.js","assets/ListItemText-CKNC4df7.js","assets/Select-BBu0WXuJ.js","assets/TextField-CJ7QYMjw.js","assets/LastPage-CYe3NEpf.js","assets/index-DePrwIuq.js","assets/redux-C8lvFe8Y.js","assets/Search-Cgo3NMCI.js","assets/Delete-cMnabl-R.js","assets/index-BOgiLbtH.js","assets/url-join-BXSzjowB.js","assets/uniqBy-DKCUtl0E.js","assets/react-BW7E7-P9.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{au as a2,j as o,aH as se,cJ as v0,aL as A,fw as K1,aK as je,aF as $e,aG as Fe,T as G,r as R,aJ as m1,aM as c2,aN as Ue,aO as qe,cP as d2,fx as l1,Z as Te,$ as Ne,B as z,n as Oe,P as h,a1 as We,G as X,e as v1,u as te,aQ as we,aZ as Ve,by as n1,a3 as e1,L as ue,bL as g0,a as ve,aD as ge,K as u2,t as $,a0 as ae,dw as p2,ab as ye,c as pe,I as h2,bW as g1,ch as b0,cE as f2,cN as He,cO as j0,ak as x2,d2 as m2,cI as Je,bF as re,c4 as Qe,fi as v2,a9 as X1,b as ne,bn as w0,dy as R0,aj as b1,bo as C0,co as y0,aU as Ae,aT as g2,a4 as z0,fy as J1,f7 as Me,bl as b2,av as S0,cV as j2,l as w2,aC as R2,ar as C2,as as i1}from"./index-CeJkM0v0.js";import{d as j1}from"./Add-I80IZ6n7.js";import{d as y2}from"./AddBox-DZneyqwz.js";import{d as k0}from"./Delete-cMnabl-R.js";import{d as z2}from"./Error-Dfzerimh.js";import{D as w1}from"./index-C0cETyyP.js";import{T as I0,b as S2}from"./index-DVbwRv7P.js";import{C as R1}from"./confirm-3NbF1L_x.js";import{u as s1}from"./session-Dan-0IB6.js";import{W as Q1}from"./did-address-DKoES_ji.js";import{B as C1,d as k2}from"./ChevronRight-BRnAN7b1.js";import{S as be}from"./shorten-label-DjqkCLzY.js";import{A as M0}from"./Avatar-I4LrexTj.js";import{d as I2}from"./Download-DLpabTh2.js";import{d as M2}from"./QuestionMarkCircle-DIZZk7yo.js";import{b as P2,c as Y1,T as L2}from"./index-DaCuyf8Z.js";import{_ as Ie}from"./useSetState-DnqVazcm.js";import{c as y1}from"./index-Cwh-4NKd.js";import{C as u1,F as p1,S as T2}from"./FormControlLabel-CihXnmsn.js";import{A as P0}from"./Alert-zOnAbv2N.js";import{p as t1}from"./index-HqFqdQ4r.js";import"./api-BSu5xlAU.js";import{i as N2}from"./index-CetmzgXE.js";import{d as V2}from"./ExpandMore-C8uCTD8b.js";import{d as D2}from"./OpenInNew-C7zQWaJQ.js";import{u as L0}from"./useThemeProps-C4TUmygR.js";import{u as _2}from"./useSlotProps-D1Us3MLI.js";import{d as E2}from"./DeleteOutline-BIO4C7JH.js";import{c as B2,A as T0,u as A2,S as O2,U as H2}from"./item-DOgjriFM.js";import{d as $2}from"./ArrowDropDown-BAI37_Gq.js";import{f as Le}from"./format-error-BaAV9G7k.js";import{B as h1}from"./ButtonGroup-lq54G41C.js";import{T as Pe}from"./TextField-CJ7QYMjw.js";import{I as z1}from"./InputAdornment-BD2B7KXz.js";import{C as F2}from"./click-to-copy-Dl9rmVPj.js";import{d as U2}from"./Launch-D4UdpeqK.js";import{L as q2}from"./MoreVert-Bh_9XRgK.js";import{a as W2}from"./ListItemText-CKNC4df7.js";import{S as Z1}from"./index-DMw4Feqc.js";import{M as G2}from"./index-C80uWXRm.js";import{r as K2}from"./index-DGtbPi0N.js";import{d as X2}from"./Done-O71rXdD5.js";import{c as N0,d as V0,b as J2,S as Q2,a as Y2}from"./Stepper-C_FjBtqi.js";import{R as Z2,a as e0}from"./RadioGroup-sWPe7aB5.js";import"./FilterList-D-UubHll.js";import"./toPropertyKey-PLuKRk1e.js";import"./FormControl-OvOdEegG.js";import"./useFormControl-BFbYcjEq.js";import"./FormGroup-bSyoAX3O.js";import"./InputLabel-D84lrsDr.js";import"./Select-BBu0WXuJ.js";import"./LastPage-CYe3NEpf.js";import"./Toolbar-Q23C-iDI.js";import"./index-DePrwIuq.js";import"./redux-C8lvFe8Y.js";import"./Search-Cgo3NMCI.js";import"./index-CqAbJ70W.js";import"./Link-yMVGUiQU.js";import"./useSlot-CBKrwC9m.js";import"./jss-plugin-props-sort.esm-c-SBfCOD.js";const et=a2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),tt=["slots","slotProps"],ot=se(v0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:K1(e.palette.grey[200],.12)}:{backgroundColor:K1(e.palette.grey[600],.12)})})),lt=se(et)({width:24,height:16});function nt(e){const{slots:t={},slotProps:l={}}=e,s=je(e,tt),r=e;return o.jsx("li",{children:o.jsx(ot,A({focusRipple:!0},s,{ownerState:r,children:o.jsx(lt,A({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function st(e){return Fe("MuiBreadcrumbs",e)}const rt=$e("MuiBreadcrumbs",["root","ol","li","separator"]),it=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],at=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,t)},ct=se(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${rt.li}`]:t.li},t.root]})({}),dt=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ut=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,t,l,s){return e.reduce((r,c,i)=>(i<e.length-1?r=r.concat(c,o.jsx(ut,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(c),r),[])}const D0=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:c,component:i="nav",slots:a={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,d=je(s,it),[m,b]=R.useState(!1),v=A({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=at(v),S=c2({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=I=>{const U=()=>{b(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(nt,{"aria-label":f,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:U},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,U)=>o.jsx("li",{className:C.li,children:I},`child-${U}`));return o.jsx(ct,A({ref:l,component:i,color:"text.secondary",className:Ue(C.root,c),ownerState:v},d,{children:o.jsx(dt,{className:C.ol,ref:N,ownerState:v,children:pt(m||y&&P.length<=y?P:T(P),C.separator,p,v)})}))});function ht(e){return Fe("MuiStepButton",e)}const t0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),ft=["children","className","icon","optional"],xt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},ht,t)},mt=se(v0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${t0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${t0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),vt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepButton"}),{children:r,className:c,icon:i,optional:a}=s,u=je(s,ft),{disabled:f,active:x}=R.useContext(N0),{orientation:g}=R.useContext(V0),y=A({},s,{orientation:g}),p=xt(y),d={icon:i,optional:a},m=d2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(J2,A({},d,{children:r}));return o.jsx(mt,A({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))});function gt(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const bt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],jt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},gt,t)},wt=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),Rt=se(l1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Ct=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepContent"}),{children:r,className:c,TransitionComponent:i=l1,transitionDuration:a="auto",TransitionProps:u}=s,f=je(s,bt);R.useContext(V0);const{active:x,last:g,expanded:y}=R.useContext(N0),p=A({},s,{last:g}),d=jt(p);let m=a;return a==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(wt,A({className:Ue(d.root,c),ref:l,ownerState:p},f,{children:o.jsx(Rt,A({as:i,in:x||y,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var S1={},yt=Ne;Object.defineProperty(S1,"__esModule",{value:!0});var _0=S1.default=void 0,zt=yt(Te()),St=o;_0=S1.default=(0,zt.default)((0,St.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var k1={},kt=Ne;Object.defineProperty(k1,"__esModule",{value:!0});var E0=k1.default=void 0,It=kt(Te()),Mt=o;E0=k1.default=(0,It.default)((0,Mt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Se({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(Oe,{size:e})})}Se.propTypes={size:h.number};Se.defaultProps={size:24};function I1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(M0,{sx:{borderRadius:1},src:i}),o.jsxs(z,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:r||"/"})]})]})}I1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function M1({initUrl:e}){const t=v1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:c}=we(),{api:i}=s1(),[a,u]=R.useState(!0),{blocklet:f}=Ve(),[x,g]=R.useState(null),[y,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=n1(),[b,v]=R.useState(null),C=()=>{c.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const L=(k==null?void 0:k.projects)||[];u(!1),v(L)}).catch(k=>{u(!1),$.error(k.message)})},S=()=>{t(`${X.UNOWNED_DID}/create/none`,{replace:!0})},N=k=>{g(k)},T=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{$.error(k.message),p(!1),g(null)},U=k=>{if(!(k!=null&&k.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Se,{})});if(!b)return null;if(!b.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(e1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const L=b[k];return o.jsx(ue,{to:`${L.id}`,children:o.jsx(I1,{did:f.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(I0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(Q1,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(Q1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${k}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:k}):null}},d||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:k=>{const L=(f.children||[]).find(E=>E.meta.did===k);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:14,blocklet:L,ancestors:[f]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(g0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const L=b[k];return o.jsxs(z,{display:"flex",children:[o.jsx(ue,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(y2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(_0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(k0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=y?o.jsx(u2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:U,onError:I,extraParams:{projectId:x.id,did:f.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Pt,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(E0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(e1,{onClick:S,variant:"contained",children:[o.jsx(j1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(w1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(R1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(z2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(G,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}M1.propTypes={initUrl:h.object};M1.defaultProps={initUrl:null};const Pt=ae(z)`
|
|
3
3
|
.main-table > div:first-child {
|
|
4
4
|
display: none;
|
|
5
5
|
}
|
|
@@ -133,7 +133,7 @@ import{au as a2,j as o,aH as se,cJ as v0,aL as A,fw as K1,aK as je,aF as $e,aG a
|
|
|
133
133
|
background: #fff;
|
|
134
134
|
z-index: 10;
|
|
135
135
|
}
|
|
136
|
-
`,a0="lastWantToConnectStoreId";function $l(e){var a,u;const[t,l]=R.useState(null),{session:s}=s1(),r=R.useCallback(f=>{l(f),localStorage.setItem(a0,f==null?void 0:f.id)},[l]),c=R.useMemo(()=>{var y,p,d,m;const f=localStorage.getItem(a0),x=f?(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(b=>b.id===f):null;if(x)return x;let g=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(b=>{var v;return!(b.id!==X.BLOCKLET_STORE.id||b.scope&&b.scope!=="studio"&&b.scope!==((v=s==null?void 0:s.user)==null?void 0:v.did))});return g||(g=(m=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:m[0]),g},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c||{},r]}const d1={};async function W0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){d1[r]&&clearTimeout(d1[r]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),i=async(a,u)=>{try{const f=await e();a(f)}catch(f){Date.now()-c>l?u(f):r?d1[r]=setTimeout(()=>i(a,u),t):setTimeout(()=>i(a,u),t)}};return new Promise(i)}function Fl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Ul(e,{did:t,projectId:l,messageId:s}){return W0(async()=>{var c;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=r==null?void 0:r.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function ql(e,{did:t,projectId:l,storeId:s}){return W0(async()=>{var i,a;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const G0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,a;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(c)||(c=[]),c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:c}};function O1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:c,componentDid:i}){var L,E,B;const{t:a}=te(),{session:u}=s1(),{api:f,info:x,inService:g}=we(),y=Ve(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),N=O=>{l(O),d(!1)},T=()=>{d(!p)},P=O=>{m.current&&m.current.contains(O.target)||d(!1)},I=()=>{v(!0)},U=()=>{v(!1)},V=async()=>{var O;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet())}catch(K){$.error(`Remove Blocklet Store Error: ${Le(K)}`)}finally{S(null)}},{storeList:M}=G0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),k=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(h1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[c&&o.jsx(Oe,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx($2,{})})]}),o.jsx(w0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:O})=>o.jsx(R0,{...O,style:{transformOrigin:"center top"},children:o.jsx(b1,{children:o.jsx(C0,{onClickAway:P,children:o.jsxs(y0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(K=>{var J;return o.jsxs(Ae,{selected:K.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>N(K),children:[o.jsxs(z,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:K.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:K.url})]}),B2({store:K,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(ge,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(K)},children:o.jsx(re,{icon:"ic:outline-delete"})})]},K.url)}),o.jsx(g2,{}),o.jsxs(Ae,{onClick:I,children:[o.jsx(j1,{font:!0}),o.jsx(G,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(T0,{hiddenChildren:!0,open:!0,onClose:U,teamDid:k,storeList:M,scope:"studio",onAdd:(B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet}),C&&o.jsx(R1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}O1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};O1.defaultProps={store:null,blocklet:null};const c0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],d0=1024*1024*10,u0=R.lazy(()=>z0(()=>import("./react-DXe505Vk.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])).then(e=>({default:e.Uploader})));function K0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:c,paramsErrTip:i,setParamsErrTip:a,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:d}=we(),m=v1(),b=R.useRef(null),v=R.useRef(null),[C,S]=$l(s),N=A2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),B=await Ul(d,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${B}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){$.error(p("blocklet.publish.noStoreSelected"));return}const L=Fl();N(async(E,B)=>{var O,K,J;try{const W=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((K=r==null?void 0:r.blockletComponents)==null?void 0:K.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){$.error("failed to connect to store");return}B(W.url),T({did:(J=s==null?void 0:s.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const Z=Le(W);$.error(Z),u(!1)}})},I=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,U=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(L=>`${U}/${L}`),k=()=>t?!1:!e||e===X.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Wl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Pe,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Pe,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&o.jsx(z1,{position:"end",children:o.jsx(O1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Pe,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(M0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{k()&&b.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[M.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ge,{className:"action",onClick:()=>{c(B=>{const O=[...B.blockletScreenshots];return O.splice(E,1),{...B,blockletScreenshots:O}})},children:o.jsx(E2,{})})]},L)),M.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{k()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Se,{}),children:[o.jsx(u0,{ref:b,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),b.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:c0,maxFileSize:d0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(u0,{ref:v,popup:!0,onUploadFinish:L=>{c(E=>{var O;const B=E.blockletScreenshots||[];return B.push((O=L.data)==null?void 0:O.filename),{...E,blockletScreenshots:B}}),v.current.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:U,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:c0,maxFileSize:d0,maxNumberOfFiles:5-M.length}}},"uploader-screenshot")]})]})}K0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const Wl=ae.div`
|
|
136
|
+
`,a0="lastWantToConnectStoreId";function $l(e){var a,u;const[t,l]=R.useState(null),{session:s}=s1(),r=R.useCallback(f=>{l(f),localStorage.setItem(a0,f==null?void 0:f.id)},[l]),c=R.useMemo(()=>{var y,p,d,m;const f=localStorage.getItem(a0),x=f?(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(b=>b.id===f):null;if(x)return x;let g=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(b=>{var v;return!(b.id!==X.BLOCKLET_STORE.id||b.scope&&b.scope!=="studio"&&b.scope!==((v=s==null?void 0:s.user)==null?void 0:v.did))});return g||(g=(m=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:m[0]),g},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c||{},r]}const d1={};async function W0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){d1[r]&&clearTimeout(d1[r]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),i=async(a,u)=>{try{const f=await e();a(f)}catch(f){Date.now()-c>l?u(f):r?d1[r]=setTimeout(()=>i(a,u),t):setTimeout(()=>i(a,u),t)}};return new Promise(i)}function Fl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Ul(e,{did:t,projectId:l,messageId:s}){return W0(async()=>{var c;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=r==null?void 0:r.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function ql(e,{did:t,projectId:l,storeId:s}){return W0(async()=>{var i,a;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const G0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,a;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(c)||(c=[]),c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:c}};function O1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:c,componentDid:i}){var L,E,B;const{t:a}=te(),{session:u}=s1(),{api:f,info:x,inService:g}=we(),y=Ve(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),N=O=>{l(O),d(!1)},T=()=>{d(!p)},P=O=>{m.current&&m.current.contains(O.target)||d(!1)},I=()=>{v(!0)},U=()=>{v(!1)},V=async()=>{var O;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet())}catch(K){$.error(`Remove Blocklet Store Error: ${Le(K)}`)}finally{S(null)}},{storeList:M}=G0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),k=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(h1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[c&&o.jsx(Oe,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx($2,{})})]}),o.jsx(w0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:O})=>o.jsx(R0,{...O,style:{transformOrigin:"center top"},children:o.jsx(b1,{children:o.jsx(C0,{onClickAway:P,children:o.jsxs(y0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(K=>{var J;return o.jsxs(Ae,{selected:K.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>N(K),children:[o.jsxs(z,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:K.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:K.url})]}),B2({store:K,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(ge,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(K)},children:o.jsx(re,{icon:"ic:outline-delete"})})]},K.url)}),o.jsx(g2,{}),o.jsxs(Ae,{onClick:I,children:[o.jsx(j1,{font:!0}),o.jsx(G,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(T0,{hiddenChildren:!0,open:!0,onClose:U,teamDid:k,storeList:M,scope:"studio",onAdd:(B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet}),C&&o.jsx(R1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}O1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};O1.defaultProps={store:null,blocklet:null};const c0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],d0=1024*1024*10,u0=R.lazy(()=>z0(()=>import("./react-CRxH9paf.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])).then(e=>({default:e.Uploader})));function K0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:c,paramsErrTip:i,setParamsErrTip:a,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:d}=we(),m=v1(),b=R.useRef(null),v=R.useRef(null),[C,S]=$l(s),N=A2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),B=await Ul(d,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${B}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){$.error(p("blocklet.publish.noStoreSelected"));return}const L=Fl();N(async(E,B)=>{var O,K,J;try{const W=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((K=r==null?void 0:r.blockletComponents)==null?void 0:K.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){$.error("failed to connect to store");return}B(W.url),T({did:(J=s==null?void 0:s.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const Z=Le(W);$.error(Z),u(!1)}})},I=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,U=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(L=>`${U}/${L}`),k=()=>t?!1:!e||e===X.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Wl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Pe,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Pe,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&o.jsx(z1,{position:"end",children:o.jsx(O1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Pe,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(M0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{k()&&b.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[M.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ge,{className:"action",onClick:()=>{c(B=>{const O=[...B.blockletScreenshots];return O.splice(E,1),{...B,blockletScreenshots:O}})},children:o.jsx(E2,{})})]},L)),M.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{k()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Se,{}),children:[o.jsx(u0,{ref:b,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),b.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:c0,maxFileSize:d0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(u0,{ref:v,popup:!0,onUploadFinish:L=>{c(E=>{var O;const B=E.blockletScreenshots||[];return B.push((O=L.data)==null?void 0:O.filename),{...E,blockletScreenshots:B}}),v.current.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:U,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:c0,maxFileSize:d0,maxNumberOfFiles:5-M.length}}},"uploader-screenshot")]})]})}K0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const Wl=ae.div`
|
|
137
137
|
margin-top: 24px;
|
|
138
138
|
.screenshot {
|
|
139
139
|
margin-bottom: 16px;
|
|
@@ -178,7 +178,7 @@ import{au as a2,j as o,aH as se,cJ as v0,aL as A,fw as K1,aK as je,aF as $e,aG a
|
|
|
178
178
|
padding-bottom: 12px;
|
|
179
179
|
border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
|
|
180
180
|
}
|
|
181
|
-
`;function e2({text:e}){return e?o.jsx(G2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[K2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ge})}e2.propTypes={text:h.string.isRequired};function t2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:c}){var x;const{t:i}=te(),[a,u]=R.useState(c?"preview":"write"),f=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(G,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(P2,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(Y1,{value:"write",label:"Write"}),o.jsx(Y1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Pe,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(z1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{r({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx(e2,{text:e.blockletIntroduction||""})})]})}t2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var F1={},o3=Ne;Object.defineProperty(F1,"__esModule",{value:!0});var o2=F1.default=void 0,l3=o3(Te()),h0=o;o2=F1.default=(0,l3.default)([(0,h0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,h0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function U1({step:e,ok:t,active:l,error:s}){let r="grey.500",c=e+1;return t&&(c=o.jsx(X2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",c=o.jsx(o2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}U1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};U1.defaultProps={step:0,ok:!1,active:0,error:""};function l2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:c,paramsErrTip:i,viewMode:a,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},y=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||J0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(Q2,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=c||!e3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=c?"":y(m);return C&&(b.optional=o.jsx(G,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(Y2,{children:[o.jsx(vt,{icon:o.jsx(U1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...b,children:o.jsx(G,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(Ct,{children:[o.jsx(G,{fontSize:12,children:d.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:f("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(b1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(G,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}l2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const n3=[".zip",".gz"],s3=1024*1024*100,r3=R.lazy(()=>z0(()=>import("./react-DXe505Vk.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])).then(e=>({default:e.Uploader})));function q1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:c,error:i}){const{t:a}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===X.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(G,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(T2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(G,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;f()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Se,{}),children:o.jsx(r3,{ref:u,popup:!0,onUploadFinish:g=>{var y;r({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:n3,maxFileSize:s3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:i})]})}q1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};q1.defaultProps={};function o1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:c}){var a;const{t:i}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Pe,{required:!0,disabled:c||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{r({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Pe,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(z1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{r({note:""}),l({note:u.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}o1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};o1.defaultProps={};function n2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&n2(e[t]);return e}const i3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},f0=(e,t)=>{const l=g1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},a3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},x0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function W1({initUrl:e,...t}){var G1;const{projectId:l,mode:s,releaseId:r,componentDid:c=""}=n1(),{t:i}=te(),{blocklet:a}=Ve(),[u,f]=Ie({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Ie({}),[y,p]=R.useState(!1),[d,m]=Ie(null),{api:b}=we(),v=We(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),P=R.useRef({}),[I,U]=Ie({}),[V,M]=R.useState(""),[k,L]=Ie({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=E==="readonly",O=R.useMemo(()=>{const D={};return Object.keys(k).forEach(_=>{const Ce=k[_];Ce&&Ce.forEach(i2=>{D[i2]=!0})}),D},[k]),K=R.useCallback(D=>{B&&f({blockletComponents:[]}),L(D)},[B,L,f]),J=R.useCallback((...D)=>{U(...D),g({blockletResource:""})},[]),W=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Z,ke]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const he=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(_=>_.included)||Object.keys(O).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,O]),ce=[],oe=((a==null?void 0:a.children)||[]).filter(D=>{var _;return(_=D.meta.resource)==null?void 0:_.exportApi}).filter(D=>!c||D.meta.did===c);oe.forEach(D=>{i3({tabs:ce,blocklet:D,t:i,ancestors:[a]})});const[ee,ie]=R.useState((G1=ce[0])==null?void 0:G1.value),fe=!N&&(d==null?void 0:d.status)==="published",Q=fe,xe=w2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(_=>{var Ce;return{..._,blockletTitle:(_==null?void 0:_.blockletTitle)||e.searchParams.get("title"),blockletDescription:(_==null?void 0:_.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(_==null?void 0:_.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=_==null?void 0:_.blockletComponents)!=null&&Ce.length?_==null?void 0:_.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(_==null?void 0:_.note)||e.searchParams.get("note")||"No note"}});const D=e.searchParams.get("resources");try{const _=JSON.parse(D);S(_)}catch{}}),q=async()=>{if(W)try{const D=await b.getRelease({input:{did:a.meta.did,projectId:l,releaseId:W}});if(p(!1),!D.release){$.error("Release not found");return}D.release=n2(D.release),s!=="view"&&(D.release.note=""),f(_=>f0({..._,...D.release,blockletVersion:s==="create"||s==="new-release"?Me.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Le(D))}},le=async()=>{if(l===X.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(i("blocklet.publish.errorTip.noDid"));return}try{const _=(await b.getProject({input:{did:a.meta.did,projectId:l}})).project||{};_.blockletVersion?(s==="create"||s==="new-release")&&Me.valid(_.blockletVersion)&&(_.blockletVersion=Me.inc(_.blockletVersion,"patch")):_.blockletVersion="1.0.0";const Ce=f0(_,a);f(Ce),_.lastReleaseId||xe()}catch(D){$.error(Le(D))}},H=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!W){$.error("Empty release id");return}await le(),await q();return}await le(),W&&(T(!0),await q())}finally{p(!1)}},[s,W]),Ke=D=>{f({blockletComponents:D})};R.useEffect(()=>{H()},[H]),R.useEffect(()=>{l===X.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const _e=R.useMemo(()=>!!Object.keys(I).find(D=>!!I[D].length),[I]);if(!u&&y)return o.jsx(Se,{});if(!u)return null;const Ee=oe.find(D=>D.meta.did===ee);if(oe.every(D=>D.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const Xe=D=>{ie(D)},F=e==null?void 0:e.searchParams.get("resourcesTitle"),Y=e==null?void 0:e.searchParams.get("componentsTitle"),de=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:F||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Y||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],r2=de[Z]||de[de.length-1],Re=a3[Z];return o.jsxs(c3,{...t,children:[o.jsx(Z0,{blocklet:a,release:d,getData:H,getRelease:q,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Q,isPublished:fe,loading:y,setLoading:p,initLogoUrl:V,releaseId:W,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:O,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(l2,{steps:de,loading:y,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Z,setActiveStep:ke,projectId:l,resourcesUrlTitle:F,componentsUrlTitle:Y}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&Re!=="introduction"&&o.jsxs(G,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[r2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(M2,{})})})]}),(v||Re==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(K0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Q,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})}),(v||Re==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(t2,{loading:y,readOnly:Q,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[x0.resources].label}),o.jsx(z,{display:v||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(Z2,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(e0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(e0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(L2,{tabs:ce,current:ee,onChange:Xe,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(A1,{loading:y,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:J,setResourceComponentsMap:K,error:x.blockletResource,app:a,readOnly:Q,component:Ee,componentDid:c,initUrl:e,params:u,setParams:f,projectId:l===X.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...d,id:W}})]}),!u.resourceFromSelect&&o.jsx(q1,{app:a,readOnly:Q,projectId:l===X.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[x0.blocklets].label}),(v||Re==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(T1,{projectType:he,disabled:y||Q,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:Ke,resourceRelateComponents:O,dependentComponentsMode:E})})})}),!v&&Re==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})})]})]})]})]})}W1.propTypes={initUrl:h.object};W1.defaultProps={initUrl:null};const c3=ae.div`
|
|
181
|
+
`;function e2({text:e}){return e?o.jsx(G2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[K2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ge})}e2.propTypes={text:h.string.isRequired};function t2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:c}){var x;const{t:i}=te(),[a,u]=R.useState(c?"preview":"write"),f=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(G,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(P2,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(Y1,{value:"write",label:"Write"}),o.jsx(Y1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Pe,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(z1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{r({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx(e2,{text:e.blockletIntroduction||""})})]})}t2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var F1={},o3=Ne;Object.defineProperty(F1,"__esModule",{value:!0});var o2=F1.default=void 0,l3=o3(Te()),h0=o;o2=F1.default=(0,l3.default)([(0,h0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,h0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function U1({step:e,ok:t,active:l,error:s}){let r="grey.500",c=e+1;return t&&(c=o.jsx(X2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",c=o.jsx(o2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}U1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};U1.defaultProps={step:0,ok:!1,active:0,error:""};function l2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:c,paramsErrTip:i,viewMode:a,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},y=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||J0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(Q2,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=c||!e3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=c?"":y(m);return C&&(b.optional=o.jsx(G,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(Y2,{children:[o.jsx(vt,{icon:o.jsx(U1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...b,children:o.jsx(G,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(Ct,{children:[o.jsx(G,{fontSize:12,children:d.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:f("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(b1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(G,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}l2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const n3=[".zip",".gz"],s3=1024*1024*100,r3=R.lazy(()=>z0(()=>import("./react-CRxH9paf.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])).then(e=>({default:e.Uploader})));function q1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:c,error:i}){const{t:a}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===X.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(G,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(T2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(G,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;f()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Se,{}),children:o.jsx(r3,{ref:u,popup:!0,onUploadFinish:g=>{var y;r({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:n3,maxFileSize:s3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:i})]})}q1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};q1.defaultProps={};function o1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:c}){var a;const{t:i}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Pe,{required:!0,disabled:c||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{r({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Pe,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(z1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{r({note:""}),l({note:u.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}o1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};o1.defaultProps={};function n2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&n2(e[t]);return e}const i3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},f0=(e,t)=>{const l=g1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},a3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},x0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function W1({initUrl:e,...t}){var G1;const{projectId:l,mode:s,releaseId:r,componentDid:c=""}=n1(),{t:i}=te(),{blocklet:a}=Ve(),[u,f]=Ie({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Ie({}),[y,p]=R.useState(!1),[d,m]=Ie(null),{api:b}=we(),v=We(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),P=R.useRef({}),[I,U]=Ie({}),[V,M]=R.useState(""),[k,L]=Ie({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=E==="readonly",O=R.useMemo(()=>{const D={};return Object.keys(k).forEach(_=>{const Ce=k[_];Ce&&Ce.forEach(i2=>{D[i2]=!0})}),D},[k]),K=R.useCallback(D=>{B&&f({blockletComponents:[]}),L(D)},[B,L,f]),J=R.useCallback((...D)=>{U(...D),g({blockletResource:""})},[]),W=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Z,ke]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const he=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(_=>_.included)||Object.keys(O).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,O]),ce=[],oe=((a==null?void 0:a.children)||[]).filter(D=>{var _;return(_=D.meta.resource)==null?void 0:_.exportApi}).filter(D=>!c||D.meta.did===c);oe.forEach(D=>{i3({tabs:ce,blocklet:D,t:i,ancestors:[a]})});const[ee,ie]=R.useState((G1=ce[0])==null?void 0:G1.value),fe=!N&&(d==null?void 0:d.status)==="published",Q=fe,xe=w2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(_=>{var Ce;return{..._,blockletTitle:(_==null?void 0:_.blockletTitle)||e.searchParams.get("title"),blockletDescription:(_==null?void 0:_.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(_==null?void 0:_.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=_==null?void 0:_.blockletComponents)!=null&&Ce.length?_==null?void 0:_.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(_==null?void 0:_.note)||e.searchParams.get("note")||"No note"}});const D=e.searchParams.get("resources");try{const _=JSON.parse(D);S(_)}catch{}}),q=async()=>{if(W)try{const D=await b.getRelease({input:{did:a.meta.did,projectId:l,releaseId:W}});if(p(!1),!D.release){$.error("Release not found");return}D.release=n2(D.release),s!=="view"&&(D.release.note=""),f(_=>f0({..._,...D.release,blockletVersion:s==="create"||s==="new-release"?Me.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Le(D))}},le=async()=>{if(l===X.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(i("blocklet.publish.errorTip.noDid"));return}try{const _=(await b.getProject({input:{did:a.meta.did,projectId:l}})).project||{};_.blockletVersion?(s==="create"||s==="new-release")&&Me.valid(_.blockletVersion)&&(_.blockletVersion=Me.inc(_.blockletVersion,"patch")):_.blockletVersion="1.0.0";const Ce=f0(_,a);f(Ce),_.lastReleaseId||xe()}catch(D){$.error(Le(D))}},H=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!W){$.error("Empty release id");return}await le(),await q();return}await le(),W&&(T(!0),await q())}finally{p(!1)}},[s,W]),Ke=D=>{f({blockletComponents:D})};R.useEffect(()=>{H()},[H]),R.useEffect(()=>{l===X.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const _e=R.useMemo(()=>!!Object.keys(I).find(D=>!!I[D].length),[I]);if(!u&&y)return o.jsx(Se,{});if(!u)return null;const Ee=oe.find(D=>D.meta.did===ee);if(oe.every(D=>D.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const Xe=D=>{ie(D)},F=e==null?void 0:e.searchParams.get("resourcesTitle"),Y=e==null?void 0:e.searchParams.get("componentsTitle"),de=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:F||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Y||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],r2=de[Z]||de[de.length-1],Re=a3[Z];return o.jsxs(c3,{...t,children:[o.jsx(Z0,{blocklet:a,release:d,getData:H,getRelease:q,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Q,isPublished:fe,loading:y,setLoading:p,initLogoUrl:V,releaseId:W,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:O,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(l2,{steps:de,loading:y,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Z,setActiveStep:ke,projectId:l,resourcesUrlTitle:F,componentsUrlTitle:Y}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&Re!=="introduction"&&o.jsxs(G,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[r2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(M2,{})})})]}),(v||Re==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(K0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Q,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})}),(v||Re==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(t2,{loading:y,readOnly:Q,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[x0.resources].label}),o.jsx(z,{display:v||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(Z2,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(e0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(e0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(L2,{tabs:ce,current:ee,onChange:Xe,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(A1,{loading:y,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:J,setResourceComponentsMap:K,error:x.blockletResource,app:a,readOnly:Q,component:Ee,componentDid:c,initUrl:e,params:u,setParams:f,projectId:l===X.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...d,id:W}})]}),!u.resourceFromSelect&&o.jsx(q1,{app:a,readOnly:Q,projectId:l===X.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[x0.blocklets].label}),(v||Re==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(T1,{projectType:he,disabled:y||Q,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:Ke,resourceRelateComponents:O,dependentComponentsMode:E})})})}),!v&&Re==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})})]})]})]})]})}W1.propTypes={initUrl:h.object};W1.defaultProps={initUrl:null};const c3=ae.div`
|
|
182
182
|
.section {
|
|
183
183
|
&.full-width {
|
|
184
184
|
max-width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var D=(e,t,n)=>yt(e,typeof t!="symbol"?t+"":t,n);import{aH as xt,cJ as wt,c$ as vt,aL as G,ck as V,r as A,aJ as It,aK as Ct,aP as ve,cE as St,ch as Tt,j as m,aN as Ie,aO as At,P as f,Q as jt,l as Pt,aD as kt,bF as Ce,bn as Lt,bo as Ot,dl as Mt,aj as Rt,O as j,bl as Et,B as Nt,bC as _t,T as qt,dm as Ft,dn as $t,a3 as Bt,dp as zt,bD as De,u as Ve,aE as Ht,f as Dt,E as Vt}from"./index-
|
|
1
|
+
var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var D=(e,t,n)=>yt(e,typeof t!="symbol"?t+"":t,n);import{aH as xt,cJ as wt,c$ as vt,aL as G,ck as V,r as A,aJ as It,aK as Ct,aP as ve,cE as St,ch as Tt,j as m,aN as Ie,aO as At,P as f,Q as jt,l as Pt,aD as kt,bF as Ce,bn as Lt,bo as Ot,dl as Mt,aj as Rt,O as j,bl as Et,B as Nt,bC as _t,T as qt,dm as Ft,dn as $t,a3 as Bt,dp as zt,bD as De,u as Ve,aE as Ht,f as Dt,E as Vt}from"./index-CeJkM0v0.js";import{D as Ut}from"./index-agl_dRQV.js";import{l as R,g as Qt,L as Wt}from"./MoreVert-Bh_9XRgK.js";import{L as Gt}from"./selector-BLtj8aBh.js";const Zt=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Jt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Xt=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=e,l=At({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Qt,n);return G({},n,l)},Yt=xt(wt,{shouldForwardProp:e=>vt(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Jt})(({theme:e,ownerState:t})=>G({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${R.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${R.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${R.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${R.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Kt=A.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:g}=r,b=Ct(r,Zt),x=A.useContext(ve),I=A.useMemo(()=>({dense:c||x.dense||!1,alignItems:o,disableGutters:l}),[o,x.dense,c,l]),T=A.useRef(null);St(()=>{s&&T.current&&T.current.focus()},[s]);const w=G({},r,{alignItems:o,dense:I.dense,disableGutters:l,divider:u,selected:p}),y=Xt(w),M=Tt(T,n);return m.jsx(ve.Provider,{value:I,children:m.jsx(Yt,G({ref:M,href:b.href||b.to,component:(b.href||b.to)&&i==="div"?"button":i,focusVisibleClassName:Ie(y.focusVisible,d),ownerState:w,className:Ie(y.root,g)},b,{classes:y,children:a}))})});/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as re,j as n,aN as R,aO as Me,dd as no,c$ as ro,ak as ee,cM as to,de as ao,X as so,df as io,dg as lo,_ as co,c5 as po,au as se,P as r,Z as ie,$ as le,bu as y,ad as uo,aC as de,L as J,T as D,b as ho,aD as Re,B as C,bv as xo,I as q,dh as Ie,H as Te,a1 as mo,Q as Le,k as te,di as fo,l as X,dj as go,dk as bo}from"./index-
|
|
1
|
+
import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as re,j as n,aN as R,aO as Me,dd as no,c$ as ro,ak as ee,cM as to,de as ao,X as so,df as io,dg as lo,_ as co,c5 as po,au as se,P as r,Z as ie,$ as le,bu as y,ad as uo,aC as de,L as J,T as D,b as ho,aD as Re,B as C,bv as xo,I as q,dh as Ie,H as Te,a1 as mo,Q as Le,k as te,di as fo,l as X,dj as go,dk as bo}from"./index-CeJkM0v0.js";import{T as vo}from"./Toolbar-Q23C-iDI.js";import{H as Be}from"./Hidden-BQDFSM76.js";const ae={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};function yo(e){return Pe("MuiAppBar",e)}ze("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const jo=["className","color","enableColorOnDark","position"],wo=e=>{const{color:o,position:t,classes:a}=e,l={root:["root",`color${_(o)}`,`position${_(t)}`]};return Me(l,yo,a)},Q=(e,o)=>e?`${e==null?void 0:e.replace(")","")}, ${o})`:o,ko=Z(Ne,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[`position${_(t.position)}`],o[`color${_(t.color)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},o.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},o.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},o.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},o.position==="static"&&{position:"static"},o.position==="relative"&&{position:"relative"},!e.vars&&$({},o.color==="default"&&{backgroundColor:t,color:e.palette.getContrastText(t)},o.color&&o.color!=="default"&&o.color!=="inherit"&&o.color!=="transparent"&&{backgroundColor:e.palette[o.color].main,color:e.palette[o.color].contrastText},o.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!o.enableColorOnDark&&{backgroundColor:null,color:null},o.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},o.color==="default"&&{"--AppBar-background":o.enableColorOnDark?e.vars.palette.AppBar.defaultBg:Q(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":o.enableColorOnDark?e.vars.palette.text.primary:Q(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},o.color&&!o.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":o.enableColorOnDark?e.vars.palette[o.color].main:Q(e.vars.palette.AppBar.darkBg,e.vars.palette[o.color].main),"--AppBar-color":o.enableColorOnDark?e.vars.palette[o.color].contrastText:Q(e.vars.palette.AppBar.darkColor,e.vars.palette[o.color].contrastText)},!["inherit","transparent"].includes(o.color)&&{backgroundColor:"var(--AppBar-background)"},{color:o.color==="inherit"?"inherit":"var(--AppBar-color)"},o.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),$o=p.forwardRef(function(o,t){const a=Ce({props:o,name:"MuiAppBar"}),{className:l,color:c="primary",enableColorOnDark:d=!1,position:i="fixed"}=a,u=re(a,jo),s=$({},a,{color:c,position:i,enableColorOnDark:d}),x=wo(s);return n.jsx(ko,$({square:!0,component:"header",ownerState:s,elevation:4,className:R(x.root,l,i==="fixed"&&"mui-fixed"),ref:t},u))});function Po(e){return Pe("MuiDrawer",e)}ze("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const zo=["BackdropProps"],No=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Ae=(e,o)=>{const{ownerState:t}=e;return[o.root,(t.variant==="permanent"||t.variant==="persistent")&&o.docked,o.modal]},Co=e=>{const{classes:o,anchor:t,variant:a}=e,l={root:["root"],docked:[(a==="permanent"||a==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${_(t)}`,a!=="temporary"&&`paperAnchorDocked${_(t)}`]};return Me(l,Po,o)},Mo=Z(no,{name:"MuiDrawer",slot:"Root",overridesResolver:Ae})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),ke=Z("div",{shouldForwardProp:ro,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ae})({flex:"0 0 auto"}),Ro=Z(Ne,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.paper,o[`paperAnchor${_(t.anchor)}`],t.variant!=="temporary"&&o[`paperAnchorDocked${_(t.anchor)}`]]}})(({theme:e,ownerState:o})=>$({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},o.anchor==="left"&&{left:0},o.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},o.anchor==="right"&&{right:0},o.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},o.anchor==="left"&&o.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="top"&&o.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="right"&&o.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="bottom"&&o.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),De={left:"right",right:"left",top:"down",bottom:"up"};function Io(e){return["left","right"].indexOf(e)!==-1}function To({direction:e},o){return e==="rtl"&&Io(o)?De[o]:o}const _e=p.forwardRef(function(o,t){const a=Ce({props:o,name:"MuiDrawer"}),l=ee(),c=to(),d={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{anchor:i="left",BackdropProps:u,children:s,className:x,elevation:m=16,hideBackdrop:j=!1,ModalProps:{BackdropProps:w}={},onClose:P,open:b=!1,PaperProps:f={},SlideProps:z,TransitionComponent:M=ao,transitionDuration:B=d,variant:I="temporary"}=a,N=re(a.ModalProps,zo),g=re(a,No),k=p.useRef(!1);p.useEffect(()=>{k.current=!0},[]);const A=To({direction:c?"rtl":"ltr"},i),F=$({},a,{anchor:i,elevation:m,open:b,variant:I},g),T=Co(F),h=n.jsx(Ro,$({elevation:I==="temporary"?m:0,square:!0},f,{className:R(T.paper,f.className),ownerState:F,children:s}));if(I==="permanent")return n.jsx(ke,$({className:R(T.root,T.docked,x),ownerState:F,ref:t},g,{children:h}));const v=n.jsx(M,$({in:b,direction:De[A],timeout:B,appear:k.current},z,{children:h}));return I==="persistent"?n.jsx(ke,$({className:R(T.root,T.docked,x),ownerState:F,ref:t},g,{children:v})):n.jsx(Mo,$({BackdropProps:$({},u,w,{transitionDuration:B}),className:R(T.root,T.modal,x),open:b,ownerState:F,onClose:P,hideBackdrop:j,ref:t},g,N,{children:v}))});function Lo(e,o){var t,a=so(e),l=(t=o==null?void 0:o.wait)!==null&&t!==void 0?t:1e3,c=p.useMemo(function(){return io(function(){for(var d=[],i=0;i<arguments.length;i++)d[i]=arguments[i];return a.current.apply(a,lo([],co(d),!1))},l,o)},[]);return po(function(){c.cancel()}),{run:c,cancel:c.cancel,flush:c.flush}}const Bo=se(n.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Ao=se(n.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),Do=se(n.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),Fe=p.createContext(),_o=e=>{const o=p.useContext(Fe);return p.useLayoutEffect(()=>{},[]),o};function He({children:e,...o}){const[t,a]=p.useState({inFullPage:!1,showToggleButton:!1,headerVisibleInFullPage:!0,footerVisibleInFullPage:!1,sidebarVisibleInFullPage:!1}),l=()=>{a(d=>({...d,inFullPage:!d.inFullPage}))},c=p.useMemo(()=>({...t,headerVisible:!t.inFullPage||t.headerVisibleInFullPage,footerVisible:!t.inFullPage||t.footerVisibleInFullPage,sidebarVisible:!t.inFullPage||t.sidebarVisibleInFullPage,toggleFullPage:l,configure:d=>a(i=>({...i,...d}))}),[t]);return n.jsx(Fe.Provider,{value:c,...o,children:e})}He.propTypes={children:r.node.isRequired};var ce={},Fo=le;Object.defineProperty(ce,"__esModule",{value:!0});var Oe=ce.default=void 0,Ho=Fo(ie()),Oo=n;Oe=ce.default=(0,Ho.default)((0,Oo.jsx)("path",{d:"M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"}),"OpenInFull");var pe={},Wo=le;Object.defineProperty(pe,"__esModule",{value:!0});var We=pe.default=void 0,Eo=Wo(ie()),Vo=n;We=pe.default=(0,Eo.default)((0,Vo.jsx)("path",{d:"M22 3.41 16.71 8.7 20 12h-8V4l3.29 3.29L20.59 2zM3.41 22l5.29-5.29L12 20v-8H4l3.29 3.29L2 20.59z"}),"CloseFullscreen");function ue({name:e,size:o,alt:t,color:a,style:l,prefix:c,showBadge:d,...i}){const u=`${c}/${e}-${a.replace(/^#/,"")}.png`;return n.jsxs(qo,{style:{width:o,height:o},children:[n.jsx(uo,{width:o,height:o,alt:t||e,src:u,style:Object.assign({width:o},l),...i}),d&&n.jsx("i",{className:"badge-point"})]})}ue.propTypes={name:r.string.isRequired,size:r.number,color:r.string,alt:r.string,style:r.object,prefix:r.string,showBadge:r.bool};ue.defaultProps={size:36,color:"#000000",alt:"",style:{},prefix:"/images",showBadge:!1};const qo=y("div")`
|
|
2
2
|
position: relative;
|
|
3
3
|
.badge-point {
|
|
4
4
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h,j as c,P as f,a3 as d}from"./index-
|
|
1
|
+
import{r as h,j as c,P as f,a3 as d}from"./index-CeJkM0v0.js";var o={};Object.defineProperty(o,"__esModule",{value:!0});var p=o.default=void 0;m(h);var n=c;function m(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(v){return Object.getOwnPropertyDescriptor(e,v).enumerable})),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(a){y(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function y(e,t,r){return(t=j(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){var t=b(e,"string");return typeof t=="symbol"?t:t+""}function b(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i=function(t){return(0,n.jsxs)("svg",u(u({},t),{},{children:[(0,n.jsx)("path",{d:"M24.604 2.263L28.524 0H42.79v41.862H28.79a1 1 0 0 1-.5-.134l-15.103-8.72V8.854l1.817-1.05 3.2 1.848-1.817 1.05V31.16l12.993 7.502H39.59V3.2H29.38l-1.576.91-3.2-1.847z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.402 31.16V10.701L13.409 3.2H3.2v35.462h10.21l1.58-.913 3.2 1.847-3.923 2.266H0V0h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z"}),(0,n.jsx)("path",{d:"M138.44 27.684c.192 0 .357.075.496.224l1.344 1.472a9.584 9.584 0 0 1-3.44 2.576c-1.344.608-2.965.912-4.864.912-1.664 0-3.173-.288-4.528-.864a10.056 10.056 0 0 1-3.456-2.416c-.949-1.035-1.685-2.272-2.208-3.712-.523-1.44-.784-3.024-.784-4.752 0-1.728.272-3.312.816-4.752.555-1.44 1.328-2.677 2.32-3.712a10.444 10.444 0 0 1 3.552-2.416c1.387-.576 2.917-.864 4.592-.864 1.632 0 3.083.267 4.352.8a10.973 10.973 0 0 1 3.312 2.128l-1.12 1.584a.936.936 0 0 1-.288.288.742.742 0 0 1-.432.112c-.203 0-.443-.101-.72-.304a8.802 8.802 0 0 0-1.072-.672c-.437-.256-.981-.485-1.632-.688-.651-.203-1.461-.304-2.432-.304-1.141 0-2.187.203-3.136.608a6.885 6.885 0 0 0-2.464 1.728c-.683.747-1.216 1.67-1.6 2.768-.373 1.088-.56 2.32-.56 3.696 0 1.397.197 2.64.592 3.728.395 1.088.939 2.01 1.632 2.768a6.914 6.914 0 0 0 2.448 1.728 7.764 7.764 0 0 0 3.04.592c.661 0 1.253-.037 1.776-.112a7.843 7.843 0 0 0 1.456-.368c.448-.16.869-.363 1.264-.608a8.89 8.89 0 0 0 1.168-.912c.085-.075.176-.133.272-.176a.616.616 0 0 1 .304-.08zM149.68 16.1c1.195 0 2.272.197 3.232.592a6.54 6.54 0 0 1 2.464 1.68c.683.725 1.205 1.605 1.568 2.64.363 1.024.544 2.176.544 3.456 0 1.28-.181 2.437-.544 3.472-.363 1.035-.885 1.915-1.568 2.64a6.795 6.795 0 0 1-2.464 1.68c-.96.384-2.037.576-3.232.576-1.205 0-2.293-.192-3.264-.576a6.987 6.987 0 0 1-2.464-1.68c-.683-.725-1.211-1.605-1.584-2.64-.363-1.035-.544-2.192-.544-3.472 0-1.28.181-2.432.544-3.456.373-1.035.901-1.915 1.584-2.64a6.717 6.717 0 0 1 2.464-1.68c.971-.395 2.059-.592 3.264-.592zm0 14.304c1.536 0 2.683-.517 3.44-1.552.757-1.035 1.136-2.49 1.136-4.368 0-1.877-.379-3.333-1.136-4.368-.757-1.045-1.904-1.568-3.44-1.568-1.557 0-2.72.523-3.488 1.568-.757 1.035-1.136 2.49-1.136 4.368 0 1.877.379 3.333 1.136 4.368.768 1.035 1.931 1.552 3.488 1.552zM163.899 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.442 6.442 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448.682.299 1.253.72 1.712 1.264.458.533.805 1.179 1.04 1.936.234.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.534-.65-1.35-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.38 7.38 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM181.805 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.448 6.448 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448a4.63 4.63 0 0 1 1.712 1.264c.459.533.805 1.179 1.04 1.936.235.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.533-.65-1.349-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.396 7.396 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM207.551 22.676c0-.619-.09-1.19-.272-1.712a3.77 3.77 0 0 0-.768-1.36 3.521 3.521 0 0 0-1.248-.896c-.49-.213-1.056-.32-1.696-.32-1.312 0-2.346.379-3.104 1.136-.746.757-1.221 1.808-1.424 3.152h8.512zm2.576 7.616a6.311 6.311 0 0 1-1.328 1.168 7.926 7.926 0 0 1-1.6.784 9.664 9.664 0 0 1-1.76.448c-.597.096-1.189.144-1.776.144-1.12 0-2.16-.187-3.12-.56a7.159 7.159 0 0 1-2.48-1.664c-.693-.736-1.237-1.643-1.632-2.72-.384-1.088-.576-2.336-.576-3.744 0-1.13.176-2.181.528-3.152a7.67 7.67 0 0 1 1.504-2.56 7.064 7.064 0 0 1 2.416-1.712c.95-.416 2.016-.624 3.2-.624.992 0 1.904.165 2.736.496.843.32 1.568.79 2.176 1.408.608.619 1.083 1.381 1.424 2.288.352.907.528 1.941.528 3.104 0 .48-.053.805-.16.976-.106.16-.304.24-.592.24h-10.656c.032.97.171 1.819.416 2.544.246.715.582 1.312 1.008 1.792.438.48.955.837 1.552 1.072.598.235 1.264.352 2 .352.694 0 1.291-.08 1.792-.24.512-.16.95-.33 1.312-.512.374-.192.683-.368.928-.528.256-.16.48-.24.672-.24.256 0 .454.096.592.288l.896 1.152zM225.113 19.396a1.836 1.836 0 0 1-.288.288c-.086.064-.214.096-.384.096-.171 0-.352-.064-.544-.192a4.872 4.872 0 0 0-.704-.432 5.21 5.21 0 0 0-1.024-.432c-.395-.139-.886-.208-1.472-.208-.768 0-1.446.139-2.032.416a3.972 3.972 0 0 0-1.472 1.184c-.384.512-.678 1.136-.88 1.872-.203.736-.304 1.563-.304 2.48 0 .95.106 1.797.32 2.544.213.736.517 1.36.912 1.872.394.501.874.885 1.44 1.152a4.522 4.522 0 0 0 1.888.384c.672 0 1.226-.08 1.664-.24.437-.17.8-.352 1.088-.544.288-.192.528-.368.72-.528.192-.17.389-.256.592-.256.256 0 .453.096.592.288l.896 1.152a5.966 5.966 0 0 1-1.264 1.168c-.459.32-.95.581-1.472.784a8.34 8.34 0 0 1-1.648.448c-.566.096-1.142.144-1.728.144a7.25 7.25 0 0 1-2.848-.56 6.52 6.52 0 0 1-2.288-1.632c-.64-.715-1.147-1.59-1.52-2.624-.374-1.045-.56-2.23-.56-3.552 0-1.205.165-2.32.496-3.344.341-1.024.837-1.904 1.488-2.64a6.821 6.821 0 0 1 2.432-1.744c.96-.427 2.058-.64 3.296-.64 1.162 0 2.186.187 3.072.56a7.514 7.514 0 0 1 2.368 1.584l-.832 1.152zM234.121 32.868c-1.312 0-2.325-.368-3.04-1.104-.704-.736-1.056-1.787-1.056-3.152v-9.728h-1.888a.701.701 0 0 1-.464-.16c-.117-.117-.176-.288-.176-.512v-1.264l2.64-.368.704-4.848a.738.738 0 0 1 .24-.416.724.724 0 0 1 .48-.16h1.584v5.456h4.608v2.272h-4.608v9.52c0 .64.155 1.12.464 1.44.32.31.726.464 1.216.464.288 0 .534-.037.736-.112a3.27 3.27 0 0 0 .544-.24c.15-.096.278-.181.384-.256a.521.521 0 0 1 .288-.112c.107 0 .187.027.24.08a.694.694 0 0 1 .192.224l.928 1.504c-.512.47-1.12.832-1.824 1.088a6.362 6.362 0 0 1-2.192.384z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.815 33.284V9H70.66a6.259 6.259 0 0 1 5.823 6.243v11.783a6.258 6.258 0 0 1-6.258 6.258h-12.41zM84.56 9h-3.335v24.321h3.335V9zM61.15 29.95V12.32h9.075a2.923 2.923 0 0 1 2.923 2.923v11.783a2.923 2.923 0 0 1-2.923 2.923H61.15zM89.243 9v24.284h12.409a6.258 6.258 0 0 0 6.259-6.258V15.243A6.259 6.259 0 0 0 102.087 9H89.243zm22.912 5.636h3.728v3.728h-3.728v-3.729zm3.728 9.321h-3.728v3.729h3.728v-3.729zM92.578 12.32v17.63h9.074a2.924 2.924 0 0 0 2.924-2.924V15.243a2.924 2.924 0 0 0-2.924-2.923h-9.074z"})]}))};i.defaultProps={width:"239",height:"42",viewBox:"0 0 239 42",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};i.displayName="connect-logo";p=o.default=i;function s({children:e,...t}){return c.jsxs(d,{color:"did",variant:"contained",...t,children:[c.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),c.jsx(p,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}s.propTypes={children:f.any};s.defaultProps={children:""};export{s as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,T as i,P as e,dw as f,fj as u,bu as c}from"./index-
|
|
1
|
+
import{j as r,T as i,P as e,dw as f,fj as u,bu as c}from"./index-CeJkM0v0.js";function l({name:t,nameFormatter:o,layout:a,children:n,valueComponent:s,nameWidth:m,...p}){return r.jsxs(d,{layout:a,width:m,...p,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:o(t)}),n&&r.jsx(i,{color:"textPrimary",component:s,className:"info-row__value",children:n})]})}l.propTypes={name:e.any.isRequired,layout:e.oneOf(["horizontal","vertical"]),children:e.any,nameFormatter:e.func,valueComponent:e.string,nameWidth:e.number};l.defaultProps={children:null,nameWidth:90,nameFormatter:t=>{const o=t.split(" ").map(a=>f(u(a))).join(" ");return typeof t=="string"?o:t},valueComponent:"div",layout:"horizontal"};const d=c("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
|
|
4
4
|
justify-content: flex-start;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{l as q}from"./lottie-
|
|
1
|
+
import{l as q}from"./lottie-Bs_qDpq1.js";import{r as D,eF as z}from"./index-CeJkM0v0.js";function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,u,c,i,b=[],f=!0,A=!1;try{if(c=(r=r.call(t)).next,e!==0)for(;!(f=(n=c.call(r)).done)&&(b.push(n.value),b.length!==e);f=!0);}catch(g){A=!0,u=g}finally{try{if(!f&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(A)throw u}}return b}}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(n){J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J(t,e,r){return e=ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,c;for(c=0;c<n.length;c++)u=n[c],!(e.indexOf(u)>=0)&&(r[u]=t[u]);return r}function x(t,e){if(t==null)return{};var r=Q(t,e),n,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(u=0;u<c.length;u++)n=c[u],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Z(t,e){return ee(t)||G(t,e)||te(t,e)||ne()}function ee(t){if(Array.isArray(t))return t}function te(t,e){if(t){if(typeof t=="string")return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ae(t){var e=re(t,"string");return typeof e=="symbol"?e:String(e)}var oe=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],ie=function(e,r){var n=e.animationData,u=e.loop,c=e.autoplay,i=e.initialSegment,b=e.onComplete,f=e.onLoopComplete,A=e.onEnterFrame,g=e.onSegmentStart,O=e.onConfigReady,w=e.onDataReady,h=e.onDataFailed,l=e.onLoadedImages,L=e.onDOMLoaded,S=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var p=x(e,oe),P=D.useState(!1),s=Z(P,2),C=s[0],_=s[1],o=D.useRef(),v=D.useRef(null),F=function(){var a;(a=o.current)===null||a===void 0||a.play()},H=function(){var a;(a=o.current)===null||a===void 0||a.stop()},M=function(){var a;(a=o.current)===null||a===void 0||a.pause()},V=function(a){var d;(d=o.current)===null||d===void 0||d.setSpeed(a)},N=function(a,d){var m;(m=o.current)===null||m===void 0||m.goToAndPlay(a,d)},B=function(a,d){var m;(m=o.current)===null||m===void 0||m.goToAndStop(a,d)},$=function(a){var d;(d=o.current)===null||d===void 0||d.setDirection(a)},k=function(a,d){var m;(m=o.current)===null||m===void 0||m.playSegments(a,d)},W=function(a){var d;(d=o.current)===null||d===void 0||d.setSubframe(a)},K=function(a){var d;return(d=o.current)===null||d===void 0?void 0:d.getDuration(a)},U=function(){var a;(a=o.current)===null||a===void 0||a.destroy(),o.current=void 0},X=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d;if(v.current){(d=o.current)===null||d===void 0||d.destroy();var m=I(I(I({},e),a),{},{container:v.current});return o.current=q.loadAnimation(m),_(!!o.current),function(){var R;(R=o.current)===null||R===void 0||R.destroy(),o.current=void 0}}};D.useEffect(function(){var y=X();return function(){return y==null?void 0:y()}},[n,u]),D.useEffect(function(){o.current&&(o.current.autoplay=!!c)},[c]),D.useEffect(function(){if(o.current){if(!i){o.current.resetSegments(!0);return}!Array.isArray(i)||!i.length||((o.current.currentRawFrame<i[0]||o.current.currentRawFrame>i[1])&&(o.current.currentRawFrame=i[0]),o.current.setSegment(i[0],i[1]))}},[i]),D.useEffect(function(){var y=[{name:"complete",handler:b},{name:"loopComplete",handler:f},{name:"enterFrame",handler:A},{name:"segmentStart",handler:g},{name:"config_ready",handler:O},{name:"data_ready",handler:w},{name:"data_failed",handler:h},{name:"loaded_images",handler:l},{name:"DOMLoaded",handler:L},{name:"destroy",handler:S}],a=y.filter(function(m){return m.handler!=null});if(a.length){var d=a.map(function(m){var R;return(R=o.current)===null||R===void 0||R.addEventListener(m.name,m.handler),function(){var T;(T=o.current)===null||T===void 0||T.removeEventListener(m.name,m.handler)}});return function(){d.forEach(function(m){return m()})}}},[b,f,A,g,O,w,h,l,L,S]);var Y=z.createElement("div",I({style:r,ref:v},p));return{View:Y,play:F,stop:H,pause:M,setSpeed:V,goToAndStop:B,goToAndPlay:N,setDirection:$,playSegments:k,setSubframe:W,getDuration:K,destroy:U,animationContainerRef:v,animationLoaded:C,animationItem:o.current}};function ue(t){var e=t.getBoundingClientRect(),r=e.top,n=e.height,u=window.innerHeight-r,c=window.innerHeight+n;return u/c}function le(t,e,r){var n=t.getBoundingClientRect(),u=n.top,c=n.left,i=n.width,b=n.height,f=(e-c)/i,A=(r-u)/b;return{x:f,y:A}}var se=function(e){var r=e.wrapperRef,n=e.animationItem,u=e.mode,c=e.actions;D.useEffect(function(){var i=r.current;if(!(!i||!n||!c.length)){n.stop();var b=function(){var g=null,O=function(){var h=ue(i),l=c.find(function(S){var p=S.visibility;return p&&h>=p[0]&&h<=p[1]});if(l){if(l.type==="seek"&&l.visibility&&l.frames.length===2){var L=l.frames[0]+Math.ceil((h-l.visibility[0])/(l.visibility[1]-l.visibility[0])*l.frames[1]);//! goToAndStop must be relative to the start of the current segment
|
|
3
3
|
n.goToAndStop(L-n.firstFrame-1,!0)}l.type==="loop"&&(g===null||g!==l.frames||n.isPaused)&&(n.playSegments(l.frames,!0),g=l.frames),l.type==="play"&&n.isPaused&&(n.resetSegments(!0),n.play()),l.type==="stop"&&n.goToAndStop(l.frames[0]-n.firstFrame-1,!0)}};return document.addEventListener("scroll",O),function(){document.removeEventListener("scroll",O)}},f=function(){var g=function(l,L){var S=l,p=L;if(S!==-1&&p!==-1){var P=le(i,S,p);S=P.x,p=P.y}var s=c.find(function(o){var v=o.position;return v&&Array.isArray(v.x)&&Array.isArray(v.y)?S>=v.x[0]&&S<=v.x[1]&&p>=v.y[0]&&p<=v.y[1]:v&&!Number.isNaN(v.x)&&!Number.isNaN(v.y)?S===v.x&&p===v.y:!1});if(s){if(s.type==="seek"&&s.position&&Array.isArray(s.position.x)&&Array.isArray(s.position.y)&&s.frames.length===2){var C=(S-s.position.x[0])/(s.position.x[1]-s.position.x[0]),_=(p-s.position.y[0])/(s.position.y[1]-s.position.y[0]);n.playSegments(s.frames,!0),n.goToAndStop(Math.ceil((C+_)/2*(s.frames[1]-s.frames[0])),!0)}s.type==="loop"&&n.playSegments(s.frames,!0),s.type==="play"&&(n.isPaused&&n.resetSegments(!1),n.playSegments(s.frames)),s.type==="stop"&&n.goToAndStop(s.frames[0],!0)}},O=function(l){g(l.clientX,l.clientY)},w=function(){g(-1,-1)};return i.addEventListener("mousemove",O),i.addEventListener("mouseout",w),function(){i.removeEventListener("mousemove",O),i.removeEventListener("mouseout",w)}};switch(u){case"scroll":return b();case"cursor":return f()}}},[u,n])},de=function(e){var r=e.actions,n=e.mode,u=e.lottieObj,c=u.animationItem,i=u.View,b=u.animationContainerRef;return se({actions:r,animationItem:c,mode:n,wrapperRef:b}),i},fe=["style","interactivity"],ve=function(e){var r,n,u,c=e.style,i=e.interactivity,b=x(e,fe),f=ie(b,c),A=f.View,g=f.play,O=f.stop,w=f.pause,h=f.setSpeed,l=f.goToAndStop,L=f.goToAndPlay,S=f.setDirection,p=f.playSegments,P=f.setSubframe,s=f.getDuration,C=f.destroy,_=f.animationContainerRef,o=f.animationLoaded,v=f.animationItem;return D.useEffect(function(){e.lottieRef&&(e.lottieRef.current={play:g,stop:O,pause:w,setSpeed:h,goToAndPlay:L,goToAndStop:l,setDirection:S,playSegments:p,setSubframe:P,getDuration:s,destroy:C,animationContainerRef:_,animationLoaded:o,animationItem:v})},[(r=e.lottieRef)===null||r===void 0?void 0:r.current]),de({lottieObj:{View:A,play:g,stop:O,pause:w,setSpeed:h,goToAndStop:l,goToAndPlay:L,setDirection:S,playSegments:p,setSubframe:P,getDuration:s,destroy:C,animationContainerRef:_,animationLoaded:o,animationItem:v},actions:(n=i==null?void 0:i.actions)!==null&&n!==void 0?n:[],mode:(u=i==null?void 0:i.mode)!==null&&u!==void 0?u:"scroll"})};export{q as LottiePlayer,ve as default,ie as useLottie,de as useLottieInteractivity};
|