@abtnode/webapp 1.16.54-beta-20251016-050817-2fc632b8 → 1.16.54-beta-20251017-133309-7d40faa6
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-NScUj50m.js → AdapterDayjs-Dmdo2xWr.js} +1 -1
- package/dist/assets/{Add-D4EYSG3K.js → Add-BtxJ9S0c.js} +1 -1
- package/dist/assets/ArrowDropDown-CXhfj4YR.js +1 -0
- package/dist/assets/{Autocomplete-Dy_zZ4Oc.js → Autocomplete-BSxdbGZ9.js} +1 -1
- package/dist/assets/{Breadcrumbs-C8gaKT3g.js → Breadcrumbs-BQIMaSsB.js} +1 -1
- package/dist/assets/{ButtonGroup-DcZ0ug1l.js → ButtonGroup-zxfGLX1y.js} +1 -1
- package/dist/assets/{CSSTransition-V4R7ZcvS.js → CSSTransition-BHFpNneQ.js} +1 -1
- package/dist/assets/{CallMerge-KoAXFCaW.js → CallMerge-B1sQW0-H.js} +1 -1
- package/dist/assets/{CardContent-W_hyQjAD.js → CardContent-BQOX_LLY.js} +1 -1
- package/dist/assets/{ChevronLeft-CKiAYw9j.js → ChevronLeft-CjfV9O7Y.js} +1 -1
- package/dist/assets/{ChevronRight-DZiek3NZ.js → ChevronRight-Cq74y-86.js} +1 -1
- package/dist/assets/{Clear---RPVeR7.js → Clear-CmclKblN.js} +1 -1
- package/dist/assets/{DeleteOutline-GpuLmtYQ.js → DeleteOutline-DeY1XytP.js} +1 -1
- package/dist/assets/{Done-DzMcAgjX.js → Done-otpI656Q.js} +1 -1
- package/dist/assets/{Edit-DCJEwDTg.js → Edit-BLOnay32.js} +1 -1
- package/dist/assets/{ErrorOutline-B9LgxSpq.js → ErrorOutline-C62Ptpls.js} +1 -1
- package/dist/assets/{FilterList-CNYUVm5S.js → FilterList-5aPzs6zd.js} +1 -1
- package/dist/assets/{Google-DR320mb8.js → Google-B6ijzIon.js} +1 -1
- package/dist/assets/{HelpOutline-USuznZgn.js → HelpOutline-OM9v4KDS.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-rbx_AuZr.js → KeyboardArrowDown-CKtrlyfg.js} +1 -1
- package/dist/assets/{Launch-DkmyUeYd.js → Launch-BfuKeW3b.js} +1 -1
- package/dist/assets/{Link-CgW5geY5.js → Link-BD8pu5K0.js} +1 -1
- package/dist/assets/{ListItemButton-BhvWhm3n.js → ListItemButton-cn3fH9TW.js} +1 -1
- package/dist/assets/{ListSubheader-BlgmemtO.js → ListSubheader-Ch1RovVQ.js} +1 -1
- package/dist/assets/{LoadingButton-DpbZOfZH.js → LoadingButton-iO4mS6KL.js} +1 -1
- package/dist/assets/{MoreVert-wWXtgLji.js → MoreVert-CdXWMKz-.js} +1 -1
- package/dist/assets/{OpenInNew-B8ApQgxt.js → OpenInNew-BZCBTL61.js} +1 -1
- package/dist/assets/{Refresh-nk8BSp_h.js → Refresh-BLPv71Iw.js} +1 -1
- package/dist/assets/{Search-DV5vJN1H.js → Search-CbRhrT-l.js} +1 -1
- package/dist/assets/{Stepper-Dm3PYaFi.js → Stepper-JXr6cJC3.js} +1 -1
- package/dist/assets/{Switch-czLKbhPZ.js → Switch-D12CiGzx.js} +1 -1
- package/dist/assets/{TableSearch-CAf-ESr9.js → TableSearch-DsuiCyEx.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-Csc72nBu.js → ToggleButtonGroup-CoPX4ob9.js} +1 -1
- package/dist/assets/{UnfoldMore-BQzQy89p.js → UnfoldMore-DoB8mcpO.js} +1 -1
- package/dist/assets/{Verified-CF2yeqGT.js → Verified-CHH9KCap.js} +1 -1
- package/dist/assets/{VerifiedUser-C1tgCpCB.js → VerifiedUser-Brzhri9f.js} +1 -1
- package/dist/assets/{ViewList-CE_c5qLh.js → ViewList-CfykWbFF.js} +1 -1
- package/dist/assets/{_createAggregator-Bnob81wI.js → _createAggregator-DrGf--g5.js} +1 -1
- package/dist/assets/{actions-Cpb8n0Yw.js → actions-BU7VBlNr.js} +1 -1
- package/dist/assets/{actions-DtMFbSMo.js → actions-Dq4cTCeJ.js} +1 -1
- package/dist/assets/{agreement-D_SlINnK.js → agreement-BbZCQgd_.js} +1 -1
- package/dist/assets/api-DAWWUzPu.js +1 -0
- package/dist/assets/{appearance-buyEW0Iv.js → appearance-xpsoTzJy.js} +1 -1
- package/dist/assets/{ar-Ge3t6oI2.js → ar-BQm9lQ4M.js} +1 -1
- package/dist/assets/audit-logs-DXKfeYbe.js +35 -0
- package/dist/assets/{base-chart-E6uEbiC0.js → base-chart-C2185-Xr.js} +1 -1
- package/dist/assets/{blocklet-BSWtuwnH.js → blocklet--AI07_i0.js} +1 -1
- package/dist/assets/{chain-Cxmkzj72.js → chain-Dk4xAHS8.js} +1 -1
- package/dist/assets/{click-to-copy-C5l1aVBQ.js → click-to-copy-BCe_knva.js} +1 -1
- package/dist/assets/cloneDeep-CAK0LBhz.js +1 -0
- package/dist/assets/{collapse-D-q9UEjV.js → collapse-zs9NkhVG.js} +1 -1
- package/dist/assets/{config-navigation-Ck-BfL0o.js → config-navigation-D_6fIzEw.js} +31 -31
- package/dist/assets/{connect-to-sME9XFIO.js → connect-to-DP2mM_22.js} +3 -3
- package/dist/assets/{cssMode-CwQeOUoG.js → cssMode-B399Q_Au.js} +1 -1
- package/dist/assets/{de-CbARTvf4.js → de-D0uPENSq.js} +1 -1
- package/dist/assets/{delete-confirm-CiFwBlNG.js → delete-confirm-Bow13LE9.js} +1 -1
- package/dist/assets/{depsEqual-BHCVOuWA.js → depsEqual-DM_xCHol.js} +1 -1
- package/dist/assets/{detail-u9DgWb-d.js → detail-IWNgMo9A.js} +3 -3
- package/dist/assets/{domains-CuwWHtSp.js → domains-DKCOiTCg.js} +1 -1
- package/dist/assets/{download-B1XuXwBn.js → download-CZMq1lWW.js} +1 -1
- package/dist/assets/{edit.svg-BT2rpJxW.js → edit.svg-MBsEEqxw.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-89zxT23k.js +1 -0
- package/dist/assets/engine-DjXhikKJ.js +1 -0
- package/dist/assets/{es-CaCbzATO.js → es-Dh4_UfCu.js} +1 -1
- package/dist/assets/{fr-B3yjKUFH.js → fr-CzZWQkiT.js} +1 -1
- package/dist/assets/{freemarker2-B3dcQl4s.js → freemarker2-Bo8Dkz0i.js} +1 -1
- package/dist/assets/{get-safe-url-DfDeYxPo.js → get-safe-url-CWx4sAFH.js} +1 -1
- package/dist/assets/getValidReactChildren-Cg2u2AWU.js +1 -0
- package/dist/assets/{graphqlMode-gWZ1xdel.js → graphqlMode-C-1GELPv.js} +2 -2
- package/dist/assets/{handlebars-DLMgXH9N.js → handlebars-CmlxliCw.js} +1 -1
- package/dist/assets/{hi-q4mhHiIl.js → hi-Do9VCuRi.js} +1 -1
- package/dist/assets/{html-DmYIunqS.js → html-YsXSD8TZ.js} +1 -1
- package/dist/assets/{html-title-B42L4vHs.js → html-title-DV29cJ5k.js} +1 -1
- package/dist/assets/{htmlMode-CyuA6nxS.js → htmlMode-zogUHMrG.js} +1 -1
- package/dist/assets/{id-DTf7aVH8.js → id-Dhhrveu9.js} +1 -1
- package/dist/assets/{iframe-B-84ZVfc.js → iframe-CJvRag0f.js} +1 -1
- package/dist/assets/{index-jC9YQw2A.js → index-1qcmbchL.js} +1 -1
- package/dist/assets/{index-CT-cKo4l.js → index-2sz7KBve.js} +4 -4
- package/dist/assets/index-5gnDPlCv.js +375 -0
- package/dist/assets/{index-tXfQSlPx.js → index-B5lqoaM2.js} +3 -3
- package/dist/assets/index-B7g5Nk1d.js +292 -0
- package/dist/assets/{index-BcBcDLRF.js → index-B8b0rEFF.js} +14 -14
- package/dist/assets/{index-B6fuqqYD.js → index-B9ak8YbX.js} +1 -1
- package/dist/assets/{index-CbD2HRHU.js → index-BAu_h5OW.js} +1 -1
- package/dist/assets/index-BCTcUJyy.js +1 -0
- package/dist/assets/{index-D-dEXSR3.js → index-BFaz_KJO.js} +3 -3
- package/dist/assets/{index-Ca41Albz.js → index-BGcTTdNv.js} +1 -1
- package/dist/assets/{index-DfxHc659.js → index-BN9KmbYU.js} +2 -2
- package/dist/assets/{index-km_8frCh.js → index-BNAHYHIB.js} +1 -1
- package/dist/assets/{index-DaNXTl0n.js → index-BS8Zd79a.js} +1 -1
- package/dist/assets/{index-BkFC8ho3.js → index-BTzUdfyO.js} +3 -3
- package/dist/assets/{index-BHuxYJ36.js → index-BZKNVbcu.js} +1 -1
- package/dist/assets/{index-CHZXKvDD.js → index-BhRJ8iUw.js} +1 -1
- package/dist/assets/{index-m-5ZFaj3.js → index-Biom0VRc.js} +1 -1
- package/dist/assets/{index-E2RuVge2.js → index-Bk3_p0ot.js} +8 -8
- package/dist/assets/{index-DM9vqLT9.js → index-BlU4tJOu.js} +1 -1
- package/dist/assets/{index-DuS26oUH.js → index-BsODnAIr.js} +1 -1
- package/dist/assets/{index-D_ED6Nk7.js → index-Bsb50zao.js} +1 -1
- package/dist/assets/{index-CQ3QiuQQ.js → index-BszCp5iq.js} +1 -1
- package/dist/assets/{index-CGwvwEUr.js → index-BwAtwN98.js} +3 -10
- package/dist/assets/{index-haFP5Loj.js → index-C88zwj1F.js} +1 -1
- package/dist/assets/{index-DgKqbN5Y.js → index-CEVcCpp0.js} +1 -1
- package/dist/assets/{index-CnMT0fo1.js → index-CO6atVP1.js} +1 -1
- package/dist/assets/{index-M4yiF52E.js → index-CQwHcXdR.js} +1 -1
- package/dist/assets/{index-Bb-RBdu9.js → index-Cc5co79B.js} +1 -1
- package/dist/assets/{index-nUrxOkOM.js → index-CeeztwBq.js} +1 -1
- package/dist/assets/{index-D63ritT-.js → index-Cklq_snV.js} +1 -1
- package/dist/assets/{index-BIGgo0dk.js → index-CsAuzX0k.js} +1 -1
- package/dist/assets/{index-DXF1RiG0.js → index-Ctq71AUP.js} +1 -1
- package/dist/assets/{index-DBd6awj_.js → index-CwgLMaiR.js} +1 -1
- package/dist/assets/{index-DxZUfBpk.js → index-Cx0-cDmo.js} +1 -1
- package/dist/assets/index-DPsTv0RC.js +120 -0
- package/dist/assets/{index-CAMlpQ47.js → index-DQDQvvOo.js} +2 -2
- package/dist/assets/{index-B-KmoBb-.js → index-DaWRYFXy.js} +1 -1
- package/dist/assets/{index-BKJPtvsM.js → index-DnFU3fjE.js} +1 -1
- package/dist/assets/{index-D4PsRecd.js → index-DnGfacYV.js} +1 -1
- package/dist/assets/{index-CdnTrItd.js → index-DyqQGUXg.js} +1 -1
- package/dist/assets/{index-B4IIU09Y.js → index-QQLsDnxc.js} +3 -3
- package/dist/assets/{index-Dd5Oo0tk.js → index-_TZ0HsEX.js} +1 -1
- package/dist/assets/{index-u7lHFbWg.js → index-f461L7cH.js} +9 -9
- package/dist/assets/{index-F3HbHSYi.js → index-oppNoNvH.js} +57 -57
- package/dist/assets/{index-Cu6PRXBT.js → index-rDK2F6ft.js} +1 -1
- package/dist/assets/index-t2qXqnLl.js +1 -0
- package/dist/assets/{index.esm-CG55Fmct.js → index.esm-Cc-rWUer.js} +1 -1
- package/dist/assets/{install-from-url-DL-3oQMI.js → install-from-url-Byfhqhtx.js} +1 -1
- package/dist/assets/{invitation-C464OqTr.js → invitation-C7URd--D.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-DCicTZ8d.js → is-path-prefix-equal-DRcxtSPQ.js} +1 -1
- package/dist/assets/{item-DkbrJM2U.js → item-Dad5StUY.js} +1 -1
- package/dist/assets/{ja-Csh_XwzF.js → ja-B70UYq5X.js} +1 -1
- package/dist/assets/{javascript-B0hI_Eyo.js → javascript-CoBTz2gd.js} +1 -1
- package/dist/assets/{jsonMode--kCoJBFT.js → jsonMode-CVMee1RD.js} +1 -1
- package/dist/assets/{ko-xiNTwgO9.js → ko-C7TZwmXC.js} +1 -1
- package/dist/assets/{liquid-BVzOkmM1.js → liquid-D6EIo1wL.js} +1 -1
- package/dist/assets/{list-header-CnD8v8jR.js → list-header-xkh_uL_h.js} +1 -1
- package/dist/assets/{lock.svg-DWUrJ_5S.js → lock.svg-CkFKYDxX.js} +1 -1
- package/dist/assets/{log-CjBZbQrr.js → log-BYawti0X.js} +1 -1
- package/dist/assets/{lottie-react.esm-CcRYYgsR.js → lottie-react.esm-CySu6b9e.js} +1 -1
- package/dist/assets/{mdx-DOswkMzX.js → mdx-BEdivZjl.js} +1 -1
- package/dist/assets/{memory-BkrGYits.js → memory-Badimsp_.js} +1 -1
- package/dist/assets/{metric-CNxVptGa.js → metric-CtFXUNX3.js} +1 -1
- package/dist/assets/omit-D0KFhbLk.js +1 -0
- package/dist/assets/{overview-BWjjo7YM.js → overview-K7CavXZw.js} +1 -1
- package/dist/assets/{permission-caYaN7o4.js → permission-DZytcuWC.js} +1 -1
- package/dist/assets/{preference-D-1nO1Na.js → preference-CrZ37X3N.js} +3 -3
- package/dist/assets/{pt-BvcG4R7B.js → pt-DObJ_ADK.js} +1 -1
- package/dist/assets/{python-BJ2CXy2e.js → python-czQLPXp8.js} +1 -1
- package/dist/assets/{raf-schd.esm-BdLRNFZe.js → raf-schd.esm-PMp87DFK.js} +1 -1
- package/dist/assets/{razor-DdMOGESa.js → razor-Bgg3hEgt.js} +1 -1
- package/dist/assets/{rotate-session-key-D_YTGNN-.js → rotate-session-key-Dtz9D1ow.js} +1 -1
- package/dist/assets/{ru-DzUPRLmr.js → ru-nYDmEUmY.js} +1 -1
- package/dist/assets/{runtime-B1ybPRbq.js → runtime-BSvs2J54.js} +1 -1
- package/dist/assets/schema-DmifXwDr.js +1 -0
- package/dist/assets/sdk-VJ878dD0.js +1 -0
- package/dist/assets/{service-pByff5wa.js → service-BlUOvgta.js} +1 -1
- package/dist/assets/{shorten-label-DxKgpegt.js → shorten-label-BZLeEmnh.js} +1 -1
- package/dist/assets/simple-select-CDiD7EVt.js +1 -0
- package/dist/assets/{spaces-DnqeOj51.js → spaces-B91L1fYZ.js} +1 -1
- package/dist/assets/{status-iJzbVxRo.js → status-DEKm_VSq.js} +1 -1
- package/dist/assets/{status-BGeIvK1l.js → status-DIBvqycZ.js} +1 -1
- package/dist/assets/{switch-control-B_J8lGBy.js → switch-control-C9oMQ7W-.js} +1 -1
- package/dist/assets/{table-icons-CoOahY2H.js → table-icons-EhFLZCZI.js} +1 -1
- package/dist/assets/{team-NpjMEHti.js → team-fAqBHfRA.js} +1 -1
- package/dist/assets/{th-BmW1qKpZ.js → th-DMcUw_9_.js} +1 -1
- package/dist/assets/{toLower-Dx_gZ85b.js → toLower-CTl5GR-_.js} +1 -1
- package/dist/assets/toUpper-CjPgxX5u.js +1 -0
- package/dist/assets/{traffic-BiqnglqJ.js → traffic-BQ2LFr05.js} +1 -1
- package/dist/assets/{tsMode-CNfoaBo0.js → tsMode-BC6Utk6Q.js} +1 -1
- package/dist/assets/{typescript-CYiGFg4j.js → typescript-DA3LEYkV.js} +1 -1
- package/dist/assets/ua-parser-DP5omx3I.js +1 -0
- package/dist/assets/{url-evaluation-Bm9OWnaf.js → url-evaluation-QeH6FlO4.js} +1 -1
- package/dist/assets/{url-join-B07GNSp-.js → url-join-BL6fN34c.js} +1 -1
- package/dist/assets/{use-mobile-D5fNICVu.js → use-mobile-B3ZO2ENR.js} +1 -1
- package/dist/assets/{use-mobile-Dm-drtZi.js → use-mobile-CC5e6Q7A.js} +1 -1
- package/dist/assets/{useAsync-2o_4QDVN.js → useAsync-C4TyOh-5.js} +1 -1
- package/dist/assets/{useAsyncRetry-CSZJdZ2s.js → useAsyncRetry-nX6HpPsm.js} +1 -1
- package/dist/assets/{useLocalStorage-xEKVgwM3.js → useLocalStorage-CZNQlTk5.js} +1 -1
- package/dist/assets/{useThemeProps-BhYWaPDm.js → useThemeProps-BleY03wL.js} +1 -1
- package/dist/assets/{util-DhYg_WLh.js → util-DBPmcEMD.js} +1 -1
- package/dist/assets/{vi-BPU54RQW.js → vi-B73oWQBC.js} +1 -1
- package/dist/assets/{wait-container-HwFE2vqS.js → wait-container-DFnbvnlK.js} +1 -1
- package/dist/assets/{without-wallet-Dbr3bl6I.js → without-wallet-BEHqWwMH.js} +1 -1
- package/dist/assets/wrap-locale-D0QYhzyI.js +1 -0
- package/dist/assets/{xml-C13TFHPP.js → xml-D8pQLiZC.js} +1 -1
- package/dist/assets/{yaml-TMDBP8Bi.js → yaml-BSxlt5hf.js} +1 -1
- package/dist/assets/{zh-WrFfMVyM.js → zh-DCABA61W.js} +1 -1
- package/dist/assets/{zh-tw-DjWFpq-W.js → zh-tw-M_0Y4wmR.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-DonW35Zx.js +0 -1
- package/dist/assets/api-OdGoHXe4.js +0 -1
- package/dist/assets/audit-logs-CLj12YBu.js +0 -35
- package/dist/assets/client-BaEuKBw8.js +0 -1
- package/dist/assets/cloneDeep-CPQcx7Qa.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-CQ2-5c4_.js +0 -1
- package/dist/assets/engine-wH21TR28.js +0 -1
- package/dist/assets/getValidReactChildren-DECNQV_G.js +0 -1
- package/dist/assets/index-CAUKXdVD.js +0 -1
- package/dist/assets/index-DpTrAVde.js +0 -1
- package/dist/assets/index-DwEuapzX.js +0 -292
- package/dist/assets/index-DwfORIGZ.js +0 -113
- package/dist/assets/index-hPXA34zh.js +0 -375
- package/dist/assets/omit-B8xv_k3Z.js +0 -1
- package/dist/assets/schema-BKs0S9Ju.js +0 -1
- package/dist/assets/sdk-WWYom8eN.js +0 -1
- package/dist/assets/simple-select-DFmJjQqW.js +0 -1
- package/dist/assets/toUpper-28qo31SR.js +0 -1
- package/dist/assets/wrap-locale-BQVWlKMF.js +0 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import{aF as Ge,j as e,bn as gt,r as g,bz as Q,bf as K,H as q,aH as D,g as xt,o as d,h as ee,at as bt,ay as jt,K as C,T as U,V as X,eM as Fe,O as Pe,il as Ye,bj as Te,aU as Ie,R as Ee,dG as Ne,b3 as qe,b1 as Ae,C as Qe,f as Xe,e_ as Je,aP as De,W as yt,as as Ze,im as et,v as Oe,f0 as tt,fn as je,fH as st,dA as St,s as ie,af as pe,G as Ue,au as vt,io as Ct,ip as Nt,$ as nt,iq as wt,ir as Rt,is as Tt,it as It,N as Et,bu as it,E as At,J as Dt,P as Ot,S as Lt,Q as $e,iu as kt,a3 as Ft}from"./index-oppNoNvH.js";import{d as Pt,H as at,g as _t}from"./index-BwAtwN98.js";import{R as _e,S as Bt}from"./actions-BU7VBlNr.js";import{B as zt}from"./index-BGcTTdNv.js";import{S as me}from"./shorten-label-BZLeEmnh.js";import{v as ot}from"./index-CQwHcXdR.js";import{T as Wt}from"./html-title-DV29cJ5k.js";import{R as Mt}from"./Refresh-BLPv71Iw.js";import{D as Ht,g as Kt}from"./traffic-BQ2LFr05.js";import{u as qt}from"./use-mobile-B3ZO2ENR.js";import"./FilterList-5aPzs6zd.js";import"./CSSTransition-BHFpNneQ.js";import"./emotion-cache.browser.esm-89zxT23k.js";import"./index-CsAuzX0k.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DM_xCHol.js";import"./index-1qcmbchL.js";import"./TableSearch-DsuiCyEx.js";import"./Search-CbRhrT-l.js";import"./Clear-CmclKblN.js";import"./MoreVert-CdXWMKz-.js";import"./useLocalStorage-CZNQlTk5.js";import"./url-evaluation-QeH6FlO4.js";import"./get-safe-url-CWx4sAFH.js";import"./ButtonGroup-zxfGLX1y.js";import"./getValidReactChildren-Cg2u2AWU.js";import"./permission-DZytcuWC.js";import"./index.esm-Cc-rWUer.js";import"./collapse-zs9NkhVG.js";import"./blocklet--AI07_i0.js";import"./Switch-D12CiGzx.js";import"./iframe-CJvRag0f.js";import"./ChevronLeft-CjfV9O7Y.js";import"./ChevronRight-Cq74y-86.js";import"./index-DBii9-f-.js";import"./base-chart-C2185-Xr.js";import"./index-CeeztwBq.js";import"./AdapterDayjs-Dmdo2xWr.js";import"./useThemeProps-BleY03wL.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),$t=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:Vt,Consumer:on}=rt;function Gt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:o}}=gt(),[l,x]=g.useState([]),[f,y]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),h=Q(()=>s.meta?.did,[s]),[b,S]=g.useState([]),[B,_]=g.useState({}),R=Q(()=>l.length?new Set(l.map(m=>m.id)):new Set,[l]),$=async({page:m=1,pageSize:N=20,...O}={})=>{if(!h)return[];try{const A={paging:{page:m,pageSize:N},...O,teamDid:h,dateRange:O.dateRange?[K(O.dateRange[0]).toISOString(),K(O.dateRange[1]).toISOString()]:void 0},{dids:w,...L}=A;let P="";w&&w.includes("system")&&(P="system");const ae=w?w.filter(oe=>oe!=="system"):[],se={...L,source:P,componentDids:ae},Z=await n.getNotificationSendLog({input:se});return _(se),x(Z.list),y(Z.paging),Z.list}catch(A){return q.error(A.message),[]}},M=async()=>{const m=await n.getNotificationComponents({input:{teamDid:h}});S(m.componentDids)},k=g.useCallback(m=>{const N=s.children.find(O=>O.meta?.did===m);if(N)return N.ancestors=[s],N},[s]),F=async({notificationId:m,receivers:N,channels:O,...A})=>{await n.resendNotification({input:{teamDid:h,notificationId:m,receivers:N,channels:O.map(w=>w==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:w==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:w),...A}})},V=g.useCallback(async m=>(await n.getUser({input:{teamDid:h,user:{did:m},options:{enableConnectedAccount:!0}}})).user,[n,h]),G=g.useCallback(async({page:m=1,pageSize:N=20,...O}={})=>{try{const A={paging:{page:m,pageSize:N},...O,userName:O.searchText||"",teamDid:h,dateRange:O.dateRange?[K(O.dateRange[0]).toISOString(),K(O.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:A})}catch(A){throw q.error(A.message),A}},[n,h]);g.useEffect(()=>{h&&M()},[h]),o(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,m=>{R.has(m.notificationId)&&$(B)},[R,B]),o(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,m=>{R.has(m.id)||$(B)},[R,B]);const J={fetch:$,data:l,paging:f,blocklet:s,getComponent:k,resendNotification:F,getUser:V,componentDids:b,getReceivers:G,inService:r,teamDid:h};return e.jsx(Vt,{value:{notificationRecords:J},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Yt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Yt[t],children:t})}const Qt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:o,reason:l="",channel:x="wallet"}=n,f=o?t("notification.sendStatus.sentTime",{date:bt(o,s)}):"",y=Qt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=ee(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Jt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Zt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),es=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),xe=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ts=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],be=(t=[])=>{const s=K().startOf("day");return t.filter(n=>K(n.sendAt).isSame(s,"day")).length},ss=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=ee(t,l,[]);return be(x)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return be(l)}const o={};return ke.forEach(l=>{const x=`${l}SendRecord`,f=ee(t,x,[]),y=be(f);o[l]=y}),r.length>0&&r.forEach(l=>{const x=n[l]??[],f=be(x);o[l]=f}),o},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Se=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ns=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:o,title:l="",sentTime:x="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(C,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(C,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[o]}}),e.jsx(C,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[o]}})]}),e.jsx(U,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ve.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function ve({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:o}=X();return e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(U,{children:[s,": "]}),t.map(l=>{const x=lt(r,o,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:f=>n(f,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:o,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:o.map(f=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(f.value??f)>-1,onChange:y=>{const h=[...t];y.target.checked?h[n]=[...h[n],f.value??f]:h[n]=h[n].filter(b=>b!==(f.value??f)),s(h[n],n,r)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(f)})},f.value??f))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:o}){const{t:l,locale:x}=X(),f=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(Ne,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:o,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=X(),r=K().toDate(),[o,l]=g.useState(null),x=g.useCallback(h=>{l(o?null:h.currentTarget)},[o]),f=!!o,y=g.useCallback(h=>{if(!h.startDate||!h.endDate){q.error("Please select a date range");return}if(K(h.startDate).isAfter(h.endDate)||!K(h.startDate).isValid()||!K(h.endDate).isValid()){q.error("Invalid date range");return}s([h.startDate,h.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(U,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ne,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:f,anchorEl:o,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Ht,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Kt(r),onChange:y})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=X();return!s?.filterList?.filter(o=>o.length).length?null:e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Pt.TableFilterList,{...s,ItemComponent:t})})]})}function He({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const o=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...o&&l?{onDelete:o}:{}})}He.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const is=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=X(),[o,l]=g.useState(is),[x,f]=g.useState(!0),y=(b,S)=>{S.checked=b.target.checked;const B=o.map(_=>({..._,checked:_.value===S.value?S.checked:_.checked}));l(B)},h=b=>{b.stopPropagation(),n({channels:o.filter(S=>S.checked).map(S=>S.value),isResendFailedOnly:x})};return e.jsxs(C,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(U,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(C,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:o.map(b=>e.jsx(Ie,{control:e.jsx(Ee,{checked:b.checked,onChange:S=>y(S,b),name:b.value}),label:b.label},b.value))})]})}),e.jsx(C,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:b=>f(b.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(C,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ne,{onClick:b=>{b.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ne,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Qe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:o}=X(),l=Xe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:f,inService:y,teamDid:h,getUser:b,blocklet:S}=Be(),[B,_]=g.useState(!1),[R,$]=g.useState([]),M=De({anchorEl:null,position:null}),k=De({anchorEl:null,position:null}),[F,V]=g.useState(null),[G,J]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,N]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[K().subtract(1,"month").startOf("day").toDate(),K().endOf("day").toDate()]}),[O,A]=g.useState([]),w=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],L=async()=>{if(!B&&t)try{_(!0);const i=await f({notificationId:t,...m}),a=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,y)}}));$(a),J(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{L()},[m]);const P=i=>{i.stopPropagation();const a=i.currentTarget;k.anchorEl=a;const c=a.getBoundingClientRect();k.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:P,children:r("notification.resend")})}):null,se={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:G.page-1,rowsPerPage:G.pageSize,count:G.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:O,onRowSelectionChange:(i,a)=>{A(a.map(c=>c.dataIndex))},customToolbarSelect:ae},Z=({page:i,rowsPerPage:a,searchText:c,filterList:v})=>{const[,z=[],Y=[],H=[]]=v;m.pageSize!==a?N(W=>({...W,pageSize:a,page:1})):m.page!==i+1?N(W=>({...W,page:i+1})):m.searchText!==c?N(W=>({...W,searchText:c,page:1})):pe(z,m.walletSendStatus)?pe(Y,m.pushKitSendStatus)?pe(H,m.emailSendStatus)||N(W=>({...W,emailSendStatus:H,page:1})):N(W=>({...W,pushKitSendStatus:Y,page:1})):N(W=>({...W,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,a)=>{if(!a)return!1;const c=await b(a);return c?i==="wallet"?Zt(c):i==="email"?Xt(S,c):i==="pushKit"?Jt(S,c):i==="webhook"?es(c):!0:!1},[b,S]),we=g.useCallback(i=>ts(r,i),[r]),ne=()=>{M.anchorEl=null,M.position=null,V(null)},re=()=>{k.anchorEl=null,k.position=null},ge=async(i,a,c=!0,v="")=>{if(!(!a.length||!i.length))try{s(i,a,c,v),k.anchorEl||(await xe(.5),ne())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:a})=>{const c=O.map(v=>R[v].receiver);await ge(i,c,a),await xe(.5),re(),A([])},u=async(i,a=[],c=!0)=>{try{await ge(["webhook"],[i.receiver],c,a)}catch(v){q.error(v.response?v.response.statusText:v.message)}},j=async(i,a,c,v=[],z=!0)=>{if(i.stopPropagation(),ss(a,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await u(a,v,z);return}if(i){const H=i.currentTarget,W=H.getBoundingClientRect();M.anchorEl=H,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}V({channel:c});try{const H=await oe(c,a.receiver);await xe(1),V({channel:c,result:H}),(typeof H=="boolean"&&H||St(H)&&Object.values(H).every(W=>!!W))&&(await s([c],[a.receiver],z),k.anchorEl||(await xe(.5),ne()))}catch(H){q.error(H.message)}},I=i=>{N(a=>({...a,dateRange:i,page:1}))},E=(i,a,c,v)=>{i.stopPropagation();const z=c.filter(Y=>Y!==a);N(Y=>({...Y,[v]:z,page:1}))},T=Q(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:a,receiver:c}=R[i];return a?e.jsxs(C,{"data-cy":`member-name-${a.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${a.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:a.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:m.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Wallet",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:a,index:c,column:v,filterValues:w})},customBodyRenderLite:i=>{const{walletSendStatus:a,walletSendAt:c,walletSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"wallet",onResend:z=>j(z,R[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:a,pushKitSendAt:c,pushKitSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"pushkit",onResend:z=>j(z,R[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Push Kit",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:a,emailSendAt:c,emailSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"email",onResend:z=>j(z,R[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Email",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Email",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:a}=R[i];if(!a)return null;const c=Object.entries(a)[0];if(!c)return null;const[v,z]=c,Y=z[0];return e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(C,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:v},v),e.jsx(ce,{status:Y.status,updatedAt:Y.sendAt,reason:Y.failedReason,channel:"webhook",onResend:H=>j(H,R[i],"webhook",[v],!1)})]},v)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:a}=R[i];return e.jsx(et,{value:a,locale:o,shouldUpdate:!0})}}}],[R,o,m,r]),le=[e.jsx(We,{value:m.dateRange,onChange:I},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Mt,{}),onClick:()=>L(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(C,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(os,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:o,loading:B,columns:T,data:R,onChange:Z,options:se,customButtons:le,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:a=>e.jsx(He,{...a,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ae,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:ne,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rs,{children:[e.jsxs(U,{variant:"body1",component:"div",className:"check-title",children:[F?.channel," Checking"]}),e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:we(F?.channel).map(i=>{const{type:a,pass:c,fail:v}=i;return!F?.result||F?.result?.[a]?e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:F?.result?.[a]?je.success.main:"inherit"},children:[F?.result?e.jsx($t,{}):e.jsx(Qe,{size:12,sx:{color:je.primary.main}}),e.jsx("span",{children:c})]},a):e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:je.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:v})]},a)})})]})}),k.anchorEl&&e.jsx(Ae,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:re,onConfirm:p})})]})})})}const as=g.memo(ft),os=ie.div`
|
|
2
|
+
td.MuiTableCell-footer {
|
|
3
|
+
border: none !important;
|
|
4
|
+
}
|
|
5
|
+
.sent-status-cell {
|
|
6
|
+
.resend-btn {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
&:hover {
|
|
10
|
+
.resend-btn {
|
|
11
|
+
display: flex;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`,rs=ie.div`
|
|
16
|
+
padding: 8px 16px;
|
|
17
|
+
.check-title {
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
margin-bottom: 8px;
|
|
20
|
+
&::first-letter {
|
|
21
|
+
text-transform: uppercase;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.check-item {
|
|
25
|
+
svg {
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
}
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
}
|
|
30
|
+
`,fe=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t;function ls(t){const{wallet:s,push:n,email:r,webhook:o}=t;return[{name:"Wallet",value:e.jsx(de,{item:s})},{name:"Push",value:e.jsx(de,{item:n})},{name:"Email",value:e.jsx(de,{item:r})},...o.total>0?[{name:"Webhook",value:e.jsx(de,{item:o,isWebhook:!0})}]:[]]}function cs(t,s,n){const{wallet:r,push:o,email:l,webhook:x}=t;return[{name:"Wallet",value:e.jsx(ue,{loading:n,channel:D.NOTIFICATION_SEND_CHANNEL.WALLET,item:r,onResend:s})},{name:"Push",value:e.jsx(ue,{loading:n,channel:D.NOTIFICATION_SEND_CHANNEL.PUSH,item:o,onResend:s})},{name:"Email",value:e.jsx(ue,{loading:n,channel:D.NOTIFICATION_SEND_CHANNEL.EMAIL,item:l,onResend:s})},...x.total>0?[{name:"Webhook",value:e.jsx(ue,{loading:n,channel:D.NOTIFICATION_SEND_CHANNEL.WEBHOOK,item:x,isWebhook:!0,onResend:s})}]:[]]}Ke.propTypes={statistics:d.object.isRequired,onResend:d.func,mode:d.oneOf(["simple","detail"]),resending:d.bool};de.propTypes={item:d.object.isRequired,isWebhook:d.bool};function de({item:t,isWebhook:s=!1}){const{t:n}=X(),r=s?t.success.length:t.success,o=t.total,l=r===o?"success":"failed";return e.jsx(C,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2},children:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsxs(te,{config:{status:l},enableTooltip:!1,children:[fe(r)," / ",fe(o)," ",n("notification.sendStatus.success")]})})})}ue.propTypes={item:d.object.isRequired,isWebhook:d.bool,channel:d.string,onResend:d.func,loading:d.bool};function ue({channel:t=D.NOTIFICATION_SEND_CHANNEL.WALLET,item:s,isWebhook:n=!1,onResend:r=()=>{},loading:o=!1}){const{t:l}=X(),{success:x,failed:f,pending:y}=s,h=ns(t),b=n?x.length:x,S=n?f.length:f,B=n?y.length:y,_=async k=>{k.stopPropagation();const F=n?[...new Set([...x,...f].map(V=>V))]:[];await r([t],[],!0,F)},R=b+S,$=R>0?b/R*100:0,M=R>0?S/R*100:0;return e.jsxs(ds,{successRatio:$,failedRatio:M,children:[e.jsxs(U,{variant:"h6",children:[h," (",s.total,")"]}),e.jsxs(U,{variant:"body1",sx:{mb:2},children:[e.jsx("span",{style:{color:Le.success,fontWeight:600,fontSize:24},children:fe(b)}),e.jsx("small",{style:{paddingLeft:4},children:l("notification.sendStatus.success")})]}),e.jsxs(C,{className:"unsent-area",children:[e.jsxs(C,{children:[e.jsxs(te,{config:{status:"failed"},enableTooltip:!1,children:[fe(S)," ",l("notification.sendStatus.failed")]}),e.jsxs(te,{config:{status:"pending"},enableTooltip:!1,children:[fe(B)," ",l("notification.sendStatus.pending")]})]}),S>0&&e.jsx(C,{className:"resend-btn",children:e.jsx(Oe,{size:"small",color:"primary",loading:o,variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:_,children:l("notification.resend")})})]})]})}function Ke({statistics:t,mode:s="simple",onResend:n=()=>{},resending:r=!1}){const o=Q(()=>s==="simple"?ls(t):cs(t,n,r),[t,s]);return s==="simple"?e.jsx("div",{children:o.map(l=>e.jsx(ot,{style:{alignItems:"flex-start",marginBottom:s==="simple"?0:16},valueComponent:"div",nameWidth:100,name:l.name,children:l.value},l.name))}):e.jsx(Ue,{container:!0,spacing:2,children:o.map(l=>e.jsx(Ue,{size:{md:4,sm:6,xs:12},children:l.value},l.name))})}const ds=ie(C)`
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
align-items: flex-start;
|
|
34
|
+
padding: 16px;
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
background: ${({successRatio:t,failedRatio:s,theme:n})=>t===0&&s===0?n.palette.grey[300]:`linear-gradient(to right, ${vt(n.palette.success.light,.4)} ${t}%, ${n.palette.grey[100]} ${t}%)`};
|
|
37
|
+
transition: 'background 0.5s ease';
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
.unsent-area {
|
|
40
|
+
width: 100%;
|
|
41
|
+
position: relative;
|
|
42
|
+
.resend-btn {
|
|
43
|
+
position: absolute;
|
|
44
|
+
right: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`;mt.propTypes={notification:d.object.isRequired,onCancel:d.func,blocklet:d.object.isRequired,tab:d.string};function mt({notification:t,onCancel:s=()=>{},blocklet:n,tab:r="info"}){const{t:o,locale:l}=X(),{getComponent:x,resendNotification:f}=Be(),[y,h]=g.useState(!1),b=Q(()=>x(t.componentDid)||n,[n,t.componentDid]),S=De({tab:r||"info"}),B=g.useCallback(async(m,N,O=!0,A=[])=>{if(!m.length||!t.id)return;const w=N.length>0?N:t?.receivers?.map(P=>P.receiver);if(!w.length)return;let L=[...m];if(L.includes(D.NOTIFICATION_SEND_CHANNEL.PUSH)&&!dt(n)&&(q.warning(o("notification.sendStatus.reason.unavailable",{channel:"Push Kit"})),L=L.filter(P=>P!==D.NOTIFICATION_SEND_CHANNEL.PUSH)),L.includes(D.NOTIFICATION_SEND_CHANNEL.EMAIL)&&!ct(n)&&(q.warning(o("notification.sendStatus.reason.unavailable",{channel:"Email"})),L=L.filter(P=>P!==D.NOTIFICATION_SEND_CHANNEL.EMAIL)),!!L.length)try{h(!0),await f({notificationId:t.id,receivers:w,channels:L,resendFailedOnly:O,...L.includes("webhook")&&A.length?{webhookUrls:A}:{}}),q.success("Message has been sent!")}catch(P){console.error("handleResend error",{error:P}),q.error(P.response?P.response.statusText:P.message)}finally{h(!1)}},[n,t.id,t?.receivers,f,o]),_=Q(()=>Ct(t),[t]),R=Q(()=>Nt(t),[t]),$=Q(()=>_?t?.actorInfo:[],[t]),M=Q(()=>n?.did||n?.meta?.did||"",[n]);function k(){return[{name:o("notification.from"),value:_&&R?e.jsx(wt,{actors:$,teamDid:M,size:32,showName:!0}):e.jsx(Rt,{size:32,blocklet:b,showName:!0,hideDot:!0})},{name:o("notification.notificationTitle"),value:e.jsx(me,{maxLength:50,children:t.title})},{name:o("notification.body"),value:_?e.jsx(Tt,{notification:t,blocklet:n}):e.jsx(It,{notification:t,rows:0})},{name:o("notification.severity"),value:e.jsx(he,{severity:t.severity})},{name:o("notification.createdAt"),value:e.jsx(Et,{value:t.createdAt,locale:l,shouldUpdate:!0,type:"all"})}].map(N=>e.jsx(ot,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:N.name,children:N.value},N.name))}const F={info:{label:o("common.basicInfo"),value:"info",component:k},receivers:{label:o("notification.receiver"),value:"receivers"},statistics:{label:o("notification.statistics"),value:"statistics"}},V=Object.values(F).map(({label:m,value:N})=>({label:m,value:N})),G=F[S.tab]||F.info,J=m=>{S.tab=m};return e.jsx(nt,{title:o("notification.notificationDetails"),fullWidth:!0,maxWidth:"lg",onClose:()=>{S.tab="info",s()},open:!0,actionsPosition:"left",sx:{".ux-dialog_header":{paddingBottom:0},".MuiDialogContent-root":{paddingTop:0}},children:e.jsxs(ps,{children:[e.jsx(C,{className:"tabs",sx:{mx:3},children:e.jsx(Wt,{tabs:V,current:S.tab,onChange:J,scrollButtons:"auto"})}),e.jsxs("div",{className:"body",children:[S.tab==="receivers"&&e.jsx(as,{notificationId:t.id,resending:y,handleResend:B}),S.tab==="statistics"&&e.jsx(Ke,{statistics:t.statistics,mode:"detail",resending:y,onResend:B}),S.tab==="info"&&e.jsx(G.component,{})]})]})})}const us=g.memo(mt),ps=ie.div`
|
|
49
|
+
& > .notification-row {
|
|
50
|
+
padding: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tabs {
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
.body {
|
|
57
|
+
margin-top: 16px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.channel-item {
|
|
61
|
+
display: flex;
|
|
62
|
+
padding: 4px;
|
|
63
|
+
justify-content: flex-start;
|
|
64
|
+
align-items: center;
|
|
65
|
+
gap: 8px;
|
|
66
|
+
> p {
|
|
67
|
+
font-size: 15px;
|
|
68
|
+
}
|
|
69
|
+
.resend-btn {
|
|
70
|
+
svg {
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
}
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
&.disabled {
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
color: ${je.text.disabled};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`;Ce.propTypes={blocklet:d.object,label:d.string};const fs=ie.div`
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-items: flex-start;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 8px;
|
|
88
|
+
.name {
|
|
89
|
+
display: block;
|
|
90
|
+
max-width: 260px;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
}
|
|
95
|
+
`;function Ce({blocklet:t=null,label:s=""}){return e.jsx(fs,{children:t?e.jsxs(e.Fragment,{children:[e.jsx(it,{size:24,blocklet:t,ancestors:t.ancestors}),e.jsx("span",{className:"name",children:t.title||t.meta?.title})]}):e.jsx("span",{className:"name",children:s})})}ht.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function ht({list:t,label:s,onDelete:n=()=>{}}){return e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(U,{children:[s,": "]}),t.map(r=>e.jsx(Fe,{size:"small",label:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(he,{severity:r})}),onDelete:o=>n(o,r)},r))]})}function ms(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(he,{severity:s})})}function hs({customTableButtons:t}){const{t:s,locale:n}=X(),r=Xe(),o=At(r.breakpoints.down("sm")),l=g.useMemo(()=>Je(r,ut()),[r]),[x,f]=g.useState(!1),{data:y,paging:h,blocklet:b,fetch:S,getComponent:B,componentDids:_,inService:R,teamDid:$}=Be(),M=g.useRef(null),[k,F]=g.useState(null),[V,G]=g.useState("info"),J=qt(),[m,N]=g.useState(!1),O=`notification-records-${b.meta?.did}`,A=_t(O),[w,L]=g.useState({pageSize:A.rowsPerPage||10,page:A.page?A.page+1:1,dids:A.dids||[],dateRange:A.dateRange||[K().subtract(1,"month").startOf("day").toDate(),K().endOf("day").toDate()]}),P=Q(()=>{if(!b.children||!b.children.length)return[];const p=[];return b.children.forEach(u=>{const j=u.did||u.meta?.did;_.includes(j)&&(u.ancestors=[b],p.push(u))}),p},[_,b]),ae=async p=>{try{f(!0),await S(p),f(!1)}finally{f(!1)}};g.useEffect(()=>{ae(w)},[w]),g.useEffect(()=>{const p=y.find(u=>u.id===k?.id);k&&p&&F({...p})},[y]);const se=(p,u,j,I)=>{p.stopPropagation();const E=j.filter(T=>T!==u);L(T=>({...T,[I]:E,page:1}))},Z=({page:p,rowsPerPage:u,filterList:j})=>{const[I=[],,,,E=[]]=j;w.pageSize!==u?L(T=>({...T,pageSize:u,page:1})):w.page!==p+1?L(T=>({...T,page:p+1})):pe(w.dids,I)?pe(w.severities,E)||L(T=>({...T,severities:E,page:1})):L(T=>({...T,dids:I,page:1}))},oe=g.useCallback(()=>{F(null),G("info")},[]),we=g.useCallback(()=>{S(w)},[S,w]),ne=[{label:s("notification.from"),name:"sender",width:400,options:{filter:!0,filterType:"custom",customFilterListOptions:{render:p=>p.map((u,j)=>{if(u==="system")return e.jsx("span",{children:s("notification.system")},`system-${j}`);const I=P.find(E=>(E.did||E.meta?.did)===u);return e.jsx(Ce,{blocklet:I,label:I?.title||I?.meta?.title},u)}),update:(p,u,j)=>(p[j].splice(u,1),p)},filterOptions:{names:P,logic:(p,u)=>u.length?!u.includes(p):!1,display:(p,u,j,I)=>e.jsxs(Pe,{style:{width:"380px"},children:[e.jsx(Ot,{id:"demo-simple-select-label",style:{background:"#ffffff"},children:"Sender"}),e.jsxs(Lt,{multiple:!0,value:p[j],renderValue:E=>e.jsx(C,{style:{overflow:"hidden",textOverflow:"ellipsis"},sx:{display:"flex",gap:1,alignItems:"center"},children:E.map(T=>{if(T==="system")return e.jsx("span",{children:s("notification.system")},T);const le=P.find(i=>(i.did||i.meta?.did)===T);return e.jsx(Ce,{blocklet:le,label:le?.title||le?.meta?.title},T)})}),onChange:E=>{p[j]=E.target.value,u(p[j],j,I)},children:[e.jsx($e,{value:"system",children:s("notification.system")}),P.map(E=>{const T=E.did||E.meta?.did;return e.jsx($e,{value:T,children:e.jsx(Ce,{blocklet:E,label:E.title||E.meta?.title})},T)})]})]})},customBodyRenderLite:p=>{const u=y[p],j=B(u.componentDid);return e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[j?e.jsx(it,{size:32,blocklet:j,ancestors:j.ancestors??[]}):e.jsx(Dt,{blocklet:b,size:32}),e.jsx(me,{maxLength:50,children:j?.meta?.title||b?.meta?.title})]})}}},{label:s("notification.receiver"),name:"receivers",width:300,options:{filter:!1,customBodyRenderLite:p=>{const u=y[p],{receivers:j}=u;return e.jsx(kt,{total:j.length,renderSurplus:I=>I<100?e.jsxs("span",{children:["+",I]}):e.jsx("span",{children:"99+"}),max:3,sx:{justifyContent:"flex-end",height:"32px",".MuiAvatar-root":{width:"32px",height:"32px",fontSize:"12px",border:0,zIndex:2}},onClick:I=>{I.stopPropagation(),F(u),G("receivers")},children:j.map(I=>{const{receiverUser:E}=I,T=st(E.avatar,$,R);return e.jsx(Ze,{alt:E.fullName,src:`${T}?imageFilter=resize&w=48&h=48`,size:32,did:I.receiver,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}},I.receiver)})})}}},{label:s("notification.statistics"),name:"statistics",width:400,options:{filter:!1,customBodyRenderLite:p=>{const u=y[p];return e.jsx(C,{onClick:j=>{j.stopPropagation(),F(u),G("statistics")},children:e.jsx(Ke,{statistics:u.statistics})})}}},{label:s("notification.notificationPreview"),name:"data",options:{filter:!1,customBodyRenderLite:p=>{const u=y[p];return e.jsx(me,{maxLength:50,children:u.title})}}},{label:s("notification.severity"),name:"severity",width:200,options:{setCellProps:()=>({className:"severity-cell"}),customBodyRenderLite:p=>{const u=y[p];return e.jsx(he,{severity:u.severity})},filter:!0,filterType:"custom",filterList:w.severities??[],customFilterListOptions:{render:p=>e.jsx(ht,{list:p,label:s("notification.severity"),onDelete:(u,j)=>{u.stopPropagation(),se(u,j,ne[4].options.filterList,"severities")}}),update:ye},filterOptions:{names:Ve,fullWidth:!0,logic:Se,display:(p,u,j,I)=>e.jsx(ms,{label:s("notification.severity"),filterList:p,onChange:u,index:j,column:I,filterValues:Ve})}}},{label:s("common.createdAt"),name:"createdAt",width:300,options:{filter:!1,customBodyRenderLite:p=>{const{createdAt:u}=y[p];return e.jsx(et,{value:u,locale:n,shouldUpdate:!0})}}}],re=p=>{L(u=>({...u,dateRange:p,page:1}))},ge=[e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[e.jsx(Ft,{onClick:()=>N(!0),sx:{p:J?0:void 0},children:e.jsx(Bt,{})},"settings"),J?e.jsx(U,{children:s("common.setting")}):null]}),...t||[]];return e.jsxs(C,{ref:M,sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:[e.jsx(gs,{isBreakpointsDownSm:o,children:e.jsx(tt,{theme:l,children:e.jsx(at,{className:"main-table",verticalKeyWidth:100,loading:x,locale:n,columns:ne,data:y,durable:O,onChange:Z,options:{sort:!1,download:!1,print:!1,search:!1,expandableRowsOnClick:!0,page:h.page-1,rowsPerPage:h.pageSize,count:h.total,...A,onRowClick:(p,{dataIndex:u})=>{F(y[u])}},title:e.jsx(We,{value:w.dateRange,onChange:re}),customButtons:ge,components:{TableFilterList:p=>e.jsx(Me,{...p,itemComponent:u=>e.jsx(He,{...u,canDelete:j=>j?.columnNames?.[j?.index||0]?.name==="sender"})})}})})}),k&&e.jsx(us,{refresh:we,onCancel:oe,notification:k,blocklet:b,tab:V}),e.jsx(nt,{title:`${s("common.notification")} ${s("common.setting")}`,fullWidth:!0,maxWidth:"md",open:m,onClose:()=>N(!1),PaperProps:{style:{minHeight:"500px"}},children:e.jsx(C,{sx:{mt:"-16px",overflowY:"hidden"},children:e.jsx(zt,{})})})]})}const gs=ie.div`
|
|
96
|
+
td.MuiTableCell-footer {
|
|
97
|
+
border: none !important;
|
|
98
|
+
}
|
|
99
|
+
.sent-status-cell {
|
|
100
|
+
.resend-btn {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
&:hover {
|
|
104
|
+
.resend-btn {
|
|
105
|
+
display: flex;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.custom-toobar-btns {
|
|
111
|
+
gap: 4px;
|
|
112
|
+
}
|
|
113
|
+
.custom-toobar-title-inner {
|
|
114
|
+
display: flex;
|
|
115
|
+
justify-content: ${({isBreakpointsDownSm:t})=>t?"space-between":"flex-end"};
|
|
116
|
+
padding-right: ${({isBreakpointsDownSm:t})=>t?"0":"8px"};
|
|
117
|
+
flex-wrap: wrap;
|
|
118
|
+
gap: 8px;
|
|
119
|
+
}
|
|
120
|
+
`;xs.propTypes={blocklet:d.object.isRequired,customTableButtons:d.array};function xs({blocklet:t={},customTableButtons:s=[]}){return e.jsx(Gt,{blocklet:t,children:e.jsx(hs,{customTableButtons:s})})}export{xs as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as t,p as n,j as r,bF as i,d0 as a}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-f461L7cH.js","./index-oppNoNvH.js","./index-DGkT7afN.css","./decode-DPztD6kB.js","./index-CX3PrUL2.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as t,p as n,j as r,bF as i,d0 as a}from"./index-oppNoNvH.js";const s=t.lazy(()=>i(()=>import("./index-f461L7cH.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),d=`{
|
|
3
3
|
getNodeInfo {
|
|
4
4
|
code
|
|
5
5
|
info {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bd as x}from"./index-
|
|
1
|
+
import{bd as x}from"./index-oppNoNvH.js";function D(a,i){for(var r=0;r<i.length;r++){const e=i[r];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in a)){const t=Object.getOwnPropertyDescriptor(e,s);t&&Object.defineProperty(a,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var l,w;function J(){if(w)return l;w=1;var a={default:l,call:function(i,r,e){var s="";typeof r=="function"&&(e=r,r={});var t={data:r===void 0?null:r};if(typeof e=="function"){var d="dscb"+window.dscb++;window[d]=e,t._dscbstub=d}return t=JSON.stringify(t),window._dsbridge?s=_dsbridge.call(i,t):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(s=prompt("_dsbridge="+i,t)),JSON.parse(s||"{}").data},register:function(i,r,e){var s=e?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){a.call("_dsb.dsinit")},0)),typeof r=="object"?s._obs[i]=r:s[i]=r},registerAsyn:function(i,r){this.register(i,r,!0)},hasNativeMethod:function(i,r){return this.call("_dsb.hasNativeMethod",{name:i,type:r||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};return function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:a,close:function(){a.call("_dsb.closePage")},_handleMessageFromNative:function(e){var s=JSON.parse(e.data),t={id:e.callbackId,complete:!0},d=this._dsf[e.method],o=this._dsaf[e.method],v=function(_,p){t.data=_.apply(p,s),a.call("_dsb.returnValue",t)},g=function(_,p){s.push(function(O,j){t.data=O,t.complete=j!==!1,a.call("_dsb.returnValue",t)}),_.apply(p,s)};if(d)v(d,this._dsf);else if(o)g(o,this._dsaf);else{var u=e.method.split(".");if(u.length<2)return;var b=u.pop(),h=u.join("."),c=this._dsf._obs,f=c[h]||{},n=f[b];if(n&&typeof n=="function"){v(n,f);return}if(c=this._dsaf._obs,f=c[h]||{},n=f[b],n&&typeof n=="function"){g(n,f);return}}}};for(var r in i)window[r]=i[r];a.register("_hasJavascriptMethod",function(e,s){var t=e.split(".");if(t.length<2)return!!(_dsf[t]||_dsaf[t]);var e=t.pop(),d=t.join("."),o=_dsf._obs[d]||_dsaf._obs[d];return o&&!!o[e]})}}(),l=a,l}var y=J();const N=x(y),k=D({__proto__:null,default:N},[y]);export{k as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as Kt,j as Q,bd as Gt,s as Ht,r as zt,Z as Wt,fn as we,dc as Zt,gg as Yt}from"./index-F3HbHSYi.js";const Xt=Kt(Q.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2zm-1 7h5.5L14 6.5z"}));var En,$n;function jt(){if($n)return En;$n=1;function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const a=e[t],f=typeof a;(f==="object"||f==="function")&&!Object.isFrozen(a)&&n(a)}),e}class r{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e,...t){const a=Object.create(null);for(const f in e)a[f]=e[f];return t.forEach(function(f){for(const P in f)a[P]=f[P]}),a}const w="</span>",$=e=>!!e.scope,A=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const a=e.split(".");return[`${t}${a.shift()}`,...a.map((f,P)=>`${f}${"_".repeat(P+1)}`)].join(" ")}return`${t}${e}`};class _{constructor(t,a){this.buffer="",this.classPrefix=a.classPrefix,t.walk(this)}addText(t){this.buffer+=o(t)}openNode(t){if(!$(t))return;const a=A(t.scope,{prefix:this.classPrefix});this.span(a)}closeNode(t){$(t)&&(this.buffer+=w)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const h=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class b{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const a=h({scope:t});this.add(a),this.stack.push(a)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,a){return typeof a=="string"?t.addText(a):a.children&&(t.openNode(a),a.children.forEach(f=>this._walk(t,f)),t.closeNode(a)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(a=>typeof a=="string")?t.children=[t.children.join("")]:t.children.forEach(a=>{b._collapse(a)}))}}class S extends b{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,a){const f=t.root;a&&(f.scope=`language:${a}`),this.add(f)}toHTML(){return new _(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function R(e){return e?typeof e=="string"?e:e.source:null}function N(e){return O("(?=",e,")")}function y(e){return O("(?:",e,")*")}function U(e){return O("(?:",e,")?")}function O(...e){return e.map(a=>R(a)).join("")}function F(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function B(...e){return"("+(F(e).capture?"":"?:")+e.map(f=>R(f)).join("|")+")"}function H(e){return new RegExp(e.toString()+"|").exec("").length-1}function Z(e,t){const a=e&&e.exec(t);return a&&a.index===0}const se=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function M(e,{joinWith:t}){let a=0;return e.map(f=>{a+=1;const P=a;let K=R(f),u="";for(;K.length>0;){const l=se.exec(K);if(!l){u+=K;break}u+=K.substring(0,l.index),K=K.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?u+="\\"+String(Number(l[1])+P):(u+=l[0],l[0]==="("&&a++)}return u}).map(f=>`(${f})`).join(t)}const V=/\b\B/,ce="[a-zA-Z]\\w*",te="[a-zA-Z_]\\w*",ae="\\b\\d+(\\.\\d+)?",de="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ne="\\b(0b[01]+)",Ee="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",he=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=O(t,/.*\b/,e.binary,/\b.*/)),c({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(a,f)=>{a.index!==0&&f.ignoreMatch()}},e)},re={begin:"\\\\[\\s\\S]",relevance:0},Ae={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[re]},be={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[re]},fe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},I=function(e,t,a={}){const f=c({scope:"comment",begin:e,end:t,contains:[]},a);f.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const P=B("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return f.contains.push({begin:O(/[ ]+/,"(",P,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),f},Y=I("//","$"),ee=I("/\\*","\\*/"),q=I("#","$"),X={scope:"number",begin:ae,relevance:0},_e={scope:"number",begin:de,relevance:0},qe={scope:"number",begin:Ne,relevance:0},Be={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[re,{begin:/\[/,end:/\]/,relevance:0,contains:[re]}]},ve={scope:"title",begin:ce,relevance:0},Je={scope:"title",begin:te,relevance:0},$e={begin:"\\.\\s*"+te,relevance:0};var Oe=Object.freeze({__proto__:null,APOS_STRING_MODE:Ae,BACKSLASH_ESCAPE:re,BINARY_NUMBER_MODE:qe,BINARY_NUMBER_RE:Ne,COMMENT:I,C_BLOCK_COMMENT_MODE:ee,C_LINE_COMMENT_MODE:Y,C_NUMBER_MODE:_e,C_NUMBER_RE:de,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(t,a)=>{a.data._beginMatch=t[1]},"on:end":(t,a)=>{a.data._beginMatch!==t[1]&&a.ignoreMatch()}})},HASH_COMMENT_MODE:q,IDENT_RE:ce,MATCH_NOTHING_RE:V,METHOD_GUARD:$e,NUMBER_MODE:X,NUMBER_RE:ae,PHRASAL_WORDS_MODE:fe,QUOTE_STRING_MODE:be,REGEXP_MODE:Be,RE_STARTERS_RE:Ee,SHEBANG:he,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:te,UNDERSCORE_TITLE_MODE:Je});function Qe(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function en(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function nn(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Qe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function tn(e,t){Array.isArray(e.illegal)&&(e.illegal=B(...e.illegal))}function sn(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function L(e,t){e.relevance===void 0&&(e.relevance=1)}const Ie=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const a=Object.assign({},e);Object.keys(e).forEach(f=>{delete e[f]}),e.keywords=a.keywords,e.begin=O(a.beforeMatch,N(a.begin)),e.starts={relevance:0,contains:[Object.assign(a,{endsParent:!0})]},e.relevance=0,delete a.beforeMatch},Re=["of","and","for","in","not","or","if","then","parent","list","value"],an="keyword";function mn(e,t,a=an){const f=Object.create(null);return typeof e=="string"?P(a,e.split(" ")):Array.isArray(e)?P(a,e):Object.keys(e).forEach(function(K){Object.assign(f,mn(e[K],t,K))}),f;function P(K,u){t&&(u=u.map(l=>l.toLowerCase())),u.forEach(function(l){const E=l.split("|");f[E[0]]=[K,dt(E[0],E[1])]})}}function dt(e,t){return t?Number(t):Et(e)?0:1}function Et(e){return Re.includes(e.toLowerCase())}const An={},Te=e=>{console.error(e)},Rn=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Me=(e,t)=>{An[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),An[`${e}/${t}`]=!0)},Ue=new Error;function Tn(e,t,{key:a}){let f=0;const P=e[a],K={},u={};for(let l=1;l<=t.length;l++)u[l+f]=P[l],K[l+f]=!0,f+=H(t[l-1]);e[a]=u,e[a]._emit=K,e[a]._multi=!0}function bt(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Te("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ue;if(typeof e.beginScope!="object"||e.beginScope===null)throw Te("beginScope must be object"),Ue;Tn(e,e.begin,{key:"beginScope"}),e.begin=M(e.begin,{joinWith:""})}}function ft(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Te("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ue;if(typeof e.endScope!="object"||e.endScope===null)throw Te("endScope must be object"),Ue;Tn(e,e.end,{key:"endScope"}),e.end=M(e.end,{joinWith:""})}}function _t(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function pt(e){_t(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),bt(e),ft(e)}function Nt(e){function t(u,l){return new RegExp(R(u),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class a{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,E){E.position=this.position++,this.matchIndexes[this.matchAt]=E,this.regexes.push([E,l]),this.matchAt+=H(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(E=>E[1]);this.matcherRe=t(M(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const E=this.matcherRe.exec(l);if(!E)return null;const W=E.findIndex((De,cn)=>cn>0&&De!==void 0),G=this.matchIndexes[W];return E.splice(0,W),Object.assign(E,G)}}class f{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const E=new a;return this.rules.slice(l).forEach(([W,G])=>E.addRule(W,G)),E.compile(),this.multiRegexes[l]=E,E}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,E){this.rules.push([l,E]),E.type==="begin"&&this.count++}exec(l){const E=this.getMatcher(this.regexIndex);E.lastIndex=this.lastIndex;let W=E.exec(l);if(this.resumingScanAtSamePosition()&&!(W&&W.index===this.lastIndex)){const G=this.getMatcher(0);G.lastIndex=this.lastIndex+1,W=G.exec(l)}return W&&(this.regexIndex+=W.position+1,this.regexIndex===this.count&&this.considerAll()),W}}function P(u){const l=new f;return u.contains.forEach(E=>l.addRule(E.begin,{rule:E,type:"begin"})),u.terminatorEnd&&l.addRule(u.terminatorEnd,{type:"end"}),u.illegal&&l.addRule(u.illegal,{type:"illegal"}),l}function K(u,l){const E=u;if(u.isCompiled)return E;[en,sn,pt,Ie].forEach(G=>G(u,l)),e.compilerExtensions.forEach(G=>G(u,l)),u.__beforeBegin=null,[nn,tn,L].forEach(G=>G(u,l)),u.isCompiled=!0;let W=null;return typeof u.keywords=="object"&&u.keywords.$pattern&&(u.keywords=Object.assign({},u.keywords),W=u.keywords.$pattern,delete u.keywords.$pattern),W=W||/\w+/,u.keywords&&(u.keywords=mn(u.keywords,e.case_insensitive)),E.keywordPatternRe=t(W,!0),l&&(u.begin||(u.begin=/\B|\b/),E.beginRe=t(E.begin),!u.end&&!u.endsWithParent&&(u.end=/\B|\b/),u.end&&(E.endRe=t(E.end)),E.terminatorEnd=R(E.end)||"",u.endsWithParent&&l.terminatorEnd&&(E.terminatorEnd+=(u.end?"|":"")+l.terminatorEnd)),u.illegal&&(E.illegalRe=t(u.illegal)),u.contains||(u.contains=[]),u.contains=[].concat(...u.contains.map(function(G){return ht(G==="self"?u:G)})),u.contains.forEach(function(G){K(G,E)}),u.starts&&K(u.starts,l),E.matcher=P(E),E}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=c(e.classNameAliases||{}),K(e)}function yn(e){return e?e.endsWithParent||yn(e.starts):!1}function ht(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return c(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:yn(e)?c(e,{starts:e.starts?c(e.starts):null}):Object.isFrozen(e)?c(e):e}var St="11.11.1";class mt extends Error{constructor(t,a){super(t),this.name="HTMLInjectionError",this.html=a}}const rn=o,On=c,In=Symbol("nomatch"),At=7,Mn=function(e){const t=Object.create(null),a=Object.create(null),f=[];let P=!0;const K="Could not find the language '{}', did you forget to load/include a language module?",u={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:S};function E(s){return l.noHighlightRe.test(s)}function W(s){let d=s.className+" ";d+=s.parentNode?s.parentNode.className:"";const T=l.languageDetectRe.exec(d);if(T){const D=Se(T[1]);return D||(Rn(K.replace("{}",T[1])),Rn("Falling back to no-highlight mode for this block.",s)),D?T[1]:"no-highlight"}return d.split(/\s+/).find(D=>E(D)||Se(D))}function G(s,d,T){let D="",z="";typeof d=="object"?(D=s,T=d.ignoreIllegals,z=d.language):(Me("10.7.0","highlight(lang, code, ...args) has been deprecated."),Me("10.7.0",`Please use highlight(code, options) instead.
|
|
1
|
+
import{aF as Kt,j as Q,bd as Gt,s as Ht,r as zt,Z as Wt,fn as we,dc as Zt,gc as Yt}from"./index-oppNoNvH.js";const Xt=Kt(Q.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2zm-1 7h5.5L14 6.5z"}));var En,$n;function jt(){if($n)return En;$n=1;function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const a=e[t],f=typeof a;(f==="object"||f==="function")&&!Object.isFrozen(a)&&n(a)}),e}class r{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e,...t){const a=Object.create(null);for(const f in e)a[f]=e[f];return t.forEach(function(f){for(const P in f)a[P]=f[P]}),a}const w="</span>",$=e=>!!e.scope,A=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const a=e.split(".");return[`${t}${a.shift()}`,...a.map((f,P)=>`${f}${"_".repeat(P+1)}`)].join(" ")}return`${t}${e}`};class _{constructor(t,a){this.buffer="",this.classPrefix=a.classPrefix,t.walk(this)}addText(t){this.buffer+=o(t)}openNode(t){if(!$(t))return;const a=A(t.scope,{prefix:this.classPrefix});this.span(a)}closeNode(t){$(t)&&(this.buffer+=w)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const h=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class b{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const a=h({scope:t});this.add(a),this.stack.push(a)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,a){return typeof a=="string"?t.addText(a):a.children&&(t.openNode(a),a.children.forEach(f=>this._walk(t,f)),t.closeNode(a)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(a=>typeof a=="string")?t.children=[t.children.join("")]:t.children.forEach(a=>{b._collapse(a)}))}}class S extends b{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,a){const f=t.root;a&&(f.scope=`language:${a}`),this.add(f)}toHTML(){return new _(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function R(e){return e?typeof e=="string"?e:e.source:null}function N(e){return O("(?=",e,")")}function y(e){return O("(?:",e,")*")}function U(e){return O("(?:",e,")?")}function O(...e){return e.map(a=>R(a)).join("")}function F(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function B(...e){return"("+(F(e).capture?"":"?:")+e.map(f=>R(f)).join("|")+")"}function H(e){return new RegExp(e.toString()+"|").exec("").length-1}function Z(e,t){const a=e&&e.exec(t);return a&&a.index===0}const se=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function M(e,{joinWith:t}){let a=0;return e.map(f=>{a+=1;const P=a;let K=R(f),u="";for(;K.length>0;){const l=se.exec(K);if(!l){u+=K;break}u+=K.substring(0,l.index),K=K.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?u+="\\"+String(Number(l[1])+P):(u+=l[0],l[0]==="("&&a++)}return u}).map(f=>`(${f})`).join(t)}const V=/\b\B/,ce="[a-zA-Z]\\w*",te="[a-zA-Z_]\\w*",ae="\\b\\d+(\\.\\d+)?",de="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ne="\\b(0b[01]+)",Ee="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",he=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=O(t,/.*\b/,e.binary,/\b.*/)),c({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(a,f)=>{a.index!==0&&f.ignoreMatch()}},e)},re={begin:"\\\\[\\s\\S]",relevance:0},Ae={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[re]},be={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[re]},fe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},I=function(e,t,a={}){const f=c({scope:"comment",begin:e,end:t,contains:[]},a);f.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const P=B("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return f.contains.push({begin:O(/[ ]+/,"(",P,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),f},Y=I("//","$"),ee=I("/\\*","\\*/"),q=I("#","$"),X={scope:"number",begin:ae,relevance:0},_e={scope:"number",begin:de,relevance:0},qe={scope:"number",begin:Ne,relevance:0},Be={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[re,{begin:/\[/,end:/\]/,relevance:0,contains:[re]}]},ve={scope:"title",begin:ce,relevance:0},Je={scope:"title",begin:te,relevance:0},$e={begin:"\\.\\s*"+te,relevance:0};var Oe=Object.freeze({__proto__:null,APOS_STRING_MODE:Ae,BACKSLASH_ESCAPE:re,BINARY_NUMBER_MODE:qe,BINARY_NUMBER_RE:Ne,COMMENT:I,C_BLOCK_COMMENT_MODE:ee,C_LINE_COMMENT_MODE:Y,C_NUMBER_MODE:_e,C_NUMBER_RE:de,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(t,a)=>{a.data._beginMatch=t[1]},"on:end":(t,a)=>{a.data._beginMatch!==t[1]&&a.ignoreMatch()}})},HASH_COMMENT_MODE:q,IDENT_RE:ce,MATCH_NOTHING_RE:V,METHOD_GUARD:$e,NUMBER_MODE:X,NUMBER_RE:ae,PHRASAL_WORDS_MODE:fe,QUOTE_STRING_MODE:be,REGEXP_MODE:Be,RE_STARTERS_RE:Ee,SHEBANG:he,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:te,UNDERSCORE_TITLE_MODE:Je});function Qe(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function en(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function nn(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Qe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function tn(e,t){Array.isArray(e.illegal)&&(e.illegal=B(...e.illegal))}function sn(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function L(e,t){e.relevance===void 0&&(e.relevance=1)}const Ie=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const a=Object.assign({},e);Object.keys(e).forEach(f=>{delete e[f]}),e.keywords=a.keywords,e.begin=O(a.beforeMatch,N(a.begin)),e.starts={relevance:0,contains:[Object.assign(a,{endsParent:!0})]},e.relevance=0,delete a.beforeMatch},Re=["of","and","for","in","not","or","if","then","parent","list","value"],an="keyword";function mn(e,t,a=an){const f=Object.create(null);return typeof e=="string"?P(a,e.split(" ")):Array.isArray(e)?P(a,e):Object.keys(e).forEach(function(K){Object.assign(f,mn(e[K],t,K))}),f;function P(K,u){t&&(u=u.map(l=>l.toLowerCase())),u.forEach(function(l){const E=l.split("|");f[E[0]]=[K,dt(E[0],E[1])]})}}function dt(e,t){return t?Number(t):Et(e)?0:1}function Et(e){return Re.includes(e.toLowerCase())}const An={},Te=e=>{console.error(e)},Rn=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Me=(e,t)=>{An[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),An[`${e}/${t}`]=!0)},Ue=new Error;function Tn(e,t,{key:a}){let f=0;const P=e[a],K={},u={};for(let l=1;l<=t.length;l++)u[l+f]=P[l],K[l+f]=!0,f+=H(t[l-1]);e[a]=u,e[a]._emit=K,e[a]._multi=!0}function bt(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Te("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ue;if(typeof e.beginScope!="object"||e.beginScope===null)throw Te("beginScope must be object"),Ue;Tn(e,e.begin,{key:"beginScope"}),e.begin=M(e.begin,{joinWith:""})}}function ft(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Te("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ue;if(typeof e.endScope!="object"||e.endScope===null)throw Te("endScope must be object"),Ue;Tn(e,e.end,{key:"endScope"}),e.end=M(e.end,{joinWith:""})}}function _t(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function pt(e){_t(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),bt(e),ft(e)}function Nt(e){function t(u,l){return new RegExp(R(u),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class a{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,E){E.position=this.position++,this.matchIndexes[this.matchAt]=E,this.regexes.push([E,l]),this.matchAt+=H(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(E=>E[1]);this.matcherRe=t(M(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const E=this.matcherRe.exec(l);if(!E)return null;const W=E.findIndex((De,cn)=>cn>0&&De!==void 0),G=this.matchIndexes[W];return E.splice(0,W),Object.assign(E,G)}}class f{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const E=new a;return this.rules.slice(l).forEach(([W,G])=>E.addRule(W,G)),E.compile(),this.multiRegexes[l]=E,E}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,E){this.rules.push([l,E]),E.type==="begin"&&this.count++}exec(l){const E=this.getMatcher(this.regexIndex);E.lastIndex=this.lastIndex;let W=E.exec(l);if(this.resumingScanAtSamePosition()&&!(W&&W.index===this.lastIndex)){const G=this.getMatcher(0);G.lastIndex=this.lastIndex+1,W=G.exec(l)}return W&&(this.regexIndex+=W.position+1,this.regexIndex===this.count&&this.considerAll()),W}}function P(u){const l=new f;return u.contains.forEach(E=>l.addRule(E.begin,{rule:E,type:"begin"})),u.terminatorEnd&&l.addRule(u.terminatorEnd,{type:"end"}),u.illegal&&l.addRule(u.illegal,{type:"illegal"}),l}function K(u,l){const E=u;if(u.isCompiled)return E;[en,sn,pt,Ie].forEach(G=>G(u,l)),e.compilerExtensions.forEach(G=>G(u,l)),u.__beforeBegin=null,[nn,tn,L].forEach(G=>G(u,l)),u.isCompiled=!0;let W=null;return typeof u.keywords=="object"&&u.keywords.$pattern&&(u.keywords=Object.assign({},u.keywords),W=u.keywords.$pattern,delete u.keywords.$pattern),W=W||/\w+/,u.keywords&&(u.keywords=mn(u.keywords,e.case_insensitive)),E.keywordPatternRe=t(W,!0),l&&(u.begin||(u.begin=/\B|\b/),E.beginRe=t(E.begin),!u.end&&!u.endsWithParent&&(u.end=/\B|\b/),u.end&&(E.endRe=t(E.end)),E.terminatorEnd=R(E.end)||"",u.endsWithParent&&l.terminatorEnd&&(E.terminatorEnd+=(u.end?"|":"")+l.terminatorEnd)),u.illegal&&(E.illegalRe=t(u.illegal)),u.contains||(u.contains=[]),u.contains=[].concat(...u.contains.map(function(G){return ht(G==="self"?u:G)})),u.contains.forEach(function(G){K(G,E)}),u.starts&&K(u.starts,l),E.matcher=P(E),E}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=c(e.classNameAliases||{}),K(e)}function yn(e){return e?e.endsWithParent||yn(e.starts):!1}function ht(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return c(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:yn(e)?c(e,{starts:e.starts?c(e.starts):null}):Object.isFrozen(e)?c(e):e}var St="11.11.1";class mt extends Error{constructor(t,a){super(t),this.name="HTMLInjectionError",this.html=a}}const rn=o,On=c,In=Symbol("nomatch"),At=7,Mn=function(e){const t=Object.create(null),a=Object.create(null),f=[];let P=!0;const K="Could not find the language '{}', did you forget to load/include a language module?",u={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:S};function E(s){return l.noHighlightRe.test(s)}function W(s){let d=s.className+" ";d+=s.parentNode?s.parentNode.className:"";const T=l.languageDetectRe.exec(d);if(T){const D=Se(T[1]);return D||(Rn(K.replace("{}",T[1])),Rn("Falling back to no-highlight mode for this block.",s)),D?T[1]:"no-highlight"}return d.split(/\s+/).find(D=>E(D)||Se(D))}function G(s,d,T){let D="",z="";typeof d=="object"?(D=s,T=d.ignoreIllegals,z=d.language):(Me("10.7.0","highlight(lang, code, ...args) has been deprecated."),Me("10.7.0",`Please use highlight(code, options) instead.
|
|
2
2
|
https://github.com/highlightjs/highlight.js/issues/2277`),z=s,D=d),T===void 0&&(T=!0);const oe={code:D,language:z};Pe("before:highlight",oe);const me=oe.result?oe.result:De(oe.language,oe.code,T);return me.code=oe.code,Pe("after:highlight",me),me}function De(s,d,T,D){const z=Object.create(null);function oe(i,g){return i.keywords[g]}function me(){if(!p.keywords){j.addText(k);return}let i=0;p.keywordPatternRe.lastIndex=0;let g=p.keywordPatternRe.exec(k),m="";for(;g;){m+=k.substring(i,g.index);const C=ue.case_insensitive?g[0].toLowerCase():g[0],J=oe(p,C);if(J){const[pe,Ft]=J;if(j.addText(m),m="",z[C]=(z[C]||0)+1,z[C]<=At&&(He+=Ft),pe.startsWith("_"))m+=g[0];else{const Pt=ue.classNameAliases[pe]||pe;le(g[0],Pt)}}else m+=g[0];i=p.keywordPatternRe.lastIndex,g=p.keywordPatternRe.exec(k)}m+=k.substring(i),j.addText(m)}function Ke(){if(k==="")return;let i=null;if(typeof p.subLanguage=="string"){if(!t[p.subLanguage]){j.addText(k);return}i=De(p.subLanguage,k,!0,Bn[p.subLanguage]),Bn[p.subLanguage]=i._top}else i=on(k,p.subLanguage.length?p.subLanguage:null);p.relevance>0&&(He+=i.relevance),j.__addSublanguage(i._emitter,i.language)}function ie(){p.subLanguage!=null?Ke():me(),k=""}function le(i,g){i!==""&&(j.startScope(g),j.addText(i),j.endScope())}function xn(i,g){let m=1;const C=g.length-1;for(;m<=C;){if(!i._emit[m]){m++;continue}const J=ue.classNameAliases[i[m]]||i[m],pe=g[m];J?le(pe,J):(k=pe,me(),k=""),m++}}function vn(i,g){return i.scope&&typeof i.scope=="string"&&j.openNode(ue.classNameAliases[i.scope]||i.scope),i.beginScope&&(i.beginScope._wrap?(le(k,ue.classNameAliases[i.beginScope._wrap]||i.beginScope._wrap),k=""):i.beginScope._multi&&(xn(i.beginScope,g),k="")),p=Object.create(i,{parent:{value:p}}),p}function Dn(i,g,m){let C=Z(i.endRe,m);if(C){if(i["on:end"]){const J=new r(i);i["on:end"](g,J),J.isMatchIgnored&&(C=!1)}if(C){for(;i.endsParent&&i.parent;)i=i.parent;return i}}if(i.endsWithParent)return Dn(i.parent,g,m)}function Dt(i){return p.matcher.regexIndex===0?(k+=i[0],1):(dn=!0,0)}function kt(i){const g=i[0],m=i.rule,C=new r(m),J=[m.__beforeBegin,m["on:begin"]];for(const pe of J)if(pe&&(pe(i,C),C.isMatchIgnored))return Dt(g);return m.skip?k+=g:(m.excludeBegin&&(k+=g),ie(),!m.returnBegin&&!m.excludeBegin&&(k=g)),vn(m,i),m.returnBegin?0:g.length}function Bt(i){const g=i[0],m=d.substring(i.index),C=Dn(p,i,m);if(!C)return In;const J=p;p.endScope&&p.endScope._wrap?(ie(),le(g,p.endScope._wrap)):p.endScope&&p.endScope._multi?(ie(),xn(p.endScope,i)):J.skip?k+=g:(J.returnEnd||J.excludeEnd||(k+=g),ie(),J.excludeEnd&&(k=g));do p.scope&&j.closeNode(),!p.skip&&!p.subLanguage&&(He+=p.relevance),p=p.parent;while(p!==C.parent);return C.starts&&vn(C.starts,i),J.returnEnd?0:g.length}function $t(){const i=[];for(let g=p;g!==ue;g=g.parent)g.scope&&i.unshift(g.scope);i.forEach(g=>j.openNode(g))}let Ge={};function kn(i,g){const m=g&&g[0];if(k+=i,m==null)return ie(),0;if(Ge.type==="begin"&&g.type==="end"&&Ge.index===g.index&&m===""){if(k+=d.slice(g.index,g.index+1),!P){const C=new Error(`0 width match regex (${s})`);throw C.languageName=s,C.badRule=Ge.rule,C}return 1}if(Ge=g,g.type==="begin")return kt(g);if(g.type==="illegal"&&!T){const C=new Error('Illegal lexeme "'+m+'" for mode "'+(p.scope||"<unnamed>")+'"');throw C.mode=p,C}else if(g.type==="end"){const C=Bt(g);if(C!==In)return C}if(g.type==="illegal"&&m==="")return k+=`
|
|
3
3
|
`,1;if(gn>1e5&&gn>g.index*3)throw new Error("potential infinite loop, way more iterations than matches");return k+=m,m.length}const ue=Se(s);if(!ue)throw Te(K.replace("{}",s)),new Error('Unknown language: "'+s+'"');const Ut=Nt(ue);let un="",p=D||Ut;const Bn={},j=new l.__emitter(l);$t();let k="",He=0,ye=0,gn=0,dn=!1;try{if(ue.__emitTokens)ue.__emitTokens(d,j);else{for(p.matcher.considerAll();;){gn++,dn?dn=!1:p.matcher.considerAll(),p.matcher.lastIndex=ye;const i=p.matcher.exec(d);if(!i)break;const g=d.substring(ye,i.index),m=kn(g,i);ye=i.index+m}kn(d.substring(ye))}return j.finalize(),un=j.toHTML(),{language:s,value:un,relevance:He,illegal:!1,_emitter:j,_top:p}}catch(i){if(i.message&&i.message.includes("Illegal"))return{language:s,value:rn(d),illegal:!0,relevance:0,_illegalBy:{message:i.message,index:ye,context:d.slice(ye-100,ye+100),mode:i.mode,resultSoFar:un},_emitter:j};if(P)return{language:s,value:rn(d),illegal:!1,relevance:0,errorRaised:i,_emitter:j,_top:p};throw i}}function cn(s){const d={value:rn(s),illegal:!1,relevance:0,_top:u,_emitter:new l.__emitter(l)};return d._emitter.addText(s),d}function on(s,d){d=d||l.languages||Object.keys(t);const T=cn(s),D=d.filter(Se).filter(Ln).map(ie=>De(ie,s,!1));D.unshift(T);const z=D.sort((ie,le)=>{if(ie.relevance!==le.relevance)return le.relevance-ie.relevance;if(ie.language&&le.language){if(Se(ie.language).supersetOf===le.language)return 1;if(Se(le.language).supersetOf===ie.language)return-1}return 0}),[oe,me]=z,Ke=oe;return Ke.secondBest=me,Ke}function Rt(s,d,T){const D=d&&a[d]||T;s.classList.add("hljs"),s.classList.add(`language-${D}`)}function ln(s){let d=null;const T=W(s);if(E(T))return;if(Pe("before:highlightElement",{el:s,language:T}),s.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",s);return}if(s.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(s)),l.throwUnescapedHTML))throw new mt("One of your code blocks includes unescaped HTML.",s.innerHTML);d=s;const D=d.textContent,z=T?G(D,{language:T,ignoreIllegals:!0}):on(D);s.innerHTML=z.value,s.dataset.highlighted="yes",Rt(s,T,z.language),s.result={language:z.language,re:z.relevance,relevance:z.relevance},z.secondBest&&(s.secondBest={language:z.secondBest.language,relevance:z.secondBest.relevance}),Pe("after:highlightElement",{el:s,result:z,text:D})}function Tt(s){l=On(l,s)}const yt=()=>{Fe(),Me("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ot(){Fe(),Me("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Cn=!1;function Fe(){function s(){Fe()}if(document.readyState==="loading"){Cn||window.addEventListener("DOMContentLoaded",s,!1),Cn=!0;return}document.querySelectorAll(l.cssSelector).forEach(ln)}function It(s,d){let T=null;try{T=d(e)}catch(D){if(Te("Language definition for '{}' could not be registered.".replace("{}",s)),P)Te(D);else throw D;T=u}T.name||(T.name=s),t[s]=T,T.rawDefinition=d.bind(null,e),T.aliases&&wn(T.aliases,{languageName:s})}function Mt(s){delete t[s];for(const d of Object.keys(a))a[d]===s&&delete a[d]}function Ct(){return Object.keys(t)}function Se(s){return s=(s||"").toLowerCase(),t[s]||t[a[s]]}function wn(s,{languageName:d}){typeof s=="string"&&(s=[s]),s.forEach(T=>{a[T.toLowerCase()]=d})}function Ln(s){const d=Se(s);return d&&!d.disableAutodetect}function wt(s){s["before:highlightBlock"]&&!s["before:highlightElement"]&&(s["before:highlightElement"]=d=>{s["before:highlightBlock"](Object.assign({block:d.el},d))}),s["after:highlightBlock"]&&!s["after:highlightElement"]&&(s["after:highlightElement"]=d=>{s["after:highlightBlock"](Object.assign({block:d.el},d))})}function Lt(s){wt(s),f.push(s)}function xt(s){const d=f.indexOf(s);d!==-1&&f.splice(d,1)}function Pe(s,d){const T=s;f.forEach(function(D){D[T]&&D[T](d)})}function vt(s){return Me("10.7.0","highlightBlock will be removed entirely in v12.0"),Me("10.7.0","Please use highlightElement now."),ln(s)}Object.assign(e,{highlight:G,highlightAuto:on,highlightAll:Fe,highlightElement:ln,highlightBlock:vt,configure:Tt,initHighlighting:yt,initHighlightingOnLoad:Ot,registerLanguage:It,unregisterLanguage:Mt,listLanguages:Ct,getLanguage:Se,registerAliases:wn,autoDetection:Ln,inherit:On,addPlugin:Lt,removePlugin:xt}),e.debugMode=function(){P=!1},e.safeMode=function(){P=!0},e.versionString=St,e.regex={concat:O,lookahead:N,either:B,optional:U,anyNumberOfTimes:y};for(const s in Oe)typeof Oe[s]=="object"&&n(Oe[s]);return Object.assign(e,Oe),e},Ce=Mn({});return Ce.newInstance=()=>Mn({}),En=Ce,Ce.HighlightJS=Ce,Ce.default=Ce,En}var Vt=jt();const v=Gt(Vt),Un="[A-Za-z$_][0-9A-Za-z$_]*",qt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Jt=["true","false","null","undefined","NaN","Infinity"],Hn=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],zn=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Wn=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Qt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],es=[].concat(Wn,Hn,zn);function pn(n){const r=n.regex,o=(I,{after:Y})=>{const ee="</"+I[0].slice(1);return I.input.indexOf(ee,Y)!==-1},c=Un,w={begin:"<>",end:"</>"},$=/<[A-Za-z0-9\\._:-]+\s*\/>/,A={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(I,Y)=>{const ee=I[0].length+I.index,q=I.input[ee];if(q==="<"||q===","){Y.ignoreMatch();return}q===">"&&(o(I,{after:ee})||Y.ignoreMatch());let X;const _e=I.input.substring(ee);if(X=_e.match(/^\s*=/)){Y.ignoreMatch();return}if((X=_e.match(/^\s+extends\s+/))&&X.index===0){Y.ignoreMatch();return}}},_={$pattern:Un,keyword:qt,literal:Jt,built_in:es,"variable.language":Qt},h="[0-9](_?[0-9])*",b=`\\.(${h})`,S="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",R={className:"number",variants:[{begin:`(\\b(${S})((${b})|\\.)?|(${b}))[eE][+-]?(${h})\\b`},{begin:`\\b(${S})\\b((${b})\\b|\\.)?|(${b})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},N={className:"subst",begin:"\\$\\{",end:"\\}",keywords:_,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,N],subLanguage:"xml"}},U={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,N],subLanguage:"css"}},O={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,N],subLanguage:"graphql"}},F={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,N]},H={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:c+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},Z=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,y,U,O,F,{match:/\$\d+/},R];N.contains=Z.concat({begin:/\{/,end:/\}/,keywords:_,contains:["self"].concat(Z)});const se=[].concat(H,N.contains),M=se.concat([{begin:/(\s*)\(/,end:/\)/,keywords:_,contains:["self"].concat(se)}]),V={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:M},ce={variants:[{match:[/class/,/\s+/,c,/\s+/,/extends/,/\s+/,r.concat(c,"(",r.concat(/\./,c),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,c],scope:{1:"keyword",3:"title.class"}}]},te={relevance:0,match:r.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Hn,...zn]}},ae={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},de={variants:[{match:[/function/,/\s+/,c,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[V],illegal:/%/},Ne={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Ee(I){return r.concat("(?!",I.join("|"),")")}const he={match:r.concat(/\b/,Ee([...Wn,"super","import"].map(I=>`${I}\\s*\\(`)),c,r.lookahead(/\s*\(/)),className:"title.function",relevance:0},re={begin:r.concat(/\./,r.lookahead(r.concat(c,/(?![0-9A-Za-z$_(])/))),end:c,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Ae={match:[/get|set/,/\s+/,c,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},V]},be="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",fe={match:[/const|var|let/,/\s+/,c,/\s*/,/=\s*/,/(async\s*)?/,r.lookahead(be)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[V]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:_,exports:{PARAMS_CONTAINS:M,CLASS_REFERENCE:te},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),ae,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,y,U,O,F,H,{match:/\$\d+/},R,te,{scope:"attr",match:c+r.lookahead(":"),relevance:0},fe,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[H,n.REGEXP_MODE,{className:"function",begin:be,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:M}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:w.begin,end:w.end},{match:$},{begin:A.begin,"on:begin":A.isTrulyOpeningTag,end:A.end}],subLanguage:"xml",contains:[{begin:A.begin,end:A.end,skip:!0,contains:["self"]}]}]},de,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[V,n.inherit(n.TITLE_MODE,{begin:c,className:"title.function"})]},{match:/\.\.\./,relevance:0},re,{match:"\\$"+c,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[V]},he,Ne,ce,Ae,{match:/\$[(.]/}]}}const je="[A-Za-z$_][0-9A-Za-z$_]*",Zn=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Yn=["true","false","null","undefined","NaN","Infinity"],Xn=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],jn=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vn=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],qn=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Jn=[].concat(Vn,Xn,jn);function ns(n){const r=n.regex,o=(I,{after:Y})=>{const ee="</"+I[0].slice(1);return I.input.indexOf(ee,Y)!==-1},c=je,w={begin:"<>",end:"</>"},$=/<[A-Za-z0-9\\._:-]+\s*\/>/,A={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(I,Y)=>{const ee=I[0].length+I.index,q=I.input[ee];if(q==="<"||q===","){Y.ignoreMatch();return}q===">"&&(o(I,{after:ee})||Y.ignoreMatch());let X;const _e=I.input.substring(ee);if(X=_e.match(/^\s*=/)){Y.ignoreMatch();return}if((X=_e.match(/^\s+extends\s+/))&&X.index===0){Y.ignoreMatch();return}}},_={$pattern:je,keyword:Zn,literal:Yn,built_in:Jn,"variable.language":qn},h="[0-9](_?[0-9])*",b=`\\.(${h})`,S="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",R={className:"number",variants:[{begin:`(\\b(${S})((${b})|\\.)?|(${b}))[eE][+-]?(${h})\\b`},{begin:`\\b(${S})\\b((${b})\\b|\\.)?|(${b})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},N={className:"subst",begin:"\\$\\{",end:"\\}",keywords:_,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,N],subLanguage:"xml"}},U={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,N],subLanguage:"css"}},O={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,N],subLanguage:"graphql"}},F={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,N]},H={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:c+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},Z=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,y,U,O,F,{match:/\$\d+/},R];N.contains=Z.concat({begin:/\{/,end:/\}/,keywords:_,contains:["self"].concat(Z)});const se=[].concat(H,N.contains),M=se.concat([{begin:/(\s*)\(/,end:/\)/,keywords:_,contains:["self"].concat(se)}]),V={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:M},ce={variants:[{match:[/class/,/\s+/,c,/\s+/,/extends/,/\s+/,r.concat(c,"(",r.concat(/\./,c),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,c],scope:{1:"keyword",3:"title.class"}}]},te={relevance:0,match:r.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Xn,...jn]}},ae={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},de={variants:[{match:[/function/,/\s+/,c,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[V],illegal:/%/},Ne={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Ee(I){return r.concat("(?!",I.join("|"),")")}const he={match:r.concat(/\b/,Ee([...Vn,"super","import"].map(I=>`${I}\\s*\\(`)),c,r.lookahead(/\s*\(/)),className:"title.function",relevance:0},re={begin:r.concat(/\./,r.lookahead(r.concat(c,/(?![0-9A-Za-z$_(])/))),end:c,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Ae={match:[/get|set/,/\s+/,c,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},V]},be="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",fe={match:[/const|var|let/,/\s+/,c,/\s*/,/=\s*/,/(async\s*)?/,r.lookahead(be)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[V]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:_,exports:{PARAMS_CONTAINS:M,CLASS_REFERENCE:te},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),ae,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,y,U,O,F,H,{match:/\$\d+/},R,te,{scope:"attr",match:c+r.lookahead(":"),relevance:0},fe,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[H,n.REGEXP_MODE,{className:"function",begin:be,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:M}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:w.begin,end:w.end},{match:$},{begin:A.begin,"on:begin":A.isTrulyOpeningTag,end:A.end}],subLanguage:"xml",contains:[{begin:A.begin,end:A.end,skip:!0,contains:["self"]}]}]},de,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[V,n.inherit(n.TITLE_MODE,{begin:c,className:"title.function"})]},{match:/\.\.\./,relevance:0},re,{match:"\\$"+c,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[V]},he,Ne,ce,Ae,{match:/\$[(.]/}]}}function Nn(n){const r=n.regex,o=ns(n),c=je,w=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],$={begin:[/namespace/,/\s+/,n.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},A={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:w},contains:[o.exports.CLASS_REFERENCE]},_={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],b={$pattern:je,keyword:Zn.concat(h),literal:Yn,built_in:Jn.concat(w),"variable.language":qn},S={className:"meta",begin:"@"+c},R=(O,F,B)=>{const H=O.contains.findIndex(Z=>Z.label===F);if(H===-1)throw new Error("can not find mode to replace");O.contains.splice(H,1,B)};Object.assign(o.keywords,b),o.exports.PARAMS_CONTAINS.push(S);const N=o.contains.find(O=>O.scope==="attr"),y=Object.assign({},N,{match:r.concat(c,r.lookahead(/\s*\?:/))});o.exports.PARAMS_CONTAINS.push([o.exports.CLASS_REFERENCE,N,y]),o.contains=o.contains.concat([S,$,A,y]),R(o,"shebang",n.SHEBANG()),R(o,"use_strict",_);const U=o.contains.find(O=>O.label==="func.def");return U.relevance=0,Object.assign(o,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),o}function ts(n){const r={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},o={match:/[{}[\],:]/,className:"punctuation",relevance:0},c=["true","false","null"],w={scope:"literal",beginKeywords:c.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:c},contains:[r,o,n.QUOTE_STRING_MODE,w,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function ss(n){const r=n.regex,o="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",c="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",A={$pattern:o,keyword:["after","alias","and","case","catch","cond","defstruct","defguard","do","else","end","fn","for","if","import","in","not","or","quote","raise","receive","require","reraise","rescue","try","unless","unquote","unquote_splicing","use","when","with|0"],literal:["false","nil","true"]},_={className:"subst",begin:/#\{/,end:/\}/,keywords:A},h={className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},S={match:/\\[\s\S]/,scope:"char.escape",relevance:0},R=`[/|([{<"']`,N=[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin:/</,end:/>/}],y=M=>({scope:"char.escape",begin:r.concat(/\\/,M),relevance:0}),U={className:"string",begin:"~[a-z](?="+R+")",contains:N.map(M=>n.inherit(M,{contains:[y(M.end),S,_]}))},O={className:"string",begin:"~[A-Z](?="+R+")",contains:N.map(M=>n.inherit(M,{contains:[y(M.end)]}))},F={className:"regex",variants:[{begin:"~r(?="+R+")",contains:N.map(M=>n.inherit(M,{end:r.concat(M.end,/[uismxfU]{0,7}/),contains:[y(M.end),S,_]}))},{begin:"~R(?="+R+")",contains:N.map(M=>n.inherit(M,{end:r.concat(M.end,/[uismxfU]{0,7}/),contains:[y(M.end)]}))}]},B={className:"string",contains:[n.BACKSLASH_ESCAPE,_],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},H={className:"function",beginKeywords:"def defp defmacro defmacrop",end:/\B\b/,contains:[n.inherit(n.TITLE_MODE,{begin:o,endsParent:!0})]},Z=n.inherit(H,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),se=[B,F,O,U,n.HASH_COMMENT_MODE,Z,H,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[B,{begin:c}],relevance:0},{className:"symbol",begin:o+":(?!:)",relevance:0},{className:"title.class",begin:/(\b[A-Z][a-zA-Z0-9_]+)/,relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"}];return _.contains=se,{name:"Elixir",aliases:["ex","exs"],keywords:A,contains:se}}var Le="[0-9](_*[0-9])*",ze=`\\.(${Le})`,We="[0-9a-fA-F](_*[0-9a-fA-F])*",Fn={className:"number",variants:[{begin:`(\\b(${Le})((${ze})|\\.)?|(${ze}))[eE][+-]?(${Le})[fFdD]?\\b`},{begin:`\\b(${Le})((${ze})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ze})[fFdD]?\\b`},{begin:`\\b(${Le})[fFdD]\\b`},{begin:`\\b0[xX]((${We})\\.?|(${We})?\\.(${We}))[pP][+-]?(${Le})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${We})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Qn(n,r,o){return o===-1?"":n.replace(r,c=>Qn(n,r,o-1))}function as(n){const r=n.regex,o="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",c=o+Qn("(?:<"+o+"~~~(?:\\s*,\\s*"+o+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},b={className:"meta",begin:"@"+o,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},S={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[n.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[n.BACKSLASH_ESCAPE]},n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[r.concat(/(?!else)/,o),/\s+/,o,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,o],className:{1:"keyword",3:"title.class"},contains:[S,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+c+"\\s+)",n.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[b,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,Fn,n.C_BLOCK_COMMENT_MODE]},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},Fn,b]}}function et(n){return n?typeof n=="string"?n:n.source:null}function ke(n){return x("(?=",n,")")}function x(...n){return n.map(o=>et(o)).join("")}function is(n){const r=n[n.length-1];return typeof r=="object"&&r.constructor===Object?(n.splice(n.length-1,1),r):{}}function ne(...n){return"("+(is(n).capture?"":"?:")+n.map(c=>et(c)).join("|")+")"}const hn=n=>x(/\b/,n,/\w$/.test(n)?/\b/:/\B/),rs=["Protocol","Type"].map(hn),Pn=["init","self"].map(hn),cs=["Any","Self"],bn=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Kn=["false","nil","true"],os=["assignment","associativity","higherThan","left","lowerThan","none","right"],ls=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Gn=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],nt=ne(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),tt=ne(nt,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),fn=x(nt,tt,"*"),st=ne(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ve=ne(st,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ge=x(st,Ve,"*"),Ze=x(/[A-Z]/,Ve,"*"),us=["attached","autoclosure",x(/convention\(/,ne("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",x(/objc\(/,ge,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],gs=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function ds(n){const r={match:/\s+/,relevance:0},o=n.COMMENT("/\\*","\\*/",{contains:["self"]}),c=[n.C_LINE_COMMENT_MODE,o],w={match:[/\./,ne(...rs,...Pn)],className:{2:"keyword"}},$={match:x(/\./,ne(...bn)),relevance:0},A=bn.filter(L=>typeof L=="string").concat(["_|0"]),_=bn.filter(L=>typeof L!="string").concat(cs).map(hn),h={variants:[{className:"keyword",match:ne(..._,...Pn)}]},b={$pattern:ne(/\b\w+/,/#\w+/),keyword:A.concat(ls),literal:Kn},S=[w,$,h],R={match:x(/\./,ne(...Gn)),relevance:0},N={className:"built_in",match:x(/\b/,ne(...Gn),/(?=\()/)},y=[R,N],U={match:/->/,relevance:0},O={className:"operator",relevance:0,variants:[{match:fn},{match:`\\.(\\.|${tt})+`}]},F=[U,O],B="([0-9]_*)+",H="([0-9a-fA-F]_*)+",Z={className:"number",relevance:0,variants:[{match:`\\b(${B})(\\.(${B}))?([eE][+-]?(${B}))?\\b`},{match:`\\b0x(${H})(\\.(${H}))?([pP][+-]?(${B}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},se=(L="")=>({className:"subst",variants:[{match:x(/\\/,L,/[0\\tnr"']/)},{match:x(/\\/,L,/u\{[0-9a-fA-F]{1,8}\}/)}]}),M=(L="")=>({className:"subst",match:x(/\\/,L,/[\t ]*(?:[\r\n]|\r\n)/)}),V=(L="")=>({className:"subst",label:"interpol",begin:x(/\\/,L,/\(/),end:/\)/}),ce=(L="")=>({begin:x(L,/"""/),end:x(/"""/,L),contains:[se(L),M(L),V(L)]}),te=(L="")=>({begin:x(L,/"/),end:x(/"/,L),contains:[se(L),V(L)]}),ae={className:"string",variants:[ce(),ce("#"),ce("##"),ce("###"),te(),te("#"),te("##"),te("###")]},de=[n.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[n.BACKSLASH_ESCAPE]}],Ne={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:de},Ee=L=>{const Ie=x(L,/\//),Re=x(/\//,L);return{begin:Ie,end:Re,contains:[...de,{scope:"comment",begin:`#(?!.*${Re})`,end:/$/}]}},he={scope:"regexp",variants:[Ee("###"),Ee("##"),Ee("#"),Ne]},re={match:x(/`/,ge,/`/)},Ae={className:"variable",match:/\$\d+/},be={className:"variable",match:`\\$${Ve}+`},fe=[re,Ae,be],I={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:gs,contains:[...F,Z,ae]}]}},Y={scope:"keyword",match:x(/@/,ne(...us),ke(ne(/\(/,/\s+/)))},ee={scope:"meta",match:x(/@/,ge)},q=[I,Y,ee],X={match:ke(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:x(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ve,"+")},{className:"type",match:Ze,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:x(/\s+&\s+/,ke(Ze)),relevance:0}]},_e={begin:/</,end:/>/,keywords:b,contains:[...c,...S,...q,U,X]};X.contains.push(_e);const qe={match:x(ge,/\s*:/),keywords:"_|0",relevance:0},Be={begin:/\(/,end:/\)/,relevance:0,keywords:b,contains:["self",qe,...c,he,...S,...y,...F,Z,ae,...fe,...q,X]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...c,X]},Je={begin:ne(ke(x(ge,/\s*:/)),ke(x(ge,/\s+/,ge,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ge}]},$e={begin:/\(/,end:/\)/,keywords:b,contains:[Je,...c,...S,...F,Z,ae,...q,X,Be],endsParent:!0,illegal:/["']/},Sn={match:[/(func|macro)/,/\s+/,ne(re.match,ge,fn)],className:{1:"keyword",3:"title.function"},contains:[ve,$e,r],illegal:[/\[/,/%/]},Oe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ve,$e,r],illegal:/\[|%/},Qe={match:[/operator/,/\s+/,fn],className:{1:"keyword",3:"title"}},en={begin:[/precedencegroup/,/\s+/,Ze],className:{1:"keyword",3:"title"},contains:[X],keywords:[...os,...Kn],end:/}/},nn={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},tn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},sn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,ge,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:b,contains:[ve,...S,{begin:/:/,end:/\{/,keywords:b,contains:[{scope:"title.class.inherited",match:Ze},...S],relevance:0}]};for(const L of ae.variants){const Ie=L.contains.find(an=>an.label==="interpol");Ie.keywords=b;const Re=[...S,...y,...F,Z,ae,...fe];Ie.contains=[...Re,{begin:/\(/,end:/\)/,contains:["self",...Re]}]}return{name:"Swift",keywords:b,contains:[...c,Sn,Oe,nn,tn,sn,Qe,en,{beginKeywords:"import",end:/$/,contains:[...c],relevance:0},he,...S,...y,...F,Z,ae,...fe,...q,X,Be]}}function at(n){const r={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},o=/[a-zA-Z@][a-zA-Z0-9_]*/,_={"variable.language":["this","super"],$pattern:o,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:o,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:_,illegal:"</",contains:[r,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,n.C_NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[n.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[n.UNDERSCORE_TITLE_MODE]},{begin:"\\."+n.UNDERSCORE_IDENT_RE,relevance:0}]}}var xe="[0-9](_*[0-9])*",Ye=`\\.(${xe})`,Xe="[0-9a-fA-F](_*[0-9a-fA-F])*",Es={className:"number",variants:[{begin:`(\\b(${xe})((${Ye})|\\.)?|(${Ye}))[eE][+-]?(${xe})[fFdD]?\\b`},{begin:`\\b(${xe})((${Ye})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Ye})[fFdD]?\\b`},{begin:`\\b(${xe})[fFdD]\\b`},{begin:`\\b0[xX]((${Xe})\\.?|(${Xe})?\\.(${Xe}))[pP][+-]?(${xe})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Xe})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function it(n){const r={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},o={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},c={className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"@"},w={className:"subst",begin:/\$\{/,end:/\}/,contains:[n.C_NUMBER_MODE]},$={className:"variable",begin:"\\$"+n.UNDERSCORE_IDENT_RE},A={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[$,w]},{begin:"'",end:"'",illegal:/\n/,contains:[n.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[n.BACKSLASH_ESCAPE,$,w]}]};w.contains.push(A);const _={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+n.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+n.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[n.inherit(A,{className:"string"}),"self"]}]},b=Es,S=n.COMMENT("/\\*","\\*/",{contains:[n.C_BLOCK_COMMENT_MODE]}),R={variants:[{className:"type",begin:n.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},N=R;return N.variants[1].contains=[R],R.variants[1].contains=[N],{name:"Kotlin",aliases:["kt","kts"],keywords:r,contains:[n.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),n.C_LINE_COMMENT_MODE,S,o,c,_,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:r,relevance:5,contains:[{begin:n.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[n.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:r,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[R,n.C_LINE_COMMENT_MODE,S],relevance:0},n.C_LINE_COMMENT_MODE,S,_,h,A,n.C_NUMBER_MODE]},S]},{begin:[/class|interface|trait/,/\s+/,n.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},n.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},_,h]},A,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
4
4
|
`},b]}}function rt(n){const r=["package","import","option","optional","required","repeated","group","oneof"],o=["double","float","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","bool","string","bytes"],c={match:[/(message|enum|service)\s+/,n.IDENT_RE],scope:{1:"keyword",2:"title.class"}};return{name:"Protocol Buffers",aliases:["proto"],keywords:{keyword:r,type:o,literal:["true","false"]},contains:[n.QUOTE_STRING_MODE,n.NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,c,{className:"function",beginKeywords:"rpc",end:/[{;]/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}}function ct(n){const r=n.regex,o=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),c=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],_={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:c,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},b={className:"subst",begin:/\{/,end:/\}/,keywords:_,illegal:/#/},S={begin:/\{\{/,relevance:0},R={className:"string",contains:[n.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,h,S,b]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,h,S,b]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[n.BACKSLASH_ESCAPE,S,b]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,S,b]},n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},N="[0-9](_?[0-9])*",y=`(\\b(${N}))?\\.(${N})|\\b(${N})\\.`,U=`\\b|${c.join("|")}`,O={className:"number",relevance:0,variants:[{begin:`(\\b(${N})|(${y}))[eE][+-]?(${N})[jJ]?(?=${U})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${U})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${U})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${U})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${U})`},{begin:`\\b(${N})[jJ](?=${U})`}]},F={className:"comment",begin:r.lookahead(/# type:/),end:/$/,keywords:_,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},B={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:_,contains:["self",h,O,R,n.HASH_COMMENT_MODE]}]};return b.contains=[R,O,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:_,illegal:/(<\/|\?)|=>/,contains:[h,O,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},R,F,n.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,o],scope:{1:"keyword",3:"title.function"},contains:[B]},{variants:[{match:[/\bclass/,/\s+/,o,/\s*/,/\(\s*/,o,/\s*\)/]},{match:[/\bclass/,/\s+/,o]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[O,B,R]}]}}function ot(n){const r="true false yes no null",o="[\\w#;/?:@&=+$,.~*'()[\\]]+",c={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},w={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},$={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},A={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[n.BACKSLASH_ESCAPE,w]},_=n.inherit(A,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),N={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},y={end:",",endsWithParent:!0,excludeEnd:!0,keywords:r,relevance:0},U={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},O={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},F=[c,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+o},{className:"type",begin:"!<"+o+">"},{className:"type",begin:"!"+o},{className:"type",begin:"!!"+o},{className:"meta",begin:"&"+n.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+n.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},n.HASH_COMMENT_MODE,{beginKeywords:r,keywords:{literal:r}},N,{className:"number",begin:n.C_NUMBER_RE+"\\b",relevance:0},U,O,$,A],B=[...F];return B.pop(),B.push(_),y.contains=B,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:F}}function lt(n){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function ut(n){const r=n.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:r.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:r.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function gt(n){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function bs(n){const r=n.regex,o={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},c={begin:"^[-\\*]{3,}",end:"$"},w={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},$={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},A={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},_=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:r.concat(/\[.+?\]\(/,_,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},b={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},S={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},R=n.inherit(b,{contains:[]}),N=n.inherit(S,{contains:[]});b.contains.push(N),S.contains.push(R);let y=[o,h];return[b,S,R,N].forEach(B=>{B.contains=B.contains.concat(y)}),y=y.concat(b,S),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},o,$,b,S,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},w,c,h,A,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}const fs=Ht("div")`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dF as C,r as o,Q as d,j as e,dG as c,b5 as b,dH as I,bv as E,dI as v,dc as u,dJ as z}from"./index-
|
|
1
|
+
import{dF as C,r as o,Q as d,j as e,dG as c,b5 as b,dH as I,bv as E,dI as v,dc as u,dJ as z}from"./index-oppNoNvH.js";import{B as A}from"./ButtonGroup-zxfGLX1y.js";function L({...r}){const{size:p="medium",color:i="primary",menu:a=[],children:s=null,variant:m="contained",onClick:x=C,menuButtonProps:f={},...h}=r,[j,l]=o.useState(!1),n=o.useRef(null),g=Array.isArray(a)?a.map((t,B)=>o.isValidElement(t)?t:o.createElement(d,{...t,key:B})):a,y=()=>{l(t=>!t)},k=t=>{n.current&&n.current.contains(t.target)||l(!1)},M=t=>{t.target.closest(".MuiMenuItem-root")&&l(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(P,{variant:m,size:p,color:i,ref:n,...h,children:[typeof s=="function"?s():e.jsx(c,{onClick:x,color:i,children:s}),e.jsx(c,{onClick:y,color:i,...f,"aria-label":"more functions",children:e.jsx(b,{})})]}),e.jsx(w,{open:j,anchorEl:n.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(I,{children:e.jsx(E,{onClickAway:k,children:e.jsx(v,{onClick:M,children:g})})})})]})}L.Item=d;const P=u(A)`
|
|
2
2
|
> .MuiButtonBase-root:last-of-type {
|
|
3
3
|
min-width: 2em;
|
|
4
4
|
padding-left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,cC as j,K as v,A as P,r as a,p as S,ax as w,u as k,x as K,f as b,aP as E,dg as W,cs as i,b7 as _,w as U,Y as N,C as R,dh as z,di as A}from"./index-
|
|
1
|
+
import{j as e,cC as j,K as v,A as P,r as a,p as S,ax as w,u as k,x as K,f as b,aP as E,dg as W,cs as i,b7 as _,w as U,Y as N,C as R,dh as z,di as A}from"./index-oppNoNvH.js";import{p as c}from"./index-Ctq71AUP.js";function o({children:r,...s}){return e.jsx(j,{...s,did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:r})})}function L(){const r=P(),{t:s,locale:d}=a.useContext(S),{api:l}=w(),{info:u}=k(),p=K(u),f=b(),n=E({ready:!1,success:!1,error:null,invalidSession:!1}),h=W(),x=()=>{try{const t=new URL(window.location.href);if(t.hash.includes("invalid")){n.invalidSession=!0;return}const g=t.searchParams.get("__connect_url__"),y=z(g);if(!A(y))throw new Error;n.ready=!0}catch{n.invalidSession=!0,r("#invalid",{replace:!0})}};a.useLayoutEffect(()=>x(),[]);const m=i(t=>{n.error=t.message,r("#invalid",{replace:!0})}),C=i(()=>{n.success=!0});if(n.invalidSession)return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.invalidSession"),description:s("didConnect.common.invalidSessionDesc")})});if(n.error){const t=n.error;return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.connectionError"),description:t})})}return n.success?e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(_,{style:{color:f.palette.success.main,fontSize:72}}),title:s("didConnect.genKeyPair.success"),description:s("didConnect.genKeyPair.successDesc")})}):n.ready?e.jsx(o,{children:e.jsx(U,{className:"connect",action:"gen-key-pair",checkFn:l.get,checkTimeout:10*60*1e3,extraParams:{sourceAppPid:h?.appPid,forceSwitch:!0},saveConnect:!1,forceConnected:!1,webWalletUrl:p,onSuccess:C,onError:m,locale:d,messages:{title:s("didConnect.genKeyPair.title"),scan:s("didConnect.genKeyPair.scan"),confirm:s("auth.confirm"),success:s("didConnect.genKeyPair.success")},popup:!0,open:!0,hideCloseButton:!0})},"ready"):e.jsx(N,{children:e.jsx(R,{})})}export{L as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{aF as qe,j as t,dq as ws,gB as _s,ix as Ss,V as ce,bn as xe,K as U,ay as be,H as G,o as x,f as gt,r as R,p as je,bB as st,b as ve,i as Q,U as On,bA as ft,X as ge,iy as Es,t as ye,s as oe,a3 as me,aV as ao,T as le,$ as Yt,dF as mt,y as Ee,b8 as ks,bF as Rs,aH as W,b1 as Ts,go as Ps,gp as Is,C as Ce,f3 as lo,hz as $n,x as Ds,aw as Gt,w as Bs,iz as Os,iA as Us,v as Be,iB as Ns,Y as Ls,_ as As,iC as co,bo as uo,Q as Ne,f5 as Ms,f0 as zs,aA as qs,aB as Fs,bk as $s,aC as Ws,aD as fe,aO as Hs,cO as Gs,S as Ks,eM as ir,bi as Vs,h as Ys,du as It,iD as Zs,g1 as po,iE as Qs,iF as Xs,ex as pe,iG as fo,dD as Js,gQ as ei,he as ti,fR as ni,iH as ri,cF as ar,hu as Wn,au as oi,dG as Zt,dm as Me,br as si,bs as lr,z as mo,cr as ii,G as ze,aP as cr,fO as ho,cs as Ke,ha as ai,bz as kt,ck as dr,hC as li,fl as ur,bg as ci,L as xt,E as go,bm as di,Z as ui,M as Rt,aZ as Hn,iI as pi,a_ as Le,az as pr,cM as fi,ac as it,aM as xo,bT as Gn,cx as mi,iJ as hi,b9 as gi,A as yo,aU as Un,g as xi,aS as ut,N as pn,W as yi,bC as vo,aJ as vi,bu as Ci,aR as bi,fc as fr,g9 as mr,ga as hr,R as gr,cL as ji,gb as wi,bS as _i,iK as Si}from"./index-F3HbHSYi.js";import{y as Ei}from"./index-jC9YQw2A.js";import{a as ki,c as Ri,d as Ti,u as Kn,R as Pi}from"./actions-Cpb8n0Yw.js";import{S as Ii}from"./switch-control-B_J8lGBy.js";import{u as De}from"./blocklet-BSWtuwnH.js";import{P as Nn,w as Qt}from"./permission-caYaN7o4.js";import{E as Co}from"./Edit-DCJEwDTg.js";import{T as Di,M as Bi,t as Oi}from"./table-icons-CoOahY2H.js";import{s as Ui,F as bo,L as Ni,I as Li,a as Tt,S as Ai,B as Mi}from"./preference-D-1nO1Na.js";import{C as xr}from"./click-to-copy-C5l1aVBQ.js";import{v as fn}from"./index-D4PsRecd.js";import{A as zi}from"./Add-D4EYSG3K.js";import{A as Xt}from"./Link-CgW5geY5.js";import{C as qi,c as Fi,b as $i,f as jo,A as Wi,_ as Hi,a as Gi,e as Ki,d as wo,s as Vi,L as Yi,u as Zi,g as Qi,S as Xi}from"./item-DkbrJM2U.js";import{T as Ji,L as ea,a as Ln,u as yr,W as ta,P as na}from"./index-D_ED6Nk7.js";import{e as _o}from"./engine-wH21TR28.js";import{u as ra,C as oa,D as sa,a as ia,b as aa}from"./connect-to-sME9XFIO.js";import{C as la,u as ca,A as da}from"./agreement-D_SlINnK.js";import{A as ua,a as pa,b as fa,c as ma,R as ot,S as dt}from"./collapse-D-q9UEjV.js";import{D as So}from"./Done-DzMcAgjX.js";import{C as ha}from"./Google-DR320mb8.js";import{I as Eo,f as ga,a as xa,B as ya}from"./install-from-url-DL-3oQMI.js";import{a as vr}from"./api-OdGoHXe4.js";import{v as ko,e as va,a as Kt}from"./util-DhYg_WLh.js";import{u as Ro}from"./use-mobile-D5fNICVu.js";import{A as Ca}from"./ArrowDropDown-DonW35Zx.js";import{u as ba}from"./useLocalStorage-xEKVgwM3.js";import{r as Jt}from"./index-haFP5Loj.js";import{b as en}from"./without-wallet-Dbr3bl6I.js";import{E as To}from"./ErrorOutline-B9LgxSpq.js";import{H as ja}from"./HelpOutline-USuznZgn.js";import{C as wa}from"./lock.svg-DWUrJ_5S.js";import{D as tn,R as _a,a as Cr}from"./url-evaluation-Bm9OWnaf.js";import{L as Po}from"./Launch-DkmyUeYd.js";import{D as Sa}from"./delete-confirm-CiFwBlNG.js";import{W as ht,B as An}from"./status-BGeIvK1l.js";import{A as Io}from"./actions-DtMFbSMo.js";import{v as mn}from"./index-M4yiF52E.js";import{t as Ea}from"./toUpper-28qo31SR.js";import{S as ka}from"./Switch-czLKbhPZ.js";import{a as Ra}from"./team-NpjMEHti.js";import"./MoreVert-wWXtgLji.js";import"./get-safe-url-DfDeYxPo.js";import"./ButtonGroup-DcZ0ug1l.js";import"./getValidReactChildren-DECNQV_G.js";import"./FilterList-CNYUVm5S.js";import"./CSSTransition-V4R7ZcvS.js";import"./emotion-cache.browser.esm-CQ2-5c4_.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./raf-schd.esm-BdLRNFZe.js";import"./redux-DfszZyTl.js";import"./useThemeProps-BhYWaPDm.js";import"./html-title-B42L4vHs.js";import"./Clear---RPVeR7.js";import"./ChevronRight-DZiek3NZ.js";import"./ChevronLeft-CKiAYw9j.js";import"./Search-DV5vJN1H.js";import"./omit-B8xv_k3Z.js";import"./edit.svg-BT2rpJxW.js";import"./index-CHZXKvDD.js";import"./iframe-B-84ZVfc.js";import"./index-DaNXTl0n.js";import"./KeyboardArrowDown-rbx_AuZr.js";import"./Autocomplete-Dy_zZ4Oc.js";import"./ListSubheader-BlgmemtO.js";import"./Verified-CF2yeqGT.js";import"./VerifiedUser-C1tgCpCB.js";import"./DeleteOutline-GpuLmtYQ.js";import"./url-join-B07GNSp-.js";import"./index-BojVbZw0.js";import"./spaces-DnqeOj51.js";import"./OpenInNew-B8ApQgxt.js";import"./index-DRYJ0xIl.js";import"./index-CbD2HRHU.js";import"./decode-DPztD6kB.js";import"./cloneDeep-CPQcx7Qa.js";import"./ListItemButton-BhvWhm3n.js";import"./Stepper-Dm3PYaFi.js";import"./is-path-prefix-equal-DCicTZ8d.js";const Ta=qe(t.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"})),Pa=qe(t.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"})),Do=qe(t.jsx("path",{d:"M22 5.18 10.59 16.6l-4.24-4.24 1.41-1.41 2.83 2.83 10-10zm-2.21 5.04c.13.57.21 1.17.21 1.78 0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8c1.58 0 3.04.46 4.28 1.25l1.44-1.44C16.1 2.67 14.13 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-1.19-.22-2.33-.6-3.39z"})),Ia=qe(t.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"})),Bo=qe(t.jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"})),Da=qe(t.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"})),Ba=qe(t.jsx("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"})),Oa=qe(t.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"})),Ua=qe(t.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}));function br(e,n){var r={};return n=ws(n),_s(e,function(i,a,o){Ss(r,a,n(i,a,o))}),r}function Oo({children:e=null,...n}){const{t:r}=ce(),{api:i}=xe(),{blocklet:a}=De(),o=a?.settings?.autoCheckUpdate,m=async l=>{await i.updateAutoCheckUpdate({input:{did:a.meta.did,autoCheckUpdate:l}})},c=async()=>{try{const l=!o?.enabled;await m({enabled:l}),G.success(r(l?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(l){G.error(l.message)}},d=!!o?.enabled;return t.jsxs(U,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[e,t.jsx(be,{title:r("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:t.jsx("div",{children:t.jsx(Ii,{checked:d,onChange:c,name:"enableWelcomePage",style:{...n.style,zoom:.8}})})})]})}Oo.propTypes={children:x.any};function jr(e){function n({sx:r,...i}){return t.jsx(e,{...i,sx:{color:"text.primary",...r}})}return n}const Na={...br(Oi,jr),...br(ki,jr)},La=(e,n)=>{let{description:r}=e;return(Object.values(ve.CHAIN_PROP_MAP).includes(e.key)||Q.isEnvShareable(e))&&(r?r=`${r} (${n("blocklet.config.sharedToAllComponents")})`:r=n("blocklet.config.sharedToAllComponents")),r&&t.jsx("div",{style:{marginLeft:12},children:r})},hn=(e,n,r=[])=>!r?.length&&!e.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(e.key)&&!n.meta.environments.find(i=>i.name===e.key)&&n.children.every(i=>!i.meta.environments.find(a=>a.name===e.key))?!0:e.custom,wr=e=>[ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(e)?!0:!(e.startsWith("BLOCKLET_")||e.startsWith("COMPONENT_")),gn=e=>[ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(e)===!1;function Uo({blocklet:e,ancestors:n=[]}){const r=xe(),{palette:i}=gt(),{inService:a}=r,{t:o}=R.useContext(je),m=[...n.map(s=>s.meta.did),e.meta.did],c=()=>G.success(o("blocklet.config.changedTip")),d=s=>hn(s,e,n);if(st(e.status)||e.status==="unknown"&&st(e.status))return null;const l=s=>new Promise(async(h,b)=>{if(!s.key.trim()||!s.value.trim()){G.error(o("blocklet.config.environment.keyValueRequired")),b();return}if(wr(s.key)===!1){G.error(o("blocklet.config.environment.invalidKey")),b();return}s.custom=gn(s.key);try{const T=await r.api.configBlocklet({input:{did:m,configs:[s]}});c(T.blocklet),h()}catch(T){G.error(ge(T)),b()}}),v=(s,h)=>new Promise(async(b,T)=>{if(s.required&&(!s.key.trim()||!s.value.trim())){G.error(o("blocklet.config.environment.keyValueRequired")),T();return}if(wr(s.key)===!1){G.error(o("blocklet.config.environment.invalidKey")),T();return}if(s.key===ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const M=Es(s);if(M){G.error(M),T();return}}const k=[{...s,value:s.secure&&s.value==="__encrypted__"?"":s.value}];if(s.key!==h.key){if(!hn(s,e,n)){G.error("Only key of custom env can be changed"),T();return}k.push({key:h.key,custom:gn(s.key)})}try{const M=await r.api.configBlocklet({input:{did:m,configs:k}});c(M.blocklet),b()}catch(M){G.error(ge(M)),T()}}),p=s=>new Promise(async(h,b)=>{if(s.required){G.error(o("blocklet.config.environment.deleteForbidden")),b();return}if(!hn(s,e,n)){G.error(o("environmentTips.deleteForbidden")),b();return}try{const T=await r.api.configBlocklet({input:{did:m,configs:[{key:s.key,custom:gn(s.key)}]}});c(T.blocklet),h()}catch(T){G.error(ge(T)),b()}}),C=(e.configs||[]).filter(s=>!ve.BLOCKLET_CONFIGURABLE_KEY[s.key]||[ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(s.key)),f=Q.getSharedConfigObj(n[0],e),y=Q.getComponentMissingConfigs(e,n[0]),w=C.map(s=>({...s,value:Object.values(ve.CHAIN_PROP_MAP).includes(s.key)&&Object.keys(f).includes(s.key)?f[s.key]:f[s.key]||s.value})),j=w.some(s=>s.key&&s.key.startsWith("BWA_")),E={onRowAdd:l,onRowUpdate:v,onRowDelete:p,isDeletable:d},u=()=>[{title:o("common.key"),field:"key",initialEditValue:"",width:"30%",render:s=>t.jsx(xr,{value:s.value,style:{color:s.required&&!s.value?i.error.main:i.text.primary,fontWeight:s.required?"bold":"normal"},children:s.key}),editComponent:s=>{const{value:h,rowData:b,onChange:T}=s;return t.jsx(_r,{children:t.jsx(ye,{fullWidth:!0,size:"small",value:Ui.escapeTag(h),onChange:k=>T(k.target.value),variant:"outlined",label:"Key",placeholder:o("blocklet.config.environment.key"),margin:"dense",autoFocus:!0,slotProps:{input:{readOnly:d(b)===!1}}})})}},{title:o("common.value"),field:"value",initialEditValue:"",width:"calc((100% - (96px + 30%)) / 1)",render:s=>s.value?s.secure?"******":t.jsx(xr,{unstyled:!0,value:s.value,style:{wordBreak:"break-all"},children:s.value}):null,editComponent:s=>{const{value:h,rowData:b,onChange:T}=s;return t.jsxs(_r,{children:[t.jsx(ye,{fullWidth:!0,size:"small",value:h==="__encrypted__"?"":h,onChange:k=>T(k.target.value),variant:"outlined",label:o("common.value"),placeholder:o("blocklet.config.environment.value"),margin:"dense"}),La(b,o)]})}}];return t.jsxs(Aa,{children:[!!y.length&&t.jsx(On,{severity:"error",style:{marginTop:24},children:o("blocklet.config.missingRequired")}),j&&t.jsx(On,{severity:"info",children:o("blocklet.config.environment.tip")}),t.jsx(Nn,{permission:a?"":"mutate_blocklets",role:a?ft:[],children:s=>t.jsx(Di,{className:"config-table",children:t.jsx(Bi,{title:t.jsx(U,{sx:{fontWeight:"bold"},children:o("common.environments")}),columns:u(),icons:Na,options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1,actionsCellStyle:{padding:"0",textAlign:"right",width:"80px"}},localization:{header:{actions:o("common.actions")},body:{emptyDataSourceMessage:o("common.noData"),editRow:{deleteText:o("environmentTips.delete")}}},data:w,editable:s?E:{}})})})]})}Uo.propTypes={blocklet:x.object.isRequired,ancestors:x.array};const Aa=oe.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BTzUdfyO.js","./index-oppNoNvH.js","./index-DGkT7afN.css","./url-join-BL6fN34c.js","./index-C88zwj1F.js","./_createAggregator-DrGf--g5.js","./depsEqual-DM_xCHol.js","./index-BhRJ8iUw.js","./index-DRYJ0xIl.js","./toUpper-CjPgxX5u.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{aF as qe,j as t,dq as ws,gz as _s,ix as Ss,V as ce,bn as xe,K as U,ay as be,H as G,o as x,f as gt,r as R,p as je,bB as st,b as ve,i as Q,U as On,bA as ft,X as ge,iy as Es,t as ye,s as oe,a3 as me,aV as ao,T as le,$ as Yt,dF as mt,y as Ee,b8 as ks,bF as Rs,aH as W,b1 as Ts,gn as Ps,go as Is,C as Ce,f3 as lo,hx as $n,x as Ds,aw as Gt,w as Bs,iz as Os,iA as Us,v as Be,iB as Ns,Y as Ls,_ as As,iC as co,bo as uo,Q as Ne,f5 as Ms,f0 as zs,aA as qs,aB as Fs,bk as $s,aC as Ws,aD as fe,aO as Hs,cO as Gs,S as Ks,eM as ir,bi as Vs,h as Ys,du as It,iD as Zs,fZ as po,iE as Qs,iF as Xs,ex as pe,iG as fo,dD as Js,gO as ei,hc as ti,fN as ni,iH as ri,cF as ar,hs as Wn,au as oi,dG as Zt,dm as Me,br as si,bs as lr,z as mo,cr as ii,G as ze,aP as cr,gj as ho,cs as Ke,h8 as ai,bz as kt,ck as dr,hA as li,fl as ur,bg as ci,L as xt,E as go,bm as di,Z as ui,M as Rt,aZ as Hn,iI as pi,a_ as Le,az as pr,cM as fi,ac as it,aM as xo,bT as Gn,cx as mi,iJ as hi,b9 as gi,A as yo,aU as Un,g as xi,aS as ut,N as pn,W as yi,bC as vo,aJ as vi,bu as Ci,aR as bi,fc as fr,g5 as mr,g6 as hr,R as gr,cL as ji,g7 as wi,bS as _i,iK as Si}from"./index-oppNoNvH.js";import{y as Ei}from"./index-1qcmbchL.js";import{a as ki,c as Ri,d as Ti,u as Kn,R as Pi}from"./actions-BU7VBlNr.js";import{S as Ii}from"./switch-control-C9oMQ7W-.js";import{u as De}from"./blocklet--AI07_i0.js";import{P as Nn,w as Qt}from"./permission-DZytcuWC.js";import{E as Co}from"./Edit-BLOnay32.js";import{T as Di,M as Bi,t as Oi}from"./table-icons-EhFLZCZI.js";import{s as Ui,F as bo,L as Ni,I as Li,a as Tt,S as Ai,B as Mi}from"./preference-CrZ37X3N.js";import{C as xr}from"./click-to-copy-BCe_knva.js";import{v as fn}from"./index-DnGfacYV.js";import{A as zi}from"./Add-BtxJ9S0c.js";import{A as Xt}from"./Link-BD8pu5K0.js";import{C as qi,c as Fi,b as $i,f as jo,A as Wi,_ as Hi,a as Gi,e as Ki,d as wo,s as Vi,L as Yi,u as Zi,g as Qi,S as Xi}from"./item-Dad5StUY.js";import{T as Ji,L as ea,a as Ln,u as yr,W as ta,P as na}from"./index-Bsb50zao.js";import{e as _o}from"./engine-DjXhikKJ.js";import{u as ra,C as oa,D as sa,a as ia,b as aa}from"./connect-to-DP2mM_22.js";import{C as la,u as ca,A as da}from"./agreement-BbZCQgd_.js";import{A as ua,a as pa,b as fa,c as ma,R as ot,S as dt}from"./collapse-zs9NkhVG.js";import{D as So}from"./Done-otpI656Q.js";import{C as ha}from"./Google-B6ijzIon.js";import{I as Eo,f as ga,a as xa,B as ya}from"./install-from-url-Byfhqhtx.js";import{a as vr}from"./api-DAWWUzPu.js";import{v as ko,e as va,a as Kt}from"./util-DBPmcEMD.js";import{u as Ro}from"./use-mobile-B3ZO2ENR.js";import{A as Ca}from"./ArrowDropDown-CXhfj4YR.js";import{u as ba}from"./useLocalStorage-CZNQlTk5.js";import{r as Jt}from"./index-C88zwj1F.js";import{b as en}from"./without-wallet-BEHqWwMH.js";import{E as To}from"./ErrorOutline-C62Ptpls.js";import{H as ja}from"./HelpOutline-OM9v4KDS.js";import{C as wa}from"./lock.svg-CkFKYDxX.js";import{D as tn,R as _a,a as Cr}from"./url-evaluation-QeH6FlO4.js";import{L as Po}from"./Launch-BfuKeW3b.js";import{D as Sa}from"./delete-confirm-Bow13LE9.js";import{W as ht,B as An}from"./status-DIBvqycZ.js";import{A as Io}from"./actions-Dq4cTCeJ.js";import{v as mn}from"./index-CQwHcXdR.js";import{t as Ea}from"./toUpper-CjPgxX5u.js";import{S as ka}from"./Switch-D12CiGzx.js";import{a as Ra}from"./team-fAqBHfRA.js";import"./MoreVert-CdXWMKz-.js";import"./get-safe-url-CWx4sAFH.js";import"./ButtonGroup-zxfGLX1y.js";import"./getValidReactChildren-Cg2u2AWU.js";import"./FilterList-5aPzs6zd.js";import"./CSSTransition-BHFpNneQ.js";import"./emotion-cache.browser.esm-89zxT23k.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./raf-schd.esm-PMp87DFK.js";import"./redux-DfszZyTl.js";import"./useThemeProps-BleY03wL.js";import"./html-title-DV29cJ5k.js";import"./Clear-CmclKblN.js";import"./ChevronRight-Cq74y-86.js";import"./ChevronLeft-CjfV9O7Y.js";import"./Search-CbRhrT-l.js";import"./omit-D0KFhbLk.js";import"./edit.svg-MBsEEqxw.js";import"./index-BhRJ8iUw.js";import"./iframe-CJvRag0f.js";import"./index-BS8Zd79a.js";import"./KeyboardArrowDown-CKtrlyfg.js";import"./Autocomplete-BSxdbGZ9.js";import"./ListSubheader-Ch1RovVQ.js";import"./Verified-CHH9KCap.js";import"./VerifiedUser-Brzhri9f.js";import"./DeleteOutline-DeY1XytP.js";import"./url-join-BL6fN34c.js";import"./index-BojVbZw0.js";import"./spaces-B91L1fYZ.js";import"./OpenInNew-BZCBTL61.js";import"./index-DRYJ0xIl.js";import"./index-BAu_h5OW.js";import"./decode-DPztD6kB.js";import"./cloneDeep-CAK0LBhz.js";import"./ListItemButton-cn3fH9TW.js";import"./Stepper-JXr6cJC3.js";import"./is-path-prefix-equal-DRcxtSPQ.js";const Ta=qe(t.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"})),Pa=qe(t.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"})),Do=qe(t.jsx("path",{d:"M22 5.18 10.59 16.6l-4.24-4.24 1.41-1.41 2.83 2.83 10-10zm-2.21 5.04c.13.57.21 1.17.21 1.78 0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8c1.58 0 3.04.46 4.28 1.25l1.44-1.44C16.1 2.67 14.13 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-1.19-.22-2.33-.6-3.39z"})),Ia=qe(t.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"})),Bo=qe(t.jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"})),Da=qe(t.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"})),Ba=qe(t.jsx("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"})),Oa=qe(t.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"})),Ua=qe(t.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}));function br(e,n){var r={};return n=ws(n),_s(e,function(i,a,o){Ss(r,a,n(i,a,o))}),r}function Oo({children:e=null,...n}){const{t:r}=ce(),{api:i}=xe(),{blocklet:a}=De(),o=a?.settings?.autoCheckUpdate,m=async l=>{await i.updateAutoCheckUpdate({input:{did:a.meta.did,autoCheckUpdate:l}})},c=async()=>{try{const l=!o?.enabled;await m({enabled:l}),G.success(r(l?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(l){G.error(l.message)}},d=!!o?.enabled;return t.jsxs(U,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[e,t.jsx(be,{title:r("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:t.jsx("div",{children:t.jsx(Ii,{checked:d,onChange:c,name:"enableWelcomePage",style:{...n.style,zoom:.8}})})})]})}Oo.propTypes={children:x.any};function jr(e){function n({sx:r,...i}){return t.jsx(e,{...i,sx:{color:"text.primary",...r}})}return n}const Na={...br(Oi,jr),...br(ki,jr)},La=(e,n)=>{let{description:r}=e;return(Object.values(ve.CHAIN_PROP_MAP).includes(e.key)||Q.isEnvShareable(e))&&(r?r=`${r} (${n("blocklet.config.sharedToAllComponents")})`:r=n("blocklet.config.sharedToAllComponents")),r&&t.jsx("div",{style:{marginLeft:12},children:r})},hn=(e,n,r=[])=>!r?.length&&!e.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(e.key)&&!n.meta.environments.find(i=>i.name===e.key)&&n.children.every(i=>!i.meta.environments.find(a=>a.name===e.key))?!0:e.custom,wr=e=>[ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(e)?!0:!(e.startsWith("BLOCKLET_")||e.startsWith("COMPONENT_")),gn=e=>[ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(e)===!1;function Uo({blocklet:e,ancestors:n=[]}){const r=xe(),{palette:i}=gt(),{inService:a}=r,{t:o}=R.useContext(je),m=[...n.map(s=>s.meta.did),e.meta.did],c=()=>G.success(o("blocklet.config.changedTip")),d=s=>hn(s,e,n);if(st(e.status)||e.status==="unknown"&&st(e.status))return null;const l=s=>new Promise(async(h,b)=>{if(!s.key.trim()||!s.value.trim()){G.error(o("blocklet.config.environment.keyValueRequired")),b();return}if(wr(s.key)===!1){G.error(o("blocklet.config.environment.invalidKey")),b();return}s.custom=gn(s.key);try{const T=await r.api.configBlocklet({input:{did:m,configs:[s]}});c(T.blocklet),h()}catch(T){G.error(ge(T)),b()}}),v=(s,h)=>new Promise(async(b,T)=>{if(s.required&&(!s.key.trim()||!s.value.trim())){G.error(o("blocklet.config.environment.keyValueRequired")),T();return}if(wr(s.key)===!1){G.error(o("blocklet.config.environment.invalidKey")),T();return}if(s.key===ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const M=Es(s);if(M){G.error(M),T();return}}const k=[{...s,value:s.secure&&s.value==="__encrypted__"?"":s.value}];if(s.key!==h.key){if(!hn(s,e,n)){G.error("Only key of custom env can be changed"),T();return}k.push({key:h.key,custom:gn(s.key)})}try{const M=await r.api.configBlocklet({input:{did:m,configs:k}});c(M.blocklet),b()}catch(M){G.error(ge(M)),T()}}),p=s=>new Promise(async(h,b)=>{if(s.required){G.error(o("blocklet.config.environment.deleteForbidden")),b();return}if(!hn(s,e,n)){G.error(o("environmentTips.deleteForbidden")),b();return}try{const T=await r.api.configBlocklet({input:{did:m,configs:[{key:s.key,custom:gn(s.key)}]}});c(T.blocklet),h()}catch(T){G.error(ge(T)),b()}}),C=(e.configs||[]).filter(s=>!ve.BLOCKLET_CONFIGURABLE_KEY[s.key]||[ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(s.key)),f=Q.getSharedConfigObj(n[0],e),y=Q.getComponentMissingConfigs(e,n[0]),w=C.map(s=>({...s,value:Object.values(ve.CHAIN_PROP_MAP).includes(s.key)&&Object.keys(f).includes(s.key)?f[s.key]:f[s.key]||s.value})),j=w.some(s=>s.key&&s.key.startsWith("BWA_")),E={onRowAdd:l,onRowUpdate:v,onRowDelete:p,isDeletable:d},u=()=>[{title:o("common.key"),field:"key",initialEditValue:"",width:"30%",render:s=>t.jsx(xr,{value:s.value,style:{color:s.required&&!s.value?i.error.main:i.text.primary,fontWeight:s.required?"bold":"normal"},children:s.key}),editComponent:s=>{const{value:h,rowData:b,onChange:T}=s;return t.jsx(_r,{children:t.jsx(ye,{fullWidth:!0,size:"small",value:Ui.escapeTag(h),onChange:k=>T(k.target.value),variant:"outlined",label:"Key",placeholder:o("blocklet.config.environment.key"),margin:"dense",autoFocus:!0,slotProps:{input:{readOnly:d(b)===!1}}})})}},{title:o("common.value"),field:"value",initialEditValue:"",width:"calc((100% - (96px + 30%)) / 1)",render:s=>s.value?s.secure?"******":t.jsx(xr,{unstyled:!0,value:s.value,style:{wordBreak:"break-all"},children:s.value}):null,editComponent:s=>{const{value:h,rowData:b,onChange:T}=s;return t.jsxs(_r,{children:[t.jsx(ye,{fullWidth:!0,size:"small",value:h==="__encrypted__"?"":h,onChange:k=>T(k.target.value),variant:"outlined",label:o("common.value"),placeholder:o("blocklet.config.environment.value"),margin:"dense"}),La(b,o)]})}}];return t.jsxs(Aa,{children:[!!y.length&&t.jsx(On,{severity:"error",style:{marginTop:24},children:o("blocklet.config.missingRequired")}),j&&t.jsx(On,{severity:"info",children:o("blocklet.config.environment.tip")}),t.jsx(Nn,{permission:a?"":"mutate_blocklets",role:a?ft:[],children:s=>t.jsx(Di,{className:"config-table",children:t.jsx(Bi,{title:t.jsx(U,{sx:{fontWeight:"bold"},children:o("common.environments")}),columns:u(),icons:Na,options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1,actionsCellStyle:{padding:"0",textAlign:"right",width:"80px"}},localization:{header:{actions:o("common.actions")},body:{emptyDataSourceMessage:o("common.noData"),editRow:{deleteText:o("environmentTips.delete")}}},data:w,editable:s?E:{}})})})]})}Uo.propTypes={blocklet:x.object.isRequired,ancestors:x.array};const Aa=oe.div`
|
|
3
3
|
.config-table {
|
|
4
4
|
margin-bottom: 24px;
|
|
5
5
|
position: relative;
|
|
@@ -66,7 +66,7 @@ import{aF as qe,j as t,dq as ws,gB as _s,ix as Ss,V as ce,bn as xe,K as U,ay as
|
|
|
66
66
|
.ux-dialog_closeButton {
|
|
67
67
|
margin: 0;
|
|
68
68
|
}
|
|
69
|
-
`,za=R.lazy(()=>Rs(()=>import("./index-
|
|
69
|
+
`,za=R.lazy(()=>Rs(()=>import("./index-BTzUdfyO.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),qa="/blocklet/component/upload",Sr=[".html",".htm",".tgz",".zip"],Fa=Number(window.env?.MAX_UPLOAD_FILE_SIZE)||W.MAX_UPLOAD_FILE_SIZE,$a=Fa*1024*1024;function No({did:e,prefix:n,headers:r=()=>({}),onUploaded:i=mt,open:a=!1,onClose:o=mt}){const{t:m,locale:c}=ce(),d=R.useRef(null),l=R.useCallback(v=>{const{status:p,data:C}=v;if(p===200){i(C);return}G.error(m("blocklet.component.addComponentTip.uploadFailed"))},[i,m]);return R.useEffect(()=>{a?d.current?.open():d.current?.close()},[a]),t.jsx(Wa,{id:`component-uploader-${e}`,children:t.jsx(za,{ref:d,locale:c,popup:!0,onUploadFinish:l,plugins:[],onClose:o,installerProps:{disabled:!0},apiPathProps:{uploader:Ee(n,qa,e),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:Sr,maxFileSize:$a,maxNumberOfFiles:1}},tusProps:{headers:r},dashboardProps:{note:m("blocklet.component.addComponentTip.allowedFileTypes",{types:Sr.map(v=>v.replace(".","")).join(", ")})}})},`component-uploader-${e}`)}No.propTypes={did:x.string.isRequired,prefix:x.string.isRequired,open:x.bool,headers:x.func,onUploaded:x.func,onClose:x.func};const Wa=ks(U)`
|
|
70
70
|
.uploader-wrapper {
|
|
71
71
|
display: inline-flex;
|
|
72
72
|
position: relative;
|