@abtnode/blocklet-services 1.16.29-beta-2eaf40bc → 1.16.29-beta-112566d5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/util/index.js +7 -0
- package/dist/assets/{Add-C5zWPWbi.js → Add-CY4Vajpf.js} +1 -1
- package/dist/assets/{AddBox-C4A7DDm4.js → AddBox-DeNDC_On.js} +1 -1
- package/dist/assets/{Alert-D91U5h--.js → Alert-X8Tf_Ya2.js} +1 -1
- package/dist/assets/{ArrowDropDown-Cq32DOpt.js → ArrowDropDown-B1ERiCZ6.js} +1 -1
- package/dist/assets/{Avatar-XXXVLUFk.js → Avatar-DzypDi2F.js} +1 -1
- package/dist/assets/{ButtonGroup-k3SZjeUa.js → ButtonGroup-Yl1SMoBq.js} +1 -1
- package/dist/assets/{CheckCircle-CbXxG2JL.js → CheckCircle-lTVG_pn6.js} +1 -1
- package/dist/assets/{ChevronRight-BKcNccG9.js → ChevronRight-yT0593W6.js} +1 -1
- package/dist/assets/{Close-CdBP5F4J.js → Close-DJPwlagN.js} +1 -1
- package/dist/assets/{CloseOutlined-Crg0BDr4.js → CloseOutlined-D1ZA66gd.js} +1 -1
- package/dist/assets/{Delete-DlfFien6.js → Delete-LnXfw8II.js} +1 -1
- package/dist/assets/{DeleteOutline-De4xAGvs.js → DeleteOutline-yfbdyPMw.js} +1 -1
- package/dist/assets/{Done-DO1tfb2_.js → Done-CegxfXGS.js} +1 -1
- package/dist/assets/{Download-CVseEK0o.js → Download-CbdL3-JP.js} +1 -1
- package/dist/assets/{Edit-DOJCHJ5p.js → Edit-mj0warXM.js} +1 -1
- package/dist/assets/{EditIcon-Bg4AkV00.js → EditIcon-BWMMTTyf.js} +1 -1
- package/dist/assets/{Error-CQmWghPs.js → Error-CnzO6x6f.js} +1 -1
- package/dist/assets/{ExpandMore-DD2GykPj.js → ExpandMore-BoZqCbU8.js} +1 -1
- package/dist/assets/{FilterList-QafrkXbd.js → FilterList-C75puMMo.js} +1 -1
- package/dist/assets/{FormControl-Kt4xANtI.js → FormControl-02YkGBiU.js} +1 -1
- package/dist/assets/{FormControlLabel-B6ISinfm.js → FormControlLabel-BZuIe-KU.js} +1 -1
- package/dist/assets/{FormGroup-BEMyIGSj.js → FormGroup-CUYWiNiM.js} +1 -1
- package/dist/assets/{Google-DGP2JaKw.js → Google-D6M8c4go.js} +1 -1
- package/dist/assets/{Hidden-kl5Tbw1B.js → Hidden-BtwYfeyy.js} +1 -1
- package/dist/assets/{InfoOutlined-BRuBRFbl.js → InfoOutlined-DzWheCe4.js} +1 -1
- package/dist/assets/{InputAdornment-C5IWgB4u.js → InputAdornment-B3Ml-Pew.js} +1 -1
- package/dist/assets/{InputLabel-DbdmcDbJ.js → InputLabel-D_H-0SoX.js} +1 -1
- package/dist/assets/{LastPage-DXISIPs8.js → LastPage-D-3vv4wE.js} +1 -1
- package/dist/assets/{Launch-CDcio2Tm.js → Launch-B0EjmiiU.js} +1 -1
- package/dist/assets/{LaunchOutlined-D8a8pCOt.js → LaunchOutlined-sgP85ul9.js} +1 -1
- package/dist/assets/{Link-DFzOJFD-.js → Link-1nuQkwqf.js} +1 -1
- package/dist/assets/{ListItemText-Bnnk7Gbj.js → ListItemText-Bn_r5n_z.js} +1 -1
- package/dist/assets/{LoadingButton-DGVicOWa.js → LoadingButton-D9fUIMmf.js} +1 -1
- package/dist/assets/{LockIcon-CTWJWfSc.js → LockIcon-CkuBg3Hn.js} +1 -1
- package/dist/assets/{Loop-CbV2fFUd.js → Loop-CIkJKfB9.js} +1 -1
- package/dist/assets/{MoreVert-er-bltGF.js → MoreVert-DhDSKiqk.js} +1 -1
- package/dist/assets/{OpenInNew-Bu6iI6eA.js → OpenInNew-DUIHrnXo.js} +1 -1
- package/dist/assets/{Pagination-Dz7kgZlB.js → Pagination-BlS75-dT.js} +1 -1
- package/dist/assets/{PlayArrow-2r36AAmk.js → PlayArrow-MoLzECrB.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-CoIXItlb.js → QuestionMarkCircle-D2W4KMR_.js} +1 -1
- package/dist/assets/{RadioGroup-C7j1KJ7y.js → RadioGroup-C3L5xJaa.js} +1 -1
- package/dist/assets/{Search-CMyGk9R2.js → Search-DTUqGlmf.js} +1 -1
- package/dist/assets/{Select-BeNQ99oP.js → Select-DCbRxmUU.js} +1 -1
- package/dist/assets/{ServerLogo-D12k9g2u.js → ServerLogo-BhzjzHzD.js} +1 -1
- package/dist/assets/{Skeleton-FXGSJdkA.js → Skeleton-5Ejh8uW9.js} +1 -1
- package/dist/assets/{Slider-GjDHfyBj.js → Slider-Cl86dPUi.js} +1 -1
- package/dist/assets/{Stepper-BF6lz4ut.js → Stepper-BFMAEaBf.js} +1 -1
- package/dist/assets/{TextField-D3XEyFR4.js → TextField-BHSEV3Ac.js} +1 -1
- package/dist/assets/{Toolbar-_9it32pJ.js → Toolbar-D3YIXjSy.js} +1 -1
- package/dist/assets/{ViewList-BhIE_M4V.js → ViewList-cURATctI.js} +1 -1
- package/dist/assets/{access-control-BWh_6uO-.js → access-control-D8X_8z7A.js} +1 -1
- package/dist/assets/{actions-DLO5dlyV.js → actions-CbsTrVFd.js} +1 -1
- package/dist/assets/{add-component-core-C3OBXrft.js → add-component-core-CATRvviC.js} +2 -4
- package/dist/assets/add-resource-B0nzFGxn.js +1 -0
- package/dist/assets/{addon-1j40gf6h.js → addon-D0jt9co0.js} +1 -1
- package/dist/assets/{analytics-DVd3xO2s.js → analytics-wO1onAqc.js} +3 -3
- package/dist/assets/api-BFSOae_v.js +1 -0
- package/dist/assets/audit-logs-DDUnfrlt.js +58 -0
- package/dist/assets/blocklet-storage-Bbhcz6In.js +1 -0
- package/dist/assets/{button-2f4tapJk.js → button-DTeWpy9g.js} +1 -1
- package/dist/assets/{click-to-copy-CNizZfqS.js → click-to-copy-CaJFO5Kq.js} +1 -1
- package/dist/assets/{complete-CTg4NtH_.js → complete-3uapgH3n.js} +1 -1
- package/dist/assets/{component-DyLPRRkR.js → component-BCvhjsjE.js} +6 -6
- package/dist/assets/{config-Cl9yfIWh.js → config-DJ2yOOMa.js} +1 -1
- package/dist/assets/{config-BBl1Og8k.js → config-DRVy3XZK.js} +2 -2
- package/dist/assets/{config-navigation-RZ9QpkFv.js → config-navigation-DRALpukx.js} +2 -2
- package/dist/assets/{confirm-CD6_CMUq.js → confirm-BzNK2mDA.js} +1 -1
- package/dist/assets/{connect-B-qpRVvn.js → connect-BSe0CQFh.js} +1 -1
- package/dist/assets/{connect-DDELE721.js → connect-BegmDQRh.js} +1 -1
- package/dist/assets/connect-to-CsUlyY6l.js +54 -0
- package/dist/assets/{content-layout-CK5XQfmW.js → content-layout-7iVGY_ud.js} +1 -1
- package/dist/assets/dashboard-Dy_5eyk1.js +165 -0
- package/dist/assets/{did-address-GzRMEyk7.js → did-address-01PnQBPQ.js} +1 -1
- package/dist/assets/{domain-C3D9kcXD.js → domain-BXr1Jxdg.js} +1 -1
- package/dist/assets/{domain-list-BRcBrFVB.js → domain-list-DRd4BKdS.js} +1 -1
- package/dist/assets/{exchange-passport-B9ZrHETZ.js → exchange-passport-DBlhf64U.js} +1 -1
- package/dist/assets/{fallback-rg9fefdL.js → fallback-D4IbwHOh.js} +1 -1
- package/dist/assets/{format-error-B3RYdl6q.js → format-error-BLTYbOE0.js} +1 -1
- package/dist/assets/{fuel-BDMvUxVC.js → fuel-BFrr131p.js} +1 -1
- package/dist/assets/{fullpage-DFMbQYE_.js → fullpage-o_U-2IGS.js} +1 -1
- package/dist/assets/{home-YZ2dUhxo.js → home--rxR-cTY.js} +1 -1
- package/dist/assets/{iframe-s25HWReH.js → iframe-DAPuN1dW.js} +1 -1
- package/dist/assets/{index-CcddEj1V.js → index-1I7IXhML.js} +1 -1
- package/dist/assets/{index-D12KUiCG.js → index-7PLdtDxY.js} +1 -1
- package/dist/assets/{index-WDF_phnR.js → index-B0KUbTqG.js} +1 -1
- package/dist/assets/{index-u_IDQFrq.js → index-BB-3C_7E.js} +1 -1
- package/dist/assets/{index-BPSr4f2j.js → index-BCLn-9S9.js} +1 -1
- package/dist/assets/{index-CHJwugzh.js → index-BRzBZXpP.js} +1 -1
- package/dist/assets/{index-5qacoeSv.js → index-B_Mn_6jy.js} +1 -1
- package/dist/assets/{index-BU9mgEVG.js → index-Bf4S7Fg9.js} +1 -1
- package/dist/assets/{index-Bva9FLKW.js → index-BrXFspW6.js} +1 -1
- package/dist/assets/{index-DJLK29SJ.js → index-Bs7XqsZf.js} +1 -1
- package/dist/assets/{index-Db5U7Aba.js → index-CHegi_Ee.js} +1 -1
- package/dist/assets/{index-Dn7MhkOZ.js → index-CLFX4mT1.js} +2 -2
- package/dist/assets/{index-BfhVorqV.js → index-CZq1iuqc.js} +224 -224
- package/dist/assets/{index-Xh4BYwzS.js → index-CbcN4v3T.js} +1 -1
- package/dist/assets/{index-DOU4d3bN.js → index-Cd20iNJ4.js} +1 -1
- package/dist/assets/{index-nyOsFIwy.js → index-Cf2_yBdK.js} +1 -1
- package/dist/assets/{index-UmXxvIz7.js → index-ClrMer_1.js} +1 -1
- package/dist/assets/{index-Dcp0-2H6.js → index-CmmFWW8f.js} +1 -1
- package/dist/assets/{config-space-DTE8U19b.js → index-CptRhWH5.js} +20 -20
- package/dist/assets/index-Cy3QGaUZ.js +54 -0
- package/dist/assets/{index-BCpZXkUS.js → index-CyUODU0b.js} +1 -1
- package/dist/assets/{index-DU7-35nh.js → index-CzsxjdeJ.js} +1 -1
- package/dist/assets/{index-CvOK9BmX.js → index-DHRl1pLr.js} +1 -1
- package/dist/assets/{index-Cx1j9azw.js → index-DW7MULcX.js} +1 -1
- package/dist/assets/{index-DMq0_62n.js → index-DZWxxu-P.js} +1 -1
- package/dist/assets/{index-VRudjsk_.js → index-Diwtza0T.js} +8 -8
- package/dist/assets/{index-Ce3CP3Jp.js → index-Dvf9hLBW.js} +1 -1
- package/dist/assets/{index-_y2ZXCMC.js → index-K7xQGL1m.js} +2 -2
- package/dist/assets/{index-CGXAjTXD.js → index-NKypbT5t.js} +3 -3
- package/dist/assets/index-Wy8tXmp4.js +4 -0
- package/dist/assets/{index-CHbscbku.js → index-l8yj4zzE.js} +1 -1
- package/dist/assets/{index.es-BySfVRax.js → index.es-DIBj3Jq4.js} +1 -1
- package/dist/assets/{index.esm-Cpbu1bqz.js → index.esm-N7xOi6VN.js} +1 -1
- package/dist/assets/{invitation-ZiYOpo0m.js → invitation-Hu8jHCIo.js} +1 -1
- package/dist/assets/{invite-CP_9mlTp.js → invite-tCvD1Emp.js} +1 -1
- package/dist/assets/{issue-passport-OdsEQRgF.js → issue-passport-BQo4G1nz.js} +1 -1
- package/dist/assets/{item-B9vXmxNy.js → item-DbGtGKeZ.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-InWevx1Y.js → jss-plugin-props-sort.esm-DvQhW7jP.js} +1 -1
- package/dist/assets/{launch-result-message-Z1C1sG3K.js → launch-result-message-Bur7t6_c.js} +1 -1
- package/dist/assets/{layout-BJYUy5aS.js → layout-B0uAwIQe.js} +1 -1
- package/dist/assets/{list-header-7mHFR-6j.js → list-header-DFekr1NL.js} +1 -1
- package/dist/assets/localization-Dyeek5nb.js +1 -0
- package/dist/assets/{log-D0ihnCPe.js → log-CjsiT4t8.js} +1 -1
- package/dist/assets/{login-BJ99c8Da.js → login-1J5BbYVV.js} +1 -1
- package/dist/assets/{login-oauth-callback-DXPZbXE8.js → login-oauth-callback-Blrq-pTH.js} +1 -1
- package/dist/assets/{logo-uploader-Cb8u4LYv.js → logo-uploader-KJa3kg20.js} +3 -3
- package/dist/assets/{lost-passport-PezCqF0f.js → lost-passport-B-xv32w5.js} +3 -3
- package/dist/assets/{lottie-BCG4dny2.js → lottie-DHZm2Pp-.js} +1 -1
- package/dist/assets/notifications-D9-n_25q.js +62 -0
- package/dist/assets/{open-window-CuGAzF2Z.js → open-window-C6VjWW94.js} +1 -1
- package/dist/assets/overview-DkYsGUOj.js +12 -0
- package/dist/assets/{page-header-C5ecJ6Qd.js → page-header-Doy1SeXs.js} +1 -1
- package/dist/assets/{permission-BEPRmEw3.js → permission-BWAp0U1U.js} +1 -1
- package/dist/assets/{preferences-knw56gSD.js → preferences-C-rgtZ7Y.js} +1 -1
- package/dist/assets/publish-resource-C5iQ3qEW.js +1 -0
- package/dist/assets/{react-Di5TTO9l.js → react-CT3HMgMp.js} +3 -3
- package/dist/assets/{redux-tOVF_oDT.js → redux-DJ4kW5cs.js} +1 -1
- package/dist/assets/{resource-dialog-5vdlaAuh.js → resource-dialog-Dyf09u0L.js} +1 -1
- package/dist/assets/{selector-CNsCKDRb.js → selector-CoXEpXpq.js} +3 -3
- package/dist/assets/session-Ci3gpI0a.js +1 -0
- package/dist/assets/setup-D47fcxKa.js +14 -0
- package/dist/assets/{shorten-label-CunJMulX.js → shorten-label-FpBR8oOW.js} +1 -1
- package/dist/assets/{slicedToArray-C9-uQLEN.js → slicedToArray-D6tWlK6Z.js} +1 -1
- package/dist/assets/{spaces-Dm4toCmL.js → spaces-Dxw-EmTw.js} +1 -1
- package/dist/assets/{start-CrrzSOx-.js → start-D1WI9rVf.js} +1 -1
- package/dist/assets/{step-actions-BkxasUm3.js → step-actions-D3Bgjg32.js} +1 -1
- package/dist/assets/{studio-Cz2NXhoj.js → studio-SFi0TZqU.js} +1 -1
- package/dist/assets/{switch-control-BOre_YDJ.js → switch-control-D_6oISXT.js} +1 -1
- package/dist/assets/{toUpper-6wIhNvu3.js → toUpper-DA5F5eP3.js} +1 -1
- package/dist/assets/{transfer-DQPf7r9j.js → transfer-YRbXZ2oQ.js} +1 -1
- package/dist/assets/{uniqBy-C3O4Rmks.js → uniqBy-moVi8I9O.js} +1 -1
- package/dist/assets/{unsubscribe-DhdgpWxi.js → unsubscribe-B-8N_G1A.js} +1 -1
- package/dist/assets/{url-join-DH_b1eAH.js → url-join-BUXfHAG-.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-gtr1x-_o.js → use-blocklet-info-for-connect-did-spaces-DhpD5O4W.js} +1 -1
- package/dist/assets/{use-mobile-CnnusHmf.js → use-mobile-C_ONEjf6.js} +1 -1
- package/dist/assets/{useAsync-6Zzjy7PW.js → useAsync-BLjRrBya.js} +1 -1
- package/dist/assets/{useFormControl-DUzGwbSY.js → useFormControl-BrCPFkZH.js} +1 -1
- package/dist/assets/{useLocalStorage-B-I-NsSz.js → useLocalStorage-DrhIkVxO.js} +1 -1
- package/dist/assets/{useSetState-Be-I2Gl-.js → useSetState-CbQrbQss.js} +1 -1
- package/dist/assets/{useSlot-LBVvloQJ.js → useSlot-BSk477LF.js} +1 -1
- package/dist/assets/{user-center-BXOQaeTd.js → user-center-BYfQOHt3.js} +1 -1
- package/dist/assets/{user-sessions-CdgU8G0J.js → user-sessions-CAX_hHjv.js} +1 -1
- package/dist/assets/{util-CoWq6oMk.js → util-Do8cOsC3.js} +1 -1
- package/dist/assets/{wrap-locale-Cn1jipF7.js → wrap-locale-D6fNmzs0.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-DdlMvNYe.js +0 -1
- package/dist/assets/api-C37A8mCN.js +0 -1
- package/dist/assets/audit-logs-CJh_A9OZ.js +0 -58
- package/dist/assets/connect-to-DMAPIkc9.js +0 -54
- package/dist/assets/dashboard-BOQEjKT8.js +0 -165
- package/dist/assets/index-BEbMx7tF.js +0 -54
- package/dist/assets/index-CscyFLCJ.js +0 -4
- package/dist/assets/localization-DH4Rcoxd.js +0 -1
- package/dist/assets/notifications-CKxrvr1-.js +0 -62
- package/dist/assets/overview-BSBWgzbj.js +0 -12
- package/dist/assets/publish-resource-D_KlfXTF.js +0 -1
- package/dist/assets/session-Cf-ZqG4P.js +0 -1
- package/dist/assets/setup-CbG6rF4U.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X as t,Y as r,j as a}from"./index-
|
|
1
|
+
import{X as t,Y as r,j as a}from"./index-CZq1iuqc.js";var e={},i=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,v=i(t()),o=a;u=e.default=(0,v.default)((0,o.jsx)("path",{d:"M3 14h4v-4H3zm0 5h4v-4H3zM3 9h4V5H3zm5 5h13v-4H8zm0 5h13v-4H8zM8 5v4h13V5z"}),"ViewList");export{u as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,u as g,j as e,a as L,az as B,P as
|
|
1
|
+
import{r as c,u as g,j as e,a as L,az as B,P as b,bh as R,af as E,a7 as I,B as N,E as h,q as f,Z as z,aS as _}from"./index-CZq1iuqc.js";import{P as F}from"./page-header-Doy1SeXs.js";import{A as W}from"./config-DJ2yOOMa.js";import{S as H}from"./layout-B0uAwIQe.js";import{S as q}from"./step-actions-D3Bgjg32.js";import{S as O}from"./button-DTeWpy9g.js";import{d as $}from"./InfoOutlined-DzWheCe4.js";import{F as G}from"./FormControl-02YkGBiU.js";import{R as V,a as Z}from"./RadioGroup-C3L5xJaa.js";import{F as x,C as D}from"./FormControlLabel-BZuIe-KU.js";import"./content-layout-7iVGY_ud.js";import"./useFormControl-BrCPFkZH.js";import"./FormGroup-CUYWiNiM.js";function j({children:s}){const{t:i}=g();return e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[s,e.jsx(L,{title:i("blocklet.config.access.publicInstanceTip"),children:e.jsx(B,{children:e.jsx($,{fontSize:"small"})})})]})}j.propTypes={children:b.any.isRequired};const J=c.memo(j);function y({onNext:s}){const i=R(),{t:r,locale:m}=g(),[a,o]=c.useState(!1),[p,d]=c.useState(""),[S,C]=c.useState(!1),{blocklet:n,actions:u,getPublicInstance:v}=E();c.useEffect(()=>{d(I.getWhoCanAccess(n)),C(v(n))},[n]);const A=async t=>{try{o(!0),await _(800),await u.configWhoCanAccess(t),o(!1)}catch(l){o(!1),f.error(l.message)}},P=async t=>{a||(d(t.target.value),await A(t.target.value))},T=async t=>{const l=t.target.checked;try{o(!0),await u.configPublicToStore(l),o(!1)}catch(w){o(!1),f.error(w.message)}},k={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:i.palette.text.secondary};return e.jsxs(K,{children:[e.jsx("div",{className:"header",children:e.jsx(F,{title:r("blocklet.config.access.description")})}),e.jsx(G,{component:"fieldset",children:e.jsx(V,{name:"inherit",value:p,onChange:P,children:W.map(t=>e.jsxs("div",{style:{marginBottom:16},children:[e.jsx(x,{value:t.value,control:e.jsx(Z,{color:"primary"}),label:e.jsxs("span",{children:[e.jsx(t.icon,{style:k}),t.title[m]]})}),e.jsxs(N,{className:"tip",children:[t.description[m],t.value===h.WHO_CAN_ACCESS.ALL&&p===h.WHO_CAN_ACCESS.ALL&&n.source==="registry"&&e.jsx(J,{children:e.jsx(x,{style:{marginRight:0},value:t.value,control:e.jsx(D,{size:"small"}),label:e.jsx("span",{children:r("blocklet.config.access.publicToStore")}),onChange:T,checked:S,disabled:a})})]})]},t.value))})}),e.jsx(q,{mt:8,disabled:a,blocklet:n,onStartNow:()=>s("complete"),children:e.jsx(O,{loading:a,variant:"contained",disabled:a,onClick:()=>s(),children:r("setup.continue")})})]})}y.propTypes={onNext:b.func};y.defaultProps={onNext:()=>{}};const K=z(H)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
.header {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X as E,Y as I,j as t,r as l,az as M,aO as z,aP as D,aQ as _,P as u,Z as R}from"./index-
|
|
1
|
+
import{X as E,Y as I,j as t,r as l,az as M,aO as z,aP as D,aQ as _,P as u,Z as R}from"./index-CZq1iuqc.js";import{L as b,a as C}from"./ListItemText-Bn_r5n_z.js";var o={},O=I;Object.defineProperty(o,"__esModule",{value:!0});var p=o.default=void 0,S=O(E()),T=t;p=o.default=(0,S.default)((0,T.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz");function d({actions:m,size:f,...y}){const[n,i]=l.useState(null),v=!!n,x=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}i(e.currentTarget)},a=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}i(null)};return t.jsxs(k,{...y,children:[t.jsx(M,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:x,size:f,children:t.jsx(p,{})}),t.jsx(z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:n,keepMounted:!0,open:v,onClose:a,slotProps:{paper:{}},children:m.map((e,r)=>{if(typeof e=="function")return e({close:a});if(e.separator)return t.jsx(D,{},`separator-${r}`);const{icon:h,text:j,render:q,onClick:s,disabled:g=!1,...P}=e;return l.createElement(_,{...P,disabled:g,dense:!0,onClick:async c=>{c.stopPropagation(),await(s==null?void 0:s(c)),a()},key:r,"data-cy":`actions-menu-${r}`},t.jsx(b,{style:{minWidth:24,marginRight:8},children:h}),t.jsx(C,{primary:j}))})})]})}d.propTypes={actions:u.array,size:u.oneOf(["small","medium","large"])};d.defaultProps={actions:[],size:"small"};const k=R.div``;export{d as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as Pt,c_ as Mo,c$ as No,r as g,eB as Lo,d5 as qo,aF as Uo,j as c,cK as zo,aI as Ko,d6 as Wo,aJ as Ho,aC as Qo,aD as Xo,aK as Yo,U as ot,O as Ur,eC as Jo,eD as Zo,h as Dt,eE as es,eF as ts,c0 as rs,db as b0,bz as g0,E as pa,b4 as yt,eG as Qn,eA as ns,bA as is,P as k,bt as oe,X as Le,Y as qe,a1 as me,l as Ee,ap as q0,Z as ae,B as _,a7 as Ce,f as fa,cq as ue,D as as,T as le,u as we,$ as n0,bB as I0,aM as i0,z as os,e as ss,az as ls,eH as cs,I as da,aW as us,bk as ms,bs as Xn,eI as ps,c1 as Br,c as U0,eJ as fs,b_ as ds,q as zr,eK as xs,aV as z0,C as hs,cx as ks,eL as xa,aQ as ha,eM as ys,eN as bs,av as Yn,bj as K0,ad as ka,a8 as ya,N as ba,eO as gs,b as ga,ck as vs,dd as Ss,k as Es,eP as ws,bq as va,be as Sa,ds as Gt,cj as As,bm as Ds,dt as Gs,ae as Bs,bn as Ps,eQ as js,eR as Vs,dc as Os,ac as Cs,A as Fs,eS as Ts,eT as Is,eU as _s,bx as $s,a9 as Re,cr as Rs,eV as Ms,eW as Ns,eX as Ls,eY as v0,eZ as Jn,e_ as qs}from"./index-BfhVorqV.js";import{l as Us}from"./lottie-BCG4dny2.js";import{u as zs,a as Ks,L as Ws,C as Hs,S as Qs}from"./config-space-DTE8U19b.js";import{L as Zn}from"./launch-result-message-Z1C1sG3K.js";import{P as Ea}from"./page-header-C5ecJ6Qd.js";import{u as wa}from"./uniqBy-C3O4Rmks.js";import{R as hr}from"./logo-uploader-Cb8u4LYv.js";import{S as Xs}from"./index-CHbscbku.js";import{s as Aa,h as Ys,w as Js,f as Zs,a as el,b as tl,c as rl,M as nl}from"./index-BCpZXkUS.js";import{j as ei}from"./url-join-DH_b1eAH.js";import{F as il,C as al,S as ol}from"./FormControlLabel-B6ISinfm.js";import{I as ti}from"./index-u_IDQFrq.js";import{u as sl}from"./session-Cf-ZqG4P.js";import{W as ll}from"./did-address-GzRMEyk7.js";import{T as Kr}from"./TextField-D3XEyFR4.js";import{S as cl,a as ul,b as ml}from"./Stepper-BF6lz4ut.js";import{D as pl,f as Da}from"./format-error-B3RYdl6q.js";import{A as Ga}from"./Alert-D91U5h--.js";import{a as ri}from"./api-C37A8mCN.js";import{m as fl,S as dl,A as xl}from"./item-B9vXmxNy.js";import{L as hl}from"./MoreVert-er-bltGF.js";import{L as kl,a as yl}from"./ListItemText-Bnnk7Gbj.js";import{v as bl}from"./util-CoWq6oMk.js";import{u as Ba,C as gl,D as vl,a as Sl}from"./connect-to-DMAPIkc9.js";import{C as El}from"./content-layout-CK5XQfmW.js";import{d as wl}from"./ArrowDropDown-Cq32DOpt.js";import{_ as Al}from"./useLocalStorage-B-I-NsSz.js";import{E as Wr}from"./fallback-rg9fefdL.js";import{E as Dl}from"./index-D12KUiCG.js";import{d as Gl}from"./Search-CMyGk9R2.js";import{S as Bl}from"./index-nyOsFIwy.js";import{O as Pl}from"./Select-BeNQ99oP.js";import{H as ni}from"./Hidden-kl5Tbw1B.js";import{M as ii}from"./InputAdornment-C5IWgB4u.js";import{y as jl,g as Vl,N as Ol}from"./preact.module-B1z5cdvs.js";import{E as Cl}from"./Link-DFzOJFD-.js";const Fl=(e,t)=>e.filter(r=>t.includes(r)),bt=(e,t,r)=>{const n=e.keys[0];Array.isArray(t)?t.forEach((i,a)=>{r((o,s)=>{a<=e.keys.length-1&&(a===0?Object.assign(o,s):o[e.up(e.keys[a])]=s)},i)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Fl(e.keys,Object.keys(t))).forEach(a=>{if(e.keys.indexOf(a)!==-1){const o=t[a];o!==void 0&&r((s,l)=>{n===a?Object.assign(s,l):s[e.up(a)]=l},o)}}):(typeof t=="number"||typeof t=="string")&&r((i,a)=>{Object.assign(i,a)},t)};function Fe(e){return e?`Level${e}`:""}function a0(e){return e.unstable_level>0&&e.container}function Pa(e){return function(r){return`var(--Grid-${r}Spacing${Fe(e.unstable_level)})`}}function Hr(e){return function(r){return e.unstable_level===0?`var(--Grid-${r}Spacing)`:`var(--Grid-${r}Spacing${Fe(e.unstable_level-1)})`}}function Qr(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${Fe(e.unstable_level-1)})`}const Tl=({theme:e,ownerState:t})=>{const r=Pa(t),n={};return bt(e.breakpoints,t.gridSize,(i,a)=>{let o={};a===!0&&(o={flexBasis:0,flexGrow:1,maxWidth:"100%"}),a==="auto"&&(o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof a=="number"&&(o={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${a} / ${Qr(t)}${a0(t)?` + ${r("column")}`:""})`}),i(n,o)}),n},Il=({theme:e,ownerState:t})=>{const r={};return bt(e.breakpoints,t.gridOffset,(n,i)=>{let a={};i==="auto"&&(a={marginLeft:"auto"}),typeof i=="number"&&(a={marginLeft:i===0?"0px":`calc(100% * ${i} / ${Qr(t)})`}),n(r,a)}),r},_l=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=a0(t)?{[`--Grid-columns${Fe(t.unstable_level)}`]:Qr(t)}:{"--Grid-columns":12};return bt(e.breakpoints,t.columns,(n,i)=>{n(r,{[`--Grid-columns${Fe(t.unstable_level)}`]:i})}),r},$l=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Hr(t),n=a0(t)?{[`--Grid-rowSpacing${Fe(t.unstable_level)}`]:r("row")}:{};return bt(e.breakpoints,t.rowSpacing,(i,a)=>{var o;i(n,{[`--Grid-rowSpacing${Fe(t.unstable_level)}`]:typeof a=="string"?a:(o=e.spacing)==null?void 0:o.call(e,a)})}),n},Rl=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Hr(t),n=a0(t)?{[`--Grid-columnSpacing${Fe(t.unstable_level)}`]:r("column")}:{};return bt(e.breakpoints,t.columnSpacing,(i,a)=>{var o;i(n,{[`--Grid-columnSpacing${Fe(t.unstable_level)}`]:typeof a=="string"?a:(o=e.spacing)==null?void 0:o.call(e,a)})}),n},Ml=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return bt(e.breakpoints,t.direction,(n,i)=>{n(r,{flexDirection:i})}),r},Nl=({ownerState:e})=>{const t=Pa(e),r=Hr(e);return Pt({minWidth:0,boxSizing:"border-box"},e.container&&Pt({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||a0(e))&&Pt({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},Ll=e=>{const t=[];return Object.entries(e).forEach(([r,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${r}-${String(n)}`)}),t},ql=(e,t="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const n=[];return Object.entries(e).forEach(([i,a])=>{r(a)&&n.push(`spacing-${i}-${String(a)}`)}),n}return[]},Ul=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,r])=>`direction-${t}-${r}`):[`direction-xs-${String(e)}`],zl=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Kl=Mo(),Wl=No("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Hl(e){return Wo({props:e,name:"MuiGrid",defaultTheme:Kl})}function Ql(e={}){const{createStyledComponent:t=Wl,useThemeProps:r=Hl,componentName:n="MuiGrid"}=e,i=g.createContext(void 0),a=(l,u)=>{const{container:p,direction:m,spacing:f,wrap:h,gridSize:x}=l,d={root:["root",p&&"container",h!=="wrap"&&`wrap-xs-${String(h)}`,...Ul(m),...Ll(x),...p?ql(f,u.breakpoints.keys[0]):[]]};return Ho(d,y=>Qo(n,y),{})},o=t(_l,Rl,$l,Tl,Ml,Nl,Il),s=g.forwardRef(function(u,p){var m,f,h,x,d,y,E,v;const S=Lo(),w=r(u),A=qo(w),P=g.useContext(i),{className:V,children:j,columns:D=12,container:B=!1,component:G="div",direction:N="row",wrap:U="wrap",spacing:K=0,rowSpacing:F=K,columnSpacing:M=K,disableEqualOverflow:q,unstable_level:b=0}=A,T=Uo(A,zl);let $=q;b&&q!==void 0&&($=u.disableEqualOverflow);const z={},L={},ge={};Object.entries(T).forEach(([ce,De])=>{S.breakpoints.values[ce]!==void 0?z[ce]=De:S.breakpoints.values[ce.replace("Offset","")]!==void 0?L[ce.replace("Offset","")]=De:ge[ce]=De});const Ae=(m=u.columns)!=null?m:b?void 0:D,Ue=(f=u.spacing)!=null?f:b?void 0:K,s0=(h=(x=u.rowSpacing)!=null?x:u.spacing)!=null?h:b?void 0:F,l0=(d=(y=u.columnSpacing)!=null?y:u.spacing)!=null?d:b?void 0:M,c0=Pt({},A,{level:b,columns:Ae,container:B,direction:N,wrap:U,spacing:Ue,rowSpacing:s0,columnSpacing:l0,gridSize:z,gridOffset:L,disableEqualOverflow:(E=(v=$)!=null?v:P)!=null?E:!1,parentDisableEqualOverflow:P}),se=a(c0,S);let ee=c.jsx(o,Pt({ref:p,as:G,ownerState:c0,className:Ko(se.root,V)},ge,{children:g.Children.map(j,ce=>{if(g.isValidElement(ce)&&zo(ce,["Grid"])){var De;return g.cloneElement(ce,{unstable_level:(De=ce.props.unstable_level)!=null?De:b+1})}return ce})}));return $!==void 0&&$!==(P??!1)&&(ee=c.jsx(i.Provider,{value:$,children:ee})),ee});return s.muiName="Grid",s}const Xl=Ql({createStyledComponent:Xo("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>Yo({props:e,name:"MuiGrid2"})}),kr=Xl;var Yl=function(e){return e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop},Jl=function(e){return e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},Zl=function(e){return e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},e1=function(e,t){t===void 0&&(t={});var r=t.target,n=t.isNoMore,i=t.threshold,a=i===void 0?100:i,o=t.reloadDeps,s=o===void 0?[]:o,l=t.manual,u=t.onBefore,p=t.onSuccess,m=t.onError,f=t.onFinally,h=ot(g.useState(),2),x=h[0],d=h[1],y=ot(g.useState(!1),2),E=y[0],v=y[1],S=g.useMemo(function(){return n?n(x):!1},[x]),w=Ur(function(F){return Jo(void 0,void 0,void 0,function(){var M,q,b;return Zo(this,function(T){switch(T.label){case 0:return[4,e(F)];case 1:return M=T.sent(),d(F?g0(g0({},M),{list:b0(b0([],ot((b=F.list)!==null&&b!==void 0?b:[]),!1),ot(M.list),!1)}):g0(g0({},M),{list:b0([],ot((q=M.list)!==null&&q!==void 0?q:[]),!1)})),[2,M]}})})},{manual:l,onFinally:function(F,M,q){v(!1),f==null||f(M,q)},onBefore:function(){return u==null?void 0:u()},onSuccess:function(F){setTimeout(function(){K()}),p==null||p(F)},onError:function(F){return m==null?void 0:m(F)}}),A=w.loading,P=w.error,V=w.run,j=w.runAsync,D=w.cancel,B=Dt(function(){S||(v(!0),V(x))}),G=Dt(function(){return S?Promise.reject():(v(!0),j(x))}),N=function(){return v(!1),V()},U=function(){return v(!1),j()},K=function(){var F=es(r);if(F){F=F===document?document.documentElement:F;var M=Yl(F),q=Jl(F),b=Zl(F);q-M<=b+a&&B()}};return ts("scroll",function(){A||E||K()},{target:r}),rs(function(){V()},b0([],ot(s),!1)),{data:x,loading:!E&&A,error:P,loadingMore:E,noMore:S,loadMore:B,loadMoreAsync:G,reload:Dt(N),reloadAsync:Dt(U),mutate:d,cancel:D}};const t1=e1,e2="blocklet-add-component-registry",t2="server-add-registry",r2=e=>`resource-${e}-add-registry`,{NODE_MODES:ai}=pa,r1=({mode:e,previousMode:t}={})=>e===ai.SERVERLESS||t===ai.SERVERLESS;var ja={isInServerlessMode:r1},n1=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!(o==="_owner"&&t.$$typeof)&&!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r};const oi=yt(n1);var i1=a1;function dt(e){return e instanceof Qn?Qn.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function a1(e){if(e=e||{},e.circles)return o1(e);return e.proto?n:r;function t(i,a){for(var o=Object.keys(i),s=new Array(o.length),l=0;l<o.length;l++){var u=o[l],p=i[u];typeof p!="object"||p===null?s[u]=p:p instanceof Date?s[u]=new Date(p):ArrayBuffer.isView(p)?s[u]=dt(p):s[u]=a(p)}return s}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var a={};for(var o in i)if(Object.hasOwnProperty.call(i,o)!==!1){var s=i[o];typeof s!="object"||s===null?a[o]=s:s instanceof Date?a[o]=new Date(s):s instanceof Map?a[o]=new Map(t(Array.from(s),r)):s instanceof Set?a[o]=new Set(t(Array.from(s),r)):ArrayBuffer.isView(s)?a[o]=dt(s):a[o]=r(s)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var a={};for(var o in i){var s=i[o];typeof s!="object"||s===null?a[o]=s:s instanceof Date?a[o]=new Date(s):s instanceof Map?a[o]=new Map(t(Array.from(s),n)):s instanceof Set?a[o]=new Set(t(Array.from(s),n)):ArrayBuffer.isView(s)?a[o]=dt(s):a[o]=n(s)}return a}}function o1(e){var t=[],r=[];return e.proto?a:i;function n(o,s){for(var l=Object.keys(o),u=new Array(l.length),p=0;p<l.length;p++){var m=l[p],f=o[m];if(typeof f!="object"||f===null)u[m]=f;else if(f instanceof Date)u[m]=new Date(f);else if(ArrayBuffer.isView(f))u[m]=dt(f);else{var h=t.indexOf(f);h!==-1?u[m]=r[h]:u[m]=s(f)}}return u}function i(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return n(o,i);if(o instanceof Map)return new Map(n(Array.from(o),i));if(o instanceof Set)return new Set(n(Array.from(o),i));var s={};t.push(o),r.push(s);for(var l in o)if(Object.hasOwnProperty.call(o,l)!==!1){var u=o[l];if(typeof u!="object"||u===null)s[l]=u;else if(u instanceof Date)s[l]=new Date(u);else if(u instanceof Map)s[l]=new Map(n(Array.from(u),i));else if(u instanceof Set)s[l]=new Set(n(Array.from(u),i));else if(ArrayBuffer.isView(u))s[l]=dt(u);else{var p=t.indexOf(u);p!==-1?s[l]=r[p]:s[l]=i(u)}}return t.pop(),r.pop(),s}function a(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return n(o,a);if(o instanceof Map)return new Map(n(Array.from(o),a));if(o instanceof Set)return new Set(n(Array.from(o),a));var s={};t.push(o),r.push(s);for(var l in o){var u=o[l];if(typeof u!="object"||u===null)s[l]=u;else if(u instanceof Date)s[l]=new Date(u);else if(u instanceof Map)s[l]=new Map(n(Array.from(u),a));else if(u instanceof Set)s[l]=new Set(n(Array.from(u),a));else if(ArrayBuffer.isView(u))s[l]=dt(u);else{var p=t.indexOf(u);p!==-1?s[l]=r[p]:s[l]=a(u)}}return t.pop(),r.pop(),s}}var s1=i1();const si=yt(s1);function Pr(){return Pr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pr.apply(this,arguments)}function l1(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Xr(e,t){return t={exports:{}},e(t,t.exports),t.exports}/** @license React v16.13.1
|
|
1
|
+
import{aG as Pt,c_ as Mo,c$ as No,r as g,eB as Lo,d5 as qo,aF as Uo,j as c,cK as zo,aI as Ko,d6 as Wo,aJ as Ho,aC as Qo,aD as Xo,aK as Yo,U as ot,O as Ur,eC as Jo,eD as Zo,h as Dt,eE as es,eF as ts,b$ as rs,db as b0,bx as g0,E as pa,b4 as yt,eG as Qn,eA as ns,by as is,P as k,br as oe,X as Le,Y as qe,a1 as me,l as Ee,ap as q0,Z as ae,B as _,a7 as Ce,f as fa,cr as ue,D as as,T as le,u as we,$ as n0,bz as I0,aM as i0,z as os,e as ss,az as ls,eH as cs,I as da,aW as us,bi as ms,bq as Xn,eI as ps,c0 as Br,c as U0,eJ as fs,bZ as ds,q as zr,eK as xs,aV as z0,C as hs,cm as ks,eL as xa,aQ as ha,eM as ys,eN as bs,av as Yn,bh as K0,ad as ka,a8 as ya,N as ba,eO as gs,b as ga,cj as vs,dd as Ss,k as Es,eP as ws,bo as va,bc as Sa,ds as Gt,ci as As,bk as Ds,dt as Gs,ae as Bs,bl as Ps,eQ as js,eR as Vs,dc as Os,ac as Cs,A as Fs,eS as Ts,eT as Is,eU as _s,bv as $s,a9 as Re,cs as Rs,eV as Ms,eW as Ns,eX as Ls,eY as v0,eZ as Jn,e_ as qs}from"./index-CZq1iuqc.js";import{l as Us}from"./lottie-DHZm2Pp-.js";import{u as zs,a as Ks,L as Ws,C as Hs,S as Qs}from"./index-CptRhWH5.js";import{L as Zn}from"./launch-result-message-Bur7t6_c.js";import{P as Ea}from"./page-header-Doy1SeXs.js";import{u as wa}from"./uniqBy-moVi8I9O.js";import{R as hr}from"./logo-uploader-KJa3kg20.js";import{S as Xs}from"./index-l8yj4zzE.js";import{s as Aa,h as Ys,w as Js,f as Zs,a as el,b as tl,c as rl,M as nl}from"./index-CyUODU0b.js";import{j as ei}from"./url-join-BUXfHAG-.js";import{F as il,C as al,S as ol}from"./FormControlLabel-BZuIe-KU.js";import{I as ti}from"./index-BB-3C_7E.js";import{u as sl}from"./session-Ci3gpI0a.js";import{W as ll}from"./did-address-01PnQBPQ.js";import{T as Kr}from"./TextField-BHSEV3Ac.js";import{S as cl,a as ul,b as ml}from"./Stepper-BFMAEaBf.js";import{D as pl,f as Da}from"./format-error-BLTYbOE0.js";import{A as Ga}from"./Alert-X8Tf_Ya2.js";import{a as ri}from"./api-BFSOae_v.js";import{m as fl,S as dl,A as xl}from"./item-DbGtGKeZ.js";import{L as hl}from"./MoreVert-DhDSKiqk.js";import{L as kl,a as yl}from"./ListItemText-Bn_r5n_z.js";import{v as bl}from"./util-Do8cOsC3.js";import{u as Ba,C as gl,D as vl,a as Sl}from"./connect-to-CsUlyY6l.js";import{C as El}from"./content-layout-7iVGY_ud.js";import{d as wl}from"./ArrowDropDown-B1ERiCZ6.js";import{_ as Al}from"./useLocalStorage-DrhIkVxO.js";import{E as Wr}from"./fallback-D4IbwHOh.js";import{E as Dl}from"./index-7PLdtDxY.js";import{d as Gl}from"./Search-DTUqGlmf.js";import{S as Bl}from"./index-Cf2_yBdK.js";import{O as Pl}from"./Select-DCbRxmUU.js";import{H as ni}from"./Hidden-BtwYfeyy.js";import{M as ii}from"./InputAdornment-B3Ml-Pew.js";import{y as jl,g as Vl,N as Ol}from"./preact.module-B1z5cdvs.js";import{E as Cl}from"./Link-1nuQkwqf.js";const Fl=(e,t)=>e.filter(r=>t.includes(r)),bt=(e,t,r)=>{const n=e.keys[0];Array.isArray(t)?t.forEach((i,a)=>{r((o,s)=>{a<=e.keys.length-1&&(a===0?Object.assign(o,s):o[e.up(e.keys[a])]=s)},i)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Fl(e.keys,Object.keys(t))).forEach(a=>{if(e.keys.indexOf(a)!==-1){const o=t[a];o!==void 0&&r((s,l)=>{n===a?Object.assign(s,l):s[e.up(a)]=l},o)}}):(typeof t=="number"||typeof t=="string")&&r((i,a)=>{Object.assign(i,a)},t)};function Fe(e){return e?`Level${e}`:""}function a0(e){return e.unstable_level>0&&e.container}function Pa(e){return function(r){return`var(--Grid-${r}Spacing${Fe(e.unstable_level)})`}}function Hr(e){return function(r){return e.unstable_level===0?`var(--Grid-${r}Spacing)`:`var(--Grid-${r}Spacing${Fe(e.unstable_level-1)})`}}function Qr(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${Fe(e.unstable_level-1)})`}const Tl=({theme:e,ownerState:t})=>{const r=Pa(t),n={};return bt(e.breakpoints,t.gridSize,(i,a)=>{let o={};a===!0&&(o={flexBasis:0,flexGrow:1,maxWidth:"100%"}),a==="auto"&&(o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof a=="number"&&(o={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${a} / ${Qr(t)}${a0(t)?` + ${r("column")}`:""})`}),i(n,o)}),n},Il=({theme:e,ownerState:t})=>{const r={};return bt(e.breakpoints,t.gridOffset,(n,i)=>{let a={};i==="auto"&&(a={marginLeft:"auto"}),typeof i=="number"&&(a={marginLeft:i===0?"0px":`calc(100% * ${i} / ${Qr(t)})`}),n(r,a)}),r},_l=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=a0(t)?{[`--Grid-columns${Fe(t.unstable_level)}`]:Qr(t)}:{"--Grid-columns":12};return bt(e.breakpoints,t.columns,(n,i)=>{n(r,{[`--Grid-columns${Fe(t.unstable_level)}`]:i})}),r},$l=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Hr(t),n=a0(t)?{[`--Grid-rowSpacing${Fe(t.unstable_level)}`]:r("row")}:{};return bt(e.breakpoints,t.rowSpacing,(i,a)=>{var o;i(n,{[`--Grid-rowSpacing${Fe(t.unstable_level)}`]:typeof a=="string"?a:(o=e.spacing)==null?void 0:o.call(e,a)})}),n},Rl=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Hr(t),n=a0(t)?{[`--Grid-columnSpacing${Fe(t.unstable_level)}`]:r("column")}:{};return bt(e.breakpoints,t.columnSpacing,(i,a)=>{var o;i(n,{[`--Grid-columnSpacing${Fe(t.unstable_level)}`]:typeof a=="string"?a:(o=e.spacing)==null?void 0:o.call(e,a)})}),n},Ml=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return bt(e.breakpoints,t.direction,(n,i)=>{n(r,{flexDirection:i})}),r},Nl=({ownerState:e})=>{const t=Pa(e),r=Hr(e);return Pt({minWidth:0,boxSizing:"border-box"},e.container&&Pt({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||a0(e))&&Pt({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},Ll=e=>{const t=[];return Object.entries(e).forEach(([r,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${r}-${String(n)}`)}),t},ql=(e,t="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const n=[];return Object.entries(e).forEach(([i,a])=>{r(a)&&n.push(`spacing-${i}-${String(a)}`)}),n}return[]},Ul=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,r])=>`direction-${t}-${r}`):[`direction-xs-${String(e)}`],zl=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Kl=Mo(),Wl=No("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Hl(e){return Wo({props:e,name:"MuiGrid",defaultTheme:Kl})}function Ql(e={}){const{createStyledComponent:t=Wl,useThemeProps:r=Hl,componentName:n="MuiGrid"}=e,i=g.createContext(void 0),a=(l,u)=>{const{container:p,direction:m,spacing:f,wrap:h,gridSize:x}=l,d={root:["root",p&&"container",h!=="wrap"&&`wrap-xs-${String(h)}`,...Ul(m),...Ll(x),...p?ql(f,u.breakpoints.keys[0]):[]]};return Ho(d,y=>Qo(n,y),{})},o=t(_l,Rl,$l,Tl,Ml,Nl,Il),s=g.forwardRef(function(u,p){var m,f,h,x,d,y,E,v;const S=Lo(),w=r(u),A=qo(w),P=g.useContext(i),{className:V,children:j,columns:D=12,container:B=!1,component:G="div",direction:N="row",wrap:U="wrap",spacing:K=0,rowSpacing:F=K,columnSpacing:M=K,disableEqualOverflow:q,unstable_level:b=0}=A,T=Uo(A,zl);let $=q;b&&q!==void 0&&($=u.disableEqualOverflow);const z={},L={},ge={};Object.entries(T).forEach(([ce,De])=>{S.breakpoints.values[ce]!==void 0?z[ce]=De:S.breakpoints.values[ce.replace("Offset","")]!==void 0?L[ce.replace("Offset","")]=De:ge[ce]=De});const Ae=(m=u.columns)!=null?m:b?void 0:D,Ue=(f=u.spacing)!=null?f:b?void 0:K,s0=(h=(x=u.rowSpacing)!=null?x:u.spacing)!=null?h:b?void 0:F,l0=(d=(y=u.columnSpacing)!=null?y:u.spacing)!=null?d:b?void 0:M,c0=Pt({},A,{level:b,columns:Ae,container:B,direction:N,wrap:U,spacing:Ue,rowSpacing:s0,columnSpacing:l0,gridSize:z,gridOffset:L,disableEqualOverflow:(E=(v=$)!=null?v:P)!=null?E:!1,parentDisableEqualOverflow:P}),se=a(c0,S);let ee=c.jsx(o,Pt({ref:p,as:G,ownerState:c0,className:Ko(se.root,V)},ge,{children:g.Children.map(j,ce=>{if(g.isValidElement(ce)&&zo(ce,["Grid"])){var De;return g.cloneElement(ce,{unstable_level:(De=ce.props.unstable_level)!=null?De:b+1})}return ce})}));return $!==void 0&&$!==(P??!1)&&(ee=c.jsx(i.Provider,{value:$,children:ee})),ee});return s.muiName="Grid",s}const Xl=Ql({createStyledComponent:Xo("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>Yo({props:e,name:"MuiGrid2"})}),kr=Xl;var Yl=function(e){return e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop},Jl=function(e){return e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},Zl=function(e){return e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},e1=function(e,t){t===void 0&&(t={});var r=t.target,n=t.isNoMore,i=t.threshold,a=i===void 0?100:i,o=t.reloadDeps,s=o===void 0?[]:o,l=t.manual,u=t.onBefore,p=t.onSuccess,m=t.onError,f=t.onFinally,h=ot(g.useState(),2),x=h[0],d=h[1],y=ot(g.useState(!1),2),E=y[0],v=y[1],S=g.useMemo(function(){return n?n(x):!1},[x]),w=Ur(function(F){return Jo(void 0,void 0,void 0,function(){var M,q,b;return Zo(this,function(T){switch(T.label){case 0:return[4,e(F)];case 1:return M=T.sent(),d(F?g0(g0({},M),{list:b0(b0([],ot((b=F.list)!==null&&b!==void 0?b:[]),!1),ot(M.list),!1)}):g0(g0({},M),{list:b0([],ot((q=M.list)!==null&&q!==void 0?q:[]),!1)})),[2,M]}})})},{manual:l,onFinally:function(F,M,q){v(!1),f==null||f(M,q)},onBefore:function(){return u==null?void 0:u()},onSuccess:function(F){setTimeout(function(){K()}),p==null||p(F)},onError:function(F){return m==null?void 0:m(F)}}),A=w.loading,P=w.error,V=w.run,j=w.runAsync,D=w.cancel,B=Dt(function(){S||(v(!0),V(x))}),G=Dt(function(){return S?Promise.reject():(v(!0),j(x))}),N=function(){return v(!1),V()},U=function(){return v(!1),j()},K=function(){var F=es(r);if(F){F=F===document?document.documentElement:F;var M=Yl(F),q=Jl(F),b=Zl(F);q-M<=b+a&&B()}};return ts("scroll",function(){A||E||K()},{target:r}),rs(function(){V()},b0([],ot(s),!1)),{data:x,loading:!E&&A,error:P,loadingMore:E,noMore:S,loadMore:B,loadMoreAsync:G,reload:Dt(N),reloadAsync:Dt(U),mutate:d,cancel:D}};const t1=e1,e2="blocklet-add-component-registry",t2="server-add-registry",r2=e=>`resource-${e}-add-registry`,{NODE_MODES:ai}=pa,r1=({mode:e,previousMode:t}={})=>e===ai.SERVERLESS||t===ai.SERVERLESS;var ja={isInServerlessMode:r1},n1=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!(o==="_owner"&&t.$$typeof)&&!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r};const oi=yt(n1);var i1=a1;function dt(e){return e instanceof Qn?Qn.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function a1(e){if(e=e||{},e.circles)return o1(e);return e.proto?n:r;function t(i,a){for(var o=Object.keys(i),s=new Array(o.length),l=0;l<o.length;l++){var u=o[l],p=i[u];typeof p!="object"||p===null?s[u]=p:p instanceof Date?s[u]=new Date(p):ArrayBuffer.isView(p)?s[u]=dt(p):s[u]=a(p)}return s}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var a={};for(var o in i)if(Object.hasOwnProperty.call(i,o)!==!1){var s=i[o];typeof s!="object"||s===null?a[o]=s:s instanceof Date?a[o]=new Date(s):s instanceof Map?a[o]=new Map(t(Array.from(s),r)):s instanceof Set?a[o]=new Set(t(Array.from(s),r)):ArrayBuffer.isView(s)?a[o]=dt(s):a[o]=r(s)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var a={};for(var o in i){var s=i[o];typeof s!="object"||s===null?a[o]=s:s instanceof Date?a[o]=new Date(s):s instanceof Map?a[o]=new Map(t(Array.from(s),n)):s instanceof Set?a[o]=new Set(t(Array.from(s),n)):ArrayBuffer.isView(s)?a[o]=dt(s):a[o]=n(s)}return a}}function o1(e){var t=[],r=[];return e.proto?a:i;function n(o,s){for(var l=Object.keys(o),u=new Array(l.length),p=0;p<l.length;p++){var m=l[p],f=o[m];if(typeof f!="object"||f===null)u[m]=f;else if(f instanceof Date)u[m]=new Date(f);else if(ArrayBuffer.isView(f))u[m]=dt(f);else{var h=t.indexOf(f);h!==-1?u[m]=r[h]:u[m]=s(f)}}return u}function i(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return n(o,i);if(o instanceof Map)return new Map(n(Array.from(o),i));if(o instanceof Set)return new Set(n(Array.from(o),i));var s={};t.push(o),r.push(s);for(var l in o)if(Object.hasOwnProperty.call(o,l)!==!1){var u=o[l];if(typeof u!="object"||u===null)s[l]=u;else if(u instanceof Date)s[l]=new Date(u);else if(u instanceof Map)s[l]=new Map(n(Array.from(u),i));else if(u instanceof Set)s[l]=new Set(n(Array.from(u),i));else if(ArrayBuffer.isView(u))s[l]=dt(u);else{var p=t.indexOf(u);p!==-1?s[l]=r[p]:s[l]=i(u)}}return t.pop(),r.pop(),s}function a(o){if(typeof o!="object"||o===null)return o;if(o instanceof Date)return new Date(o);if(Array.isArray(o))return n(o,a);if(o instanceof Map)return new Map(n(Array.from(o),a));if(o instanceof Set)return new Set(n(Array.from(o),a));var s={};t.push(o),r.push(s);for(var l in o){var u=o[l];if(typeof u!="object"||u===null)s[l]=u;else if(u instanceof Date)s[l]=new Date(u);else if(u instanceof Map)s[l]=new Map(n(Array.from(u),a));else if(u instanceof Set)s[l]=new Set(n(Array.from(u),a));else if(ArrayBuffer.isView(u))s[l]=dt(u);else{var p=t.indexOf(u);p!==-1?s[l]=r[p]:s[l]=a(u)}}return t.pop(),r.pop(),s}}var s1=i1();const si=yt(s1);function Pr(){return Pr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pr.apply(this,arguments)}function l1(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Xr(e,t){return t={exports:{}},e(t,t.exports),t.exports}/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -744,7 +744,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
744
744
|
.ms-highlight {
|
|
745
745
|
color: ${e=>e.theme.palette.primary.main};
|
|
746
746
|
}
|
|
747
|
-
`,_n=g.forwardRef(({meta:e,isMobile:t,onStepChange:r},n)=>{const{steps:i,activeStep:a,setActiveStepByKey:o,setActiveStepByIndex:s}=Ks(),{t:l,locale:u}=we(),p=i[a];return g.useEffect(()=>{r(a)},[r,a]),g.useImperativeHandle(n,()=>({setActiveStepByKey:o,setActiveStepByIndex:s})),c.jsx(ch,{component:"div",className:t?"mobileStyle":"",sx:{height:"calc(100% - 56px)","&>div>div>div:first-child":{flex:{md:1}}},children:c.jsx(Ws,{locale:u,blockletMeta:{title:" ",...e},pcWidth:"100%",pcHeight:"100%",logoUrl:e&&e.logo&&e.registryUrl?_s({did:e.did,version:e.version,baseUrl:e.registryUrl,logoPath:e.logo}):null,stepTip:l("blocklet.component.add"),children:c.jsx(lh,{children:p
|
|
747
|
+
`,_n=g.forwardRef(({meta:e,isMobile:t,onStepChange:r},n)=>{const{steps:i,activeStep:a,setActiveStepByKey:o,setActiveStepByIndex:s}=Ks(),{t:l,locale:u}=we(),p=i[a];return g.useEffect(()=>{r(a)},[r,a]),g.useImperativeHandle(n,()=>({setActiveStepByKey:o,setActiveStepByIndex:s})),c.jsx(ch,{component:"div",className:t?"mobileStyle":"",sx:{height:"calc(100% - 56px)","&>div>div>div:first-child":{flex:{md:1}}},children:c.jsx(Ws,{locale:u,blockletMeta:{title:" ",...e},pcWidth:"100%",pcHeight:"100%",logoUrl:e&&e.logo&&e.registryUrl?_s({did:e.did,version:e.version,baseUrl:e.registryUrl,logoPath:e.logo}):null,stepTip:l("blocklet.component.add"),children:c.jsx(lh,{children:typeof(p==null?void 0:p.body)=="function"?p.body():p==null?void 0:p.body})})})});_n.propTypes={meta:k.any,onStepChange:k.func.isRequired,isMobile:k.bool.isRequired};_n.defaultProps={meta:null};const ca=e=>e.isMobile?`
|
|
748
748
|
height: calc(100vh - 56px - 64px - 48px);
|
|
749
749
|
`:"",lh=ae.div`
|
|
750
750
|
width: 100%;
|
|
@@ -773,8 +773,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
775
|
|
|
776
|
-
|
|
777
|
-
|
|
778
776
|
// content-panel
|
|
779
777
|
.root-header + div{
|
|
780
778
|
padding-top: 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as B,af as L,bv as W,$ as O,r,c as A,c0 as T,bu as _,k as h,h as $,c1 as F,j as w,ap as K}from"./index-CZq1iuqc.js";import{A as z,S as G}from"./add-component-core-CATRvviC.js";import"./lottie-DHZm2Pp-.js";import"./index-CptRhWH5.js";import"./spaces-Dxw-EmTw.js";import"./index-ClrMer_1.js";import"./api-BFSOae_v.js";import"./url-join-BUXfHAG-.js";import"./Skeleton-5Ejh8uW9.js";import"./Hidden-BtwYfeyy.js";import"./launch-result-message-Bur7t6_c.js";import"./Close-DJPwlagN.js";import"./page-header-Doy1SeXs.js";import"./uniqBy-moVi8I9O.js";import"./logo-uploader-KJa3kg20.js";import"./index-CzsxjdeJ.js";import"./index-l8yj4zzE.js";import"./EditIcon-BWMMTTyf.js";import"./Done-CegxfXGS.js";import"./Google-D6M8c4go.js";import"./TextField-BHSEV3Ac.js";import"./FormControl-02YkGBiU.js";import"./useFormControl-BrCPFkZH.js";import"./InputLabel-D_H-0SoX.js";import"./Select-DCbRxmUU.js";import"./index-CyUODU0b.js";import"./FormControlLabel-BZuIe-KU.js";import"./index-BB-3C_7E.js";import"./session-Ci3gpI0a.js";import"./did-address-01PnQBPQ.js";import"./Link-1nuQkwqf.js";import"./Stepper-BFMAEaBf.js";import"./format-error-BLTYbOE0.js";import"./Alert-X8Tf_Ya2.js";import"./useSlot-BSk477LF.js";import"./item-DbGtGKeZ.js";import"./Add-CY4Vajpf.js";import"./MoreVert-DhDSKiqk.js";import"./Launch-B0EjmiiU.js";import"./DeleteOutline-yfbdyPMw.js";import"./click-to-copy-CaJFO5Kq.js";import"./shorten-label-FpBR8oOW.js";import"./confirm-BzNK2mDA.js";import"./Avatar-DzypDi2F.js";import"./ButtonGroup-Yl1SMoBq.js";import"./jss-plugin-props-sort.esm-DvQhW7jP.js";import"./toPropertyKey-hKuLU48H.js";import"./ListItemText-Bn_r5n_z.js";import"./util-Do8cOsC3.js";import"./connect-to-CsUlyY6l.js";import"./use-blocklet-info-for-connect-did-spaces-DhpD5O4W.js";import"./CloseOutlined-D1ZA66gd.js";import"./index-K7xQGL1m.js";import"./ExpandMore-BoZqCbU8.js";import"./content-layout-7iVGY_ud.js";import"./ArrowDropDown-B1ERiCZ6.js";import"./useLocalStorage-DrhIkVxO.js";import"./fallback-D4IbwHOh.js";import"./index-7PLdtDxY.js";import"./Search-DTUqGlmf.js";import"./index-Cf2_yBdK.js";import"./InputAdornment-B3Ml-Pew.js";import"./preact.module-B1z5cdvs.js";function Zt(){var d;const{t:g}=B(),{blocklet:a}=L(),{componentDid:s}=W(),f=O(t=>t.breakpoints.down("md")),e=new URL(window.location.href),C=e.searchParams.get("mode")==="dialog",p=e.searchParams.get("resourceType")||"",c=e.searchParams.get("resourceDid")||s,R=e.searchParams.get("store")||"",S=e.searchParams.get("showFromUrl")!=="false",y=e.searchParams.get("showResourcesSwitch")!=="false",E=e.searchParams.get("enableRunBackground")!=="false",P=e.searchParams.get("showCategory")!=="false",n=(d=a==null?void 0:a.meta)==null?void 0:d.did,m=R.split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[b,D]=r.useState(m.map(t=>({url:t,name:t.replace("https://","")}))),[U,x]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const t=await Promise.all(m.map(async o=>{const i=A(o,"/api/store.json"),{data:v}=await T.get(i);return{url:o,name:v.name}}));D(t||[])}catch(t){console.error(t)}})()},[m.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const t=_();return n&&t.connect(),()=>{n&&t.isConnected()&&t.disconnect()}},[n]),h(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const l=$(t=>{var o,i;((o=t.data)==null?void 0:o.event)==="resourceDialog.select"&&((i=t.data)==null?void 0:i.componentDid)===s&&(x(t.data.data),M(t.data.storeUrl))});h(()=>{window.addEventListener("message",l)}),F(()=>{window.removeEventListener("message",l)});const u=({inDialog:t=!0}={})=>w.jsx(z,{stores:b,selectedMeta:U,storeUrl:j,resourceType:p,resourceDid:c,mode:"embed",inDialog:t,storageKey:G(`${p}+${c}`),showResourcesSwitch:y,showFromUrl:S,enableRunBackground:E,showCategory:P});return C?w.jsx(K,{className:"resource-dialog",title:g("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:f?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:u()}):u({inDialog:!1})}export{Zt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as s,j as a,a0 as j,ay as P,az as O,aA as z,P as n,Z as _}from"./index-
|
|
1
|
+
import{r as s,j as a,a0 as j,ay as P,az as O,aA as z,P as n,Z as _}from"./index-CZq1iuqc.js";import{L as M}from"./selector-CoXEpXpq.js";import{d as S}from"./QuestionMarkCircle-D2W4KMR_.js";var c={};Object.defineProperty(c,"__esModule",{value:!0});var m=c.default=void 0;H(s);var p=a;function H(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function f(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?d(Object(o),!0).forEach(function(r){A(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function A(e,t,o){return t=C(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function C(e){var t=k(e,"string");return typeof t=="symbol"?t:String(t)}function k(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,p.jsx)("svg",f(f({},t),{},{children:(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.606 17.32a7.933 7.933 0 0 1-.581-1.18c-.165-.411-.312-.86-.44-1.339a7.639 7.639 0 0 0-1.586 1.054 7.69 7.69 0 0 0 2.607 1.465zm.657-1.675c-.16-.4-.305-.848-.429-1.335A7.643 7.643 0 0 1 10 14h.002c.734 0 1.463.104 2.165.31-.124.487-.268.935-.428 1.335-.283.707-.604 1.235-.925 1.575-.32.339-.595.447-.813.447-.218 0-.493-.108-.813-.447-.322-.34-.642-.867-.925-1.575zM10 12.667a8.976 8.976 0 0 1 2.436.334c.116-.727.193-1.511.22-2.334H7.344c.027.823.103 1.607.22 2.334A8.972 8.972 0 0 1 10 12.667zM7.345 9.333c.027-.823.103-1.607.22-2.334.791.223 1.61.335 2.436.334A8.974 8.974 0 0 0 12.437 7c.116.727.193 1.511.22 2.334H7.344zm6.646 1.334c-.03.982-.127 1.925-.28 2.797.81.367 1.56.852 2.227 1.439a7.666 7.666 0 0 0 1.734-4.236h-3.681zm3.681-1.334H13.99a19.718 19.718 0 0 0-.28-2.798 8.975 8.975 0 0 0 2.228-1.438 7.665 7.665 0 0 1 1.734 4.236zm1.329.669A9 9 0 1 1 1 10a9 9 0 0 1 18 0v.002zM2.329 9.333a7.665 7.665 0 0 1 1.734-4.236A8.974 8.974 0 0 0 6.29 6.535a19.74 19.74 0 0 0-.28 2.798H2.329zm0 1.334h3.682c.03.983.126 1.925.28 2.797a8.974 8.974 0 0 0-2.228 1.439 7.665 7.665 0 0 1-1.734-4.236zm10.648 5.473c.164-.411.312-.86.44-1.34.57.285 1.103.639 1.585 1.055a7.687 7.687 0 0 1-2.606 1.465c.216-.354.41-.751.58-1.18zm-.581-13.46c.967.316 1.85.819 2.606 1.465A7.64 7.64 0 0 1 13.417 5.2c-.128-.48-.276-.928-.44-1.34a7.925 7.925 0 0 0-.581-1.18zm-.657 1.675c.16.4.304.848.428 1.335a7.64 7.64 0 0 1-2.165.31H10a7.64 7.64 0 0 1-2.166-.31c.124-.487.268-.935.429-1.335.283-.708.603-1.235.925-1.575.32-.339.595-.447.813-.447.218 0 .492.108.813.447.321.34.642.867.925 1.575zM7.025 3.86c-.165.411-.312.86-.44 1.34a7.64 7.64 0 0 1-1.586-1.055A7.688 7.688 0 0 1 7.606 2.68c-.216.354-.41.751-.581 1.18z",fill:"currentColor"})}))};l.defaultProps={width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"};l.displayName="globe";m=c.default=l;function w({SessionContext:e,extraItems:t,showLocale:o,showHelper:r,showSessionManager:i,sessionManagerProps:h}){const{session:b}=s.useContext(e),{locale:g}=s.useContext(j),v=P(),x=()=>{if(v.pathname.indexOf("/store")>-1){window.open("https://www.arcblock.io/content/docs/createblocklet","_blank");return}window.open("https://www.arcblock.io/content/docs/blocklet-developer","_blank")};return a.jsxs(R,{children:[t.map((u,y)=>s.cloneElement(u,{key:y})),o&&a.jsx(M,{"data-cy":"locale-addon",icon:m,size:23,showText:!1,className:"locale-addon"}),r&&a.jsx(O,{onClick:x,children:a.jsx(S,{})}),i&&a.jsx(z,{locale:g,session:b,size:24,showRole:!0,...h,showManageBlocklet:!1})]})}w.propTypes={SessionContext:n.object.isRequired,webWalletUrl:n.string,extraItems:n.array,showLocale:n.bool,showSessionManager:n.bool,showHelper:n.bool,sessionManagerProps:n.object};w.defaultProps={webWalletUrl:"",extraItems:[],showLocale:!0,showSessionManager:!0,showHelper:!0,sessionManagerProps:{}};const R=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as f,gX as Yo,b4 as Vt,b3 as zo,dL as Wo,X as Ho,Y as Uo,j as m,eA as K,B as Ee,r as x,ae as en,aP as Yt,T as be,bk as Yn,az as _e,aQ as wn,aF as se,aK as ye,aG as w,ao as ze,aC as Pe,aB as Me,aD as ee,bj as rt,aH as ge,aI as Ce,aJ as ve,cY as Ye,cI as q,cE as Ko,cD as tt,ce as Ke,cz as nt,cQ as qo,gP as vn,cO as Go,dg as Rt,$ as zn,bm as Zo,dt as Qo,gO as Jo,cJ as zt,b as ht,cP as Xo,be as er,gN as Wn,eB as Hn,cZ as tn,cc as Un,cp as nn,W as we,gY as tr,Z as Ot,c4 as nr,c6 as or,N as rr,dc as sr,bf as Ge,aM as ar,u as on,l as ir,E as lr,c as cr,bi as Pn,bh as ur,gy as Be,a0 as Kn,gf as qn,aV as dr,a7 as Wt,gZ as fr,af as hr,z as mr}from"./index-BfhVorqV.js";import{T as pr}from"./index-DJLK29SJ.js";import{_ as gr}from"./permission-BEPRmEw3.js";import{I as yr}from"./iframe-s25HWReH.js";import{d as br}from"./LaunchOutlined-D8a8pCOt.js";import{r as rn,b as Gn,H as Fe,D as ot,B as Oe,y as Dr,E as xr,I as sn,z as Kt,M as gt,N as yt,A as Je,L as bt,e as Dt,J as St,K as kt,d as wr,Q as qt,G as mt,F as Mn,R as an,S as vr,Z as Pr,T as Mr,O as Cr,V as Sr,P as kr,W as Tr}from"./index-BU9mgEVG.js";import{d as Ir,B as Vr}from"./ChevronRight-BKcNccG9.js";import{_ as Zn}from"./toPropertyKey-hKuLU48H.js";import{G as me}from"./redux-tOVF_oDT.js";import{L as Qn}from"./MoreVert-er-bltGF.js";import{a as Rr}from"./ListItemText-Bnnk7Gbj.js";import{F as Cn}from"./FormControl-Kt4xANtI.js";import{S as Sn}from"./Select-BeNQ99oP.js";import{A as Or}from"./Alert-D91U5h--.js";import{f as Er}from"./format-error-B3RYdl6q.js";import{T as Ar}from"./TextField-D3XEyFR4.js";import{M as Jn}from"./InputAdornment-C5IWgB4u.js";import{p as Fr}from"./dashboard-BOQEjKT8.js";import{D as Lr}from"./index-5qacoeSv.js";import"./useAsync-6Zzjy7PW.js";import"./session-Cf-ZqG4P.js";import"./Avatar-XXXVLUFk.js";import"./useSlot-LBVvloQJ.js";import"./useFormControl-DUzGwbSY.js";import"./InputLabel-DbdmcDbJ.js";import"./useLocalStorage-B-I-NsSz.js";import"./confirm-CD6_CMUq.js";import"./Delete-DlfFien6.js";import"./PlayArrow-2r36AAmk.js";import"./ButtonGroup-k3SZjeUa.js";import"./RadioGroup-C7j1KJ7y.js";import"./FormControlLabel-B6ISinfm.js";import"./FormGroup-BEMyIGSj.js";import"./index-Xh4BYwzS.js";import"./spaces-Dm4toCmL.js";import"./index-UmXxvIz7.js";import"./api-C37A8mCN.js";import"./Link-DFzOJFD-.js";import"./useSetState-Be-I2Gl-.js";import"./fallback-rg9fefdL.js";import"./index-Ce3CP3Jp.js";import"./Toolbar-_9it32pJ.js";import"./Hidden-kl5Tbw1B.js";import"./index-Dn7MhkOZ.js";import"./selector-CNsCKDRb.js";import"./FilterList-QafrkXbd.js";import"./LastPage-DXISIPs8.js";import"./index-BPSr4f2j.js";import"./Search-CMyGk9R2.js";import"./index-D12KUiCG.js";const jr=f.oneOfType([f.func,f.object]),Xn=jr;var $r=Yo;function Nr(e,t){var n=e.length;if(n)return t+=t<0?n:0,$r(t,n)?e[t]:void 0}var Br=Nr,_r=Br,Yr=zo,zr=Wo;function Wr(e){return e=zr(e),Yr(function(t){return _r(t,e)})}var Hr=Wr;const Ur=Vt(Hr);function eo(e){rn(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Zn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Gn(r);(n===void 0||n<a||isNaN(Number(a)))&&(n=a)}),n||new Date(NaN)}function to(e){rn(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Zn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Gn(r);(n===void 0||n>a||isNaN(a.getDate()))&&(n=a)}),n||new Date(NaN)}function Kr(e){return rn(1,arguments),Fe(e,Date.now())}var ln={},qr=Uo;Object.defineProperty(ln,"__esModule",{value:!0});var no=ln.default=void 0,Gr=qr(Ho()),Zr=m;no=ln.default=(0,Gr.default)((0,Zr.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const Qr=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t)),Jr=(e,t)=>{const n=gt(bt(e),{locale:t}),r=yt(Dt(e),{locale:t}),a=[];for(let o=n;mt(o,r);)a.push(o),o=Kt(o,1);return a},Xr=({startDate:e},t)=>e&&Fe(t,e),es=({endDate:e},t)=>e&&Fe(t,e),ts=({startDate:e,endDate:t},n)=>e&&t&&(an(n,{start:e,end:t})||Fe(n,e)||Fe(n,t)),ns=({startDate:e,endDate:t})=>e&&t?Fe(e,t):!1,kn=(e,t)=>{if(e){const n=e instanceof Date?e:Dr(e);if(xr(n))return n}return t},os=(e,t,n)=>{const{startDate:r,endDate:a}=e;if(r&&a){const o=eo([r,t]),s=to([a,n]);return[o,sn(o,s)?Oe(o,1):s]}return[r,a]},rs=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:Kt(e,-1),endDate:Kt(e,-1)},{label:"This Week",startDate:gt(e,{locale:t}),endDate:yt(e,{locale:t})},{label:"Last Week",startDate:gt(Je(e,-1),{locale:t}),endDate:yt(Je(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Je(e,-1),endDate:e},{label:"This Month",startDate:bt(e),endDate:Dt(e)},{label:"Last Month",startDate:bt(Oe(e,-1)),endDate:Dt(Oe(e,-1))},{label:"This Year",startDate:St(e),endDate:kt(e)},{label:"Last Year",startDate:St(ot(e,-1)),endDate:kt(ot(e,-1))}],ss=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((r,a)=>e.getFullYear()-n+a)},as=({date:e,setDate:t,nextDisabled:n,prevDisabled:r,onClickNext:a,onClickPrevious:o,locale:s})=>{const i=typeof s<"u"?[...Array(12).keys()].map(u=>{var y;return(y=s.localize)===null||y===void 0?void 0:y.month(u,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],c=u=>{t(Sr(e,parseInt(u.target.value,10)))},l=u=>{t(kr(e,parseInt(u.target.value,10)))};return K.createElement(me,{container:!0,justifyContent:"space-between",alignItems:"center"},K.createElement(me,{item:!0,sx:{padding:"5px"}},K.createElement(_e,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:r,onClick:o},K.createElement(Pr,{color:r?"disabled":"action"}))),K.createElement(me,{item:!0},K.createElement(Cn,{variant:"standard"},K.createElement(Sn,{value:Mr(e),onChange:c,MenuProps:{disablePortal:!0}},i.map((u,y)=>K.createElement(wn,{key:u,value:y},u))))),K.createElement(me,{item:!0},K.createElement(Cn,{variant:"standard"},K.createElement(Sn,{value:Cr(e),onChange:l,MenuProps:{disablePortal:!0}},ss(e,30).map(u=>K.createElement(wn,{key:u,value:u},u))))),K.createElement(me,{item:!0,sx:{padding:"5px"}},K.createElement(_e,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:a},K.createElement(Ir,{color:n?"disabled":"action"}))))},is=({startOfRange:e,endOfRange:t,disabled:n,highlighted:r,outlined:a,filled:o,onClick:s,onHover:i,value:c})=>K.createElement(Ee,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:l=>!n&&r?l.palette.primary.light:void 0}},K.createElement(_e,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:l=>!n&&a?`1px solid ${l.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:l=>l.palette.primary.dark},backgroundColor:l=>l.palette.primary.dark}:{}),disabled:n,onClick:s,onMouseOver:i},K.createElement(be,{sx:{lineHeight:1.6,color:l=>n?l.palette.text.secondary:o?l.palette.primary.contrastText:l.palette.text.primary},variant:"body2"},c)));var Tt;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(Tt||(Tt={}));const Tn=e=>{var t;const{helpers:n,handlers:r,value:a,dateRange:o,marker:s,setValue:i,minDate:c,maxDate:l,locale:u}=e,y=((t=u==null?void 0:u.options)===null||t===void 0?void 0:t.weekStartsOn)||0,D=typeof u<"u"?[...Array(7).keys()].map(d=>{var b;return(b=u.localize)===null||b===void 0?void 0:b.day((d+y)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[h,k]=e.navState;return K.createElement(en,{square:!0,elevation:0,sx:{width:290}},K.createElement(me,{container:!0},K.createElement(as,{date:a,setDate:i,nextDisabled:!k,prevDisabled:!h,onClickPrevious:()=>r.onMonthNavigate(s,Tt.Previous),onClickNext:()=>r.onMonthNavigate(s,Tt.Next),locale:u}),K.createElement(me,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},D.map((d,b)=>K.createElement(be,{color:"textSecondary",key:b,variant:"caption"},d))),K.createElement(me,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},Qr(Jr(a,u),7).map((d,b)=>K.createElement(me,{key:b,container:!0,direction:"row",justifyContent:"center"},d.map(p=>{const g=Xr(o,p),v=es(o,p),T=ns(o),P=ts(o,p)||n.inHoverRange(p);return K.createElement(is,{key:qt(p,"dd-MM-yyyy"),filled:g||v,outlined:Kr(p),highlighted:P&&!T,disabled:!sn(a,p)||!an(p,{start:c,end:l}),startOfRange:g&&!T,endOfRange:v&&!T,onClick:()=>r.onDayClick(p),onHover:()=>r.onDayHover(p),value:vr(p)})}))))))},In=(e,t)=>{const{startDate:n,endDate:r}=e,{startDate:a,endDate:o}=t;return n&&a&&r&&o?Fe(n,a)&&Fe(r,o):!1},ls=({ranges:e,setRange:t,selectedRange:n})=>K.createElement(Yn,null,e.map((r,a)=>K.createElement(Qn,{button:!0,key:a,onClick:()=>t(r),sx:[In(r,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},K.createElement(Rr,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:In(r,n)?"bold":"normal"}}},r.label)))),Gt={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},cs=e=>{const{ranges:t,dateRange:n,minDate:r,maxDate:a,firstMonth:o,setFirstMonth:s,secondMonth:i,setSecondMonth:c,setDateRange:l,helpers:u,handlers:y,locale:D}=e,{startDate:h,endDate:k}=n,d=wr(i,o)>=2,b={dateRange:n,minDate:r,maxDate:a,helpers:u,handlers:y};return K.createElement(en,{elevation:5,square:!0},K.createElement(me,{container:!0,direction:"row",wrap:"nowrap"},K.createElement(me,null,K.createElement(ls,{selectedRange:n,ranges:t,setRange:l})),K.createElement(Yt,{orientation:"vertical",flexItem:!0}),K.createElement(me,null,K.createElement(me,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},K.createElement(me,{item:!0,sx:{flex:1,textAlign:"center"}},K.createElement(be,{variant:"subtitle1"},h?qt(h,"dd MMMM yyyy",{locale:D}):"Start Date")),K.createElement(me,{item:!0,sx:{flex:1,textAlign:"center"}},K.createElement(no,{color:"action"})),K.createElement(me,{item:!0,sx:{flex:1,textAlign:"center"}},K.createElement(be,{variant:"subtitle1"},k?qt(k,"dd MMMM yyyy",{locale:D}):"End Date"))),K.createElement(Yt,null),K.createElement(me,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},K.createElement(Tn,Object.assign({},b,{value:o,setValue:s,navState:[!0,d],marker:Gt.FIRST_MONTH,locale:D})),K.createElement(Yt,{orientation:"vertical",flexItem:!0}),K.createElement(Tn,Object.assign({},b,{value:i,setValue:c,navState:[d,!0],marker:Gt.SECOND_MONTH,locale:D}))))))},us=e=>{const t=new Date,{open:n,onChange:r,initialDateRange:a,minDate:o,maxDate:s,definedRanges:i=rs(new Date,e.locale),locale:c}=e,l=kn(o,ot(t,-10)),u=kn(s,ot(t,10)),[y,D]=os(a||{},l,u),[h,k]=x.useState(Object.assign({},a)),[d,b]=x.useState(),[p,g]=x.useState(y||t),[v,T]=x.useState(D||Oe(p,1)),{startDate:P,endDate:O}=h,R=F=>{mt(F,v)&&g(F)},E=F=>{Mn(F,p)&&T(F)},M=F=>{let{startDate:_,endDate:L}=F;if(_&&L)F.startDate=_=eo([_,l]),F.endDate=L=to([L,u]),k(F),r(F),g(_),T(sn(_,L)?Oe(_,1):L);else{const Y={};k(Y),r(Y),g(t),T(Oe(p,1))}},B=F=>{if(P&&!O&&!mt(F,P)){const _={startDate:P,endDate:F};r(_),k(_)}else k({startDate:F,endDate:void 0});b(F)},V=(F,_)=>{if(F===Gt.FIRST_MONTH){const L=Oe(p,_);mt(L,v)&&g(L)}else{const L=Oe(v,_);mt(p,L)&&T(L)}},A=F=>{P&&!O&&(!d||!Fe(F,d))&&b(F)},S={inHoverRange:F=>P&&!O&&d&&Mn(d,P)&&an(F,{start:P,end:d})},C={onDayClick:B,onDayHover:A,onMonthNavigate:V};return n?x.createElement(cs,{dateRange:h,minDate:l,maxDate:u,ranges:i,firstMonth:p,secondMonth:v,setFirstMonth:R,setSecondMonth:E,setDateRange:M,helpers:S,handlers:C,locale:c}):null},ds=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:r,open:a}=e,o=()=>{t!==!1&&r()},s=i=>(i==null?void 0:i.key)==="Escape"&&o();return K.createElement(Ee,{sx:{position:"relative"}},a&&K.createElement(Ee,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:s,onClick:o}),K.createElement(Ee,{sx:{position:"relative",zIndex:1},className:n},K.createElement(us,Object.assign({},e))))},fs=e=>K.createElement(ds,Object.assign({},e)),hs=["localeText"],Zt=x.createContext(null),cn=function(t){var n;const{localeText:r}=t,a=se(t,hs),{utils:o,localeText:s}=(n=x.useContext(Zt))!=null?n:{utils:void 0,localeText:void 0},i=ye({props:a,name:"MuiLocalizationProvider"}),{children:c,dateAdapter:l,dateFormats:u,dateLibInstance:y,adapterLocale:D,localeText:h}=i,k=x.useMemo(()=>w({},h,s,r),[h,s,r]),d=x.useMemo(()=>{if(!l)return o||null;const g=new l({locale:D,formats:u,instance:y});if(!g.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
|
|
1
|
+
import{P as f,gX as Yo,b4 as Vt,b3 as zo,dL as Wo,X as Ho,Y as Uo,j as m,eA as K,B as Ee,r as x,ae as en,aP as Yt,T as be,bi as Yn,az as _e,aQ as wn,aF as se,aK as ye,aG as w,ao as ze,aC as Pe,aB as Me,aD as ee,bh as rt,aH as ge,aI as Ce,aJ as ve,cY as Ye,cI as q,cE as Ko,cD as tt,cd as Ke,cz as nt,cQ as qo,gP as vn,cO as Go,dg as Rt,$ as zn,bk as Zo,dt as Qo,gO as Jo,cJ as zt,b as ht,cP as Xo,bc as er,gN as Wn,eB as Hn,cZ as tn,cb as Un,cq as nn,W as we,gY as tr,Z as Ot,c3 as nr,c5 as or,N as rr,dc as sr,bd as Ge,aM as ar,u as on,l as ir,E as lr,c as cr,bg as Pn,bf as ur,gy as Be,a0 as Kn,gf as qn,aV as dr,a7 as Wt,gZ as fr,af as hr,z as mr}from"./index-CZq1iuqc.js";import{T as pr}from"./index-Bs7XqsZf.js";import{_ as gr}from"./permission-BWAp0U1U.js";import{I as yr}from"./iframe-DAPuN1dW.js";import{d as br}from"./LaunchOutlined-sgP85ul9.js";import{r as rn,b as Gn,H as Fe,D as ot,B as Oe,y as Dr,E as xr,I as sn,z as Kt,M as gt,N as yt,A as Je,L as bt,e as Dt,J as St,K as kt,d as wr,Q as qt,G as mt,F as Mn,R as an,S as vr,Z as Pr,T as Mr,O as Cr,V as Sr,P as kr,W as Tr}from"./index-Bf4S7Fg9.js";import{d as Ir,B as Vr}from"./ChevronRight-yT0593W6.js";import{_ as Zn}from"./toPropertyKey-hKuLU48H.js";import{G as me}from"./redux-DJ4kW5cs.js";import{L as Qn}from"./MoreVert-DhDSKiqk.js";import{a as Rr}from"./ListItemText-Bn_r5n_z.js";import{F as Cn}from"./FormControl-02YkGBiU.js";import{S as Sn}from"./Select-DCbRxmUU.js";import{A as Or}from"./Alert-X8Tf_Ya2.js";import{f as Er}from"./format-error-BLTYbOE0.js";import{T as Ar}from"./TextField-BHSEV3Ac.js";import{M as Jn}from"./InputAdornment-B3Ml-Pew.js";import{p as Fr}from"./dashboard-Dy_5eyk1.js";import{D as Lr}from"./index-B_Mn_6jy.js";import"./useAsync-BLjRrBya.js";import"./session-Ci3gpI0a.js";import"./Avatar-DzypDi2F.js";import"./useSlot-BSk477LF.js";import"./useFormControl-BrCPFkZH.js";import"./InputLabel-D_H-0SoX.js";import"./useLocalStorage-DrhIkVxO.js";import"./confirm-BzNK2mDA.js";import"./Delete-LnXfw8II.js";import"./PlayArrow-MoLzECrB.js";import"./ButtonGroup-Yl1SMoBq.js";import"./RadioGroup-C3L5xJaa.js";import"./FormControlLabel-BZuIe-KU.js";import"./FormGroup-CUYWiNiM.js";import"./index-CbcN4v3T.js";import"./Link-1nuQkwqf.js";import"./useSetState-CbQrbQss.js";import"./fallback-D4IbwHOh.js";import"./index-Dvf9hLBW.js";import"./Toolbar-D3YIXjSy.js";import"./Hidden-BtwYfeyy.js";import"./index-CLFX4mT1.js";import"./selector-CoXEpXpq.js";import"./FilterList-C75puMMo.js";import"./LastPage-D-3vv4wE.js";import"./index-BCLn-9S9.js";import"./Search-DTUqGlmf.js";import"./index-7PLdtDxY.js";const jr=f.oneOfType([f.func,f.object]),Xn=jr;var $r=Yo;function Nr(e,t){var n=e.length;if(n)return t+=t<0?n:0,$r(t,n)?e[t]:void 0}var Br=Nr,_r=Br,Yr=zo,zr=Wo;function Wr(e){return e=zr(e),Yr(function(t){return _r(t,e)})}var Hr=Wr;const Ur=Vt(Hr);function eo(e){rn(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Zn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Gn(r);(n===void 0||n<a||isNaN(Number(a)))&&(n=a)}),n||new Date(NaN)}function to(e){rn(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Zn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Gn(r);(n===void 0||n>a||isNaN(a.getDate()))&&(n=a)}),n||new Date(NaN)}function Kr(e){return rn(1,arguments),Fe(e,Date.now())}var ln={},qr=Uo;Object.defineProperty(ln,"__esModule",{value:!0});var no=ln.default=void 0,Gr=qr(Ho()),Zr=m;no=ln.default=(0,Gr.default)((0,Zr.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const Qr=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t)),Jr=(e,t)=>{const n=gt(bt(e),{locale:t}),r=yt(Dt(e),{locale:t}),a=[];for(let o=n;mt(o,r);)a.push(o),o=Kt(o,1);return a},Xr=({startDate:e},t)=>e&&Fe(t,e),es=({endDate:e},t)=>e&&Fe(t,e),ts=({startDate:e,endDate:t},n)=>e&&t&&(an(n,{start:e,end:t})||Fe(n,e)||Fe(n,t)),ns=({startDate:e,endDate:t})=>e&&t?Fe(e,t):!1,kn=(e,t)=>{if(e){const n=e instanceof Date?e:Dr(e);if(xr(n))return n}return t},os=(e,t,n)=>{const{startDate:r,endDate:a}=e;if(r&&a){const o=eo([r,t]),s=to([a,n]);return[o,sn(o,s)?Oe(o,1):s]}return[r,a]},rs=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:Kt(e,-1),endDate:Kt(e,-1)},{label:"This Week",startDate:gt(e,{locale:t}),endDate:yt(e,{locale:t})},{label:"Last Week",startDate:gt(Je(e,-1),{locale:t}),endDate:yt(Je(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Je(e,-1),endDate:e},{label:"This Month",startDate:bt(e),endDate:Dt(e)},{label:"Last Month",startDate:bt(Oe(e,-1)),endDate:Dt(Oe(e,-1))},{label:"This Year",startDate:St(e),endDate:kt(e)},{label:"Last Year",startDate:St(ot(e,-1)),endDate:kt(ot(e,-1))}],ss=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((r,a)=>e.getFullYear()-n+a)},as=({date:e,setDate:t,nextDisabled:n,prevDisabled:r,onClickNext:a,onClickPrevious:o,locale:s})=>{const i=typeof s<"u"?[...Array(12).keys()].map(u=>{var y;return(y=s.localize)===null||y===void 0?void 0:y.month(u,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],c=u=>{t(Sr(e,parseInt(u.target.value,10)))},l=u=>{t(kr(e,parseInt(u.target.value,10)))};return K.createElement(me,{container:!0,justifyContent:"space-between",alignItems:"center"},K.createElement(me,{item:!0,sx:{padding:"5px"}},K.createElement(_e,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:r,onClick:o},K.createElement(Pr,{color:r?"disabled":"action"}))),K.createElement(me,{item:!0},K.createElement(Cn,{variant:"standard"},K.createElement(Sn,{value:Mr(e),onChange:c,MenuProps:{disablePortal:!0}},i.map((u,y)=>K.createElement(wn,{key:u,value:y},u))))),K.createElement(me,{item:!0},K.createElement(Cn,{variant:"standard"},K.createElement(Sn,{value:Cr(e),onChange:l,MenuProps:{disablePortal:!0}},ss(e,30).map(u=>K.createElement(wn,{key:u,value:u},u))))),K.createElement(me,{item:!0,sx:{padding:"5px"}},K.createElement(_e,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:a},K.createElement(Ir,{color:n?"disabled":"action"}))))},is=({startOfRange:e,endOfRange:t,disabled:n,highlighted:r,outlined:a,filled:o,onClick:s,onHover:i,value:c})=>K.createElement(Ee,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:l=>!n&&r?l.palette.primary.light:void 0}},K.createElement(_e,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:l=>!n&&a?`1px solid ${l.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:l=>l.palette.primary.dark},backgroundColor:l=>l.palette.primary.dark}:{}),disabled:n,onClick:s,onMouseOver:i},K.createElement(be,{sx:{lineHeight:1.6,color:l=>n?l.palette.text.secondary:o?l.palette.primary.contrastText:l.palette.text.primary},variant:"body2"},c)));var Tt;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(Tt||(Tt={}));const Tn=e=>{var t;const{helpers:n,handlers:r,value:a,dateRange:o,marker:s,setValue:i,minDate:c,maxDate:l,locale:u}=e,y=((t=u==null?void 0:u.options)===null||t===void 0?void 0:t.weekStartsOn)||0,D=typeof u<"u"?[...Array(7).keys()].map(d=>{var b;return(b=u.localize)===null||b===void 0?void 0:b.day((d+y)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[h,k]=e.navState;return K.createElement(en,{square:!0,elevation:0,sx:{width:290}},K.createElement(me,{container:!0},K.createElement(as,{date:a,setDate:i,nextDisabled:!k,prevDisabled:!h,onClickPrevious:()=>r.onMonthNavigate(s,Tt.Previous),onClickNext:()=>r.onMonthNavigate(s,Tt.Next),locale:u}),K.createElement(me,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},D.map((d,b)=>K.createElement(be,{color:"textSecondary",key:b,variant:"caption"},d))),K.createElement(me,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},Qr(Jr(a,u),7).map((d,b)=>K.createElement(me,{key:b,container:!0,direction:"row",justifyContent:"center"},d.map(p=>{const g=Xr(o,p),v=es(o,p),T=ns(o),P=ts(o,p)||n.inHoverRange(p);return K.createElement(is,{key:qt(p,"dd-MM-yyyy"),filled:g||v,outlined:Kr(p),highlighted:P&&!T,disabled:!sn(a,p)||!an(p,{start:c,end:l}),startOfRange:g&&!T,endOfRange:v&&!T,onClick:()=>r.onDayClick(p),onHover:()=>r.onDayHover(p),value:vr(p)})}))))))},In=(e,t)=>{const{startDate:n,endDate:r}=e,{startDate:a,endDate:o}=t;return n&&a&&r&&o?Fe(n,a)&&Fe(r,o):!1},ls=({ranges:e,setRange:t,selectedRange:n})=>K.createElement(Yn,null,e.map((r,a)=>K.createElement(Qn,{button:!0,key:a,onClick:()=>t(r),sx:[In(r,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},K.createElement(Rr,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:In(r,n)?"bold":"normal"}}},r.label)))),Gt={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},cs=e=>{const{ranges:t,dateRange:n,minDate:r,maxDate:a,firstMonth:o,setFirstMonth:s,secondMonth:i,setSecondMonth:c,setDateRange:l,helpers:u,handlers:y,locale:D}=e,{startDate:h,endDate:k}=n,d=wr(i,o)>=2,b={dateRange:n,minDate:r,maxDate:a,helpers:u,handlers:y};return K.createElement(en,{elevation:5,square:!0},K.createElement(me,{container:!0,direction:"row",wrap:"nowrap"},K.createElement(me,null,K.createElement(ls,{selectedRange:n,ranges:t,setRange:l})),K.createElement(Yt,{orientation:"vertical",flexItem:!0}),K.createElement(me,null,K.createElement(me,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},K.createElement(me,{item:!0,sx:{flex:1,textAlign:"center"}},K.createElement(be,{variant:"subtitle1"},h?qt(h,"dd MMMM yyyy",{locale:D}):"Start Date")),K.createElement(me,{item:!0,sx:{flex:1,textAlign:"center"}},K.createElement(no,{color:"action"})),K.createElement(me,{item:!0,sx:{flex:1,textAlign:"center"}},K.createElement(be,{variant:"subtitle1"},k?qt(k,"dd MMMM yyyy",{locale:D}):"End Date"))),K.createElement(Yt,null),K.createElement(me,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},K.createElement(Tn,Object.assign({},b,{value:o,setValue:s,navState:[!0,d],marker:Gt.FIRST_MONTH,locale:D})),K.createElement(Yt,{orientation:"vertical",flexItem:!0}),K.createElement(Tn,Object.assign({},b,{value:i,setValue:c,navState:[d,!0],marker:Gt.SECOND_MONTH,locale:D}))))))},us=e=>{const t=new Date,{open:n,onChange:r,initialDateRange:a,minDate:o,maxDate:s,definedRanges:i=rs(new Date,e.locale),locale:c}=e,l=kn(o,ot(t,-10)),u=kn(s,ot(t,10)),[y,D]=os(a||{},l,u),[h,k]=x.useState(Object.assign({},a)),[d,b]=x.useState(),[p,g]=x.useState(y||t),[v,T]=x.useState(D||Oe(p,1)),{startDate:P,endDate:O}=h,R=F=>{mt(F,v)&&g(F)},E=F=>{Mn(F,p)&&T(F)},M=F=>{let{startDate:_,endDate:L}=F;if(_&&L)F.startDate=_=eo([_,l]),F.endDate=L=to([L,u]),k(F),r(F),g(_),T(sn(_,L)?Oe(_,1):L);else{const Y={};k(Y),r(Y),g(t),T(Oe(p,1))}},B=F=>{if(P&&!O&&!mt(F,P)){const _={startDate:P,endDate:F};r(_),k(_)}else k({startDate:F,endDate:void 0});b(F)},V=(F,_)=>{if(F===Gt.FIRST_MONTH){const L=Oe(p,_);mt(L,v)&&g(L)}else{const L=Oe(v,_);mt(p,L)&&T(L)}},A=F=>{P&&!O&&(!d||!Fe(F,d))&&b(F)},S={inHoverRange:F=>P&&!O&&d&&Mn(d,P)&&an(F,{start:P,end:d})},C={onDayClick:B,onDayHover:A,onMonthNavigate:V};return n?x.createElement(cs,{dateRange:h,minDate:l,maxDate:u,ranges:i,firstMonth:p,secondMonth:v,setFirstMonth:R,setSecondMonth:E,setDateRange:M,helpers:S,handlers:C,locale:c}):null},ds=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:r,open:a}=e,o=()=>{t!==!1&&r()},s=i=>(i==null?void 0:i.key)==="Escape"&&o();return K.createElement(Ee,{sx:{position:"relative"}},a&&K.createElement(Ee,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:s,onClick:o}),K.createElement(Ee,{sx:{position:"relative",zIndex:1},className:n},K.createElement(us,Object.assign({},e))))},fs=e=>K.createElement(ds,Object.assign({},e)),hs=["localeText"],Zt=x.createContext(null),cn=function(t){var n;const{localeText:r}=t,a=se(t,hs),{utils:o,localeText:s}=(n=x.useContext(Zt))!=null?n:{utils:void 0,localeText:void 0},i=ye({props:a,name:"MuiLocalizationProvider"}),{children:c,dateAdapter:l,dateFormats:u,dateLibInstance:y,adapterLocale:D,localeText:h}=i,k=x.useMemo(()=>w({},h,s,r),[h,s,r]),d=x.useMemo(()=>{if(!l)return o||null;const g=new l({locale:D,formats:u,instance:y});if(!g.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
|
|
2
2
|
`));return g},[l,D,u,y,o]),b=x.useMemo(()=>d?{minDate:d.date("1900-01-01T00:00:00.000"),maxDate:d.date("2099-12-31T00:00:00.000")}:null,[d]),p=x.useMemo(()=>({utils:d,defaultDates:b,localeText:k}),[b,d,k]);return m.jsx(Zt.Provider,{value:p,children:c})},ms=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:w({},e)}}}}),oo={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${t===null?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>e!==null&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>e!==null&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},ps=oo;ms(oo);const qe=()=>{const e=x.useContext(Zt);if(e===null)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
|
|
3
3
|
`));if(e.utils===null)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
|
|
4
4
|
`));const t=x.useMemo(()=>w({},ps,e.localeText),[e.localeText]);return x.useMemo(()=>w({},e,{localeText:t}),[e,t])},ue=()=>qe().utils,wt=()=>qe().defaultDates,We=()=>qe().localeText,vt=e=>{const t=ue(),n=x.useRef();return n.current===void 0&&(n.current=t.dateWithTimezone(void 0,e)),n.current},gs=ze(m.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ys=ze(m.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),bs=ze(m.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),Ds=ze(m.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");ze(m.jsxs(x.Fragment,{children:[m.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),m.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");ze(m.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");ze(m.jsxs(x.Fragment,{children:[m.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),m.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const xs=ze(m.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function ws(e){return Pe("MuiPickersArrowSwitcher",e)}Me("MuiPickersArrowSwitcher",["root","spacer","button"]);const vs=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],Ps=["ownerState"],Ms=["ownerState"],Cs=ee("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Ss=ee("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Vn=ee(_e,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>w({},e.hidden&&{visibility:"hidden"})),ks=e=>{const{classes:t}=e;return ve({root:["root"],spacer:["spacer"],button:["button"]},ws,t)},Ts=x.forwardRef(function(t,n){var r,a,o,s;const c=rt().direction==="rtl",l=ye({props:t,name:"MuiPickersArrowSwitcher"}),{children:u,className:y,slots:D,slotProps:h,isNextDisabled:k,isNextHidden:d,onGoToNext:b,nextLabel:p,isPreviousDisabled:g,isPreviousHidden:v,onGoToPrevious:T,previousLabel:P}=l,O=se(l,vs),R=l,E=ks(R),M={isDisabled:k,isHidden:d,goTo:b,label:p},B={isDisabled:g,isHidden:v,goTo:T,label:P},V=(r=D==null?void 0:D.previousIconButton)!=null?r:Vn,A=ge({elementType:V,externalSlotProps:h==null?void 0:h.previousIconButton,additionalProps:{size:"medium",title:B.label,"aria-label":B.label,disabled:B.isDisabled,edge:"end",onClick:B.goTo},ownerState:w({},R,{hidden:B.isHidden}),className:E.button}),I=(a=D==null?void 0:D.nextIconButton)!=null?a:Vn,S=ge({elementType:I,externalSlotProps:h==null?void 0:h.nextIconButton,additionalProps:{size:"medium",title:M.label,"aria-label":M.label,disabled:M.isDisabled,edge:"start",onClick:M.goTo},ownerState:w({},R,{hidden:M.isHidden}),className:E.button}),C=(o=D==null?void 0:D.leftArrowIcon)!=null?o:ys,F=ge({elementType:C,externalSlotProps:h==null?void 0:h.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),_=se(F,Ps),L=(s=D==null?void 0:D.rightArrowIcon)!=null?s:bs,Y=ge({elementType:L,externalSlotProps:h==null?void 0:h.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),U=se(Y,Ms);return m.jsxs(Cs,w({ref:n,className:Ce(E.root,y),ownerState:R},O,{children:[m.jsx(V,w({},A,{children:c?m.jsx(L,w({},U)):m.jsx(C,w({},_))})),u?m.jsx(be,{variant:"subtitle1",component:"span",children:u}):m.jsx(Ss,{className:E.spacer,ownerState:R}),m.jsx(I,w({},S,{children:c?m.jsx(C,w({},_)):m.jsx(L,w({},U))}))]}))}),ct=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),Is=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const a=n??r;let o;if(e!=null)o=e;else if(a.includes(t))o=t;else if(a.length>0)o=a[0];else throw new Error("MUI: The `views` prop must contain at least one view");return{views:a,openTo:o}},Vs=["hours","minutes","seconds"],Rs=e=>Vs.includes(e),Rn=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),Os=(e,t)=>(n,r)=>e?t.isAfter(n,r):Rn(n,t)>Rn(r,t);function ro({onChange:e,onViewChange:t,openTo:n,view:r,views:a,autoFocus:o,focusedView:s,onFocusedViewChange:i}){var c,l;const u=x.useRef(n),y=x.useRef(a),D=x.useRef(a.includes(n)?n:a[0]),[h,k]=Ye({name:"useViews",state:"view",controlled:r,default:D.current}),d=x.useRef(o?h:null),[b,p]=Ye({name:"useViews",state:"focusedView",controlled:s,default:d.current});x.useEffect(()=>{(u.current&&u.current!==n||y.current&&y.current.some(M=>!a.includes(M)))&&(k(a.includes(n)?n:a[0]),y.current=a,u.current=n)},[n,k,h,a]);const g=a.indexOf(h),v=(c=a[g-1])!=null?c:null,T=(l=a[g+1])!=null?l:null,P=q((M,B)=>{p(B?M:V=>M===V?null:V),i==null||i(M,B)}),O=q(M=>{P(M,!0),M!==h&&(k(M),t&&t(M))}),R=q(()=>{T&&O(T)}),E=q((M,B,V)=>{const A=B==="finish",I=V?a.indexOf(V)<a.length-1:!!T;if(e(M,A&&I?"partial":B,V),V&&V!==h){const C=a[a.indexOf(V)+1];C&&O(C)}else A&&R()});return{view:h,setView:O,focusedView:b,setFocusedView:P,nextView:T,previousView:v,defaultView:a.includes(n)?n:a[0],goToNextView:R,setValueAndGoToNextView:E}}function Es(e,{disableFuture:t,maxDate:n,timezone:r}){const a=ue();return x.useMemo(()=>{const o=a.dateWithTimezone(void 0,r),s=a.startOfMonth(t&&a.isBefore(o,n)?o:n);return!a.isAfter(s,e)},[t,n,e,a,r])}function As(e,{disablePast:t,minDate:n,timezone:r}){const a=ue();return x.useMemo(()=>{const o=a.dateWithTimezone(void 0,r),s=a.startOfMonth(t&&a.isAfter(o,n)?o:n);return!a.isBefore(s,e)},[t,n,e,a,r])}const xt=36,Et=2,At=320,Fs=280,un=334,Ls=ee("div")({overflow:"hidden",width:At,maxHeight:un,display:"flex",flexDirection:"column",margin:"0 auto"}),pt=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:a,isDateDisabled:o,utils:s,timezone:i})=>{const c=s.startOfDay(s.dateWithTimezone(void 0,i));n&&s.isBefore(a,c)&&(a=c),t&&s.isAfter(r,c)&&(r=c);let l=e,u=e;for(s.isBefore(e,a)&&(l=a,u=null),s.isAfter(e,r)&&(u&&(u=r),l=null);l||u;){if(l&&s.isAfter(l,r)&&(l=null),u&&s.isBefore(u,a)&&(u=null),l){if(!o(l))return l;l=s.addDays(l,1)}if(u){if(!o(u))return u;u=s.addDays(u,-1)}}return null},js=(e,t)=>t==null||!e.isValid(t)?null:t,ke=(e,t,n)=>t==null||!e.isValid(t)?n:t,$s=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),dn=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const a=r[r.length-1];r.push(e.addMonths(a,1))}return r},Qt=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r},so=(e,t,n)=>n==="date"?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),Ns=["year","month","day"],On=e=>Ns.includes(e),fn=(e,{format:t,views:n},r)=>{if(t!=null)return t;const a=e.formats;return ct(n,["year"])?a.year:ct(n,["month"])?a.month:ct(n,["day"])?a.dayOfMonth:ct(n,["month","year"])?`${a.month} ${a.year}`:ct(n,["day","month"])?`${a.month} ${a.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?a.normalDateWithWeekday:a.normalDate:a.keyboardDate},Bs=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},hn=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:a})=>{var o,s;const i=ue(),c=x.useRef(n),l=(o=t??c.current)!=null?o:a.emptyValue,u=x.useMemo(()=>a.getTimezone(i,l),[i,a,l]),y=q(d=>u==null?d:a.setTimezone(i,u,d)),D=(s=e??u)!=null?s:"default",h=x.useMemo(()=>a.setTimezone(i,D,l),[a,i,D,l]),k=q((d,...b)=>{const p=y(d);r==null||r(p,...b)});return{value:h,handleValueChange:k,timezone:D}},mn=({name:e,timezone:t,value:n,defaultValue:r,onChange:a,valueManager:o})=>{const[s,i]=Ye({name:e,state:"value",controlled:n,default:r??o.emptyValue}),c=q((l,...u)=>{i(l),a==null||a(l,...u)});return hn({timezone:t,value:s,defaultValue:void 0,onChange:c,valueManager:o})},Re={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},_s=e=>Math.max(...e.map(t=>{var n;return(n=Re[t.type])!=null?n:1})),ut=(e,t,n)=>{if(t===Re.year)return e.startOfYear(n);if(t===Re.month)return e.startOfMonth(n);if(t===Re.day)return e.startOfDay(n);let r=n;return t<Re.minutes&&(r=e.setMinutes(r,0)),t<Re.seconds&&(r=e.setSeconds(r,0)),t<Re.milliseconds&&(r=e.setMilliseconds(r,0)),r},Ys=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:a})=>{var o;let s=a?a():ut(t,n,so(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,s)&&(s=ut(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,s)&&(s=ut(t,n,e.maxDate));const i=Os((o=e.disableIgnoringDatePartForTimeValidation)!=null?o:!1,t);return e.minTime!=null&&i(e.minTime,s)&&(s=ut(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Qt(t,s,e.minTime))),e.maxTime!=null&&i(s,e.maxTime)&&(s=ut(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Qt(t,s,e.maxTime))),s},ao=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
|
|
@@ -39,7 +39,7 @@ import{P as f,gX as Yo,b4 as Vt,b3 as zo,dL as Wo,X as Ho,Y as Uo,j as m,eA as K
|
|
|
39
39
|
fill: red;
|
|
40
40
|
stroke: red;
|
|
41
41
|
}
|
|
42
|
-
`;function Pt({id:e,title:t,current:n,description:r,data:a,dateFn:o,valueFn:s}){const i=x.useRef(null),c=x.useRef(null),l=rr({style:{top:0,left:0},hidden:!0,textContent:""}),[u,y]=x.useState(null),D=sr(u),h={onmousemove(k,d){const{date:b,value:p}=d;l.textContent=`${o(b)}: ${s(p)}`,l.style.top=-30,l.style.left=80,l.hidden=!1},onmouseout(){l.hidden=!0}};return x.useEffect(()=>{setTimeout(()=>{y(document.querySelector(`.${e}`)),setTimeout(()=>{i.current&&Zl(i.current,a||[],h)},400)})},[a]),m.jsx(gn,{title:t,value:n,graph:m.jsxs("div",{className:`card-sparkline ${e}`,style:{marginTop:16},children:[m.jsx("svg",{ref:i,className:"sparkline",width:(D==null?void 0:D.width)||100,height:30,strokeWidth:"2"}),m.jsx("span",{className:"tooltip",ref:c,hidden:l.hidden,style:{...l.style},children:l.textContent})]}),description:r})}Pt.propTypes={id:f.string.isRequired,title:f.string.isRequired,current:f.any.isRequired,description:f.any,data:f.array,dateFn:f.func,valueFn:f.func};Pt.defaultProps={description:null,data:[],dateFn:e=>e,valueFn:e=>e};const Ae=Ur(0),Jl=(e,t)=>[{label:"This Week",startDate:gt(e,{locale:t}),endDate:yt(e,{locale:t})},{label:"Last Week",startDate:gt(Je(e,-1),{locale:t}),endDate:yt(Je(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Je(e,-1),endDate:e},{label:"This Month",startDate:bt(e),endDate:Dt(e)},{label:"Last Month",startDate:bt(Oe(e,-1)),endDate:Dt(Oe(e,-1))},{label:"This Year",startDate:St(e),endDate:kt(e)},{label:"Last Year",startDate:St(ot(e,-1)),endDate:kt(ot(e,-1))}];function Xl({client:e,did:t}){const n=Ge().subtract(1,"day").toDate(),{info:r,inService:a}=ar(),{t:o,locale:s}=on(),[i,c]=x.useState(null),[l,u]=x.useState(!1),[y,D]=x.useState(n),[h,k]=x.useState({startDate:Ge().subtract(30,"day").toDate(),endDate:n}),d=gr(async()=>(await e.getTrafficInsights({input:{did:t,startDate:Ge(h.startDate).format("YYYY-MM-DD"),endDate:Ge(h.endDate).format("YYYY-MM-DD")}})).list);x.useEffect(()=>{d.loading||h.startDate&&h.endDate&&d.retry()},[h]);const b=I=>{c(i?null:I.currentTarget)},p=d.value||[],{loading:g,error:v}=d;if(!p.length&&g)return m.jsx(ir,{});if(v)return m.jsx(Or,{severity:"error",children:Er(v)});const T={totalRequests:Ae,validRequests:Ae,failedRequests:Ae,uniqueVisitors:Ae,uniqueFiles:Ae,uniqueReferrers:Ae,uniqueNotFound:Ae,uniqueStaticFiles:Ae,logSize:Be,bandwidth:Be},P=Object.keys(T).map(I=>({id:`${I}_chart`,title:o(`analytics.traffic.${I}`),current:p.length?T[I](p[0][I]):0,data:p.map(S=>({date:S.date,value:S[I]})).reverse(),dateFn:Ae,valueFn:T[I]})),O=!!i,R=O?"date-range-picker-popover":void 0,E=a?lr.WELLKNOWN_SERVICE_PATH_PREFIX:r.routing.adminPath,M=cr(window.location.origin,E,`/api/analytics/traffic?date=${Ge(y).format("YYYY-MM-DD")}&did=${t}`),B=I=>{k(I),c(null)},V=I=>{D(I.toDate()),u(!1)},A=()=>{window.open(M)};return m.jsxs("div",{children:[m.jsxs(be,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:[o("analytics.trend"),m.jsxs(ht,{onClick:b,variant:"outlined",size:"small",color:"secondary",children:[Pn(h.startDate,s)," - ",Pn(h.endDate,s)]})]}),m.jsx(ur,{id:R,open:O,anchorEl:i,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:m.jsx(fs,{open:!0,toggle:b,maxDate:n,definedRanges:Jl(y),onChange:B})}),m.jsx(me,{container:!0,spacing:4,children:P.map(I=>m.jsx(me,{item:!0,lg:3,md:6,sm:6,xs:12,children:m.jsx(Pt,{...I})},I.id))}),m.jsxs(be,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mt:4,mb:1,children:[o("analytics.detail"),m.jsxs("span",{children:[l&&m.jsx(_e,{onClick:A,style:{marginRight:32},children:m.jsx(br,{})}),m.jsx(cn,{dateAdapter:Kl,children:m.jsx(Ll,{disableFuture:!0,format:"ll",value:Ge(y),onChange:V,slotProps:{textField:{size:"small"}}})})]})]}),m.jsx(yr,{url:M,width:"100%",height:"100%",frameBorder:0,onLoad:()=>u(!0),styles:{border:0,minHeight:"400vh"}})]})}const ec=e=>`${e}%`;function yn({cpus:e,currentLoad:t,history:n}){const{t:r,locale:a}=x.useContext(Kn);return m.jsx(Pt,{id:"cpu-sparkline",title:r("common.cpu"),current:`${Math.floor(t||0)}%`,data:n,description:`${r("system.cores")}: ${(e==null?void 0:e.length)||0}`,dateFn:o=>qn(o,"HH:mm:ss",a),valueFn:ec})}yn.propTypes={cpus:f.array,currentLoad:f.number,history:f.array};yn.defaultProps={cpus:[],currentLoad:0,history:[]};function bn({instanceCount:e,title:t,total:n,used:r,history:a}){const{t:o,locale:s}=on(),i=!!n,c=n-r,l=i?`(${Math.floor(r/n*100)}%)`:"",u=[];return e&&u.push({title:o("system.instances"),metric:e}),u.push({title:o("system.used"),metric:Be(r)}),i&&u.push({title:o("system.free"),metric:Be(c)},{title:o("system.total"),metric:Be(n)}),m.jsx(Pt,{id:"mem-sparkline",title:t||o("common.memory"),current:`${Be(Math.floor(r||0))} ${l}`,data:a,description:u.map((y,D)=>m.jsxs(Ee,{sx:{marginLeft:D===0?0:2},children:[y.title,": ",y.metric]},y.title)),dateFn:y=>qn(y,"HH:mm:ss",s),valueFn:Be})}bn.propTypes={title:f.string,instanceCount:f.number,total:f.number,used:f.number,history:f.array};bn.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[]};function Dn({blocklet:e,cpuHistory:t,memoryHistory:n,...r}){const a=e.appRuntimeInfo||{};return m.jsx(tc,{component:"div",...r,children:m.jsxs(me,{className:"page-metrics",container:!0,spacing:5,children:[m.jsx(me,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!t.length&&m.jsx(yn,{currentLoad:a.cpuUsage||0,history:t,style:{height:150}})},"cpu"),m.jsx(me,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&m.jsx(bn,{used:a.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}Dn.propTypes={blocklet:f.object.isRequired,cpuHistory:f.arrayOf(f.shape({date:f.number,value:f.number})),memoryHistory:f.arrayOf(f.shape({date:f.number,value:f.number}))};Dn.defaultProps={cpuHistory:[],memoryHistory:[]};const tc=Ot(be)``;function Lo(){const{t:e,locale:t}=on(),{blocklet:n,runtimeHistory:r,actions:{refreshBlocklet:a}}=dr(),o=x.useMemo(()=>{const c=[];return Wt.forEachBlockletSync(n,(l,{ancestors:u,id:y,level:D})=>{l.runtimeInfo&&c.push({type:"blocklet",groupId:n.meta.did,groupName:Wt.getDisplayName(n),id:y,name:Wt.getDisplayName(l,!0),blocklet:n,component:l,level:D-1>=0?D-1:0,runtimeInfo:l.runtimeInfo,ancestors:u})}),c},[n]);x.useEffect(()=>{const c=setInterval(()=>{a()},1e4);return()=>{clearInterval(c)}},[]);const s=c=>Fr(Number(c||0),{locale:fr(t)}),i=[{label:e("common.name"),name:"name",options:{customBodyRenderLite(c){const{name:l,component:u,level:y,ancestors:D}=o[c];return m.jsxs(Ee,{display:"flex",alignItems:"center",pl:y*2,children:[m.jsx(Vr,{size:14,blocklet:u,ancestors:D}),m.jsx(Ee,{ml:1,children:l})]})}}},{label:e("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return s(l.uptime)}}},{label:e("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return Be((l==null?void 0:l.memoryUsage)||0)}}},{label:e("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return`${(l.cpuUsage||0).toFixed(1)}%`}}},{label:e("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:e("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return m.jsxs(nc,{component:"div",children:[m.jsx(be,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:e("analytics.trend")}),n.status==="running"?[m.jsx(Ee,{children:m.jsx(Dn,{blocklet:n,cpuHistory:r.cpu,memoryHistory:r.memory})}),m.jsx(Ee,{mt:3,children:m.jsx(Lr,{title:e("analytics.detail"),className:"monitor-table",locale:t,data:o,columns:i,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:m.jsx(be,{children:e("blocklet.runtimeInfo.noRunning")})]})}Lo.propTypes={};const nc=Ot(be)``;function
|
|
42
|
+
`;function Pt({id:e,title:t,current:n,description:r,data:a,dateFn:o,valueFn:s}){const i=x.useRef(null),c=x.useRef(null),l=rr({style:{top:0,left:0},hidden:!0,textContent:""}),[u,y]=x.useState(null),D=sr(u),h={onmousemove(k,d){const{date:b,value:p}=d;l.textContent=`${o(b)}: ${s(p)}`,l.style.top=-30,l.style.left=80,l.hidden=!1},onmouseout(){l.hidden=!0}};return x.useEffect(()=>{setTimeout(()=>{y(document.querySelector(`.${e}`)),setTimeout(()=>{i.current&&Zl(i.current,a||[],h)},400)})},[a]),m.jsx(gn,{title:t,value:n,graph:m.jsxs("div",{className:`card-sparkline ${e}`,style:{marginTop:16},children:[m.jsx("svg",{ref:i,className:"sparkline",width:(D==null?void 0:D.width)||100,height:30,strokeWidth:"2"}),m.jsx("span",{className:"tooltip",ref:c,hidden:l.hidden,style:{...l.style},children:l.textContent})]}),description:r})}Pt.propTypes={id:f.string.isRequired,title:f.string.isRequired,current:f.any.isRequired,description:f.any,data:f.array,dateFn:f.func,valueFn:f.func};Pt.defaultProps={description:null,data:[],dateFn:e=>e,valueFn:e=>e};const Ae=Ur(0),Jl=(e,t)=>[{label:"This Week",startDate:gt(e,{locale:t}),endDate:yt(e,{locale:t})},{label:"Last Week",startDate:gt(Je(e,-1),{locale:t}),endDate:yt(Je(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Je(e,-1),endDate:e},{label:"This Month",startDate:bt(e),endDate:Dt(e)},{label:"Last Month",startDate:bt(Oe(e,-1)),endDate:Dt(Oe(e,-1))},{label:"This Year",startDate:St(e),endDate:kt(e)},{label:"Last Year",startDate:St(ot(e,-1)),endDate:kt(ot(e,-1))}];function Xl({client:e,did:t}){const n=Ge().subtract(1,"day").toDate(),{info:r,inService:a}=ar(),{t:o,locale:s}=on(),[i,c]=x.useState(null),[l,u]=x.useState(!1),[y,D]=x.useState(n),[h,k]=x.useState({startDate:Ge().subtract(30,"day").toDate(),endDate:n}),d=gr(async()=>(await e.getTrafficInsights({input:{did:t,startDate:Ge(h.startDate).format("YYYY-MM-DD"),endDate:Ge(h.endDate).format("YYYY-MM-DD")}})).list);x.useEffect(()=>{d.loading||h.startDate&&h.endDate&&d.retry()},[h]);const b=I=>{c(i?null:I.currentTarget)},p=d.value||[],{loading:g,error:v}=d;if(!p.length&&g)return m.jsx(ir,{});if(v)return m.jsx(Or,{severity:"error",children:Er(v)});const T={totalRequests:Ae,validRequests:Ae,failedRequests:Ae,uniqueVisitors:Ae,uniqueFiles:Ae,uniqueReferrers:Ae,uniqueNotFound:Ae,uniqueStaticFiles:Ae,logSize:Be,bandwidth:Be},P=Object.keys(T).map(I=>({id:`${I}_chart`,title:o(`analytics.traffic.${I}`),current:p.length?T[I](p[0][I]):0,data:p.map(S=>({date:S.date,value:S[I]})).reverse(),dateFn:Ae,valueFn:T[I]})),O=!!i,R=O?"date-range-picker-popover":void 0,E=a?lr.WELLKNOWN_SERVICE_PATH_PREFIX:r.routing.adminPath,M=cr(window.location.origin,E,`/api/analytics/traffic?date=${Ge(y).format("YYYY-MM-DD")}&did=${t}`),B=I=>{k(I),c(null)},V=I=>{D(I.toDate()),u(!1)},A=()=>{window.open(M)};return m.jsxs("div",{children:[m.jsxs(be,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:[o("analytics.trend"),m.jsxs(ht,{onClick:b,variant:"outlined",size:"small",color:"secondary",children:[Pn(h.startDate,s)," - ",Pn(h.endDate,s)]})]}),m.jsx(ur,{id:R,open:O,anchorEl:i,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:m.jsx(fs,{open:!0,toggle:b,maxDate:n,definedRanges:Jl(y),onChange:B})}),m.jsx(me,{container:!0,spacing:4,children:P.map(I=>m.jsx(me,{item:!0,lg:3,md:6,sm:6,xs:12,children:m.jsx(Pt,{...I})},I.id))}),m.jsxs(be,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mt:4,mb:1,children:[o("analytics.detail"),m.jsxs("span",{children:[l&&m.jsx(_e,{onClick:A,style:{marginRight:32},children:m.jsx(br,{})}),m.jsx(cn,{dateAdapter:Kl,children:m.jsx(Ll,{disableFuture:!0,format:"ll",value:Ge(y),onChange:V,slotProps:{textField:{size:"small"}}})})]})]}),m.jsx(yr,{url:M,width:"100%",height:"100%",frameBorder:0,onLoad:()=>u(!0),styles:{border:0,minHeight:"400vh"}})]})}const ec=e=>`${e}%`;function yn({cpus:e,currentLoad:t,history:n}){const{t:r,locale:a}=x.useContext(Kn);return m.jsx(Pt,{id:"cpu-sparkline",title:r("common.cpu"),current:`${Math.floor(t||0)}%`,data:n,description:`${r("system.cores")}: ${(e==null?void 0:e.length)||0}`,dateFn:o=>qn(o,"HH:mm:ss",a),valueFn:ec})}yn.propTypes={cpus:f.array,currentLoad:f.number,history:f.array};yn.defaultProps={cpus:[],currentLoad:0,history:[]};function bn({instanceCount:e,title:t,total:n,used:r,history:a}){const{t:o,locale:s}=on(),i=!!n,c=n-r,l=i?`(${Math.floor(r/n*100)}%)`:"",u=[];return e&&u.push({title:o("system.instances"),metric:e}),u.push({title:o("system.used"),metric:Be(r)}),i&&u.push({title:o("system.free"),metric:Be(c)},{title:o("system.total"),metric:Be(n)}),m.jsx(Pt,{id:"mem-sparkline",title:t||o("common.memory"),current:`${Be(Math.floor(r||0))} ${l}`,data:a,description:u.map((y,D)=>m.jsxs(Ee,{sx:{marginLeft:D===0?0:2},children:[y.title,": ",y.metric]},y.title)),dateFn:y=>qn(y,"HH:mm:ss",s),valueFn:Be})}bn.propTypes={title:f.string,instanceCount:f.number,total:f.number,used:f.number,history:f.array};bn.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[]};function Dn({blocklet:e,cpuHistory:t,memoryHistory:n,...r}){const a=e.appRuntimeInfo||{};return m.jsx(tc,{component:"div",...r,children:m.jsxs(me,{className:"page-metrics",container:!0,spacing:5,children:[m.jsx(me,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!t.length&&m.jsx(yn,{currentLoad:a.cpuUsage||0,history:t,style:{height:150}})},"cpu"),m.jsx(me,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&m.jsx(bn,{used:a.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}Dn.propTypes={blocklet:f.object.isRequired,cpuHistory:f.arrayOf(f.shape({date:f.number,value:f.number})),memoryHistory:f.arrayOf(f.shape({date:f.number,value:f.number}))};Dn.defaultProps={cpuHistory:[],memoryHistory:[]};const tc=Ot(be)``;function Lo(){const{t:e,locale:t}=on(),{blocklet:n,runtimeHistory:r,actions:{refreshBlocklet:a}}=dr(),o=x.useMemo(()=>{const c=[];return Wt.forEachBlockletSync(n,(l,{ancestors:u,id:y,level:D})=>{l.runtimeInfo&&c.push({type:"blocklet",groupId:n.meta.did,groupName:Wt.getDisplayName(n),id:y,name:Wt.getDisplayName(l,!0),blocklet:n,component:l,level:D-1>=0?D-1:0,runtimeInfo:l.runtimeInfo,ancestors:u})}),c},[n]);x.useEffect(()=>{const c=setInterval(()=>{a()},1e4);return()=>{clearInterval(c)}},[]);const s=c=>Fr(Number(c||0),{locale:fr(t)}),i=[{label:e("common.name"),name:"name",options:{customBodyRenderLite(c){const{name:l,component:u,level:y,ancestors:D}=o[c];return m.jsxs(Ee,{display:"flex",alignItems:"center",pl:y*2,children:[m.jsx(Vr,{size:14,blocklet:u,ancestors:D}),m.jsx(Ee,{ml:1,children:l})]})}}},{label:e("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return s(l.uptime)}}},{label:e("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return Be((l==null?void 0:l.memoryUsage)||0)}}},{label:e("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return`${(l.cpuUsage||0).toFixed(1)}%`}}},{label:e("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:e("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return m.jsxs(nc,{component:"div",children:[m.jsx(be,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:e("analytics.trend")}),n.status==="running"?[m.jsx(Ee,{children:m.jsx(Dn,{blocklet:n,cpuHistory:r.cpu,memoryHistory:r.memory})}),m.jsx(Ee,{mt:3,children:m.jsx(Lr,{title:e("analytics.detail"),className:"monitor-table",locale:t,data:o,columns:i,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:m.jsx(be,{children:e("blocklet.runtimeInfo.noRunning")})]})}Lo.propTypes={};const nc=Ot(be)``;function Qc(){const{t:e}=x.useContext(Kn),{did:t,client:n}=hr(),[r,a]=mr(),[o,s]=x.useState(r.get("tab")||"traffic"),i=y=>{s(y)};x.useEffect(()=>{r.set("tab",o),a(r,{replace:!0})},[o]);const c=[{label:e("common.traffic"),value:"traffic"},{label:e("common.runtime"),value:"runtime"}],l={traffic:Xl,runtime:Lo},u=l[o]||l.traffic;return m.jsxs(oc,{children:[m.jsx(pr,{tabs:c,current:o,onChange:i}),m.jsx("div",{className:"page-content",children:x.isValidElement(u)?u:m.jsx(u,{client:n,did:t})})]},o)}const oc=Ot.main`
|
|
43
43
|
.page-header {
|
|
44
44
|
display: flex;
|
|
45
45
|
justify-content: space-between;
|
|
@@ -49,4 +49,4 @@ import{P as f,gX as Yo,b4 as Vt,b3 as zo,dL as Wo,X as Ho,Y as Uo,j as m,eA as K
|
|
|
49
49
|
.page-content {
|
|
50
50
|
margin-top: 16px;
|
|
51
51
|
}
|
|
52
|
-
`;export{
|
|
52
|
+
`;export{Qc as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c0 as a}from"./index-CZq1iuqc.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import{aM as C,r as n,j as t,q as P,u as M,l as T,B as x,aQ as B,Z as I,A as b,T as d,L,E as _}from"./index-CZq1iuqc.js";import{M as W}from"./index-CyUODU0b.js";import{E as F}from"./index-7PLdtDxY.js";import{T as z}from"./index-CbcN4v3T.js";import{_ as R}from"./useLocalStorage-DrhIkVxO.js";import{R as D}from"./dashboard-Dy_5eyk1.js";import{F as K}from"./FormControl-02YkGBiU.js";import{I as O}from"./InputLabel-D_H-0SoX.js";import{S as U}from"./Select-DCbRxmUU.js";import{P as q}from"./Pagination-BlS75-dT.js";import{r as G}from"./index-1I7IXhML.js";import"./index-Bs7XqsZf.js";import"./MoreVert-DhDSKiqk.js";import"./confirm-BzNK2mDA.js";import"./format-error-BLTYbOE0.js";import"./Alert-X8Tf_Ya2.js";import"./useSlot-BSk477LF.js";import"./Delete-LnXfw8II.js";import"./PlayArrow-MoLzECrB.js";import"./ListItemText-Bn_r5n_z.js";import"./ButtonGroup-Yl1SMoBq.js";import"./RadioGroup-C3L5xJaa.js";import"./FormControlLabel-BZuIe-KU.js";import"./useFormControl-BrCPFkZH.js";import"./FormGroup-CUYWiNiM.js";import"./Avatar-DzypDi2F.js";import"./session-Ci3gpI0a.js";import"./permission-BWAp0U1U.js";import"./useAsync-BLjRrBya.js";import"./Link-1nuQkwqf.js";import"./useSetState-CbQrbQss.js";import"./fallback-D4IbwHOh.js";import"./index-Dvf9hLBW.js";import"./Toolbar-D3YIXjSy.js";import"./Hidden-BtwYfeyy.js";import"./index-CLFX4mT1.js";import"./selector-CoXEpXpq.js";import"./LastPage-D-3vv4wE.js";const S=n.createContext({}),{Provider:H,Consumer:Fe}=S;function Q({children:e,scope:o="",categories:a=[],showScope:i,scopeFormatter:p}){const{api:s,info:l}=C(),[c,r]=n.useState([]),[f,A]=n.useState({total:0,pageSize:20,pageCount:0,page:1}),[j,h]=n.useState(!1),[u,k]=R(`audit-log-category-${o}`,"all"),N=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(g=>a.length?g.value==="all"||a.includes(g.value):!0),y=async({page:g=1,silent:$=!0}={})=>{if(!j){$||h(!0);try{const m=await s.getAuditLogs({input:{paging:{page:g},category:u==="all"?"":u,scope:o}});i&&(m.list||[]).forEach(v=>{v.scope!==l.did&&(v.link=`/blocklets/${v.scope}/components`)}),r(m.list),A(m.paging),h(!1)}catch(m){P.error(m.message),h(!1)}}};n.useEffect(()=>{y({page:1,silent:!1})},[]),n.useEffect(()=>{y({page:1,silent:!1})},[u]);const E={loading:j,fetch:y,filter:{category:u,scope:o},categories:N,setCategory:k,data:c,paging:f,showScope:i,scopeFormatter:p};return t.jsx(H,{value:{auditLogs:E},children:e})}function w(){const{auditLogs:e}=n.useContext(S);return e}const Z=({log:e,info:o,inService:a})=>a?`${_.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===o.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function J({log:e}){var l,c;const{inService:o,info:a}=C(),{showScope:i,scopeFormatter:p=r=>r}=w();if(!e.actor.did)return null;const s=!["blocklet",""].includes(e.actor.role);return t.jsxs(x,{className:"log-entry","data-cy":"log-entry",children:[t.jsx("div",{className:"log-author",children:s?t.jsx(b,{did:e.actor.did,size:36,shape:"circle"}):t.jsx(b,{did:e.actor.did,size:36})}),t.jsxs("div",{className:"log-body",children:[t.jsxs(d,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[i&&t.jsx(L,{to:e.link,children:t.jsx(z,{style:{marginRight:8},children:p(e.scope)})}),s?t.jsxs(L,{to:Z({log:e,inService:o,info:a}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):t.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",t.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),t.jsx(d,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:t.jsx(W,{source:e.content,rehypePlugins:[[G,{target:"_blank"}]]})}),t.jsxs(x,{className:"log-meta",variant:"body2",children:[!!e.ip&&t.jsx(d,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((l=e.env.os)!=null&&l.name)&&t.jsxs(d,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((c=e.env.browser)!=null&&c.name)&&t.jsxs(d,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),t.jsx(d,{component:"span",color:"textSecondary",children:t.jsx(D,{value:e.createdAt})})]})]})]})}function V(){const{t:e}=M(),{data:o,loading:a,paging:i,filter:p,categories:s,setCategory:l,fetch:c}=w();return a?t.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:t.jsx(T,{})}):t.jsxs(X,{"data-cy":"audit-logs",children:[t.jsx(x,{className:"log-controls",children:t.jsxs(K,{style:{width:"240px"},variant:"outlined",children:[t.jsx(O,{children:e("common.filter")}),t.jsx(U,{"data-cy":"filter-by-category-trigger",value:p.category,onChange:r=>l(r.target.value),fullWidth:!0,label:e("common.category"),disabled:a,children:s.map(r=>t.jsx(B,{value:r.value,"data-cy":`filter-by-category-${r.value}`,children:t.jsx(x,{children:t.jsx("span",{children:r.label})})},r.label))})]})}),o.length===0&&t.jsx(F,{children:e("common.empty")}),o.length>0&&o.map(r=>t.jsx(J,{log:r},r.id)),i.pageCount>1&&t.jsx(q,{page:i.page,count:i.pageCount,onChange:(r,f)=>c({page:f}),showFirstButton:!0,showLastButton:!0})]})}function ze({scope:e,categories:o,showScope:a,scopeFormatter:i}){return t.jsx(Q,{scope:e,categories:o,showScope:a,scopeFormatter:i,children:t.jsx(V,{})})}const X=I.div`
|
|
2
|
+
.log-controls {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
}
|
|
6
|
+
.log-entry {
|
|
7
|
+
display: flex;
|
|
8
|
+
margin: 16px 0;
|
|
9
|
+
|
|
10
|
+
.log-author {
|
|
11
|
+
margin-right: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.log-body {
|
|
15
|
+
flex: 1;
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.log-header {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.log-content {
|
|
25
|
+
p {
|
|
26
|
+
margin-bottom: 4px;
|
|
27
|
+
}
|
|
28
|
+
ul,
|
|
29
|
+
ol {
|
|
30
|
+
padding-left: 2rem;
|
|
31
|
+
}
|
|
32
|
+
li {
|
|
33
|
+
list-style-type: disc;
|
|
34
|
+
}
|
|
35
|
+
code.code-highlight {
|
|
36
|
+
max-height: 300px;
|
|
37
|
+
overflow: auto;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.log-meta {
|
|
42
|
+
margin-top: 4px;
|
|
43
|
+
|
|
44
|
+
span {
|
|
45
|
+
font-size: 0.8rem;
|
|
46
|
+
display: inline-block;
|
|
47
|
+
margin-right: 8px;
|
|
48
|
+
padding-right: 8px;
|
|
49
|
+
border-right: 1px solid #ccc;
|
|
50
|
+
|
|
51
|
+
&:last-of-type {
|
|
52
|
+
border-right: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
`;export{ze as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as C,aV as l,r as d,aM as f,bT as h,q as y,a9 as S,u as z,j as H,P as J}from"./index-CZq1iuqc.js";import{b as Q,l as X}from"./spaces-Dxw-EmTw.js";import{f as A}from"./format-error-BLTYbOE0.js";async function Z({blockletDid:c,nodeApi:a,spaceGateways:s}){let t=!1;const i=await Promise.all(s.map(async o=>{let{name:n}=o;const u=await Q(o.endpoint);return!C.isEmpty(u)&&u!==n&&(n=u,t=!0),{...o,name:n}}));return t&&await Promise.all(i.filter(o=>o.did).map(o=>a.updateBlockletSpaceGateway({input:{did:c,where:{did:o.did},spaceGateway:{...o}}}))),i}function $({setLoading:c,refresh:a}={}){var u;const{blocklet:s}=l(),t=(u=s==null?void 0:s.meta)==null?void 0:u.did,[i,o]=d.useState([]),{api:n}=f();return h(async()=>{try{if(!t){o([]);return}c==null||c(!0);const{spaceGateways:r}=await n.getBlockletSpaceGateways({input:{did:t}}),B=await Z({blockletDid:t,nodeApi:n,spaceGateways:r});o(B??[])}catch(r){console.error(r),y.error(A(r))}finally{c==null||c(!1)}},[t,a]),{spaceGateways:i}}function P({deps:c,setLoading:a}={deps:[],setLoading:()=>{}}){var u;const{blocklet:s}=l(),[t,i]=d.useState([]),{api:o}=f(),n=C.debounce(async()=>{try{if(a(!0),!s){i([]);return}const{backups:r}=await o.getBlockletBackups({input:{did:s.meta.did}});i(r??[])}catch(r){console.error(r),y.error(A(r))}finally{a(!1)}},2e3);return h(async()=>{n()},[(u=s==null?void 0:s.meta)==null?void 0:u.did].concat(c)),{backups:t}}function ee({appDid:c}){const{backups:a}=P(),[s,t]=d.useState({message:"",progress:0,completed:!1}),i=f(),{ws:{useSubscription:o}}=i;return o(S.BlockletEvents.backupProgress,n=>{c===(n==null?void 0:n.appDid)&&t(()=>({...n}))},[c]),d.useEffect(()=>{var n;if(a!=null&&a.length&&C.isNull((n=a[0])==null?void 0:n.status)){const[u]=a;t(()=>({message:u.message,progress:u.progress,completed:u.progress>=100}))}},[a]),s}function te({deps:c}={deps:[]}){var o;const{blocklet:a}=l(),{api:s}=f(),[t,i]=d.useState(null);return h(async()=>{var n;if((n=a==null?void 0:a.meta)!=null&&n.did){const{autoBackup:u}=await s.getAutoBackup({input:{did:a.meta.did}});i(u)}},[(o=a==null?void 0:a.meta)==null?void 0:o.did].concat(c)),t}function ae({deps:c}={deps:[]}){var o;const{blocklet:a}=l(),{api:s}=f(),[t,i]=d.useState(null);return h(async()=>{var n;if((n=a==null?void 0:a.meta)!=null&&n.did){const{autoCheckUpdate:u}=await s.getAutoCheckUpdate({input:{did:a.meta.did}});i(u)}},[(o=a==null?void 0:a.meta)==null?void 0:o.did].concat(c)),t}const U=d.createContext({}),{Provider:se,Consumer:ue}=U;function _({children:c}){const{t:a}=z(),{api:s}=f(),{blocklet:t}=l(),[i,o]=d.useState(!1),[n,u]=d.useState(!1),{spaceGateways:r}=$({refresh:n,setLoading:o}),B=ee({appDid:t==null?void 0:t.appDid}),[N,L]=d.useState(!1),p=d.useMemo(()=>X(t==null?void 0:t.environments),[t,n,N]),[R,T]=d.useState(!1),{backups:K}=P({deps:[B],setLoading:T}),[O,E]=d.useState(r==null?void 0:r.find(e=>e.endpoint===p)),[D,x]=d.useState(!1),k=te({deps:[D]}),[I,v]=d.useState(!1),G=ae({deps:[I]}),m=()=>{u(e=>!e)},b=()=>{L(e=>!e)},F=()=>{x(e=>!e)},j=()=>{v(e=>!e)},g=async e=>{await s.updateAutoBackup({input:{did:t.meta.did,autoBackup:e}}),F()},Y=async(e,w)=>{r.push({...e,loading:!0}),await s.addBlockletSpaceGateway({input:{did:t.meta.did,spaceGateway:e}}),p!==w&&await s.configBlocklet({input:{did:[t.meta.did],configs:[{key:S.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:w}]}}),m(),E(e)},q=async e=>{e&&(e.endpoint===p&&(await s.configBlocklet({input:{did:[t.meta.did],configs:[{key:S.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),k!=null&&k.enabled&&await g({enabled:!1})),await s.deleteBlockletSpaceGateway({input:{did:t.meta.did,spaceGatewayDid:e==null?void 0:e.did}}),m(),E(e))},M=async e=>{await s.updateBlockletSpaceGateway({input:{did:t.meta.did,where:{did:e.did},spaceGateway:e}}),p!==e.endpoint&&await s.configBlocklet({input:{did:[t.meta.did],configs:[{key:S.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:e.endpoint}]}}),y.success(a("storage.spaces.connectedWithName",{name:(e==null?void 0:e.name)??"DID Spaces"})),m()},V=e=>(e==null?void 0:e.endpoint)===p,W=async e=>{await s.updateAutoCheckUpdate({input:{did:t.meta.did,autoCheckUpdate:e}}),j()};return H.jsx(se,{value:{spaceGateways:r,selectedSpaceGateway:O,addSpaceGateway:Y,deleteSpaceGateway:q,updateSpaceGateway:M,refreshSpaceGateways:m,spaceGatewaysLoading:i,spaceGatewayIsSelected:V,updateAutoBackup:g,updateAutoCheckUpdate:W,autoCheckUpdate:G,backupEndpoint:p,backupProgress:B,backups:K,backupsLoading:R,refreshBackupEndpoint:b,autoBackup:k},children:c})}_.propTypes={children:J.any.isRequired};_.defaultProps={};function de(){return d.useContext(U)}export{_ as B,de as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,a1 as n}from"./index-
|
|
1
|
+
import{j as o,a1 as n}from"./index-CZq1iuqc.js";function r({...t}){return o.jsx(n,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{r as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,a0 as s,j as t,fg as r,P as c}from"./index-
|
|
1
|
+
import{r as i,a0 as s,j as t,fg as r,P as c}from"./index-CZq1iuqc.js";function n({children:p,...e}){const{t:o}=i.useContext(s);return t.jsx(r,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...e,children:p})}n.propTypes={children:c.any.isRequired};export{n as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Z as m,u as P,r as n,af as C,ag as T,j as t,l as B,B as h,fG as _,c as $,a4 as A,a5 as F,q as I,fo as M,fH as N,P as z,E as H,aj as O}from"./index-
|
|
1
|
+
import{Z as m,u as P,r as n,af as C,ag as T,j as t,l as B,B as h,fG as _,c as $,a4 as A,a5 as F,q as I,fo as M,fH as N,P as z,E as H,aj as O}from"./index-CZq1iuqc.js";import{L as W}from"./launch-result-message-Bur7t6_c.js";import{S as v}from"./button-DTeWpy9g.js";import{S as X}from"./layout-B0uAwIQe.js";import"./Close-DJPwlagN.js";import"./content-layout-7iVGY_ud.js";const q=m(W)`
|
|
2
2
|
&& .result-footer {
|
|
3
3
|
height: 120px;
|
|
4
4
|
> div {
|