@abtnode/webapp 1.16.45-beta-20250609-111118-0d252ebe → 1.16.45-beta-20250612-231219-481217be
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-BqwbfR-J.js → AdapterDayjs-cAovH2Wn.js} +1 -1
- package/dist/assets/{Add-CSGWebd7.js → Add-CDNZP3_0.js} +1 -1
- package/dist/assets/{ArrowDropDown-BCCxOUNE.js → ArrowDropDown-DX4axGQA.js} +1 -1
- package/dist/assets/{Autocomplete-BRFoT1-d.js → Autocomplete-DpJFKWid.js} +1 -1
- package/dist/assets/{Breadcrumbs-B-xYTnoc.js → Breadcrumbs-DvU47lY-.js} +1 -1
- package/dist/assets/{ButtonGroup-ClVwTb7r.js → ButtonGroup-pRTDFJWg.js} +1 -1
- package/dist/assets/{CSSTransition-DpoNbm4c.js → CSSTransition-DwzJ0puV.js} +1 -1
- package/dist/assets/{CallMerge-weq4zXp-.js → CallMerge-C0f2EMe_.js} +1 -1
- package/dist/assets/{CardContent-CTAfwoUe.js → CardContent-0awZM1Ns.js} +1 -1
- package/dist/assets/{ChevronLeft-DQK-aqqz.js → ChevronLeft-ud_S8L4-.js} +1 -1
- package/dist/assets/{ChevronRight-BtkdX9A9.js → ChevronRight-B_-R2Sts.js} +1 -1
- package/dist/assets/{Clear-D0I7uWhD.js → Clear-B9P4WqAY.js} +1 -1
- package/dist/assets/{Close-6CxneLlA.js → Close-D_k500g1.js} +1 -1
- package/dist/assets/{Community-v2_SoLAO.js → Community-C1YZ_Fzm.js} +1 -1
- package/dist/assets/{Delete-P4B2dduO.js → Delete-CvkgpWXX.js} +1 -1
- package/dist/assets/{DeleteOutline-EQ9bHspP.js → DeleteOutline-C6-UDibg.js} +1 -1
- package/dist/assets/{Done-2EsU1aO2.js → Done-oo1eX6tp.js} +1 -1
- package/dist/assets/{Edit-frf3Fbx4.js → Edit-D2-hkmp_.js} +1 -1
- package/dist/assets/{ErrorOutline-a1DnwqoR.js → ErrorOutline-zNHQAP0N.js} +1 -1
- package/dist/assets/{HelpOutline-CBv7x3VM.js → HelpOutline-Dnfzivtx.js} +1 -1
- package/dist/assets/{Holiday-CM3JD4xm.js → Holiday-CiEfpBY3.js} +1 -1
- package/dist/assets/{Launch-B7fv6nTK.js → Launch-DVq2r1vu.js} +1 -1
- package/dist/assets/{Link-CiUEO3cQ.js → Link-CHQGWtG9.js} +1 -1
- package/dist/assets/{ListItemButton-ByIRcZGW.js → ListItemButton-LswuUKPc.js} +1 -1
- package/dist/assets/{ListSubheader-Yn3XMnVm.js → ListSubheader-Dqc3XTI_.js} +1 -1
- package/dist/assets/{LoadingButton-B3es9INs.js → LoadingButton-BlJTr1LL.js} +1 -1
- package/dist/assets/{LockIcon-C1gL9Uz4.js → LockIcon-DvcB90iN.js} +1 -1
- package/dist/assets/{Meeting-BkxfSXYG.js → Meeting-Bt1FEapI.js} +1 -1
- package/dist/assets/{MoreHoriz-3d6Yp_t-.js → MoreHoriz-CQaja3QI.js} +1 -1
- package/dist/assets/{MoreVert-C_Ck3fn9.js → MoreVert-Ca16Cnof.js} +1 -1
- package/dist/assets/{OffSick-Z9k6qoex.js → OffSick-HYKiIDQw.js} +1 -1
- package/dist/assets/{OpenInNew-D79h4Iot.js → OpenInNew-CysIURb4.js} +1 -1
- package/dist/assets/{Public-BtS6bdiD.js → Public-D4TSC2Ib.js} +1 -1
- package/dist/assets/{Refresh-C1kA8imS.js → Refresh-BNaUmDFT.js} +1 -1
- package/dist/assets/{SchemaReference.es-Dfqhb0uS.js → SchemaReference.es-GR-_9bfJ.js} +1 -1
- package/dist/assets/{Search-CUm1f8xo.js → Search-BqZFZ5g2.js} +1 -1
- package/dist/assets/{Slider-B0hY7ZYB.js → Slider-DkRYH92J.js} +1 -1
- package/dist/assets/{Stepper-CEe-v4P_.js → Stepper-DEgX4GTY.js} +1 -1
- package/dist/assets/{Switch-D3iZUzda.js → Switch-SGjalYgz.js} +1 -1
- package/dist/assets/{TableRow-CQ8RBtid.js → TableRow-D2EIvRB_.js} +1 -1
- package/dist/assets/{TableSearch-Uk9kIt7i.js → TableSearch-CAvitNOv.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BrZT8OFC.js → ToggleButtonGroup-BUQPuDr0.js} +1 -1
- package/dist/assets/{Verified-DjfvSM3n.js → Verified-CLwd2p1i.js} +1 -1
- package/dist/assets/{VerifiedUser-CGB9pAg5.js → VerifiedUser-BlbKkPqo.js} +1 -1
- package/dist/assets/{ViewColumn-CcQluqhl.js → ViewColumn-CxnzgopE.js} +1 -1
- package/dist/assets/{ViewList-CPkfx4gI.js → ViewList-Dq8vu1UD.js} +1 -1
- package/dist/assets/{WorkingRemotely-BMx519Rn.js → WorkingRemotely-C4WjSs8k.js} +1 -1
- package/dist/assets/{_createAggregator-Dp2y-Mf_.js → _createAggregator-C775jKSl.js} +1 -1
- package/dist/assets/{actions-C8ldDfDc.js → actions-CWQtNrcD.js} +1 -1
- package/dist/assets/{actions-CvZtuIOm.js → actions-Dq6DDwe2.js} +1 -1
- package/dist/assets/{agreement-4TUvZhY3.js → agreement-DCQc_rAP.js} +1 -1
- package/dist/assets/api-DwcaKz2E.js +1 -0
- package/dist/assets/{appearance-CztLZ35g.js → appearance-Bp-lCdSt.js} +1 -1
- package/dist/assets/ar-D9QEDjY-.js +7 -0
- package/dist/assets/{audit-logs-vnwtSLPp.js → audit-logs-CjK3Z08k.js} +1 -1
- package/dist/assets/{base-chart-tXWghrta.js → base-chart-YZwnGzYD.js} +1 -1
- package/dist/assets/{blocklet-SKmr21o8.js → blocklet-3SnK_ln7.js} +1 -1
- package/dist/assets/{brace-fold.es-C8hYDu8C.js → brace-fold.es-BNQlG2nr.js} +1 -1
- package/dist/assets/{chain-Cw3CxpIJ.js → chain-B90dDCGq.js} +1 -1
- package/dist/assets/{click-to-copy-BBcwV5Sv.js → click-to-copy-a5cMFI-_.js} +1 -1
- package/dist/assets/cloneDeep-BmfjF8bM.js +1 -0
- package/dist/assets/{closebrackets.es-n7j2YaKC.js → closebrackets.es-CXG4Cd3e.js} +1 -1
- package/dist/assets/{codemirror.es-q3z3D3fp.js → codemirror.es-B3B1JR3x.js} +1 -1
- package/dist/assets/{collapse-Cy01Qhtt.js → collapse-C2nB1Q0B.js} +1 -1
- package/dist/assets/{comment.es-CZaW3Zjc.js → comment.es-BzZcNo5B.js} +1 -1
- package/dist/assets/{config-navigation-B4iEyuxN.js → config-navigation-BN6zZFyV.js} +3 -3
- package/dist/assets/{connect-to-BbdcjX_x.js → connect-to-CmhbEEvA.js} +1 -1
- package/dist/assets/{de-Dv_ApqsF.js → de-BOa43YBF.js} +2 -2
- package/dist/assets/{delete-confirm-qy4uClf5.js → delete-confirm-m56IXxYG.js} +1 -1
- package/dist/assets/{detail-C_SIxTEY.js → detail-BlHIoIDp.js} +3 -3
- package/dist/assets/{dialog.es-BEBI39yG.js → dialog.es-C42Mil04.js} +1 -1
- package/dist/assets/{domains-Bql4UA4y.js → domains-CeBkVCNd.js} +2 -2
- package/dist/assets/{download-DdDp7qNF.js → download-Bh0sNo9s.js} +1 -1
- package/dist/assets/emotion-react.browser.esm-CorLywyT.js +1 -0
- package/dist/assets/es-A3ma-OJp.js +9 -0
- package/dist/assets/{foldgutter.es-XJVlfA9j.js → foldgutter.es-Jx2Yn3Ns.js} +1 -1
- package/dist/assets/fr-I3xKp6I5.js +7 -0
- package/dist/assets/{get-safe-url-BHhOK-87.js → get-safe-url-CXFJ7HE5.js} +1 -1
- package/dist/assets/{get-safe-url-ZQAisLez.js → get-safe-url-t5_KGb1I.js} +1 -1
- package/dist/assets/getValidReactChildren-DuVu0i0i.js +1 -0
- package/dist/assets/{hi-Dqbq8i5Y.js → hi-DacRhM8A.js} +1 -1
- package/dist/assets/{hint.es-BXYnqh_9.js → hint.es-BoFboqfs.js} +1 -1
- package/dist/assets/{hint.es2-mCmWTcSI.js → hint.es2-C9gyljNf.js} +1 -1
- package/dist/assets/{id-Bxr8o3Uo.js → id-B7LQAHL7.js} +3 -3
- package/dist/assets/{iframe-CVde2I2R.js → iframe-AXVHNW_k.js} +1 -1
- package/dist/assets/{index-DzK6OW-H.js → index-4WVfl35V.js} +1 -1
- package/dist/assets/{index-DzWDWvao.js → index-B-k7ViK0.js} +1 -1
- package/dist/assets/{index-B37Lr7Hg.js → index-B0jcX1RF.js} +1 -1
- package/dist/assets/{index-DzcmC4If.js → index-B2F1vMBv.js} +4 -4
- package/dist/assets/{index-BkStkax6.js → index-B7K9oQOc.js} +2 -2
- package/dist/assets/{index-DNFAdenj.js → index-BA9uj90I.js} +1 -1
- package/dist/assets/{index-CIeEDIRZ.js → index-BBjq0j2v.js} +1 -1
- package/dist/assets/{index-CEr4LN-P.js → index-BEKDshjS.js} +1 -1
- package/dist/assets/{index-Cm6VrPFr.js → index-BGgjrqZC.js} +1 -1
- package/dist/assets/{index-BUWOtFDP.js → index-BHBEV8r4.js} +1 -1
- package/dist/assets/{index-DTb1YjkO.js → index-BXOD69ua.js} +83 -83
- package/dist/assets/{index-CCGiAGPb.js → index-BY88k43C.js} +1 -1
- package/dist/assets/{index-CFc2cpAq.js → index-BZeeqqFX.js} +1 -1
- package/dist/assets/{index-uw3m84Z2.js → index-Ba15C891.js} +1 -1
- package/dist/assets/{index-BKpBz5IS.js → index-BbubXXOK.js} +1 -1
- package/dist/assets/{index-omP-_XYV.js → index-C0MwD3ew.js} +1 -1
- package/dist/assets/{index-BublfAf3.js → index-CEuPYhl0.js} +1 -1
- package/dist/assets/{index-BQOOINkR.js → index-CGpLBTuz.js} +1 -1
- package/dist/assets/{index-B6YLm2gY.js → index-CJTCcEXc.js} +1 -1
- package/dist/assets/{index-Dg-nEXIR.js → index-CTMjLXVv.js} +1 -1
- package/dist/assets/{index-DM5TK3mI.js → index-Ca4fyQU9.js} +1 -1
- package/dist/assets/{index-wKRUqEyT.js → index-Cim0AD_y.js} +2 -2
- package/dist/assets/{index-D3OlVE0m.js → index-CknB_y2G.js} +1 -1
- package/dist/assets/index-Clkrz3Dv.js +41 -0
- package/dist/assets/{index-C_5on_zt.js → index-CpywGtnH.js} +1 -1
- package/dist/assets/{index-DdAt9jDT.js → index-Cs16EI2i.js} +1 -1
- package/dist/assets/{index-BDHvuJA-.js → index-CwcDS29n.js} +5 -5
- package/dist/assets/index-D1tieyaZ.js +1 -0
- package/dist/assets/{index-Ds-ruyy-.js → index-DDI2W4Tb.js} +1 -1
- package/dist/assets/{index-ChSMfUDl.js → index-DGqCsVmc.js} +10 -10
- package/dist/assets/{index-DsdaIM1E.js → index-DKeeqPhh.js} +4 -4
- package/dist/assets/{index-CViyZjZs.js → index-DNdIaDLR.js} +1 -1
- package/dist/assets/{index-DVT--CtL.js → index-DQvxOUyW.js} +3 -3
- package/dist/assets/{index-BILcrV-b.js → index-DV2t0rB2.js} +1 -1
- package/dist/assets/{index-DTnnZgV3.js → index-DVVxcn_U.js} +1 -1
- package/dist/assets/index-DW-mbKeK.js +236 -0
- package/dist/assets/{index-BWpZKV7G.js → index-DXbn94TQ.js} +3 -3
- package/dist/assets/{index-B6gCUDLy.js → index-Dd8tfIXz.js} +1 -1
- package/dist/assets/{index-C562LNdR.js → index-DdwYTOhS.js} +9 -9
- package/dist/assets/{index-BLrsx8oH.js → index-DfVhmhNU.js} +1 -1
- package/dist/assets/{index-DnLtwT4P.js → index-Dhx2XMvi.js} +1 -1
- package/dist/assets/{index-CPBAco4X.js → index-MCMqKG1X.js} +1 -1
- package/dist/assets/{index-ooFvSbXR.js → index-NOETvacG.js} +1 -1
- package/dist/assets/{index-DRvnuna9.js → index-Vj6hcvqX.js} +1 -1
- package/dist/assets/{index-CyCivdc5.js → index-VoBTA_fx.js} +1 -1
- package/dist/assets/{index-CZplOWEN.js → index-gYWDzVZB.js} +1 -1
- package/dist/assets/{index-C-QDjEC-.js → index-kMvGy1BT.js} +1 -1
- package/dist/assets/{index.esm-CB-7UGfI.js → index.esm-S1RHFvfU.js} +1 -1
- package/dist/assets/{info-addon.es-DKtNhOCh.js → info-addon.es-BrPERxwM.js} +1 -1
- package/dist/assets/{info.es-B7YFO8O9.js → info.es-BG627Djn.js} +1 -1
- package/dist/assets/{install-from-url-B9F0r0Uk.js → install-from-url-Kt3o4LBx.js} +1 -1
- package/dist/assets/{invitation-BAovnHWT.js → invitation-w4SAH9iP.js} +1 -1
- package/dist/assets/is-path-prefix-equal-B5zOew9j.js +1 -0
- package/dist/assets/item-B-caRYba.js +277 -0
- package/dist/assets/{ja-CJfcqkdo.js → ja-DRQ4Eecl.js} +3 -1
- package/dist/assets/{javascript.es-e4wfmIpw.js → javascript.es-BEqQG-X0.js} +1 -1
- package/dist/assets/{jump-to-line.es-D1zAOCng.js → jump-to-line.es-K-qNaz4d.js} +1 -1
- package/dist/assets/{jump.es-CR1apnMt.js → jump.es-TG1mfYt_.js} +1 -1
- package/dist/assets/{ko-BxAazRix.js → ko-CzL3UzwL.js} +3 -1
- package/dist/assets/{lint.es-po0cvpDF.js → lint.es-CXlTl58k.js} +1 -1
- package/dist/assets/{lint.es2-CIRlGKEU.js → lint.es2-6L_OlSQy.js} +1 -1
- package/dist/assets/{lint.es3-CC5QXby4.js → lint.es3-D-7-u1za.js} +1 -1
- package/dist/assets/{list-header-D5Klosqn.js → list-header-B8ysM0r4.js} +1 -1
- package/dist/assets/{log-DvWjHRjx.js → log-0actLjpa.js} +1 -1
- package/dist/assets/{lottie-react.esm-CzS4D97g.js → lottie-react.esm-PsK3z7dD.js} +1 -1
- package/dist/assets/{matchbrackets.es-Bh__cUPA.js → matchbrackets.es-DvOANBOF.js} +1 -1
- package/dist/assets/{memory-VuyFpRX6.js → memory-Dk-Khjf8.js} +1 -1
- package/dist/assets/{metric-sJIuzFdD.js → metric-7dzLcQP8.js} +1 -1
- package/dist/assets/{mode.es-b4PvmWPj.js → mode.es-BCPKj5xj.js} +1 -1
- package/dist/assets/{mode.es2-B8UlLCtX.js → mode.es2-DcHabWZq.js} +1 -1
- package/dist/assets/{mode.es3-CQ9X5NiW.js → mode.es3-DepgrqKR.js} +1 -1
- package/dist/assets/omit-BIY56Vm3.js +1 -0
- package/dist/assets/{onlineParser.es-mNPHWPcl.js → onlineParser.es-F2aU-24r.js} +1 -1
- package/dist/assets/{overview-DptGQrLC.js → overview-D99x1C_L.js} +1 -1
- package/dist/assets/{permission-DtbkcHFU.js → permission-BwU5vqVv.js} +1 -1
- package/dist/assets/{preference-BIxg48qT.js → preference-B-a8y1-u.js} +3 -3
- package/dist/assets/{pt-FpFCyI6v.js → pt-CHKumXYv.js} +3 -3
- package/dist/assets/{raf-schd.esm-CyR0PsG3.js → raf-schd.esm-CfDeV_Tv.js} +1 -1
- package/dist/assets/refType-RuhvdYnQ.js +1 -0
- package/dist/assets/{resource-dialog-DSlsEDCi.js → resource-dialog-B3xpsyIT.js} +5 -5
- package/dist/assets/{ru-BuGIFp9h.js → ru-CvkEKhgU.js} +1 -1
- package/dist/assets/{runtime-BqyrQzUD.js → runtime-C94CoEdP.js} +1 -1
- package/dist/assets/{schema-BD6PrmCO.js → schema-D29PP22L.js} +1 -1
- package/dist/assets/sdk-CJFYaDBM.js +1 -0
- package/dist/assets/{search.es-BjwGHA7G.js → search.es-Dtiay1-p.js} +1 -1
- package/dist/assets/{searchcursor.es-CbJCToER.js → searchcursor.es-B5hHQBpu.js} +1 -1
- package/dist/assets/{service-BV2uNns2.js → service-Dwje1JT3.js} +1 -1
- package/dist/assets/{shorten-label-BOckTQ1X.js → shorten-label-C3V2RyR1.js} +1 -1
- package/dist/assets/{show-hint.es-q9IMwctI.js → show-hint.es-IwvOaNo4.js} +1 -1
- package/dist/assets/{simple-select-Dtd0a5G_.js → simple-select-C-hoC-G2.js} +1 -1
- package/dist/assets/{spaces-Bqb0c1IC.js → spaces-BqxfgJ6Q.js} +1 -1
- package/dist/assets/{status-CoaEXqC8.js → status-YpqmLpg4.js} +1 -1
- package/dist/assets/{status-DAsfcIss.js → status-uT90przA.js} +1 -1
- package/dist/assets/{sublime.es-Di_Rzzft.js → sublime.es-D6Ae2P0m.js} +1 -1
- package/dist/assets/{switch-control-uwHD90eP.js → switch-control-6V55bVbg.js} +1 -1
- package/dist/assets/{table-icons-CMF2B4vQ.js → table-icons-DA0sv0Eq.js} +1 -1
- package/dist/assets/{team-DbBAK1Lw.js → team-CKufRu0w.js} +1 -1
- package/dist/assets/{th-BafLD2wR.js → th-B2BUfjNJ.js} +1 -1
- package/dist/assets/{toLower-Bk4Y66nU.js → toLower-J0GcLV1u.js} +1 -1
- package/dist/assets/toUpper-CkfbCBIC.js +1 -0
- package/dist/assets/{traffic-C8Jrp6CL.js → traffic-D56Ew432.js} +1 -1
- package/dist/assets/{url-evaluation-DQ262LSg.js → url-evaluation-D9TCPMS4.js} +1 -1
- package/dist/assets/{url-join-IGglLOtK.js → url-join-C88wtrgy.js} +1 -1
- package/dist/assets/{use-mobile-YvhVWxe8.js → use-mobile-5Zh9Oud5.js} +1 -1
- package/dist/assets/{use-mobile-BoYyduuc.js → use-mobile-C9rByBew.js} +1 -1
- package/dist/assets/{useAsync-DbB0tJq1.js → useAsync-DPy_pDJm.js} +1 -1
- package/dist/assets/{useAsyncRetry-BLg3v7lI.js → useAsyncRetry-oFyp9pPD.js} +1 -1
- package/dist/assets/{useLocalStorage-DQZ59j66.js → useLocalStorage-osYXE-mL.js} +1 -1
- package/dist/assets/{useThemeProps-CtXzBlYo.js → useThemeProps-C_6zzxTC.js} +1 -1
- package/dist/assets/{util-CUC0Xf5B.js → util-MD5zwT5R.js} +1 -1
- package/dist/assets/{vi-BMZxxaJ2.js → vi-BykmwIAT.js} +3 -3
- package/dist/assets/{wait-container-GoGxY2Kf.js → wait-container-BbGRQLG4.js} +1 -1
- package/dist/assets/{withStyles-_FcG1bkA.js → withStyles-DL-NFbaE.js} +1 -1
- package/dist/assets/wrap-locale-BRogPOgW.js +1 -0
- package/dist/assets/{zh-DusA4qAT.js → zh-CbCaOuAd.js} +3 -1
- package/dist/assets/{zh-tw-BO-QhSNP.js → zh-tw-C9JfiCVV.js} +3 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/api-gAVz4YtD.js +0 -1
- package/dist/assets/ar-0ZkmCCuq.js +0 -7
- package/dist/assets/cloneDeep-CP0xacDT.js +0 -1
- package/dist/assets/emotion-react.browser.esm--gIypTeg.js +0 -1
- package/dist/assets/es-D_uF0siv.js +0 -7
- package/dist/assets/fr-DVFSQfDp.js +0 -7
- package/dist/assets/getValidReactChildren-B-b9MOMT.js +0 -1
- package/dist/assets/index-Boprg64p.js +0 -236
- package/dist/assets/index-DrBxStif.js +0 -41
- package/dist/assets/index-s1CQJTjJ.js +0 -1
- package/dist/assets/is-path-prefix-equal-C80Jhu_q.js +0 -1
- package/dist/assets/item-CrnjScjy.js +0 -277
- package/dist/assets/omit-BEDWXxvr.js +0 -1
- package/dist/assets/refType-J5vgZzDX.js +0 -1
- package/dist/assets/sdk-gxKU3x6m.js +0 -1
- package/dist/assets/toUpper-FI4Si1KF.js +0 -1
- package/dist/assets/wrap-locale-B35eVgy7.js +0 -1
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import{c5 as ze,r as L,ct as St,fK as Tr,be as Po,bf as Mo,cU as Et,fL as tt,cu as pt,fM as Lo,fN as Do,b_ as Or,a6 as Ht,bY as dt,dg as zo,c3 as Cr,j as o,bh as Ne,aP as Kt,aQ as Ut,d8 as ht,bl as Fo,d0 as Er,ep as Oe,C as Pe,dq as Be,K as q,al as Ve,dH as No,a3 as Ao,dU as Bo,fO as ii,fk as oi,fP as si,fQ as ai,aD as Wo,aE as Mn,aZ as xe,fR as $o,fS as sn,k as Z,cy as Ho,fT as Ko,E as nt,fU as Uo,aY as li,U as ci,cH as Ln,dx as Fe,av as Ft,G as Ir,fV as ui,fW as Vo,fX as an,t as di,Q as Nt,a2 as rt,ej as _r,aT as qo,cJ as Go,fY as Xo,fZ as Yo,f_ as Qo,M as Jo,cI as Zo,fl as es,eC as ts,eb as ns,bx as rs,$ as is,f$ as Rr,g0 as os,P as M,m as qe,aB as Dn,aS as Pr,eV as hi,b6 as ss,aH as It,B as At,a8 as as,a9 as fi,aI as ls,g1 as Mr,aa as cs,bq as zn,D as us,s as ds,V as hs,cP as fs,X as mt,A as Fn,y as Ke,b as ps,o as ms,b3 as gs,ae as bs,cz as ys,W as vs}from"./index-BXOD69ua.js";import{d as xs}from"./ChevronLeft-ud_S8L4-.js";import{d as ws}from"./ChevronRight-B_-R2Sts.js";import{d as Ss}from"./Search-BqZFZ5g2.js";import{E as ks}from"./index-C0MwD3ew.js";import{o as js,u as Ts}from"./blocklet-3SnK_ln7.js";import{A as Os}from"./Autocomplete-DpJFKWid.js";import{d as Cs}from"./Verified-CLwd2p1i.js";import{d as Es,a as Is}from"./VerifiedUser-BlbKkPqo.js";import{d as _s}from"./Add-CDNZP3_0.js";import{d as pi}from"./Launch-DVq2r1vu.js";import{d as Rs}from"./Done-oo1eX6tp.js";import{d as mi}from"./DeleteOutline-C6-UDibg.js";import{D as Ps}from"./delete-confirm-m56IXxYG.js";import{d as Ms}from"./MoreVert-Ca16Cnof.js";import{g as yt}from"./get-safe-url-t5_KGb1I.js";import{B as Lr}from"./ButtonGroup-pRTDFJWg.js";var Ls=function(e){return e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop},Dr=function(e){return e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},Ds=function(e){return e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},zs=function(e,t){t===void 0&&(t={});var n=t.target,r=t.isNoMore,i=t.threshold,s=i===void 0?100:i,u=t.direction,d=u===void 0?"bottom":u,p=t.reloadDeps,g=p===void 0?[]:p,f=t.manual,y=t.onBefore,w=t.onSuccess,x=t.onError,S=t.onFinally,j=ze(L.useState(),2),R=j[0],T=j[1],O=ze(L.useState(!1),2),P=O[0],A=O[1],G=d==="top",W=L.useRef(),K=L.useRef(0),ee=L.useMemo(function(){return r?r(R):!1},[R]),ie=St(function(oe){return Po(void 0,void 0,void 0,function(){var te,me,Ie,_e;return Mo(this,function(kt){switch(kt.label){case 0:return[4,e(oe)];case 1:return te=kt.sent(),T(oe?Et(Et({},te),{list:G?tt(tt([],ze(te.list),!1),ze((Ie=oe.list)!==null&&Ie!==void 0?Ie:[]),!1):tt(tt([],ze((_e=oe.list)!==null&&_e!==void 0?_e:[]),!1),ze(te.list),!1)}):Et(Et({},te),{list:tt([],ze((me=te.list)!==null&&me!==void 0?me:[]),!1)})),[2,te]}})})},{manual:f,onFinally:function(oe,te,me){A(!1),S==null||S(te,me)},onBefore:function(){return y==null?void 0:y()},onSuccess:function(oe){setTimeout(function(){if(G){var te=Tr(n);if(te=te===document?document.documentElement:te,te){var me=Dr(te);te.scrollTo(0,me-K.current)}}else se()}),w==null||w(oe)},onError:function(oe){return x==null?void 0:x(oe)}}),H=ie.loading,Ee=ie.error,ge=ie.run,ke=ie.runAsync,be=ie.cancel,ye=pt(function(){ee||(A(!0),ge(R))}),N=pt(function(){return ee?Promise.reject():(A(!0),ke(R))}),Q=function(){return A(!1),ge()},he=function(){return A(!1),ke()},se=function(){var oe=Tr(n);if(oe){var te=oe===document?document.documentElement:oe,me=Ls(te),Ie=Dr(te),_e=Ds(te);G?(W.current!==void 0&&W.current>me&&me<=s&&ye(),W.current=me,K.current=Ie-me):Ie-me<=_e+s&&ye()}};return Lo("scroll",function(){H||P||se()},{target:n}),Do(function(){ge()},tt([],ze(g),!1)),{data:R,loading:!P&&H,error:Ee,loadingMore:P,noMore:ee,loadMore:ye,loadMoreAsync:N,reload:pt(Q),reloadAsync:pt(he),mutate:T,cancel:be}};const Fs=["name"],Ns=["children","className","clone","component"];function As(e,t){const n={};return Object.keys(e).forEach(r=>{t.indexOf(r)===-1&&(n[r]=e[r])}),n}function Bs(e){return(n,r={})=>{const{name:i}=r,s=Or(r,Fs);let u=i;const p=Ht(typeof n=="function"?y=>({root:w=>n(dt({theme:y},w))}):{root:n},dt({Component:e,name:i||e.displayName,classNamePrefix:u},s));let g;n.filterProps&&(g=n.filterProps,delete n.filterProps),n.propTypes&&(n.propTypes,delete n.propTypes);const f=L.forwardRef(function(w,x){const{children:S,className:j,clone:R,component:T}=w,O=Or(w,Ns),P=p(w),A=Cr(P.root,j);let G=O;if(g&&(G=As(G,g)),R)return L.cloneElement(S,dt({className:Cr(S.props.className,A)},G));if(typeof S=="function")return S(dt({className:A},G));const W=T||e;return o.jsx(W,dt({ref:x,className:A},G,{children:S}))});return zo(f,e),f}}const Nc="blocklet-add-component-registry",Ac="server-add-registry",Ws={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m8 16l2-6l6-2l-2 6l-6 2"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-9v2m0 14v2m-9-9h2m14 0h2"/></g>'},gt=/^[a-z0-9]+(-[a-z0-9]+)*$/,Vt=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const d=i.pop(),p=i.pop(),g={provider:i.length>0?i[0]:r,prefix:p,name:d};return t&&!Dt(g)?null:g}const s=i[0],u=s.split("-");if(u.length>1){const d={provider:r,prefix:u.shift(),name:u.join("-")};return t&&!Dt(d)?null:d}if(n&&r===""){const d={provider:r,prefix:"",name:s};return t&&!Dt(d,n)?null:d}return null},Dt=(e,t)=>e?!!((e.provider===""||e.provider.match(gt))&&(t&&e.prefix===""||e.prefix.match(gt))&&e.name.match(gt)):!1,gi=Object.freeze({left:0,top:0,width:16,height:16}),Bt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Nn=Object.freeze({...gi,...Bt}),wn=Object.freeze({...Nn,body:"",hidden:!1});function $s(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function zr(e,t){const n=$s(e,t);for(const r in wn)r in Bt?r in e&&!(r in n)&&(n[r]=Bt[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Hs(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(u){if(n[u])return i[u]=[];if(!(u in i)){i[u]=null;const d=r[u]&&r[u].parent,p=d&&s(d);p&&(i[u]=[d].concat(p))}return i[u]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function Ks(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function u(d){s=zr(r[d]||i[d],s)}return u(t),n.forEach(u),zr(e,s)}function bi(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=Hs(e);for(const i in r){const s=r[i];s&&(t(i,Ks(e,i,s)),n.push(i))}return n}const Us={provider:"",aliases:{},not_found:{},...gi};function ln(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function yi(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ln(e,Us))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i.match(gt)||typeof s.body!="string"||!ln(s,wn))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],u=s.parent;if(!i.match(gt)||typeof u!="string"||!n[u]&&!r[u]||!ln(s,wn))return null}return t}const Fr=Object.create(null);function Vs(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Ue(e,t){const n=Fr[e]||(Fr[e]=Object.create(null));return n[t]||(n[t]=Vs(e,t))}function An(e,t){return yi(t)?bi(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function qs(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let vt=!1;function vi(e){return typeof e=="boolean"&&(vt=e),vt}function Gs(e){const t=typeof e=="string"?Vt(e,!0,vt):e;if(t){const n=Ue(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Xs(e,t){const n=Vt(e,!0,vt);if(!n)return!1;const r=Ue(n.provider,n.prefix);return qs(r,n.name,t)}function Ys(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),vt&&!t&&!e.prefix){let i=!1;return yi(e)&&(e.prefix="",bi(e,(s,u)=>{u&&Xs(s,u)&&(i=!0)})),i}const n=e.prefix;if(!Dt({provider:t,prefix:n,name:"a"}))return!1;const r=Ue(t,n);return!!An(r,e)}const xi=Object.freeze({width:null,height:null}),wi=Object.freeze({...xi,...Bt}),Qs=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Js=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Nr(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Qs);if(r===null||!r.length)return e;const i=[];let s=r.shift(),u=Js.test(s);for(;;){if(u){const d=parseFloat(s);isNaN(d)?i.push(s):i.push(Math.ceil(d*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");u=!u}}const Zs=e=>e==="unset"||e==="undefined"||e==="none";function ea(e,t){const n={...Nn,...e},r={...wi,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(S=>{const j=[],R=S.hFlip,T=S.vFlip;let O=S.rotate;R?T?O+=2:(j.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),j.push("scale(-1 1)"),i.top=i.left=0):T&&(j.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),j.push("scale(1 -1)"),i.top=i.left=0);let P;switch(O<0&&(O-=Math.floor(O/4)*4),O=O%4,O){case 1:P=i.height/2+i.top,j.unshift("rotate(90 "+P.toString()+" "+P.toString()+")");break;case 2:j.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:P=i.width/2+i.left,j.unshift("rotate(-90 "+P.toString()+" "+P.toString()+")");break}O%2===1&&(i.left!==i.top&&(P=i.left,i.left=i.top,i.top=P),i.width!==i.height&&(P=i.width,i.width=i.height,i.height=P)),j.length&&(s='<g transform="'+j.join(" ")+'">'+s+"</g>")});const u=r.width,d=r.height,p=i.width,g=i.height;let f,y;u===null?(y=d===null?"1em":d==="auto"?g:d,f=Nr(y,p/g)):(f=u==="auto"?p:u,y=d===null?Nr(f,g/p):d==="auto"?g:d);const w={},x=(S,j)=>{Zs(j)||(w[S]=j.toString())};return x("width",f),x("height",y),w.viewBox=i.left.toString()+" "+i.top.toString()+" "+p.toString()+" "+g.toString(),{attributes:w,body:s}}const ta=/\sid="(\S+)"/g,na="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ra=0;function ia(e,t=na){const n=[];let r;for(;r=ta.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const u=typeof t=="function"?t(s):t+(ra++).toString(),d=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+d+')([")]|\\.[a-z])',"g"),"$1"+u+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const Sn=Object.create(null);function oa(e,t){Sn[e]=t}function kn(e){return Sn[e]||Sn[""]}function Bn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Wn=Object.create(null),ft=["https://api.simplesvg.com","https://api.unisvg.com"],zt=[];for(;ft.length>0;)ft.length===1||Math.random()>.5?zt.push(ft.shift()):zt.push(ft.pop());Wn[""]=Bn({resources:["https://api.iconify.design"].concat(zt)});function sa(e,t){const n=Bn(t);return n===null?!1:(Wn[e]=n,!0)}function $n(e){return Wn[e]}const aa=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ar=aa();function la(e,t){const n=$n(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(u=>{i=Math.max(i,u.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function ca(e){return e===404}const ua=(e,t,n)=>{const r=[],i=la(e,t),s="icons";let u={type:s,provider:e,prefix:t,icons:[]},d=0;return n.forEach((p,g)=>{d+=p.length+1,d>=i&&g>0&&(r.push(u),u={type:s,provider:e,prefix:t,icons:[]},d=p.length),u.icons.push(p)}),r.push(u),r};function da(e){if(typeof e=="string"){const t=$n(e);if(t)return t.path}return"/"}const ha=(e,t,n)=>{if(!Ar){n("abort",424);return}let r=da(t.provider);switch(t.type){case"icons":{const s=t.prefix,d=t.icons.join(","),p=new URLSearchParams({icons:d});r+=s+".json?"+p.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;Ar(e+r).then(s=>{const u=s.status;if(u!==200){setTimeout(()=>{n(ca(u)?"abort":"next",u)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},fa={prepare:ua,send:ha};function pa(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,u=i.prefix,d=i.name,p=n[s]||(n[s]=Object.create(null)),g=p[u]||(p[u]=Ue(s,u));let f;d in g.icons?f=t.loaded:u===""||g.missing.has(d)?f=t.missing:f=t.pending;const y={provider:s,prefix:u,name:d};f.push(y)}),t}function Si(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function ma(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const u=s.icons,d=u.pending.length;u.pending=u.pending.filter(p=>{if(p.prefix!==i)return!0;const g=p.name;if(e.icons[g])u.loaded.push({provider:r,prefix:i,name:g});else if(e.missing.has(g))u.missing.push({provider:r,prefix:i,name:g});else return n=!0,!0;return!1}),u.pending.length!==d&&(n||Si([e],s.id),s.callback(u.loaded.slice(0),u.missing.slice(0),u.pending.slice(0),s.abort))})}))}let ga=0;function ba(e,t,n){const r=ga++,i=Si.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(u=>{(u.loaderCallbacks||(u.loaderCallbacks=[])).push(s)}),i}function ya(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?Vt(i,t,n):i;s&&r.push(s)}),r}var va={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function xa(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let u;if(e.random){let W=e.resources.slice(0);for(u=[];W.length>1;){const K=Math.floor(Math.random()*W.length);u.push(W[K]),W=W.slice(0,K).concat(W.slice(K+1))}u=u.concat(W)}else u=e.resources.slice(s).concat(e.resources.slice(0,s));const d=Date.now();let p="pending",g=0,f,y=null,w=[],x=[];typeof r=="function"&&x.push(r);function S(){y&&(clearTimeout(y),y=null)}function j(){p==="pending"&&(p="aborted"),S(),w.forEach(W=>{W.status==="pending"&&(W.status="aborted")}),w=[]}function R(W,K){K&&(x=[]),typeof W=="function"&&x.push(W)}function T(){return{startTime:d,payload:t,status:p,queriesSent:g,queriesPending:w.length,subscribe:R,abort:j}}function O(){p="failed",x.forEach(W=>{W(void 0,f)})}function P(){w.forEach(W=>{W.status==="pending"&&(W.status="aborted")}),w=[]}function A(W,K,ee){const ie=K!=="success";switch(w=w.filter(H=>H!==W),p){case"pending":break;case"failed":if(ie||!e.dataAfterTimeout)return;break;default:return}if(K==="abort"){f=ee,O();return}if(ie){f=ee,w.length||(u.length?G():O());return}if(S(),P(),!e.random){const H=e.resources.indexOf(W.resource);H!==-1&&H!==e.index&&(e.index=H)}p="completed",x.forEach(H=>{H(ee)})}function G(){if(p!=="pending")return;S();const W=u.shift();if(W===void 0){if(w.length){y=setTimeout(()=>{S(),p==="pending"&&(P(),O())},e.timeout);return}O();return}const K={status:"pending",resource:W,callback:(ee,ie)=>{A(K,ee,ie)}};w.push(K),g++,y=setTimeout(G,e.rotate),n(W,t,K.callback)}return setTimeout(G),T}function ki(e){const t={...va,...e};let n=[];function r(){n=n.filter(d=>d().status==="pending")}function i(d,p,g){const f=xa(t,d,p,(y,w)=>{r(),g&&g(y,w)});return n.push(f),f}function s(d){return n.find(p=>d(p))||null}return{query:i,find:s,setIndex:d=>{t.index=d},getIndex:()=>t.index,cleanup:r}}function Br(){}const cn=Object.create(null);function wa(e){if(!cn[e]){const t=$n(e);if(!t)return;const n=ki(t),r={config:t,redundancy:n};cn[e]=r}return cn[e]}function Sa(e,t,n){let r,i;if(typeof e=="string"){const s=kn(e);if(!s)return n(void 0,424),Br;i=s.send;const u=wa(e);u&&(r=u.redundancy)}else{const s=Bn(e);if(s){r=ki(s);const u=e.resources?e.resources[0]:"",d=kn(u);d&&(i=d.send)}}return!r||!i?(n(void 0,424),Br):r.query(t,i,n)().abort}const Wr="iconify2",xt="iconify",ji=xt+"-count",$r=xt+"-version",Ti=36e5,ka=168;function jn(e,t){try{return e.getItem(t)}catch{}}function Hn(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Hr(e,t){try{e.removeItem(t)}catch{}}function Tn(e,t){return Hn(e,ji,t.toString())}function On(e){return parseInt(jn(e,ji))||0}const qt={local:!0,session:!0},Oi={local:new Set,session:new Set};let Kn=!1;function ja(e){Kn=e}let _t=typeof window>"u"?{}:window;function Ci(e){const t=e+"Storage";try{if(_t&&_t[t]&&typeof _t[t].length=="number")return _t[t]}catch{}qt[e]=!1}function Ei(e,t){const n=Ci(e);if(!n)return;const r=jn(n,$r);if(r!==Wr){if(r){const d=On(n);for(let p=0;p<d;p++)Hr(n,xt+p.toString())}Hn(n,$r,Wr),Tn(n,0);return}const i=Math.floor(Date.now()/Ti)-ka,s=d=>{const p=xt+d.toString(),g=jn(n,p);if(typeof g=="string"){try{const f=JSON.parse(g);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>i&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&t(f,d))return!0}catch{}Hr(n,p)}};let u=On(n);for(let d=u-1;d>=0;d--)s(d)||(d===u-1?(u--,Tn(n,u)):Oi[e].add(d))}function Ii(){if(!Kn){ja(!0);for(const e in qt)Ei(e,t=>{const n=t.data,r=t.provider,i=n.prefix,s=Ue(r,i);if(!An(s,n).length)return!1;const u=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,u):u,!0})}}function Ta(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in qt)Ei(r,i=>{const s=i.data;return i.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Oa(e,t){Kn||Ii();function n(r){let i;if(!qt[r]||!(i=Ci(r)))return;const s=Oi[r];let u;if(s.size)s.delete(u=Array.from(s).shift());else if(u=On(i),!Tn(i,u+1))return;const d={cached:Math.floor(Date.now()/Ti),provider:e.provider,data:t};return Hn(i,xt+u.toString(),JSON.stringify(d))}t.lastModified&&!Ta(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Kr(){}function Ca(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ma(e)}))}function Ea(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;delete e.iconsToLoad;let s;if(!i||!(s=kn(n)))return;s.prepare(n,r,i).forEach(d=>{Sa(n,d,p=>{if(typeof p!="object")d.icons.forEach(g=>{e.missing.add(g)});else try{const g=An(e,p);if(!g.length)return;const f=e.pendingIcons;f&&g.forEach(y=>{f.delete(y)}),Oa(e,p)}catch(g){console.error(g)}Ca(e)})})}))}const Ia=(e,t)=>{const n=ya(e,!0,vi()),r=pa(n);if(!r.pending.length){let p=!0;return t&&setTimeout(()=>{p&&t(r.loaded,r.missing,r.pending,Kr)}),()=>{p=!1}}const i=Object.create(null),s=[];let u,d;return r.pending.forEach(p=>{const{provider:g,prefix:f}=p;if(f===d&&g===u)return;u=g,d=f,s.push(Ue(g,f));const y=i[g]||(i[g]=Object.create(null));y[f]||(y[f]=[])}),r.pending.forEach(p=>{const{provider:g,prefix:f,name:y}=p,w=Ue(g,f),x=w.pendingIcons||(w.pendingIcons=new Set);x.has(y)||(x.add(y),i[g][f].push(y))}),s.forEach(p=>{const{provider:g,prefix:f}=p;i[g][f].length&&Ea(p,i[g][f])}),t?ba(t,r,s):Kr};function _a(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in xi?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const Ra=/[\s,]+/;function Pa(e,t){t.split(Ra).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Ma(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function La(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Da(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function za(e){return"data:image/svg+xml,"+Da(e)}function Fa(e){return'url("'+za(e)+'")'}let bt;function Na(){try{bt=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{bt=null}}function Aa(e){return bt===void 0&&Na(),bt?bt.createHTML(e):e}const _i={...wi,inline:!1},Ba={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Wa={display:"inline-block"},Cn={backgroundColor:"currentColor"},Ri={backgroundColor:"transparent"},Ur={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Vr={WebkitMask:Cn,mask:Cn,background:Ri};for(const e in Vr){const t=Vr[e];for(const n in Ur)t[e+n]=Ur[n]}const $a={..._i,inline:!0};function qr(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Ha=(e,t,n,r)=>{const i=n?$a:_i,s=_a(i,t),u=t.mode||"svg",d={},p=t.style||{},g={...u==="svg"?Ba:{},ref:r};for(let T in t){const O=t[T];if(O!==void 0)switch(T){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":s[T]=O===!0||O==="true"||O===1;break;case"flip":typeof O=="string"&&Pa(s,O);break;case"color":d.color=O;break;case"rotate":typeof O=="string"?s[T]=Ma(O):typeof O=="number"&&(s[T]=O);break;case"ariaHidden":case"aria-hidden":O!==!0&&O!=="true"&&delete g["aria-hidden"];break;default:i[T]===void 0&&(g[T]=O)}}const f=ea(e,s),y=f.attributes;if(s.inline&&(d.verticalAlign="-0.125em"),u==="svg"){g.style={...d,...p},Object.assign(g,y);let T=0,O=t.id;return typeof O=="string"&&(O=O.replace(/-/g,"_")),g.dangerouslySetInnerHTML={__html:Aa(ia(f.body,O?()=>O+"ID"+T++:"iconifyReact"))},Ne.createElement("svg",g)}const{body:w,width:x,height:S}=e,j=u==="mask"||(u==="bg"?!1:w.indexOf("currentColor")!==-1),R=La(w,{...y,width:x+"",height:S+""});return g.style={...d,"--svg":Fa(R),width:qr(y.width),height:qr(y.height),...Wa,...j?Cn:Ri,...p},Ne.createElement("span",g)};vi(!0);oa("",fa);if(typeof document<"u"&&typeof window<"u"){Ii();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Ys(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;sa(n,i)||console.error(r)}catch{console.error(r)}}}}class Pi extends Ne.Component{constructor(t){super(t),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(t){this.state.icon!==t&&this.setState({icon:t})}_checkIcon(t){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(t||n.icon===null)&&this._setData({data:r});return}let i;if(typeof r!="string"||(i=Vt(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const s=Gs(i);if(!s){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),s!==null&&(this._loading={name:r,abort:Ia([i],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const u=["iconify"];i.prefix!==""&&u.push("iconify--"+i.prefix),i.provider!==""&&u.push("iconify--"+i.provider),this._setData({data:s,classes:u}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(t){t.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const t=this.props,n=this.state.icon;if(n===null)return t.children?t.children:Ne.createElement("span",{});let r=t;return n.classes&&(r={...t,className:(typeof t.className=="string"?t.className+" ":"")+n.classes.join(" ")}),Ha({...Nn,...n.data},r,t._inline,t._ref)}}const Le=Ne.forwardRef(function(t,n){const r={...t,_ref:n,_inline:!1};return Ne.createElement(Pi,r)});Ne.forwardRef(function(t,n){const r={...t,_ref:n,_inline:!0};return Ne.createElement(Pi,r)});var Un={},Ka=Ut;Object.defineProperty(Un,"__esModule",{value:!0});var Mi=Un.default=void 0,Ua=Ka(Kt()),Va=o;Mi=Un.default=(0,Ua.default)((0,Va.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");const Li={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 18a3.5 3.5 0 0 0 0-7h-1A5 4.5 0 0 0 7 9a4.6 4.4 0 0 0-2.1 8.4M12 13v9m-3-3l3 3l3-3"/>'};var Di={exports:{}};(function(e,t){(function(n,r){e.exports=r(L)})(ht,n=>(()=>{var r={703:(d,p,g)=>{var f=g(414);function y(){}function w(){}w.resetWarningCache=y,d.exports=function(){function x(R,T,O,P,A,G){if(G!==f){var W=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw W.name="Invariant Violation",W}}function S(){return x}x.isRequired=x;var j={array:x,bool:x,func:x,number:x,object:x,string:x,symbol:x,any:x,arrayOf:S,element:x,elementType:x,instanceOf:S,node:x,objectOf:S,oneOf:S,oneOfType:S,shape:S,exact:S,checkPropTypes:w,resetWarningCache:y};return j.PropTypes=j,j}},697:(d,p,g)=>{d.exports=g(703)()},414:d=>{d.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},590:d=>{var p=typeof Element<"u",g=typeof Map=="function",f=typeof Set=="function",y=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function w(x,S){if(x===S)return!0;if(x&&S&&typeof x=="object"&&typeof S=="object"){if(x.constructor!==S.constructor)return!1;var j,R,T,O;if(Array.isArray(x)){if((j=x.length)!=S.length)return!1;for(R=j;R--!=0;)if(!w(x[R],S[R]))return!1;return!0}if(g&&x instanceof Map&&S instanceof Map){if(x.size!==S.size)return!1;for(O=x.entries();!(R=O.next()).done;)if(!S.has(R.value[0]))return!1;for(O=x.entries();!(R=O.next()).done;)if(!w(R.value[1],S.get(R.value[0])))return!1;return!0}if(f&&x instanceof Set&&S instanceof Set){if(x.size!==S.size)return!1;for(O=x.entries();!(R=O.next()).done;)if(!S.has(R.value[0]))return!1;return!0}if(y&&ArrayBuffer.isView(x)&&ArrayBuffer.isView(S)){if((j=x.length)!=S.length)return!1;for(R=j;R--!=0;)if(x[R]!==S[R])return!1;return!0}if(x.constructor===RegExp)return x.source===S.source&&x.flags===S.flags;if(x.valueOf!==Object.prototype.valueOf)return x.valueOf()===S.valueOf();if(x.toString!==Object.prototype.toString)return x.toString()===S.toString();if((j=(T=Object.keys(x)).length)!==Object.keys(S).length)return!1;for(R=j;R--!=0;)if(!Object.prototype.hasOwnProperty.call(S,T[R]))return!1;if(p&&x instanceof Element)return!1;for(R=j;R--!=0;)if((T[R]!=="_owner"&&T[R]!=="__v"&&T[R]!=="__o"||!x.$$typeof)&&!w(x[T[R]],S[T[R]]))return!1;return!0}return x!=x&&S!=S}d.exports=function(x,S){try{return w(x,S)}catch(j){if((j.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw j}}},359:d=>{d.exports=n}},i={};function s(d){var p=i[d];if(p!==void 0)return p.exports;var g=i[d]={exports:{}};return r[d](g,g.exports,s),g.exports}s.n=d=>{var p=d&&d.__esModule?()=>d.default:()=>d;return s.d(p,{a:p}),p},s.d=(d,p)=>{for(var g in p)s.o(p,g)&&!s.o(d,g)&&Object.defineProperty(d,g,{enumerable:!0,get:p[g]})},s.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),s.o=(d,p)=>Object.prototype.hasOwnProperty.call(d,p),s.r=d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})};var u={};return(()=>{function d(h){var a,m,b="";if(typeof h=="string"||typeof h=="number")b+=h;else if(typeof h=="object")if(Array.isArray(h))for(a=0;a<h.length;a++)h[a]&&(m=d(h[a]))&&(b&&(b+=" "),b+=m);else for(a in h)h[a]&&(b&&(b+=" "),b+=a);return b}function p(){for(var h,a,m=0,b="";m<arguments.length;)(h=arguments[m++])&&(a=d(h))&&(b&&(b+=" "),b+=a);return b}s.r(u),s.d(u,{default:()=>_o});var g=s(359),f=s.n(g);const y=function(h){var a=typeof h;return h!=null&&(a=="object"||a=="function")},w=typeof ht=="object"&&ht&&ht.Object===Object&&ht;var x=typeof self=="object"&&self&&self.Object===Object&&self;const S=w||x||Function("return this")(),j=function(){return S.Date.now()};var R=/\s/,T=/^\s+/;const O=function(h){return h&&h.slice(0,function(a){for(var m=a.length;m--&&R.test(a.charAt(m)););return m}(h)+1).replace(T,"")},P=S.Symbol;var A=Object.prototype,G=A.hasOwnProperty,W=A.toString,K=P?P.toStringTag:void 0,ee=Object.prototype.toString,ie=P?P.toStringTag:void 0;const H=function(h){return h==null?h===void 0?"[object Undefined]":"[object Null]":ie&&ie in Object(h)?function(a){var m=G.call(a,K),b=a[K];try{a[K]=void 0;var I=!0}catch{}var B=W.call(a);return I&&(m?a[K]=b:delete a[K]),B}(h):function(a){return ee.call(a)}(h)};var Ee=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ke=/^0o[0-7]+$/i,be=parseInt;const ye=function(h){if(typeof h=="number")return h;if(function(b){return typeof b=="symbol"||function(I){return I!=null&&typeof I=="object"}(b)&&H(b)=="[object Symbol]"}(h))return NaN;if(y(h)){var a=typeof h.valueOf=="function"?h.valueOf():h;h=y(a)?a+"":a}if(typeof h!="string")return h===0?h:+h;h=O(h);var m=ge.test(h);return m||ke.test(h)?be(h.slice(2),m?2:8):Ee.test(h)?NaN:+h};var N=Math.max,Q=Math.min;const he=function(h,a,m){var b,I,B,J,c,l,v=0,C=!1,_=!1,E=!0;if(typeof h!="function")throw new TypeError("Expected a function");function V($){var Y=b,ne=I;return b=I=void 0,v=$,J=h.apply(ne,Y)}function U($){return v=$,c=setTimeout(D,a),C?V($):J}function X($){var Y=$-l;return l===void 0||Y>=a||Y<0||_&&$-v>=B}function D(){var $=j();if(X($))return z($);c=setTimeout(D,function(Y){var ne=a-(Y-l);return _?Q(ne,B-(Y-v)):ne}($))}function z($){return c=void 0,E&&b?V($):(b=I=void 0,J)}function F(){var $=j(),Y=X($);if(b=arguments,I=this,l=$,Y){if(c===void 0)return U(l);if(_)return clearTimeout(c),c=setTimeout(D,a),V(l)}return c===void 0&&(c=setTimeout(D,a)),J}return a=ye(a)||0,y(m)&&(C=!!m.leading,B=(_="maxWait"in m)?N(ye(m.maxWait)||0,a):B,E="trailing"in m?!!m.trailing:E),F.cancel=function(){c!==void 0&&clearTimeout(c),v=0,b=l=I=c=void 0},F.flush=function(){return c===void 0?J:z(j())},F},se=function(h,a,m){var b=!0,I=!0;if(typeof h!="function")throw new TypeError("Expected a function");return y(m)&&(b="leading"in m?!!m.leading:b,I="trailing"in m?!!m.trailing:I),he(h,a,{leading:b,maxWait:a,trailing:I})};var oe=s(590),te=s.n(oe),me=function(){if(typeof Map<"u")return Map;function h(a,m){var b=-1;return a.some(function(I,B){return I[0]===m&&(b=B,!0)}),b}return function(){function a(){this.__entries__=[]}return Object.defineProperty(a.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),a.prototype.get=function(m){var b=h(this.__entries__,m),I=this.__entries__[b];return I&&I[1]},a.prototype.set=function(m,b){var I=h(this.__entries__,m);~I?this.__entries__[I][1]=b:this.__entries__.push([m,b])},a.prototype.delete=function(m){var b=this.__entries__,I=h(b,m);~I&&b.splice(I,1)},a.prototype.has=function(m){return!!~h(this.__entries__,m)},a.prototype.clear=function(){this.__entries__.splice(0)},a.prototype.forEach=function(m,b){b===void 0&&(b=null);for(var I=0,B=this.__entries__;I<B.length;I++){var J=B[I];m.call(b,J[1],J[0])}},a}()}(),Ie=typeof window<"u"&&typeof document<"u"&&window.document===document,_e=s.g!==void 0&&s.g.Math===Math?s.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),kt=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(_e):function(h){return setTimeout(function(){return h(Date.now())},1e3/60)},oo=["top","right","bottom","left","width","height","size","weight"],so=typeof MutationObserver<"u",ao=function(){function h(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(a,m){var b=!1,I=!1,B=0;function J(){b&&(b=!1,a()),I&&l()}function c(){kt(J)}function l(){var v=Date.now();if(b){if(v-B<2)return;I=!0}else b=!0,I=!1,setTimeout(c,20);B=v}return l}(this.refresh.bind(this))}return h.prototype.addObserver=function(a){~this.observers_.indexOf(a)||this.observers_.push(a),this.connected_||this.connect_()},h.prototype.removeObserver=function(a){var m=this.observers_,b=m.indexOf(a);~b&&m.splice(b,1),!m.length&&this.connected_&&this.disconnect_()},h.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},h.prototype.updateObservers_=function(){var a=this.observers_.filter(function(m){return m.gatherActive(),m.hasActive()});return a.forEach(function(m){return m.broadcastActive()}),a.length>0},h.prototype.connect_=function(){Ie&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),so?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},h.prototype.disconnect_=function(){Ie&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},h.prototype.onTransitionEnd_=function(a){var m=a.propertyName,b=m===void 0?"":m;oo.some(function(I){return!!~b.indexOf(I)})&&this.refresh()},h.getInstance=function(){return this.instance_||(this.instance_=new h),this.instance_},h.instance_=null,h}(),tr=function(h,a){for(var m=0,b=Object.keys(a);m<b.length;m++){var I=b[m];Object.defineProperty(h,I,{value:a[I],enumerable:!1,writable:!1,configurable:!0})}return h},Ge=function(h){return h&&h.ownerDocument&&h.ownerDocument.defaultView||_e},nr=Tt(0,0,0,0);function jt(h){return parseFloat(h)||0}function rr(h){for(var a=[],m=1;m<arguments.length;m++)a[m-1]=arguments[m];return a.reduce(function(b,I){return b+jt(h["border-"+I+"-width"])},0)}var lo=typeof SVGGraphicsElement<"u"?function(h){return h instanceof Ge(h).SVGGraphicsElement}:function(h){return h instanceof Ge(h).SVGElement&&typeof h.getBBox=="function"};function co(h){return Ie?lo(h)?function(a){var m=a.getBBox();return Tt(0,0,m.width,m.height)}(h):function(a){var m=a.clientWidth,b=a.clientHeight;if(!m&&!b)return nr;var I=Ge(a).getComputedStyle(a),B=function(E){for(var V={},U=0,X=["top","right","bottom","left"];U<X.length;U++){var D=X[U],z=E["padding-"+D];V[D]=jt(z)}return V}(I),J=B.left+B.right,c=B.top+B.bottom,l=jt(I.width),v=jt(I.height);if(I.boxSizing==="border-box"&&(Math.round(l+J)!==m&&(l-=rr(I,"left","right")+J),Math.round(v+c)!==b&&(v-=rr(I,"top","bottom")+c)),!function(E){return E===Ge(E).document.documentElement}(a)){var C=Math.round(l+J)-m,_=Math.round(v+c)-b;Math.abs(C)!==1&&(l-=C),Math.abs(_)!==1&&(v-=_)}return Tt(B.left,B.top,l,v)}(h):nr}function Tt(h,a,m,b){return{x:h,y:a,width:m,height:b}}var uo=function(){function h(a){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Tt(0,0,0,0),this.target=a}return h.prototype.isActive=function(){var a=co(this.target);return this.contentRect_=a,a.width!==this.broadcastWidth||a.height!==this.broadcastHeight},h.prototype.broadcastRect=function(){var a=this.contentRect_;return this.broadcastWidth=a.width,this.broadcastHeight=a.height,a},h}(),ho=function(h,a){var m,b,I,B,J,c,l,v=(b=(m=a).x,I=m.y,B=m.width,J=m.height,c=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,l=Object.create(c.prototype),tr(l,{x:b,y:I,width:B,height:J,top:I,right:b+B,bottom:J+I,left:b}),l);tr(this,{target:h,contentRect:v})},fo=function(){function h(a,m,b){if(this.activeObservations_=[],this.observations_=new me,typeof a!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=a,this.controller_=m,this.callbackCtx_=b}return h.prototype.observe=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(a instanceof Ge(a).Element))throw new TypeError('parameter 1 is not of type "Element".');var m=this.observations_;m.has(a)||(m.set(a,new uo(a)),this.controller_.addObserver(this),this.controller_.refresh())}},h.prototype.unobserve=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(a instanceof Ge(a).Element))throw new TypeError('parameter 1 is not of type "Element".');var m=this.observations_;m.has(a)&&(m.delete(a),m.size||this.controller_.removeObserver(this))}},h.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},h.prototype.gatherActive=function(){var a=this;this.clearActive(),this.observations_.forEach(function(m){m.isActive()&&a.activeObservations_.push(m)})},h.prototype.broadcastActive=function(){if(this.hasActive()){var a=this.callbackCtx_,m=this.activeObservations_.map(function(b){return new ho(b.target,b.broadcastRect())});this.callback_.call(a,m,a),this.clearActive()}},h.prototype.clearActive=function(){this.activeObservations_.splice(0)},h.prototype.hasActive=function(){return this.activeObservations_.length>0},h}(),ir=typeof WeakMap<"u"?new WeakMap:new me,or=function h(a){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var m=ao.getInstance(),b=new fo(a,m,this);ir.set(this,b)};["observe","unobserve","disconnect"].forEach(function(h){or.prototype[h]=function(){var a;return(a=ir.get(this))[h].apply(a,arguments)}});const sr=_e.ResizeObserver!==void 0?_e.ResizeObserver:or,Xe="Left",We="Right",Ye="Up",$e="Down",Qe={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Yt={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},ar="mousemove",lr="mouseup";function cr(h,a){if(a===0)return h;const m=Math.PI/180*a;return[h[0]*Math.cos(m)+h[1]*Math.sin(m),h[1]*Math.cos(m)-h[0]*Math.sin(m)]}function po(h){const{trackMouse:a}=h,m=g.useRef(Object.assign({},Yt)),b=g.useRef(Object.assign({},Qe)),I=g.useRef(Object.assign({},b.current));let B;for(B in I.current=Object.assign({},b.current),b.current=Object.assign(Object.assign({},Qe),h),Qe)b.current[B]===void 0&&(b.current[B]=Qe[B]);const[J,c]=g.useMemo(()=>function(l,v){const C=D=>{const z="touches"in D;z&&D.touches.length>1||l((F,$)=>{$.trackMouse&&!z&&(document.addEventListener(ar,_),document.addEventListener(lr,V));const{clientX:Y,clientY:ne}=z?D.touches[0]:D,ce=cr([Y,ne],$.rotationAngle);return $.onTouchStartOrOnMouseDown&&$.onTouchStartOrOnMouseDown({event:D}),Object.assign(Object.assign(Object.assign({},F),Yt),{initial:ce.slice(),xy:ce,start:D.timeStamp||0})})},_=D=>{l((z,F)=>{const $="touches"in D;if($&&D.touches.length>1)return z;if(D.timeStamp-z.start>F.swipeDuration)return z.swiping?Object.assign(Object.assign({},z),{swiping:!1}):z;const{clientX:Y,clientY:ne}=$?D.touches[0]:D,[ce,Se]=cr([Y,ne],F.rotationAngle),ve=ce-z.xy[0],fe=Se-z.xy[1],le=Math.abs(ve),re=Math.abs(fe),De=(D.timeStamp||0)-z.start,at=Math.sqrt(le*le+re*re)/(De||1),lt=[ve/(De||1),fe/(De||1)],Me=function(ct,et,ut,je){return ct>et?ut>0?We:Xe:je>0?$e:Ye}(le,re,ve,fe),He=typeof F.delta=="number"?F.delta:F.delta[Me.toLowerCase()]||Qe.delta;if(le<He&&re<He&&!z.swiping)return z;const Re={absX:le,absY:re,deltaX:ve,deltaY:fe,dir:Me,event:D,first:z.first,initial:z.initial,velocity:at,vxvy:lt};Re.first&&F.onSwipeStart&&F.onSwipeStart(Re),F.onSwiping&&F.onSwiping(Re);let Ze=!1;return(F.onSwiping||F.onSwiped||F[`onSwiped${Me}`])&&(Ze=!0),Ze&&F.preventScrollOnSwipe&&F.trackTouch&&D.cancelable&&D.preventDefault(),Object.assign(Object.assign({},z),{first:!1,eventData:Re,swiping:!0})})},E=D=>{l((z,F)=>{let $;if(z.swiping&&z.eventData){if(D.timeStamp-z.start<F.swipeDuration){$=Object.assign(Object.assign({},z.eventData),{event:D}),F.onSwiped&&F.onSwiped($);const Y=F[`onSwiped${$.dir}`];Y&&Y($)}}else F.onTap&&F.onTap({event:D});return F.onTouchEndOrOnMouseUp&&F.onTouchEndOrOnMouseUp({event:D}),Object.assign(Object.assign(Object.assign({},z),Yt),{eventData:$})})},V=D=>{document.removeEventListener(ar,_),document.removeEventListener(lr,V),E(D)},U=(D,z)=>{let F=()=>{};if(D&&D.addEventListener){const $=Object.assign(Object.assign({},Qe.touchEventOptions),z.touchEventOptions),Y=[["touchstart",C,$],["touchmove",_,Object.assign(Object.assign({},$),z.preventScrollOnSwipe?{passive:!1}:{})],["touchend",E,$]];Y.forEach(([ne,ce,Se])=>D.addEventListener(ne,ce,Se)),F=()=>Y.forEach(([ne,ce])=>D.removeEventListener(ne,ce))}return F},X={ref:D=>{D!==null&&l((z,F)=>{if(z.el===D)return z;const $={};return z.el&&z.el!==D&&z.cleanUpTouch&&(z.cleanUpTouch(),$.cleanUpTouch=void 0),F.trackTouch&&D&&($.cleanUpTouch=U(D,F)),Object.assign(Object.assign(Object.assign({},z),{el:D}),$)})}};return v.trackMouse&&(X.onMouseDown=C),[X,U]}(l=>m.current=l(m.current,b.current),{trackMouse:a}),[a]);return m.current=function(l,v,C,_){return v.trackTouch&&l.el?l.cleanUpTouch?v.preventScrollOnSwipe!==C.preventScrollOnSwipe||v.touchEventOptions.passive!==C.touchEventOptions.passive?(l.cleanUpTouch(),Object.assign(Object.assign({},l),{cleanUpTouch:_(l.el,v)})):l:Object.assign(Object.assign({},l),{cleanUpTouch:_(l.el,v)}):(l.cleanUpTouch&&l.cleanUpTouch(),Object.assign(Object.assign({},l),{cleanUpTouch:void 0}))}(m.current,b.current,I.current,c),J}var k=s(697);function it(h){return it=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},it(h)}function ur(h,a){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(h);a&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(h,I).enumerable})),m.push.apply(m,b)}return m}function dr(h){for(var a=1;a<arguments.length;a++){var m=arguments[a]!=null?arguments[a]:{};a%2?ur(Object(m),!0).forEach(function(b){mo(h,b,m[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):ur(Object(m)).forEach(function(b){Object.defineProperty(h,b,Object.getOwnPropertyDescriptor(m,b))})}return h}function mo(h,a,m){return(a=function(b){var I=function(B,J){if(it(B)!=="object"||B===null)return B;var c=B[Symbol.toPrimitive];if(c!==void 0){var l=c.call(B,J);if(it(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(B)}(b,"string");return it(I)==="symbol"?I:String(I)}(a))in h?Object.defineProperty(h,a,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[a]=m,h}var go={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},Qt=f().memo(function(h){var a=dr(dr({},go),h),m=a.description,b=a.fullscreen,I=a.handleImageLoaded,B=a.isFullscreen,J=a.onImageError,c=a.original,l=a.originalAlt,v=a.originalHeight,C=a.originalWidth,_=a.originalTitle,E=a.sizes,V=a.srcSet,U=a.loading,X=B&&b||c;return f().createElement(f().Fragment,null,f().createElement("img",{className:"image-gallery-image",src:X,alt:l,srcSet:V,height:v,width:C,sizes:E,title:_,onLoad:function(D){return I(D,c)},onError:J,loading:U}),m&&f().createElement("span",{className:"image-gallery-description"},m))});Qt.displayName="Item",Qt.propTypes={description:k.string,fullscreen:k.string,handleImageLoaded:k.func.isRequired,isFullscreen:k.bool,onImageError:k.func.isRequired,original:k.string.isRequired,originalAlt:k.string,originalHeight:k.string,originalWidth:k.string,originalTitle:k.string,sizes:k.string,srcSet:k.string,loading:k.string};const bo=Qt;function ot(h){return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},ot(h)}function hr(h,a){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(h);a&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(h,I).enumerable})),m.push.apply(m,b)}return m}function fr(h){for(var a=1;a<arguments.length;a++){var m=arguments[a]!=null?arguments[a]:{};a%2?hr(Object(m),!0).forEach(function(b){yo(h,b,m[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):hr(Object(m)).forEach(function(b){Object.defineProperty(h,b,Object.getOwnPropertyDescriptor(m,b))})}return h}function yo(h,a,m){return(a=function(b){var I=function(B,J){if(ot(B)!=="object"||B===null)return B;var c=B[Symbol.toPrimitive];if(c!==void 0){var l=c.call(B,J);if(ot(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(B)}(b,"string");return ot(I)==="symbol"?I:String(I)}(a))in h?Object.defineProperty(h,a,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[a]=m,h}var vo={left:f().createElement("polyline",{points:"15 18 9 12 15 6"}),right:f().createElement("polyline",{points:"9 18 15 12 9 6"}),maximize:f().createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:f().createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:f().createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:f().createElement(f().Fragment,null,f().createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),f().createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},xo={strokeWidth:1,viewBox:"0 0 24 24"},pr=function(h){var a=fr(fr({},xo),h),m=a.strokeWidth,b=a.viewBox,I=a.icon;return f().createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:b,fill:"none",stroke:"currentColor",strokeWidth:m,strokeLinecap:"round",strokeLinejoin:"round"},vo[I])};pr.propTypes={strokeWidth:k.number,viewBox:k.string,icon:(0,k.oneOf)(["left","right","maximize","minimize","play","pause"]).isRequired};const Ot=pr;var Jt=f().memo(function(h){var a=h.isFullscreen,m=h.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:m,"aria-label":"Open Fullscreen"},f().createElement(Ot,{strokeWidth:2,icon:a?"minimize":"maximize"}))});Jt.displayName="Fullscreen",Jt.propTypes={isFullscreen:k.bool.isRequired,onClick:k.func.isRequired};const wo=Jt;var Zt=f().memo(function(h){var a=h.disabled,m=h.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:a,onClick:m,"aria-label":"Previous Slide"},f().createElement(Ot,{icon:"left",viewBox:"6 0 12 24"}))});Zt.displayName="LeftNav",Zt.propTypes={disabled:k.bool.isRequired,onClick:k.func.isRequired};const So=Zt;var en=f().memo(function(h){var a=h.disabled,m=h.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:a,onClick:m,"aria-label":"Next Slide"},f().createElement(Ot,{icon:"right",viewBox:"6 0 12 24"}))});en.displayName="RightNav",en.propTypes={disabled:k.bool.isRequired,onClick:k.func.isRequired};const ko=en;var tn=f().memo(function(h){var a=h.isPlaying,m=h.onClick;return f().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:m,"aria-label":"Play or Pause Slideshow"},f().createElement(Ot,{strokeWidth:2,icon:a?"pause":"play"}))});tn.displayName="PlayPause",tn.propTypes={isPlaying:k.bool.isRequired,onClick:k.func.isRequired};const jo=tn;function st(h){return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},st(h)}function nn(){return nn=Object.assign?Object.assign.bind():function(h){for(var a=1;a<arguments.length;a++){var m=arguments[a];for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(h[b]=m[b])}return h},nn.apply(this,arguments)}function mr(h,a){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(h);a&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(h,I).enumerable})),m.push.apply(m,b)}return m}function gr(h){for(var a=1;a<arguments.length;a++){var m=arguments[a]!=null?arguments[a]:{};a%2?mr(Object(m),!0).forEach(function(b){To(h,b,m[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):mr(Object(m)).forEach(function(b){Object.defineProperty(h,b,Object.getOwnPropertyDescriptor(m,b))})}return h}function To(h,a,m){return(a=function(b){var I=function(B,J){if(st(B)!=="object"||B===null)return B;var c=B[Symbol.toPrimitive];if(c!==void 0){var l=c.call(B,J);if(st(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(B)}(b,"string");return st(I)==="symbol"?I:String(I)}(a))in h?Object.defineProperty(h,a,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[a]=m,h}var Oo={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},br=function(h){var a=gr(gr({},Oo),h),m=a.children,b=a.className,I=po({delta:a.delta,onSwiping:a.onSwiping,onSwiped:a.onSwiped});return f().createElement("div",nn({},I,{className:b}),m)};br.propTypes={children:k.node.isRequired,className:k.string,delta:k.number,onSwiped:k.func,onSwiping:k.func};const yr=br;function Je(h){return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Je(h)}function vr(h,a){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(h);a&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(h,I).enumerable})),m.push.apply(m,b)}return m}function xr(h){for(var a=1;a<arguments.length;a++){var m=arguments[a]!=null?arguments[a]:{};a%2?vr(Object(m),!0).forEach(function(b){wr(h,b,m[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):vr(Object(m)).forEach(function(b){Object.defineProperty(h,b,Object.getOwnPropertyDescriptor(m,b))})}return h}function Co(h,a){for(var m=0;m<a.length;m++){var b=a[m];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,Sr(b.key),b)}}function rn(h,a){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,b){return m.__proto__=b,m},rn(h,a)}function Eo(h,a){if(a&&(Je(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ue(h)}function ue(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function Ct(h){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Ct(h)}function wr(h,a,m){return(a=Sr(a))in h?Object.defineProperty(h,a,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[a]=m,h}function Sr(h){var a=function(m,b){if(Je(m)!=="object"||m===null)return m;var I=m[Symbol.toPrimitive];if(I!==void 0){var B=I.call(m,b);if(Je(B)!=="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(m)}(h,"string");return Je(a)==="symbol"?a:String(a)}var kr=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],Io=(0,k.arrayOf)((0,k.shape)({srcSet:k.string,media:k.string}));function jr(h){var a=parseInt(h.keyCode||h.which||0,10);return a===66||a===62}var on=function(h){(function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&rn(c,l)})(J,h);var a,m,b,I,B=(b=J,I=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var c,l=Ct(b);if(I){var v=Ct(this).constructor;c=Reflect.construct(l,arguments,v)}else c=l.apply(this,arguments);return Eo(this,c)});function J(c){var l;return function(v,C){if(!(v instanceof C))throw new TypeError("Cannot call a class as a function")}(this,J),wr(ue(l=B.call(this,c)),"onBulletClick",function(v,C){var _=l.props,E=_.onBulletClick,V=_.items,U=l.state.currentIndex;v.target.blur(),U!==C&&(V.length===2?l.slideToIndexWithStyleReset(C,v):l.slideToIndex(C,v)),E&&E(v,C)}),l.state={currentIndex:c.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(c.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},l.loadedImages={},l.imageGallery=f().createRef(),l.thumbnailsWrapper=f().createRef(),l.thumbnails=f().createRef(),l.imageGallerySlideWrapper=f().createRef(),l.handleImageLoaded=l.handleImageLoaded.bind(ue(l)),l.handleKeyDown=l.handleKeyDown.bind(ue(l)),l.handleMouseDown=l.handleMouseDown.bind(ue(l)),l.handleResize=l.handleResize.bind(ue(l)),l.handleTouchMove=l.handleTouchMove.bind(ue(l)),l.handleOnSwiped=l.handleOnSwiped.bind(ue(l)),l.handleScreenChange=l.handleScreenChange.bind(ue(l)),l.handleSwiping=l.handleSwiping.bind(ue(l)),l.handleThumbnailSwiping=l.handleThumbnailSwiping.bind(ue(l)),l.handleOnThumbnailSwiped=l.handleOnThumbnailSwiped.bind(ue(l)),l.onThumbnailMouseLeave=l.onThumbnailMouseLeave.bind(ue(l)),l.handleImageError=l.handleImageError.bind(ue(l)),l.pauseOrPlay=l.pauseOrPlay.bind(ue(l)),l.renderThumbInner=l.renderThumbInner.bind(ue(l)),l.renderItem=l.renderItem.bind(ue(l)),l.slideLeft=l.slideLeft.bind(ue(l)),l.slideRight=l.slideRight.bind(ue(l)),l.toggleFullScreen=l.toggleFullScreen.bind(ue(l)),l.togglePlay=l.togglePlay.bind(ue(l)),l.unthrottledSlideToIndex=l.slideToIndex,l.slideToIndex=se(l.unthrottledSlideToIndex,c.slideDuration,{trailing:!1}),c.lazyLoad&&(l.lazyLoaded=[]),l}return a=J,m=[{key:"componentDidMount",value:function(){var c=this.props,l=c.autoPlay,v=c.useWindowKeyDown;l&&this.play(),v?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),window.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(c,l){var v=this.props,C=v.items,_=v.lazyLoad,E=v.slideDuration,V=v.slideInterval,U=v.startIndex,X=v.thumbnailPosition,D=v.showThumbnails,z=v.useWindowKeyDown,F=this.state,$=F.currentIndex,Y=F.isPlaying,ne=c.items.length!==C.length,ce=!te()(c.items,C),Se=c.startIndex!==U,ve=c.thumbnailPosition!==X,fe=c.showThumbnails!==D;V===c.slideInterval&&E===c.slideDuration||Y&&(this.pause(),this.play()),ve&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),fe&&D&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),fe&&!D&&this.removeThumbnailsResizeObserver(),(ne||fe)&&this.handleResize(),l.currentIndex!==$&&this.slideThumbnailBar(),c.slideDuration!==E&&(this.slideToIndex=se(this.unthrottledSlideToIndex,E,{trailing:!1})),!_||c.lazyLoad&&!ce||(this.lazyLoaded=[]),z!==c.useWindowKeyDown&&(z?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(Se||ce)&&this.setState({currentIndex:U,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var c=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("touchmove",this.handleTouchMove),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),c?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var c=this,l=this.state,v=l.currentIndex,C=l.isTransitioning,_=this.props,E=_.onSlide,V=_.slideDuration;this.transitionTimer=window.setTimeout(function(){C&&(c.setState({isTransitioning:!C,isSwipingThumbnail:!1}),E&&E(v))},V+50)}},{key:"onThumbnailClick",value:function(c,l){var v=this.props,C=v.onThumbnailClick,_=v.items,E=this.state.currentIndex;c.target.parentNode.parentNode.blur(),E!==l&&(_.length===2?this.slideToIndexWithStyleReset(l,c):this.slideToIndex(l,c)),C&&C(c,l)}},{key:"onThumbnailMouseOver",value:function(c,l){var v=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout(function(){v.slideToIndex(l),v.pause()},300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var c=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,c&&this.play()}}},{key:"setThumbsTranslate",value:function(c){this.setState({thumbsTranslate:c})}},{key:"setModalFullscreen",value:function(c){var l=this.props.onScreenChange;this.setState({modalFullscreen:c}),l&&l(c)}},{key:"getThumbsTranslate",value:function(c){var l,v=this.props,C=v.disableThumbnailScroll,_=v.items,E=this.state,V=E.thumbnailsWrapperWidth,U=E.thumbnailsWrapperHeight,X=this.thumbnails&&this.thumbnails.current;if(C)return 0;if(X){if(this.isThumbnailVertical()){if(X.scrollHeight<=U)return 0;l=X.scrollHeight-U}else{if(X.scrollWidth<=V||V<=0)return 0;l=X.scrollWidth-V}return c*(l/(_.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(c){switch(c){case"left":c=" ".concat("image-gallery-thumbnails-left");break;case"right":c=" ".concat("image-gallery-thumbnails-right");break;case"bottom":c=" ".concat("image-gallery-thumbnails-bottom");break;case"top":c=" ".concat("image-gallery-thumbnails-top")}return c}},{key:"getAlignmentClassName",value:function(c){var l=this.state.currentIndex,v=this.props,C=v.infinite,_=v.items,E="",V="image-gallery-left",U="image-gallery-right";switch(c){case l-1:E=" ".concat(V);break;case l:E=" ".concat("image-gallery-center");break;case l+1:E=" ".concat(U)}return _.length>=3&&C&&(c===0&&l===_.length-1?E=" ".concat(U):c===_.length-1&&l===0&&(E=" ".concat(V))),E}},{key:"getTranslateXForTwoSlide",value:function(c){var l=this.state,v=l.currentIndex,C=l.currentSlideOffset,_=l.previousIndex,E=v!==_,V=c===0&&_===0,U=c===1&&_===1,X=c===0&&v===1,D=c===1&&v===0,z=C===0,F=-100*v+100*c+C;return C>0?this.direction="left":C<0&&(this.direction="right"),D&&C>0&&(F=-100+C),X&&C<0&&(F=100+C),E?V&&z&&this.direction==="left"?F=100:U&&z&&this.direction==="right"&&(F=-100):(D&&z&&this.direction==="left"&&(F=-100),X&&z&&this.direction==="right"&&(F=100)),F}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(c){var l=this.state,v=l.currentIndex,C=l.currentSlideOffset,_=l.slideStyle,E=this.props,V=E.infinite,U=E.items,X=E.useTranslate3D,D=E.isRTL,z=-100*v,F=U.length-1,$=(z+100*c)*(D?-1:1)+C;V&&U.length>2&&(v===0&&c===F?$=-100*(D?-1:1)+C:v===F&&c===0&&($=100*(D?-1:1)+C)),V&&U.length===2&&($=this.getTranslateXForTwoSlide(c));var Y="translate(".concat($,"%, 0)");return X&&(Y="translate3d(".concat($,"%, 0, 0)")),xr({display:this.isSlideVisible(c)?"inherit":"none",WebkitTransform:Y,MozTransform:Y,msTransform:Y,OTransform:Y,transform:Y},_)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var c,l=this.props,v=l.useTranslate3D,C=l.isRTL,_=this.state,E=_.thumbsTranslate,V=_.thumbsStyle,U=C?-1*E:E;return this.isThumbnailVertical()?(c="translate(0, ".concat(E,"px)"),v&&(c="translate3d(0, ".concat(E,"px, 0)"))):(c="translate(".concat(U,"px, 0)"),v&&(c="translate3d(".concat(U,"px, 0, 0)"))),xr({WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,transform:c},V)}},{key:"getSlideItems",value:function(){var c=this,l=this.state.currentIndex,v=this.props,C=v.items,_=v.slideOnThumbnailOver,E=v.onClick,V=v.lazyLoad,U=v.onTouchMove,X=v.onTouchEnd,D=v.onTouchStart,z=v.onMouseOver,F=v.onMouseLeave,$=v.renderItem,Y=v.renderThumbInner,ne=v.showThumbnails,ce=v.showBullets,Se=[],ve=[],fe=[];return C.forEach(function(le,re){var De=c.getAlignmentClassName(re),at=le.originalClass?" ".concat(le.originalClass):"",lt=le.thumbnailClass?" ".concat(le.thumbnailClass):"",Me=le.renderItem||$||c.renderItem,He=le.renderThumbInner||Y||c.renderThumbInner,Re=!V||De||c.lazyLoaded[re];Re&&V&&!c.lazyLoaded[re]&&(c.lazyLoaded[re]=!0);var Ze=c.getSlideStyle(re),ct=f().createElement("div",{"aria-label":"Go to Slide ".concat(re+1),key:"slide-".concat(re),tabIndex:"-1",className:"image-gallery-slide ".concat(De," ").concat(at),style:Ze,onClick:E,onKeyUp:c.handleSlideKeyUp,onTouchMove:U,onTouchEnd:X,onTouchStart:D,onMouseOver:z,onFocus:z,onMouseLeave:F,role:"button"},Re?Me(le):f().createElement("div",{style:{height:"100%"}}));if(Se.push(ct),ne&&le.thumbnail){var et=p("image-gallery-thumbnail",lt,{active:l===re});ve.push(f().createElement("button",{key:"thumbnail-".concat(re),type:"button",tabIndex:"0","aria-pressed":l===re?"true":"false","aria-label":"Go to Slide ".concat(re+1),className:et,onMouseLeave:_?c.onThumbnailMouseLeave:null,onMouseOver:function(je){return c.handleThumbnailMouseOver(je,re)},onFocus:function(je){return c.handleThumbnailMouseOver(je,re)},onKeyUp:function(je){return c.handleThumbnailKeyUp(je,re)},onClick:function(je){return c.onThumbnailClick(je,re)}},He(le)))}if(ce){var ut=p("image-gallery-bullet",le.bulletClass,{active:l===re});fe.push(f().createElement("button",{type:"button",key:"bullet-".concat(re),className:ut,onClick:function(je){return c.onBulletClick(je,re)},"aria-pressed":l===re?"true":"false","aria-label":"Go to Slide ".concat(re+1)}))}}),{slides:Se,thumbnails:ve,bullets:fe}}},{key:"ignoreIsTransitioning",value:function(){var c=this.props.items,l=this.state,v=l.previousIndex,C=l.currentIndex,_=c.length-1;return Math.abs(v-C)>1&&!(v===0&&C===_)&&!(v===_&&C===0)}},{key:"isFirstOrLastSlide",value:function(c){return c===this.props.items.length-1||c===0}},{key:"slideIsTransitioning",value:function(c){var l=this.state,v=l.isTransitioning,C=l.previousIndex,_=l.currentIndex;return v&&!(c===C||c===_)}},{key:"isSlideVisible",value:function(c){return!this.slideIsTransitioning(c)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(c)}},{key:"slideThumbnailBar",value:function(){var c=this.state,l=c.currentIndex,v=c.isSwipingThumbnail,C=-this.getThumbsTranslate(l);v||(l===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:C,thumbsSwipedTranslate:C}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){return this.props.infinite||this.canSlidePrevious()}},{key:"canSlideRight",value:function(){return this.props.infinite||this.canSlideNext()}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(c){var l=c.event,v=c.absX,C=c.dir,_=this.props,E=_.disableSwipe,V=_.stopPropagation,U=this.state,X=U.galleryWidth,D=U.isTransitioning,z=U.swipingUpDown,F=U.swipingLeftRight;if(C!==Ye&&C!==$e&&!z||F){if(C!==Xe&&C!==We||F||this.setState({swipingLeftRight:!0}),!E){var $=this.props.swipingTransitionDuration;if(V&&l.preventDefault(),D)this.setState({currentSlideOffset:0});else{var Y=C===We?1:-1,ne=v/X*100;Math.abs(ne)>=100&&(ne=100);var ce={transition:"transform ".concat($,"ms ease-out")};this.setState({currentSlideOffset:Y*ne,slideStyle:ce})}}}else z||this.setState({swipingUpDown:!0})}},{key:"handleThumbnailSwiping",value:function(c){var l=c.event,v=c.absX,C=c.absY,_=c.dir,E=this.props,V=E.stopPropagation,U=E.swipingThumbnailTransitionDuration,X=this.state,D=X.thumbsSwipedTranslate,z=X.thumbnailsWrapperHeight,F=X.thumbnailsWrapperWidth,$=X.swipingUpDown,Y=X.swipingLeftRight;if(this.isThumbnailVertical()){if((_===Xe||_===We||Y)&&!$)return void(Y||this.setState({swipingLeftRight:!0}));_!==Ye&&_!==$e||$||this.setState({swipingUpDown:!0})}else{if((_===Ye||_===$e||$)&&!Y)return void($||this.setState({swipingUpDown:!0}));_!==Xe&&_!==We||Y||this.setState({swipingLeftRight:!0})}var ne,ce,Se,ve,fe,le=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(ne=D+(_===$e?C:-C),ce=le.scrollHeight-z+20,Se=Math.abs(ne)>ce,ve=ne>20,fe=le.scrollHeight<=z):(ne=D+(_===We?v:-v),ce=le.scrollWidth-F+20,Se=Math.abs(ne)>ce,ve=ne>20,fe=le.scrollWidth<=F),!fe&&(_!==Xe&&_!==Ye||!Se)&&(_!==We&&_!==$e||!ve)){V&&l.stopPropagation();var re={transition:"transform ".concat(U,"ms ease-out")};this.setState({thumbsTranslate:ne,thumbsStyle:re})}}},{key:"handleOnThumbnailSwiped",value:function(){var c=this.state.thumbsTranslate,l=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:c,thumbsStyle:{transition:"all ".concat(l,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var c=this.state.currentSlideOffset,l=this.props.swipeThreshold;return Math.abs(c)>l}},{key:"resetSwipingDirection",value:function(){var c=this.state,l=c.swipingUpDown,v=c.swipingLeftRight;l&&this.setState({swipingUpDown:!1}),v&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(c){var l=c.event,v=c.dir,C=c.velocity,_=this.props,E=_.disableSwipe,V=_.stopPropagation,U=_.flickThreshold;if(!E){var X=this.props.isRTL;V&&l.stopPropagation(),this.resetSwipingDirection();var D=(v===Xe?1:-1)*(X?-1:1),z=C>U&&!(v===Ye||v===$e);this.handleOnSwipedTo(D,z)}}},{key:"handleOnSwipedTo",value:function(c,l){var v=this.state,C=v.currentIndex,_=v.isTransitioning,E=C;!this.sufficientSwipe()&&!l||_||(E+=c),(c===-1&&!this.canSlideLeft()||c===1&&!this.canSlideRight())&&(E=C),this.unthrottledSlideToIndex(E)}},{key:"handleTouchMove",value:function(c){this.state.swipingLeftRight&&c.preventDefault()}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(c){var l=this.props,v=l.disableKeyDown,C=l.useBrowserFullscreen,_=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!v)switch(parseInt(c.keyCode||c.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(c);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(c);break;case 27:_&&!C&&this.exitFullScreen()}}},{key:"handleImageError",value:function(c){var l=this.props.onErrorImageURL;l&&c.target.src.indexOf(l)===-1&&(c.target.src=l)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var c=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(c)))}},{key:"initSlideWrapperResizeObserver",value:function(c){var l=this;c&&!c.current||(this.resizeSlideWrapperObserver=new sr(he(function(v){v&&v.forEach(function(C){l.setState({thumbnailsWrapperWidth:C.contentRect.width},l.handleResize)})},50)),this.resizeSlideWrapperObserver.observe(c.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(c){var l=this;c&&!c.current||(this.resizeThumbnailWrapperObserver=new sr(he(function(v){v&&v.forEach(function(C){l.setState({thumbnailsWrapperHeight:C.contentRect.height},l.handleResize)})},50)),this.resizeThumbnailWrapperObserver.observe(c.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var c=this.props,l=c.onScreenChange,v=c.useBrowserFullscreen,C=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,_=this.imageGallery.current===C;l&&l(_),v&&this.setState({isFullscreen:_})}},{key:"slideToIndex",value:function(c,l){var v=this.state,C=v.currentIndex,_=v.isTransitioning,E=this.props,V=E.items,U=E.slideDuration,X=E.onBeforeSlide;if(!_){l&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var D=V.length-1,z=c;c<0?z=D:c>D&&(z=0),X&&z!==C&&X(z),this.setState({previousIndex:C,currentIndex:z,isTransitioning:z!==C,currentSlideOffset:0,slideStyle:{transition:"all ".concat(U,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(c){var l=this.props.isRTL;this.slideTo(c,l?"right":"left")}},{key:"slideRight",value:function(c){var l=this.props.isRTL;this.slideTo(c,l?"left":"right")}},{key:"slideTo",value:function(c,l){var v=this.state,C=v.currentIndex,_=v.isTransitioning,E=this.props.items,V=C+(l==="left"?-1:1);_||(E.length===2?this.slideToIndexWithStyleReset(V,c):this.slideToIndex(V,c))}},{key:"slideToIndexWithStyleReset",value:function(c,l){var v=this,C=this.state,_=C.currentIndex,E=C.currentSlideOffset;this.setState({currentSlideOffset:E+(_>c?.001:-.001),slideStyle:{transition:"none"}},function(){window.setTimeout(function(){return v.slideToIndex(c,l)},25)})}},{key:"handleThumbnailMouseOver",value:function(c,l){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(c,l)}},{key:"handleThumbnailKeyUp",value:function(c,l){jr(c)&&this.onThumbnailClick(c,l)}},{key:"handleSlideKeyUp",value:function(c){jr(c)&&(0,this.props.onClick)(c)}},{key:"isThumbnailVertical",value:function(){var c=this.props.thumbnailPosition;return c==="left"||c==="right"}},{key:"addScreenChangeEvent",value:function(){var c=this;kr.forEach(function(l){document.addEventListener(l,c.handleScreenChange)})}},{key:"removeScreenChangeEvent",value:function(){var c=this;kr.forEach(function(l){document.removeEventListener(l,c.handleScreenChange)})}},{key:"fullScreen",value:function(){var c=this.props.useBrowserFullscreen,l=this.imageGallery.current;c?l.requestFullscreen?l.requestFullscreen():l.msRequestFullscreen?l.msRequestFullscreen():l.mozRequestFullScreen?l.mozRequestFullScreen():l.webkitRequestFullscreen?l.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var c=this.state.isFullscreen,l=this.props.useBrowserFullscreen;c&&(l?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var c=this.props.infinite,l=this.state.currentIndex;c||this.canSlideRight()?this.slideToIndex(l+1):this.pause()}},{key:"play",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],l=this.props,v=l.onPlay,C=l.slideInterval,_=l.slideDuration,E=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(C,_)),v&&c&&v(E))}},{key:"pause",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],l=this.props.onPause,v=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),l&&c&&l(v))}},{key:"isImageLoaded",value:function(c){return!!this.loadedImages[c.original]||(this.loadedImages[c.original]=!0,!1)}},{key:"handleImageLoaded",value:function(c,l){var v=this.props.onImageLoad;!this.loadedImages[l]&&v&&(this.loadedImages[l]=!0,v(c))}},{key:"renderItem",value:function(c){var l=this.state.isFullscreen,v=this.props.onImageError||this.handleImageError;return f().createElement(bo,{description:c.description,fullscreen:c.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:l,onImageError:v,original:c.original,originalAlt:c.originalAlt,originalHeight:c.originalHeight,originalWidth:c.originalWidth,originalTitle:c.originalTitle,sizes:c.sizes,loading:c.loading,srcSet:c.srcSet})}},{key:"renderThumbInner",value:function(c){var l=this.props.onThumbnailError||this.handleImageError;return f().createElement("span",{className:"image-gallery-thumbnail-inner"},f().createElement("img",{className:"image-gallery-thumbnail-image",src:c.thumbnail,height:c.thumbnailHeight,width:c.thumbnailWidth,alt:c.thumbnailAlt,title:c.thumbnailTitle,loading:c.thumbnailLoading,onError:l}),c.thumbnailLabel&&f().createElement("div",{className:"image-gallery-thumbnail-label"},c.thumbnailLabel))}},{key:"render",value:function(){var c=this.state,l=c.currentIndex,v=c.isFullscreen,C=c.modalFullscreen,_=c.isPlaying,E=this.props,V=E.additionalClass,U=E.disableThumbnailSwipe,X=E.indexSeparator,D=E.isRTL,z=E.items,F=E.thumbnailPosition,$=E.renderFullscreenButton,Y=E.renderCustomControls,ne=E.renderLeftNav,ce=E.renderRightNav,Se=E.showBullets,ve=E.showFullscreenButton,fe=E.showIndex,le=E.showThumbnails,re=E.showNav,De=E.showPlayButton,at=E.renderPlayPauseButton,lt=this.getThumbnailStyle(),Me=this.getSlideItems(),He=Me.slides,Re=Me.thumbnails,Ze=Me.bullets,ct=p("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(F),{"image-gallery-rtl":D}),et=f().createElement("div",{ref:this.imageGallerySlideWrapper,className:ct},Y&&Y(),this.canSlide()?f().createElement(f().Fragment,null,re&&f().createElement(f().Fragment,null,ne(this.slideLeft,!this.canSlideLeft()),ce(this.slideRight,!this.canSlideRight())),f().createElement(yr,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},f().createElement("div",{className:"image-gallery-slides"},He))):f().createElement("div",{className:"image-gallery-slides"},He),De&&at(this.togglePlay,_),Se&&f().createElement("div",{className:"image-gallery-bullets"},f().createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},Ze)),ve&&$(this.toggleFullScreen,v),fe&&f().createElement("div",{className:"image-gallery-index"},f().createElement("span",{className:"image-gallery-index-current"},l+1),f().createElement("span",{className:"image-gallery-index-separator"},X),f().createElement("span",{className:"image-gallery-index-total"},z.length))),ut=p("image-gallery",V,{"fullscreen-modal":C}),je=p("image-gallery-content",this.getThumbnailPositionClassName(F),{fullscreen:v}),Ro=p("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(F),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&D},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!U},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!U});return f().createElement("div",{ref:this.imageGallery,className:ut,"aria-live":"polite"},f().createElement("div",{className:je},(F==="bottom"||F==="right")&&et,le&&Re.length>0?f().createElement(yr,{className:Ro,delta:0,onSwiping:!U&&this.handleThumbnailSwiping,onSwiped:!U&&this.handleOnThumbnailSwiped},f().createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},f().createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:lt,"aria-label":"Thumbnail Navigation"},Re))):null,(F==="top"||F==="left")&&et))}}],m&&Co(a.prototype,m),Object.defineProperty(a,"prototype",{writable:!1}),J}(f().Component);on.propTypes={flickThreshold:k.number,items:(0,k.arrayOf)((0,k.shape)({bulletClass:k.string,bulletOnClick:k.func,description:k.string,original:k.string,originalHeight:k.number,originalWidth:k.number,loading:k.string,thumbnailHeight:k.number,thumbnailWidth:k.number,thumbnailLoading:k.string,fullscreen:k.string,originalAlt:k.string,originalTitle:k.string,thumbnail:k.string,thumbnailAlt:k.string,thumbnailLabel:k.string,thumbnailTitle:k.string,originalClass:k.string,thumbnailClass:k.string,renderItem:k.func,renderThumbInner:k.func,imageSet:Io,srcSet:k.string,sizes:k.string})).isRequired,showNav:k.bool,autoPlay:k.bool,lazyLoad:k.bool,infinite:k.bool,showIndex:k.bool,showBullets:k.bool,showThumbnails:k.bool,showPlayButton:k.bool,showFullscreenButton:k.bool,disableThumbnailScroll:k.bool,disableKeyDown:k.bool,disableSwipe:k.bool,disableThumbnailSwipe:k.bool,useBrowserFullscreen:k.bool,onErrorImageURL:k.string,indexSeparator:k.string,thumbnailPosition:(0,k.oneOf)(["top","bottom","left","right"]),startIndex:k.number,slideDuration:k.number,slideInterval:k.number,slideOnThumbnailOver:k.bool,swipeThreshold:k.number,swipingTransitionDuration:k.number,swipingThumbnailTransitionDuration:k.number,onSlide:k.func,onBeforeSlide:k.func,onScreenChange:k.func,onPause:k.func,onPlay:k.func,onClick:k.func,onImageLoad:k.func,onImageError:k.func,onTouchMove:k.func,onTouchEnd:k.func,onTouchStart:k.func,onMouseOver:k.func,onMouseLeave:k.func,onBulletClick:k.func,onThumbnailError:k.func,onThumbnailClick:k.func,renderCustomControls:k.func,renderLeftNav:k.func,renderRightNav:k.func,renderPlayPauseButton:k.func,renderFullscreenButton:k.func,renderItem:k.func,renderThumbInner:k.func,stopPropagation:k.bool,additionalClass:k.string,useTranslate3D:k.bool,isRTL:k.bool,useWindowKeyDown:k.bool},on.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onBulletClick:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,renderLeftNav:function(h,a){return f().createElement(So,{onClick:h,disabled:a})},renderRightNav:function(h,a){return f().createElement(ko,{onClick:h,disabled:a})},renderPlayPauseButton:function(h,a){return f().createElement(jo,{onClick:h,isPlaying:a})},renderFullscreenButton:function(h,a){return f().createElement(wo,{onClick:h,isFullscreen:a})},useWindowKeyDown:!0};const _o=on})(),u})())})(Di);var qa=Di.exports;const Ga=Fo(qa);function Xa(){var e=new Map;function t(n){var r=n.root,i=n.rootMargin,s=n.threshold,u=e.get(r);u||(u=new Map,e.set(r,u));var d=JSON.stringify({rootMargin:i,threshold:s}),p=u.get(d);if(!p){var g=new Map,f=new IntersectionObserver(function(y){y.forEach(function(w){var x=g.get(w.target);x==null||x(w)})},{root:r,rootMargin:i,threshold:s});p={observer:f,entryCallbacks:g},u.set(d,p)}return{observe:function(w,x){var S,j;(S=p)==null||S.entryCallbacks.set(w,x),(j=p)==null||j.observer.observe(w)},unobserve:function(w){var x,S;(x=p)==null||x.entryCallbacks.delete(w),(S=p)==null||S.observer.unobserve(w)}}}return{getObserver:t}}var Ya="0px",Qa=[0],Ja=Xa();function Za(e){var t,n,r=(t=e==null?void 0:e.rootMargin)!=null?t:Ya,i=(n=e==null?void 0:e.threshold)!=null?n:Qa,s=L.useRef(null),u=L.useRef(null),d=L.useRef(null),p=L.useState(),g=p[0],f=p[1],y=L.useCallback(function(){var j=s.current;if(!j){f(void 0);return}var R=Ja.getObserver({root:u.current,rootMargin:r,threshold:i});R.observe(j,function(T){f(T)}),d.current=R},[r,i]),w=L.useCallback(function(){var j=d.current,R=s.current;R&&(j==null||j.unobserve(R)),d.current=null},[]),x=L.useCallback(function(j){w(),s.current=j,y()},[y,w]),S=L.useCallback(function(j){w(),u.current=j,y()},[y,w]);return[x,{entry:g,rootRef:S}]}function En(){return En=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},En.apply(this,arguments)}function el(e){var t,n=Za(e),r=n[0],i=n[1],s=!!((t=i.entry)!=null&&t.isIntersecting),u=L.useState(s),d=u[0],p=u[1];return s&&!d&&p(!0),[r,En({},i,{isVisible:s,wasEverVisible:d})]}var tl=100;function nl(e){var t=e.loading,n=e.hasNextPage,r=e.onLoadMore,i=e.rootMargin,s=e.disabled,u=e.delayInMs,d=u===void 0?tl:u,p=el({rootMargin:i}),g=p[0],f=p[1],y=f.rootRef,w=f.isVisible,x=!s&&!t&&w&&n;return L.useEffect(function(){if(x){var S=setTimeout(function(){r()},d);return function(){clearTimeout(S)}}},[r,x,d]),[g,{rootRef:y}]}const rl={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>'},il={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M18.333 2c1.96 0 3.56 1.537 3.662 3.472l.005.195v12.666c0 1.96-1.537 3.56-3.472 3.662l-.195.005H5.667a3.667 3.667 0 0 1-3.662-3.472L2 18.333V5.667c0-1.96 1.537-3.56 3.472-3.662L5.667 2h12.666zm-2.626 7.293a1 1 0 0 0-1.414 0L11 12.585l-1.293-1.292l-.094-.083a1 1 0 0 0-1.32 1.497l2 2l.094.083a1 1 0 0 0 1.32-.083l4-4l.083-.094a1 1 0 0 0-.083-1.32z"/></g>'},ol={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/>'};var un=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function dn(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function zi(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function Fi(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function sl(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,s=0;s<n.length;s++)r.indexOf(n[s])===-1&&(i=!1);return i}var Vn={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":un?173:189,"=":un?61:187,";":un?59:186,"'":222,"[":219,"]":221,"\\":220},Ae={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},In={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},pe={16:!1,18:!1,17:!1,91:!1},de={};for(var Rt=1;Rt<20;Rt++)Vn["f".concat(Rt)]=111+Rt;var ae=[],Gr=!1,Ni="all",Ai=[],Gt=function(t){return Vn[t.toLowerCase()]||Ae[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function Bi(e){Ni=e||"all"}function wt(){return Ni||"all"}function al(){return ae.slice(0)}function ll(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function cl(e){return typeof e=="string"&&(e=Gt(e)),ae.indexOf(e)!==-1}function ul(e,t){var n,r;e||(e=wt());for(var i in de)if(Object.prototype.hasOwnProperty.call(de,i))for(n=de[i],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;wt()===e&&Bi(t||"all")}function dl(e){var t=e.keyCode||e.which||e.charCode,n=ae.indexOf(t);if(n>=0&&ae.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&ae.splice(0,ae.length),(t===93||t===224)&&(t=91),t in pe){pe[t]=!1;for(var r in Ae)Ae[r]===t&&(Te[r]=!1)}}function hl(e){if(typeof e>"u")Object.keys(de).forEach(function(u){return delete de[u]});else if(Array.isArray(e))e.forEach(function(u){u.key&&hn(u)});else if(typeof e=="object")e.key&&hn(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0],s=n[1];typeof i=="function"&&(s=i,i=""),hn({key:e,scope:i,method:s,splitKey:"+"})}}var hn=function(t){var n=t.key,r=t.scope,i=t.method,s=t.splitKey,u=s===void 0?"+":s,d=Fi(n);d.forEach(function(p){var g=p.split(u),f=g.length,y=g[f-1],w=y==="*"?"*":Gt(y);if(de[w]){r||(r=wt());var x=f>1?zi(Ae,g):[];de[w]=de[w].filter(function(S){var j=i?S.method===i:!0;return!(j&&S.scope===r&&sl(S.mods,x))})}})};function Xr(e,t,n,r){if(t.element===r){var i;if(t.scope===n||t.scope==="all"){i=t.mods.length>0;for(var s in pe)Object.prototype.hasOwnProperty.call(pe,s)&&(!pe[s]&&t.mods.indexOf(+s)>-1||pe[s]&&t.mods.indexOf(+s)===-1)&&(i=!1);(t.mods.length===0&&!pe[16]&&!pe[18]&&!pe[17]&&!pe[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function Yr(e,t){var n=de["*"],r=e.keyCode||e.which||e.charCode;if(Te.filter.call(this,e)){if((r===93||r===224)&&(r=91),ae.indexOf(r)===-1&&r!==229&&ae.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(S){var j=In[S];e[S]&&ae.indexOf(j)===-1?ae.push(j):!e[S]&&ae.indexOf(j)>-1?ae.splice(ae.indexOf(j),1):S==="metaKey"&&e[S]&&ae.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(ae=ae.slice(ae.indexOf(j))))}),r in pe){pe[r]=!0;for(var i in Ae)Ae[i]===r&&(Te[i]=!0);if(!n)return}for(var s in pe)Object.prototype.hasOwnProperty.call(pe,s)&&(pe[s]=e[In[s]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(ae.indexOf(17)===-1&&ae.push(17),ae.indexOf(18)===-1&&ae.push(18),pe[17]=!0,pe[18]=!0);var u=wt();if(n)for(var d=0;d<n.length;d++)n[d].scope===u&&(e.type==="keydown"&&n[d].keydown||e.type==="keyup"&&n[d].keyup)&&Xr(e,n[d],u,t);if(r in de){for(var p=0;p<de[r].length;p++)if((e.type==="keydown"&&de[r][p].keydown||e.type==="keyup"&&de[r][p].keyup)&&de[r][p].key){for(var g=de[r][p],f=g.splitKey,y=g.key.split(f),w=[],x=0;x<y.length;x++)w.push(Gt(y[x]));w.sort().join("")===ae.sort().join("")&&Xr(e,g,u,t)}}}}function fl(e){return Ai.indexOf(e)>-1}function Te(e,t,n){ae=[];var r=Fi(e),i=[],s="all",u=document,d=0,p=!1,g=!0,f="+",y=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(s=t.scope),t.element&&(u=t.element),t.keyup&&(p=t.keyup),t.keydown!==void 0&&(g=t.keydown),t.capture!==void 0&&(y=t.capture),typeof t.splitKey=="string"&&(f=t.splitKey)),typeof t=="string"&&(s=t);d<r.length;d++)e=r[d].split(f),i=[],e.length>1&&(i=zi(Ae,e)),e=e[e.length-1],e=e==="*"?"*":Gt(e),e in de||(de[e]=[]),de[e].push({keyup:p,keydown:g,scope:s,mods:i,shortcut:r[d],method:n,key:r[d],splitKey:f,element:u});typeof u<"u"&&!fl(u)&&window&&(Ai.push(u),dn(u,"keydown",function(w){Yr(w,u)},y),Gr||(Gr=!0,dn(window,"focus",function(){ae=[]},y)),dn(u,"keyup",function(w){Yr(w,u),dl(w)},y))}function pl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(de).forEach(function(n){var r=de[n].find(function(i){return i.scope===t&&i.shortcut===e});r&&r.method&&r.method()})}var fn={setScope:Bi,getScope:wt,deleteScope:ul,getPressedKeyCodes:al,isPressed:cl,filter:ll,trigger:pl,unbind:hl,keyMap:Vn,modifier:Ae,modifierMap:In};for(var pn in fn)Object.prototype.hasOwnProperty.call(fn,pn)&&(Te[pn]=fn[pn]);if(typeof window<"u"){var ml=window.hotkeys;Te.noConflict=function(e){return e&&window.hotkeys===Te&&(window.hotkeys=ml),Te},window.hotkeys=Te}Te.filter=function(){return!0};var Wi=function(t,n){var r=t.target,i=r&&r.tagName;return!!(i&&n&&n.includes(i))},gl=function(t){return Wi(t,["INPUT","TEXTAREA","SELECT"])};function bl(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},s=i.enableOnTags,u=i.filter,d=i.keyup,p=i.keydown,g=i.filterPreventDefault,f=g===void 0?!0:g,y=i.enabled,w=y===void 0?!0:y,x=i.enableOnContentEditable,S=x===void 0?!1:x,j=L.useRef(null),R=L.useCallback(function(T,O){var P,A;return u&&!u(T)?!f:gl(T)&&!Wi(T,s)||(P=T.target)!=null&&P.isContentEditable&&!S?!0:j.current===null||document.activeElement===j.current||(A=j.current)!=null&&A.contains(document.activeElement)?(t(T,O),!0):!1},r?[j,s,u].concat(r):[j,s,u]);return L.useEffect(function(){if(!w){Te.unbind(e,R);return}return d&&p!==!0&&(n.keydown=!1),Te(e,n||{},R),function(){return Te.unbind(e,R)}},[R,e,w]),j}Te.isPressed;const $i=L.createContext({open:!1,toggleOpen:e=>{}});function yl({children:e}){const[t,n]=L.useState(!1),r=s=>{n(s??!s)},i=L.useMemo(()=>({open:t,toggleOpen:r}),[t]);return o.jsx($i.Provider,{value:i,children:e})}function qn(){return L.useContext($i)}const Ce={nameAsc:"title",nameDesc:"title",popularity:"stats.downloads",publishAt:"lastPublishedAt",mobilePageSize:10,pageSize:18,currentPage:1,defaultCurrentPage:1,blockletsPath:"/api/v2/blocklets.json",categoriesPath:"/api/blocklets/categories",explorePath:"/api/blocklets/explore",exploreDidsPath:"/api/blocklets/dids",cacheSize:100},vl=e=>St(async()=>{const{data:t}=await e.get(Ce.categoriesPath);return Array.isArray(t)?t:[]},{manual:!0});function xl(e,t){const n=e.menu?{sortBy:"popularity",sortDirection:"desc",showResources:"true",...$o(e,["sortBy","sortDirection","showResources"])}:{sortBy:"popularity",sortDirection:"desc",showResources:"true",...e,menu:void 0},{onFilterChange:r,onSearchSelect:i=d=>{t.onFilterChange({...n,keyword:d.title})},emptyCategory:s}=t;!n.category&&!s&&(n.category="All");const u=d=>{const p={...n,...d};r(sn(p,g=>g===""||g===void 0))};return{filters:e,cleanFilter:d=>{const p=d?sn(n,(g,f)=>d.includes(f)):{};r(sn(p,g=>g===""||g===void 0))},handleActiveMenu:d=>{d!==e.menu&&r({menu:d})},handleSort:(d,p)=>{u({sortBy:d,sortDirection:p||d==="nameAsc"?"asc":"desc"})},handleKeyword:d=>{u({category:void 0,keyword:d||void 0})},handlePrice:d=>{u({price:d===e.price?void 0:d})},handleCategory:d=>{u({category:d===e.category?"":d})},handleDeveloper:d=>{u({owner:d||void 0})},handlePage:d=>{u({currentPage:d})},handleSwitchShowResources:d=>{u({showResources:d})},handleSearchSelect:d=>{i(d)}}}const wl=(e,t,n)=>e&&t||!n,Hi=e=>[{name:e("sort.popularity"),value:"popularity"},{name:e("sort.lastPublished"),value:"publishAt"}],Ki=(e,t,n)=>{var r,i;const s=Go(e),u=Xo(s.search);if((r=Yo(e,{strict:!0}))!=null&&r.endsWith(".gif"))return u.imageFilter?Qo({...s,search:""}):e;if(u.imageFilter)return e;const d=n||((i=window.blocklet)==null?void 0:i.version),{w:p,h:g}=typeof t=="object"?{w:t.w,h:t.h}:{w:t,h:t};return Ln(e,{...p||g?{imageFilter:"resize",w:p,h:g}:{},v:d})},Sl=e=>[{name:e("blocklet.free"),value:"free"},{name:e("blocklet.payment"),value:"payment"}],kl=(e=[],t="en")=>e.map(n=>({name:n.locales[t]||n.locales.en,value:n._id})),jl=e=>{var t,n;return Array.isArray(e)?e.map(r=>r.message).join(`
|
|
2
|
+
`):(n=(t=e.response)==null?void 0:t.data)!=null&&n.error?e.response.data.error.message||e.response.data.error:e.message||e},Tl=(e,t)=>e==null?void 0:e.replace(/{(\w*)}/g,(n,r)=>t.hasOwnProperty(r)?t[r]:""),Ol=()=>window.innerWidth<=600,Cl={common:{title:"Blocklet Store",searchStore:"Search Blocklet",showResources:"Show extensions",price:"Price",category:"Category",categories:"Categories",resourceType:"Resource Type",clear:"Clear",cancel:"Cancel",search:"Search",fetchError:"Failed to fetch data, please try again later",searchPlaceholder:"Search blocklet"},explore:{title:"Explore",trending:"Trending",topRated:"Top Rated",recentlyUpdated:"Recently Updated",viewDetail:"View Details"},sort:{sort:"Sort",rating:"Rating",popularity:"Most Popular",lastPublished:"Latest Published"},category:{all:"All",placeholder:"Category name",helperText:"Please select a category"},blocklet:{noResults:"No blocklet found.",free:"Free",search:'Results for "{keyword}"',authorTag:"Blocklet by {name}",resourceTag:"Extensions for {name}",resultCount:"{count} Blocklets",emptyTip:"Tips:",filterTip:"Appropriately reduce the filter conditions",keywordTip:"Try other keywords",owner:"Blocklets from {name}",noBlockletPart1:'No Blocklets associated with"',noBlockletPart2:'"were found',noCategoryResults1:'No "',noCategoryResults2:'" Blocklets'},autocomplete:{expandResult:'View all search results for "{name}"'}},El={common:{title:"Blocklet 商店",searchStore:"搜索 Blocklet",showResources:"显示扩展",price:"价格",category:"类别",categories:"类别",resourceType:"资源类型",clear:"清除",cancel:"取消",search:"搜索",fetchError:"获取数据失败, 请稍后再试",searchPlaceholder:"搜索 Blocklet"},explore:{title:"探索",trending:"趋势",topRated:"评分最高",recentlyUpdated:"最近更新",viewDetail:"查看详情"},sort:{sort:"排序",rating:"评分",popularity:"最热门",lastPublished:"最新发布"},category:{all:"全部",placeholder:"分类名称",helperText:"请选择分类"},blocklet:{noResults:"未搜索到 Blocklet",free:"免费",search:'搜索 "{keyword}" 的结果',authorTag:"{name} 的 Blocklet",resourceTag:"{name} 的拓展",resultCount:"{count} 个 Blocklet",emptyTip:"建议:",filterTip:"适当减少筛选条件",keywordTip:"尝试其他关键字",owner:"来自 {name} 的 Blocklets",noBlockletPart1:'没有找到与"',noBlockletPart2:'"相关的 Blocklets',noCategoryResults1:'无 "',noCategoryResults2:'" 类别的 Blocklets'},autocomplete:{expandResult:"查看 “{name}” 的所有搜索结果"}},mn={en:Er(Cl),zh:Er(El)},Ui=(e,t)=>{const n={};return e&&(n["x-blocklet-server-version"]=e),t&&(n["x-blocklet-store-version"]=t),n},Il=e=>(t,n)=>{const r=mn[e]?mn[e][t]:mn.en[t];return Tl(r,n)||t},Vi={errors:{fetchCategoriesError:null},loadings:{fetchCategoriesLoading:!1},compact:!1,endpoint:"",wrapChildren:()=>null,t:e=>e,storeVersion:"",minItemWidth:350,serverVersion:"",layout:{},selectedCategory:void 0,categoryList:[],blockletRender:()=>null,locale:"en",categoryOptions:[],priceOptions:[],storeApi:null,baseSearch:!1,showResourcesSwitch:!1,showCategory:!1,tagFilters:[],developerName:"",onFilterChange:()=>{},updateDeveloperName:()=>{},getCategoryLocale:()=>null,search:{filters:{},cleanFilter:()=>{},handleActiveMenu:()=>{},handleSort:()=>{},handleKeyword:()=>{},handlePrice:()=>{},handleCategory:()=>{},handleDeveloper:()=>{},handleSwitchShowResources:()=>{},handleSearchSelect:()=>{},handlePage:()=>{}}},qi=L.createContext(Vi),{Provider:_l,Consumer:Bc}=qi;function Rl(e){const{locale:t="zh",filters:n={},serverVersion:r="",onFilterChange:i=()=>{},minItemWidth:s=350,queryFilter:u=!0,layout:d={},wrapChildren:p=se=>se,extraFilter:g=se=>se,baseSearch:f=!1,fetchCategoryDelay:y=0,showResourcesSwitch:w=!1,showCategory:x=!0,tagFilters:S=[],children:j,storeVersion:R,onSearchSelect:T=()=>{},endpoint:O,blockletRender:P,compact:A=!1}=e,G=Ui(r,R),W=L.useMemo(()=>ii({baseURL:O,headers:G}),[O]),K=xl(n,{onFilterChange:i,emptyCategory:!d.showExplore,onSearchSelect:T}),[ee,ie]=L.useState(""),{data:H=[],error:Ee,loading:ge,run:ke}=vl(W),be=L.useMemo(()=>{const se=js(H,[te=>te.name],["asc"]),oe=se.findIndex(te=>te.name==="All"||te.locales.en==="All");return oe>-1?[{...se[oe],_id:"All"},...se.slice(0,oe),...se.slice(oe+1)]:se},[H]),ye=L.useCallback(Il(t),[t]),N=L.useMemo(()=>kl(be,t),[be,t]),Q=Sl(ye),he={search:K,compact:A,errors:{fetchCategoriesError:Ee},loadings:{fetchCategoriesLoading:ge},extraFilter:g,endpoint:O,queryFilter:u,layout:{showExplore:d.showExplore??!1,showCategory:d.showCategory??!0,showTitle:d.showTitle??!0,showSearch:d.showSearch??!0},minItemWidth:s,wrapChildren:p,t:ye,storeVersion:R,serverVersion:r,selectedCategory:K.filters.category||(d.showExplore?"":"All"),categoryList:be,blockletRender:P,locale:t,categoryOptions:N,priceOptions:Q,storeApi:W,baseSearch:f,showResourcesSwitch:w,showCategory:x,tagFilters:S,onFilterChange:i,getCategoryLocale:se=>{if(!se)return null;const oe=H.find(te=>te._id===se||te.locales.en==="All");return oe?oe.locales[t]||oe.locales.en:null},get developerName(){return ee},updateDeveloperName:ie};return L.useEffect(()=>{setTimeout(ke,y||0)},[O,ke,y]),o.jsx(_l,{value:he,children:j})}function we(){return L.useContext(qi)||Vi}function Gi({children:e,onClick:t,size:n=32,...r}){return o.jsx(Oe,{...r,onClick:t,variant:"outlined",sx:[{minWidth:n,height:n,p:0,borderColor:"divider","&:hover":{borderColor:"divider"},borderRadius:2,color:"text.secondary"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:e})}function Pt(e,t){return e===void 0?t:e}function Gn({xs:e,sm:t,md:n,lg:r,xl:i,exact:s}){const u=Ve(),d=nt(u.breakpoints.down("sm")),p=nt(u.breakpoints.between("sm","md")),g=nt(u.breakpoints.between("md","lg")),f=nt(u.breakpoints.between("lg","xl"));if(s)return d?e||null:p?t||null:g?n||null:f?r||null:i||null;let y=e;return d||(y=Pt(t,y),p)||(y=Pt(n,y),g)||(y=Pt(r,y),f)?y:Pt(i,y)}function Pl({children:e}){const{open:t,toggleOpen:n}=qn();return o.jsx(Gn,{xs:o.jsx(Uo,{open:t,onClose:()=>n(!1),children:e}),md:o.jsx(q,{children:e})})}const Ml=L.forwardRef(({loading:e,disabled:t,...n},r)=>o.jsx(Oe,{ref:r,disableElevation:!0,disabled:t||e,...n,sx:[{borderRadius:"4px"},...Array.isArray(n.sx)?n.sx:[n.sx]],startIcon:e&&o.jsx(Pe,{size:"1em"})}));function _n({value:e,options:t,onChange:n,placeholder:r,...i}){var s;const u=L.useRef(null),d=Ve(),[p,g]=L.useState(!1),[f,y]=L.useState(e!==null?e:""),w=nt(d.breakpoints.down("sm"));L.useEffect(()=>{y(e!==null?e:"")},[e]);const x=L.useCallback(()=>{g(!1)},[]),S=L.useCallback(()=>{g(!0)},[]);function j(T){y(T.value),n(T.value),w&&x()}function R(T){return T===f}return o.jsxs(o.Fragment,{children:[o.jsxs(Ll,{ref:u,onClick:S,variant:"outlined",size:"medium",className:["my-select__selector",Jo(f)?"":"my-select__selector--active"].join(" "),sx:{minWidth:{xs:"100px",md:"auto"},color:"text.primary",borderRadius:"8px"},...i,children:[((s=t.find(T=>T.value===f))==null?void 0:s.name)||r,o.jsx(Zo,{className:"my-select__arrowdown",component:Mi,sx:{width:18,height:18}})]}),o.jsx(es,{open:p,anchorEl:u.current,transition:!0,sx:{zIndex:"9999"},children:({TransitionProps:T,placement:O})=>o.jsx(ts,{...T,style:{transformOrigin:O==="bottom"?"center top":"center bottom"},children:o.jsx(ns,{children:o.jsx(rs,{onClickAway:x,children:o.jsx(Dl,{autoFocusItem:p,onMouseEnter:S,onMouseLeave:x,children:t.map(P=>o.jsxs(Nt,{onClick:()=>j(P),sx:{fontSize:14},children:[o.jsx(is,{sx:{mr:1,fontSize:16,visibility:R(P.value)?"visible":"hidden"}}),P.name]},P.value))})})})})})]})}const Ll=Be(Ml)`
|
|
3
|
+
border: 1px solid ${e=>e.theme.palette.divider};
|
|
4
|
+
padding: 6px 8px 6px 12px;
|
|
5
|
+
font-weight: ${e=>e.theme.typography.fontWeightRegular};
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
color: ${e=>e.theme.palette.text.secondary};
|
|
8
|
+
line-height: 1;
|
|
9
|
+
text-transform: none;
|
|
10
|
+
& + & {
|
|
11
|
+
margin-left: 10px;
|
|
12
|
+
}
|
|
13
|
+
&.my-select__selector--active {
|
|
14
|
+
&,
|
|
15
|
+
.my-select__arrowdown,
|
|
16
|
+
}
|
|
17
|
+
.my-select__arrowdown {
|
|
18
|
+
color: ${e=>e.theme.palette.grey[400]};
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
margin-left: 6px;
|
|
21
|
+
}
|
|
22
|
+
.my-select__icon {
|
|
23
|
+
font-size: 0;
|
|
24
|
+
svg {
|
|
25
|
+
color: ${e=>e.theme.palette.grey[400]};
|
|
26
|
+
font-size: 18px;
|
|
27
|
+
margin-right: 3px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`,Dl=Be(oi)`
|
|
31
|
+
.my-select__option__icon {
|
|
32
|
+
color: transparent;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
margin: 0 3px 0 -5px;
|
|
35
|
+
}
|
|
36
|
+
.my-select__option {
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
color: #999;
|
|
39
|
+
}
|
|
40
|
+
.my-select__option--active {
|
|
41
|
+
&,
|
|
42
|
+
.my-select__option__icon {
|
|
43
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`;function Xi(){const{search:e,t}=we(),{filters:n,handleSort:r,handlePrice:i}=e,s=Hi(t);return o.jsxs(xe,{direction:{xs:"row",md:"column"},alignItems:{xs:"center",md:"flex-start"},gap:{xs:1,md:2},width:{xs:"100%",md:"auto"},justifyContent:"space-between",children:[o.jsx(li,{control:o.jsx(ci,{checked:n.price==="free",size:"small",sx:{"& .MuiSvgIcon-fontSizeSmall":{fontSize:16,color:"text.hint"}},onChange:u=>i(u.target.checked?"free":"")}),label:t("blocklet.free")}),o.jsx(_n,{value:n.sortBy||s[0].value,options:s,onChange:u=>r(u),placeholder:t("sort.sort")})]})}function zl({menus:e}){const{selectedCategory:t,search:n,t:r,categoryOptions:i,loadings:s,layout:u,baseSearch:d,compact:p}=we(),{filters:g,handleActiveMenu:f,handleCategory:y,cleanFilter:w}=n,{toggleOpen:x}=qn();L.useEffect(()=>{x(!1)},[Object.values(g).join("")]);const S=wl(d,u.showSearch,g.keyword);return u.showCategory&&!p?o.jsxs(Pl,{children:[o.jsx(Gn,{xs:o.jsxs(xe,{direction:"row",justifyContent:"space-between",alignItems:"center",p:2,mb:.5,gap:2,borderBottom:1,borderColor:"divider",children:[o.jsx(Gi,{onClick:()=>x(!1),children:o.jsx(ai,{})}),o.jsx(Z,{flex:1,variant:"body1",fontWeight:"fontWeightMedium",children:r("common.category")})]}),md:null}),o.jsx(xe,{visibility:s.fetchCategoriesLoading?"hidden":"visible",width:{xs:268,md:200},boxSizing:"content-box",p:{xs:2,md:0},pr:{md:6},children:S?o.jsxs(o.Fragment,{children:[u.showExplore&&o.jsxs(q,{mb:3,pb:3,borderBottom:1,borderColor:"divider",children:[o.jsxs(q,{display:"flex",alignItems:"center",gap:1,children:[o.jsx(Le,{icon:Ws,width:20,height:20}),o.jsx(Z,{variant:"body1",color:!t&&!g.menu?"text.primary":"grey.400",fontWeight:!t&&!g.menu?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{x(!1),w()},children:r("explore.title")})]}),e==null?void 0:e.map(j=>o.jsxs(q,{display:"flex",alignItems:"center",mt:2,gap:1,children:[typeof j.icon=="string"?o.jsx(Le,{icon:j.icon,width:20,height:20}):j.icon,o.jsx(Z,{variant:"body1",color:g.menu===j.key?"text.primary":"grey.400",fontWeight:g.menu===j.key?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{var R;x(!1),f(j.key),(R=j.onClick)==null||R.call(j)},children:j.title})]},j.key))]}),!!i.length&&o.jsx(xe,{gap:2,children:i.map(j=>o.jsx(Z,{variant:"body1",title:j.name,sx:{cursor:"pointer"},"data-cy":"filter",color:t===j.value?"text.primary":"grey.400",textTransform:"capitalize",onClick:()=>{t===j.value?w():y(j.value),x(!1)},children:j.name},j.value))})]}):o.jsx(Xi,{})})]}):null}function Xn(){const{endpoint:e,serverVersion:t,storeVersion:n}=we(),r=Ui(t,n),i=L.useMemo(()=>ii({baseURL:e,headers:r}),[e]);return{get:async s=>{const{data:u}=await i.get(s);return u},post:async(s,u)=>{const{data:d}=await i.post(s,u);return d}}}const Yi=L.memo(function(e){return o.jsx(q,{height:60,display:"flex",alignItems:"center",justifyContent:"center",...e,children:o.jsx(Pe,{})})});function Qr({icon:e,children:t,maxWidth:n=100,title:r}){return(t===0||t)&&o.jsxs(xe,{direction:"row",alignItems:"center",gap:1,sx:{maxWidth:n,overflow:"hidden"},children:[e,o.jsx(Z,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:r||(typeof t=="string"?t:void 0),children:t})]})}const Fl=16/9,gn=292,Rn=189,Wt=336;function Nl(){var e,t;const{t:n,search:r}=we(),{get:i}=Xn(),s=Ve(),u=nt(s.breakpoints.down("md")),d=((t=(e=window.blocklet)==null?void 0:e.preferences)==null?void 0:t.homeBanner)||[],{data:p=[],error:g,loading:f}=St(async()=>{const T=await i(Ln(Ce.blockletsPath,{didList:d.map(O=>O.did).join(",")}));return T!=null&&T.dataList?d.map(O=>T.dataList.find(P=>P.did===O.did)):[]});g&&console.error("Get Banner Blocklets error:",g);const y={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:100,cursor:"pointer",color:"text.hint"};return!g&&d.length>0?o.jsxs(o.Fragment,{children:[o.jsx(Z,{component:"h2",variant:"h2",mt:{xs:2,md:0},mb:3,children:n("explore.title")}),o.jsx(q,{height:{xs:"auto",md:gn},minHeight:gn,position:"relative",border:1,borderColor:"divider",borderRadius:3,overflow:"hidden",children:f?o.jsxs(q,{p:5,display:{md:"flex"},gap:5,alignItems:"center",justifyContent:"center",children:[o.jsx(Fe,{variant:"rounded",height:Rn,width:Wt}),o.jsxs(q,{flex:1,height:"100%",children:[o.jsx(Fe,{variant:"text",height:50,width:100}),o.jsx(Fe,{variant:"text",height:40,width:"100%"}),o.jsx(Fe,{variant:"text",height:40,width:300}),o.jsxs(q,{display:"flex",gap:1,my:2,children:[o.jsx(Fe,{variant:"circular",height:20,width:20}),o.jsx(Fe,{variant:"text",height:20,width:50})]}),o.jsx(Fe,{variant:"rounded",height:30,width:100})]})]}):o.jsx(Ga,{showNav:!0,autoPlay:!0,slideDuration:u?500:1e3,slideInterval:5e3,showPlayButton:!1,showIndex:!1,showBullets:!1,showThumbnails:!1,showFullscreenButton:!1,renderLeftNav:T=>o.jsx(q,{onClick:T,sx:{display:{xs:"none",md:"block"}},children:o.jsx(xs,{sx:{...y,left:5}})}),renderRightNav:T=>o.jsx(q,{onClick:T,sx:{display:{xs:"none",md:"block"}},children:o.jsx(ws,{sx:{...y,right:5}})}),items:d.map((T,O)=>({original:T.did,renderItem:()=>{var P;const A=p[O]||{},G=T.cover||Bl(T.did,(P=A.screenshots)==null?void 0:P[0]),W=Ki(G,s.breakpoints.values.md*2);return o.jsxs(xe,{height:{xs:"auto",md:gn},sx:{cursor:"pointer","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url("${W}")`,backgroundSize:"cover",filter:"blur(50px)",opacity:.15,zIndex:0}},display:"flex",direction:{xs:"column",md:"row"},justifyContent:"center",alignItems:{xs:"flex-start",md:"center"},p:{xs:2,md:5},onClick:()=>r.handleSearchSelect(A),gap:{xs:2,md:5},children:[w(W),o.jsxs(xe,{flex:1,height:"100%",gap:3,children:[o.jsxs(q,{flex:1,children:[x(T.name||A.title||T.name),S(T.desc||A.description)]}),A.did&&j(A,T.baseNum),R(A)]})]})}}))})})]}):null;function w(T){return o.jsx(q,{borderRadius:2,overflow:"hidden",position:"relative",width:{xs:"100%",md:Wt},children:o.jsx(Wl,{url:T})})}function x(T){return o.jsx(Z,{variant:"h2",width:"100%",children:T})}function S(T){return o.jsx(Z,{variant:"body2",color:"text.secondary",textAlign:"left",width:"100%",minHeight:70,maxHeight:70,pt:1,sx:{display:"-webkit-box",lineClamp:3,WebkitLineClamp:3,maxHeight:71,textWrap:"wrap",overflow:"hidden",WebkitBoxOrient:"vertical"},children:T})}function j(T,O=0){const{did:P,owner:A,stats:G}=T;return o.jsxs(q,{display:"flex",alignItems:"center",gap:2,color:"text.secondary",children:[o.jsx(Qr,{icon:o.jsx(Ft,{src:A.avatar,did:P,size:20,variant:"circle"}),children:A.fullName}),o.jsx(Qr,{icon:o.jsx(Le,{icon:Li}),title:`${G.downloads+O}`,children:Al(G.downloads+O)})]})}function R(T){return o.jsx(Oe,{variant:"outlined",size:"small",onClick:()=>r.handleSearchSelect(T),sx:{width:"fit-content",textTransform:"none",borderRadius:1,borderColor:"grey.300","&:hover":{borderColor:"divider"}},children:n("explore.viewDetail")})}}const Al=e=>Number.isNaN(e)?0:e<1e3?e:e<1e6?`${(e/1e3).toFixed(1)}k`:e<1e9?`${(e/1e6).toFixed(1)}m`:`${(e/1e9).toFixed(1)}b`,Bl=(e,t)=>e&&t?`/assets/${e}/screenshots/${t}`:"";function Wl({url:e}){const[t,n]=L.useState(!0);return o.jsxs(o.Fragment,{children:[t&&o.jsx(Fe,{variant:"rectangular",sx:{width:{xs:"100%",md:Wt},height:{xs:"auto",md:Rn}}}),o.jsx(q,{display:t?"none":"block",component:"img",src:e,alt:"",width:{xs:"100%",md:Wt},height:{xs:"auto",md:Rn},borderRadius:2,border:1,borderColor:"divider",sx:{objectFit:"container",cursor:"pointer",aspectRatio:Fl},onLoad:()=>n(!1),onError:()=>n(!1)})]})}function $l({title:e,blocklets:t}){const{blockletRender:n,serverVersion:r}=we();return o.jsxs(q,{mt:3,children:[o.jsx(Z,{component:"h3",variant:"h3",sx:{mb:2},children:e}),o.jsx(Ir,{container:!0,spacing:2,boxSizing:"border-box",maxWidth:"calc(100vw - 16px)",children:t.map(i=>o.jsx(Ir,{item:!0,xs:12,md:6,p:"2px","data-blocklet-did":i.did,children:o.jsx(q,{padding:"1px",children:n({blocklet:i,blocklets:t,serverVersion:r})})},i.did))})]})}function Hl(){const{get:e}=Xn(),{t}=we(),{data:n=[],error:r,loading:i}=St(async()=>{const s=await e(Ce.explorePath);return Array.isArray(s)?s:[]});return r?o.jsx(Mn,{error:new Error(`Failed to fetch blocklets from ${Ce.explorePath}`)}):i?o.jsx(Yi,{mt:15}):o.jsxs(o.Fragment,{children:[o.jsx(Nl,{}),n.map(s=>{var u;return((u=s.blocklets)==null?void 0:u.length)>0?o.jsx($l,{title:t(`explore.${s.type}`),blocklets:s.blocklets},s.type):null})]})}const bn="__FREE_TEXT__",Jr="__NO_RESULT__",yn=40;function Qi({endpoint:e,t,locale:n,filters:r,handleKeyword:i,handleSearchSelect:s,...u}){const d=L.useRef(null),p=L.useRef(!1),[g,f]=L.useState(!1),[y,w]=L.useState(""),[x,S]=L.useState(!1),j=Xn(),[R,T]=L.useState(!1),O=(u==null?void 0:u.placeholder)||t("common.searchStore"),P=async N=>{T(!0);const Q=await j.get(rt(e,Ln(Ce.blockletsPath,N)));return T(!1),Q.dataList||[]},{data:A,run:G}=St(N=>N?P({sortBy:Ce.nameDesc,page:1,pageSize:10,keyword:N,showResources:"true"}):Promise.resolve([]),{manual:!0});L.useEffect(()=>{T(!0),G(r.keyword),w(r.keyword||"")},[r.keyword,G]),bl("ctrl + k, command + k",N=>{var Q,he;return N.stopPropagation(),N.preventDefault(),(he=(Q=d.current)==null?void 0:Q.querySelector("input"))==null||he.focus(),!1},{enableOnTags:["INPUT"]});const W=ui(N=>G(N),{wait:300}),K={name:bn,title:y,did:""};let ee=[];return y&&(R?ee=[K]:A!=null&&A.length?ee=[K,...A]:ee=[{name:Jr,title:t("blocklet.noResults"),did:""}]),o.jsxs(o.Fragment,{children:[o.jsxs(Vo,{fullScreen:!0,open:x,sx:{display:{md:"none"}},children:[o.jsxs(q,{p:2,pb:0,display:"flex",alignItems:"center",gap:2,children:[o.jsx(si,{fullWidth:!0,sx:{bgcolor:"grey.50",px:1,py:.5,".MuiInputBase-input":{p:1},".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},autoFocus:!0,placeholder:O,className:"bl-autocomplete-input",value:y,onChange:N=>ie(N.target.value),startAdornment:be(x),endAdornment:ye()}),o.jsx(Oe,{variant:"outlined",onClick:()=>{S(!1),w(r.keyword||"")},children:t("common.cancel")})]}),o.jsx(oi,{sx:{p:.5},children:ee.map(N=>ge(N))})]}),o.jsx(q,{sx:{display:{sx:"block",md:"none"},paddingTop:1,opacity:.5},children:o.jsx(Le,{icon:an,style:{fontSize:22,color:"inherit"},onClick:()=>S(!0)})}),o.jsx(Os,{ref:d,open:!!y&&g,size:"small",onOpen:()=>f(!0),onClose:(N,Q)=>{f(!1),Q==="selectOption"&&!p.current&&i(y)},onKeyDown:N=>{N.key==="Enter"&&!y&&H()},disableClearable:!0,inputValue:y,onInputChange:(N,Q)=>ie(Q),isOptionEqualToValue:(N,Q)=>N.name===Q.name,getOptionLabel:N=>N.title,getOptionKey:N=>N.name,noOptionsText:t("blocklet.noResults"),autoHighlight:!0,forcePopupIcon:!1,slotProps:{paper:{sx:{mt:.5,minWidth:"100%",width:"fit-content","& > ul":{p:.5}}}},renderInput:N=>o.jsx(di,{...N,InputProps:{...N.InputProps,autoFocus:!0,placeholder:O,className:"bl-autocomplete-input",value:y,startAdornment:be(g),endAdornment:ye()}}),filterOptions:N=>N,...u,options:ee,renderOption:(N,Q)=>ge(Q),value:K,sx:[{bgcolor:"grey.50",borderRadius:"8px",overflow:"hidden",".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},...Array.isArray(u.sx)?u.sx:[u.sx]]})]});function ie(N){T(!0),w(N),p.current=!1,W.run(N)}function H(){S(!1),w(""),ie(""),i("")}function Ee(N){N!=null&&N.did?(S(!1),p.current=!0,w(""),s(N)):N.name===bn&&(S(!1),i(y))}function ge(N){var Q,he;return o.jsxs(Nt,{sx:{display:"flex",alignItems:"center",gap:1,p:1.5,borderRadius:"8px"},onClick:()=>Ee(N),children:[ke(N),o.jsxs(Z,{variant:"body1",children:[o.jsx(Z,{fontWeight:"fontWeightMedium",display:"flex",alignItems:"center",gap:1,children:N.title}),o.jsx(Z,{sx:{color:"text.hint"},fontSize:"13px",children:((he=(Q=N.category)==null?void 0:Q.locales)==null?void 0:he[n||"en"])||""})]})]},N.did)}function ke(N){if([bn,Jr].includes(N.name))return o.jsx(q,{width:yn,p:"6px",display:"flex",justifyContent:"center",alignItems:"center",color:"text.hint",bgcolor:"grey.100",borderRadius:"8px",children:o.jsx(Le,{icon:an,style:{fontSize:28}})});let Q="";return N.logo&&(Q=rt(e,"assets",N.did,Ki(N.logo,yn,N.version))),o.jsx(Ft,{src:Q,size:yn,style:{borderRadius:"8px",overflow:"hidden"}})}function be(N=!0){return o.jsx(q,{sx:{display:"flex",pl:.5,alignItems:"center",color:"text.hint"},children:N&&y&&R?o.jsx(Pe,{color:"inherit",size:16}):o.jsx(Le,{icon:an,style:{fontSize:16,cursor:"default"}})})}function ye(){return y?o.jsx(q,{sx:{display:"flex",alignItems:"center",color:"text.hint"},children:o.jsx(Le,{icon:ol,style:{fontSize:20,cursor:"pointer",color:"inherit"},onClick:()=>H()})}):null}}function Kl({placeholder:e,...t}){const{search:n,t:r}=we(),{filters:i,handleKeyword:s}=n,[u,d]=L.useState(i.keyword||""),p=ui(s,{wait:300}),g=w=>{const{value:x}=w.target;d(x),p.run(x)},f=()=>{d(""),s("")};L.useEffect(()=>{d(i.keyword||"")},[i.keyword]);const y=e||r("common.searchPlaceholder");return o.jsx(Ul,{inputProps:{"data-cy":"search-blocklet"},startAdornment:o.jsx(Rr,{position:"start",children:o.jsx(Vl,{sx:{fontSize:18,ml:-.5}})}),onChange:g,placeholder:y,value:u,title:y,"data-cy":"search",endAdornment:u&&o.jsx(Rr,{position:"end",children:o.jsx(ql,{"data-cy":"search-delete",onClick:f})}),...t})}const Ul=Be(si)`
|
|
47
|
+
background-color: ${e=>e.theme.palette.grey[50]};
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
border-radius: 6px;
|
|
50
|
+
width: 100%;
|
|
51
|
+
.MuiInputBase-input {
|
|
52
|
+
padding: 8px 0 8px 0px;
|
|
53
|
+
}
|
|
54
|
+
.MuiOutlinedInput-notchedOutline {
|
|
55
|
+
border: none;
|
|
56
|
+
}
|
|
57
|
+
.Mui-focused {
|
|
58
|
+
background-color: #f6f6f6;
|
|
59
|
+
.MuiInputBase-input::placeholder {
|
|
60
|
+
color: transparent;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`,Vl=Be(Ss)`
|
|
64
|
+
color: ${e=>e.theme.palette.grey[500]};
|
|
65
|
+
`,ql=Be(ai)`
|
|
66
|
+
color: ${e=>e.theme.palette.grey[500]};
|
|
67
|
+
font-size: 16px;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
`;function Gl(){var e;const{search:t,t:n,endpoint:r,locale:i,getCategoryLocale:s,developerName:u,showResourcesSwitch:d,layout:p,baseSearch:g,categoryOptions:f,compact:y}=we(),{filters:w,handleSort:x,handlePrice:S,handleDeveloper:j,handleSwitchShowResources:R,cleanFilter:T,handleCategory:O}=t,P=Hi(n);return o.jsxs(xe,{position:"sticky",top:0,zIndex:1e3,className:"filter-bar",direction:{xs:"column",md:"row"},alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",gap:2,spacing:{xs:1,md:0},pt:{xs:2,md:0},px:0,pb:y?2:3,sx:{backgroundColor:"background.default"},children:[!y&&o.jsx(Z,{variant:"h2",textTransform:"capitalize",children:s(w.category)}),o.jsxs(xe,{flex:1,direction:"row",alignItems:"center",flexWrap:{xs:"wrap",md:"nowrap"},width:"100%",justifyContent:{xs:"flex-start",md:"flex-end"},gap:2,children:[p.showSearch?o.jsx(q,{flex:1,flexBasis:{xs:"100%",md:"auto"},children:g?o.jsx(Kl,{}):o.jsx(Qi,{locale:i,endpoint:r,sx:{display:{md:"block",xs:"none"},flex:1,mr:1,width:"350px"},t:n,filters:t.filters,handleKeyword:t.handleKeyword,handleSearchSelect:t.handleSearchSelect})}):null,w.owner&&u&&o.jsx(_r,{label:n("blocklet.authorTag",{name:u}),size:"small",onDelete:()=>j("")}),w.resourceDid&&w.resourceBlocklet&&o.jsx(_r,{label:n("blocklet.resourceTag",{name:w.resourceBlocklet}),size:"small",onDelete:()=>T(["resourceDid","resourceBlocklet","showResources"])}),d?o.jsx(Zr,{checked:w.showResources!=="false",onChange:A=>R(A?"true":"false"),label:n("common.showResources")}):null,o.jsx(Zr,{checked:w.price==="free",onChange:A=>S(A?"free":""),label:n("blocklet.free")}),y&&o.jsx(q,{children:o.jsx(_n,{value:w.category||((e=f[0])==null?void 0:e.value),options:f,placeholder:n("common.category"),onChange:A=>O(A)})}),o.jsx(_n,{value:w.sortBy||P[0].value,options:P,placeholder:n("sort.sort"),onChange:A=>x(A)})]})]})}function Zr({checked:e,onChange:t,label:n}){const r=Ve();return o.jsx(li,{sx:{m:0,p:0},className:"check-button",control:o.jsx(ci,{checked:e,icon:o.jsx(Le,{style:{padding:0,color:r.palette.text.secondary},icon:rl}),checkedIcon:o.jsx(Le,{style:{padding:0,color:r.palette.primary.main},icon:il}),size:"large",sx:{p:0,mr:1},onChange:i=>t(i.target.checked)}),label:n})}function Mt({children:e}){return o.jsxs(q,{display:"flex",mt:2,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.hint",children:[o.jsx(ks,{}),e]})}function ei(){const{t:e}=we();return o.jsx(Z,{style:{textAlign:"center"},variant:"subtitle2",children:e("blocklet.noResults")})}function vn({filterTip:e,keywordTip:t}){const{t:n,locale:r}=we(),i=()=>r==="zh"?"、":" , ";return o.jsxs(q,{mt:1,display:"flex",children:[o.jsx(Z,{style:{marginRight:"16px"},children:n("blocklet.emptyTip")}),e&&o.jsx(Z,{children:n("blocklet.filterTip")}),e&&t&&i(),t&&o.jsx(Z,{children:n("blocklet.keywordTip")})]})}function xn({primaryStart:e,primaryEnd:t,filter:n}){return o.jsxs(Z,{variant:"subtitle2",display:"flex",gap:.5,mx:.5,children:[o.jsx(Z,{children:e}),o.jsx(Z,{title:n,color:"primary",sx:{maxWidth:"30vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),o.jsxs(Z,{children:[t," "]})]})}function Xl(){const{t:e,search:t,getCategoryLocale:n,selectedCategory:r}=we(),{filters:i}=t,s=!!r||!!i.price;if(i.keyword&&s)return o.jsxs(Mt,{children:[o.jsx(xn,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:i.keyword}),o.jsx(vn,{keywordTip:!0,filterTip:!0})]});if(i.keyword)return o.jsxs(Mt,{children:[o.jsx(xn,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:i.keyword}),o.jsx(vn,{keywordTip:!0})]});if(s){const u=n(r);return o.jsxs(Mt,{children:[u?o.jsx(xn,{primaryStart:e("blocklet.noCategoryResults1"),primaryEnd:e("blocklet.noCategoryResults2"),filter:u}):o.jsx(ei,{}),o.jsx(vn,{filterTip:!0})]})}return o.jsx(Mt,{children:o.jsx(ei,{})})}const Yl=(e,t,n,r)=>zs(async i=>{i||(n.currentPage=n.defaultCurrentPage);const{currentPage:s,pageSize:u}=n,d={...t,category:t.category==="All"?"":t.category,sortBy:Ce[t.sortBy],page:s,pageSize:u};r(null);const{data:p={}}=await e.get(Ce.blockletsPath,{params:d});return n.currentPage++,{page:s,pageSize:u,list:(p==null?void 0:p.dataList)||[],total:(p==null?void 0:p.total)||0}},{isNoMore:i=>i?i.page*i.pageSize>=i.total:!1,reloadDeps:[e,os(t)],onError:r});function Ql(){var e;const{storeApi:t,search:n,extraFilter:r,errors:i,updateDeveloperName:s}=we(),{filters:u}=n,d=qo({currentPage:Ce.currentPage,pageSize:Ol()?Ce.mobilePageSize:Ce.pageSize,defaultCurrentPage:Ce.defaultCurrentPage}),[p,g]=L.useState(null),f=Yl(t,u,d,g),y=L.useMemo(()=>{var w,x;return r?r(((w=f.data)==null?void 0:w.list)||[]):((x=f.data)==null?void 0:x.list)||[]},[f.data,r]);return L.useEffect(()=>{const w=y.find(x=>x.owner.did===u.owner);s((w==null?void 0:w.owner.fullName)||(w==null?void 0:w.author.name)||"")},[u.owner,y,s]),{blocklets:y,fetchBlockletsError:p,loadMore:f.loadMore,hasNextPage:!f.noMore,total:((e=f.data)==null?void 0:e.total)||0,loadings:{fetchBlockletsLoading:f.loading,loadingMore:f.loadingMore},errors:{...i,fetchBlockletsError:p}}}function Jl(){const{t:e,search:t,endpoint:n,blockletRender:r,serverVersion:i,minItemWidth:s,layout:u,baseSearch:d,compact:p}=we(),{filters:g}=t,{blocklets:f,errors:y,loadMore:w,loadings:x,hasNextPage:S,total:j}=Ql(),[R]=nl({loading:x.fetchBlockletsLoading||x.loadingMore,hasNextPage:S,onLoadMore:w});if(y.fetchBlockletsError){const A=new Error(`Failed to fetch blocklets from ${n}: ${jl(y.fetchBlockletsError)}`);return o.jsx(Mn,{error:A})}const T=d&&u.showSearch||!g.keyword;return o.jsxs(o.Fragment,{children:[T?o.jsx(Gl,{}):o.jsxs(o.Fragment,{children:[o.jsx(Gn,{xs:o.jsx(Xi,{}),md:null}),P()]}),O(),!x.fetchBlockletsLoading&&S&&o.jsx(q,{height:70,minHeight:70,display:"flex",justifyContent:"center",py:2,overflow:"hidden",ref:R,children:x.loadingMore?o.jsx(Pe,{}):null})]});function O(){return x.fetchBlockletsLoading?o.jsx(Yi,{mt:15}):f.length?o.jsx(q,{className:"blocklet-list",display:"grid",gridTemplateColumns:{xs:"1fr",sm:`repeat(auto-fill, minmax(${s}px, 1fr))`},p:"2px",rowGap:2,columnGap:p?0:2,children:f.map(A=>o.jsx(q,{"data-blocklet-did":A.did,minWidth:{xs:"100%",sm:s},maxWidth:"calc(100vw - 32px)",children:r({blocklet:A,blocklets:f,serverVersion:i})},A.did))}):o.jsx(Xl,{})}function P(){return o.jsxs(xe,{direction:"row",className:"search-result-title",alignItems:"center",justifyContent:"space-between",mb:2,mt:{xs:2,md:0},children:[o.jsx(Z,{variant:"h3",title:g.keyword,maxWidth:"50vw",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e("blocklet.search",{keyword:g.keyword})}),o.jsx(Z,{variant:"body1",color:"text.hint",fontSize:13,children:e("blocklet.resultCount",{count:j})})]})}}function Zl(){var e,t,n;const{t:r,selectedCategory:i,getCategoryLocale:s,locale:u,search:d}=we(),{toggleOpen:p}=qn(),g=Ho().arcSphere,f=!!((t=(e=window.blocklet)==null?void 0:e.navigation)!=null&&t.some(y=>y.section==="bottomNavigation"));return o.jsxs(q,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[o.jsxs(Z,{variant:"body1",display:{xs:"flex",md:"none"},alignItems:"center",gap:1,py:2,fontWeight:"fontWeightMedium",children:[o.jsx(Gi,{onClick:()=>p(!0),children:o.jsx(Ko,{})}),s(i)||r("common.category")]}),g&&f&&o.jsx(Qi,{locale:u,endpoint:((n=window.blocklet)==null?void 0:n.prefix)||"/",sx:{display:{md:"block",xs:"none"},mr:1,width:"350px"},t:r,filters:d.filters,handleKeyword:d.handleKeyword,handleSearchSelect:d.handleSearchSelect})]})}function ec({menus:e,children:t}){var n;const{search:r,layout:i,compact:s}=we(),{filters:u}=r,d=L.useRef(null),p=u.category||u.keyword||u.price,g=(n=e==null?void 0:e.find(f=>f.key===u.menu))==null?void 0:n.key;return o.jsx(yl,{children:o.jsxs(Wo,{FallbackComponent:Mn,children:[!s&&o.jsx(Zl,{}),o.jsxs(q,{ref:d,display:"flex",height:"100%",className:"list-container",pt:{xs:0,md:s?0:5},children:[o.jsx(zl,{menus:e}),o.jsxs(xe,{height:"100%",position:"relative",flex:1,sx:s?{overflowY:"auto",ml:-2,pr:1,pb:2}:{overflow:"visible"},children:[g&&(t==null?void 0:t(g)),!g&&(i.showExplore&&!p?o.jsx(Hl,{}):o.jsx(Jl,{}))]})]})]})})}function Wc(e){const{menus:t,children:n,...r}=e,i=Ve(),s=No(Ao({},i,{typography:{h1:{fontSize:32,fontWeight:700,lineHeight:1.375,textAlign:"left"},h2:{fontSize:24,fontWeight:700,lineHeight:1.3333333,textAlign:"left"},h3:{fontSize:18,fontWeight:600,lineHeight:1.5,textAlign:"left"},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700}}));return o.jsx(Bo,{theme:s,children:o.jsx(Rl,{...r,children:o.jsx(ec,{menus:t,children:n})})})}const $c={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M22 12.54c-1.804-.345-2.701-1.08-3.523-2.94c-.487.696-1.102 1.568-.92 2.4c.028.238-.32 1-.557 1H3c0 5.208 3.164 7 6.196 7c4.124.022 7.828-1.376 9.854-5c1.146-.101 2.296-1.505 2.95-2.46z"/><path d="M5 10h3v3H5zm3 0h3v3H8zm3 0h3v3h-3zM8 7h3v3H8zm3 0h3v3h-3zm0-3h3v3h-3zM4.571 18c1.5 0 2.047-.074 2.958-.78M10 16v.01"/></g>'},tc=(e,t)=>!t||!e?!0:Pr.satisfies(Pr.coerce(e),t);function Ji({children:e,serverVersion:t="",requirementVersion:n="",...r}){const{t:i}=qe();return tc(t,n)?e:o.jsx(Dn,{title:i("store.tooltip.upgradeServer",{serverVersion:t,version:n}),arrow:!0,children:o.jsx(Z,{children:o.jsx(Oe,{disabled:!0,variant:"outlined",...r,children:i("common.upgradeServer")})})})}Ji.propTypes={children:M.node.isRequired,serverVersion:M.string,requirementVersion:M.string};Ji.defaultProps={serverVersion:"",requirementVersion:""};Be("div")`
|
|
70
|
+
background-color: transparent !important;
|
|
71
|
+
& > :not(.Mui-disabled) {
|
|
72
|
+
position: relative;
|
|
73
|
+
z-index: 1;
|
|
74
|
+
&::before {
|
|
75
|
+
content: '';
|
|
76
|
+
position: absolute;
|
|
77
|
+
height: 100%;
|
|
78
|
+
width: 100%;
|
|
79
|
+
left: 0;
|
|
80
|
+
top: 0;
|
|
81
|
+
transition: opacity 0.3s;
|
|
82
|
+
}
|
|
83
|
+
&:hover::before {
|
|
84
|
+
opacity: 0;
|
|
85
|
+
}
|
|
86
|
+
&::after {
|
|
87
|
+
content: '';
|
|
88
|
+
position: absolute;
|
|
89
|
+
height: 100%;
|
|
90
|
+
width: 100%;
|
|
91
|
+
top: 0;
|
|
92
|
+
left: 0;
|
|
93
|
+
border-radius: 2px;
|
|
94
|
+
background-color: ${e=>e.theme.palette.primary.main};
|
|
95
|
+
transform: scale(0.1);
|
|
96
|
+
opacity: 0;
|
|
97
|
+
z-index: -1;
|
|
98
|
+
transition:
|
|
99
|
+
transform 0.3s,
|
|
100
|
+
opacity 0.3s,
|
|
101
|
+
background-color 0.3s;
|
|
102
|
+
}
|
|
103
|
+
&:hover::after {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
transform-origin: center;
|
|
106
|
+
transform: scale(1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
& > :not(.Mui-disabled) {
|
|
110
|
+
background-color: transparent !important;
|
|
111
|
+
color: ${e=>e.theme.palette.primary.main}!important;
|
|
112
|
+
}
|
|
113
|
+
& > :not(.Mui-disabled) {
|
|
114
|
+
&:hover {
|
|
115
|
+
color: ${e=>e.theme.palette.common.white}!important;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
`;const ti=(e="")=>e.replace(/(<([^>]+)>)/gi,"").trim(),nc=(e="")=>{const t=parseInt(e,10);return Number.isNaN(t)?e:t<1e3?t:t<1e6?`${(t/1e3).toFixed(1)}k`:t<1e9?`${(t/1e6).toFixed(1)}m`:`${(t/1e9).toFixed(1)}b`};function Pn({title:e,sx:t,children:n,slotProps:r,fontSize:i=12,fontWeight:s=500,color:u="text.contrast",...d}){var p,g;return e?o.jsx(Dn,{title:e,placement:"top",...d,slotProps:{popper:{...r==null?void 0:r.popper,sx:[{[`& .${hi.tooltip}`]:{fontSize:i,fontWeight:s,boxShadow:2,marginBottom:"6px !important",borderRadius:"8px",cursor:"default",color:u,display:"flex",alignItems:"center"}},...Array.isArray((p=r==null?void 0:r.popper)==null?void 0:p.sx)?r.popper.sx:[(g=r==null?void 0:r.popper)==null?void 0:g.sx]]}},children:n}):n}function Lt({icon:e,children:t,maxWidth:n=100,title:r,sx:i}){return(t===0||t)&&o.jsxs(xe,{direction:"row",alignItems:"center",gap:.5,sx:[{maxWidth:n,overflow:"hidden"},...Array.isArray(i)?i:[i]],children:[e,o.jsx(Pn,{title:r||(typeof t=="string"?t:""),children:o.jsx(Z,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:t})})]})}function Hc(e){const{title:t,description:n="",cover:r="",avatar:i,author:s,download:u,did:d,official:p,buttonText:g="Install",buttonDisabled:f,buttonLoading:y,button:w,onButtonClick:x=()=>{},onMainClick:S,className:j,ref:R,icons:T,status:O,...P}=e,A=Ve(),G=(H,Ee=()=>!1)=>(ge,...ke)=>{const be=H instanceof Function;(Ee()||be)&&(ge.preventDefault(),ge.stopPropagation(),be&&H(...ke))},W=S&&G(S),K=G(x,()=>!!(w||f||y)),ee=L.isValidElement(t)?{children:t}:{title:ti(t),dangerouslySetInnerHTML:{__html:t}},ie=L.isValidElement(n)?{children:n}:{title:ti(n),dangerouslySetInnerHTML:{__html:n}};return o.jsxs(ss,{variant:"outlined",onClick:W,...P,sx:{p:{xs:2,md:3},borderRadius:1,...P.sx},children:[o.jsxs(xe,{flex:1,direction:"row",gap:1,alignItems:"center",overflow:"hidden",sx:{"& > *":{flexShrink:0}},children:[o.jsx(Ft,{src:r,did:d,size:48,variant:"rounded",style:{borderRadius:"8px",overflow:"hidden"}}),o.jsx(Z,{className:"blocklet-title",fontWeight:"fontWeightMedium",sx:{fontSize:16,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",cursor:"default",pl:.5,"&&":{flexShrink:1}},...ee}),o.jsxs(q,{flex:1,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1,children:[p&&o.jsx(Pn,{title:p.tooltip,children:o.jsx(Cs,{sx:{color:p.color||"#D97706",fontSize:p.size||18}})}),T==null?void 0:T.map(H=>o.jsx(Pn,{title:H.title,children:typeof H.icon=="string"?o.jsx(It,{icon:H.icon,style:{color:H.color}}):H.icon},H.key))]}),x&&o.jsxs(At,{variant:"outlined",size:"small",disabled:f||y,style:{color:A.palette.text.primary,borderColor:A.palette.grey[300],borderRadius:8,fontSize:13,fontWeight:A.typography.fontWeightMedium},onClick:K,children:[y&&o.jsx(Pe,{size:15,style:{marginRight:3,color:"inherit"}}),g]}),w]}),o.jsx(xe,{py:2,children:o.jsx(Z,{className:"blocklet-description",variant:"body2",color:"text.secondary",sx:{display:"-webkit-box",lineClamp:2,WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",cursor:"default",height:40},...ie})}),o.jsxs(xe,{direction:"row",alignItems:"center",gap:2,color:"text.secondary",children:[o.jsx(Lt,{icon:o.jsx(Ft,{src:i,did:d,size:20,variant:"circle"}),maxWidth:200,children:s}),o.jsx(Lt,{icon:o.jsx(It,{icon:Li}),title:u,children:nc(u)}),O==null?void 0:O.filter(H=>H.align!=="right").map(H=>o.jsx(Lt,{icon:typeof H.icon=="string"?o.jsx(It,{icon:H.icon}):H.icon,title:H.title,maxWidth:H.maxWidth,children:H.text},H.key)),o.jsx(q,{sx:{flex:1}}),O==null?void 0:O.filter(H=>H.align==="right").map(H=>o.jsx(Lt,{icon:typeof H.icon=="string"?o.jsx(It,{icon:H.icon}):H.icon,title:H.title,maxWidth:H.maxWidth,sx:{color:H.color},children:H.text},H.key))]})]})}const Kc=Be("div")`
|
|
119
|
+
background-color: transparent !important;
|
|
120
|
+
& > :not(.Mui-disabled) {
|
|
121
|
+
position: relative;
|
|
122
|
+
z-index: 1;
|
|
123
|
+
&::before {
|
|
124
|
+
content: '';
|
|
125
|
+
position: absolute;
|
|
126
|
+
height: 100%;
|
|
127
|
+
width: 100%;
|
|
128
|
+
left: 0;
|
|
129
|
+
top: 0;
|
|
130
|
+
transition: opacity 0.3s;
|
|
131
|
+
}
|
|
132
|
+
&:hover::before {
|
|
133
|
+
opacity: 0;
|
|
134
|
+
}
|
|
135
|
+
&::after {
|
|
136
|
+
content: '';
|
|
137
|
+
position: absolute;
|
|
138
|
+
height: 100%;
|
|
139
|
+
width: 100%;
|
|
140
|
+
top: 0;
|
|
141
|
+
left: 0;
|
|
142
|
+
border-radius: 2px;
|
|
143
|
+
background-color: ${e=>e.theme.palette.primary.main};
|
|
144
|
+
transform: scale(0.1);
|
|
145
|
+
opacity: 0;
|
|
146
|
+
z-index: -1;
|
|
147
|
+
transition:
|
|
148
|
+
transform 0.3s,
|
|
149
|
+
opacity 0.3s,
|
|
150
|
+
background-color 0.3s;
|
|
151
|
+
}
|
|
152
|
+
&:hover::after {
|
|
153
|
+
opacity: 1;
|
|
154
|
+
transform-origin: center;
|
|
155
|
+
transform: scale(1);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
& > :not(.Mui-disabled) {
|
|
159
|
+
background-color: transparent !important;
|
|
160
|
+
color: ${e=>e.theme.palette.primary.main}!important;
|
|
161
|
+
}
|
|
162
|
+
& > :not(.Mui-disabled) {
|
|
163
|
+
&:hover {
|
|
164
|
+
color: ${e=>e.theme.palette.common.white}!important;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
`;Be("div")`
|
|
168
|
+
&.arcblock-blocklet {
|
|
169
|
+
padding: ${e=>e.theme.spacing(2)} ${e=>e.theme.spacing(2)} 0
|
|
170
|
+
${e=>e.theme.spacing(2)};
|
|
171
|
+
}
|
|
172
|
+
.arcblock-blocklet__content {
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
display: flex;
|
|
175
|
+
${e=>e.theme.breakpoints.up("sm")} {
|
|
176
|
+
align-items: center;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
.arcblock-blocklet__cover {
|
|
180
|
+
width: 64px;
|
|
181
|
+
height: 64px;
|
|
182
|
+
margin-right: ${e=>e.theme.spacing(2)};
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
border-radius: 12px;
|
|
185
|
+
/* see: https://stackoverflow.com/questions/49066011/overflow-hidden-with-border-radius-not-working-on-safari */
|
|
186
|
+
transform: translateZ(0);
|
|
187
|
+
${e=>e.theme.breakpoints.up("sm")} {
|
|
188
|
+
width: 80px;
|
|
189
|
+
height: 80px;
|
|
190
|
+
margin-bottom: 12px;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
.arcblock-blocklet__button--hover {
|
|
194
|
+
&:not(.Mui-disabled) {
|
|
195
|
+
position: relative;
|
|
196
|
+
z-index: 1;
|
|
197
|
+
&::before {
|
|
198
|
+
content: '';
|
|
199
|
+
position: absolute;
|
|
200
|
+
height: 100%;
|
|
201
|
+
width: 100%;
|
|
202
|
+
left: 0;
|
|
203
|
+
top: 0;
|
|
204
|
+
transition: opacity 0.3s;
|
|
205
|
+
}
|
|
206
|
+
&:hover::before {
|
|
207
|
+
opacity: 0;
|
|
208
|
+
}
|
|
209
|
+
&::after {
|
|
210
|
+
content: '';
|
|
211
|
+
position: absolute;
|
|
212
|
+
height: 100%;
|
|
213
|
+
width: 100%;
|
|
214
|
+
background-color: ${e=>e.theme.palette.primary.main};
|
|
215
|
+
transform: scale(0.1);
|
|
216
|
+
opacity: 0;
|
|
217
|
+
z-index: -1;
|
|
218
|
+
transition:
|
|
219
|
+
transform 0.3s,
|
|
220
|
+
opacity 0.3s,
|
|
221
|
+
background-color 0.3s;
|
|
222
|
+
}
|
|
223
|
+
&:hover::after {
|
|
224
|
+
opacity: 1;
|
|
225
|
+
transform-origin: center;
|
|
226
|
+
transform: scale(1);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&:not(.Mui-disabled) {
|
|
231
|
+
background-color: transparent !important;
|
|
232
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
233
|
+
}
|
|
234
|
+
&:not(.Mui-disabled) {
|
|
235
|
+
&:hover {
|
|
236
|
+
color: ${e=>e.theme.palette.common.white};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
.arcblock-blocklet__info {
|
|
241
|
+
flex: 1;
|
|
242
|
+
overflow: hidden;
|
|
243
|
+
border-bottom: 1px solid ${e=>e.theme.palette.divider};
|
|
244
|
+
padding-bottom: ${e=>e.theme.spacing(2)};
|
|
245
|
+
}
|
|
246
|
+
.arcblock-blocklet__text {
|
|
247
|
+
height: 65px;
|
|
248
|
+
overflow: hidden;
|
|
249
|
+
}
|
|
250
|
+
/* 设置多行文本溢出显示省略号 兼容fireFox、safari */
|
|
251
|
+
.arcblock-blocklet__title {
|
|
252
|
+
margin: 0;
|
|
253
|
+
font-size: 16px;
|
|
254
|
+
font-weight: 500;
|
|
255
|
+
overflow: hidden;
|
|
256
|
+
text-overflow: ellipsis;
|
|
257
|
+
white-space: nowrap;
|
|
258
|
+
}
|
|
259
|
+
.arcblock-blocklet__describe {
|
|
260
|
+
margin-top: ${e=>e.theme.spacing(.5)};
|
|
261
|
+
color: ${e=>e.theme.palette.grey[600]};
|
|
262
|
+
font-size: 14px;
|
|
263
|
+
font-weight: 500;
|
|
264
|
+
line-height: 17px;
|
|
265
|
+
max-height: 34px;
|
|
266
|
+
overflow: hidden;
|
|
267
|
+
text-overflow: ellipsis;
|
|
268
|
+
display: -webkit-box;
|
|
269
|
+
-webkit-line-clamp: 2;
|
|
270
|
+
-webkit-box-orient: vertical;
|
|
271
|
+
word-break: break-word;
|
|
272
|
+
}
|
|
273
|
+
.arcblock-blocklet__version {
|
|
274
|
+
color: ${e=>e.theme.palette.grey[600]};
|
|
275
|
+
font-size: 12px;
|
|
276
|
+
}
|
|
277
|
+
`;M.string||M.node,M.string,M.string||M.node,M.string,M.string,M.bool,M.bool,M.element,M.string,M.func,M.func,M.string;const Uc={meta:M.object.isRequired,onCancel:M.func.isRequired},rc=Ht(()=>({dialogAuth:{padding:"0 0 24px !important","& .auth-title":{textAlign:"center !important",marginBottom:"4px !important"},"& .auth-tip--scan":{textAlign:"center !important"}},iconRoot:{minWidth:48}}));function ic({action:e,onSelect:t,onNext:n}){const r=rc(),{t:i}=qe(),s=[{action:"purchase",title:i("store.purchase.purchase.title"),description:i("store.purchase.purchase.description")},{action:"verify",title:i("store.purchase.verify.title"),description:i("store.purchase.verify.description")}];return o.jsxs(o.Fragment,{children:[o.jsx(as,{className:r.tabPanel,children:s.map(u=>o.jsxs(fi,{button:!0,selected:e===u.action,onClick:()=>t(u.action),children:[o.jsx(ls,{className:r.iconRoot,children:u.action==="purchase"?o.jsx(Es,{style:{color:e==="purchase"?Mr.primary.main:"#AAA",fontSize:32}}):o.jsx(Is,{style:{color:e==="verify"?Mr.primary.main:"#AAA",fontSize:32}})}),o.jsx(cs,{primary:u.title,secondary:u.description})]},u.action))}),n&&o.jsx(At,{fullWidth:!0,disabled:!e,variant:"contained",color:"primary",style:{marginTop:16},onClick:n,children:i("common.next")})]})}ic.propTypes={action:M.oneOf(["both","purchase","verify"]).isRequired,onSelect:M.func.isRequired,onNext:M.func.isRequired};const oc=Ht(e=>({addMenuItemRoot:{marginTop:"8px",justifyContent:"center",color:e.palette.primary.main,lineHeight:"3.2"}}));function Zi({disabled:e,storeList:t,teamDid:n,onAdd:r,scope:i,hiddenChildren:s,open:u,onClose:d}){const{api:p}=zn(),[g,f]=L.useState(!1),[y,w]=L.useState(!0),[x,S]=L.useState(!1),[j,R]=L.useState(""),[T,O]=L.useState(""),{t:P}=qe(),A=oc(),G=async()=>{f(!0);try{const{decoded:K}=fs(j,t);await p.addBlockletStore({input:{teamDid:n,url:K,scope:i}}),r(K),S(!1),d()}catch(K){const ee=`${P("store.blockletRegistry.addFailed")} ${mt(K)}`;O(ee)}finally{f(!1)}},W=()=>{S(!1),d()};return o.jsxs(o.Fragment,{children:[!s&&o.jsxs(fi,{button:!0,disabled:e,className:A.addMenuItemRoot,onClick:()=>{S(!0)},children:[o.jsx(_s,{font:!0}),o.jsx(Z,{variant:"inherit",children:P("store.blockletRegistry.addRegistry")})]}),o.jsxs(us,{title:P("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:u||x,onClose:W,PaperProps:{style:{minHeight:"auto"}},actions:o.jsxs(o.Fragment,{children:[o.jsx(At,{onClick:K=>{K.stopPropagation(),W()},color:"inherit",children:P("common.cancel")}),o.jsxs(At,{onClick:K=>{K.stopPropagation(),G()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!j||y,variant:"contained",autoFocus:!0,children:[g&&o.jsx(Pe,{size:16}),P("common.confirm")]})]}),children:[o.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:o.jsx(ds,{component:"div",children:o.jsx(Z,{component:"div",children:o.jsx(di,{label:P("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:j,onChange:K=>{O(null);let ee=!1;K.target.value.trim()||(ee=!0),K.target.value.trim()||O(P("store.blockletRegistry.registryUrlEmpty")),R(K.target.value),w(ee)},disabled:g,onKeyPress:K=>{K.key==="Enter"&&(K.preventDefault(),K.target.value.trim()?G():O(P("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!T&&o.jsx(hs,{severity:"error",style:{width:"100%"},children:T})]})]})}Zi.propTypes={teamDid:M.string.isRequired,disabled:M.bool,storeList:M.array,onAdd:M.func,scope:M.string,hiddenChildren:M.bool,open:M.bool,onClose:M.func};Zi.defaultProps={disabled:!1,storeList:[],onAdd:()=>{},scope:"",hiddenChildren:!1,open:!1,onClose:()=>{}};var Yn={},sc=Ut;Object.defineProperty(Yn,"__esModule",{value:!0});var eo=Yn.default=void 0,ac=sc(Kt()),lc=o;eo=Yn.default=(0,ac.default)((0,lc.jsx)("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"}),"LinkOutlined");var Qn={},cc=Ut;Object.defineProperty(Qn,"__esModule",{value:!0});var to=Qn.default=void 0,uc=cc(Kt()),dc=o;to=Qn.default=(0,uc.default)((0,dc.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"BackupOutlined");var hc={};const{NODE_MODES:ni}=Fn,fc=({mode:e,previousMode:t}={})=>e===ni.SERVERLESS||t===ni.SERVERLESS||hc.ABT_NODE_DEBUG_AS_SERVERLESS==="true";var pc={isInServerlessMode:fc};function Xt({store:e,teamDid:t,onDelete:n,children:r,projectId:i="",scope:s=""}){const{api:u}=zn(),{t:d}=qe(),p=Ts(),[g,f]=L.useState(!1),[y,w]=L.useState(null),x=Ve(),S=()=>{f(!1),w(null)},j=async()=>{var O;try{f(!0),await u.deleteBlockletStore({input:{teamDid:t,url:e.url,projectId:i,scope:s}}),await((O=p==null?void 0:p.actions)==null?void 0:O.refreshBlocklet()),n&&typeof n=="function"&&n()}catch(P){Ke.error(`Remove Blocklet Store Error: ${mt(P)}`)}finally{f(!1),w(null)}},R={keyName:e.url,title:d("store.blockletRegistry.deleteRegistry"),description:d("store.blockletRegistry.deleteDesc",{name:`<b>${e.url}</b>`,color:x.palette.error.main}),confirmPlaceholder:d("store.blockletRegistry.confirmDesc",{name:e.url}),confirm:d("common.delConfirm"),cancel:d("common.cancel"),onConfirm:j,onCancel:S},T=O=>{e.protected||(O.stopPropagation(),w(R))};return o.jsxs(o.Fragment,{children:[r?o.jsx("span",{onClick:T,children:r}):o.jsx(Oe,{"data-cy":"store-action-delete",color:"primary",disabled:g,onClick:T,size:"small",children:o.jsx(mi,{sx:{zoom:.95}})}),y&&o.jsx(Ps,{keyName:y.keyName,title:y.title,description:y.description,confirmPlaceholder:y.confirmPlaceholder,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})]})}Xt.propTypes={children:M.node,teamDid:M.string.isRequired,store:M.object.isRequired,onDelete:M.func,projectId:M.string,scope:M.string};Xt.defaultProps={children:null,projectId:"",scope:"",onDelete:()=>{}};var Jn={},mc=Ut;Object.defineProperty(Jn,"__esModule",{value:!0});var no=Jn.default=void 0,gc=mc(Kt()),bc=o;no=Jn.default=(0,gc.default)((0,bc.jsx)("path",{d:"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5m-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3z"}),"LinkOff");const yc=({store:e,userDid:t})=>{var r;const n=((r=window.blocklet)==null?void 0:r.tenantMode)!==ps.BLOCKLET_TENANT_MODES.MULTIPLE;return e.protected?!1:e.scope&&e.scope===t?!0:n?e.scope==="studio":!1};function Zn({connectedStore:e,onDisconnect:t,onDelete:n,store:r,teamDid:i,projectId:s}){var O;const[u,d]=L.useState(null),p=!!u,{t:g}=qe(),{session:f}=ms(),[y,w]=L.useState(!1),x=P=>{P.stopPropagation(),window.open(yt(`${rt(r.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},S=P=>{d(P.currentTarget)},j=()=>{d(null)},R=()=>{w(!1),t()},T=[{label:g("common.visitStore"),action:x,icon:pi},{label:g("common.disconnect"),action:()=>{j(),w(!0)},icon:no,hidden:!e}];return o.jsxs(o.Fragment,{children:[o.jsx(Oe,{ref:u,color:"primary",onClick:S,size:"small",children:o.jsx(Ms,{sx:{zoom:.95}})}),o.jsxs(gs,{anchorEl:u,open:p,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[T.map(P=>P.hidden?null:o.jsxs(Nt,{dense:!0,onClick:P.action,disabled:P.disabled,children:[P.icon&&o.jsx(P.icon,{color:"action",sx:{marginRight:1}}),o.jsx(q,{color:"action",children:P.label})]},P.label)),yc({store:r,userDid:(O=f==null?void 0:f.user)==null?void 0:O.did})&&o.jsx(Xt,{store:r,onDelete:n,teamDid:i,projectId:s,scope:r.scope||"studio",children:o.jsxs(Nt,{dense:!0,disabled:r.protected,children:[o.jsx(mi,{sx:{color:r.protected?"action":"error.main",marginRight:1}}),o.jsx(q,{color:r.protected?"action":"error.main",children:g("common.delete")})]})})]}),y&&o.jsx(bs,{displayError:!0,title:`${g("common.disconnect")} ${r.name}`,description:g("blocklet.publish.disconnectStoreTip"),confirm:g("common.confirm"),onConfirm:R,onCancel:()=>w(!1)})]})}Zn.propTypes={connectedStore:M.object.isRequired,onDisconnect:M.func,onDelete:M.func,store:M.object.isRequired,teamDid:M.string.isRequired,projectId:M.string};Zn.defaultProps={projectId:"",onDelete:()=>{},onDisconnect:()=>{}};function vc({messageType:e,onOpen:t,onClose:n}){const r=L.useRef(null),i=L.useRef(null),s=async d=>{setTimeout(()=>{try{n==null||n()}catch{}},10*1e3),r.current&&(clearInterval(i.current),r.current.close());const p=Math.random().toString(36).slice(2);r.current=window.open(`${Fn.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${p}`,"_blank"),t==null||t(r.current),i.current=setInterval(()=>{(!r.current||r.current.closed)&&(r.current=null,clearInterval(i.current),setTimeout(()=>{n==null||n()},1100))},200),await Promise.resolve(d(r.current,g=>{if(!r.current){localStorage.setItem(`open-window-url-${p}`,JSON.stringify({url:g,time:Date.now()}));return}r.current.location.href=yt(g,{allowDomains:null})}))},u=pt(d=>{const{type:p,error:g}=d.data;r.current&&p===e&&g&&(Ke.error(g),n==null||n())});return L.useEffect(()=>(window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}),[u]),s}function $t({connectedStore:e,sx:t,...n}){return o.jsx(ys,{sx:{width:24,height:24,...t},src:rt(e.storeUrl,Fn.WELLKNOWN_SERVICE_PATH_PREFIX,`/user/avatar/${e.developerDid}?imageFilter=resize&w=120&h=120`),...n})}$t.propTypes={connectedStore:M.object.isRequired,sx:M.object};$t.defaultProps={sx:{}};function er({storeUrl:e,storeName:t,published:n,did:r,version:i}){const{t:s}=qe(),u=()=>{window.open(yt(`${rt(e,r&&i?`/blocklets/${r}/${i}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return o.jsxs(q,{children:[o.jsx(Z,{variant:"subtitle2",children:s(n?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:t})}),o.jsx(Oe,{size:"small",sx:{mt:1},onClick:u,variant:"contained",color:"success",children:s("common.visitTarget",{name:t})})]})}er.propTypes={storeName:M.string.isRequired,storeUrl:M.string.isRequired,published:M.bool.isRequired,did:M.string,version:M.string};er.defaultProps={did:"",version:""};const ro={CONNECT:"connect",SELECT:"select"},xc=Ht(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},box:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},menuName:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},actions:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},title:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},url:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},buttonLine:{height:"100%",width:"1px",backgroundColor:"#e0e0e0"}})),ri=Bs(({className:e,...t})=>o.jsx(Dn,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${hi.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:e.spacing(2),fontSize:e.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function io({teamDid:e,projectId:t,releaseId:n,store:r,warningList:i,onDelete:s,kind:u,published:d,connectedStore:p,releaseType:g,onPublish:f,onOpenConnectStore:y,onSelectConnectStore:w,behavior:x,scope:S="",version:j}){const R=xc(),{t:T}=qe(),{api:O,info:P,inService:A}=zn(),[G,W]=L.useState(!1),K=vc({messageType:"connect-store-message",onOpen:()=>W(!0),onClose:()=>W(!1)}),ee=u==="publish",ie=!!p,H=Q=>{if(Q.stopPropagation(),ee){window.open(yt(rt(r.url,"developer/blocklets"),{allowDomains:null}));return}window.open(yt(r.url,{allowDomains:null}))},Ee=()=>{if(x===ro.SELECT){w(r);return}K(async(Q,he)=>{try{const se=await O.connectToStore({input:{did:e,storeUrl:r.url,storeId:r.id,storeName:r.name,projectId:t}});if(!(se!=null&&se.url)){Ke.error("failed to connect to store");return}he(se.url),await y({did:e,projectId:t,storeId:r.id}),W(!1)}catch(se){const oe=mt(se);Ke.error(oe),W(!1)}})},ge=async()=>{try{await O.disconnectFromStore({input:{did:e,storeId:r.id,projectId:t,storeScope:S}}),s()}catch(Q){Ke.error(mt(Q))}},ke=()=>{W(!0),O.publishToStore({input:{did:e,storeId:r.id,storeName:r.name,projectId:t,releaseId:n,type:g}}).then(Q=>{Ke.success(o.jsx(er,{storeName:p.storeName,storeUrl:p.storeUrl,did:t,version:j,published:Q.url==="published"}),{duration:1e4}),f==null||f(null)}).catch(Q=>{Ke.error(mt(Q)),f==null||f(Q)}).finally(()=>{W(!1)})};L.useEffect(()=>{ie&&W(!1)},[ie]);const be=L.useMemo(()=>!(A&&pc.isInServerlessMode(P)),[A,P]),ye=i.length>0,N=o.jsxs(Oe,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130,height:"100%"},disabled:ye,onClick:ke,children:[G?o.jsx(Pe,{sx:{marginRight:1},size:16}):o.jsx(to,{sx:{marginRight:1,fontSize:20}}),T("common.upload")]});return o.jsxs("div",{className:R.box,children:[!ee&&G&&o.jsx(Pe,{sx:{marginRight:2},size:16}),o.jsxs("div",{className:R.menuName,children:[o.jsx(q,{sx:{display:"flex",flexDirection:"row"},children:o.jsx(Z,{component:"span",className:R.title,variant:"subtitle1",children:r.name})}),o.jsx(Z,{className:R.url,component:"span",variant:"inherit",children:`${r.url}`})]}),o.jsxs("div",{className:R.actions,children:[p&&o.jsx(ri,{placement:"top",title:o.jsxs(q,{children:[o.jsx(Z,{component:"span",variant:"caption",sx:{opacity:.7},children:T("blocklet.publish.developerInfo")}),o.jsxs(q,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[o.jsx($t,{connectedStore:p,sx:{width:42,height:42}}),o.jsxs(q,{sx:{flex:1},children:[o.jsx(Z,{component:"span",variant:"subtitle1",children:p.developerName}),o.jsx(vs,{size:14,copyable:!0,compact:!0,responsive:!1,did:p.developerDid})]})]})]}),children:o.jsx("div",{children:o.jsx($t,{connectedStore:p,sx:{marginRight:1,cursor:"help"}})})}),ee&&o.jsxs(Lr,{disabled:G,variant:"outlined",sx:{height:38},size:"small",children:[!ie&&o.jsxs(Oe,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:Ee,children:[G?o.jsx(Pe,{sx:{marginRight:1},size:16}):o.jsx(eo,{sx:{marginRight:1}}),T("common.connect")]}),ie&&d&&o.jsxs(Oe,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[G?o.jsx(Pe,{sx:{marginRight:1},size:16}):o.jsx(Rs,{sx:{marginRight:1}}),T("common.uploaded")]}),ie&&!d&&(ye?o.jsx(ri,{title:o.jsxs(q,{children:[o.jsx(q,{sx:{color:"error.main",mb:.5},children:T("blocklet.publish.storeRule.warning")}),i.map((Q,he)=>o.jsxs(q,{sx:{color:"error.main"},children:[he+1,". ",Q]},Q))]}),children:o.jsx("div",{children:N})}):N),o.jsx(Zn,{projectId:t,connectedStore:p,store:r,onDelete:s,teamDid:e,onDisconnect:ge})]}),!ee&&o.jsxs(Lr,{disabled:G,variant:"outlined",sx:{height:36},size:"small",children:[o.jsx(Oe,{"data-cy":"store-open-url",onClick:H,children:o.jsx(pi,{sx:{zoom:.9}})}),!r.protected&&be&&o.jsx(Xt,{store:r,onDelete:s,teamDid:e,scope:""})]})]})]})}io.propTypes={kind:M.string,teamDid:M.string.isRequired,published:M.bool,connectedStore:M.shape({storeName:M.string,storeId:M.string,storeUrl:M.string,developerDid:M.string,developerName:M.string}),warningList:M.array,projectId:M.string,releaseId:M.string,releaseType:M.string,store:M.shape({id:M.string.isRequired,name:M.string.isRequired,url:M.string.isRequired,protected:M.bool,connected:M.bool}).isRequired,scope:M.string,onDelete:M.func,onPublish:M.func,onOpenConnectStore:M.func,behavior:M.string,onSelectConnectStore:M.func,version:M.string};io.defaultProps={kind:"store",published:!1,connectedStore:null,releaseId:"",projectId:"",warningList:[],releaseType:"",version:"",scope:"",behavior:ro.CONNECT,onPublish:()=>{},onDelete:()=>{},onOpenConnectStore:()=>{},onSelectConnectStore:()=>{}};export{Kc as A,Hc as B,ic as C,Ac as S,Ji as a,io as b,Uc as c,$c as d,Zi as e,Nc as f,Wc as j,pc as s};
|