@abtnode/blocklet-services 1.16.33-beta-20241030-102817-90ad7cd5 → 1.16.33-beta-20241031-130110-767ce94a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/libs/connect/session.js +3 -3
- package/api/libs/kyc.js +5 -5
- package/api/libs/push-kit/index.js +6 -10
- package/api/middlewares/verify-sig.js +7 -35
- package/api/services/auth/connect/invite.js +1 -1
- package/api/services/auth/connect/login.js +2 -1
- package/api/services/auth/connect/update-kyc.js +1 -1
- package/api/services/auth/index.js +21 -0
- package/api/services/kyc/index.js +1 -1
- package/dist/assets/{Add-BuhvbaJP.js → Add-w8WVX4Xk.js} +1 -1
- package/dist/assets/{Alert-BXclFQiZ.js → Alert-DBECv8Dk.js} +1 -1
- package/dist/assets/{ArrowDropDown-D4RtOSAM.js → ArrowDropDown-D8HoHnV2.js} +1 -1
- package/dist/assets/Autocomplete-CopPr5fu.js +1 -0
- package/dist/assets/{Avatar-CU1PDmMK.js → Avatar-DxxyX-k_.js} +1 -1
- package/dist/assets/{ButtonGroup-DvLyOukY.js → ButtonGroup-C6tThDqG.js} +1 -1
- package/dist/assets/{CSSTransition-CmQ27wjk.js → CSSTransition-15IKQ8tC.js} +1 -1
- package/dist/assets/{CheckCircle-DK5rK4sE.js → CheckCircle-Dnb1dYCF.js} +1 -1
- package/dist/assets/{ChevronLeft-a4s0VWsi.js → ChevronLeft-CfHfbxYR.js} +1 -1
- package/dist/assets/{ChevronRight-D01XFLKN.js → ChevronRight-DfXjrDyG.js} +1 -1
- package/dist/assets/{Close-DoATUWkN.js → Close-CEHuSxMp.js} +1 -1
- package/dist/assets/{CloseOutlined-CZYzjcmU.js → CloseOutlined-DsS_G_PJ.js} +1 -1
- package/dist/assets/{Delete-Dk5UXao5.js → Delete-ZSqIrcgk.js} +1 -1
- package/dist/assets/{DeleteOutline-U-qMYbn7.js → DeleteOutline-Csn3uTIE.js} +1 -1
- package/dist/assets/{DialogContentText-CikEvQJO.js → DialogContentText-vfNBMZmk.js} +1 -1
- package/dist/assets/{Done-BoHYRzAH.js → Done-CemlqiD_.js} +1 -1
- package/dist/assets/{Download-BEBSlmlP.js → Download-BsmoTH3s.js} +1 -1
- package/dist/assets/{EditIcon-Bnrh7zQ2.js → EditIcon-CT0EaMpT.js} +1 -1
- package/dist/assets/{Error-C5Js2YKI.js → Error-B7k9iYaE.js} +1 -1
- package/dist/assets/{ExpandMore-D33RJFod.js → ExpandMore-D9r_eS88.js} +1 -1
- package/dist/assets/{FormControl-DMRdCQLs.js → FormControl-BjU2NH3y.js} +1 -1
- package/dist/assets/{FormControlLabel-CdNVqVaq.js → FormControlLabel-C2gffv1J.js} +1 -1
- package/dist/assets/{FormGroup-LumLdi1D.js → FormGroup-Bd3iPgM5.js} +1 -1
- package/dist/assets/{Google-CMj00R2G.js → Google-CQo1jg-a.js} +1 -1
- package/dist/assets/{Grid-DacUFAHC.js → Grid-G51OChUI.js} +1 -1
- package/dist/assets/{HelpOutline-CM2PJrIe.js → HelpOutline-Bn776zsn.js} +1 -1
- package/dist/assets/{Hidden-CBqApxXF.js → Hidden-LUQhZs-w.js} +1 -1
- package/dist/assets/{InfoOutlined-CQWaSksy.js → InfoOutlined-CDz5Mhp6.js} +1 -1
- package/dist/assets/{InputAdornment-DLVtE-Lr.js → InputAdornment-CRVgwkQ9.js} +1 -1
- package/dist/assets/{LastPage-Co36cDpZ.js → LastPage-B8G6wH6k.js} +1 -1
- package/dist/assets/{Launch-BjLFGpiP.js → Launch-mty9jus0.js} +1 -1
- package/dist/assets/{LaunchOutlined-Bz7FdIr3.js → LaunchOutlined-DVo-QKmK.js} +1 -1
- package/dist/assets/{Link-NcbVNOUv.js → Link-BMMtX5fH.js} +1 -1
- package/dist/assets/{ListItemButton-CuEJfWpW.js → ListItemButton-DdNCGCpQ.js} +1 -1
- package/dist/assets/ListSubheader-BhMsFVX-.js +1 -0
- package/dist/assets/{LoadingButton-DWp6pXN_.js → LoadingButton-tO921QzP.js} +1 -1
- package/dist/assets/{LockIcon-Bz5V3mTh.js → LockIcon-DTU4giTY.js} +1 -1
- package/dist/assets/{Loop-DIqFtGpP.js → Loop-Bj3bQOI5.js} +1 -1
- package/dist/assets/{MarkEmailRead-DqFTE73J.js → MarkEmailRead-CZVFeLGG.js} +1 -1
- package/dist/assets/{Menu-BjwutyVD.js → Menu-CXWnBcF2.js} +1 -1
- package/dist/assets/{MoreHoriz-CXjEH64l.js → MoreHoriz-BwoEUpk-.js} +1 -1
- package/dist/assets/{MoreVert-PF1NggNP.js → MoreVert-BnSgpwk3.js} +1 -1
- package/dist/assets/{OpenInNew-BkifOq3K.js → OpenInNew-I9vejj1P.js} +1 -1
- package/dist/assets/{Pagination-BfrG7RfX.js → Pagination-DlLEi_8o.js} +1 -1
- package/dist/assets/{PlayArrow-CiWUQmI-.js → PlayArrow-7GIEwKnh.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-BFMXM1VC.js → QuestionMarkCircle-CnAmHSAB.js} +1 -1
- package/dist/assets/{RadioGroup-DZefrQFL.js → RadioGroup-BT3WvzXu.js} +1 -1
- package/dist/assets/{Search-CzlBub2-.js → Search-DRpl0xea.js} +1 -1
- package/dist/assets/Select-TRN3ZncP.js +2 -0
- package/dist/assets/{ServerLogo-DCN1Dhrh.js → ServerLogo-BrH_z3Pg.js} +1 -1
- package/dist/assets/{Skeleton-5Emfs8wW.js → Skeleton-DSmjDa3c.js} +1 -1
- package/dist/assets/{Slider-J8U2Kw9e.js → Slider-GISyEXox.js} +1 -1
- package/dist/assets/{Stack-_Z2gAuxA.js → Stack-4MJdxh6I.js} +1 -1
- package/dist/assets/{Stepper-BitOpZXe.js → Stepper-Dvn_4zS7.js} +1 -1
- package/dist/assets/TextField-CQhkYpMM.js +1 -0
- package/dist/assets/{Toolbar-Bgc4EEaB.js → Toolbar-kIo5eXBU.js} +1 -1
- package/dist/assets/{ViewColumn-Ds3-xDVV.js → ViewColumn-CsFjsWag.js} +1 -1
- package/dist/assets/{ViewList-CeajtJGT.js → ViewList-Dw3g1bEO.js} +1 -1
- package/dist/assets/{access-control-DtFd3da7.js → access-control-BK21Lw2V.js} +1 -1
- package/dist/assets/{actions-BweC25e_.js → actions-CFxZdzF3.js} +1 -1
- package/dist/assets/{add-component-core-CDYLC0Tw.js → add-component-core-Bba0B_4h.js} +2 -2
- package/dist/assets/add-resource-DbOd4xW5.js +1 -0
- package/dist/assets/{addon-CPDaxNbn.js → addon-DdejitH8.js} +1 -1
- package/dist/assets/analytics-DnqUPS95.js +52 -0
- package/dist/assets/api-Bl2-YSti.js +1 -0
- package/dist/assets/{ar-CsWAxMD2.js → ar-DwhokVLj.js} +1 -1
- package/dist/assets/audit-logs-C8otdipr.js +58 -0
- package/dist/assets/{base32-B42sTZfk.js → base32-BBZELAoX.js} +1 -1
- package/dist/assets/branding-DU46ds73.js +37 -0
- package/dist/assets/{bundle-avatar-BdN0yF1i.js → bundle-avatar-CbTVaQ_M.js} +1 -1
- package/dist/assets/{button-CKBiMg-B.js → button-n_9jfCIf.js} +1 -1
- package/dist/assets/{click-to-copy-BR_BV1OB.js → click-to-copy-DptGmuUO.js} +1 -1
- package/dist/assets/{complete-ajBnay6M.js → complete-BNbCNTJu.js} +1 -1
- package/dist/assets/{component-BNsLhak7.js → component-DSUpigYV.js} +1 -1
- package/dist/assets/{config-Li44wRQx.js → config-77U-le3X.js} +1 -1
- package/dist/assets/{config-Cv2fsaLf.js → config-9il9cF0d.js} +1 -1
- package/dist/assets/{config-navigation-De6ukMqe.js → config-navigation-DcNUxLGX.js} +1 -1
- package/dist/assets/{confirm-ZZqOGxR9.js → confirm-C1rEM5YR.js} +1 -1
- package/dist/assets/{connect-DkucsoSu.js → connect-3dKIAigZ.js} +1 -1
- package/dist/assets/{connect-BrYdYlZO.js → connect-tHFesj8q.js} +1 -1
- package/dist/assets/{connect-to-BFbje_tX.js → connect-to-4aaJxXqE.js} +1 -1
- package/dist/assets/{content-layout-BxZnHkrN.js → content-layout-BM5SJrue.js} +1 -1
- package/dist/assets/{dashboard-BZ3VUNwp.js → dashboard-CzRyzKlc.js} +3 -3
- package/dist/assets/{de-mIS6PpQ1.js → de-CS8qZeoq.js} +1 -1
- package/dist/assets/{deprecate-DAqKso0o.js → deprecate-zsgH7k5s.js} +1 -1
- package/dist/assets/{did-address-9ZWWJ9us.js → did-address-DwWl4S12.js} +1 -1
- package/dist/assets/domain-BZTMEPUG.js +9 -0
- package/dist/assets/{domain-list-Dd9q9_FX.js → domain-list-DASDR2zI.js} +1 -1
- package/dist/assets/{email-nLCeenJ5.js → email-BHuQsqD5.js} +3 -3
- package/dist/assets/emotion-cache.browser.esm-DnONerVw.js +1 -0
- package/dist/assets/{es-SjtV3THj.js → es-xG0Pi6Vu.js} +1 -1
- package/dist/assets/{exchange-passport-BpXxYSLz.js → exchange-passport-BJnSn4h1.js} +1 -1
- package/dist/assets/{fallback-tJauburX.js → fallback-BpkT3yJa.js} +1 -1
- package/dist/assets/{form-text-input-CTYW53Jc.js → form-text-input-Dq-mYb-y.js} +1 -1
- package/dist/assets/format-error-Cm24Mb6K.js +2 -0
- package/dist/assets/{fr-ob22J7W8.js → fr-D_NT6aZ9.js} +1 -1
- package/dist/assets/{fuel-Cbs1bauD.js → fuel-C5E6gyYw.js} +1 -1
- package/dist/assets/{fullpage-BnlcD0xt.js → fullpage-Dv48OHgB.js} +1 -1
- package/dist/assets/{hi-CU_pVcX3.js → hi-gQURTn8d.js} +1 -1
- package/dist/assets/{home-uMe0Xd8s.js → home-Be9EmoGZ.js} +1 -1
- package/dist/assets/{id-B8NuutwY.js → id-CS1bsZtf.js} +1 -1
- package/dist/assets/{iframe-CbjJQorJ.js → iframe-Bn0BO1ke.js} +1 -1
- package/dist/assets/{index-CPSRMN2V.js → index-64TPCNae.js} +1 -1
- package/dist/assets/{index-9wo4TLHE.js → index-BE6Ke5gn.js} +1 -1
- package/dist/assets/{index-BKFM1Brp.js → index-BXfEXarc.js} +4 -4
- package/dist/assets/{index-V2YR34ND.js → index-BZiRGnQv.js} +1 -1
- package/dist/assets/{index-za03K8ah.js → index-Bi9C59qj.js} +4 -4
- package/dist/assets/{index-q29ib3lg.js → index-BiEAq9_T.js} +1 -1
- package/dist/assets/{index-CMUa3RBg.js → index-BoDR4F7z.js} +1 -1
- package/dist/assets/{index-1gRenUVL.js → index-BxmbivV2.js} +1 -1
- package/dist/assets/{index-D0CCI3Hl.js → index-C5OdroAa.js} +1 -1
- package/dist/assets/{index-jUk8eiQg.js → index-C8MAHjVt.js} +4 -4
- package/dist/assets/{index-DhN23b8j.js → index-CE6XlUwJ.js} +1 -1
- package/dist/assets/{index-DLEsNCDa.js → index-CEl72yMR.js} +1 -1
- package/dist/assets/{index-fQjWAgEu.js → index-CcoKjcPZ.js} +1 -1
- package/dist/assets/index-CmJqc_pr.js +291 -0
- package/dist/assets/{index-BESmlIJN.js → index-CqcHIeW4.js} +1 -1
- package/dist/assets/{index-CpDWCbHl.js → index-CrwNbpvE.js} +1 -1
- package/dist/assets/{index-BnR2tZ2P.js → index-CspPySnp.js} +1 -1
- package/dist/assets/{index-l7q9RzCB.js → index-D3Zi9XXS.js} +1 -1
- package/dist/assets/index-D41Nns21.js +4 -0
- package/dist/assets/{index-CgcN3n1w.js → index-D47v1fSP.js} +1 -1
- package/dist/assets/{index-BeGBbMtZ.js → index-D6JzGLsD.js} +1 -1
- package/dist/assets/{index-ZPdYa2mE.js → index-DCK3Y1u2.js} +1 -1
- package/dist/assets/{index-5jUNfq2w.js → index-DKCt9nfb.js} +1 -1
- package/dist/assets/index-DOuJwOay.js +1 -0
- package/dist/assets/{index-DIbwkm1o.js → index-DV0GJZ_u.js} +1 -1
- package/dist/assets/{index-Dqnh1P99.js → index-DgopjaBb.js} +1 -1
- package/dist/assets/{index-BznqT-_F.js → index-DvpaD3gO.js} +1 -1
- package/dist/assets/{index-6CQyAonv.js → index-E4hQM_9u.js} +1 -1
- package/dist/assets/{index-DCI63HkD.js → index-K2rlHa7x.js} +1 -1
- package/dist/assets/{index-DDZurhZd.js → index-Lpzdluz-.js} +1 -1
- package/dist/assets/{index-CrSEovwq.js → index-S4zyOh_f.js} +1 -1
- package/dist/assets/{index-BGmpmx3x.js → index-e_suJSDw.js} +4 -4
- package/dist/assets/{index-DTcrDWp-.js → index-pFa-OI2-.js} +4 -4
- package/dist/assets/{index-BabxtPtb.js → index-sZdRdnSY.js} +1 -1
- package/dist/assets/{index-ByltTxdd.js → index-tbzY0Oht.js} +1 -1
- package/dist/assets/{index.es-DWfi6Qx5.js → index.es-DUZKvvbB.js} +1 -1
- package/dist/assets/{invitation-Da4HnJYZ.js → invitation-_z1Xj-DN.js} +1 -1
- package/dist/assets/{invite-BhdJhhrG.js → invite-BICcMHub.js} +1 -1
- package/dist/assets/{isEmail-C6vUUtvk.js → isEmail-DVQRhME2.js} +1 -1
- package/dist/assets/{issue-passport-D1kt4vfn.js → issue-passport-F092lKT7.js} +1 -1
- package/dist/assets/{item-DH_a0xKg.js → item-58VHQKdW.js} +1 -1
- package/dist/assets/{ja-Uy7OpVJX.js → ja-dRhtFh3i.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-BTobZ28x.js → jss-plugin-props-sort.esm-DD0RfxgD.js} +1 -1
- package/dist/assets/{ko-DaCQeMuZ.js → ko-Bf5brKj6.js} +1 -1
- package/dist/assets/{launch-result-message-BCT6Ot6g.js → launch-result-message-DovJkIwn.js} +1 -1
- package/dist/assets/{layout-wzlST3sB.js → layout-CX--ufXj.js} +1 -1
- package/dist/assets/{list-header-B9lGrwQq.js → list-header-CK7gsYNw.js} +1 -1
- package/dist/assets/localization-B6LrUnQq.js +1 -0
- package/dist/assets/{log-c_vjKf4-.js → log-DVdMrPJd.js} +26 -14
- package/dist/assets/{login-C-IH9OwE.js → login-DQc63E-c.js} +1 -1
- package/dist/assets/{login-oauth-callback-eSuKsGqY.js → login-oauth-callback-DD7JbhiI.js} +1 -1
- package/dist/assets/logo-uploader-BDLcfxYH.js +133 -0
- package/dist/assets/{lost-passport-C-AXpR8L.js → lost-passport-DKxLM9Ug.js} +3 -3
- package/dist/assets/{lottie-DCxZqQ_w.js → lottie-AeAuO2MQ.js} +1 -1
- package/dist/assets/{notifications-Cu8vodw6.js → notifications-Bn5ZHzBu.js} +1 -1
- package/dist/assets/{open-window-XrtqitVi.js → open-window-5NGDF8DC.js} +1 -1
- package/dist/assets/overview-DTsJPc6k.js +12 -0
- package/dist/assets/{page-header-DSbeB9Fw.js → page-header-COehVty5.js} +1 -1
- package/dist/assets/{permission-B0oNf0ui.js → permission-Cqge6JOf.js} +1 -1
- package/dist/assets/{preferences-DrN4bxay.js → preferences-DA8lJH35.js} +1 -1
- package/dist/assets/{pt-BOxpawqS.js → pt-DT1ewc-i.js} +1 -1
- package/dist/assets/publish-resource-kamh1Zx5.js +1 -0
- package/dist/assets/{raf-schd.esm-Bvs1xTwL.js → raf-schd.esm-BfaLZ_aP.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-C4IOCC-P.js → react-beautiful-dnd.esm-1g48s8ci.js} +1 -1
- package/dist/assets/refType-Dpwlu3pw.js +1 -0
- package/dist/assets/{resource-dialog-99NEwTiv.js → resource-dialog-BHy7M0SS.js} +1 -1
- package/dist/assets/{ru-6GVtb7_u.js → ru-Bu6fUIp5.js} +1 -1
- package/dist/assets/sdk-De7qEvqq.js +1 -0
- package/dist/assets/{selector-MezacA1q.js → selector-B78wSPTM.js} +1 -1
- package/dist/assets/session-C7vFWF9o.js +1 -0
- package/dist/assets/setup-GIymuFZc.js +19 -0
- package/dist/assets/{shorten-label-CQ54B6Xf.js → shorten-label-DJCp0Yiv.js} +1 -1
- package/dist/assets/simple-select-b5ivFPVt.js +1 -0
- package/dist/assets/{slicedToArray-2MvrTDlG.js → slicedToArray-BApf6A7a.js} +1 -1
- package/dist/assets/{spaces-CwozzHvw.js → spaces-9zBZHE2B.js} +1 -1
- package/dist/assets/{start-CYThcgLA.js → start-CnjLydkf.js} +1 -1
- package/dist/assets/{step-actions-KZZKBOwF.js → step-actions-8KY-8Bex.js} +1 -1
- package/dist/assets/{studio-DkK4Pm_e.js → studio-X7Nwx0dT.js} +1 -1
- package/dist/assets/{switch-control-BKbjlOCN.js → switch-control-GexWf5e4.js} +1 -1
- package/dist/assets/{th-Dv20telW.js → th-Dc8W01H6.js} +1 -1
- package/dist/assets/{toUpper-DuakUn5q.js → toUpper-DTfkR7-6.js} +1 -1
- package/dist/assets/{transfer-DkFaqhXx.js → transfer-Bhn-x9WX.js} +1 -1
- package/dist/assets/{trim-JoNmnE5P.js → trim-BZY-1hvK.js} +1 -1
- package/dist/assets/{uniqBy-CHDL8lL5.js → uniqBy-BcDiFdXx.js} +1 -1
- package/dist/assets/{unsubscribe-y6XXWIyY.js → unsubscribe-D5MNNVO_.js} +1 -1
- package/dist/assets/{url-join-eN9RCMAk.js → url-join-D63J6Csv.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-iWGqHiMP.js → use-blocklet-info-for-connect-did-spaces-DeEGMQDm.js} +1 -1
- package/dist/assets/{use-mobile-CiITr0-o.js → use-mobile-C2Zyl0Iw.js} +1 -1
- package/dist/assets/{useAsync-jXWdbUYl.js → useAsync-WIvo8QcA.js} +1 -1
- package/dist/assets/{useFormControl-CWHopALS.js → useFormControl-c0TPHUQp.js} +1 -1
- package/dist/assets/{useLocalStorage-CJN2xbTj.js → useLocalStorage-BhDOt9DJ.js} +1 -1
- package/dist/assets/{useSetState-Ybjugw6L.js → useSetState-DRBw6Ay4.js} +1 -1
- package/dist/assets/{useSlot-C3ETjnzl.js → useSlot-BtZjkxjI.js} +1 -1
- package/dist/assets/{useSlotProps-D38Z1cUG.js → useSlotProps-D77uQwOK.js} +1 -1
- package/dist/assets/{useThemeProps-gYu-cV7d.js → useThemeProps-BoD_v9_f.js} +1 -1
- package/dist/assets/user-center-DQH4PW1L.js +1 -0
- package/dist/assets/{user-sessions-Befk5-7A.js → user-sessions-BjEKb9RA.js} +1 -1
- package/dist/assets/{util-DDS66i8y.js → util-BwLN-7fK.js} +1 -1
- package/dist/assets/{vi-B-VzHaKw.js → vi-CO4j8X-h.js} +1 -1
- package/dist/assets/wrap-locale-fQx_G_1w.js +1 -0
- package/dist/assets/{zh-DDshC-kD.js → zh-D3BaPKV5.js} +2 -2
- package/dist/assets/zh-tw-18T4kLe_.js +1 -0
- package/dist/assets/{zh-tw-BmDuFoYe.js → zh-tw-B7-6_fNO.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +32 -32
- package/dist/assets/Autocomplete-BbGrVwpO.js +0 -1
- package/dist/assets/InputLabel-Dv8rQIGD.js +0 -1
- package/dist/assets/Select-DxrI6-_0.js +0 -2
- package/dist/assets/TextField-Dihuo-6c.js +0 -1
- package/dist/assets/add-resource-eVrxsxaG.js +0 -1
- package/dist/assets/analytics-Dg2f8YYT.js +0 -52
- package/dist/assets/api-DzBlSnp2.js +0 -1
- package/dist/assets/audit-logs-DqcEaLyQ.js +0 -58
- package/dist/assets/branding-Dq4U1t76.js +0 -37
- package/dist/assets/domain-DNZWHRFW.js +0 -9
- package/dist/assets/emotion-cache.browser.esm-CaQ5ewfb.js +0 -1
- package/dist/assets/format-error-DCY2LFso.js +0 -2
- package/dist/assets/index-CGL-74vO.js +0 -293
- package/dist/assets/index-CwySuP27.js +0 -1
- package/dist/assets/index-uQgDHjXg.js +0 -4
- package/dist/assets/localization-DFFNMipy.js +0 -1
- package/dist/assets/logo-uploader-B5gBP8jD.js +0 -133
- package/dist/assets/overview-CQnix0I1.js +0 -12
- package/dist/assets/publish-resource-CMGOF2oO.js +0 -1
- package/dist/assets/refType-CzADmYx1.js +0 -1
- package/dist/assets/sdk-Dyx3NlaH.js +0 -1
- package/dist/assets/session-BjbXU0q-.js +0 -1
- package/dist/assets/setup-DmKj9hXW.js +0 -19
- package/dist/assets/simple-select-B0Xi7RXx.js +0 -1
- package/dist/assets/user-center-CsNNFoPX.js +0 -1
- package/dist/assets/wrap-locale-CbLkBXWp.js +0 -1
- package/dist/assets/zh-tw-BnNsaJba.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
var vd=Object.defineProperty;var bd=(i,e,t)=>e in i?vd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var xe=(i,e,t)=>bd(i,typeof e!="symbol"?e+"":e,t);import{at as yd,j as ve,iM as xd,ey as wd,f8 as _d,b7 as dt,iN as Sd,db as Ec,iO as Pd,iP as Fd,eE as Tc,e_ as Hn,eT as Nt,iQ as Rs,P as U,r as ie,co as yr,f9 as xr,n as Cd,eI as Dc,gh as kd,a3 as Oc,N as Ed,aj as Td,$ as Dd,iR as wr,O as Od,fl as _r,cD as Sr,eG as Ad,B as Us,aC as Rd,T as Ud,cs as Id,iS as Md,iT as Bd,cq as Nd}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C8MAHjVt.js","assets/index-BXfEXarc.js","assets/index-D8NuaJ66.css","assets/Grid-G51OChUI.js","assets/TextField-CQhkYpMM.js","assets/FormControl-BjU2NH3y.js","assets/useFormControl-c0TPHUQp.js","assets/Select-TRN3ZncP.js","assets/RadioGroup-BT3WvzXu.js","assets/FormControlLabel-C2gffv1J.js","assets/Stack-4MJdxh6I.js","assets/FormGroup-Bd3iPgM5.js","assets/Slider-GISyEXox.js","assets/Skeleton-DSmjDa3c.js","assets/Close-CEHuSxMp.js","assets/url-join-D63J6Csv.js","assets/index-DCK3Y1u2.js","assets/index-CspPySnp.js","assets/index-BxmbivV2.js","assets/index-64TPCNae.js","assets/index-DgopjaBb.js","assets/fallback-BpkT3yJa.js","assets/index-CEl72yMR.js","assets/Menu-CXWnBcF2.js","assets/Toolbar-kIo5eXBU.js","assets/Hidden-LUQhZs-w.js","assets/index-BZiRGnQv.js","assets/MoreVert-BnSgpwk3.js","assets/ListItemButton-DdNCGCpQ.js","assets/selector-B78wSPTM.js","assets/ExpandMore-D9r_eS88.js","assets/Avatar-DxxyX-k_.js","assets/useSlot-BtZjkxjI.js","assets/resource-dialog-BHy7M0SS.js","assets/index-CrwNbpvE.js","assets/emotion-cache.browser.esm-DnONerVw.js","assets/OpenInNew-I9vejj1P.js","assets/index-E4hQM_9u.js","assets/index-sZdRdnSY.js","assets/CloseOutlined-DsS_G_PJ.js","assets/Link-BMMtX5fH.js","assets/index-tbzY0Oht.js","assets/index-BE6Ke5gn.js","assets/index-K2rlHa7x.js","assets/index-e_suJSDw.js","assets/useThemeProps-BoD_v9_f.js","assets/toPropertyKey-PLuKRk1e.js","assets/index-DKCt9nfb.js","assets/redux-CluOqhW1.js","assets/ViewColumn-CsFjsWag.js","assets/Delete-ZSqIrcgk.js","assets/LastPage-B8G6wH6k.js","assets/Search-DRpl0xea.js","assets/deprecate-zsgH7k5s.js","assets/uniqBy-BcDiFdXx.js","assets/toUpper-DTfkR7-6.js","assets/purify.es-Bq0E5Q3l.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var vd=Object.defineProperty;var bd=(i,e,t)=>e in i?vd(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var xe=(i,e,t)=>bd(i,typeof e!="symbol"?e+"":e,t);import{at as yd,j as ve,iM as xd,ey as wd,f8 as _d,b7 as dt,iN as Sd,db as Ec,iO as Pd,iP as Fd,eE as Tc,e_ as Hn,eT as Nt,iQ as Rs,P as U,r as ie,co as yr,f9 as xr,n as Cd,eI as Dc,gh as kd,a3 as Oc,N as Ed,aj as Td,$ as Dd,iR as wr,O as Od,fl as _r,cD as Sr,eG as Ad,B as Us,aC as Rd,T as Ud,cs as Id,iS as Md,iT as Bd,cq as Nd}from"./index-BXfEXarc.js";import{j as wn}from"./url-join-D63J6Csv.js";import{p as jd}from"./index-DCK3Y1u2.js";import{u as Ld}from"./index-CspPySnp.js";import{a as zd}from"./index-BxmbivV2.js";import{c as Ee}from"./index-64TPCNae.js";import"./index-DgopjaBb.js";import"./index-BZiRGnQv.js";import{W as $d}from"./resource-dialog-BHy7M0SS.js";import"./index-tbzY0Oht.js";import"./index-BE6Ke5gn.js";import"./fallback-BpkT3yJa.js";import"./index-K2rlHa7x.js";import"./index-e_suJSDw.js";import{w as qd}from"./deprecate-zsgH7k5s.js";import{u as Ac}from"./uniqBy-BcDiFdXx.js";import{t as Hd}from"./toUpper-DTfkR7-6.js";import{p as Pr}from"./purify.es-Bq0E5Q3l.js";import"./index-CEl72yMR.js";import"./Menu-CXWnBcF2.js";import"./Toolbar-kIo5eXBU.js";import"./Hidden-LUQhZs-w.js";import"./ExpandMore-D9r_eS88.js";import"./Avatar-DxxyX-k_.js";import"./useSlot-BtZjkxjI.js";import"./MoreVert-BnSgpwk3.js";import"./FormControlLabel-C2gffv1J.js";import"./useFormControl-c0TPHUQp.js";import"./Stack-4MJdxh6I.js";import"./ListItemButton-DdNCGCpQ.js";import"./selector-B78wSPTM.js";import"./index-CrwNbpvE.js";import"./emotion-cache.browser.esm-DnONerVw.js";import"./OpenInNew-I9vejj1P.js";import"./index-E4hQM_9u.js";import"./index-sZdRdnSY.js";import"./CloseOutlined-DsS_G_PJ.js";import"./Link-BMMtX5fH.js";import"./useThemeProps-BoD_v9_f.js";import"./toPropertyKey-PLuKRk1e.js";import"./index-DKCt9nfb.js";import"./redux-CluOqhW1.js";import"./ViewColumn-CsFjsWag.js";import"./FormControl-BjU2NH3y.js";import"./FormGroup-Bd3iPgM5.js";import"./Grid-G51OChUI.js";import"./Select-TRN3ZncP.js";import"./Delete-ZSqIrcgk.js";import"./TextField-CQhkYpMM.js";import"./LastPage-B8G6wH6k.js";import"./Search-DRpl0xea.js";const Wd=yd(ve.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined");function Vd(i,e,t,a){for(var n=-1,s=i==null?0:i.length;++n<s;){var o=i[n];e(a,o,t(o),i)}return a}var Gd=Vd,Xd=xd;function Kd(i,e,t,a){return Xd(i,function(n,s,o){e(a,n,t(n),o)}),a}var Yd=Kd,Qd=Gd,Zd=Yd,Jd=wd,eh=_d;function th(i,e){return function(t,a){var n=eh(t)?Qd:Zd,s=e?e():{};return n(t,i,Jd(a),s)}}var ih=th,ah=Sd,nh=ih,sh=nh(function(i,e,t){ah(i,t,e)}),oh=sh;const Rc=dt(oh);function $a(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var rh=0;function Uc(i){return"__private_"+rh+++"_"+i}function lh(i,e,t){const a=[];return i.forEach(n=>typeof n!="string"?a.push(n):e[Symbol.split](n).forEach((s,o,r)=>{s!==""&&a.push(s),o<r.length-1&&a.push(t)})),a}/**
|
|
3
3
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
4
4
|
* and replaces it with values from options `{smart_count: 5}`
|
|
5
5
|
*
|
|
@@ -52,5 +52,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
52
52
|
<div class="uppy-ProviderBrowserItem-inner uploaded-add-item">
|
|
53
53
|
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>
|
|
54
54
|
</div>
|
|
55
|
-
`,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));xe(this,"convertImgToObject",Rs(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(p=>p.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=W0(s.originalname),[".mp4",".webm"].find(p=>{var d;return(d=a.src)==null?void 0:d.endsWith(p)})){const p=document.createElement("video");p.src=a.src,p.width=a.width,p.height=a.height,p.autoplay=!0,p.setAttribute("playsinline","playsinline"),p.muted=!0,p.loop=!0,p.style="pointer-events: none;",o.appendChild(p)}else{const p=document.createElement("object");p.data=n,p.type=s.mimetype||"image/png",p.alt=s.originalname,p.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",p.loading="lazy",o.appendChild(p)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));xe(this,"resetState",()=>{this.uploadedAPIData={...yc},this.uploaded.setPluginState({...xc}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.uploadedAPIData={...yc},this.addUploadItemFlag=!0,this.icon=()=>ue("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ue("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),ue("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),ue("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ue("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(t){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),ue("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new No(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...xc}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const wc={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,componentDid:"",components:[]},_c={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},sd={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},X0={...sd,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class K0 extends fe{constructor(t,a){super(t,a);xe(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await La.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=t.components||[],this.apiData.componentDid=t.componentDid||"",this.apiData.files=Ac([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=Rn(s,0,0,Tt);return n=Rn(s,400,0,Tt),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});xe(this,"resetState",()=>{this.apiData={...wc},this.resources.setPluginState({..._c})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.componentDid="",this.apiData={...wc},this.icon=()=>ue("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[ue("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),ue("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),ue("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(t){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),ue("div",{id:"resources",className:"uploaded",children:[ue("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ue("button",{style:this.apiData.componentDid===a.did?X0:sd,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:Hd(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new No(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({..._c}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("resources:selected",a),this.resources.parent.hideAllPanels()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var Y0=kd();const Q0=dt(Y0);var Ae=Uint8Array,yi=Uint16Array,Z0=Int32Array,od=new Ae([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rd=new Ae([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),J0=new Ae([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ld=function(i,e){for(var t=new yi(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];for(var n=new Z0(t[30]),a=1;a<30;++a)for(var s=t[a];s<t[a+1];++s)n[s]=s-t[a]<<5|a;return{b:t,r:n}},cd=ld(od,2),pd=cd.b,e1=cd.r;pd[28]=258,e1[258]=28;var t1=ld(rd,0),i1=t1.b,ko=new yi(32768);for(var Z=0;Z<32768;++Z){var Ot=(Z&43690)>>1|(Z&21845)<<1;Ot=(Ot&52428)>>2|(Ot&13107)<<2,Ot=(Ot&61680)>>4|(Ot&3855)<<4,ko[Z]=((Ot&65280)>>8|(Ot&255)<<8)>>1}var va=function(i,e,t){for(var a=i.length,n=0,s=new yi(e);n<a;++n)i[n]&&++s[i[n]-1];var o=new yi(e);for(n=1;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;var r;if(t){r=new yi(1<<e);var l=15-e;for(n=0;n<a;++n)if(i[n])for(var p=n<<4|i[n],d=e-i[n],c=o[i[n]-1]++<<d,h=c|(1<<d)-1;c<=h;++c)r[ko[c]>>l]=p}else for(r=new yi(a),n=0;n<a;++n)i[n]&&(r[n]=ko[o[i[n]-1]++]>>15-i[n]);return r},za=new Ae(288);for(var Z=0;Z<144;++Z)za[Z]=8;for(var Z=144;Z<256;++Z)za[Z]=9;for(var Z=256;Z<280;++Z)za[Z]=7;for(var Z=280;Z<288;++Z)za[Z]=8;var ud=new Ae(32);for(var Z=0;Z<32;++Z)ud[Z]=5;var a1=va(za,9,1),n1=va(ud,5,1),Ts=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},Xe=function(i,e,t){var a=e/8|0;return(i[a]|i[a+1]<<8)>>(e&7)&t},Ds=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},s1=function(i){return(i+7)/8|0},mr=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new Ae(i.subarray(e,t))},o1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],we=function(i,e,t){var a=new Error(e||o1[i]);if(a.code=i,Error.captureStackTrace&&Error.captureStackTrace(a,we),!t)throw a;return a},fr=function(i,e,t,a){var n=i.length,s=a?a.length:0;if(!n||e.f&&!e.l)return t||new Ae(0);var o=!t,r=o||e.i!=2,l=e.i;o&&(t=new Ae(n*3));var p=function(Lt){var Di=t.length;if(Lt>Di){var ht=new Ae(Math.max(Di*2,Lt));ht.set(t),t=ht}},d=e.f||0,c=e.p||0,h=e.b||0,m=e.l,v=e.d,P=e.m,f=e.n,b=n*8;do{if(!m){d=Xe(i,c,1);var S=Xe(i,c+1,3);if(c+=3,S)if(S==1)m=a1,v=n1,P=9,f=5;else if(S==2){var _=Xe(i,c,31)+257,F=Xe(i,c+10,15)+4,A=_+Xe(i,c+5,31)+1;c+=14;for(var R=new Ae(A),j=new Ae(19),N=0;N<F;++N)j[J0[N]]=Xe(i,c+N*3,7);c+=F*3;for(var X=Ts(j),W=(1<<X)-1,$=va(j,X,1),N=0;N<A;){var q=$[Xe(i,c,W)];c+=q&15;var x=q>>4;if(x<16)R[N++]=x;else{var w=0,g=0;for(x==16?(g=3+Xe(i,c,3),c+=2,w=R[N-1]):x==17?(g=3+Xe(i,c,7),c+=3):x==18&&(g=11+Xe(i,c,127),c+=7);g--;)R[N++]=w}}var y=R.subarray(0,_),C=R.subarray(_);P=Ts(y),f=Ts(C),m=va(y,P,1),v=va(C,f,1)}else we(1);else{var x=s1(c)+4,T=i[x-4]|i[x-3]<<8,E=x+T;if(E>n){l&&we(0);break}r&&p(h+T),t.set(i.subarray(x,E),h),e.b=h+=T,e.p=c=E*8,e.f=d;continue}if(c>b){l&&we(0);break}}r&&p(h+131072);for(var O=(1<<P)-1,D=(1<<f)-1,k=c;;k=c){var w=m[Ds(i,c)&O],M=w>>4;if(c+=w&15,c>b){l&&we(0);break}if(w||we(2),M<256)t[h++]=M;else if(M==256){k=c,m=null;break}else{var L=M-254;if(M>264){var N=M-257,V=od[N];L=Xe(i,c,(1<<V)-1)+pd[N],c+=V}var H=v[Ds(i,c)&D],K=H>>4;H||we(3),c+=H&15;var C=i1[K];if(K>3){var V=rd[K];C+=Ds(i,c)&(1<<V)-1,c+=V}if(c>b){l&&we(0);break}r&&p(h+131072);var Se=h+L;if(h<C){var jt=s-C,qn=Math.min(C,Se);for(jt+h<0&&we(3);h<qn;++h)t[h]=a[jt+h]}for(;h<Se;++h)t[h]=t[h-C]}}e.l=m,e.p=k,e.b=h,e.f=d,m&&(d=1,e.m=P,e.d=v,e.n=f)}while(!d);return h!=t.length&&o?mr(t,0,h):t.subarray(0,h)},r1=new Ae(0),st=function(i,e){return i[e]|i[e+1]<<8},et=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},Os=function(i,e){return et(i,e)+et(i,e+4)*4294967296},l1=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&we(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var a=(e>>3&1)+(e>>4&1);a>0;a-=!i[t++]);return t+(e&2)},c1=function(i){var e=i.length;return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0},p1=function(i,e){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&we(6,"invalid zlib data"),(i[1]>>5&1)==+!e&&we(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function dd(i,e){return fr(i,{i:2},e&&e.out,e&&e.dictionary)}function u1(i,e){var t=l1(i);return t+8>i.length&&we(6,"invalid gzip data"),fr(i.subarray(t,-8),{i:2},e&&e.out||new Ae(c1(i)),e&&e.dictionary)}function d1(i,e){return fr(i.subarray(p1(i,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function As(i,e){return i[0]==31&&i[1]==139&&i[2]==8?u1(i,e):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?dd(i,e):d1(i,e)}var Eo=typeof TextDecoder<"u"&&new TextDecoder,h1=0;try{Eo.decode(r1,{stream:!0}),h1=1}catch{}var m1=function(i){for(var e="",t=0;;){var a=i[t++],n=(a>127)+(a>223)+(a>239);if(t+n>i.length)return{s:e,r:mr(i,t-1)};n?n==3?(a=((a&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):n&1?e+=String.fromCharCode((a&31)<<6|i[t++]&63):e+=String.fromCharCode((a&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(a)}};function f1(i,e){if(e){for(var t="",a=0;a<i.length;a+=16384)t+=String.fromCharCode.apply(null,i.subarray(a,a+16384));return t}else{if(Eo)return Eo.decode(i);var n=m1(i),s=n.s,t=n.r;return t.length&&we(8),s}}var g1=function(i,e){return e+30+st(i,e+26)+st(i,e+28)},v1=function(i,e,t){var a=st(i,e+28),n=f1(i.subarray(e+46,e+46+a),!(st(i,e+8)&2048)),s=e+46+a,o=et(i,e+20),r=t&&o==4294967295?b1(i,s):[o,et(i,e+24),et(i,e+42)],l=r[0],p=r[1],d=r[2];return[st(i,e+10),l,p,n,s+st(i,e+30)+st(i,e+32),d]},b1=function(i,e){for(;st(i,e)!=1;e+=4+st(i,e+2));return[Os(i,e+12),Os(i,e+4),Os(i,e+20)]};function y1(i,e){for(var t={},a=i.length-22;et(i,a)!=101010256;--a)(!a||i.length-a>65558)&&we(13);var n=st(i,a+8);if(!n)return{};var s=et(i,a+16),o=s==4294967295||n==65535;if(o){var r=et(i,a-12);o=et(i,r)==101075792,o&&(n=et(i,r+32),s=et(i,r+48))}for(var l=e&&e.filter,p=0;p<n;++p){var d=v1(i,s,o),c=d[0],h=d[1],m=d[2],v=d[3],P=d[4],f=d[5],b=g1(i,f);s=P,(!l||l({name:v,size:h,originalSize:m,compression:c}))&&(c?c==8?t[v]=dd(i.subarray(b,b+h),{out:new Ae(m)}):we(14,"unknown compression type "+c):t[v]=mr(i,b,b+h))}return t}const rn={zip:y1,gz:As,tgz:As,deflate:As};class x1 extends fe{constructor(t,a){super(t,{...{},...a});xe(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=Q0.createHash("md5").update(await r.text()).digest("hex"),p=fa(n),d=`${l}${p?`.${p}`:""}`;this.uppy.setFileState(a,{hashFileName:d})}});xe(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{relativePath:s,name:o},hashFileName:r}=n,l=s||o||r;this.uppy.setFileMeta(a,{relativePath:l,name:l})}});xe(this,"preventXssAttack",async t=>{var s;const{id:a}=t,n=this.uppy.getFile(a);if(n){const{name:o,meta:r}=this.uppy.getFile(a),l=Pr.sanitize(o);if(o!==l){const p=fa(n),d=l.endsWith(`.${p}`)?l:`${l}.${p}`;this.uppy.setFileState(a,{name:d,meta:{...r,name:d,filename:d}})}if((s=n.type)!=null&&s.includes("image/svg")){const{data:p,name:d,type:c}=this.uppy.getFile(a),h=await p.text(),m=Pr.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["use"]});if(h!==m){const v=new Blob([m],{type:c}),P=gc(v,d);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:P})}}}});xe(this,"preventZipBombAttack",async t=>{const{id:a}=t,n=this.uppy.getFile(a);try{if(n&&rn[n.extension]){const{data:s}=n,o=rn[n.extension](new Uint8Array(await s.arrayBuffer()));let r=0;const l=(d,c)=>(r++,Object.entries(d instanceof Uint8Array?{[c||n.name]:d}:d).reduce((h,[m,v])=>{const P=h+v.byteLength;if(r>=5||P>n.size*100)throw console.error("Zip bomb detected, please check your file",{maxDepth:r,baseAcc:P,fileSize:n.size}),new Error("Zip bomb detected, please check your file");const f=ot.extension(ot.lookup(m));if(rn[f]){const b=rn[f](v);return P+l(b,m)}return P},0)),p=l(o);if(console.info(n.name,{totalUnzippedSize:p,maxDepth:r,zippedSize:n.size}),p>n.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});xe(this,"validateImagesRespectCropperOptions",async()=>this.uppy.getFiles().reduce(async(t,a)=>{var P,f,b;await t;const{id:n}=a;let s=this.uppy.getFile(n);if(s.isRemote&&(await this.tryDownloadRemoteFile(s),s=this.uppy.getFile(n)),!((P=this.opts.cropperOptions)!=null&&P.aspectRatio)||!((f=s==null?void 0:s.type)!=null&&f.includes("image"))||(b=s.type)!=null&&b.includes("image/svg"))return Promise.resolve();const{aspectRatio:o}=this.opts.cropperOptions,r=this.uppy.getPlugin("ImageEditor"),l=document.querySelector(`[src="${s.preview}"]`)||document.getElementById("uppy_"+n).querySelector("img"),p=l==null?void 0:l.naturalWidth,d=l==null?void 0:l.naturalHeight,c=Number(p/d).toFixed(2),h=Number(o).toFixed(2);if(c===h)return Promise.resolve();this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("editorLoading")}),r.parent.openFileEditor(s);const v=this.i18n("aspectRatioMessage",{imageAspectRatio:c,aspectRatio:h});return this.uppy.info({message:v,details:v}),new Promise((S,x)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{S()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve()));xe(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.preventZipBombAttack(t),await this.setMetaData(t)});xe(this,"tryDownloadRemoteFile",async t=>{var T,E;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:p,isLoading:d,remote:c,meta:h,errorCount:m=0}=t,v=!d&&r,P=`uploader:${p}:downloaded`,f=fa(t),b=(T=n==null?void 0:n.split("?"))==null?void 0:T[0],x=(()=>{const _=["jpg","jpeg"];return _.includes(f)&&_.some(F=>b==null?void 0:b.endsWith(F))?!0:b==null?void 0:b.endsWith(f)})()?b:`${b}${f?`.${f}`:""}`;if(v){const _=L0(s||((E=c==null?void 0:c.body)==null?void 0:E.url));if(m>=3)throw new Error("Download remote file failure");this.uppy.setFileState(p,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await ad.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:_}}).then(F=>F==null?void 0:F.data).then(async F=>{const A=gc(F,x);this.uppy.setFileState(p,{name:x,extension:f,type:a,data:A,preview:s||fc(A),source:o,size:A.size,isDownloading:!1,isRemote:!1,meta:{...h,name:x,filename:x}}),this.uppy.getFile(p),this.uppy.emit(P,p)}).catch(async F=>{console.error("Axios download remote file error: ",F),this.uppy.setFileState(p,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(p))})}else l&&await(async()=>new Promise(F=>{this.uppy.once(P,async()=>{F()})}))()});xe(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:fc(s)})},o.indexOf("gif")>-1?1e3:0)}});xe(this,"prepareUpload",async t=>{await this.validateImagesRespectCropperOptions();const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"PrepareUpload",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}class w1 extends fe{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ue("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ue("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ue("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ue("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return ue("div",{id:"ai-image",className:"ai-image",children:ue("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const _1="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",S1=ie.lazy(()=>Oc(()=>import("./index-jUk8eiQg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57]))),Sc="uploader-container",ln="uploader-dashboard",Si=localStorage.getItem("uppy_debug"),P1=()=>Fo.get("x-csrf-token")?{"x-csrf-token":Fo.get("x-csrf-token")}:{},F1=i=>{var c;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o}=i,{companionUrl:r}=nd(e),l=P1(),p=async h=>(await La.post("/api/image/generations",h)).data,d={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:_u,options:{quality:1,...s},alwayUse:!0},(Si||ga()&&t.Uploaded&&!vc())&&{id:"Uploaded",plugin:G0,options:{params:a==null?void 0:a.params}},(Si||ga()&&t.Resources&&!vc())&&{id:"Resources",plugin:K0,options:{params:n==null?void 0:n.params}},ga()&&z0()&&t.AIImage&&{id:"AIImage",plugin:w1,options:{companionUrl:r,companionHeaders:l},onShowPanel:h=>{function m(){setTimeout(()=>{var P,f;const v=document.getElementById("ai-image");v?Bd(v).render(ve.jsx(S1,{theme:o,api:p,restrictions:d,i18n:(f=(P=h.current)==null?void 0:P.getUploader())==null?void 0:f.i18n,onSelect:b=>{const S=h.current.getUploader();S==null||S.emit("ai-image:selected",b),b.forEach(({src:x,alt:T},E)=>{const _=R=>(R==null?void 0:R.length)>16?`${R==null?void 0:R.slice(0,8)}...${R==null?void 0:R.slice(-4)}`:R,F=`${_(T)||_(x)}.png`,A={name:F,type:"image/png",data:j0(x,F),source:"AIImage",isRemote:!1};S==null||S.addFile(A)})}})):m()},100)}m()}},{id:"Url",plugin:Ia,options:{companionUrl:r,companionHeaders:l}},{id:"Webcam",plugin:ip,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((c=window==null?void 0:window.blocklet)!=null&&c.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:_p,options:{companionUrl:r,companionHeaders:l,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:x1,options:{companionUrl:r,companionHeaders:l,cropperOptions:(s==null?void 0:s.cropperOptions)||null},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Wo,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function hd(i){const{id:e,plugins:t,locale:a,onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:p,pluginList:d,restrictions:c,onChange:h,initialFiles:m}=i,v=Rc(d,"id"),{uploaderUrl:P}=nd(r);let f=new Do({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Si||""),locale:Yu[a||"en"],onBeforeFileAdded:(x,T)=>{if(Object.hasOwn(T,x.id))return!1;const E=!!ot.extension(x.type),_=ot.lookup(x.name)||"";if(!E&&_&&_!==x.type){const F=fa(x);F&&(x.extension=F),x.type=_}return x},...o,restrictions:c}).use(Ku,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:P,async onBeforeRequest(x,T){var X,W;const{hashFileName:E,id:_,meta:F}=T,A=((X=f.getFile(_))==null?void 0:X.mockResponse)||null;x.getMethod()==="PATCH"&&A&&(x.send=()=>A);const R=fa(T);x.setHeader("x-uploader-file-name",`${E}`),x.setHeader("x-uploader-file-id",`${_}`),x.setHeader("x-uploader-file-ext",`${R}`),x.setHeader("x-uploader-base-url",new URL(x.getURL()).pathname),x.setHeader("x-uploader-endpoint-url",P),x.setHeader("x-uploader-metadata",JSON.stringify(F,($,q)=>typeof q=="string"?encodeURIComponent(q):q));const j=Fo.get("x-csrf-token");j&&x.setHeader("x-csrf-token",j);const N=(window==null?void 0:window.uploaderComponentId)||((W=window==null?void 0:window.blocklet)==null?void 0:W.componentId);N&&x.setHeader("x-component-did",(N||"").split("/").pop())},onAfterResponse:async(x,T)=>{const E={},_=x.getUnderlyingObject();try{_.response&&(E.data=JSON.parse(_.response))}catch{E.data={}}E.method=x.getMethod().toUpperCase(),E.url=x.getURL(),E.status=_.status,E.headers={...x._headers};const F=_.getAllResponseHeaders();F&&F.split(`\r
|
|
56
|
-
`).forEach(X=>{const[W,$]=X.split(": ");W&&$&&(E.headers[W]=$)});const A=f.getFile(E.headers["x-uploader-file-id"]);if(x.getMethod()==="PATCH"&&A.mockResponse)return;if(["PATCH","POST"].includes(E.method)&&[200,500].includes(E.status)){const N=[!0,"true"].includes(E.headers["x-uploader-file-exist"]),X=q0(E.url,E.headers["x-uploader-file-name"]);E.file=A,E.uploadURL=X;const W={uploadURL:X,...E};f.setFileState(A.id,{responseResult:W}),N&&A&&(E.method==="POST"&&f.setFileState(A.id,{mockResponse:T}),f.emit("upload-success",f.getFile(A.id),{...W,body:E.data}),f.emit("postprocess-complete",f.getFile(A.id)),f.calculateTotalProgress()),E.status===200&&(await(s==null?void 0:s(E)),f.emitUploadSuccess(A,E))}n&&await(n==null?void 0:n(_));const R=f.getState().totalProgress===100,j=f.getFiles().every(N=>N.source==="DropTarget");R&&j&&f.close()},...l});const b=({fileIDs:x,id:T})=>{x.forEach(E=>{f.setFileState(E,{uploadID:T})})};f.off("upload",b),f.on("upload",b);const S=x=>{typeof h=="function"&&h(x,f.getFiles())};return f.off("file-added",S),f.on("file-added",S),f.off("file-removed-success",S),f.on("file-removed-success",S),p&&f.use(ou,{target:document.body,onDrop:x=>{var T;(T=f==null?void 0:f.open)==null||T.call(f)},...p}),t==null||t.forEach(x=>{if(x){const{plugin:T,options:E}=v[x]||{};T&&f.use(T,E)}}),H0(f),m&&(m==null?void 0:m.length)>0&&f.addFiles(m),f}const Pc=ie.forwardRef((i,e)=>{var N,X,W,$,q,w,g,y,C,O,D;const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,...i==null?void 0:i.apiPathProps},a=ie.useRef(null),n=Ed({open:!1,uppy:null,availablePluginMap:{},restrictions:{}}),s=Td(),o=F1({...i,apiPathProps:t,availablePluginMap:n.availablePluginMap,restrictions:n.restrictions,theme:s}),{plugins:r=o.map(k=>k.id),id:l="Uploader",popup:p=!1,uploadedProps:d,resourcesProps:c,onOpen:h,onClose:m,locale:v,installerProps:P}=i,f=Rc(o,"id"),b=Dd(k=>{var M;return(M=k==null?void 0:k.breakpoints)==null?void 0:M.down("md")}),S=wr([...r,...o.filter(k=>k.alwayUse).map(k=>k.id)]),{loading:x}=Od(async()=>{var M,L,V,H,K;let k=_r((M=i==null?void 0:i.coreProps)==null?void 0:M.restrictions)?{}:Sr.cloneDeep((L=i==null?void 0:i.coreProps)==null?void 0:L.restrictions);if(ga())try{await La.get("/api/uploader/status").then(({data:Se})=>{var jt;n.availablePluginMap=Se.availablePluginMap,!t.disableMediaKitPrefix&&_r((jt=i==null?void 0:i.coreProps)==null?void 0:jt.restrictions)&&(k=Se.restrictions||{})})}catch{}!((V=k==null?void 0:k.allowedFileTypes)!=null&&V.length)&&(k!=null&&k.allowedFileExts)&&(k.allowedFileTypes=wr((K=(H=(typeof(k==null?void 0:k.allowedFileExts)=="string"?k==null?void 0:k.allowedFileExts.split(","):k==null?void 0:k.allowedFileExts)||[])==null?void 0:H.map(Se=>ot.lookup((Se==null?void 0:Se.replaceAll(" ",""))||"")))==null?void 0:K.filter(Se=>Se)),delete k.allowedFileExts),k.maxFileSize&&typeof k.maxFileSize=="string"&&(k.maxFileSize=Q.parseSize(k.maxFileSize,{iec:!1})||void 0),n.restrictions=Sr.cloneDeep(k)},{refreshDeps:[JSON.stringify({apiPathProps:t,restrictionsProps:(N=i==null?void 0:i.coreProps)==null?void 0:N.restrictions})]});Ld("esc",k=>{n.open&&(k.stopPropagation(),k.preventDefault(),F())},{useCapture:!0}),ie.useEffect(()=>{$0(t),n.uppy=hd({...i,id:l,plugins:S,apiPathProps:t,pluginList:o,restrictions:n.restrictions}),n.uppy.open=_,n.uppy.close=F,n.uppy.openPlugin=T;const k=V=>{const{onShowPanel:H}=f[V];H==null||H(e)};n.uppy.off("dashboard:show-panel",k),n.uppy.on("dashboard:show-panel",k);const M=(V,H,K,Se)=>{var Lt,Di;const jt=V.map(ht=>{var gr,vr,br;const fd={name:ht.id||((br=(vr=(gr=ht.fileUrl)==null?void 0:gr.split("/"))==null?void 0:vr.slice(-1))==null?void 0:br[0]),type:ht.mimetype||ot.lookup(ht.fileUrl),data:"",preview:ht.fileUrl,source:Se,isRemote:!0},gd=H.uppy.addFile(fd);return{...ht,uppyFile:H.uppy.getFile(gd)}}),qn=`${Se.toLowerCase()}Props`;(Di=(Lt=K[qn])==null?void 0:Lt.onSelectedFiles)==null||Di.call(Lt,jt)};[{name:"Uploaded",event:"uploaded:selected"},{name:"Resources",event:"resources:selected"}].forEach(({name:V,event:H})=>{S.includes(V)&&(n.uppy.off(H),n.uppy.on(H,K=>M(K,n,i,V)))})},[JSON.stringify({id:l,plugins:S,apiPathProps:t,locale:v,restrictions:n.restrictions,theme:s})]);function T(k){var M,L,V;if(k=k.replace(/\s/g,""),["MyDevice",...S].map(H=>H.toLowerCase()).includes(k.toLowerCase())){let H=`div[data-uppy-acquirer-id="${k}"] > button`;(V=(L=(M=document==null?void 0:document.getElementById(ln))==null?void 0:M.querySelector(H))==null?void 0:L.click)==null||V.call(L)}}const E=ie.useCallback(k=>{Si&&a.current&&!a.current.contains(k.target)&&console.info("debug focus",a.current,k.target)},[]);function _(k){var L,V,H,K;n.open=!0,k&&setTimeout(()=>{T(k)},200),n.uppy.emitOpen(),h==null||h(),(V=(L=document.activeElement)==null?void 0:L.blur)==null||V.call(L);const M=n.uppy.getPlugin(ln).el;(H=M==null?void 0:M.focus)==null||H.call(M),(K=M==null?void 0:M.click)==null||K.call(M),Si&&p&&(document.addEventListener("mousedown",E),document.addEventListener("touchstart",E))}function F(){var k;(k=n.uppy.getPlugin(ln))==null||k.hideAllPanels(),n.open=!1,n.uppy.emitClose(),m==null||m(),setTimeout(()=>{n.uppy.getState().totalProgress===100&&(n.uppy.setState({files:{},currentUploads:{}}),n.uppy.calculateTotalProgress())},500),Si&&p&&(document.removeEventListener("mousedown",E),document.removeEventListener("touchstart",E))}ie.useImperativeHandle(e,()=>({getUploader:()=>n.uppy,open:_,close:F}));const A=p?Md:ie.Fragment,R=p?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:n.open?"block":"none"},...(X=i==null?void 0:i.wrapperProps)==null?void 0:X.sx},invisible:!0,open:n.open,onClick:k=>{document.activeElement===document.body&&(k.stopPropagation(),F())},...i.wrapperProps}:{...i.wrapperProps},j=b?"42px":"40px";return ve.jsx(A,{...R,children:ve.jsxs($d,{onClose:F,did:_1,disabled:!n.open,...P,children:[ve.jsx(Ad,{styles:()=>({".uppy-is-drag-over":{"&::after":{transition:"all 0.3s ease-in-out",border:"2px dashed #bbb !important",borderRadius:4,background:"rgba(234, 234, 234, 0.5)"}}})}),ve.jsxs(Us,{className:"uploader-container",ref:a,id:Sc,onClick:k=>k.stopPropagation(),sx:{position:"relative",width:b?"90vw":720,".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{background:"repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px !important"},".uploaded-add-item":{background:"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:"rgba(0,0,0,0.13)"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{background:"#fff",height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%"},"& .uppy-ProviderBrowser-header":{display:"none"}},"& .uppy-Url":{width:"100% !important",display:"flex",justifyContent:"center","& input":{width:"70%"}},"& .uppy-Dashboard-browse, & .uppy-DashboardContent-addMore, & .uppy-DashboardContent-back, & .uppy-StatusBar-actionBtn--done, & .uppy-DashboardContent-save, & .uppy-StatusBar-actionBtn--upload":{color:`${($=(W=s==null?void 0:s.palette)==null?void 0:W.primary)==null?void 0:$.main}`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{color:`${(w=(q=s==null?void 0:s.palette)==null?void 0:q.primary)==null?void 0:w.main}`,filter:"brightness(1.2)"}},"& .uppy-c-btn-primary":{backgroundColor:`${(y=(g=s==null?void 0:s.palette)==null?void 0:g.primary)==null?void 0:y.main} !important`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{backgroundColor:`${(O=(C=s==null?void 0:s.palette)==null?void 0:C.primary)==null?void 0:O.main} !important`,filter:"brightness(1.2)"}}},children:[p&&ve.jsx(Rd,{"aria-label":"close",onClick:F,sx:{color:"#fafafa",position:"absolute",...b?{bottom:`calc(0px - ${j} - 16px)`,left:`calc(50vw - ${j} - 8px)`}:{right:`calc(0px - ${j} - 16px)`,top:-12}},children:ve.jsx(Wd,{sx:{fontSize:j}})}),x&&ve.jsxs(Us,{sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:99999999999,flexDirection:"column",background:"rgba(256, 256, 256, 0.2)",backdropFilter:"blur(4px)",borderRadius:1,pointerEvents:"none"},children:[ve.jsx(B0,{size:32}),ve.jsx(Ud,{variant:"body2",color:"primary",sx:{mt:1.5,fontWeight:"bold"},children:Id(Yu,`${v}.strings.loadingStatus`)})]}),n.uppy&&ve.jsx(Yp,{inline:!0,target:`#${Sc}`,id:ln,uppy:n.uppy,plugins:S,fileManagerSelectionType:((D=n.restrictions)==null?void 0:D.maxNumberOfFiles)===1?"files":"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:"",doneButtonHandler:F,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),C1=Object.freeze(Object.defineProperty({__proto__:null,Uploader:Pc,default:Pc,initUploader:hd},Symbol.toStringTag,{value:"Module"})),Fc=ie.lazy(()=>Oc(()=>Promise.resolve().then(()=>C1),void 0).then(i=>({default:i.Uploader}))),md=ie.createContext(null);function k1(){const i=ie.useContext(md);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function Aw({onChange:i,children:e,...t}){const a=k1(),n=()=>{var o;const s=(o=a==null?void 0:a.current)==null?void 0:o.getUploader();s==null||s.open(),i&&s.onceUploadSuccess((...r)=>{i(...r)})};return ve.jsx(Us,{onClick:n,...t,children:e})}function Rw({children:i,popup:e,...t}){const a=ie.useRef(null),n=ie.useMemo(()=>e?Nd.createPortal(ve.jsx(Fc,{ref:a,popup:!0,...t},"uploader"),document.body):ve.jsx(Fc,{ref:a,popup:!1,...t},"uploader"),[a,e,t]);return ve.jsxs(md.Provider,{value:a,children:[i,n]})}export{Es as CLOSE,ks as OPEN,bc as UPLOADER_UPLOAD_SUCCESS,Pc as Uploader,md as UploaderContext,Rw as UploaderProvider,Aw as UploaderTrigger,ad as api,j0 as base64ToFile,gc as blobToFile,Rn as createImageUrl,z0 as getAIKitComponent,L0 as getDownloadUrl,fa as getExt,ga as getMediaKitComponent,fc as getObjectURL,nd as getUploaderEndpoint,q0 as getUrl,hd as initUploader,H0 as initUppy,N0 as isBlob,vc as isMediaKit,La as mediaKitApi,Tt as mediaKitMountPoint,W0 as parseStringToDot,pi as prefixPath,$0 as setPrefixPath,k1 as useUploaderContext};
|
|
55
|
+
`,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));xe(this,"convertImgToObject",Rs(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(p=>p.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=W0(s.originalname),[".mp4",".webm"].find(p=>{var d;return(d=a.src)==null?void 0:d.endsWith(p)})){const p=document.createElement("video");p.src=a.src,p.width=a.width,p.height=a.height,p.autoplay=!0,p.setAttribute("playsinline","playsinline"),p.muted=!0,p.loop=!0,p.style="pointer-events: none;",o.appendChild(p)}else{const p=document.createElement("object");p.data=n,p.type=s.mimetype||"image/png",p.alt=s.originalname,p.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",p.loading="lazy",o.appendChild(p)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));xe(this,"resetState",()=>{this.uploadedAPIData={...yc},this.uploaded.setPluginState({...xc}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.uploadedAPIData={...yc},this.addUploadItemFlag=!0,this.icon=()=>ue("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ue("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),ue("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),ue("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ue("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(t){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),ue("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new No(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...xc}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const wc={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,componentDid:"",components:[]},_c={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},sd={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},X0={...sd,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class K0 extends fe{constructor(t,a){super(t,a);xe(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await La.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=t.components||[],this.apiData.componentDid=t.componentDid||"",this.apiData.files=Ac([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=Rn(s,0,0,Tt);return n=Rn(s,400,0,Tt),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});xe(this,"resetState",()=>{this.apiData={...wc},this.resources.setPluginState({..._c})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.componentDid="",this.apiData={...wc},this.icon=()=>ue("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[ue("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),ue("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),ue("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(t){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),ue("div",{id:"resources",className:"uploaded",children:[ue("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ue("button",{style:this.apiData.componentDid===a.did?X0:sd,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:Hd(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new No(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({..._c}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("resources:selected",a),this.resources.parent.hideAllPanels()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var Y0=kd();const Q0=dt(Y0);var Ae=Uint8Array,yi=Uint16Array,Z0=Int32Array,od=new Ae([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rd=new Ae([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),J0=new Ae([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ld=function(i,e){for(var t=new yi(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];for(var n=new Z0(t[30]),a=1;a<30;++a)for(var s=t[a];s<t[a+1];++s)n[s]=s-t[a]<<5|a;return{b:t,r:n}},cd=ld(od,2),pd=cd.b,e1=cd.r;pd[28]=258,e1[258]=28;var t1=ld(rd,0),i1=t1.b,ko=new yi(32768);for(var Z=0;Z<32768;++Z){var Ot=(Z&43690)>>1|(Z&21845)<<1;Ot=(Ot&52428)>>2|(Ot&13107)<<2,Ot=(Ot&61680)>>4|(Ot&3855)<<4,ko[Z]=((Ot&65280)>>8|(Ot&255)<<8)>>1}var va=function(i,e,t){for(var a=i.length,n=0,s=new yi(e);n<a;++n)i[n]&&++s[i[n]-1];var o=new yi(e);for(n=1;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;var r;if(t){r=new yi(1<<e);var l=15-e;for(n=0;n<a;++n)if(i[n])for(var p=n<<4|i[n],d=e-i[n],c=o[i[n]-1]++<<d,h=c|(1<<d)-1;c<=h;++c)r[ko[c]>>l]=p}else for(r=new yi(a),n=0;n<a;++n)i[n]&&(r[n]=ko[o[i[n]-1]++]>>15-i[n]);return r},za=new Ae(288);for(var Z=0;Z<144;++Z)za[Z]=8;for(var Z=144;Z<256;++Z)za[Z]=9;for(var Z=256;Z<280;++Z)za[Z]=7;for(var Z=280;Z<288;++Z)za[Z]=8;var ud=new Ae(32);for(var Z=0;Z<32;++Z)ud[Z]=5;var a1=va(za,9,1),n1=va(ud,5,1),Ts=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},Xe=function(i,e,t){var a=e/8|0;return(i[a]|i[a+1]<<8)>>(e&7)&t},Ds=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},s1=function(i){return(i+7)/8|0},mr=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new Ae(i.subarray(e,t))},o1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],we=function(i,e,t){var a=new Error(e||o1[i]);if(a.code=i,Error.captureStackTrace&&Error.captureStackTrace(a,we),!t)throw a;return a},fr=function(i,e,t,a){var n=i.length,s=a?a.length:0;if(!n||e.f&&!e.l)return t||new Ae(0);var o=!t,r=o||e.i!=2,l=e.i;o&&(t=new Ae(n*3));var p=function(Lt){var Di=t.length;if(Lt>Di){var ht=new Ae(Math.max(Di*2,Lt));ht.set(t),t=ht}},d=e.f||0,c=e.p||0,h=e.b||0,m=e.l,v=e.d,P=e.m,f=e.n,b=n*8;do{if(!m){d=Xe(i,c,1);var S=Xe(i,c+1,3);if(c+=3,S)if(S==1)m=a1,v=n1,P=9,f=5;else if(S==2){var _=Xe(i,c,31)+257,F=Xe(i,c+10,15)+4,A=_+Xe(i,c+5,31)+1;c+=14;for(var R=new Ae(A),j=new Ae(19),N=0;N<F;++N)j[J0[N]]=Xe(i,c+N*3,7);c+=F*3;for(var X=Ts(j),W=(1<<X)-1,$=va(j,X,1),N=0;N<A;){var q=$[Xe(i,c,W)];c+=q&15;var x=q>>4;if(x<16)R[N++]=x;else{var w=0,g=0;for(x==16?(g=3+Xe(i,c,3),c+=2,w=R[N-1]):x==17?(g=3+Xe(i,c,7),c+=3):x==18&&(g=11+Xe(i,c,127),c+=7);g--;)R[N++]=w}}var y=R.subarray(0,_),C=R.subarray(_);P=Ts(y),f=Ts(C),m=va(y,P,1),v=va(C,f,1)}else we(1);else{var x=s1(c)+4,T=i[x-4]|i[x-3]<<8,E=x+T;if(E>n){l&&we(0);break}r&&p(h+T),t.set(i.subarray(x,E),h),e.b=h+=T,e.p=c=E*8,e.f=d;continue}if(c>b){l&&we(0);break}}r&&p(h+131072);for(var O=(1<<P)-1,D=(1<<f)-1,k=c;;k=c){var w=m[Ds(i,c)&O],M=w>>4;if(c+=w&15,c>b){l&&we(0);break}if(w||we(2),M<256)t[h++]=M;else if(M==256){k=c,m=null;break}else{var L=M-254;if(M>264){var N=M-257,V=od[N];L=Xe(i,c,(1<<V)-1)+pd[N],c+=V}var H=v[Ds(i,c)&D],K=H>>4;H||we(3),c+=H&15;var C=i1[K];if(K>3){var V=rd[K];C+=Ds(i,c)&(1<<V)-1,c+=V}if(c>b){l&&we(0);break}r&&p(h+131072);var Se=h+L;if(h<C){var jt=s-C,qn=Math.min(C,Se);for(jt+h<0&&we(3);h<qn;++h)t[h]=a[jt+h]}for(;h<Se;++h)t[h]=t[h-C]}}e.l=m,e.p=k,e.b=h,e.f=d,m&&(d=1,e.m=P,e.d=v,e.n=f)}while(!d);return h!=t.length&&o?mr(t,0,h):t.subarray(0,h)},r1=new Ae(0),st=function(i,e){return i[e]|i[e+1]<<8},et=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},Os=function(i,e){return et(i,e)+et(i,e+4)*4294967296},l1=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&we(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var a=(e>>3&1)+(e>>4&1);a>0;a-=!i[t++]);return t+(e&2)},c1=function(i){var e=i.length;return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0},p1=function(i,e){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&we(6,"invalid zlib data"),(i[1]>>5&1)==+!e&&we(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function dd(i,e){return fr(i,{i:2},e&&e.out,e&&e.dictionary)}function u1(i,e){var t=l1(i);return t+8>i.length&&we(6,"invalid gzip data"),fr(i.subarray(t,-8),{i:2},e&&e.out||new Ae(c1(i)),e&&e.dictionary)}function d1(i,e){return fr(i.subarray(p1(i,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function As(i,e){return i[0]==31&&i[1]==139&&i[2]==8?u1(i,e):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?dd(i,e):d1(i,e)}var Eo=typeof TextDecoder<"u"&&new TextDecoder,h1=0;try{Eo.decode(r1,{stream:!0}),h1=1}catch{}var m1=function(i){for(var e="",t=0;;){var a=i[t++],n=(a>127)+(a>223)+(a>239);if(t+n>i.length)return{s:e,r:mr(i,t-1)};n?n==3?(a=((a&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):n&1?e+=String.fromCharCode((a&31)<<6|i[t++]&63):e+=String.fromCharCode((a&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(a)}};function f1(i,e){if(e){for(var t="",a=0;a<i.length;a+=16384)t+=String.fromCharCode.apply(null,i.subarray(a,a+16384));return t}else{if(Eo)return Eo.decode(i);var n=m1(i),s=n.s,t=n.r;return t.length&&we(8),s}}var g1=function(i,e){return e+30+st(i,e+26)+st(i,e+28)},v1=function(i,e,t){var a=st(i,e+28),n=f1(i.subarray(e+46,e+46+a),!(st(i,e+8)&2048)),s=e+46+a,o=et(i,e+20),r=t&&o==4294967295?b1(i,s):[o,et(i,e+24),et(i,e+42)],l=r[0],p=r[1],d=r[2];return[st(i,e+10),l,p,n,s+st(i,e+30)+st(i,e+32),d]},b1=function(i,e){for(;st(i,e)!=1;e+=4+st(i,e+2));return[Os(i,e+12),Os(i,e+4),Os(i,e+20)]};function y1(i,e){for(var t={},a=i.length-22;et(i,a)!=101010256;--a)(!a||i.length-a>65558)&&we(13);var n=st(i,a+8);if(!n)return{};var s=et(i,a+16),o=s==4294967295||n==65535;if(o){var r=et(i,a-12);o=et(i,r)==101075792,o&&(n=et(i,r+32),s=et(i,r+48))}for(var l=e&&e.filter,p=0;p<n;++p){var d=v1(i,s,o),c=d[0],h=d[1],m=d[2],v=d[3],P=d[4],f=d[5],b=g1(i,f);s=P,(!l||l({name:v,size:h,originalSize:m,compression:c}))&&(c?c==8?t[v]=dd(i.subarray(b,b+h),{out:new Ae(m)}):we(14,"unknown compression type "+c):t[v]=mr(i,b,b+h))}return t}const rn={zip:y1,gz:As,tgz:As,deflate:As};class x1 extends fe{constructor(t,a){super(t,{...{},...a});xe(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=Q0.createHash("md5").update(await r.text()).digest("hex"),p=fa(n),d=`${l}${p?`.${p}`:""}`;this.uppy.setFileState(a,{hashFileName:d})}});xe(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{relativePath:s,name:o},hashFileName:r}=n,l=s||o||r;this.uppy.setFileMeta(a,{relativePath:l,name:l})}});xe(this,"preventXssAttack",async t=>{var s;const{id:a}=t,n=this.uppy.getFile(a);if(n){const{name:o,meta:r}=this.uppy.getFile(a),l=Pr.sanitize(o);if(o!==l){const p=fa(n),d=l.endsWith(`.${p}`)?l:`${l}.${p}`;this.uppy.setFileState(a,{name:d,meta:{...r,name:d,filename:d}})}if((s=n.type)!=null&&s.includes("image/svg")){const{data:p,name:d,type:c}=this.uppy.getFile(a),h=await p.text(),m=Pr.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:["use"]});if(h!==m){const v=new Blob([m],{type:c}),P=gc(v,d);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:P})}}}});xe(this,"preventZipBombAttack",async t=>{const{id:a}=t,n=this.uppy.getFile(a);try{if(n&&rn[n.extension]){const{data:s}=n,o=rn[n.extension](new Uint8Array(await s.arrayBuffer()));let r=0;const l=(d,c)=>(r++,Object.entries(d instanceof Uint8Array?{[c||n.name]:d}:d).reduce((h,[m,v])=>{const P=h+v.byteLength;if(r>=5||P>n.size*100)throw console.error("Zip bomb detected, please check your file",{maxDepth:r,baseAcc:P,fileSize:n.size}),new Error("Zip bomb detected, please check your file");const f=ot.extension(ot.lookup(m));if(rn[f]){const b=rn[f](v);return P+l(b,m)}return P},0)),p=l(o);if(console.info(n.name,{totalUnzippedSize:p,maxDepth:r,zippedSize:n.size}),p>n.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});xe(this,"validateImagesRespectCropperOptions",async()=>this.uppy.getFiles().reduce(async(t,a)=>{var P,f,b;await t;const{id:n}=a;let s=this.uppy.getFile(n);if(s.isRemote&&(await this.tryDownloadRemoteFile(s),s=this.uppy.getFile(n)),!((P=this.opts.cropperOptions)!=null&&P.aspectRatio)||!((f=s==null?void 0:s.type)!=null&&f.includes("image"))||(b=s.type)!=null&&b.includes("image/svg"))return Promise.resolve();const{aspectRatio:o}=this.opts.cropperOptions,r=this.uppy.getPlugin("ImageEditor"),l=document.querySelector(`[src="${s.preview}"]`)||document.getElementById("uppy_"+n).querySelector("img"),p=l==null?void 0:l.naturalWidth,d=l==null?void 0:l.naturalHeight,c=Number(p/d).toFixed(2),h=Number(o).toFixed(2);if(c===h)return Promise.resolve();this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("editorLoading")}),r.parent.openFileEditor(s);const v=this.i18n("aspectRatioMessage",{imageAspectRatio:c,aspectRatio:h});return this.uppy.info({message:v,details:v}),new Promise((S,x)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{S()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve()));xe(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.preventZipBombAttack(t),await this.setMetaData(t)});xe(this,"tryDownloadRemoteFile",async t=>{var T,E;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:p,isLoading:d,remote:c,meta:h,errorCount:m=0}=t,v=!d&&r,P=`uploader:${p}:downloaded`,f=fa(t),b=(T=n==null?void 0:n.split("?"))==null?void 0:T[0],x=(()=>{const _=["jpg","jpeg"];return _.includes(f)&&_.some(F=>b==null?void 0:b.endsWith(F))?!0:b==null?void 0:b.endsWith(f)})()?b:`${b}${f?`.${f}`:""}`;if(v){const _=L0(s||((E=c==null?void 0:c.body)==null?void 0:E.url));if(m>=3)throw new Error("Download remote file failure");this.uppy.setFileState(p,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await ad.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:_}}).then(F=>F==null?void 0:F.data).then(async F=>{const A=gc(F,x);this.uppy.setFileState(p,{name:x,extension:f,type:a,data:A,preview:s||fc(A),source:o,size:A.size,isDownloading:!1,isRemote:!1,meta:{...h,name:x,filename:x}}),this.uppy.getFile(p),this.uppy.emit(P,p)}).catch(async F=>{console.error("Axios download remote file error: ",F),this.uppy.setFileState(p,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(p))})}else l&&await(async()=>new Promise(F=>{this.uppy.once(P,async()=>{F()})}))()});xe(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:fc(s)})},o.indexOf("gif")>-1?1e3:0)}});xe(this,"prepareUpload",async t=>{await this.validateImagesRespectCropperOptions();const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"PrepareUpload",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}class w1 extends fe{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ue("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ue("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ue("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ue("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return ue("div",{id:"ai-image",className:"ai-image",children:ue("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const _1="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",S1=ie.lazy(()=>Oc(()=>import("./index-C8MAHjVt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56]))),Sc="uploader-container",ln="uploader-dashboard",Si=localStorage.getItem("uppy_debug"),P1=()=>Fo.get("x-csrf-token")?{"x-csrf-token":Fo.get("x-csrf-token")}:{},F1=i=>{var c;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o}=i,{companionUrl:r}=nd(e),l=P1(),p=async h=>(await La.post("/api/image/generations",h)).data,d={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:_u,options:{quality:1,...s},alwayUse:!0},(Si||ga()&&t.Uploaded&&!vc())&&{id:"Uploaded",plugin:G0,options:{params:a==null?void 0:a.params}},(Si||ga()&&t.Resources&&!vc())&&{id:"Resources",plugin:K0,options:{params:n==null?void 0:n.params}},ga()&&z0()&&t.AIImage&&{id:"AIImage",plugin:w1,options:{companionUrl:r,companionHeaders:l},onShowPanel:h=>{function m(){setTimeout(()=>{var P,f;const v=document.getElementById("ai-image");v?Bd(v).render(ve.jsx(S1,{theme:o,api:p,restrictions:d,i18n:(f=(P=h.current)==null?void 0:P.getUploader())==null?void 0:f.i18n,onSelect:b=>{const S=h.current.getUploader();S==null||S.emit("ai-image:selected",b),b.forEach(({src:x,alt:T},E)=>{const _=R=>(R==null?void 0:R.length)>16?`${R==null?void 0:R.slice(0,8)}...${R==null?void 0:R.slice(-4)}`:R,F=`${_(T)||_(x)}.png`,A={name:F,type:"image/png",data:j0(x,F),source:"AIImage",isRemote:!1};S==null||S.addFile(A)})}})):m()},100)}m()}},{id:"Url",plugin:Ia,options:{companionUrl:r,companionHeaders:l}},{id:"Webcam",plugin:ip,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((c=window==null?void 0:window.blocklet)!=null&&c.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:_p,options:{companionUrl:r,companionHeaders:l,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:x1,options:{companionUrl:r,companionHeaders:l,cropperOptions:(s==null?void 0:s.cropperOptions)||null},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Wo,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function hd(i){const{id:e,plugins:t,locale:a,onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:p,pluginList:d,restrictions:c,onChange:h,initialFiles:m}=i,v=Rc(d,"id"),{uploaderUrl:P}=nd(r);let f=new Do({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Si||""),locale:Yu[a||"en"],onBeforeFileAdded:(x,T)=>{if(Object.hasOwn(T,x.id))return!1;const E=!!ot.extension(x.type),_=ot.lookup(x.name)||"";if(!E&&_&&_!==x.type){const F=fa(x);F&&(x.extension=F),x.type=_}return x},...o,restrictions:c}).use(Ku,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:P,async onBeforeRequest(x,T){var X,W;const{hashFileName:E,id:_,meta:F}=T,A=((X=f.getFile(_))==null?void 0:X.mockResponse)||null;x.getMethod()==="PATCH"&&A&&(x.send=()=>A);const R=fa(T);x.setHeader("x-uploader-file-name",`${E}`),x.setHeader("x-uploader-file-id",`${_}`),x.setHeader("x-uploader-file-ext",`${R}`),x.setHeader("x-uploader-base-url",new URL(x.getURL()).pathname),x.setHeader("x-uploader-endpoint-url",P),x.setHeader("x-uploader-metadata",JSON.stringify(F,($,q)=>typeof q=="string"?encodeURIComponent(q):q));const j=Fo.get("x-csrf-token");j&&x.setHeader("x-csrf-token",j);const N=(window==null?void 0:window.uploaderComponentId)||((W=window==null?void 0:window.blocklet)==null?void 0:W.componentId);N&&x.setHeader("x-component-did",(N||"").split("/").pop())},onAfterResponse:async(x,T)=>{const E={},_=x.getUnderlyingObject();try{_.response&&(E.data=JSON.parse(_.response))}catch{E.data={}}E.method=x.getMethod().toUpperCase(),E.url=x.getURL(),E.status=_.status,E.headers={...x._headers};const F=_.getAllResponseHeaders();F&&F.split(`\r
|
|
56
|
+
`).forEach(X=>{const[W,$]=X.split(": ");W&&$&&(E.headers[W]=$)});const A=f.getFile(E.headers["x-uploader-file-id"]);if(x.getMethod()==="PATCH"&&A.mockResponse)return;if(["PATCH","POST"].includes(E.method)&&[200,500].includes(E.status)){const N=[!0,"true"].includes(E.headers["x-uploader-file-exist"]),X=q0(E.url,E.headers["x-uploader-file-name"]);E.file=A,E.uploadURL=X;const W={uploadURL:X,...E};f.setFileState(A.id,{responseResult:W}),N&&A&&(E.method==="POST"&&f.setFileState(A.id,{mockResponse:T}),f.emit("upload-success",f.getFile(A.id),{...W,body:E.data}),f.emit("postprocess-complete",f.getFile(A.id)),f.calculateTotalProgress()),E.status===200&&(await(s==null?void 0:s(E)),f.emitUploadSuccess(A,E))}n&&await(n==null?void 0:n(_));const R=f.getState().totalProgress===100,j=f.getFiles().every(N=>N.source==="DropTarget");R&&j&&f.close()},...l});const b=({fileIDs:x,id:T})=>{x.forEach(E=>{f.setFileState(E,{uploadID:T})})};f.off("upload",b),f.on("upload",b);const S=x=>{typeof h=="function"&&h(x,f.getFiles())};return f.off("file-added",S),f.on("file-added",S),f.off("file-removed-success",S),f.on("file-removed-success",S),p&&f.use(ou,{target:document.body,onDrop:x=>{var T;(T=f==null?void 0:f.open)==null||T.call(f)},...p}),t==null||t.forEach(x=>{if(x){const{plugin:T,options:E}=v[x]||{};T&&f.use(T,E)}}),H0(f),m&&(m==null?void 0:m.length)>0&&f.addFiles(m),f}const Pc=ie.forwardRef((i,e)=>{var N,X,W,$,q,w,g,y,C,O,D;const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,...i==null?void 0:i.apiPathProps},a=ie.useRef(null),n=Ed({open:!1,uppy:null,availablePluginMap:{},restrictions:{}}),s=Td(),o=F1({...i,apiPathProps:t,availablePluginMap:n.availablePluginMap,restrictions:n.restrictions,theme:s}),{plugins:r=o.map(k=>k.id),id:l="Uploader",popup:p=!1,uploadedProps:d,resourcesProps:c,onOpen:h,onClose:m,locale:v,installerProps:P}=i,f=Rc(o,"id"),b=Dd(k=>{var M;return(M=k==null?void 0:k.breakpoints)==null?void 0:M.down("md")}),S=wr([...r,...o.filter(k=>k.alwayUse).map(k=>k.id)]),{loading:x}=Od(async()=>{var M,L,V,H,K;let k=_r((M=i==null?void 0:i.coreProps)==null?void 0:M.restrictions)?{}:Sr.cloneDeep((L=i==null?void 0:i.coreProps)==null?void 0:L.restrictions);if(ga())try{await La.get("/api/uploader/status").then(({data:Se})=>{var jt;n.availablePluginMap=Se.availablePluginMap,!t.disableMediaKitPrefix&&_r((jt=i==null?void 0:i.coreProps)==null?void 0:jt.restrictions)&&(k=Se.restrictions||{})})}catch{}!((V=k==null?void 0:k.allowedFileTypes)!=null&&V.length)&&(k!=null&&k.allowedFileExts)&&(k.allowedFileTypes=wr((K=(H=(typeof(k==null?void 0:k.allowedFileExts)=="string"?k==null?void 0:k.allowedFileExts.split(","):k==null?void 0:k.allowedFileExts)||[])==null?void 0:H.map(Se=>ot.lookup((Se==null?void 0:Se.replaceAll(" ",""))||"")))==null?void 0:K.filter(Se=>Se)),delete k.allowedFileExts),k.maxFileSize&&typeof k.maxFileSize=="string"&&(k.maxFileSize=Q.parseSize(k.maxFileSize,{iec:!1})||void 0),n.restrictions=Sr.cloneDeep(k)},{refreshDeps:[JSON.stringify({apiPathProps:t,restrictionsProps:(N=i==null?void 0:i.coreProps)==null?void 0:N.restrictions})]});Ld("esc",k=>{n.open&&(k.stopPropagation(),k.preventDefault(),F())},{useCapture:!0}),ie.useEffect(()=>{$0(t),n.uppy=hd({...i,id:l,plugins:S,apiPathProps:t,pluginList:o,restrictions:n.restrictions}),n.uppy.open=_,n.uppy.close=F,n.uppy.openPlugin=T;const k=V=>{const{onShowPanel:H}=f[V];H==null||H(e)};n.uppy.off("dashboard:show-panel",k),n.uppy.on("dashboard:show-panel",k);const M=(V,H,K,Se)=>{var Lt,Di;const jt=V.map(ht=>{var gr,vr,br;const fd={name:ht.id||((br=(vr=(gr=ht.fileUrl)==null?void 0:gr.split("/"))==null?void 0:vr.slice(-1))==null?void 0:br[0]),type:ht.mimetype||ot.lookup(ht.fileUrl),data:"",preview:ht.fileUrl,source:Se,isRemote:!0},gd=H.uppy.addFile(fd);return{...ht,uppyFile:H.uppy.getFile(gd)}}),qn=`${Se.toLowerCase()}Props`;(Di=(Lt=K[qn])==null?void 0:Lt.onSelectedFiles)==null||Di.call(Lt,jt)};[{name:"Uploaded",event:"uploaded:selected"},{name:"Resources",event:"resources:selected"}].forEach(({name:V,event:H})=>{S.includes(V)&&(n.uppy.off(H),n.uppy.on(H,K=>M(K,n,i,V)))})},[JSON.stringify({id:l,plugins:S,apiPathProps:t,locale:v,restrictions:n.restrictions,theme:s})]);function T(k){var M,L,V;if(k=k.replace(/\s/g,""),["MyDevice",...S].map(H=>H.toLowerCase()).includes(k.toLowerCase())){let H=`div[data-uppy-acquirer-id="${k}"] > button`;(V=(L=(M=document==null?void 0:document.getElementById(ln))==null?void 0:M.querySelector(H))==null?void 0:L.click)==null||V.call(L)}}const E=ie.useCallback(k=>{Si&&a.current&&!a.current.contains(k.target)&&console.info("debug focus",a.current,k.target)},[]);function _(k){var L,V,H,K;n.open=!0,k&&setTimeout(()=>{T(k)},200),n.uppy.emitOpen(),h==null||h(),(V=(L=document.activeElement)==null?void 0:L.blur)==null||V.call(L);const M=n.uppy.getPlugin(ln).el;(H=M==null?void 0:M.focus)==null||H.call(M),(K=M==null?void 0:M.click)==null||K.call(M),Si&&p&&(document.addEventListener("mousedown",E),document.addEventListener("touchstart",E))}function F(){var k;(k=n.uppy.getPlugin(ln))==null||k.hideAllPanels(),n.open=!1,n.uppy.emitClose(),m==null||m(),setTimeout(()=>{n.uppy.getState().totalProgress===100&&(n.uppy.setState({files:{},currentUploads:{}}),n.uppy.calculateTotalProgress())},500),Si&&p&&(document.removeEventListener("mousedown",E),document.removeEventListener("touchstart",E))}ie.useImperativeHandle(e,()=>({getUploader:()=>n.uppy,open:_,close:F}));const A=p?Md:ie.Fragment,R=p?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:n.open?"block":"none"},...(X=i==null?void 0:i.wrapperProps)==null?void 0:X.sx},invisible:!0,open:n.open,onClick:k=>{document.activeElement===document.body&&(k.stopPropagation(),F())},...i.wrapperProps}:{...i.wrapperProps},j=b?"42px":"40px";return ve.jsx(A,{...R,children:ve.jsxs($d,{onClose:F,did:_1,disabled:!n.open,...P,children:[ve.jsx(Ad,{styles:()=>({".uppy-is-drag-over":{"&::after":{transition:"all 0.3s ease-in-out",border:"2px dashed #bbb !important",borderRadius:4,background:"rgba(234, 234, 234, 0.5)"}}})}),ve.jsxs(Us,{className:"uploader-container",ref:a,id:Sc,onClick:k=>k.stopPropagation(),sx:{position:"relative",width:b?"90vw":720,".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{background:"repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px !important"},".uploaded-add-item":{background:"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:"rgba(0,0,0,0.13)"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{background:"#fff",height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%"},"& .uppy-ProviderBrowser-header":{display:"none"}},"& .uppy-Url":{width:"100% !important",display:"flex",justifyContent:"center","& input":{width:"70%"}},"& .uppy-Dashboard-browse, & .uppy-DashboardContent-addMore, & .uppy-DashboardContent-back, & .uppy-StatusBar-actionBtn--done, & .uppy-DashboardContent-save, & .uppy-StatusBar-actionBtn--upload":{color:`${($=(W=s==null?void 0:s.palette)==null?void 0:W.primary)==null?void 0:$.main}`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{color:`${(w=(q=s==null?void 0:s.palette)==null?void 0:q.primary)==null?void 0:w.main}`,filter:"brightness(1.2)"}},"& .uppy-c-btn-primary":{backgroundColor:`${(y=(g=s==null?void 0:s.palette)==null?void 0:g.primary)==null?void 0:y.main} !important`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{backgroundColor:`${(O=(C=s==null?void 0:s.palette)==null?void 0:C.primary)==null?void 0:O.main} !important`,filter:"brightness(1.2)"}}},children:[p&&ve.jsx(Rd,{"aria-label":"close",onClick:F,sx:{color:"#fafafa",position:"absolute",...b?{bottom:`calc(0px - ${j} - 16px)`,left:`calc(50vw - ${j} - 8px)`}:{right:`calc(0px - ${j} - 16px)`,top:-12}},children:ve.jsx(Wd,{sx:{fontSize:j}})}),x&&ve.jsxs(Us,{sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:99999999999,flexDirection:"column",background:"rgba(256, 256, 256, 0.2)",backdropFilter:"blur(4px)",borderRadius:1,pointerEvents:"none"},children:[ve.jsx(B0,{size:32}),ve.jsx(Ud,{variant:"body2",color:"primary",sx:{mt:1.5,fontWeight:"bold"},children:Id(Yu,`${v}.strings.loadingStatus`)})]}),n.uppy&&ve.jsx(Yp,{inline:!0,target:`#${Sc}`,id:ln,uppy:n.uppy,plugins:S,fileManagerSelectionType:((D=n.restrictions)==null?void 0:D.maxNumberOfFiles)===1?"files":"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:"",doneButtonHandler:F,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),C1=Object.freeze(Object.defineProperty({__proto__:null,Uploader:Pc,default:Pc,initUploader:hd},Symbol.toStringTag,{value:"Module"})),Fc=ie.lazy(()=>Oc(()=>Promise.resolve().then(()=>C1),void 0).then(i=>({default:i.Uploader}))),md=ie.createContext(null);function k1(){const i=ie.useContext(md);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function Ow({onChange:i,children:e,...t}){const a=k1(),n=()=>{var o;const s=(o=a==null?void 0:a.current)==null?void 0:o.getUploader();s==null||s.open(),i&&s.onceUploadSuccess((...r)=>{i(...r)})};return ve.jsx(Us,{onClick:n,...t,children:e})}function Aw({children:i,popup:e,...t}){const a=ie.useRef(null),n=ie.useMemo(()=>e?Nd.createPortal(ve.jsx(Fc,{ref:a,popup:!0,...t},"uploader"),document.body):ve.jsx(Fc,{ref:a,popup:!1,...t},"uploader"),[a,e,t]);return ve.jsxs(md.Provider,{value:a,children:[i,n]})}export{Es as CLOSE,ks as OPEN,bc as UPLOADER_UPLOAD_SUCCESS,Pc as Uploader,md as UploaderContext,Aw as UploaderProvider,Ow as UploaderTrigger,ad as api,j0 as base64ToFile,gc as blobToFile,Rn as createImageUrl,z0 as getAIKitComponent,L0 as getDownloadUrl,fa as getExt,ga as getMediaKitComponent,fc as getObjectURL,nd as getUploaderEndpoint,q0 as getUrl,hd as initUploader,H0 as initUppy,N0 as isBlob,vc as isMediaKit,La as mediaKitApi,Tt as mediaKitMountPoint,W0 as parseStringToDot,pi as prefixPath,$0 as setPrefixPath,k1 as useUploaderContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b7 as a}from"./index-
|
|
1
|
+
import{b7 as a}from"./index-BXfEXarc.js";var e=i,s=/^(?:\w+:)?\/\/(\S+)$/,l=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;function i(t){if(typeof t!="string")return!1;var o=t.match(s);if(!o)return!1;var r=o[1];return r?!!(l.test(r)||n.test(r)):!1}const c=a(e);export{c as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aE as ve,aF as me,aG as X,cR as $e,aH as He,aK as p,r as d,aI as Se,aJ as ae,aM as L,j as u,aN as ge,at as Ae,cM as at,cS as Oe,cT as Xe,cU as De,aL as se,aj as it,cV as fe,cW as ct,bt as dt,bE as F,P as W}from"./index-BKFM1Brp.js";let K;function _e(){if(K)return K;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),K="reverse",e.scrollLeft>0?K="default":(e.scrollLeft=1,e.scrollLeft===0&&(K="negative")),document.body.removeChild(e),K}function ut(e,t){const l=e.scrollLeft;if(t!=="rtl")return l;switch(_e()){case"negative":return e.scrollWidth-e.clientWidth+l;case"reverse":return e.scrollWidth-e.clientWidth-l;default:return l}}function bt(e){return me("MuiTab",e)}const k=ve("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),pt=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ft=e=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=e,g={root:["root",a&&v&&"labelIcon",`textColor${He(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return ge(g,bt,t)},ht=X($e,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${He(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${k.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>p({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),xe=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:y,onChange:m,onClick:w,onFocus:j,selected:T,selectionFollowsFocus:x,textColor:D="inherit",value:R,wrapped:ie=!1}=s,_=ae(s,pt),V=p({},s,{disabled:a,disableFocusRipple:v,selected:T,icon:!!b,iconPosition:g,label:!!y,fullWidth:h,textColor:D,wrapped:ie}),q=ft(V),$=b&&y&&d.isValidElement(b)?d.cloneElement(b,{className:L(q.iconWrapper,b.props.className)}):b,ee=E=>{!T&&m&&m(E,R),w&&w(E)},U=E=>{x&&!T&&m&&m(E,R),j&&j(E)};return u.jsxs(ht,p({focusRipple:!v,className:L(q.root,n),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:ee,onFocus:U,ownerState:V,tabIndex:T?0:-1},_,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[$,y]}):u.jsxs(d.Fragment,{children:[y,$]}),B]}))}),vt=Ae(u.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),mt=Ae(u.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function St(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function gt(e,t,l,s={},n=()=>{}){const{ease:a=St,duration:v=300}=s;let h=null;const b=t[e];let g=!1;const B=()=>{g=!0},y=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const w=Math.min(1,(m-h)/v);if(t[e]=a(w)*(l-b)+b,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(y)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(y),B)}const xt=["onChange"],yt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Ct(e){const{onChange:t}=e,l=ae(e,xt),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return at(()=>{const v=Oe(()=>{const b=s.current;a(),b!==s.current&&t(s.current)}),h=Xe(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[t]),d.useEffect(()=>{a(),t(s.current)},[t]),u.jsx("div",p({style:yt,ref:n},l))}function Bt(e){return me("MuiTabScrollButton",e)}const wt=ve("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Tt=["className","slots","slotProps","direction","orientation","disabled"],Mt=e=>{const{classes:t,orientation:l,disabled:s}=e;return ge({root:["root",l,s&&"disabled"]},Bt,t)},It=X($e,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.orientation&&t[l.orientation]]}})(({ownerState:e})=>p({width:40,flexShrink:0,opacity:.8,[`&.${wt.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Rt=d.forwardRef(function(t,l){var s,n;const a=Se({props:t,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=ae(a,Tt),y=De(),m=p({isRtl:y},a),w=Mt(m),j=(s=h.StartScrollButtonIcon)!=null?s:vt,T=(n=h.EndScrollButtonIcon)!=null?n:mt,x=se({elementType:j,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),D=se({elementType:T,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(It,p({component:"div",className:L(w.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(j,p({},x)):u.jsx(T,p({},D))}))});function Et(e){return me("MuiTabs",e)}const he=ve("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),zt=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ke=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Le=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ne=(e,t,l)=>{let s=!1,n=l(e,t);for(;n;){if(n===e.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(e,n);else{n.focus();return}}},Wt=e=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=e;return ge({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Et,b)},Pt=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${he.scrollButtons}`]:t.scrollButtons},{[`& .${he.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${he.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Nt=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})(({ownerState:e})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),kt=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})(({ownerState:e})=>p({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Lt=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Ft=X(Ct)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Fe={},ye=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTabs"}),n=it(),a=De(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:y,component:m="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:T,orientation:x="horizontal",ScrollButtonComponent:D=Rt,scrollButtons:R="auto",selectionFollowsFocus:ie,slots:_={},slotProps:V={},TabIndicatorProps:q={},TabScrollButtonProps:$={},textColor:ee="primary",value:U,variant:E="standard",visibleScrollbar:ce=!1}=s,Ke=ae(s,zt),M=E==="scrollable",C=x==="vertical",G=C?"scrollTop":"scrollLeft",te=C?"top":"left",oe=C?"bottom":"right",de=C?"clientHeight":"clientWidth",J=C?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:w,indicatorColor:j,orientation:x,vertical:C,scrollButtons:R,textColor:ee,variant:E,visibleScrollbar:ce,fixed:!M,hideScrollbar:M&&!ce,scrollableX:M&&!C,scrollableY:M&&C,centered:g&&!M,scrollButtonsHideMobile:!w}),P=Wt(H),Ye=se({elementType:_.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:H}),Ve=se({elementType:_.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:H}),[Ce,Ge]=d.useState(!1),[A,Be]=d.useState(Fe),[we,Je]=d.useState(!1),[Te,Qe]=d.useState(!1),[Me,Ze]=d.useState(!1),[Ie,et]=d.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,z=d.useRef(null),O=d.useRef(null),Ee=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ut(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=O.current.children;if(i.length>0){const f=i[Re.get(U)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},Q=fe(()=>{const{tabsMeta:o,tabMeta:r}=Ee();let c=0,i;if(C)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[J]:r?r[J]:0};if(isNaN(A[i])||isNaN(A[J]))Be(f);else{const S=Math.abs(A[i]-f[i]),I=Math.abs(A[J]-f[J]);(S>=1||I>=1)&&Be(f)}}),ue=(o,{animation:r=!0}={})=>{r?gt(G,z.current,o,{duration:n.transitions.duration.standard}):z.current[G]=o},ze=o=>{let r=z.current[G];C?r+=o:(r+=o*(a?-1:1),r*=a&&_e()==="reverse"?-1:1),ue(r)},We=()=>{const o=z.current[de];let r=0;const c=Array.from(O.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[de]>o){i===0&&(r=o);break}r+=f[de]}return r},tt=()=>{ze(-1*We())},ot=()=>{ze(We())},lt=d.useCallback(o=>{et({overflow:null,scrollbarWidth:o})},[]),rt=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Ft,{onChange:lt,className:L(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(R==="auto"&&(we||Te)||R===!0);return o.scrollButtonStart=c?u.jsx(D,p({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Ye},orientation:x,direction:a?"right":"left",onClick:tt,disabled:!we},$,{className:L(P.scrollButtons,$.className)})):null,o.scrollButtonEnd=c?u.jsx(D,p({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ve},orientation:x,direction:a?"left":"right",onClick:ot,disabled:!Te},$,{className:L(P.scrollButtons,$.className)})):null,o},Pe=fe(o=>{const{tabsMeta:r,tabMeta:c}=Ee();if(!(!c||!r)){if(c[te]<r[te]){const i=r[G]+(c[te]-r[te]);ue(i,{animation:o})}else if(c[oe]>r[oe]){const i=r[G]+(c[oe]-r[oe]);ue(i,{animation:o})}}}),le=fe(()=>{M&&R!==!1&&Ze(!Me)});d.useEffect(()=>{const o=Oe(()=>{z.current&&Q()});let r;const c=S=>{S.forEach(I=>{I.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),I.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),le()},i=Xe(z.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(O.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(O.current,{childList:!0})),()=>{var S,I;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(I=r)==null||I.disconnect()}},[Q,le]),d.useEffect(()=>{const o=Array.from(O.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&R!==!1){const c=o[0],i=o[r-1],f={root:z.current,threshold:.99},S=pe=>{Je(!pe[0].isIntersecting)},I=new IntersectionObserver(S,f);I.observe(c);const Z=pe=>{Qe(!pe[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{I.disconnect(),N.disconnect()}}},[M,R,Me,B==null?void 0:B.length]),d.useEffect(()=>{Ge(!0)},[]),d.useEffect(()=>{Q()}),d.useEffect(()=>{Pe(Fe!==A)},[Pe,A]),d.useImperativeHandle(b,()=>({updateIndicator:Q,updateScrollButtons:le}),[Q,le]);const Ne=u.jsx(Lt,p({},q,{className:L(P.indicator,q.className),ownerState:H,style:p({},A,q.style)}));let re=0;const nt=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?re:o.props.value;Re.set(r,re);const c=r===U;return re+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!Ce&&Ne,selected:c,selectionFollowsFocus:ie,onChange:T,textColor:ee,value:r},re===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),st=o=>{const r=O.current,c=ct(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),ne(r,c,Le);break;case S:o.preventDefault(),ne(r,c,ke);break;case"Home":o.preventDefault(),ne(r,null,ke);break;case"End":o.preventDefault(),ne(r,null,Le);break}},be=rt();return u.jsxs(Pt,p({className:L(P.root,y),ownerState:H,ref:l,as:m},Ke,{children:[be.scrollButtonStart,be.scrollbarSizeListener,u.jsxs(Nt,{className:P.scroller,ownerState:H,style:{overflow:Ie.overflow,[C?`margin${a?"Left":"Right"}`:"marginBottom"]:ce?void 0:-Ie.scrollbarWidth},ref:z,children:[u.jsx(kt,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:st,ref:O,role:"tablist",children:nt}),Ce&&Ne]}),be.scrollButtonEnd]}))}),je="index",Y={tabs:`${je}-tabs`,tab:`${je}-tab`},jt=dt(ye)(({theme:e})=>({[`& .${Y.tabs}`]:{},[`& .${Y.tab}`]:{fontSize:"0.875rem",[e.breakpoints.up("md")]:{fontSize:"1rem"}}}));function qe({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:F.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:F.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:F.lineBorderBase,color:F.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qe.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function Ue({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:F.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:F.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:F.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:F.foregroundsFgBase},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Ue.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function $t({tabs:e,current:t,onChange:l,...s}){return s.variant==="card"?u.jsx(qe,{...s,tabs:e,current:t,onChange:l}):s.variant==="line"?u.jsx(Ue,{...s,tabs:e,current:t,onChange:l}):u.jsx(jt,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[Y.tabs,s.className||""].join(" "),children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}$t.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};export{mt as K,$t as T,vt as a,ye as b,xe as c,_e as d,ut as g};
|
|
1
|
+
import{aE as ve,aF as me,aG as X,cR as $e,aH as He,aK as p,r as d,aI as Se,aJ as ae,aM as L,j as u,aN as ge,at as Ae,cM as at,cS as Oe,cT as Xe,cU as De,aL as se,aj as it,cV as fe,cW as ct,bt as dt,bE as F,P as W}from"./index-BXfEXarc.js";let K;function _e(){if(K)return K;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),K="reverse",e.scrollLeft>0?K="default":(e.scrollLeft=1,e.scrollLeft===0&&(K="negative")),document.body.removeChild(e),K}function ut(e,t){const l=e.scrollLeft;if(t!=="rtl")return l;switch(_e()){case"negative":return e.scrollWidth-e.clientWidth+l;case"reverse":return e.scrollWidth-e.clientWidth-l;default:return l}}function bt(e){return me("MuiTab",e)}const k=ve("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),pt=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ft=e=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=e,g={root:["root",a&&v&&"labelIcon",`textColor${He(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return ge(g,bt,t)},ht=X($e,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${He(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${k.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>p({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),xe=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:y,onChange:m,onClick:w,onFocus:j,selected:T,selectionFollowsFocus:x,textColor:D="inherit",value:R,wrapped:ie=!1}=s,_=ae(s,pt),V=p({},s,{disabled:a,disableFocusRipple:v,selected:T,icon:!!b,iconPosition:g,label:!!y,fullWidth:h,textColor:D,wrapped:ie}),q=ft(V),$=b&&y&&d.isValidElement(b)?d.cloneElement(b,{className:L(q.iconWrapper,b.props.className)}):b,ee=E=>{!T&&m&&m(E,R),w&&w(E)},U=E=>{x&&!T&&m&&m(E,R),j&&j(E)};return u.jsxs(ht,p({focusRipple:!v,className:L(q.root,n),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:ee,onFocus:U,ownerState:V,tabIndex:T?0:-1},_,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[$,y]}):u.jsxs(d.Fragment,{children:[y,$]}),B]}))}),vt=Ae(u.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),mt=Ae(u.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function St(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function gt(e,t,l,s={},n=()=>{}){const{ease:a=St,duration:v=300}=s;let h=null;const b=t[e];let g=!1;const B=()=>{g=!0},y=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const w=Math.min(1,(m-h)/v);if(t[e]=a(w)*(l-b)+b,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(y)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(y),B)}const xt=["onChange"],yt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Ct(e){const{onChange:t}=e,l=ae(e,xt),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return at(()=>{const v=Oe(()=>{const b=s.current;a(),b!==s.current&&t(s.current)}),h=Xe(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[t]),d.useEffect(()=>{a(),t(s.current)},[t]),u.jsx("div",p({style:yt,ref:n},l))}function Bt(e){return me("MuiTabScrollButton",e)}const wt=ve("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Tt=["className","slots","slotProps","direction","orientation","disabled"],Mt=e=>{const{classes:t,orientation:l,disabled:s}=e;return ge({root:["root",l,s&&"disabled"]},Bt,t)},It=X($e,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.orientation&&t[l.orientation]]}})(({ownerState:e})=>p({width:40,flexShrink:0,opacity:.8,[`&.${wt.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Rt=d.forwardRef(function(t,l){var s,n;const a=Se({props:t,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=ae(a,Tt),y=De(),m=p({isRtl:y},a),w=Mt(m),j=(s=h.StartScrollButtonIcon)!=null?s:vt,T=(n=h.EndScrollButtonIcon)!=null?n:mt,x=se({elementType:j,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),D=se({elementType:T,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(It,p({component:"div",className:L(w.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(j,p({},x)):u.jsx(T,p({},D))}))});function Et(e){return me("MuiTabs",e)}const he=ve("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),zt=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ke=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Le=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ne=(e,t,l)=>{let s=!1,n=l(e,t);for(;n;){if(n===e.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(e,n);else{n.focus();return}}},Wt=e=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=e;return ge({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Et,b)},Pt=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${he.scrollButtons}`]:t.scrollButtons},{[`& .${he.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${he.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Nt=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})(({ownerState:e})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),kt=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})(({ownerState:e})=>p({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Lt=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Ft=X(Ct)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Fe={},ye=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTabs"}),n=it(),a=De(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:y,component:m="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:T,orientation:x="horizontal",ScrollButtonComponent:D=Rt,scrollButtons:R="auto",selectionFollowsFocus:ie,slots:_={},slotProps:V={},TabIndicatorProps:q={},TabScrollButtonProps:$={},textColor:ee="primary",value:U,variant:E="standard",visibleScrollbar:ce=!1}=s,Ke=ae(s,zt),M=E==="scrollable",C=x==="vertical",G=C?"scrollTop":"scrollLeft",te=C?"top":"left",oe=C?"bottom":"right",de=C?"clientHeight":"clientWidth",J=C?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:w,indicatorColor:j,orientation:x,vertical:C,scrollButtons:R,textColor:ee,variant:E,visibleScrollbar:ce,fixed:!M,hideScrollbar:M&&!ce,scrollableX:M&&!C,scrollableY:M&&C,centered:g&&!M,scrollButtonsHideMobile:!w}),P=Wt(H),Ye=se({elementType:_.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:H}),Ve=se({elementType:_.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:H}),[Ce,Ge]=d.useState(!1),[A,Be]=d.useState(Fe),[we,Je]=d.useState(!1),[Te,Qe]=d.useState(!1),[Me,Ze]=d.useState(!1),[Ie,et]=d.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,z=d.useRef(null),O=d.useRef(null),Ee=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ut(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=O.current.children;if(i.length>0){const f=i[Re.get(U)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},Q=fe(()=>{const{tabsMeta:o,tabMeta:r}=Ee();let c=0,i;if(C)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[J]:r?r[J]:0};if(isNaN(A[i])||isNaN(A[J]))Be(f);else{const S=Math.abs(A[i]-f[i]),I=Math.abs(A[J]-f[J]);(S>=1||I>=1)&&Be(f)}}),ue=(o,{animation:r=!0}={})=>{r?gt(G,z.current,o,{duration:n.transitions.duration.standard}):z.current[G]=o},ze=o=>{let r=z.current[G];C?r+=o:(r+=o*(a?-1:1),r*=a&&_e()==="reverse"?-1:1),ue(r)},We=()=>{const o=z.current[de];let r=0;const c=Array.from(O.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[de]>o){i===0&&(r=o);break}r+=f[de]}return r},tt=()=>{ze(-1*We())},ot=()=>{ze(We())},lt=d.useCallback(o=>{et({overflow:null,scrollbarWidth:o})},[]),rt=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Ft,{onChange:lt,className:L(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(R==="auto"&&(we||Te)||R===!0);return o.scrollButtonStart=c?u.jsx(D,p({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Ye},orientation:x,direction:a?"right":"left",onClick:tt,disabled:!we},$,{className:L(P.scrollButtons,$.className)})):null,o.scrollButtonEnd=c?u.jsx(D,p({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ve},orientation:x,direction:a?"left":"right",onClick:ot,disabled:!Te},$,{className:L(P.scrollButtons,$.className)})):null,o},Pe=fe(o=>{const{tabsMeta:r,tabMeta:c}=Ee();if(!(!c||!r)){if(c[te]<r[te]){const i=r[G]+(c[te]-r[te]);ue(i,{animation:o})}else if(c[oe]>r[oe]){const i=r[G]+(c[oe]-r[oe]);ue(i,{animation:o})}}}),le=fe(()=>{M&&R!==!1&&Ze(!Me)});d.useEffect(()=>{const o=Oe(()=>{z.current&&Q()});let r;const c=S=>{S.forEach(I=>{I.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),I.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),le()},i=Xe(z.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(O.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(O.current,{childList:!0})),()=>{var S,I;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(I=r)==null||I.disconnect()}},[Q,le]),d.useEffect(()=>{const o=Array.from(O.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&R!==!1){const c=o[0],i=o[r-1],f={root:z.current,threshold:.99},S=pe=>{Je(!pe[0].isIntersecting)},I=new IntersectionObserver(S,f);I.observe(c);const Z=pe=>{Qe(!pe[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{I.disconnect(),N.disconnect()}}},[M,R,Me,B==null?void 0:B.length]),d.useEffect(()=>{Ge(!0)},[]),d.useEffect(()=>{Q()}),d.useEffect(()=>{Pe(Fe!==A)},[Pe,A]),d.useImperativeHandle(b,()=>({updateIndicator:Q,updateScrollButtons:le}),[Q,le]);const Ne=u.jsx(Lt,p({},q,{className:L(P.indicator,q.className),ownerState:H,style:p({},A,q.style)}));let re=0;const nt=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?re:o.props.value;Re.set(r,re);const c=r===U;return re+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!Ce&&Ne,selected:c,selectionFollowsFocus:ie,onChange:T,textColor:ee,value:r},re===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),st=o=>{const r=O.current,c=ct(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),ne(r,c,Le);break;case S:o.preventDefault(),ne(r,c,ke);break;case"Home":o.preventDefault(),ne(r,null,ke);break;case"End":o.preventDefault(),ne(r,null,Le);break}},be=rt();return u.jsxs(Pt,p({className:L(P.root,y),ownerState:H,ref:l,as:m},Ke,{children:[be.scrollButtonStart,be.scrollbarSizeListener,u.jsxs(Nt,{className:P.scroller,ownerState:H,style:{overflow:Ie.overflow,[C?`margin${a?"Left":"Right"}`:"marginBottom"]:ce?void 0:-Ie.scrollbarWidth},ref:z,children:[u.jsx(kt,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:st,ref:O,role:"tablist",children:nt}),Ce&&Ne]}),be.scrollButtonEnd]}))}),je="index",Y={tabs:`${je}-tabs`,tab:`${je}-tab`},jt=dt(ye)(({theme:e})=>({[`& .${Y.tabs}`]:{},[`& .${Y.tab}`]:{fontSize:"0.875rem",[e.breakpoints.up("md")]:{fontSize:"1rem"}}}));function qe({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:F.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:F.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:F.lineBorderBase,color:F.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qe.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function Ue({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:F.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:F.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:F.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:F.foregroundsFgBase},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Ue.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function $t({tabs:e,current:t,onChange:l,...s}){return s.variant==="card"?u.jsx(qe,{...s,tabs:e,current:t,onChange:l}):s.variant==="line"?u.jsx(Ue,{...s,tabs:e,current:t,onChange:l}):u.jsx(jt,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[Y.tabs,s.className||""].join(" "),children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}$t.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};export{mt as K,$t as T,vt as a,ye as b,xe as c,_e as d,ut as g};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{l as q}from"./lottie-
|
|
1
|
+
import{l as q}from"./lottie-AeAuO2MQ.js";import{r as D,eM as z}from"./index-BXfEXarc.js";function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,u,c,i,b=[],f=!0,A=!1;try{if(c=(r=r.call(t)).next,e!==0)for(;!(f=(n=c.call(r)).done)&&(b.push(n.value),b.length!==e);f=!0);}catch(g){A=!0,u=g}finally{try{if(!f&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(A)throw u}}return b}}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(n){J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J(t,e,r){return e=ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,c;for(c=0;c<n.length;c++)u=n[c],!(e.indexOf(u)>=0)&&(r[u]=t[u]);return r}function x(t,e){if(t==null)return{};var r=Q(t,e),n,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(u=0;u<c.length;u++)n=c[u],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Z(t,e){return ee(t)||G(t,e)||te(t,e)||ne()}function ee(t){if(Array.isArray(t))return t}function te(t,e){if(t){if(typeof t=="string")return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ae(t){var e=re(t,"string");return typeof e=="symbol"?e:String(e)}var oe=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],ie=function(e,r){var n=e.animationData,u=e.loop,c=e.autoplay,i=e.initialSegment,b=e.onComplete,f=e.onLoopComplete,A=e.onEnterFrame,g=e.onSegmentStart,O=e.onConfigReady,w=e.onDataReady,h=e.onDataFailed,l=e.onLoadedImages,L=e.onDOMLoaded,S=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var p=x(e,oe),P=D.useState(!1),s=Z(P,2),C=s[0],_=s[1],o=D.useRef(),v=D.useRef(null),M=function(){var a;(a=o.current)===null||a===void 0||a.play()},H=function(){var a;(a=o.current)===null||a===void 0||a.stop()},F=function(){var a;(a=o.current)===null||a===void 0||a.pause()},V=function(a){var d;(d=o.current)===null||d===void 0||d.setSpeed(a)},N=function(a,d){var m;(m=o.current)===null||m===void 0||m.goToAndPlay(a,d)},B=function(a,d){var m;(m=o.current)===null||m===void 0||m.goToAndStop(a,d)},$=function(a){var d;(d=o.current)===null||d===void 0||d.setDirection(a)},k=function(a,d){var m;(m=o.current)===null||m===void 0||m.playSegments(a,d)},W=function(a){var d;(d=o.current)===null||d===void 0||d.setSubframe(a)},K=function(a){var d;return(d=o.current)===null||d===void 0?void 0:d.getDuration(a)},U=function(){var a;(a=o.current)===null||a===void 0||a.destroy(),o.current=void 0},X=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d;if(v.current){(d=o.current)===null||d===void 0||d.destroy();var m=I(I(I({},e),a),{},{container:v.current});return o.current=q.loadAnimation(m),_(!!o.current),function(){var R;(R=o.current)===null||R===void 0||R.destroy(),o.current=void 0}}};D.useEffect(function(){var y=X();return function(){return y==null?void 0:y()}},[n,u]),D.useEffect(function(){o.current&&(o.current.autoplay=!!c)},[c]),D.useEffect(function(){if(o.current){if(!i){o.current.resetSegments(!0);return}!Array.isArray(i)||!i.length||((o.current.currentRawFrame<i[0]||o.current.currentRawFrame>i[1])&&(o.current.currentRawFrame=i[0]),o.current.setSegment(i[0],i[1]))}},[i]),D.useEffect(function(){var y=[{name:"complete",handler:b},{name:"loopComplete",handler:f},{name:"enterFrame",handler:A},{name:"segmentStart",handler:g},{name:"config_ready",handler:O},{name:"data_ready",handler:w},{name:"data_failed",handler:h},{name:"loaded_images",handler:l},{name:"DOMLoaded",handler:L},{name:"destroy",handler:S}],a=y.filter(function(m){return m.handler!=null});if(a.length){var d=a.map(function(m){var R;return(R=o.current)===null||R===void 0||R.addEventListener(m.name,m.handler),function(){var T;(T=o.current)===null||T===void 0||T.removeEventListener(m.name,m.handler)}});return function(){d.forEach(function(m){return m()})}}},[b,f,A,g,O,w,h,l,L,S]);var Y=z.createElement("div",I({style:r,ref:v},p));return{View:Y,play:M,stop:H,pause:F,setSpeed:V,goToAndStop:B,goToAndPlay:N,setDirection:$,playSegments:k,setSubframe:W,getDuration:K,destroy:U,animationContainerRef:v,animationLoaded:C,animationItem:o.current}};function ue(t){var e=t.getBoundingClientRect(),r=e.top,n=e.height,u=window.innerHeight-r,c=window.innerHeight+n;return u/c}function le(t,e,r){var n=t.getBoundingClientRect(),u=n.top,c=n.left,i=n.width,b=n.height,f=(e-c)/i,A=(r-u)/b;return{x:f,y:A}}var se=function(e){var r=e.wrapperRef,n=e.animationItem,u=e.mode,c=e.actions;D.useEffect(function(){var i=r.current;if(!(!i||!n||!c.length)){n.stop();var b=function(){var g=null,O=function(){var h=ue(i),l=c.find(function(S){var p=S.visibility;return p&&h>=p[0]&&h<=p[1]});if(l){if(l.type==="seek"&&l.visibility&&l.frames.length===2){var L=l.frames[0]+Math.ceil((h-l.visibility[0])/(l.visibility[1]-l.visibility[0])*l.frames[1]);//! goToAndStop must be relative to the start of the current segment
|
|
3
3
|
n.goToAndStop(L-n.firstFrame-1,!0)}l.type==="loop"&&(g===null||g!==l.frames||n.isPaused)&&(n.playSegments(l.frames,!0),g=l.frames),l.type==="play"&&n.isPaused&&(n.resetSegments(!0),n.play()),l.type==="stop"&&n.goToAndStop(l.frames[0]-n.firstFrame-1,!0)}};return document.addEventListener("scroll",O),function(){document.removeEventListener("scroll",O)}},f=function(){var g=function(l,L){var S=l,p=L;if(S!==-1&&p!==-1){var P=le(i,S,p);S=P.x,p=P.y}var s=c.find(function(o){var v=o.position;return v&&Array.isArray(v.x)&&Array.isArray(v.y)?S>=v.x[0]&&S<=v.x[1]&&p>=v.y[0]&&p<=v.y[1]:v&&!Number.isNaN(v.x)&&!Number.isNaN(v.y)?S===v.x&&p===v.y:!1});if(s){if(s.type==="seek"&&s.position&&Array.isArray(s.position.x)&&Array.isArray(s.position.y)&&s.frames.length===2){var C=(S-s.position.x[0])/(s.position.x[1]-s.position.x[0]),_=(p-s.position.y[0])/(s.position.y[1]-s.position.y[0]);n.playSegments(s.frames,!0),n.goToAndStop(Math.ceil((C+_)/2*(s.frames[1]-s.frames[0])),!0)}s.type==="loop"&&n.playSegments(s.frames,!0),s.type==="play"&&(n.isPaused&&n.resetSegments(!1),n.playSegments(s.frames)),s.type==="stop"&&n.goToAndStop(s.frames[0],!0)}},O=function(l){g(l.clientX,l.clientY)},w=function(){g(-1,-1)};return i.addEventListener("mousemove",O),i.addEventListener("mouseout",w),function(){i.removeEventListener("mousemove",O),i.removeEventListener("mouseout",w)}};switch(u){case"scroll":return b();case"cursor":return f()}}},[u,n])},de=function(e){var r=e.actions,n=e.mode,u=e.lottieObj,c=u.animationItem,i=u.View,b=u.animationContainerRef;return se({actions:r,animationItem:c,mode:n,wrapperRef:b}),i},fe=["style","interactivity"],ve=function(e){var r,n,u,c=e.style,i=e.interactivity,b=x(e,fe),f=ie(b,c),A=f.View,g=f.play,O=f.stop,w=f.pause,h=f.setSpeed,l=f.goToAndStop,L=f.goToAndPlay,S=f.setDirection,p=f.playSegments,P=f.setSubframe,s=f.getDuration,C=f.destroy,_=f.animationContainerRef,o=f.animationLoaded,v=f.animationItem;return D.useEffect(function(){e.lottieRef&&(e.lottieRef.current={play:g,stop:O,pause:w,setSpeed:h,goToAndPlay:L,goToAndStop:l,setDirection:S,playSegments:p,setSubframe:P,getDuration:s,destroy:C,animationContainerRef:_,animationLoaded:o,animationItem:v})},[(r=e.lottieRef)===null||r===void 0?void 0:r.current]),de({lottieObj:{View:A,play:g,stop:O,pause:w,setSpeed:h,goToAndStop:l,goToAndPlay:L,setDirection:S,playSegments:p,setSubframe:P,getDuration:s,destroy:C,animationContainerRef:_,animationLoaded:o,animationItem:v},actions:(n=i==null?void 0:i.actions)!==null&&n!==void 0?n:[],mode:(u=i==null?void 0:i.mode)!==null&&u!==void 0?u:"scroll"})};export{q as LottiePlayer,ve as default,ie as useLottie,de as useLottieInteractivity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{at as T,j as s,P as r,Z as f,r as m,a0 as D,au as $,u as j,N as H,m as U,l as P,c as q,o as F,p as M,av as E,aw as S,ax as N,A as O,B as L,O as B,n as V,R as W}from"./index-
|
|
1
|
+
import{at as T,j as s,P as r,Z as f,r as m,a0 as D,au as $,u as j,N as H,m as U,l as P,c as q,o as F,p as M,av as E,aw as S,ax as N,A as O,B as L,O as B,n as V,R as W}from"./index-BXfEXarc.js";import{N as X}from"./index-CrwNbpvE.js";import{C as z}from"./index-C5OdroAa.js";import{u as J}from"./use-passport-id-B-b-_oYF.js";import{u as Y}from"./session-C7vFWF9o.js";import{b as Z}from"./sdk-De7qEvqq.js";import{d as G}from"./CheckCircle-Dnb1dYCF.js";import{w as K}from"./wrap-locale-fQx_G_1w.js";const Q=T(s.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(D),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),i=m.useCallback(()=>{o(!1)},[]);return s.jsxs(s.Fragment,{children:[s.jsx(ee,{children:s.jsxs("div",{className:"invite-passport__card",onClick:x,children:[!!e.display&&s.jsx(X,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&s.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})]})}),s.jsx($,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:i,children:e.role.permissions&&e.role.permissions.length>0?s.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>s.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):s.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[s.jsx(Q,{style:{width:"30px",height:"30px"}}),s.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
max-width: 350px;
|
|
4
4
|
margin: 30px auto;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as w,d as x,u as f,r as g,a5 as u,l as I,j as i,H as S,Q as j,Z as k,v as E,x as P,y as R,G as T}from"./index-
|
|
1
|
+
import{e as w,d as x,u as f,r as g,a5 as u,l as I,j as i,H as S,Q as j,Z as k,v as E,x as P,y as R,G as T}from"./index-BXfEXarc.js";import{I as F}from"./invitation-_z1Xj-DN.js";import{F as C}from"./fullpage-Dv48OHgB.js";import"./index-CrwNbpvE.js";import"./emotion-cache.browser.esm-DnONerVw.js";import"./index-C5OdroAa.js";import"./use-passport-id-B-b-_oYF.js";import"./session-C7vFWF9o.js";import"./sdk-De7qEvqq.js";import"./CheckCircle-Dnb1dYCF.js";import"./wrap-locale-fQx_G_1w.js";import"./Link-BMMtX5fH.js";function K(c){var r;const d=w(),{searchParams:o}=new URL(window.location.href),{api:p,session:m}=x(),{t:l}=f(),n=o.get("inviteId"),a=o.get("redirect"),h=g.useCallback(async()=>{const{data:t}=await u.get("invitation",{params:{inviteId:n}});return t},[n]),v=I(async(t,s=e=>e)=>{t&&(E(s(t.sessionToken)),P(s(t.refreshToken)),t.visitorId&&R(s(t.visitorId))),await m.refresh(),setTimeout(()=>{if(a){const e=decodeURIComponent(a);e.startsWith(T.WELLKNOWN_SERVICE_PATH_PREFIX)?d(e,{replace:!0}):window.location=e}else window.location=window.env.pathPrefix||"/"},50)});return i.jsxs(C,{did:(r=window.blocklet)==null?void 0:r.appPid,children:[i.jsx(S,{children:i.jsx("title",{children:l("pageTitle.invite")})}),i.jsx(L,{className:"page-invite",children:i.jsx(F,{...c,getDataFn:h,checkFn:p.get,createPassportSvg:j,onLoginSuccess:v,inService:!0})})]})}const L=k.div`
|
|
2
2
|
width: 560px;
|
|
3
3
|
max-width: 100%;
|
|
4
4
|
height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b7 as B}from"./index-
|
|
1
|
+
import{b7 as B}from"./index-BXfEXarc.js";var w={exports:{}},b={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;function d(l){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},d(l)}function s(l){var r=typeof l=="string"||l instanceof String;if(!r){var n=d(l);throw l===null?n="null":n==="object"&&(n=l.constructor.name),new TypeError("Expected a string but received a ".concat(n))}}f.exports=t.default,f.exports.default=t.default})(b,b.exports);var h=b.exports,E={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var d=s(h);function s(n){return n&&n.__esModule?n:{default:n}}function l(n){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(n)}function r(n,e){(0,d.default)(n);var i,c;l(e)==="object"?(i=e.min||0,c=e.max):(i=arguments[1],c=arguments[2]);var u=encodeURI(n).split(/%..|./).length-1;return u>=i&&(typeof c>"u"||u<=c)}f.exports=t.default,f.exports.default=t.default})(E,E.exports);var W=E.exports,D={exports:{}},S={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;function d(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;for(var r in l)typeof s[r]>"u"&&(s[r]=l[r]);return s}f.exports=t.default,f.exports.default=t.default})(S,S.exports);var R=S.exports;(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var d=l(h),s=l(R);function l(e){return e&&e.__esModule?e:{default:e}}var r={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function n(e,i){(0,d.default)(e),i=(0,s.default)(i,r),i.allow_trailing_dot&&e[e.length-1]==="."&&(e=e.substring(0,e.length-1)),i.allow_wildcard===!0&&e.indexOf("*.")===0&&(e=e.substring(2));var c=e.split("."),u=c[c.length-1];return i.require_tld&&(c.length<2||!i.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(u)||/\s/.test(u))||!i.allow_numeric_tld&&/^\d+$/.test(u)?!1:c.every(function(_){return!(_.length>63&&!i.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(_)||/[\uff01-\uff5e]/.test(_)||/^-|-$/.test(_)||!i.allow_underscores&&/_/.test(_))})}f.exports=t.default,f.exports.default=t.default})(D,D.exports);var k=D.exports,P={exports:{}};(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=s(h);function s(u){return u&&u.__esModule?u:{default:u}}var l="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",r="(".concat(l,"[.]){3}").concat(l),n=new RegExp("^".concat(r,"$")),e="(?:[0-9a-fA-F]{1,4})",i=new RegExp("^("+"(?:".concat(e,":){7}(?:").concat(e,"|:)|")+"(?:".concat(e,":){6}(?:").concat(r,"|:").concat(e,"|:)|")+"(?:".concat(e,":){5}(?::").concat(r,"|(:").concat(e,"){1,2}|:)|")+"(?:".concat(e,":){4}(?:(:").concat(e,"){0,1}:").concat(r,"|(:").concat(e,"){1,3}|:)|")+"(?:".concat(e,":){3}(?:(:").concat(e,"){0,2}:").concat(r,"|(:").concat(e,"){1,4}|:)|")+"(?:".concat(e,":){2}(?:(:").concat(e,"){0,3}:").concat(r,"|(:").concat(e,"){1,5}|:)|")+"(?:".concat(e,":){1}(?:(:").concat(e,"){0,4}:").concat(r,"|(:").concat(e,"){1,6}|:)|")+"(?::((?::".concat(e,"){0,5}:").concat(r,"|(?::").concat(e,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function c(u){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,d.default)(u),_=String(_),_?_==="4"?n.test(u):_==="6"?i.test(u):!1:c(u,4)||c(u,6)}f.exports=t.default,f.exports.default=t.default})(P,P.exports);var X=P.exports;(function(f,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=N;var d=e(h),s=e(W),l=e(k),r=e(X),n=e(R);function e(o){return o&&o.__esModule?o:{default:o}}var i={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},c=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,u=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,_=/^[a-z\d]+$/,U=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,z=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,C=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,L=254;function O(o){var a=o.replace(/^"(.+)"$/,"$1");if(!a.trim())return!1;var m=/[\.";<>]/.test(a);if(m){if(a===o)return!1;var x=a.split('"').length===a.split('\\"').length;if(!x)return!1}return!0}function N(o,a){if((0,d.default)(o),a=(0,n.default)(a,i),a.require_display_name||a.allow_display_name){var m=o.match(c);if(m){var x=m[1];if(o=o.replace(x,"").replace(/(^<|>$)/g,""),x.endsWith(" ")&&(x=x.slice(0,-1)),!O(x))return!1}else if(a.require_display_name)return!1}if(!a.ignore_max_length&&o.length>L)return!1;var $=o.split("@"),v=$.pop(),F=v.toLowerCase();if(a.host_blacklist.includes(F)||a.host_whitelist.length>0&&!a.host_whitelist.includes(F))return!1;var g=$.join("@");if(a.domain_specific_validation&&(F==="gmail.com"||F==="googlemail.com")){g=g.toLowerCase();var q=g.split("+")[0];if(!(0,s.default)(q.replace(/\./g,""),{min:6,max:30}))return!1;for(var A=q.split("."),p=0;p<A.length;p++)if(!_.test(A[p]))return!1}if(a.ignore_max_length===!1&&(!(0,s.default)(g,{max:64})||!(0,s.default)(v,{max:254})))return!1;if(!(0,l.default)(v,{require_tld:a.require_tld,ignore_max_length:a.ignore_max_length,allow_underscores:a.allow_underscores})){if(!a.allow_ip_domain)return!1;if(!(0,r.default)(v)){if(!v.startsWith("[")||!v.endsWith("]"))return!1;var M=v.slice(1,-1);if(M.length===0||!(0,r.default)(M))return!1}}if(g[0]==='"')return g=g.slice(1,g.length-1),a.allow_utf8_local_part?C.test(g):U.test(g);for(var Q=a.allow_utf8_local_part?z:u,I=g.split("."),y=0;y<I.length;y++)if(!Q.test(I[y]))return!1;return!(a.blacklisted_chars&&g.search(new RegExp("[".concat(a.blacklisted_chars,"]+"),"g"))!==-1)}f.exports=t.default,f.exports.default=t.default})(w,w.exports);var Z=w.exports;const H=B(Z);export{h as a,k as b,X as c,H as i,R as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as w,e as v,u as I,N as P,O as T,l as d,j as t,n as j,H as k,B as R,Q as S,v as E,x as F,y as C,G as L}from"./index-
|
|
1
|
+
import{d as w,e as v,u as I,N as P,O as T,l as d,j as t,n as j,H as k,B as R,Q as S,v as E,x as F,y as C,G as L}from"./index-BXfEXarc.js";import{I as N}from"./invitation-_z1Xj-DN.js";import{F as W}from"./fullpage-Dv48OHgB.js";import"./index-CrwNbpvE.js";import"./emotion-cache.browser.esm-DnONerVw.js";import"./index-C5OdroAa.js";import"./use-passport-id-B-b-_oYF.js";import"./session-C7vFWF9o.js";import"./sdk-De7qEvqq.js";import"./CheckCircle-Dnb1dYCF.js";import"./wrap-locale-fQx_G_1w.js";import"./Link-BMMtX5fH.js";function G(m){var p;const{searchParams:a}=new URL(window.location.href),{api:n,session:u}=w(),f=v(),{t:l}=I(),r=a.get("id"),c=a.get("redirect"),h=P({state:""}),e=T(async()=>{if(!r)return null;const{data:s}=await n.get("/api/invitation",{params:{inviteId:r,mode:"issue-passport"}});return s}),x=d(()=>{if(e.error)throw e.error;return e==null?void 0:e.data}),g=d(async(s,o=i=>i)=>{s&&(s.sessionToken&&E(o(s.sessionToken)),s.refreshToken&&F(o(s.refreshToken)),s.visitorId&&C(o(s.visitorId)),await u.refresh()),setTimeout(()=>{if(c){const i=decodeURIComponent(c);i.startsWith(L.WELLKNOWN_SERVICE_PATH_PREFIX)?f(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||"/"},50)});return e.loading?t.jsx(j,{}):t.jsxs(W,{did:(p=window.blocklet)==null?void 0:p.appPid,children:[t.jsx(k,{children:t.jsx("title",{children:l("pageTitle.issuePassport")})}),t.jsx(R,{className:"page-invite",sx:{width:"560px",maxWidth:"100%",height:"100%"},children:t.jsx(N,{...m,action:"issue-passport",getDataFn:x,checkFn:n.get,createPassportSvg:S,onLoginSuccess:g,inService:!0,status:h.state})})]})}export{G as default};
|