@abtnode/blocklet-services 1.16.33-beta-20241112-095006-c0bb4e6b → 1.16.33-beta-20241112-122339-e39fa9e7
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/dist/assets/{Add-Be5NIjqx.js → Add-BJ0-DmpB.js} +1 -1
- package/dist/assets/{Alert-BbtKi3v1.js → Alert-DHyghqS2.js} +1 -1
- package/dist/assets/{ArrowDropDown-B9F9-dH8.js → ArrowDropDown-C1YhdiGI.js} +1 -1
- package/dist/assets/{Autocomplete-CY9iMSTD.js → Autocomplete-CwotzJe_.js} +1 -1
- package/dist/assets/{Avatar-lahBxqDM.js → Avatar-ZE8kDNw1.js} +1 -1
- package/dist/assets/{ButtonGroup-dnetDbaM.js → ButtonGroup-CaLh4rbJ.js} +1 -1
- package/dist/assets/{CSSTransition-ffaOecjt.js → CSSTransition-BGRohAuU.js} +1 -1
- package/dist/assets/{CheckCircle-C2xa70MK.js → CheckCircle-BS2IYEaB.js} +1 -1
- package/dist/assets/{ChevronLeft-CNEQSjar.js → ChevronLeft-B9QvNjHW.js} +1 -1
- package/dist/assets/{ChevronRight-C4s6zT7y.js → ChevronRight-Pt1j71fr.js} +1 -1
- package/dist/assets/{Close-D4d0cmoo.js → Close-QFxM1dx8.js} +1 -1
- package/dist/assets/{Delete-9I7Wb-WZ.js → Delete-nshOetuq.js} +1 -1
- package/dist/assets/{DeleteOutline-Bfmy5Inl.js → DeleteOutline-BrAkqJyh.js} +1 -1
- package/dist/assets/{DialogContentText-CtUy42Wy.js → DialogContentText-RK3HiWcQ.js} +1 -1
- package/dist/assets/{Done-CsJG7tLE.js → Done-C9nQ2ZAw.js} +1 -1
- package/dist/assets/{Download-Ql_zAGR2.js → Download-C1BD0YeO.js} +1 -1
- package/dist/assets/{EditIcon-Bu2AC825.js → EditIcon-BAlDLZIL.js} +1 -1
- package/dist/assets/{Error-Bv-FkXIw.js → Error-C_ob3AlW.js} +1 -1
- package/dist/assets/{ExpandMore-CkVLrKqo.js → ExpandMore-TPXNYn4i.js} +1 -1
- package/dist/assets/{FormControl-BmbbFW7j.js → FormControl-DzwnIqDl.js} +1 -1
- package/dist/assets/{FormControlLabel-vyMASWw0.js → FormControlLabel-Dhb6u65W.js} +1 -1
- package/dist/assets/{FormGroup-YyKrx4Oj.js → FormGroup-B9jcG6zx.js} +1 -1
- package/dist/assets/{Google-DfCiJ8zV.js → Google-9meSA79P.js} +1 -1
- package/dist/assets/{Grid-C54_tgj7.js → Grid-CRd4VYZX.js} +1 -1
- package/dist/assets/{HelpOutline-tmSL7Bzt.js → HelpOutline-Ct7Pu8QI.js} +1 -1
- package/dist/assets/{Hidden-DNna1408.js → Hidden-D-O5BO-G.js} +1 -1
- package/dist/assets/{InfoOutlined-Cl_8qFMi.js → InfoOutlined-BjtHYbRp.js} +1 -1
- package/dist/assets/{InputAdornment-Co2MX07D.js → InputAdornment-oz-HYTcf.js} +1 -1
- package/dist/assets/{LastPage-K8SBiloQ.js → LastPage-CeAt2z2-.js} +1 -1
- package/dist/assets/{Launch-CF-5PGsC.js → Launch-Ci12J0eU.js} +1 -1
- package/dist/assets/{LaunchOutlined-DJtyLEh9.js → LaunchOutlined-niWwmenP.js} +1 -1
- package/dist/assets/{Link-DSnY6X1i.js → Link-C-7K49dY.js} +1 -1
- package/dist/assets/{ListItemButton-tIC8aee6.js → ListItemButton-BBfLux7c.js} +1 -1
- package/dist/assets/{ListSubheader-BI6Zhgyl.js → ListSubheader-Di30oGgQ.js} +1 -1
- package/dist/assets/{LoadingButton-Dr2xn5-_.js → LoadingButton-BUi-T8eZ.js} +1 -1
- package/dist/assets/{LockIcon-C56JTlvs.js → LockIcon-BVoXTUNW.js} +1 -1
- package/dist/assets/{Loop-Bb0sa1uu.js → Loop-C45c9HNm.js} +1 -1
- package/dist/assets/{MarkEmailRead-Dq7KT_rd.js → MarkEmailRead-vFsWuVOx.js} +1 -1
- package/dist/assets/{Menu-jAkaRAOt.js → Menu-DvE03HqE.js} +1 -1
- package/dist/assets/{MoreHoriz-CtIVG1MK.js → MoreHoriz-Bgf-NtAC.js} +1 -1
- package/dist/assets/{MoreVert-CSIMTgso.js → MoreVert-Bm8gI7fr.js} +1 -1
- package/dist/assets/{OpenInNew-Dn-b4ql0.js → OpenInNew-BogqHOtG.js} +1 -1
- package/dist/assets/{Pagination-DtQ2UqOz.js → Pagination-BYcY7JBc.js} +1 -1
- package/dist/assets/{PlayArrow-DY1-OXZN.js → PlayArrow-Cmy1JCVi.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-BRNZxGZD.js → QuestionMarkCircle-ClHWwfR_.js} +1 -1
- package/dist/assets/{RadioGroup-DoFdHdBb.js → RadioGroup-D0iCI3Eo.js} +1 -1
- package/dist/assets/{Search-BSiUJ455.js → Search-B3yupqTW.js} +1 -1
- package/dist/assets/{Select-D2LyB2yK.js → Select-C0CAKSaj.js} +1 -1
- package/dist/assets/{ServerLogo-DP0iTccs.js → ServerLogo-C8_tvzEX.js} +1 -1
- package/dist/assets/{Skeleton-Be8s3-r3.js → Skeleton-C0c6JVcF.js} +1 -1
- package/dist/assets/{Slider-CmirSIGQ.js → Slider-BbuCuU_i.js} +1 -1
- package/dist/assets/{Stack-C3ImIxEz.js → Stack-dwX_aIUB.js} +1 -1
- package/dist/assets/{Stepper-D8Dcky2M.js → Stepper-rO2e9XZL.js} +1 -1
- package/dist/assets/{TextField-IWXyq9WX.js → TextField-CH-MPuwY.js} +1 -1
- package/dist/assets/{Toolbar-CTacdb76.js → Toolbar-Muj5q0IZ.js} +1 -1
- package/dist/assets/{ViewColumn-TT7ZfhoS.js → ViewColumn-C1ynjPOp.js} +1 -1
- package/dist/assets/{ViewList-DBNZfOly.js → ViewList-KmfOhZt_.js} +1 -1
- package/dist/assets/{_createAggregator-CmZ2Urlh.js → _createAggregator-DqOEJdke.js} +1 -1
- package/dist/assets/{access-control-CidcVWqD.js → access-control-CrT1IIql.js} +1 -1
- package/dist/assets/{actions-DwWF_LII.js → actions-CXcLsm-W.js} +1 -1
- package/dist/assets/{add-component-core-CU9aptXv.js → add-component-core-CMInU46n.js} +1 -1
- package/dist/assets/add-resource-BR6Pjsth.js +1 -0
- package/dist/assets/{addon-DlKk3IoA.js → addon-Dpk6Y6xp.js} +1 -1
- package/dist/assets/{analytics-3_g9XBvU.js → analytics-Cpy0JWLF.js} +1 -1
- package/dist/assets/api-BTKs9Xnn.js +1 -0
- package/dist/assets/{audit-logs-Dj_QDB0p.js → audit-logs-DZQxLsgw.js} +1 -1
- package/dist/assets/{base32-DL019x7t.js → base32-Biw3IdHX.js} +1 -1
- package/dist/assets/{branding-CDcsWRGi.js → branding-C1Z53DSu.js} +2 -2
- package/dist/assets/{bundle-avatar-DH1wQ7kb.js → bundle-avatar-DwfcOLy9.js} +1 -1
- package/dist/assets/{button-D7gPGN2F.js → button-DrFSLer3.js} +1 -1
- package/dist/assets/{click-to-copy-D0LAvhaE.js → click-to-copy-aAtVKl96.js} +1 -1
- package/dist/assets/{complete-CPrs85Ex.js → complete-HAzd-e_M.js} +1 -1
- package/dist/assets/{component-ggjfCrdP.js → component-5-kbX0og.js} +1 -1
- package/dist/assets/{config--9ik9B15.js → config-B32O74w9.js} +1 -1
- package/dist/assets/{config-WkXy7h0l.js → config-DBBHdkQE.js} +1 -1
- package/dist/assets/{config-navigation-DxJyaC4o.js → config-navigation-DIE_rTdN.js} +1 -1
- package/dist/assets/{config-space-DVg9tNL1.js → config-space-DAkDr7UB.js} +1 -1
- package/dist/assets/{confirm-BU1Cx5fg.js → confirm-B1Dlltx1.js} +1 -1
- package/dist/assets/{connect-DPgkmdxo.js → connect-BnsoYj_m.js} +1 -1
- package/dist/assets/{connect-DnmfliZ-.js → connect-DHi2atYl.js} +1 -1
- package/dist/assets/{connect-to-D-grL4mp.js → connect-to-sAV1wjff.js} +1 -1
- package/dist/assets/{content-layout-D2aXAPfw.js → content-layout-CEpjGJ-_.js} +1 -1
- package/dist/assets/{dashboard-verrE6SB.js → dashboard-DKmG24DX.js} +3 -3
- package/dist/assets/{deprecate-CcOeD5NI.js → deprecate-C_5E7Bx8.js} +1 -1
- package/dist/assets/{did-address-DxAwQT37.js → did-address-Bdzn0FI1.js} +1 -1
- package/dist/assets/{domain-qoKxvief.js → domain-BYGr9bjG.js} +1 -1
- package/dist/assets/{domain-list-VPg-n_IK.js → domain-list-DPSsvQnP.js} +1 -1
- package/dist/assets/{email-BBDpX-5s.js → email-BY4fwsqU.js} +3 -3
- package/dist/assets/emotion-cache.browser.esm-C9hYh7NM.js +1 -0
- package/dist/assets/{exchange-passport-CX9TMjVX.js → exchange-passport-CLgG0rwL.js} +1 -1
- package/dist/assets/{fallback-D_QDGttC.js → fallback-DRgH1dur.js} +1 -1
- package/dist/assets/{form-text-input-DUCCPm6k.js → form-text-input-CHks5Vac.js} +1 -1
- package/dist/assets/{format-error-ChzZD3Gi.js → format-error-BrCBQ7tH.js} +1 -1
- package/dist/assets/{fuel-C0jN-SJZ.js → fuel-CwrVhV0X.js} +1 -1
- package/dist/assets/{fullpage-BlMNs4aL.js → fullpage-qQNGoIYc.js} +1 -1
- package/dist/assets/{home-Dmac_aqq.js → home-BgYXKd2s.js} +1 -1
- package/dist/assets/{iframe-iNaVuYbo.js → iframe-1slMpgCe.js} +1 -1
- package/dist/assets/{index-BFBCENEc.js → index-3ECV8QOS.js} +1 -1
- package/dist/assets/{index-Ch8nApPn.js → index-6M_0jkoL.js} +1 -1
- package/dist/assets/{index-C6rBmIch.js → index-AKSeBSJP.js} +1 -1
- package/dist/assets/{index-BKtTxVLs.js → index-BA7Efsk1.js} +1 -1
- package/dist/assets/{index-D-P_GY9j.js → index-BMlgtyu1.js} +1 -1
- package/dist/assets/{index-Di68ljBo.js → index-BOiGkdAT.js} +1 -1
- package/dist/assets/{index-BXIPxAhW.js → index-BQtULvDO.js} +1 -1
- package/dist/assets/{index-BTSjCVQH.js → index-BSlEgOSt.js} +1 -1
- package/dist/assets/{index-BTGaXT27.js → index-Bb8Oi0oS.js} +1 -1
- package/dist/assets/{index-DfgI3LpD.js → index-BcJiTODH.js} +1 -1
- package/dist/assets/{index-cbCBtDvk.js → index-BiA9LiYl.js} +4 -4
- package/dist/assets/{index-s6wI6FUq.js → index-BiF39Tbb.js} +1 -1
- package/dist/assets/{index-BKDM75Eh.js → index-BnLltRIa.js} +1 -1
- package/dist/assets/{index-C_f5JLr-.js → index-Cje4vX3R.js} +1 -1
- package/dist/assets/{index-BS-wUHKY.js → index-CxG7Q59L.js} +1 -1
- package/dist/assets/{index-CsMWyT7N.js → index-DGom8BRG.js} +1 -1
- package/dist/assets/{index-B9_-R0J9.js → index-DHUVZBwm.js} +2 -2
- package/dist/assets/{index-Ca9OhlyN.js → index-DJn9W9i7.js} +1 -1
- package/dist/assets/{index-DdYlS53_.js → index-DVXf4xY7.js} +1 -1
- package/dist/assets/{index-xpNnhdaf.js → index-DWTOuSpr.js} +1 -1
- package/dist/assets/{index-CJfIeqOG.js → index-Dd4oihzg.js} +1 -1
- package/dist/assets/{index-B3PUjiYg.js → index-Dh8425WP.js} +3 -3
- package/dist/assets/{index-D6CUAurV.js → index-Dkn18RE3.js} +1 -1
- package/dist/assets/{index-ZEuzv_ea.js → index-DlMDnAjH.js} +1 -1
- package/dist/assets/{index-C24NOQwk.js → index-DliDncu2.js} +1 -1
- package/dist/assets/{index-DOBe8YkV.js → index-DpF6dC16.js} +1 -1
- package/dist/assets/{index-BNK6nvt-.js → index-Dv6MKvRR.js} +1 -1
- package/dist/assets/{index-M1nTFDLI.js → index-Dwg1dyYG.js} +1 -1
- package/dist/assets/{index-04cHYQ-I.js → index-Dwkse-gi.js} +1 -1
- package/dist/assets/{index-CaCM1SNQ.js → index-EkNi2gEh.js} +1 -1
- package/dist/assets/{index-CEDEkRWR.js → index-ISoRy2C-.js} +1 -1
- package/dist/assets/{index-DjajaUb5.js → index-LJ2BkMGm.js} +1 -1
- package/dist/assets/{index-DJs3qjjS.js → index-kPcxr3mq.js} +1 -1
- package/dist/assets/{index-DFXH0vaX.js → index-ypT3GfN-.js} +3 -3
- package/dist/assets/{invitation-CyyqYlNb.js → invitation-CZX-Zlx2.js} +1 -1
- package/dist/assets/{invite-CbGyGzmx.js → invite-DrYc_fDY.js} +1 -1
- package/dist/assets/{isEmail-izbtaaQQ.js → isEmail-D8_xeyII.js} +1 -1
- package/dist/assets/{issue-passport-3dVP7pnc.js → issue-passport-D8Lexyeq.js} +1 -1
- package/dist/assets/{item-4JFyYUtQ.js → item-ByPKIevF.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-CbNAmI54.js → jss-plugin-props-sort.esm-BGszpd7H.js} +1 -1
- package/dist/assets/{launch-result-message-Csnmx5OM.js → launch-result-message-BDf1Mxst.js} +1 -1
- package/dist/assets/{layout-C8ceuP1O.js → layout-Br7MdpF5.js} +1 -1
- package/dist/assets/{list-header-Ctq6LcI7.js → list-header-yK0MoJlc.js} +1 -1
- package/dist/assets/localization-DBgr0pZI.js +1 -0
- package/dist/assets/{log-CL4QD1gw.js → log-OHJh_Tah.js} +1 -1
- package/dist/assets/{login-D9aQu6sk.js → login-BvmyEife.js} +1 -1
- package/dist/assets/{login-oauth-callback-Boxb4VVa.js → login-oauth-callback-BNeK2l3D.js} +1 -1
- package/dist/assets/{logo-uploader-DQ2xFVgd.js → logo-uploader-DU_m2G8B.js} +3 -3
- package/dist/assets/{lost-passport-GnFgb36k.js → lost-passport-kAGeMJkX.js} +3 -3
- package/dist/assets/{lottie-react.esm-BH3BG_-P.js → lottie-react.esm-DSwkwUHV.js} +1 -1
- package/dist/assets/{notifications-BtjeF_bm.js → notifications-DngQRGZV.js} +1 -1
- package/dist/assets/{open-window-pjGXXc0-.js → open-window-CFdD7QF5.js} +1 -1
- package/dist/assets/{overview-yDoLhnXv.js → overview-DxiewpWT.js} +1 -1
- package/dist/assets/{page-header-yd0FJEBt.js → page-header-BYyg583I.js} +1 -1
- package/dist/assets/{permission-CeDHz8z1.js → permission-Cc_uhsxV.js} +1 -1
- package/dist/assets/{preferences-0i2g23g0.js → preferences-DZHOL0oc.js} +1 -1
- package/dist/assets/publish-resource-DrIDCMrS.js +1 -0
- package/dist/assets/{raf-schd.esm-DLXXWVH0.js → raf-schd.esm-CFNiXJ1z.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-D2jpDw4M.js → react-beautiful-dnd.esm-CTA2zbRn.js} +1 -1
- package/dist/assets/refType-BPgPEP0J.js +1 -0
- package/dist/assets/{resource-dialog-CTFOg2yy.js → resource-dialog-B3-KSuv9.js} +1 -1
- package/dist/assets/sdk-DN538H9Q.js +1 -0
- package/dist/assets/{selector-BDN3xrV-.js → selector-w9nsIhUC.js} +1 -1
- package/dist/assets/session-D9OAJED-.js +1 -0
- package/dist/assets/{setup-C0yf3XW-.js → setup-Df2lp7nD.js} +3 -3
- package/dist/assets/{shorten-label-Bx3uHeta.js → shorten-label-D3_hFBZw.js} +1 -1
- package/dist/assets/{simple-select-BauGa3nb.js → simple-select-Y9UD0D2Q.js} +1 -1
- package/dist/assets/{slicedToArray-DSijPVBu.js → slicedToArray-BYpWjcpz.js} +1 -1
- package/dist/assets/{start-CKXiSy-U.js → start-P2e_wW1n.js} +1 -1
- package/dist/assets/{step-actions-ClSrGBpc.js → step-actions-Nlb58QF0.js} +1 -1
- package/dist/assets/{studio-Dy4Hb6Ns.js → studio-D_sSi2n2.js} +1 -1
- package/dist/assets/{switch-control-BPueVJ6s.js → switch-control-CZFyC5xX.js} +1 -1
- package/dist/assets/{toUpper-CkN1_xDq.js → toUpper-D9dpE5vE.js} +1 -1
- package/dist/assets/{transfer-Dl9O3w43.js → transfer-CnkPn-jt.js} +1 -1
- package/dist/assets/{trim-h1uVcGOT.js → trim-Bp21LaxQ.js} +1 -1
- package/dist/assets/{uniqBy-C90HAGZi.js → uniqBy-mxHDJVF7.js} +1 -1
- package/dist/assets/{unsubscribe-t316mtFD.js → unsubscribe-tAeIqzu3.js} +1 -1
- package/dist/assets/{url-join-DMmAut1v.js → url-join-DQC0-Z72.js} +1 -1
- package/dist/assets/{use-mobile-CJxiC-M_.js → use-mobile-BC2digzN.js} +1 -1
- package/dist/assets/{use-mobile-BRq2FKak.js → use-mobile-BtsZuuTh.js} +1 -1
- package/dist/assets/{useAsync-BN1R2ebD.js → useAsync-WCoBmZYy.js} +1 -1
- package/dist/assets/{useFormControl-DjmOtdAs.js → useFormControl-Cf0kOJKh.js} +1 -1
- package/dist/assets/{useLocalStorage-B1FI1_4T.js → useLocalStorage-83XQrrF0.js} +1 -1
- package/dist/assets/{useSetState-BAfQWGEm.js → useSetState-CocBtBRb.js} +1 -1
- package/dist/assets/{useSlot-CDCF2If3.js → useSlot-CUe4vlUw.js} +1 -1
- package/dist/assets/{useSlotProps-CbjQuc1h.js → useSlotProps-7ggJ1vZp.js} +1 -1
- package/dist/assets/{useThemeProps-DZfFxbKj.js → useThemeProps-DpYdiMpW.js} +1 -1
- package/dist/assets/{user-center-DPaZkX-p.js → user-center-BONJyLtg.js} +1 -1
- package/dist/assets/{user-sessions-DXdNgVKe.js → user-sessions-D0Dtnfh-.js} +1 -1
- package/dist/assets/{util-CcDEeHOO.js → util-CLNECagU.js} +1 -1
- package/dist/assets/{wrap-locale-C8wuzo7T.js → wrap-locale-BJEyuNsD.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +18 -18
- package/dist/assets/add-resource-bDEgmOed.js +0 -1
- package/dist/assets/api-C0PK4EBY.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-CIZCdZE-.js +0 -1
- package/dist/assets/localization-B2x_Qrna.js +0 -1
- package/dist/assets/publish-resource-BgdlYSXj.js +0 -1
- package/dist/assets/refType-BXN0uhpq.js +0 -1
- package/dist/assets/sdk-By-C6--g.js +0 -1
- package/dist/assets/session-5gd2ZUTN.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{av as d2,j as o,aI as se,cR as g0,aM as H,fJ as Q1,aL as we,aG as $e,aH as Fe,T as K,r as R,aK as g1,aN as u2,aO as Ue,aP as qe,cY as p2,fK as s1,Z as ke,$ as Ie,a1 as We,B as y,P as h,G as J,e as b1,u as te,aR as Re,a_ as Ne,bz as r1,a3 as t1,L as pe,bL as b0,a as ge,aE as be,N as h2,t as F,a0 as ce,dG as f2,ac as ze,c as he,I as x2,bW as j1,cj as j0,cM as m2,cV as He,cW as w0,al as v2,da as g2,cQ as Qe,bF as ie,c4 as Ye,fw as b2,aa as Y1,fL as j2,b as ne,n as o1,bo as R0,el as C0,ak as w1,bp as y0,cA as z0,aV as Oe,aU as w2,bh as Me,a5 as S0,fM as Z1,fj as Le,bm as R2,aw as k0,c3 as C2,l as y2,aD as z2,as as S2,at as c1}from"./index-B9_-R0J9.js";import{d as R1}from"./Add-Be5NIjqx.js";import{d as I0,a as k2}from"./Delete-9I7Wb-WZ.js";import{d as I2}from"./Error-Bv-FkXIw.js";import{D as C1}from"./index-BTGaXT27.js";import{T as M0,b as M2}from"./index-ZEuzv_ea.js";import{C as y1}from"./confirm-BU1Cx5fg.js";import{u as i1}from"./session-5gd2ZUTN.js";import{W as e0}from"./did-address-DxAwQT37.js";import{E as Ge,D as P2,C as L2,P as T2}from"./react-beautiful-dnd.esm-D2jpDw4M.js";import{B as z1}from"./bundle-avatar-DH1wQ7kb.js";import{S as je}from"./shorten-label-Bx3uHeta.js";import{A as P0}from"./Avatar-lahBxqDM.js";import{d as D2}from"./Download-Ql_zAGR2.js";import{d as N2}from"./QuestionMarkCircle-BRNZxGZD.js";import{b as V2,c as t0,T as _2}from"./index-s6wI6FUq.js";import{_ as Pe}from"./useSetState-BAfQWGEm.js";import{c as S1}from"./index-xpNnhdaf.js";import{C as h1,L as E2}from"./MoreVert-CSIMTgso.js";import{A as L0}from"./Alert-BbtKi3v1.js";import{p as l1}from"./index-BXIPxAhW.js";import"./api-C0PK4EBY.js";import{i as B2}from"./index-D-P_GY9j.js";import{d as A2}from"./ExpandMore-CkVLrKqo.js";import{d as O2}from"./ChevronRight-C4s6zT7y.js";import{d as H2}from"./OpenInNew-Dn-b4ql0.js";import{u as T0}from"./useThemeProps-DZfFxbKj.js";import{F as f1}from"./FormControlLabel-vyMASWw0.js";import{u as $2}from"./useSlotProps-CbjQuc1h.js";import{d as F2}from"./DeleteOutline-Bfmy5Inl.js";import{c as U2,A as D0,u as q2,S as W2,U as G2}from"./item-4JFyYUtQ.js";import{d as K2}from"./ArrowDropDown-B9F9-dH8.js";import{f as De}from"./format-error-ChzZD3Gi.js";import{B as x1}from"./ButtonGroup-dnetDbaM.js";import{T as Te}from"./TextField-IWXyq9WX.js";import{I as k1}from"./InputAdornment-Co2MX07D.js";import{S as Be}from"./Stack-C3ImIxEz.js";import{C as X2}from"./click-to-copy-D0LAvhaE.js";import{d as J2}from"./Launch-CF-5PGsC.js";import{S as o0}from"./index-DOBe8YkV.js";import{M as Q2}from"./index-C6rBmIch.js";import{p as Y2}from"./purify.es-Bq0E5Q3l.js";import{r as Z2}from"./index-BFBCENEc.js";import{d as et}from"./Done-CsJG7tLE.js";import{c as N0,d as V0,b as tt,S as ot,a as lt}from"./Stepper-D8Dcky2M.js";import{R as nt,a as l0}from"./RadioGroup-DoFdHdBb.js";import"./toPropertyKey-PLuKRk1e.js";import"./emotion-cache.browser.esm-CIZCdZE-.js";import"./index-CEDEkRWR.js";import"./redux-CluOqhW1.js";import"./ViewColumn-TT7ZfhoS.js";import"./FormControl-BmbbFW7j.js";import"./useFormControl-DjmOtdAs.js";import"./FormGroup-YyKrx4Oj.js";import"./Grid-C54_tgj7.js";import"./Select-D2LyB2yK.js";import"./LastPage-K8SBiloQ.js";import"./Toolbar-CTacdb76.js";import"./Search-BSiUJ455.js";import"./index-C_f5JLr-.js";import"./DialogContentText-CtUy42Wy.js";import"./Link-DSnY6X1i.js";import"./raf-schd.esm-DLXXWVH0.js";import"./useSlot-CDCF2If3.js";import"./jss-plugin-props-sort.esm-CbNAmI54.js";const st=d2(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"),rt=["slots","slotProps"],it=se(g0)(({theme:e})=>H({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":H({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":H({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:Q1(e.palette.grey[200],.12)}:{backgroundColor:Q1(e.palette.grey[600],.12)})})),at=se(st)({width:24,height:16});function ct(e){const{slots:t={},slotProps:l={}}=e,s=we(e,rt),r=e;return o.jsx("li",{children:o.jsx(it,H({focusRipple:!0},s,{ownerState:r,children:o.jsx(at,H({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function dt(e){return Fe("MuiBreadcrumbs",e)}const ut=$e("MuiBreadcrumbs",["root","ol","li","separator"]),pt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ht=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},dt,t)},ft=se(K,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ut.li}`]:t.li},t.root]})({}),xt=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),mt=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function vt(e,t,l,s){return e.reduce((r,a,i)=>(i<e.length-1?r=r.concat(a,o.jsx(mt,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(a),r),[])}const _0=R.forwardRef(function(t,l){const s=g1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:a,component:i="nav",slots:c={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:z=8,separator:p="/"}=s,d=we(s,pt),[m,b]=R.useState(!1),v=H({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:z,separator:p}),C=ht(v),S=u2({elementType:c.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),D=R.useRef(null),L=I=>{const q=()=>{b(!0);const V=D.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(ct,{"aria-label":f,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:q},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,q)=>o.jsx("li",{className:C.li,children:I},`child-${q}`));return o.jsx(ft,H({ref:l,component:i,color:"text.secondary",className:Ue(C.root,a),ownerState:v},d,{children:o.jsx(xt,{className:C.ol,ref:D,ownerState:v,children:vt(m||z&&P.length<=z?P:L(P),C.separator,p,v)})}))});function gt(e){return Fe("MuiStepButton",e)}const n0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),bt=["children","className","icon","optional"],jt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},gt,t)},wt=se(g0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${n0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>H({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${n0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),Rt=R.forwardRef(function(t,l){const s=g1({props:t,name:"MuiStepButton"}),{children:r,className:a,icon:i,optional:c}=s,u=we(s,bt),{disabled:f,active:x}=R.useContext(N0),{orientation:g}=R.useContext(V0),z=H({},s,{orientation:g}),p=jt(z),d={icon:i,optional:c},m=p2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(tt,H({},d,{children:r}));return o.jsx(wt,H({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,a),ref:l,ownerState:z,"aria-current":x?"step":void 0},u,{children:m}))});function Ct(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const yt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],zt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},Ct,t)},St=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>H({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"})),kt=se(s1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),It=R.forwardRef(function(t,l){const s=g1({props:t,name:"MuiStepContent"}),{children:r,className:a,TransitionComponent:i=s1,transitionDuration:c="auto",TransitionProps:u}=s,f=we(s,yt);R.useContext(V0);const{active:x,last:g,expanded:z}=R.useContext(N0),p=H({},s,{last:g}),d=zt(p);let m=c;return c==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(St,H({className:Ue(d.root,a),ref:l,ownerState:p},f,{children:o.jsx(kt,H({as:i,in:x||z,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var I1={},Mt=Ie;Object.defineProperty(I1,"__esModule",{value:!0});var E0=I1.default=void 0,Pt=Mt(ke()),Lt=o;E0=I1.default=(0,Pt.default)((0,Lt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var M1={},Tt=Ie;Object.defineProperty(M1,"__esModule",{value:!0});var B0=M1.default=void 0,Dt=Tt(ke()),Nt=o;B0=M1.default=(0,Dt.default)((0,Nt.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 P1={},Vt=Ie;Object.defineProperty(P1,"__esModule",{value:!0});var A0=P1.default=void 0,_t=Vt(ke()),Et=o;A0=P1.default=(0,_t.default)((0,Et.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 L1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[c,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(y,{sx:{display:"flex",flexDirection:"row",color:c?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(P0,{sx:{borderRadius:1},src:i}),o.jsxs(y,{children:[o.jsx(je,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(je,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||c?"primary.main":"grey.700"},children:r||"/"})]})]})}L1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function T1({initUrl:e}){const t=b1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:a}=Re(),{api:i}=i1(),[c,u]=R.useState(!0),{blocklet:f}=Ne(),[x,g]=R.useState(null),[z,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=r1(),[b,v]=R.useState(null),C=()=>{a.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const N=(k==null?void 0:k.projects)||[];u(!1),v(N)}).catch(k=>{u(!1),F.error(k.message)})},S=()=>{t(`${J.UNOWNED_DID}/create/none`,{replace:!0})},D=k=>{g(k)},L=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{F.error(k.message),p(!1),g(null)},q=k=>{if(!(k!=null&&k.deleted)){F.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&c)return o.jsx(y,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Ge,{})});if(!b)return null;if(!b.length)return o.jsxs(y,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(y,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(y,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(t1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const N=b[k];return o.jsx(pe,{to:`${N.id}`,children:o.jsx(L1,{did:f.meta.did,projectId:N.id,logo:N.blockletLogo,title:N.blockletTitle,describe:N.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(M0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(e0,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(e0,{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 N=(f.children||[]).find(T=>T.meta.did===k);return N?o.jsxs(y,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(z1,{size:14,blocklet:N,ancestors:[f]}),o.jsx(y,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:N.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(y,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(je,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(b0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const N=b[k];return o.jsxs(y,{display:"flex",children:[o.jsx(pe,{to:`${N.id}/new-release/${N.lastReleaseId}`,children:o.jsx(ge,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(be,{color:"primary","aria-label":"create",children:o.jsx(E0,{style:{fontSize:18}})})})}),!!N.lastReleaseId&&o.jsx(ge,{title:s("blocklet.publish.viewLastRelease",{name:N.blockletTitle}),placement:"top",children:o.jsx(be,{color:"secondary","aria-label":"create",children:o.jsx(pe,{style:{display:"flex"},to:`${N.id}/view/${N.lastReleaseId}`,children:o.jsx(B0,{sx:{fontSize:18}})})})}),o.jsx(ge,{title:s("blocklet.publish.delete",{name:N.blockletTitle}),placement:"top",children:o.jsx(be,{color:"primary","aria-label":"delete",onClick:()=>D(N),children:o.jsx(I0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=z?o.jsx(h2,{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:q,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(Bt,{children:[o.jsxs(y,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(y,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(y,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ge,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(A0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(t1,{onClick:S,variant:"contained",children:[o.jsx(R1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(y,{mt:3}),o.jsx(C1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(y1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:L,onCancel:()=>g(null),children:o.jsx(y,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(y,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(I2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(K,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}T1.propTypes={initUrl:h.object};T1.defaultProps={initUrl:null};const Bt=ce(y)`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-ypT3GfN-.js","assets/index-DHUVZBwm.js","assets/index-D8NuaJ66.css","assets/url-join-DQC0-Z72.js","assets/index-Dv6MKvRR.js","assets/_createAggregator-DqOEJdke.js","assets/index-Dwkse-gi.js","assets/index-DWTOuSpr.js","assets/index-CxG7Q59L.js","assets/fallback-DRgH1dur.js","assets/index-EkNi2gEh.js","assets/Menu-DvE03HqE.js","assets/Toolbar-Muj5q0IZ.js","assets/Hidden-D-O5BO-G.js","assets/index-DGom8BRG.js","assets/MoreVert-Bm8gI7fr.js","assets/FormControlLabel-Dhb6u65W.js","assets/useFormControl-Cf0kOJKh.js","assets/Stack-dwX_aIUB.js","assets/ListItemButton-BBfLux7c.js","assets/selector-w9nsIhUC.js","assets/ExpandMore-TPXNYn4i.js","assets/Avatar-ZE8kDNw1.js","assets/useSlot-CUe4vlUw.js","assets/resource-dialog-B3-KSuv9.js","assets/index-BOiGkdAT.js","assets/emotion-cache.browser.esm-C9hYh7NM.js","assets/index-6M_0jkoL.js","assets/OpenInNew-BogqHOtG.js","assets/index-BMlgtyu1.js","assets/Link-C-7K49dY.js","assets/Skeleton-C0c6JVcF.js","assets/HelpOutline-Ct7Pu8QI.js","assets/index-BcJiTODH.js","assets/ButtonGroup-CaLh4rbJ.js","assets/DialogContentText-RK3HiWcQ.js","assets/TextField-CH-MPuwY.js","assets/FormControl-DzwnIqDl.js","assets/Select-C0CAKSaj.js","assets/index-BiF39Tbb.js","assets/index-Cje4vX3R.js","assets/index-DpF6dC16.js","assets/index-Bb8Oi0oS.js","assets/useThemeProps-DpYdiMpW.js","assets/toPropertyKey-PLuKRk1e.js","assets/index-ISoRy2C-.js","assets/redux-CluOqhW1.js","assets/ViewColumn-C1ynjPOp.js","assets/FormGroup-B9jcG6zx.js","assets/Grid-CRd4VYZX.js","assets/Delete-nshOetuq.js","assets/LastPage-CeAt2z2-.js","assets/Search-B3yupqTW.js","assets/deprecate-C_5E7Bx8.js","assets/uniqBy-mxHDJVF7.js","assets/toUpper-D9dpE5vE.js","assets/purify.es-Bq0E5Q3l.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{av as d2,j as o,aI as se,cR as g0,aM as H,fJ as Q1,aL as we,aG as $e,aH as Fe,T as K,r as R,aK as g1,aN as u2,aO as Ue,aP as qe,cY as p2,fK as s1,Z as ke,$ as Ie,a1 as We,B as y,P as h,G as J,e as b1,u as te,aR as Re,a_ as Ne,bz as r1,a3 as t1,L as pe,bL as b0,a as ge,aE as be,N as h2,t as F,a0 as ce,dG as f2,ac as ze,c as he,I as x2,bW as j1,cj as j0,cM as m2,cV as He,cW as w0,al as v2,da as g2,cQ as Qe,bF as ie,c4 as Ye,fw as b2,aa as Y1,fL as j2,b as ne,n as o1,bo as R0,el as C0,ak as w1,bp as y0,cA as z0,aV as Oe,aU as w2,bh as Me,a5 as S0,fM as Z1,fj as Le,bm as R2,aw as k0,c3 as C2,l as y2,aD as z2,as as S2,at as c1}from"./index-DHUVZBwm.js";import{d as R1}from"./Add-BJ0-DmpB.js";import{d as I0,a as k2}from"./Delete-nshOetuq.js";import{d as I2}from"./Error-C_ob3AlW.js";import{D as C1}from"./index-Bb8Oi0oS.js";import{T as M0,b as M2}from"./index-DlMDnAjH.js";import{C as y1}from"./confirm-B1Dlltx1.js";import{u as i1}from"./session-D9OAJED-.js";import{W as e0}from"./did-address-Bdzn0FI1.js";import{E as Ge,D as P2,C as L2,P as T2}from"./react-beautiful-dnd.esm-CTA2zbRn.js";import{B as z1}from"./bundle-avatar-DwfcOLy9.js";import{S as je}from"./shorten-label-D3_hFBZw.js";import{A as P0}from"./Avatar-ZE8kDNw1.js";import{d as D2}from"./Download-C1BD0YeO.js";import{d as N2}from"./QuestionMarkCircle-ClHWwfR_.js";import{b as V2,c as t0,T as _2}from"./index-BiF39Tbb.js";import{_ as Pe}from"./useSetState-CocBtBRb.js";import{c as S1}from"./index-DWTOuSpr.js";import{C as h1,L as E2}from"./MoreVert-Bm8gI7fr.js";import{A as L0}from"./Alert-DHyghqS2.js";import{p as l1}from"./index-BQtULvDO.js";import"./api-BTKs9Xnn.js";import{i as B2}from"./index-BMlgtyu1.js";import{d as A2}from"./ExpandMore-TPXNYn4i.js";import{d as O2}from"./ChevronRight-Pt1j71fr.js";import{d as H2}from"./OpenInNew-BogqHOtG.js";import{u as T0}from"./useThemeProps-DpYdiMpW.js";import{F as f1}from"./FormControlLabel-Dhb6u65W.js";import{u as $2}from"./useSlotProps-7ggJ1vZp.js";import{d as F2}from"./DeleteOutline-BrAkqJyh.js";import{c as U2,A as D0,u as q2,S as W2,U as G2}from"./item-ByPKIevF.js";import{d as K2}from"./ArrowDropDown-C1YhdiGI.js";import{f as De}from"./format-error-BrCBQ7tH.js";import{B as x1}from"./ButtonGroup-CaLh4rbJ.js";import{T as Te}from"./TextField-CH-MPuwY.js";import{I as k1}from"./InputAdornment-oz-HYTcf.js";import{S as Be}from"./Stack-dwX_aIUB.js";import{C as X2}from"./click-to-copy-aAtVKl96.js";import{d as J2}from"./Launch-Ci12J0eU.js";import{S as o0}from"./index-DpF6dC16.js";import{M as Q2}from"./index-AKSeBSJP.js";import{p as Y2}from"./purify.es-Bq0E5Q3l.js";import{r as Z2}from"./index-3ECV8QOS.js";import{d as et}from"./Done-C9nQ2ZAw.js";import{c as N0,d as V0,b as tt,S as ot,a as lt}from"./Stepper-rO2e9XZL.js";import{R as nt,a as l0}from"./RadioGroup-D0iCI3Eo.js";import"./toPropertyKey-PLuKRk1e.js";import"./emotion-cache.browser.esm-C9hYh7NM.js";import"./index-ISoRy2C-.js";import"./redux-CluOqhW1.js";import"./ViewColumn-C1ynjPOp.js";import"./FormControl-DzwnIqDl.js";import"./useFormControl-Cf0kOJKh.js";import"./FormGroup-B9jcG6zx.js";import"./Grid-CRd4VYZX.js";import"./Select-C0CAKSaj.js";import"./LastPage-CeAt2z2-.js";import"./Toolbar-Muj5q0IZ.js";import"./Search-B3yupqTW.js";import"./index-Cje4vX3R.js";import"./DialogContentText-RK3HiWcQ.js";import"./Link-C-7K49dY.js";import"./raf-schd.esm-CFNiXJ1z.js";import"./useSlot-CUe4vlUw.js";import"./jss-plugin-props-sort.esm-BGszpd7H.js";const st=d2(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"),rt=["slots","slotProps"],it=se(g0)(({theme:e})=>H({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":H({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":H({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:Q1(e.palette.grey[200],.12)}:{backgroundColor:Q1(e.palette.grey[600],.12)})})),at=se(st)({width:24,height:16});function ct(e){const{slots:t={},slotProps:l={}}=e,s=we(e,rt),r=e;return o.jsx("li",{children:o.jsx(it,H({focusRipple:!0},s,{ownerState:r,children:o.jsx(at,H({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function dt(e){return Fe("MuiBreadcrumbs",e)}const ut=$e("MuiBreadcrumbs",["root","ol","li","separator"]),pt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ht=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},dt,t)},ft=se(K,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ut.li}`]:t.li},t.root]})({}),xt=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),mt=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function vt(e,t,l,s){return e.reduce((r,a,i)=>(i<e.length-1?r=r.concat(a,o.jsx(mt,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(a),r),[])}const _0=R.forwardRef(function(t,l){const s=g1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:a,component:i="nav",slots:c={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:z=8,separator:p="/"}=s,d=we(s,pt),[m,b]=R.useState(!1),v=H({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:z,separator:p}),C=ht(v),S=u2({elementType:c.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),D=R.useRef(null),L=I=>{const q=()=>{b(!0);const V=D.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(ct,{"aria-label":f,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:q},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,q)=>o.jsx("li",{className:C.li,children:I},`child-${q}`));return o.jsx(ft,H({ref:l,component:i,color:"text.secondary",className:Ue(C.root,a),ownerState:v},d,{children:o.jsx(xt,{className:C.ol,ref:D,ownerState:v,children:vt(m||z&&P.length<=z?P:L(P),C.separator,p,v)})}))});function gt(e){return Fe("MuiStepButton",e)}const n0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),bt=["children","className","icon","optional"],jt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},gt,t)},wt=se(g0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${n0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>H({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${n0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),Rt=R.forwardRef(function(t,l){const s=g1({props:t,name:"MuiStepButton"}),{children:r,className:a,icon:i,optional:c}=s,u=we(s,bt),{disabled:f,active:x}=R.useContext(N0),{orientation:g}=R.useContext(V0),z=H({},s,{orientation:g}),p=jt(z),d={icon:i,optional:c},m=p2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(tt,H({},d,{children:r}));return o.jsx(wt,H({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,a),ref:l,ownerState:z,"aria-current":x?"step":void 0},u,{children:m}))});function Ct(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const yt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],zt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},Ct,t)},St=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>H({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"})),kt=se(s1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),It=R.forwardRef(function(t,l){const s=g1({props:t,name:"MuiStepContent"}),{children:r,className:a,TransitionComponent:i=s1,transitionDuration:c="auto",TransitionProps:u}=s,f=we(s,yt);R.useContext(V0);const{active:x,last:g,expanded:z}=R.useContext(N0),p=H({},s,{last:g}),d=zt(p);let m=c;return c==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(St,H({className:Ue(d.root,a),ref:l,ownerState:p},f,{children:o.jsx(kt,H({as:i,in:x||z,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var I1={},Mt=Ie;Object.defineProperty(I1,"__esModule",{value:!0});var E0=I1.default=void 0,Pt=Mt(ke()),Lt=o;E0=I1.default=(0,Pt.default)((0,Lt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var M1={},Tt=Ie;Object.defineProperty(M1,"__esModule",{value:!0});var B0=M1.default=void 0,Dt=Tt(ke()),Nt=o;B0=M1.default=(0,Dt.default)((0,Nt.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 P1={},Vt=Ie;Object.defineProperty(P1,"__esModule",{value:!0});var A0=P1.default=void 0,_t=Vt(ke()),Et=o;A0=P1.default=(0,_t.default)((0,Et.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 L1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[c,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(y,{sx:{display:"flex",flexDirection:"row",color:c?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(P0,{sx:{borderRadius:1},src:i}),o.jsxs(y,{children:[o.jsx(je,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(je,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||c?"primary.main":"grey.700"},children:r||"/"})]})]})}L1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function T1({initUrl:e}){const t=b1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:a}=Re(),{api:i}=i1(),[c,u]=R.useState(!0),{blocklet:f}=Ne(),[x,g]=R.useState(null),[z,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=r1(),[b,v]=R.useState(null),C=()=>{a.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const N=(k==null?void 0:k.projects)||[];u(!1),v(N)}).catch(k=>{u(!1),F.error(k.message)})},S=()=>{t(`${J.UNOWNED_DID}/create/none`,{replace:!0})},D=k=>{g(k)},L=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{F.error(k.message),p(!1),g(null)},q=k=>{if(!(k!=null&&k.deleted)){F.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&c)return o.jsx(y,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Ge,{})});if(!b)return null;if(!b.length)return o.jsxs(y,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(y,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(y,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(t1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const N=b[k];return o.jsx(pe,{to:`${N.id}`,children:o.jsx(L1,{did:f.meta.did,projectId:N.id,logo:N.blockletLogo,title:N.blockletTitle,describe:N.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(M0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(e0,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(e0,{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 N=(f.children||[]).find(T=>T.meta.did===k);return N?o.jsxs(y,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(z1,{size:14,blocklet:N,ancestors:[f]}),o.jsx(y,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:N.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(y,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(je,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(b0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const N=b[k];return o.jsxs(y,{display:"flex",children:[o.jsx(pe,{to:`${N.id}/new-release/${N.lastReleaseId}`,children:o.jsx(ge,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(be,{color:"primary","aria-label":"create",children:o.jsx(E0,{style:{fontSize:18}})})})}),!!N.lastReleaseId&&o.jsx(ge,{title:s("blocklet.publish.viewLastRelease",{name:N.blockletTitle}),placement:"top",children:o.jsx(be,{color:"secondary","aria-label":"create",children:o.jsx(pe,{style:{display:"flex"},to:`${N.id}/view/${N.lastReleaseId}`,children:o.jsx(B0,{sx:{fontSize:18}})})})}),o.jsx(ge,{title:s("blocklet.publish.delete",{name:N.blockletTitle}),placement:"top",children:o.jsx(be,{color:"primary","aria-label":"delete",onClick:()=>D(N),children:o.jsx(I0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=z?o.jsx(h2,{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:q,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(Bt,{children:[o.jsxs(y,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(y,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(y,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ge,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(A0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(t1,{onClick:S,variant:"contained",children:[o.jsx(R1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(y,{mt:3}),o.jsx(C1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(y1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:L,onCancel:()=>g(null),children:o.jsx(y,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(y,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(I2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(K,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}T1.propTypes={initUrl:h.object};T1.defaultProps={initUrl:null};const Bt=ce(y)`
|
|
3
3
|
.main-table > div:first-child {
|
|
4
4
|
display: none;
|
|
5
5
|
}
|
|
@@ -133,7 +133,7 @@ import{av as d2,j as o,aI as se,cR as g0,aM as H,fJ as Q1,aL as we,aG as $e,aH a
|
|
|
133
133
|
background: #fff;
|
|
134
134
|
z-index: 10;
|
|
135
135
|
}
|
|
136
|
-
`,u0="lastWantToConnectStoreId";function Jl(e){var c,u;const[t,l]=R.useState(null),{session:s}=i1(),r=R.useCallback(f=>{l(f),localStorage.setItem(u0,f==null?void 0:f.id)},[l]),a=R.useMemo(()=>{var z,p,d,m;const f=localStorage.getItem(u0),x=f?(((z=e==null?void 0:e.settings)==null?void 0:z.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!==J.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},[(c=e==null?void 0:e.settings)==null?void 0:c.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||a||{},r]}const p1={};async function K0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){p1[r]&&clearTimeout(p1[r]),await new Promise(c=>setTimeout(c,s));const a=Date.now(),i=async(c,u)=>{try{const f=await e();c(f)}catch(f){Date.now()-a>l?u(f):r?p1[r]=setTimeout(()=>i(c,u),t):setTimeout(()=>i(c,u),t)}};return new Promise(i)}function Ql(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Yl(e,{did:t,projectId:l,messageId:s}){return K0(async()=>{var a;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((a=r==null?void 0:r.project)!=null&&a.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function Zl(e,{did:t,projectId:l,storeId:s}){return K0(async()=>{var i,c;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((c=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&c.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 X0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,c;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let a=e?((c=l==null?void 0:l.settings)==null?void 0:c.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(a)||(a=[]),a=a.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:a}};function F1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:a,componentDid:i}){var N,T,E;const{t:c}=te(),{session:u}=i1(),{api:f,info:x,inService:g}=Re(),z=Ne(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),D=A=>{l(A),d(!1)},L=()=>{d(!p)},P=A=>{m.current&&m.current.contains(A.target)||d(!1)},I=()=>{v(!0)},q=()=>{v(!1)},V=async()=>{var A;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((A=z==null?void 0:z.actions)==null?void 0:A.refreshBlocklet())}catch(O){F.error(`Remove Blocklet Store Error: ${De(O)}`)}finally{S(null)}},{storeList:M}=X0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(N=u==null?void 0:u.user)==null?void 0:N.did}),k=(T=e==null?void 0:e.meta)==null?void 0:T.did;return o.jsxs(o.Fragment,{children:[o.jsxs(x1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[a&&o.jsx(o1,{size:14,sx:{mr:.5}}),`${c("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:L,children:o.jsx(K2,{})})]}),o.jsx(R0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:A})=>o.jsx(C0,{...A,style:{transformOrigin:"center top"},children:o.jsx(w1,{children:o.jsx(y0,{onClickAway:P,children:o.jsxs(z0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(O=>{var W;return o.jsxs(Oe,{selected:O.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>D(O),children:[o.jsxs(y,{children:[o.jsx(je,{sx:{fontSize:"16px"},maxLength:24,children:O.name}),o.jsx(je,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:O.url})]}),U2({store:O,userDid:(W=u==null?void 0:u.user)==null?void 0:W.did})&&o.jsx(be,{sx:{ml:1},onClick:X=>{X.preventDefault(),X.stopPropagation(),S(O)},children:o.jsx(ie,{icon:"ic:outline-delete"})})]},O.url)}),o.jsx(w2,{}),o.jsxs(Oe,{onClick:I,children:[o.jsx(R1,{font:!0}),o.jsx(K,{variant:"inherit",children:c("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(D0,{hiddenChildren:!0,open:!0,onClose:q,teamDid:k,storeList:M,scope:"studio",onAdd:(E=z==null?void 0:z.actions)==null?void 0:E.refreshBlocklet}),C&&o.jsx(y1,{displayError:!0,title:`${c("common.delete")} ${C.name}`,description:c("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:c("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}F1.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};F1.defaultProps={store:null,blocklet:null};const p0=R.lazy(()=>S0(()=>import("./index-DFXH0vaX.js").then(e=>e.i),__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,48,49,50,51,52,53,54,55,56,57])).then(e=>({default:e.Uploader})));function J0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:a,paramsErrTip:i,setParamsErrTip:c,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:z}){const{t:p}=te(),{api:d}=Re(),m=b1(),b=R.useRef(null),v=R.useRef(null),[C,S]=Jl(s),D=q2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),L=async T=>{const E=setTimeout(()=>{u(!1)},2e4),A=await Yl(d,T);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:z},"*"),m(window.location.pathname.replace(`${J.UNOWNED_DID}/create`,`${A}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){F.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){F.error(p("blocklet.publish.noStoreSelected"));return}const T=Ql();D(async(E,A)=>{var O,W,X;try{const Q=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:((W=r==null?void 0:r.blockletComponents)==null?void 0:W.length)>0?"pack":"resource",componentDid:z,messageId:T,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(Q!=null&&Q.url)){F.error("failed to connect to store");return}A(Q.url),L({did:(X=s==null?void 0:s.meta)==null?void 0:X.did,projectId:"",messageId:T})}catch(Q){const re=De(Q);F.error(re),u(!1)}})},I=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,q=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(T=>`${q}/${T}`),k=()=>t?!1:!e||e===J.UNOWNED_DID?(F.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0,N=T=>{if(!T.destination)return;const E=Array.from(r.blockletScreenshots),[A]=E.splice(T.source.index,1);E.splice(T.destination.index,0,A),a(O=>({...O,blockletScreenshots:E}))};return o.jsxs(e3,{children:[o.jsx(y,{display:"flex",className:"section",children:o.jsxs(y,{sx:{flex:1},children:[o.jsx(Te,{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:T=>{c({blockletTitle:""}),a({blockletTitle:T.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Te,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===J.UNOWNED_DID&&o.jsx(k1,{position:"end",children:o.jsx(F1,{blocklet:s,store:C,componentDid:z,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===J.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Te,{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:T=>{c({blockletDescription:""}),a({blockletDescription:T.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(y,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(y,{sx:{flex:1},children:[o.jsxs(y,{display:"flex",children:[o.jsxs(Be,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[o.jsx(K,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.logo")}),o.jsxs(Be,{direction:"column",alignItems:"flex-start",spacing:1,children:[o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"256x256"})]}),variant:"outlined",size:"small"}),o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"<500Kb"})]}),variant:"outlined",size:"small"})]})]}),o.jsx(y,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(P0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{var T;k()&&((T=b.current)==null||T.open())}})})]}),o.jsxs(y,{display:"flex",mt:3,children:[o.jsxs(Be,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[o.jsx(K,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.screenshot")}),o.jsxs(Be,{direction:"column",alignItems:"flex-start",spacing:1,children:[o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"16 / 9"})]}),variant:"outlined",size:"small"}),o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"1~5"})]}),variant:"outlined",size:"small"}),o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"<5MB"})]}),variant:"outlined",size:"small"}),o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]}),variant:"outlined",size:"small"})]})]}),o.jsx(P2,{onDragEnd:t?void 0:N,children:o.jsx(L2,{droppableId:"screenshots",direction:"horizontal",isDropDisabled:t,children:(T,E)=>o.jsxs(y,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:E.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:E.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:T.innerRef,...T.droppableProps,children:[M.map((A,O)=>o.jsx(T2,{draggableId:A,index:O,isDragDisabled:t,children:(W,X)=>o.jsxs(y,{ref:W.innerRef,...W.draggableProps,...W.dragHandleProps,className:"screenshot",sx:{transform:X.isDragging?"scale(1.05)":"none",boxShadow:X.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[o.jsx("img",{alt:"screenshot",src:A}),!t&&o.jsx(be,{className:"action",onClick:()=>{a(Q=>{const re=[...Q.blockletScreenshots];return re.splice(O,1),{...Q,blockletScreenshots:re}})},children:o.jsx(F2,{})})]})},A)),T.placeholder,M.length<5&&o.jsx(y,{sx:{width:240,height:135,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{var A;k()&&((A=v.current)==null||A.open())},children:"+"})]})})})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Ge,{}),children:[o.jsx(p0,{ref:b,popup:!0,onUploadFinish:T=>{var E;a({blockletLogo:T.data.filename}),g(""),(E=b.current)==null||E.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{width:256,height:256}}}},"uploader-logo"),o.jsx(p0,{ref:v,popup:!0,onUploadFinish:T=>{var E;a(A=>{var W;const O=A.blockletScreenshots||[];return O.push((W=T.data)==null?void 0:W.filename),{...A,blockletScreenshots:O}}),(E=v.current)==null||E.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:q,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-M.length}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:640,minHeight:360,width:1280,height:720,maxWidth:1600,maxHeight:900}}}},"uploader-screenshot")]})]})}J0.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 e3=ce.div`
|
|
136
|
+
`,u0="lastWantToConnectStoreId";function Jl(e){var c,u;const[t,l]=R.useState(null),{session:s}=i1(),r=R.useCallback(f=>{l(f),localStorage.setItem(u0,f==null?void 0:f.id)},[l]),a=R.useMemo(()=>{var z,p,d,m;const f=localStorage.getItem(u0),x=f?(((z=e==null?void 0:e.settings)==null?void 0:z.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!==J.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},[(c=e==null?void 0:e.settings)==null?void 0:c.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||a||{},r]}const p1={};async function K0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){p1[r]&&clearTimeout(p1[r]),await new Promise(c=>setTimeout(c,s));const a=Date.now(),i=async(c,u)=>{try{const f=await e();c(f)}catch(f){Date.now()-a>l?u(f):r?p1[r]=setTimeout(()=>i(c,u),t):setTimeout(()=>i(c,u),t)}};return new Promise(i)}function Ql(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Yl(e,{did:t,projectId:l,messageId:s}){return K0(async()=>{var a;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((a=r==null?void 0:r.project)!=null&&a.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function Zl(e,{did:t,projectId:l,storeId:s}){return K0(async()=>{var i,c;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((c=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&c.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 X0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,c;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let a=e?((c=l==null?void 0:l.settings)==null?void 0:c.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(a)||(a=[]),a=a.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:a}};function F1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:a,componentDid:i}){var N,T,E;const{t:c}=te(),{session:u}=i1(),{api:f,info:x,inService:g}=Re(),z=Ne(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),D=A=>{l(A),d(!1)},L=()=>{d(!p)},P=A=>{m.current&&m.current.contains(A.target)||d(!1)},I=()=>{v(!0)},q=()=>{v(!1)},V=async()=>{var A;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((A=z==null?void 0:z.actions)==null?void 0:A.refreshBlocklet())}catch(O){F.error(`Remove Blocklet Store Error: ${De(O)}`)}finally{S(null)}},{storeList:M}=X0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(N=u==null?void 0:u.user)==null?void 0:N.did}),k=(T=e==null?void 0:e.meta)==null?void 0:T.did;return o.jsxs(o.Fragment,{children:[o.jsxs(x1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[a&&o.jsx(o1,{size:14,sx:{mr:.5}}),`${c("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:L,children:o.jsx(K2,{})})]}),o.jsx(R0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:A})=>o.jsx(C0,{...A,style:{transformOrigin:"center top"},children:o.jsx(w1,{children:o.jsx(y0,{onClickAway:P,children:o.jsxs(z0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(O=>{var W;return o.jsxs(Oe,{selected:O.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>D(O),children:[o.jsxs(y,{children:[o.jsx(je,{sx:{fontSize:"16px"},maxLength:24,children:O.name}),o.jsx(je,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:O.url})]}),U2({store:O,userDid:(W=u==null?void 0:u.user)==null?void 0:W.did})&&o.jsx(be,{sx:{ml:1},onClick:X=>{X.preventDefault(),X.stopPropagation(),S(O)},children:o.jsx(ie,{icon:"ic:outline-delete"})})]},O.url)}),o.jsx(w2,{}),o.jsxs(Oe,{onClick:I,children:[o.jsx(R1,{font:!0}),o.jsx(K,{variant:"inherit",children:c("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(D0,{hiddenChildren:!0,open:!0,onClose:q,teamDid:k,storeList:M,scope:"studio",onAdd:(E=z==null?void 0:z.actions)==null?void 0:E.refreshBlocklet}),C&&o.jsx(y1,{displayError:!0,title:`${c("common.delete")} ${C.name}`,description:c("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:c("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}F1.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};F1.defaultProps={store:null,blocklet:null};const p0=R.lazy(()=>S0(()=>import("./index-ypT3GfN-.js").then(e=>e.i),__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,48,49,50,51,52,53,54,55,56,57])).then(e=>({default:e.Uploader})));function J0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:a,paramsErrTip:i,setParamsErrTip:c,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:z}){const{t:p}=te(),{api:d}=Re(),m=b1(),b=R.useRef(null),v=R.useRef(null),[C,S]=Jl(s),D=q2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),L=async T=>{const E=setTimeout(()=>{u(!1)},2e4),A=await Yl(d,T);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:z},"*"),m(window.location.pathname.replace(`${J.UNOWNED_DID}/create`,`${A}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){F.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){F.error(p("blocklet.publish.noStoreSelected"));return}const T=Ql();D(async(E,A)=>{var O,W,X;try{const Q=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:((W=r==null?void 0:r.blockletComponents)==null?void 0:W.length)>0?"pack":"resource",componentDid:z,messageId:T,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(Q!=null&&Q.url)){F.error("failed to connect to store");return}A(Q.url),L({did:(X=s==null?void 0:s.meta)==null?void 0:X.did,projectId:"",messageId:T})}catch(Q){const re=De(Q);F.error(re),u(!1)}})},I=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,q=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(T=>`${q}/${T}`),k=()=>t?!1:!e||e===J.UNOWNED_DID?(F.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0,N=T=>{if(!T.destination)return;const E=Array.from(r.blockletScreenshots),[A]=E.splice(T.source.index,1);E.splice(T.destination.index,0,A),a(O=>({...O,blockletScreenshots:E}))};return o.jsxs(e3,{children:[o.jsx(y,{display:"flex",className:"section",children:o.jsxs(y,{sx:{flex:1},children:[o.jsx(Te,{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:T=>{c({blockletTitle:""}),a({blockletTitle:T.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Te,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===J.UNOWNED_DID&&o.jsx(k1,{position:"end",children:o.jsx(F1,{blocklet:s,store:C,componentDid:z,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===J.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Te,{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:T=>{c({blockletDescription:""}),a({blockletDescription:T.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(y,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(y,{sx:{flex:1},children:[o.jsxs(y,{display:"flex",children:[o.jsxs(Be,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[o.jsx(K,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.logo")}),o.jsxs(Be,{direction:"column",alignItems:"flex-start",spacing:1,children:[o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"256x256"})]}),variant:"outlined",size:"small"}),o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"<500Kb"})]}),variant:"outlined",size:"small"})]})]}),o.jsx(y,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(P0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{var T;k()&&((T=b.current)==null||T.open())}})})]}),o.jsxs(y,{display:"flex",mt:3,children:[o.jsxs(Be,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[o.jsx(K,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.screenshot")}),o.jsxs(Be,{direction:"column",alignItems:"flex-start",spacing:1,children:[o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"16 / 9"})]}),variant:"outlined",size:"small"}),o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"1~5"})]}),variant:"outlined",size:"small"}),o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:"<5MB"})]}),variant:"outlined",size:"small"}),o.jsx(Me,{label:o.jsxs(y,{component:"span",children:[o.jsxs(y,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),o.jsx(y,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]}),variant:"outlined",size:"small"})]})]}),o.jsx(P2,{onDragEnd:t?void 0:N,children:o.jsx(L2,{droppableId:"screenshots",direction:"horizontal",isDropDisabled:t,children:(T,E)=>o.jsxs(y,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:E.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:E.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:T.innerRef,...T.droppableProps,children:[M.map((A,O)=>o.jsx(T2,{draggableId:A,index:O,isDragDisabled:t,children:(W,X)=>o.jsxs(y,{ref:W.innerRef,...W.draggableProps,...W.dragHandleProps,className:"screenshot",sx:{transform:X.isDragging?"scale(1.05)":"none",boxShadow:X.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[o.jsx("img",{alt:"screenshot",src:A}),!t&&o.jsx(be,{className:"action",onClick:()=>{a(Q=>{const re=[...Q.blockletScreenshots];return re.splice(O,1),{...Q,blockletScreenshots:re}})},children:o.jsx(F2,{})})]})},A)),T.placeholder,M.length<5&&o.jsx(y,{sx:{width:240,height:135,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{var A;k()&&((A=v.current)==null||A.open())},children:"+"})]})})})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Ge,{}),children:[o.jsx(p0,{ref:b,popup:!0,onUploadFinish:T=>{var E;a({blockletLogo:T.data.filename}),g(""),(E=b.current)==null||E.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),o.jsx(p0,{ref:v,popup:!0,onUploadFinish:T=>{var E;a(A=>{var W;const O=A.blockletScreenshots||[];return O.push((W=T.data)==null?void 0:W.filename),{...A,blockletScreenshots:O}}),(E=v.current)==null||E.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:q,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-M.length}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})]})}J0.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 e3=ce.div`
|
|
137
137
|
margin-top: 24px;
|
|
138
138
|
.screenshot {
|
|
139
139
|
margin-bottom: 16px;
|
|
@@ -178,7 +178,7 @@ import{av as d2,j as o,aI as se,cR as g0,aM as H,fJ as Q1,aL as we,aG as $e,aH a
|
|
|
178
178
|
padding-bottom: 12px;
|
|
179
179
|
border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
|
|
180
180
|
}
|
|
181
|
-
`;function o2({text:e}){return e?o.jsx(Q2,{wrapperElement:{"data-color-mode":"light"},source:Y2.sanitize(e),rehypePlugins:[[Z2,{target:"_blank"}]]}):o.jsx(Se,{Icon:Ke})}o2.propTypes={text:h.string.isRequired};function l2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:a}){var x;const{t:i}=te(),[c,u]=R.useState(a?"preview":"write"),f=(g,z)=>{u(z)};return o.jsxs(y,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(y,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(K,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(V2,{value:c,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(t0,{value:"write",label:"Write"}),o.jsx(t0,{value:"preview",label:"Preview"})]})]}),o.jsx(y,{display:c==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Te,{disabled:s||a,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:a,endAdornment:o.jsxs(k1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ze.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,ze.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(y,{display:c==="preview"?"block":"none",mt:3,children:o.jsx(o2,{text:e.blockletIntroduction||""})})]})}l2.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 W1={},d3=Ie;Object.defineProperty(W1,"__esModule",{value:!0});var n2=W1.default=void 0,u3=d3(ke()),f0=o;n2=W1.default=(0,u3.default)([(0,f0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,f0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function G1({step:e,ok:t,active:l,error:s}){let r="grey.500",a=e+1;return t&&(a=o.jsx(et,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",a=o.jsx(n2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(y,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:a})}G1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};G1.defaultProps={step:0,ok:!1,active:0,error:""};function s2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:a,paramsErrTip:i,viewMode:c,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},z=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=c||Y0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(y,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(ot,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=a||!a3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=a?"":z(m);return C&&(b.optional=o.jsx(K,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(lt,{children:[o.jsx(Rt,{icon:o.jsx(G1,{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(K,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(It,{children:[o.jsx(K,{fontSize:12,children:d.description}),!p&&o.jsx(y,{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(w1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(K,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}s2.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 p3=[".zip",".gz"],h3=1024*1024*100,f3=R.lazy(()=>S0(()=>import("./index-DFXH0vaX.js").then(e=>e.i),__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,48,49,50,51,52,53,54,55,56,57])).then(e=>({default:e.Uploader})));function K1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:a,error:i}){const{t:c}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===J.UNOWNED_DID?(F.error(c("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(y,{sx:{mt:3},children:[o.jsx(K,{gutterBottom:!0,children:c("blocklet.publish.resourceUpload")}),o.jsxs(Be,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(K,{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?c("common.change"):c("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Ge,{}),children:o.jsx(f3,{ref:u,popup:!0,onUploadFinish:g=>{var z;r({uploadedResource:g.data.filename}),a({blockletResource:""}),(z=u.current)==null||z.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:p3,maxFileSize:h3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(y,{color:"error.main",mt:1,fontSize:14,children:i})]})}K1.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};K1.defaultProps={};function n1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:a}){var c;const{t:i}=te();return o.jsx(y,{display:"flex",mt:3,className:"section",children:o.jsxs(y,{sx:{flex:1},children:[o.jsx(Te,{required:!0,disabled:a||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(Te,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:a||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(k1,{position:"end",children:[((c=t==null?void 0:t.note)==null?void 0:c.length)||0," / ",ze.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,ze.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}n1.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};n1.defaultProps={};function r2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&r2(e[t]);return e}const x3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(y,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(z1,{size:24,blocklet:t,ancestors:l}),o.jsx(y,{ml:"4px",className:"text",children:o.jsx(y,{children:t.meta.title})})]},s),value:s})},x0=(e,t)=>{const l=j1(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},m3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},m0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function X1({initUrl:e,...t}){var J1;const{projectId:l,mode:s,releaseId:r,componentDid:a=""}=r1(),{t:i}=te(),{blocklet:c}=Ne(),[u,f]=Pe({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Pe({}),[z,p]=R.useState(!1),[d,m]=Pe(null),{api:b}=Re(),v=We(_=>_.breakpoints.down("md")),[C,S]=R.useState({}),[D,L]=R.useState(!1),P=R.useRef({}),[I,q]=Pe({}),[V,M]=R.useState(""),[k,N]=Pe({}),T=e==null?void 0:e.searchParams.get("dependentComponentsMode"),E=T==="readonly",A=R.useMemo(()=>{const _={};return Object.keys(k).forEach(B=>{const ye=k[B];ye&&ye.forEach(c2=>{_[c2]=!0})}),_},[k]),O=R.useCallback(_=>{E&&f({blockletComponents:[]}),N(_)},[E,N,f]),W=R.useCallback((..._)=>{q(..._),g({blockletResource:""})},[]),X=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Q,re]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const fe=R.useMemo(()=>{var _;return(_=u==null?void 0:u.blockletComponents)!=null&&_.some(B=>B.included)||Object.keys(A).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,A]),de=[],oe=((c==null?void 0:c.children)||[]).filter(_=>{var B;return(B=_.meta.resource)==null?void 0:B.exportApi}).filter(_=>!a||_.meta.did===a);oe.forEach(_=>{x3({tabs:de,blocklet:_,t:i,ancestors:[c]})});const[ee,ae]=R.useState((J1=de[0])==null?void 0:J1.value),xe=!D&&(d==null?void 0:d.status)==="published",Y=xe,me=y2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(B=>{var ye;return{...B,blockletTitle:(B==null?void 0:B.blockletTitle)||e.searchParams.get("title"),blockletDescription:(B==null?void 0:B.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(B==null?void 0:B.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(ye=B==null?void 0:B.blockletComponents)!=null&&ye.length?B==null?void 0:B.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(B==null?void 0:B.note)||e.searchParams.get("note")||"No note"}});const _=e.searchParams.get("resources");try{const B=JSON.parse(_);S(B)}catch{}}),G=async()=>{if(X)try{const _=await b.getRelease({input:{did:c.meta.did,projectId:l,releaseId:X}});if(p(!1),!_.release){F.error("Release not found");return}_.release=r2(_.release),s!=="view"&&(_.release.note=""),f(B=>x0({...B,..._.release,blockletVersion:s==="create"||s==="new-release"?Le.inc(_.release.blockletVersion,"patch"):_.release.blockletVersion},c)),m(_.release)}catch(_){p(!1),F.error(De(_))}},le=async()=>{if(l===J.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){F.error(i("blocklet.publish.errorTip.noDid"));return}try{const B=(await b.getProject({input:{did:c.meta.did,projectId:l}})).project||{};B.blockletVersion?(s==="create"||s==="new-release")&&Le.valid(B.blockletVersion)&&(B.blockletVersion=Le.inc(B.blockletVersion,"patch")):B.blockletVersion="1.0.0";const ye=x0(B,c);f(ye),B.lastReleaseId||me()}catch(_){F.error(De(_))}},$=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!X){F.error("Empty release id");return}await le(),await G();return}await le(),X&&(L(!0),await G())}finally{p(!1)}},[s,X]),Xe=_=>{f({blockletComponents:_})};R.useEffect(()=>{$()},[$]),R.useEffect(()=>{l===J.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&me()},[l,e,s,me]);const _e=R.useMemo(()=>!!Object.keys(I).find(_=>!!I[_].length),[I]);if(!u&&z)return o.jsx(Ge,{});if(!u)return null;const Ee=oe.find(_=>_.meta.did===ee);if(oe.every(_=>_.status!=="running")&&(oe!=null&&oe.length))return o.jsx(Se,{children:i("blocklet.publish.allComponentsNotRunning")});const Je=_=>{ae(_)},U=e==null?void 0:e.searchParams.get("resourcesTitle"),Z=e==null?void 0:e.searchParams.get("componentsTitle"),ue=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:U||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Z||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],a2=ue[Q]||ue[ue.length-1],Ce=m3[Q];return o.jsxs(v3,{...t,children:[o.jsx(t2,{blocklet:c,release:d,getData:$,getRelease:G,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Y,isPublished:xe,loading:z,setLoading:p,initLogoUrl:V,releaseId:X,projectId:l,projectType:fe,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:A,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:D,setReleaseUsedLast:L,setRelease:m}),o.jsxs(y,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(y,{pt:3}),o.jsxs(y,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(s2,{steps:ue,loading:z,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Q,setActiveStep:re,projectId:l,resourcesUrlTitle:U,componentsUrlTitle:Z}),o.jsxs(y,{flex:"1",maxWidth:"720px",children:[!v&&Ce!=="introduction"&&o.jsxs(K,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[a2.label,Ce==="branding"&&o.jsx(ge,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(y,{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(N2,{})})})]}),(v||Ce==="branding")&&o.jsx(y,{flexDirection:"column",children:o.jsx(J0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:a,blocklet:c,initUrl:e,loading:z,setLoading:p,paramsErrTip:x,readOnly:Y,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(y,{flexDirection:"column",children:o.jsx(n1,{loading:z,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Y})}),(v||Ce==="introduction")&&o.jsx(y,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(l2,{loading:z,readOnly:Y,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:ue[m0.resources].label}),o.jsx(y,{display:v||Ce==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(y,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(y,{sx:{flex:1},children:[o.jsxs(nt,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(f1,{value:"select",disabled:Y,control:o.jsx(l0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(f1,{value:"select",disabled:Y,control:o.jsx(l0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!a&&o.jsx(_2,{tabs:de,current:ee,onChange:Je,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx($1,{loading:z,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:W,setResourceComponentsMap:O,error:x.blockletResource,app:c,readOnly:Y,component:Ee,componentDid:a,initUrl:e,params:u,setParams:f,projectId:l===J.UNOWNED_DID?"":l,releaseUsedLast:D,release:{...d,id:X}})]}),!u.resourceFromSelect&&o.jsx(K1,{app:c,readOnly:Y,projectId:l===J.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:ue[m0.blocklets].label}),(v||Ce==="blocklets")&&o.jsx(y,{flexDirection:"column",children:o.jsx(y,{display:"flex",mt:3,className:"section full-width",children:o.jsx(y,{sx:{flex:1},children:o.jsx(V1,{projectType:fe,disabled:z||Y,app:c,value:(u==null?void 0:u.blockletComponents)||[],onChange:Xe,resourceRelateComponents:A,dependentComponentsMode:T})})})}),!v&&Ce==="version"&&o.jsx(y,{flexDirection:"column",children:o.jsx(n1,{loading:z,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Y})})]})]})]})]})}X1.propTypes={initUrl:h.object};X1.defaultProps={initUrl:null};const v3=ce.div`
|
|
181
|
+
`;function o2({text:e}){return e?o.jsx(Q2,{wrapperElement:{"data-color-mode":"light"},source:Y2.sanitize(e),rehypePlugins:[[Z2,{target:"_blank"}]]}):o.jsx(Se,{Icon:Ke})}o2.propTypes={text:h.string.isRequired};function l2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:a}){var x;const{t:i}=te(),[c,u]=R.useState(a?"preview":"write"),f=(g,z)=>{u(z)};return o.jsxs(y,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(y,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(K,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(V2,{value:c,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(t0,{value:"write",label:"Write"}),o.jsx(t0,{value:"preview",label:"Preview"})]})]}),o.jsx(y,{display:c==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Te,{disabled:s||a,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:a,endAdornment:o.jsxs(k1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ze.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,ze.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(y,{display:c==="preview"?"block":"none",mt:3,children:o.jsx(o2,{text:e.blockletIntroduction||""})})]})}l2.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 W1={},d3=Ie;Object.defineProperty(W1,"__esModule",{value:!0});var n2=W1.default=void 0,u3=d3(ke()),f0=o;n2=W1.default=(0,u3.default)([(0,f0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,f0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function G1({step:e,ok:t,active:l,error:s}){let r="grey.500",a=e+1;return t&&(a=o.jsx(et,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",a=o.jsx(n2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(y,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:a})}G1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};G1.defaultProps={step:0,ok:!1,active:0,error:""};function s2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:a,paramsErrTip:i,viewMode:c,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},z=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=c||Y0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(y,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(ot,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=a||!a3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=a?"":z(m);return C&&(b.optional=o.jsx(K,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(lt,{children:[o.jsx(Rt,{icon:o.jsx(G1,{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(K,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(It,{children:[o.jsx(K,{fontSize:12,children:d.description}),!p&&o.jsx(y,{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(w1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(K,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}s2.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 p3=[".zip",".gz"],h3=1024*1024*100,f3=R.lazy(()=>S0(()=>import("./index-ypT3GfN-.js").then(e=>e.i),__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,48,49,50,51,52,53,54,55,56,57])).then(e=>({default:e.Uploader})));function K1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:a,error:i}){const{t:c}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===J.UNOWNED_DID?(F.error(c("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(y,{sx:{mt:3},children:[o.jsx(K,{gutterBottom:!0,children:c("blocklet.publish.resourceUpload")}),o.jsxs(Be,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(K,{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?c("common.change"):c("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Ge,{}),children:o.jsx(f3,{ref:u,popup:!0,onUploadFinish:g=>{var z;r({uploadedResource:g.data.filename}),a({blockletResource:""}),(z=u.current)==null||z.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:p3,maxFileSize:h3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(y,{color:"error.main",mt:1,fontSize:14,children:i})]})}K1.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};K1.defaultProps={};function n1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:a}){var c;const{t:i}=te();return o.jsx(y,{display:"flex",mt:3,className:"section",children:o.jsxs(y,{sx:{flex:1},children:[o.jsx(Te,{required:!0,disabled:a||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(Te,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:a||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(k1,{position:"end",children:[((c=t==null?void 0:t.note)==null?void 0:c.length)||0," / ",ze.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,ze.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}n1.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};n1.defaultProps={};function r2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&r2(e[t]);return e}const x3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(y,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(z1,{size:24,blocklet:t,ancestors:l}),o.jsx(y,{ml:"4px",className:"text",children:o.jsx(y,{children:t.meta.title})})]},s),value:s})},x0=(e,t)=>{const l=j1(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},m3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},m0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function X1({initUrl:e,...t}){var J1;const{projectId:l,mode:s,releaseId:r,componentDid:a=""}=r1(),{t:i}=te(),{blocklet:c}=Ne(),[u,f]=Pe({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Pe({}),[z,p]=R.useState(!1),[d,m]=Pe(null),{api:b}=Re(),v=We(_=>_.breakpoints.down("md")),[C,S]=R.useState({}),[D,L]=R.useState(!1),P=R.useRef({}),[I,q]=Pe({}),[V,M]=R.useState(""),[k,N]=Pe({}),T=e==null?void 0:e.searchParams.get("dependentComponentsMode"),E=T==="readonly",A=R.useMemo(()=>{const _={};return Object.keys(k).forEach(B=>{const ye=k[B];ye&&ye.forEach(c2=>{_[c2]=!0})}),_},[k]),O=R.useCallback(_=>{E&&f({blockletComponents:[]}),N(_)},[E,N,f]),W=R.useCallback((..._)=>{q(..._),g({blockletResource:""})},[]),X=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Q,re]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const fe=R.useMemo(()=>{var _;return(_=u==null?void 0:u.blockletComponents)!=null&&_.some(B=>B.included)||Object.keys(A).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,A]),de=[],oe=((c==null?void 0:c.children)||[]).filter(_=>{var B;return(B=_.meta.resource)==null?void 0:B.exportApi}).filter(_=>!a||_.meta.did===a);oe.forEach(_=>{x3({tabs:de,blocklet:_,t:i,ancestors:[c]})});const[ee,ae]=R.useState((J1=de[0])==null?void 0:J1.value),xe=!D&&(d==null?void 0:d.status)==="published",Y=xe,me=y2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(B=>{var ye;return{...B,blockletTitle:(B==null?void 0:B.blockletTitle)||e.searchParams.get("title"),blockletDescription:(B==null?void 0:B.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(B==null?void 0:B.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(ye=B==null?void 0:B.blockletComponents)!=null&&ye.length?B==null?void 0:B.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(B==null?void 0:B.note)||e.searchParams.get("note")||"No note"}});const _=e.searchParams.get("resources");try{const B=JSON.parse(_);S(B)}catch{}}),G=async()=>{if(X)try{const _=await b.getRelease({input:{did:c.meta.did,projectId:l,releaseId:X}});if(p(!1),!_.release){F.error("Release not found");return}_.release=r2(_.release),s!=="view"&&(_.release.note=""),f(B=>x0({...B,..._.release,blockletVersion:s==="create"||s==="new-release"?Le.inc(_.release.blockletVersion,"patch"):_.release.blockletVersion},c)),m(_.release)}catch(_){p(!1),F.error(De(_))}},le=async()=>{if(l===J.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){F.error(i("blocklet.publish.errorTip.noDid"));return}try{const B=(await b.getProject({input:{did:c.meta.did,projectId:l}})).project||{};B.blockletVersion?(s==="create"||s==="new-release")&&Le.valid(B.blockletVersion)&&(B.blockletVersion=Le.inc(B.blockletVersion,"patch")):B.blockletVersion="1.0.0";const ye=x0(B,c);f(ye),B.lastReleaseId||me()}catch(_){F.error(De(_))}},$=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!X){F.error("Empty release id");return}await le(),await G();return}await le(),X&&(L(!0),await G())}finally{p(!1)}},[s,X]),Xe=_=>{f({blockletComponents:_})};R.useEffect(()=>{$()},[$]),R.useEffect(()=>{l===J.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&me()},[l,e,s,me]);const _e=R.useMemo(()=>!!Object.keys(I).find(_=>!!I[_].length),[I]);if(!u&&z)return o.jsx(Ge,{});if(!u)return null;const Ee=oe.find(_=>_.meta.did===ee);if(oe.every(_=>_.status!=="running")&&(oe!=null&&oe.length))return o.jsx(Se,{children:i("blocklet.publish.allComponentsNotRunning")});const Je=_=>{ae(_)},U=e==null?void 0:e.searchParams.get("resourcesTitle"),Z=e==null?void 0:e.searchParams.get("componentsTitle"),ue=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:U||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Z||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],a2=ue[Q]||ue[ue.length-1],Ce=m3[Q];return o.jsxs(v3,{...t,children:[o.jsx(t2,{blocklet:c,release:d,getData:$,getRelease:G,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Y,isPublished:xe,loading:z,setLoading:p,initLogoUrl:V,releaseId:X,projectId:l,projectType:fe,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:A,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:D,setReleaseUsedLast:L,setRelease:m}),o.jsxs(y,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(y,{pt:3}),o.jsxs(y,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(s2,{steps:ue,loading:z,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Q,setActiveStep:re,projectId:l,resourcesUrlTitle:U,componentsUrlTitle:Z}),o.jsxs(y,{flex:"1",maxWidth:"720px",children:[!v&&Ce!=="introduction"&&o.jsxs(K,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[a2.label,Ce==="branding"&&o.jsx(ge,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(y,{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(N2,{})})})]}),(v||Ce==="branding")&&o.jsx(y,{flexDirection:"column",children:o.jsx(J0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:a,blocklet:c,initUrl:e,loading:z,setLoading:p,paramsErrTip:x,readOnly:Y,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(y,{flexDirection:"column",children:o.jsx(n1,{loading:z,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Y})}),(v||Ce==="introduction")&&o.jsx(y,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(l2,{loading:z,readOnly:Y,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:ue[m0.resources].label}),o.jsx(y,{display:v||Ce==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(y,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(y,{sx:{flex:1},children:[o.jsxs(nt,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(f1,{value:"select",disabled:Y,control:o.jsx(l0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(f1,{value:"select",disabled:Y,control:o.jsx(l0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!a&&o.jsx(_2,{tabs:de,current:ee,onChange:Je,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx($1,{loading:z,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:W,setResourceComponentsMap:O,error:x.blockletResource,app:c,readOnly:Y,component:Ee,componentDid:a,initUrl:e,params:u,setParams:f,projectId:l===J.UNOWNED_DID?"":l,releaseUsedLast:D,release:{...d,id:X}})]}),!u.resourceFromSelect&&o.jsx(K1,{app:c,readOnly:Y,projectId:l===J.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:ue[m0.blocklets].label}),(v||Ce==="blocklets")&&o.jsx(y,{flexDirection:"column",children:o.jsx(y,{display:"flex",mt:3,className:"section full-width",children:o.jsx(y,{sx:{flex:1},children:o.jsx(V1,{projectType:fe,disabled:z||Y,app:c,value:(u==null?void 0:u.blockletComponents)||[],onChange:Xe,resourceRelateComponents:A,dependentComponentsMode:T})})})}),!v&&Ce==="version"&&o.jsx(y,{flexDirection:"column",children:o.jsx(n1,{loading:z,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Y})})]})]})]})]})}X1.propTypes={initUrl:h.object};X1.defaultProps={initUrl:null};const v3=ce.div`
|
|
182
182
|
.section {
|
|
183
183
|
&.full-width {
|
|
184
184
|
max-width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aG as ve,aH as me,aI as X,cR as $e,aJ as He,aM as p,r as d,aK as Se,aL as ae,aO as L,j as u,aP as ge,av as Ae,cM as at,cS as Oe,cT as Xe,cU as De,aN as se,al as it,cV as fe,cW as ct,bv as dt,bE as F,P as W}from"./index-B9_-R0J9.js";let K;function _e(){if(K)return K;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),K="reverse",e.scrollLeft>0?K="default":(e.scrollLeft=1,e.scrollLeft===0&&(K="negative")),document.body.removeChild(e),K}function ut(e,t){const l=e.scrollLeft;if(t!=="rtl")return l;switch(_e()){case"negative":return e.scrollWidth-e.clientWidth+l;case"reverse":return e.scrollWidth-e.clientWidth-l;default:return l}}function bt(e){return me("MuiTab",e)}const k=ve("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),pt=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ft=e=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=e,g={root:["root",a&&v&&"labelIcon",`textColor${He(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return ge(g,bt,t)},ht=X($e,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${He(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${k.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>p({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),xe=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:y,onChange:m,onClick:w,onFocus:j,selected:T,selectionFollowsFocus:x,textColor:D="inherit",value:R,wrapped:ie=!1}=s,_=ae(s,pt),V=p({},s,{disabled:a,disableFocusRipple:v,selected:T,icon:!!b,iconPosition:g,label:!!y,fullWidth:h,textColor:D,wrapped:ie}),q=ft(V),$=b&&y&&d.isValidElement(b)?d.cloneElement(b,{className:L(q.iconWrapper,b.props.className)}):b,ee=E=>{!T&&m&&m(E,R),w&&w(E)},U=E=>{x&&!T&&m&&m(E,R),j&&j(E)};return u.jsxs(ht,p({focusRipple:!v,className:L(q.root,n),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:ee,onFocus:U,ownerState:V,tabIndex:T?0:-1},_,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[$,y]}):u.jsxs(d.Fragment,{children:[y,$]}),B]}))}),vt=Ae(u.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),mt=Ae(u.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function St(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function gt(e,t,l,s={},n=()=>{}){const{ease:a=St,duration:v=300}=s;let h=null;const b=t[e];let g=!1;const B=()=>{g=!0},y=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const w=Math.min(1,(m-h)/v);if(t[e]=a(w)*(l-b)+b,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(y)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(y),B)}const xt=["onChange"],yt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Ct(e){const{onChange:t}=e,l=ae(e,xt),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return at(()=>{const v=Oe(()=>{const b=s.current;a(),b!==s.current&&t(s.current)}),h=Xe(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[t]),d.useEffect(()=>{a(),t(s.current)},[t]),u.jsx("div",p({style:yt,ref:n},l))}function Bt(e){return me("MuiTabScrollButton",e)}const wt=ve("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Tt=["className","slots","slotProps","direction","orientation","disabled"],Mt=e=>{const{classes:t,orientation:l,disabled:s}=e;return ge({root:["root",l,s&&"disabled"]},Bt,t)},It=X($e,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.orientation&&t[l.orientation]]}})(({ownerState:e})=>p({width:40,flexShrink:0,opacity:.8,[`&.${wt.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Rt=d.forwardRef(function(t,l){var s,n;const a=Se({props:t,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=ae(a,Tt),y=De(),m=p({isRtl:y},a),w=Mt(m),j=(s=h.StartScrollButtonIcon)!=null?s:vt,T=(n=h.EndScrollButtonIcon)!=null?n:mt,x=se({elementType:j,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),D=se({elementType:T,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(It,p({component:"div",className:L(w.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(j,p({},x)):u.jsx(T,p({},D))}))});function Et(e){return me("MuiTabs",e)}const he=ve("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),zt=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ke=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Le=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ne=(e,t,l)=>{let s=!1,n=l(e,t);for(;n;){if(n===e.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(e,n);else{n.focus();return}}},Wt=e=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=e;return ge({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Et,b)},Pt=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${he.scrollButtons}`]:t.scrollButtons},{[`& .${he.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${he.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Nt=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})(({ownerState:e})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),kt=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})(({ownerState:e})=>p({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Lt=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Ft=X(Ct)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Fe={},ye=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTabs"}),n=it(),a=De(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:y,component:m="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:T,orientation:x="horizontal",ScrollButtonComponent:D=Rt,scrollButtons:R="auto",selectionFollowsFocus:ie,slots:_={},slotProps:V={},TabIndicatorProps:q={},TabScrollButtonProps:$={},textColor:ee="primary",value:U,variant:E="standard",visibleScrollbar:ce=!1}=s,Ke=ae(s,zt),M=E==="scrollable",C=x==="vertical",G=C?"scrollTop":"scrollLeft",te=C?"top":"left",oe=C?"bottom":"right",de=C?"clientHeight":"clientWidth",J=C?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:w,indicatorColor:j,orientation:x,vertical:C,scrollButtons:R,textColor:ee,variant:E,visibleScrollbar:ce,fixed:!M,hideScrollbar:M&&!ce,scrollableX:M&&!C,scrollableY:M&&C,centered:g&&!M,scrollButtonsHideMobile:!w}),P=Wt(H),Ye=se({elementType:_.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:H}),Ve=se({elementType:_.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:H}),[Ce,Ge]=d.useState(!1),[A,Be]=d.useState(Fe),[we,Je]=d.useState(!1),[Te,Qe]=d.useState(!1),[Me,Ze]=d.useState(!1),[Ie,et]=d.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,z=d.useRef(null),O=d.useRef(null),Ee=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ut(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=O.current.children;if(i.length>0){const f=i[Re.get(U)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},Q=fe(()=>{const{tabsMeta:o,tabMeta:r}=Ee();let c=0,i;if(C)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[J]:r?r[J]:0};if(isNaN(A[i])||isNaN(A[J]))Be(f);else{const S=Math.abs(A[i]-f[i]),I=Math.abs(A[J]-f[J]);(S>=1||I>=1)&&Be(f)}}),ue=(o,{animation:r=!0}={})=>{r?gt(G,z.current,o,{duration:n.transitions.duration.standard}):z.current[G]=o},ze=o=>{let r=z.current[G];C?r+=o:(r+=o*(a?-1:1),r*=a&&_e()==="reverse"?-1:1),ue(r)},We=()=>{const o=z.current[de];let r=0;const c=Array.from(O.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[de]>o){i===0&&(r=o);break}r+=f[de]}return r},tt=()=>{ze(-1*We())},ot=()=>{ze(We())},lt=d.useCallback(o=>{et({overflow:null,scrollbarWidth:o})},[]),rt=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Ft,{onChange:lt,className:L(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(R==="auto"&&(we||Te)||R===!0);return o.scrollButtonStart=c?u.jsx(D,p({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Ye},orientation:x,direction:a?"right":"left",onClick:tt,disabled:!we},$,{className:L(P.scrollButtons,$.className)})):null,o.scrollButtonEnd=c?u.jsx(D,p({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ve},orientation:x,direction:a?"left":"right",onClick:ot,disabled:!Te},$,{className:L(P.scrollButtons,$.className)})):null,o},Pe=fe(o=>{const{tabsMeta:r,tabMeta:c}=Ee();if(!(!c||!r)){if(c[te]<r[te]){const i=r[G]+(c[te]-r[te]);ue(i,{animation:o})}else if(c[oe]>r[oe]){const i=r[G]+(c[oe]-r[oe]);ue(i,{animation:o})}}}),le=fe(()=>{M&&R!==!1&&Ze(!Me)});d.useEffect(()=>{const o=Oe(()=>{z.current&&Q()});let r;const c=S=>{S.forEach(I=>{I.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),I.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),le()},i=Xe(z.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(O.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(O.current,{childList:!0})),()=>{var S,I;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(I=r)==null||I.disconnect()}},[Q,le]),d.useEffect(()=>{const o=Array.from(O.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&R!==!1){const c=o[0],i=o[r-1],f={root:z.current,threshold:.99},S=pe=>{Je(!pe[0].isIntersecting)},I=new IntersectionObserver(S,f);I.observe(c);const Z=pe=>{Qe(!pe[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{I.disconnect(),N.disconnect()}}},[M,R,Me,B==null?void 0:B.length]),d.useEffect(()=>{Ge(!0)},[]),d.useEffect(()=>{Q()}),d.useEffect(()=>{Pe(Fe!==A)},[Pe,A]),d.useImperativeHandle(b,()=>({updateIndicator:Q,updateScrollButtons:le}),[Q,le]);const Ne=u.jsx(Lt,p({},q,{className:L(P.indicator,q.className),ownerState:H,style:p({},A,q.style)}));let re=0;const nt=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?re:o.props.value;Re.set(r,re);const c=r===U;return re+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!Ce&&Ne,selected:c,selectionFollowsFocus:ie,onChange:T,textColor:ee,value:r},re===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),st=o=>{const r=O.current,c=ct(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),ne(r,c,Le);break;case S:o.preventDefault(),ne(r,c,ke);break;case"Home":o.preventDefault(),ne(r,null,ke);break;case"End":o.preventDefault(),ne(r,null,Le);break}},be=rt();return u.jsxs(Pt,p({className:L(P.root,y),ownerState:H,ref:l,as:m},Ke,{children:[be.scrollButtonStart,be.scrollbarSizeListener,u.jsxs(Nt,{className:P.scroller,ownerState:H,style:{overflow:Ie.overflow,[C?`margin${a?"Left":"Right"}`:"marginBottom"]:ce?void 0:-Ie.scrollbarWidth},ref:z,children:[u.jsx(kt,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:st,ref:O,role:"tablist",children:nt}),Ce&&Ne]}),be.scrollButtonEnd]}))}),je="index",Y={tabs:`${je}-tabs`,tab:`${je}-tab`},jt=dt(ye)(({theme:e})=>({[`& .${Y.tabs}`]:{},[`& .${Y.tab}`]:{fontSize:"0.875rem",[e.breakpoints.up("md")]:{fontSize:"1rem"}}}));function qe({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:F.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:F.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:F.lineBorderBase,color:F.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qe.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function Ue({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:F.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:F.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:F.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:F.foregroundsFgBase},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Ue.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function $t({tabs:e,current:t,onChange:l,...s}){return s.variant==="card"?u.jsx(qe,{...s,tabs:e,current:t,onChange:l}):s.variant==="line"?u.jsx(Ue,{...s,tabs:e,current:t,onChange:l}):u.jsx(jt,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[Y.tabs,s.className||""].join(" "),children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}$t.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};export{mt as K,$t as T,vt as a,ye as b,xe as c,_e as d,ut as g};
|
|
1
|
+
import{aG as ve,aH as me,aI as X,cR as $e,aJ as He,aM as p,r as d,aK as Se,aL as ae,aO as L,j as u,aP as ge,av as Ae,cM as at,cS as Oe,cT as Xe,cU as De,aN as se,al as it,cV as fe,cW as ct,bv as dt,bE as F,P as W}from"./index-DHUVZBwm.js";let K;function _e(){if(K)return K;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),K="reverse",e.scrollLeft>0?K="default":(e.scrollLeft=1,e.scrollLeft===0&&(K="negative")),document.body.removeChild(e),K}function ut(e,t){const l=e.scrollLeft;if(t!=="rtl")return l;switch(_e()){case"negative":return e.scrollWidth-e.clientWidth+l;case"reverse":return e.scrollWidth-e.clientWidth-l;default:return l}}function bt(e){return me("MuiTab",e)}const k=ve("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),pt=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ft=e=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=e,g={root:["root",a&&v&&"labelIcon",`textColor${He(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return ge(g,bt,t)},ht=X($e,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${He(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${k.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>p({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),xe=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:y,onChange:m,onClick:w,onFocus:j,selected:T,selectionFollowsFocus:x,textColor:D="inherit",value:R,wrapped:ie=!1}=s,_=ae(s,pt),V=p({},s,{disabled:a,disableFocusRipple:v,selected:T,icon:!!b,iconPosition:g,label:!!y,fullWidth:h,textColor:D,wrapped:ie}),q=ft(V),$=b&&y&&d.isValidElement(b)?d.cloneElement(b,{className:L(q.iconWrapper,b.props.className)}):b,ee=E=>{!T&&m&&m(E,R),w&&w(E)},U=E=>{x&&!T&&m&&m(E,R),j&&j(E)};return u.jsxs(ht,p({focusRipple:!v,className:L(q.root,n),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:ee,onFocus:U,ownerState:V,tabIndex:T?0:-1},_,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[$,y]}):u.jsxs(d.Fragment,{children:[y,$]}),B]}))}),vt=Ae(u.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),mt=Ae(u.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function St(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function gt(e,t,l,s={},n=()=>{}){const{ease:a=St,duration:v=300}=s;let h=null;const b=t[e];let g=!1;const B=()=>{g=!0},y=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const w=Math.min(1,(m-h)/v);if(t[e]=a(w)*(l-b)+b,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(y)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(y),B)}const xt=["onChange"],yt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Ct(e){const{onChange:t}=e,l=ae(e,xt),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return at(()=>{const v=Oe(()=>{const b=s.current;a(),b!==s.current&&t(s.current)}),h=Xe(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[t]),d.useEffect(()=>{a(),t(s.current)},[t]),u.jsx("div",p({style:yt,ref:n},l))}function Bt(e){return me("MuiTabScrollButton",e)}const wt=ve("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Tt=["className","slots","slotProps","direction","orientation","disabled"],Mt=e=>{const{classes:t,orientation:l,disabled:s}=e;return ge({root:["root",l,s&&"disabled"]},Bt,t)},It=X($e,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.orientation&&t[l.orientation]]}})(({ownerState:e})=>p({width:40,flexShrink:0,opacity:.8,[`&.${wt.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Rt=d.forwardRef(function(t,l){var s,n;const a=Se({props:t,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=ae(a,Tt),y=De(),m=p({isRtl:y},a),w=Mt(m),j=(s=h.StartScrollButtonIcon)!=null?s:vt,T=(n=h.EndScrollButtonIcon)!=null?n:mt,x=se({elementType:j,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),D=se({elementType:T,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(It,p({component:"div",className:L(w.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(j,p({},x)):u.jsx(T,p({},D))}))});function Et(e){return me("MuiTabs",e)}const he=ve("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),zt=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ke=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Le=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ne=(e,t,l)=>{let s=!1,n=l(e,t);for(;n;){if(n===e.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(e,n);else{n.focus();return}}},Wt=e=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=e;return ge({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Et,b)},Pt=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${he.scrollButtons}`]:t.scrollButtons},{[`& .${he.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${he.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Nt=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})(({ownerState:e})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),kt=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})(({ownerState:e})=>p({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Lt=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Ft=X(Ct)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Fe={},ye=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTabs"}),n=it(),a=De(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:y,component:m="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:T,orientation:x="horizontal",ScrollButtonComponent:D=Rt,scrollButtons:R="auto",selectionFollowsFocus:ie,slots:_={},slotProps:V={},TabIndicatorProps:q={},TabScrollButtonProps:$={},textColor:ee="primary",value:U,variant:E="standard",visibleScrollbar:ce=!1}=s,Ke=ae(s,zt),M=E==="scrollable",C=x==="vertical",G=C?"scrollTop":"scrollLeft",te=C?"top":"left",oe=C?"bottom":"right",de=C?"clientHeight":"clientWidth",J=C?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:w,indicatorColor:j,orientation:x,vertical:C,scrollButtons:R,textColor:ee,variant:E,visibleScrollbar:ce,fixed:!M,hideScrollbar:M&&!ce,scrollableX:M&&!C,scrollableY:M&&C,centered:g&&!M,scrollButtonsHideMobile:!w}),P=Wt(H),Ye=se({elementType:_.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:H}),Ve=se({elementType:_.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:H}),[Ce,Ge]=d.useState(!1),[A,Be]=d.useState(Fe),[we,Je]=d.useState(!1),[Te,Qe]=d.useState(!1),[Me,Ze]=d.useState(!1),[Ie,et]=d.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,z=d.useRef(null),O=d.useRef(null),Ee=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ut(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=O.current.children;if(i.length>0){const f=i[Re.get(U)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},Q=fe(()=>{const{tabsMeta:o,tabMeta:r}=Ee();let c=0,i;if(C)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[J]:r?r[J]:0};if(isNaN(A[i])||isNaN(A[J]))Be(f);else{const S=Math.abs(A[i]-f[i]),I=Math.abs(A[J]-f[J]);(S>=1||I>=1)&&Be(f)}}),ue=(o,{animation:r=!0}={})=>{r?gt(G,z.current,o,{duration:n.transitions.duration.standard}):z.current[G]=o},ze=o=>{let r=z.current[G];C?r+=o:(r+=o*(a?-1:1),r*=a&&_e()==="reverse"?-1:1),ue(r)},We=()=>{const o=z.current[de];let r=0;const c=Array.from(O.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[de]>o){i===0&&(r=o);break}r+=f[de]}return r},tt=()=>{ze(-1*We())},ot=()=>{ze(We())},lt=d.useCallback(o=>{et({overflow:null,scrollbarWidth:o})},[]),rt=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Ft,{onChange:lt,className:L(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(R==="auto"&&(we||Te)||R===!0);return o.scrollButtonStart=c?u.jsx(D,p({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Ye},orientation:x,direction:a?"right":"left",onClick:tt,disabled:!we},$,{className:L(P.scrollButtons,$.className)})):null,o.scrollButtonEnd=c?u.jsx(D,p({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ve},orientation:x,direction:a?"left":"right",onClick:ot,disabled:!Te},$,{className:L(P.scrollButtons,$.className)})):null,o},Pe=fe(o=>{const{tabsMeta:r,tabMeta:c}=Ee();if(!(!c||!r)){if(c[te]<r[te]){const i=r[G]+(c[te]-r[te]);ue(i,{animation:o})}else if(c[oe]>r[oe]){const i=r[G]+(c[oe]-r[oe]);ue(i,{animation:o})}}}),le=fe(()=>{M&&R!==!1&&Ze(!Me)});d.useEffect(()=>{const o=Oe(()=>{z.current&&Q()});let r;const c=S=>{S.forEach(I=>{I.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),I.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),le()},i=Xe(z.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(O.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(O.current,{childList:!0})),()=>{var S,I;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(I=r)==null||I.disconnect()}},[Q,le]),d.useEffect(()=>{const o=Array.from(O.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&R!==!1){const c=o[0],i=o[r-1],f={root:z.current,threshold:.99},S=pe=>{Je(!pe[0].isIntersecting)},I=new IntersectionObserver(S,f);I.observe(c);const Z=pe=>{Qe(!pe[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{I.disconnect(),N.disconnect()}}},[M,R,Me,B==null?void 0:B.length]),d.useEffect(()=>{Ge(!0)},[]),d.useEffect(()=>{Q()}),d.useEffect(()=>{Pe(Fe!==A)},[Pe,A]),d.useImperativeHandle(b,()=>({updateIndicator:Q,updateScrollButtons:le}),[Q,le]);const Ne=u.jsx(Lt,p({},q,{className:L(P.indicator,q.className),ownerState:H,style:p({},A,q.style)}));let re=0;const nt=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?re:o.props.value;Re.set(r,re);const c=r===U;return re+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!Ce&&Ne,selected:c,selectionFollowsFocus:ie,onChange:T,textColor:ee,value:r},re===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),st=o=>{const r=O.current,c=ct(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),ne(r,c,Le);break;case S:o.preventDefault(),ne(r,c,ke);break;case"Home":o.preventDefault(),ne(r,null,ke);break;case"End":o.preventDefault(),ne(r,null,Le);break}},be=rt();return u.jsxs(Pt,p({className:L(P.root,y),ownerState:H,ref:l,as:m},Ke,{children:[be.scrollButtonStart,be.scrollbarSizeListener,u.jsxs(Nt,{className:P.scroller,ownerState:H,style:{overflow:Ie.overflow,[C?`margin${a?"Left":"Right"}`:"marginBottom"]:ce?void 0:-Ie.scrollbarWidth},ref:z,children:[u.jsx(kt,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:st,ref:O,role:"tablist",children:nt}),Ce&&Ne]}),be.scrollButtonEnd]}))}),je="index",Y={tabs:`${je}-tabs`,tab:`${je}-tab`},jt=dt(ye)(({theme:e})=>({[`& .${Y.tabs}`]:{},[`& .${Y.tab}`]:{fontSize:"0.875rem",[e.breakpoints.up("md")]:{fontSize:"1rem"}}}));function qe({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:F.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:F.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:F.lineBorderBase,color:F.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qe.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function Ue({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:F.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:F.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:F.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:F.foregroundsFgBase},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Ue.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function $t({tabs:e,current:t,onChange:l,...s}){return s.variant==="card"?u.jsx(qe,{...s,tabs:e,current:t,onChange:l}):s.variant==="line"?u.jsx(Ue,{...s,tabs:e,current:t,onChange:l}):u.jsx(jt,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[Y.tabs,s.className||""].join(" "),children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}$t.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};export{mt as K,$t as T,vt as a,ye as b,xe as c,_e as d,ut as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as _e,aH as Ae,r as x,aI as Oe,cR as nt,aJ as ae,aM as M,cQ as se,aL as me,g4 as at,aK as We,j as e,aO as Me,aP as Ee,P as B,Q as it,dd as Re,k as lt,B as T,T as A,b9 as ct,aR as _,u as H,aw as U,a3 as $,n as E,a0 as V,bn as Z,c1 as Q,go as Ge,aE as W,t as N,a_ as dt,dF as ut,fu as pt,aa as ft,ac as mt,Z as ht,$ as gt,G as ge,aV as qe,aX as ee,gp as Ie,eM as xt,gq as yt,a as oe,a2 as He,a1 as vt,g0 as jt}from"./index-B9_-R0J9.js";import{d as xe}from"./Add-Be5NIjqx.js";import{S as re}from"./index-DfgI3LpD.js";import{S as Ct}from"./Skeleton-Be8s3-r3.js";import{d as ie}from"./EditIcon-Bu2AC825.js";import{d as bt}from"./LockIcon-C56JTlvs.js";import{L as ye,S as ve,d as Tt}from"./list-header-Ctq6LcI7.js";import{t as St}from"./trim-h1uVcGOT.js";import{u as Y}from"./dashboard-verrE6SB.js";import{w as G,P as ze}from"./permission-CeDHz8z1.js";import{C as je}from"./confirm-BU1Cx5fg.js";import{T as O,F as Ue}from"./TextField-IWXyq9WX.js";import{d as Ve,O as Ke}from"./Select-D2LyB2yK.js";import{g as Bt}from"./ButtonGroup-dnetDbaM.js";import{D as Pt}from"./DialogContentText-CtUy42Wy.js";import{A as wt}from"./Alert-BbtKi3v1.js";import{f as X}from"./format-error-ChzZD3Gi.js";import{F as Ft}from"./FormControlLabel-vyMASWw0.js";import{C as Rt}from"./MoreVert-CSIMTgso.js";import{C as It}from"./Google-DfCiJ8zV.js";import{E as Ce}from"./index-C_f5JLr-.js";import{W as Ze}from"./did-address-DxAwQT37.js";import{T as zt}from"./index-ZEuzv_ea.js";import{_ as kt}from"./useSetState-BAfQWGEm.js";import{I as Dt}from"./InputAdornment-Co2MX07D.js";import"./ExpandMore-CkVLrKqo.js";import"./Search-BSiUJ455.js";import"./index-s6wI6FUq.js";import"./useLocalStorage-B1FI1_4T.js";import"./Delete-9I7Wb-WZ.js";import"./PlayArrow-DY1-OXZN.js";import"./RadioGroup-DoFdHdBb.js";import"./FormGroup-YyKrx4Oj.js";import"./useFormControl-DjmOtdAs.js";import"./Avatar-lahBxqDM.js";import"./useSlot-CDCF2If3.js";import"./session-5gd2ZUTN.js";import"./Link-DSnY6X1i.js";import"./fallback-D_QDGttC.js";import"./index-CaCM1SNQ.js";import"./Menu-jAkaRAOt.js";import"./Toolbar-CTacdb76.js";import"./Hidden-DNna1408.js";import"./index-CsMWyT7N.js";import"./ListItemButton-tIC8aee6.js";import"./selector-BDN3xrV-.js";import"./deprecate-CcOeD5NI.js";import"./useAsync-BN1R2ebD.js";import"./FormControl-BmbbFW7j.js";import"./Stack-C3ImIxEz.js";function $t(t){return Ae("MuiToggleButton",t)}const K=_e("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Qe=x.createContext({}),Ye=x.createContext(void 0);function Nt(t,i){return i===void 0||t===void 0?!1:Array.isArray(i)?i.indexOf(t)>=0:t===i}const Lt=["value"],_t=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],At=t=>{const{classes:i,fullWidth:l,selected:d,disabled:f,size:u,color:h}=t,s={root:["root",d&&"selected",f&&"disabled",l&&"fullWidth",`size${ae(u)}`,h]};return Ee(s,$t,i)},Ot=Oe(nt,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,i)=>{const{ownerState:l}=t;return[i.root,i[`size${ae(l.size)}`]]}})(({theme:t,ownerState:i})=>{let l=i.color==="standard"?t.palette.text.primary:t.palette[i.color].main,d;return t.vars&&(l=i.color==="standard"?t.vars.palette.text.primary:t.vars.palette[i.color].main,d=i.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[i.color].mainChannel),M({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},i.fullWidth&&{width:"100%"},{[`&.${K.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:se(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${K.selected}`]:{color:l,backgroundColor:t.vars?`rgba(${d} / ${t.vars.palette.action.selectedOpacity})`:se(l,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${d} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:se(l,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${d} / ${t.vars.palette.action.selectedOpacity})`:se(l,t.palette.action.selectedOpacity)}}}},i.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},i.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),J=x.forwardRef(function(i,l){const d=x.useContext(Qe),{value:f}=d,u=me(d,Lt),h=x.useContext(Ye),s=at(M({},u,{selected:Nt(i.value,f)}),i),p=We({props:s,name:"MuiToggleButton"}),{children:r,className:n,color:o="standard",disabled:a=!1,disableFocusRipple:c=!1,fullWidth:j=!1,onChange:y,onClick:m,selected:C,size:g="medium",value:b}=p,v=me(p,_t),P=M({},p,{color:o,disabled:a,disableFocusRipple:c,fullWidth:j,size:g}),F=At(P),z=w=>{m&&(m(w,b),w.defaultPrevented)||y&&y(w,b)},S=h||"";return e.jsx(Ot,M({className:Me(u.className,F.root,n,S),disabled:a,focusRipple:!c,ref:l,onClick:z,onChange:y,value:b,ownerState:P,"aria-pressed":C},v,{children:r}))});function Wt(t){return Ae("MuiToggleButtonGroup",t)}const I=_e("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),Mt=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],Et=t=>{const{classes:i,orientation:l,fullWidth:d,disabled:f}=t,u={root:["root",l==="vertical"&&"vertical",d&&"fullWidth"],grouped:["grouped",`grouped${ae(l)}`,f&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Ee(u,Wt,i)},Gt=Oe("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,i)=>{const{ownerState:l}=t;return[{[`& .${I.grouped}`]:i.grouped},{[`& .${I.grouped}`]:i[`grouped${ae(l.orientation)}`]},{[`& .${I.firstButton}`]:i.firstButton},{[`& .${I.lastButton}`]:i.lastButton},{[`& .${I.middleButton}`]:i.middleButton},i.root,l.orientation==="vertical"&&i.vertical,l.fullWidth&&i.fullWidth]}})(({ownerState:t,theme:i})=>M({display:"inline-flex",borderRadius:(i.vars||i).shape.borderRadius},t.orientation==="vertical"&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{[`& .${I.grouped}`]:M({},t.orientation==="horizontal"?{[`&.${I.selected} + .${I.grouped}.${I.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${I.selected} + .${I.grouped}.${I.selected}`]:{borderTop:0,marginTop:0}})},t.orientation==="horizontal"?{[`& .${I.firstButton},& .${I.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${I.lastButton},& .${I.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${I.firstButton},& .${I.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${I.lastButton},& .${I.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},t.orientation==="horizontal"?{[`& .${I.lastButton}.${K.disabled},& .${I.middleButton}.${K.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${I.lastButton}.${K.disabled},& .${I.middleButton}.${K.disabled}`]:{borderTop:"1px solid transparent"}})),Je=x.forwardRef(function(i,l){const d=We({props:i,name:"MuiToggleButtonGroup"}),{children:f,className:u,color:h="standard",disabled:s=!1,exclusive:p=!1,fullWidth:r=!1,onChange:n,orientation:o="horizontal",size:a="medium",value:c}=d,j=me(d,Mt),y=M({},d,{disabled:s,fullWidth:r,orientation:o,size:a}),m=Et(y),C=x.useCallback((z,S)=>{if(!n)return;const w=c&&c.indexOf(S);let L;c&&w>=0?(L=c.slice(),L.splice(w,1)):L=c?c.concat(S):[S],n(z,L)},[n,c]),g=x.useCallback((z,S)=>{n&&n(z,c===S?null:S)},[n,c]),b=x.useMemo(()=>({className:m.grouped,onChange:p?g:C,value:c,size:a,fullWidth:r,color:h,disabled:s}),[m.grouped,p,g,C,c,a,r,h,s]),v=Bt(f),P=v.length,F=z=>{const S=z===0,w=z===P-1;return S&&w?"":S?m.firstButton:w?m.lastButton:m.middleButton};return e.jsx(Gt,M({role:"group",className:Me(m.root,u),ref:l,ownerState:y},j,{children:e.jsx(Qe.Provider,{value:b,children:v.map((z,S)=>e.jsx(Ye.Provider,{value:F(S),children:z},S))})}))});function ne({minFontSize:t,fontSize:i,children:l,sx:d,...f}){const u=x.useRef(null),h=x.useRef(null),s=it({fontSize:i,loading:!0,initialSize:void 0}),p=Re(u.current),r=Re(h.current);return x.useEffect(()=>{if(s.loading)if(i==="auto"){if(p&&!s.initialSize){const o=getComputedStyle(u.current).fontSize;s.initialSize=Number(o.replace("px","")),s.fontSize=s.initialSize}r&&p&&(r.width<p.width&&s.fontSize>t?s.fontSize--:s.loading=!1)}else s.loading=!1},[i,p==null?void 0:p.width,r==null?void 0:r.width]),lt(()=>i==="auto"?s.loading:!1,[i,s.loading])?e.jsxs(T,{ref:h,flex:1,children:[e.jsx(A,{...f,sx:d,noWrap:!0,children:e.jsx(Ct,{variant:"text",sx:{fontSize:"1rem"}})}),e.jsx(A,{ref:u,...f,sx:{...d,fontSize:`${s.fontSize}px !important`,position:"fixed",top:-1e3,left:-1e3},noWrap:!0,children:l})]}):e.jsx(A,{...f,sx:{...d,fontSize:`${s.fontSize}px !important`},children:l})}ne.propTypes={fontSize:B.oneOfType([B.string,B.number]),children:B.any.isRequired,minFontSize:B.number,sx:B.object};ne.defaultProps={fontSize:void 0,minFontSize:12,sx:{}};var be={};Object.defineProperty(be,"__esModule",{value:!0});var te=be.default=void 0;qt(x);var ke=e;function qt(t){return t&&t.__esModule?t:{default:t}}function De(t,i){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(t);i&&(d=d.filter(function(f){return Object.getOwnPropertyDescriptor(t,f).enumerable})),l.push.apply(l,d)}return l}function $e(t){for(var i=1;i<arguments.length;i++){var l=arguments[i]!=null?arguments[i]:{};i%2?De(Object(l),!0).forEach(function(d){Ht(t,d,l[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):De(Object(l)).forEach(function(d){Object.defineProperty(t,d,Object.getOwnPropertyDescriptor(l,d))})}return t}function Ht(t,i,l){return(i=Ut(i))in t?Object.defineProperty(t,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[i]=l,t}function Ut(t){var i=Vt(t,"string");return typeof i=="symbol"?i:i+""}function Vt(t,i){if(typeof t!="object"||!t)return t;var l=t[Symbol.toPrimitive];if(l!==void 0){var d=l.call(t,i||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(t)}var Te=function(i){return(0,ke.jsx)("svg",$e($e({},i),{},{children:(0,ke.jsx)("path",{d:"M8.438 4.313H8.25a.188.188 0 0 0 .188-.188v.188h7.124v-.188c0 .103.085.188.188.188h-.188V6h1.688V4.125c0-.827-.673-1.5-1.5-1.5h-7.5c-.827 0-1.5.673-1.5 1.5V6h1.688V4.312zM20.25 6H3.75a.75.75 0 0 0-.75.75v.75c0 .103.084.188.188.188h1.415l.579 12.257c.038.8.698 1.43 1.498 1.43h10.64c.802 0 1.46-.628 1.498-1.43l.579-12.258h1.416A.188.188 0 0 0 21 7.5v-.75a.75.75 0 0 0-.75-.75zm-3.11 13.688H6.86l-.567-12h11.414l-.567 12z"})}))};Te.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};Te.displayName="delete";te=be.default=Te;var Xe={exports:{}},et={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i={rotl:function(l,d){return l<<d|l>>>32-d},rotr:function(l,d){return l<<32-d|l>>>d},endian:function(l){if(l.constructor==Number)return i.rotl(l,8)&16711935|i.rotl(l,24)&4278255360;for(var d=0;d<l.length;d++)l[d]=i.endian(l[d]);return l},randomBytes:function(l){for(var d=[];l>0;l--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(l){for(var d=[],f=0,u=0;f<l.length;f++,u+=8)d[u>>>5]|=l[f]<<24-u%32;return d},wordsToBytes:function(l){for(var d=[],f=0;f<l.length*32;f+=8)d.push(l[f>>>5]>>>24-f%32&255);return d},bytesToHex:function(l){for(var d=[],f=0;f<l.length;f++)d.push((l[f]>>>4).toString(16)),d.push((l[f]&15).toString(16));return d.join("")},hexToBytes:function(l){for(var d=[],f=0;f<l.length;f+=2)d.push(parseInt(l.substr(f,2),16));return d},bytesToBase64:function(l){for(var d=[],f=0;f<l.length;f+=3)for(var u=l[f]<<16|l[f+1]<<8|l[f+2],h=0;h<4;h++)f*8+h*6<=l.length*8?d.push(t.charAt(u>>>6*(3-h)&63)):d.push("=");return d.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],f=0,u=0;f<l.length;u=++f%4)u!=0&&d.push((t.indexOf(l.charAt(f-1))&Math.pow(2,-2*u+8)-1)<<u*2|t.indexOf(l.charAt(f))>>>6-u*2);return d}};et.exports=i})();var Kt=et.exports,he={utf8:{stringToBytes:function(t){return he.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(he.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var i=[],l=0;l<t.length;l++)i.push(t.charCodeAt(l)&255);return i},bytesToString:function(t){for(var i=[],l=0;l<t.length;l++)i.push(String.fromCharCode(t[l]));return i.join("")}}},Ne=he;/*!
|
|
1
|
+
import{aG as _e,aH as Ae,r as x,aI as Oe,cR as nt,aJ as ae,aM as M,cQ as se,aL as me,g4 as at,aK as We,j as e,aO as Me,aP as Ee,P as B,Q as it,dd as Re,k as lt,B as T,T as A,b9 as ct,aR as _,u as H,aw as U,a3 as $,n as E,a0 as V,bn as Z,c1 as Q,go as Ge,aE as W,t as N,a_ as dt,dF as ut,fu as pt,aa as ft,ac as mt,Z as ht,$ as gt,G as ge,aV as qe,aX as ee,gp as Ie,eM as xt,gq as yt,a as oe,a2 as He,a1 as vt,g0 as jt}from"./index-DHUVZBwm.js";import{d as xe}from"./Add-BJ0-DmpB.js";import{S as re}from"./index-BcJiTODH.js";import{S as Ct}from"./Skeleton-C0c6JVcF.js";import{d as ie}from"./EditIcon-BAlDLZIL.js";import{d as bt}from"./LockIcon-BVoXTUNW.js";import{L as ye,S as ve,d as Tt}from"./list-header-yK0MoJlc.js";import{t as St}from"./trim-Bp21LaxQ.js";import{u as Y}from"./dashboard-DKmG24DX.js";import{w as G,P as ze}from"./permission-Cc_uhsxV.js";import{C as je}from"./confirm-B1Dlltx1.js";import{T as O,F as Ue}from"./TextField-CH-MPuwY.js";import{d as Ve,O as Ke}from"./Select-C0CAKSaj.js";import{g as Bt}from"./ButtonGroup-CaLh4rbJ.js";import{D as Pt}from"./DialogContentText-RK3HiWcQ.js";import{A as wt}from"./Alert-DHyghqS2.js";import{f as X}from"./format-error-BrCBQ7tH.js";import{F as Ft}from"./FormControlLabel-Dhb6u65W.js";import{C as Rt}from"./MoreVert-Bm8gI7fr.js";import{C as It}from"./Google-9meSA79P.js";import{E as Ce}from"./index-Cje4vX3R.js";import{W as Ze}from"./did-address-Bdzn0FI1.js";import{T as zt}from"./index-DlMDnAjH.js";import{_ as kt}from"./useSetState-CocBtBRb.js";import{I as Dt}from"./InputAdornment-oz-HYTcf.js";import"./ExpandMore-TPXNYn4i.js";import"./Search-B3yupqTW.js";import"./index-BiF39Tbb.js";import"./useLocalStorage-83XQrrF0.js";import"./Delete-nshOetuq.js";import"./PlayArrow-Cmy1JCVi.js";import"./RadioGroup-D0iCI3Eo.js";import"./FormGroup-B9jcG6zx.js";import"./useFormControl-Cf0kOJKh.js";import"./Avatar-ZE8kDNw1.js";import"./useSlot-CUe4vlUw.js";import"./session-D9OAJED-.js";import"./Link-C-7K49dY.js";import"./fallback-DRgH1dur.js";import"./index-EkNi2gEh.js";import"./Menu-DvE03HqE.js";import"./Toolbar-Muj5q0IZ.js";import"./Hidden-D-O5BO-G.js";import"./index-DGom8BRG.js";import"./ListItemButton-BBfLux7c.js";import"./selector-w9nsIhUC.js";import"./deprecate-C_5E7Bx8.js";import"./useAsync-WCoBmZYy.js";import"./FormControl-DzwnIqDl.js";import"./Stack-dwX_aIUB.js";function $t(t){return Ae("MuiToggleButton",t)}const K=_e("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Qe=x.createContext({}),Ye=x.createContext(void 0);function Nt(t,i){return i===void 0||t===void 0?!1:Array.isArray(i)?i.indexOf(t)>=0:t===i}const Lt=["value"],_t=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],At=t=>{const{classes:i,fullWidth:l,selected:d,disabled:f,size:u,color:h}=t,s={root:["root",d&&"selected",f&&"disabled",l&&"fullWidth",`size${ae(u)}`,h]};return Ee(s,$t,i)},Ot=Oe(nt,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,i)=>{const{ownerState:l}=t;return[i.root,i[`size${ae(l.size)}`]]}})(({theme:t,ownerState:i})=>{let l=i.color==="standard"?t.palette.text.primary:t.palette[i.color].main,d;return t.vars&&(l=i.color==="standard"?t.vars.palette.text.primary:t.vars.palette[i.color].main,d=i.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[i.color].mainChannel),M({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},i.fullWidth&&{width:"100%"},{[`&.${K.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:se(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${K.selected}`]:{color:l,backgroundColor:t.vars?`rgba(${d} / ${t.vars.palette.action.selectedOpacity})`:se(l,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${d} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:se(l,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${d} / ${t.vars.palette.action.selectedOpacity})`:se(l,t.palette.action.selectedOpacity)}}}},i.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},i.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),J=x.forwardRef(function(i,l){const d=x.useContext(Qe),{value:f}=d,u=me(d,Lt),h=x.useContext(Ye),s=at(M({},u,{selected:Nt(i.value,f)}),i),p=We({props:s,name:"MuiToggleButton"}),{children:r,className:n,color:o="standard",disabled:a=!1,disableFocusRipple:c=!1,fullWidth:j=!1,onChange:y,onClick:m,selected:C,size:g="medium",value:b}=p,v=me(p,_t),P=M({},p,{color:o,disabled:a,disableFocusRipple:c,fullWidth:j,size:g}),F=At(P),z=w=>{m&&(m(w,b),w.defaultPrevented)||y&&y(w,b)},S=h||"";return e.jsx(Ot,M({className:Me(u.className,F.root,n,S),disabled:a,focusRipple:!c,ref:l,onClick:z,onChange:y,value:b,ownerState:P,"aria-pressed":C},v,{children:r}))});function Wt(t){return Ae("MuiToggleButtonGroup",t)}const I=_e("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),Mt=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],Et=t=>{const{classes:i,orientation:l,fullWidth:d,disabled:f}=t,u={root:["root",l==="vertical"&&"vertical",d&&"fullWidth"],grouped:["grouped",`grouped${ae(l)}`,f&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Ee(u,Wt,i)},Gt=Oe("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,i)=>{const{ownerState:l}=t;return[{[`& .${I.grouped}`]:i.grouped},{[`& .${I.grouped}`]:i[`grouped${ae(l.orientation)}`]},{[`& .${I.firstButton}`]:i.firstButton},{[`& .${I.lastButton}`]:i.lastButton},{[`& .${I.middleButton}`]:i.middleButton},i.root,l.orientation==="vertical"&&i.vertical,l.fullWidth&&i.fullWidth]}})(({ownerState:t,theme:i})=>M({display:"inline-flex",borderRadius:(i.vars||i).shape.borderRadius},t.orientation==="vertical"&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{[`& .${I.grouped}`]:M({},t.orientation==="horizontal"?{[`&.${I.selected} + .${I.grouped}.${I.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${I.selected} + .${I.grouped}.${I.selected}`]:{borderTop:0,marginTop:0}})},t.orientation==="horizontal"?{[`& .${I.firstButton},& .${I.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${I.lastButton},& .${I.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${I.firstButton},& .${I.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${I.lastButton},& .${I.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},t.orientation==="horizontal"?{[`& .${I.lastButton}.${K.disabled},& .${I.middleButton}.${K.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${I.lastButton}.${K.disabled},& .${I.middleButton}.${K.disabled}`]:{borderTop:"1px solid transparent"}})),Je=x.forwardRef(function(i,l){const d=We({props:i,name:"MuiToggleButtonGroup"}),{children:f,className:u,color:h="standard",disabled:s=!1,exclusive:p=!1,fullWidth:r=!1,onChange:n,orientation:o="horizontal",size:a="medium",value:c}=d,j=me(d,Mt),y=M({},d,{disabled:s,fullWidth:r,orientation:o,size:a}),m=Et(y),C=x.useCallback((z,S)=>{if(!n)return;const w=c&&c.indexOf(S);let L;c&&w>=0?(L=c.slice(),L.splice(w,1)):L=c?c.concat(S):[S],n(z,L)},[n,c]),g=x.useCallback((z,S)=>{n&&n(z,c===S?null:S)},[n,c]),b=x.useMemo(()=>({className:m.grouped,onChange:p?g:C,value:c,size:a,fullWidth:r,color:h,disabled:s}),[m.grouped,p,g,C,c,a,r,h,s]),v=Bt(f),P=v.length,F=z=>{const S=z===0,w=z===P-1;return S&&w?"":S?m.firstButton:w?m.lastButton:m.middleButton};return e.jsx(Gt,M({role:"group",className:Me(m.root,u),ref:l,ownerState:y},j,{children:e.jsx(Qe.Provider,{value:b,children:v.map((z,S)=>e.jsx(Ye.Provider,{value:F(S),children:z},S))})}))});function ne({minFontSize:t,fontSize:i,children:l,sx:d,...f}){const u=x.useRef(null),h=x.useRef(null),s=it({fontSize:i,loading:!0,initialSize:void 0}),p=Re(u.current),r=Re(h.current);return x.useEffect(()=>{if(s.loading)if(i==="auto"){if(p&&!s.initialSize){const o=getComputedStyle(u.current).fontSize;s.initialSize=Number(o.replace("px","")),s.fontSize=s.initialSize}r&&p&&(r.width<p.width&&s.fontSize>t?s.fontSize--:s.loading=!1)}else s.loading=!1},[i,p==null?void 0:p.width,r==null?void 0:r.width]),lt(()=>i==="auto"?s.loading:!1,[i,s.loading])?e.jsxs(T,{ref:h,flex:1,children:[e.jsx(A,{...f,sx:d,noWrap:!0,children:e.jsx(Ct,{variant:"text",sx:{fontSize:"1rem"}})}),e.jsx(A,{ref:u,...f,sx:{...d,fontSize:`${s.fontSize}px !important`,position:"fixed",top:-1e3,left:-1e3},noWrap:!0,children:l})]}):e.jsx(A,{...f,sx:{...d,fontSize:`${s.fontSize}px !important`},children:l})}ne.propTypes={fontSize:B.oneOfType([B.string,B.number]),children:B.any.isRequired,minFontSize:B.number,sx:B.object};ne.defaultProps={fontSize:void 0,minFontSize:12,sx:{}};var be={};Object.defineProperty(be,"__esModule",{value:!0});var te=be.default=void 0;qt(x);var ke=e;function qt(t){return t&&t.__esModule?t:{default:t}}function De(t,i){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(t);i&&(d=d.filter(function(f){return Object.getOwnPropertyDescriptor(t,f).enumerable})),l.push.apply(l,d)}return l}function $e(t){for(var i=1;i<arguments.length;i++){var l=arguments[i]!=null?arguments[i]:{};i%2?De(Object(l),!0).forEach(function(d){Ht(t,d,l[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):De(Object(l)).forEach(function(d){Object.defineProperty(t,d,Object.getOwnPropertyDescriptor(l,d))})}return t}function Ht(t,i,l){return(i=Ut(i))in t?Object.defineProperty(t,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[i]=l,t}function Ut(t){var i=Vt(t,"string");return typeof i=="symbol"?i:i+""}function Vt(t,i){if(typeof t!="object"||!t)return t;var l=t[Symbol.toPrimitive];if(l!==void 0){var d=l.call(t,i||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(t)}var Te=function(i){return(0,ke.jsx)("svg",$e($e({},i),{},{children:(0,ke.jsx)("path",{d:"M8.438 4.313H8.25a.188.188 0 0 0 .188-.188v.188h7.124v-.188c0 .103.085.188.188.188h-.188V6h1.688V4.125c0-.827-.673-1.5-1.5-1.5h-7.5c-.827 0-1.5.673-1.5 1.5V6h1.688V4.312zM20.25 6H3.75a.75.75 0 0 0-.75.75v.75c0 .103.084.188.188.188h1.415l.579 12.257c.038.8.698 1.43 1.498 1.43h10.64c.802 0 1.46-.628 1.498-1.43l.579-12.258h1.416A.188.188 0 0 0 21 7.5v-.75a.75.75 0 0 0-.75-.75zm-3.11 13.688H6.86l-.567-12h11.414l-.567 12z"})}))};Te.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};Te.displayName="delete";te=be.default=Te;var Xe={exports:{}},et={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i={rotl:function(l,d){return l<<d|l>>>32-d},rotr:function(l,d){return l<<32-d|l>>>d},endian:function(l){if(l.constructor==Number)return i.rotl(l,8)&16711935|i.rotl(l,24)&4278255360;for(var d=0;d<l.length;d++)l[d]=i.endian(l[d]);return l},randomBytes:function(l){for(var d=[];l>0;l--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(l){for(var d=[],f=0,u=0;f<l.length;f++,u+=8)d[u>>>5]|=l[f]<<24-u%32;return d},wordsToBytes:function(l){for(var d=[],f=0;f<l.length*32;f+=8)d.push(l[f>>>5]>>>24-f%32&255);return d},bytesToHex:function(l){for(var d=[],f=0;f<l.length;f++)d.push((l[f]>>>4).toString(16)),d.push((l[f]&15).toString(16));return d.join("")},hexToBytes:function(l){for(var d=[],f=0;f<l.length;f+=2)d.push(parseInt(l.substr(f,2),16));return d},bytesToBase64:function(l){for(var d=[],f=0;f<l.length;f+=3)for(var u=l[f]<<16|l[f+1]<<8|l[f+2],h=0;h<4;h++)f*8+h*6<=l.length*8?d.push(t.charAt(u>>>6*(3-h)&63)):d.push("=");return d.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],f=0,u=0;f<l.length;u=++f%4)u!=0&&d.push((t.indexOf(l.charAt(f-1))&Math.pow(2,-2*u+8)-1)<<u*2|t.indexOf(l.charAt(f))>>>6-u*2);return d}};et.exports=i})();var Kt=et.exports,he={utf8:{stringToBytes:function(t){return he.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(he.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var i=[],l=0;l<t.length;l++)i.push(t.charCodeAt(l)&255);return i},bytesToString:function(t){for(var i=[],l=0;l<t.length;l++)i.push(String.fromCharCode(t[l]));return i.join("")}}},Ne=he;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as o,bv as h,B as p,P as i}from"./index-
|
|
1
|
+
import{r as d,j as o,bv as h,B as p,P as i}from"./index-DHUVZBwm.js";var a={};Object.defineProperty(a,"__esModule",{value:!0});var f=a.default=void 0;v(d);var c=o;function v(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(y){return Object.getOwnPropertyDescriptor(e,y).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(n){b(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b(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=g(e,"string");return typeof t=="symbol"?t:t+""}function g(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,c.jsx)("svg",u(u({},t),{},{children:(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.361 2.4a.8.8 0 0 0-.728.469L.873 15.54a.8.8 0 0 0-.072.33V27.393a.8.8 0 0 0 .8.8h28.8a.8.8 0 0 0 .8-.8v-11.52a.8.8 0 0 0-.072-.331L25.37 2.869a.8.8 0 0 0-.728-.47H7.361zm-4.96 14.4v9.792h27.2v-9.799a.814.814 0 0 1-.104.007h-7.098l-2.066 3.1a.8.8 0 0 1-.666.356h-8.064a.8.8 0 0 1-.665-.356L8.87 16.8h-6.47zm26.816-1.6H21.97a.8.8 0 0 0-.665.356l-2.067 3.1h-7.208l-2.066-3.1a.8.8 0 0 0-.666-.356H2.785L7.876 4h16.25l5.09 11.2z",fill:"currentColor"})}))};l.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};l.displayName="empty";f=a.default=l;const O=h(p)`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,bX as Q,dA as Z,j as o,bF as O,dB as z,P as n,dC as ee,dD as U,bv as b,bE as B,u as _,dE as q,B as y,aO as C,al as oe,I as D}from"./index-
|
|
1
|
+
import{r as $,bX as Q,dA as Z,j as o,bF as O,dB as z,P as n,dC as ee,dD as U,bv as b,bE as B,u as _,dE as q,B as y,aO as C,al as oe,I as D}from"./index-DHUVZBwm.js";import{E as W}from"./fallback-DRgH1dur.js";import{R as ne,N as te}from"./index-EkNi2gEh.js";import{i as re,u as ie,f as G,g as I,p as ae,m as K,a as se,b as le,H as ce,B as de}from"./index-DGom8BRG.js";import{d as pe}from"./ExpandMore-TPXNYn4i.js";import{A as S}from"./Avatar-ZE8kDNw1.js";function T({icon:e,size:t,sx:r,...a}){const i=[...Array.isArray(r)?r:[r]];t&&i.push({width:t,height:t});const[u,s]=$.useState(!1),[c,l]=$.useState(!0);if(Q(async()=>{l(!0);try{await Z(e),s(!0)}catch{s(!1)}l(!1)},[e]),a.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),re(e))return o.jsx(S,{component:"span",...a,src:e,sx:i});const d=t?.6*t+4:0;return c?o.jsx(O,{icon:"codicon:blank",height:d||void 0}):u?o.jsx(S,{component:"span",...a,sx:i,children:o.jsx(O,{icon:e,height:d||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),o.jsx(S,{component:"span",...a,sx:i,children:Array.from(e)[0]})):null}const ue=z();function A({theme:e,children:t}){const r=e?z(e):ue;return o.jsx(ee,{theme:r,children:t})}A.propTypes={children:n.any.isRequired,theme:n.object};A.defaultProps={theme:null};const fe=e=>{if(!(e!=null&&e.length))return{navItems:[],activeId:null};let t=1;const a=K(e,s=>{var d,p;const c=s.icon?o.jsx(T,{icon:s.icon}):null;if(s.items)return{id:`${t++}`,label:s.title,icon:c,children:s.items};let l={};return((d=s.link)!=null&&d.startsWith("http://")||(p=s.link)!=null&&p.startsWith("https://"))&&(l={target:"_blank",rel:"noreferrer"}),{id:`${t++}`,label:o.jsx("a",{href:s.link,...l,children:s.title}),icon:c,link:s.link}},"items"),i=se(a),u=le(i.map(s=>s.link));return{navItems:a,activeId:u>=0?i[u].id:null}};function he({meta:e={},addons:t,sessionManagerProps:r={showRole:!0},homeLink:a=ae,theme:i,hideNavMenu:u=!1,...s}){var h,N;ie();const{locale:c}=_()||{},l=$.useMemo(()=>{const w=Object.assign({},window.blocklet,e);try{return G(w)}catch(J){return console.error("Failed to format blocklet info",J,w),w}},[e]);if(!l.appName)return null;const{appLogo:d,appLogoRect:p,theme:m}=l,f=I((h=l==null?void 0:l.navigation)==null?void 0:h.header,c),k=fe(f),{navItems:g,activeId:v}=k,j=typeof t=="function"?w=>t(w,{navigation:k}):t,x=o.jsx(ce,{formattedBlocklet:l,addons:j,sessionManagerProps:r});return o.jsx(A,{theme:i,children:o.jsx(me,{homeLink:a,logo:o.jsx("img",{src:p||d,alt:"logo"}),addons:x,...q(s,["bordered"]),$bordered:s==null?void 0:s.bordered,$bgcolor:(N=m==null?void 0:m.background)==null?void 0:N.header,children:u||!(g!=null&&g.length)?null:({isMobile:w})=>o.jsx(te,{mode:w?"inline":"horizontal",activeId:v,items:g,className:"header-nav",bgColor:"transparent",textColor:"#777"})})})}const me=b(ne)`
|
|
2
2
|
${({$bgcolor:e})=>`background-color: ${e||"#fff"};`}
|
|
3
3
|
font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
|
|
4
4
|
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var dt=Object.defineProperty;var ht=(e,n,t)=>n in e?dt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var D=(e,n,t)=>ht(e,typeof n!="symbol"?n+"":n,t);import{P as f,r as j,Q as pt,l as gt,j as m,aE as mt,bF as be,bo as yt,bp as bt,dh as wt,ak as xt,bE as C,bm as It,B as St,di as vt,T as Tt,dj as Ct,dk as At,a3 as jt,dl as Pt,bC as Fe,u as ze,aF as kt,f as Lt,E as Mt}from"./index-
|
|
1
|
+
var dt=Object.defineProperty;var ht=(e,n,t)=>n in e?dt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var D=(e,n,t)=>ht(e,typeof n!="symbol"?n+"":n,t);import{P as f,r as j,Q as pt,l as gt,j as m,aE as mt,bF as be,bo as yt,bp as bt,dh as wt,ak as xt,bE as C,bm as It,B as St,di as vt,T as Tt,dj as Ct,dk as At,a3 as jt,dl as Pt,bC as Fe,u as ze,aF as kt,f as Lt,E as Mt}from"./index-DHUVZBwm.js";import{D as Et}from"./index-EkNi2gEh.js";import{L as Ot}from"./MoreVert-Bm8gI7fr.js";import{L as Rt}from"./ListItemButton-BBfLux7c.js";import{L as qt}from"./selector-w9nsIhUC.js";/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|