@abtnode/blocklet-services 1.16.41-beta-20250318-123609-b48bb2d7 → 1.16.41-beta-20250319-034744-5c62f533
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/open-graph/index.js +21 -11
- package/api/libs/open-graph/template.js +42 -2
- package/api/services/auth/connect/receive-transfer-app-owner.js +15 -3
- package/dist/assets/{ArrowDropDown-Do4OWmCn.js → ArrowDropDown-ydRfHJ2x.js} +1 -1
- package/dist/assets/{CheckCircle-DDHElFhm.js → CheckCircle-DgSwRUf8.js} +1 -1
- package/dist/assets/{ChevronLeft-CLfrYODg.js → ChevronLeft-CqDoHwdJ.js} +1 -1
- package/dist/assets/{ChevronRight-OJJ2SUEU.js → ChevronRight-Bpkf9aqI.js} +1 -1
- package/dist/assets/{DeleteOutline-C954mj84.js → DeleteOutline-D4DYIaUj.js} +1 -1
- package/dist/assets/{Done-BXwXbLQs.js → Done-B8c93MpP.js} +1 -1
- package/dist/assets/{Download-OmIe8_8C.js → Download-DANYdeZR.js} +1 -1
- package/dist/assets/{Error-CXMTbOyQ.js → Error-wKO1hXtU.js} +1 -1
- package/dist/assets/{ExpandLess-xJAJmJam.js → ExpandLess-BqrBuxL9.js} +1 -1
- package/dist/assets/{Google-jC4aGgA_.js → Google-CBPWeaVC.js} +4 -4
- package/dist/assets/{InfoOutlined-Dto4CBtr.js → InfoOutlined-HP5LuELQ.js} +1 -1
- package/dist/assets/{Launch-Do09YVNX.js → Launch-XvyEoGhF.js} +1 -1
- package/dist/assets/{LaunchOutlined-DyT6-6Gt.js → LaunchOutlined-BfbVRiJT.js} +1 -1
- package/dist/assets/{MoreHoriz-CU3bPiks.js → MoreHoriz-Cv3BqpRU.js} +1 -1
- package/dist/assets/{PlayArrow-DsdnOq2p.js → PlayArrow-DI84Lay5.js} +1 -1
- package/dist/assets/{ViewList-B2mYqtoR.js → ViewList-DLzG9ldE.js} +1 -1
- package/dist/assets/{access-control-BWBOA4g6.js → access-control-DyHt8ppX.js} +1 -1
- package/dist/assets/{actions-4OuC0GHy.js → actions-CBPbCBQc.js} +1 -1
- package/dist/assets/add-component-core-DOdhiJes.js +765 -0
- package/dist/assets/add-resource-CGPM0kPR.js +1 -0
- package/dist/assets/{addon-D4YcNftH.js → addon-bbJfiLal.js} +1 -1
- package/dist/assets/{analytics-BZzzJZSo.js → analytics-BRjS4mY-.js} +1 -1
- package/dist/assets/api-CvDkueg1.js +1 -0
- package/dist/assets/{ar-BVbwKJY8.js → ar-A7PXaQSB.js} +1 -1
- package/dist/assets/{audit-logs-JO59CyGM.js → audit-logs-D1W37Cj4.js} +1 -1
- package/dist/assets/{base32-BjPUfmet.js → base32-gJJTbpiB.js} +1 -1
- package/dist/assets/{branding-CR1e2n6E.js → branding-DR3Jnq-d.js} +2 -2
- package/dist/assets/{bundle-avatar-Chdo4m6E.js → bundle-avatar-Eqwd2qUG.js} +1 -1
- package/dist/assets/{button-BSP6Y6OJ.js → button-BqyvGZC-.js} +1 -1
- package/dist/assets/{click-to-copy-fQS5t8fq.js → click-to-copy-Dc16fHKA.js} +1 -1
- package/dist/assets/{complete--VG1kQVy.js → complete-BzSPyjUA.js} +1 -1
- package/dist/assets/{component-DfQn7Awf.js → component--_f-xKi7.js} +1 -1
- package/dist/assets/{config-C-1jeE31.js → config-BDpdqYom.js} +1 -1
- package/dist/assets/{config-mzUmZpxy.js → config-C3tQWDAE.js} +1 -1
- package/dist/assets/config-navigation-BrXS6Zm4.js +29 -0
- package/dist/assets/{config-space-6wpekLZ1.js → config-space-BZu4nd7t.js} +1 -1
- package/dist/assets/{confirm-CVR4a5FI.js → confirm-CCmbVvGp.js} +1 -1
- package/dist/assets/{connect-DG6frz_Q.js → connect-Bgm2clKz.js} +1 -1
- package/dist/assets/{connect-D_mrUgoL.js → connect-C1EdscR7.js} +1 -1
- package/dist/assets/{connect-to-BhxyRPHq.js → connect-to-CAjdR1Vi.js} +1 -1
- package/dist/assets/{dashboard-DE28EHHN.js → dashboard-C2dbiNOp.js} +3 -3
- package/dist/assets/{de-nWUnqN3q.js → de-DQLOqs4x.js} +1 -1
- package/dist/assets/{delete-confirm-CCY-Xpk5.js → delete-confirm-CVo1ye7X.js} +1 -1
- package/dist/assets/{did-address-Dx-4WAXQ.js → did-address-DIKoCoBp.js} +1 -1
- package/dist/assets/{domain-DHb1Ps_o.js → domain-BQkRhwGe.js} +1 -1
- package/dist/assets/{domain-action-card-BNfDBQhX.js → domain-action-card-Dlgq4rsm.js} +1 -1
- package/dist/assets/domains-DaOwHgX-.js +1 -0
- package/dist/assets/{email-B20szkwm.js → email-BHF0jLjs.js} +1 -1
- package/dist/assets/{es-C7damQG2.js → es-Wyib4tkS.js} +1 -1
- package/dist/assets/{exchange-passport-DbZWgurv.js → exchange-passport-C6TpmUyM.js} +1 -1
- package/dist/assets/{form-text-input-BTiyCo4F.js → form-text-input-C8x5debf.js} +1 -1
- package/dist/assets/{fr-D3MUmftb.js → fr-CTdi8lPh.js} +1 -1
- package/dist/assets/{fuel-SLm_JOs-.js → fuel-DQMzXBHQ.js} +1 -1
- package/dist/assets/{fullpage-50xw6Dda.js → fullpage-kiX9qo3H.js} +1 -1
- package/dist/assets/{get-safe-url-C42wIqi-.js → get-safe-url-BvS0hy8W.js} +1 -1
- package/dist/assets/{get-safe-url-Cn4KEro2.js → get-safe-url-CXJBjnNj.js} +1 -1
- package/dist/assets/{hi-DLH2NuCr.js → hi-Dk3MVpw6.js} +1 -1
- package/dist/assets/{home-CUlFLl78.js → home-CfRR-l78.js} +1 -1
- package/dist/assets/{id-C_OpwsKG.js → id-BqyOVEFD.js} +1 -1
- package/dist/assets/{iframe-BfxIVBTL.js → iframe-C0FAfo1V.js} +1 -1
- package/dist/assets/{index-CKGdCheG.js → index-BL64rJ3g.js} +1 -1
- package/dist/assets/{index-DNxvGCUa.js → index-BVjGveR4.js} +1 -1
- package/dist/assets/{index-xfe9Dcxz.js → index-BsMTGy4m.js} +1 -1
- package/dist/assets/{index-DOilqSvA.js → index-Bv_udrJr.js} +1 -1
- package/dist/assets/{index-Do_PTy2g.js → index-CYdNDqQ1.js} +8 -8
- package/dist/assets/{index-CbiypPHS.js → index-CmyG8bip.js} +1 -1
- package/dist/assets/{index-mkd7rmEP.js → index-D2qwAqco.js} +1 -1
- package/dist/assets/{index-F9fg_Rq5.js → index-D5rqbUOM.js} +1 -1
- package/dist/assets/{index-CPUTxynZ.js → index-D8WxMgot.js} +14 -14
- package/dist/assets/{index-D3BxoukB.js → index-DJJGXGi6.js} +1 -1
- package/dist/assets/{index-D_zMGAKU.js → index-DQKEK30u.js} +1 -1
- package/dist/assets/{index-BFV3n5Hy.js → index-Dal_0cM6.js} +1 -1
- package/dist/assets/{index-CyTMvqg2.js → index-Db8S8FOW.js} +1 -1
- package/dist/assets/{index-B6Y7SW3z.js → index-DojJOk-8.js} +1 -1
- package/dist/assets/index-Dv43WFu_.js +220 -0
- package/dist/assets/{index-DI6dvNrm.js → index-Hc4fe8tE.js} +1 -1
- package/dist/assets/{index-BCtCJuih.js → index-KP4WZslk.js} +1 -1
- package/dist/assets/{invitation-BuB1-TxL.js → invitation-CDtK_Uyv.js} +1 -1
- package/dist/assets/{invite-C8_Fxnwn.js → invite-DSQnWK9o.js} +1 -1
- package/dist/assets/{issue-passport-BjcOuQDv.js → issue-passport-Bb_7kKPQ.js} +1 -1
- package/dist/assets/{item-3tNefK7M.js → item-C1U0HVPR.js} +1 -1
- package/dist/assets/{ja-rh-7J19i.js → ja-BIiN349J.js} +1 -1
- package/dist/assets/{ko-DxXSLIu1.js → ko-D9z_sjE3.js} +1 -1
- package/dist/assets/{layout-ceT4Awul.js → layout-Bkn9nC3f.js} +1 -1
- package/dist/assets/{list-BaQMMWrO.js → list-BIXoIHH2.js} +2 -1
- package/dist/assets/localization-Cf41fenL.js +1 -0
- package/dist/assets/{log-CNHqg8uo.js → log-CuiY798z.js} +1 -1
- package/dist/assets/{login-DXKAfWij.js → login-Ds2aHi-M.js} +1 -1
- package/dist/assets/{login-oauth-callback-20hVf_bH.js → login-oauth-callback-DAKHXtVv.js} +1 -1
- package/dist/assets/{logo-uploader-Dh1aL_OF.js → logo-uploader-DQCS5qZW.js} +3 -3
- package/dist/assets/{lost-passport-CZEU6dJY.js → lost-passport-DdbK0_Yc.js} +1 -1
- package/dist/assets/{omit-BySqlv7K.js → omit-DVwO9e3E.js} +1 -1
- package/dist/assets/{open-window-D4nELhWH.js → open-window-yeboX1Ru.js} +1 -1
- package/dist/assets/{overview-xXsfHZEs.js → overview-DFNGZZos.js} +1 -1
- package/dist/assets/{page-header-C2MPWR-H.js → page-header-DyeTxe1U.js} +1 -1
- package/dist/assets/{permission-DXzAY72t.js → permission-ZvUR5Tj-.js} +1 -1
- package/dist/assets/{preferences-D2Jg5k10.js → preferences-Dx29Tgc2.js} +1 -1
- package/dist/assets/{profile-embed-BDQR5OIg.js → profile-embed-C_yYlnVt.js} +1 -1
- package/dist/assets/{pt-q0ZSfFth.js → pt-DbNy95wU.js} +1 -1
- package/dist/assets/publish-resource-CPSJ7Gd2.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-Z01y4hUy.js → react-beautiful-dnd.esm-DcDZ_Ghe.js} +1 -1
- package/dist/assets/{relative-time-wZZM9yTU.js → relative-time-xM8Zc84I.js} +1 -1
- package/dist/assets/{ru-CK3mPXUk.js → ru-BEliZjDL.js} +1 -1
- package/dist/assets/sdk-CVa22Xgm.js +1 -0
- package/dist/assets/{session-BcGa2Lwu.js → session-CD9NaM-v.js} +1 -1
- package/dist/assets/setup-CkUck5w6.js +19 -0
- package/dist/assets/{start-nMBbzJog.js → start-CRCAeTDI.js} +1 -1
- package/dist/assets/{status-CW8cLZwc.js → status-D8ugfvVU.js} +1 -1
- package/dist/assets/{step-actions-D4sVdJ5W.js → step-actions-C83ykph7.js} +1 -1
- package/dist/assets/{studio-oozJB1Q3.js → studio-Cb_GlvSi.js} +1 -1
- package/dist/assets/{switch-control-G4nR-MQG.js → switch-control-CJ1duVKM.js} +1 -1
- package/dist/assets/{th-DBezSIJU.js → th-KPXdcBJ0.js} +1 -1
- package/dist/assets/{traffic-ChHSyQUx.js → traffic-DjeUj5sV.js} +1 -1
- package/dist/assets/{transfer-AGCuXVp7.js → transfer-B_MO7Mf7.js} +1 -1
- package/dist/assets/{unsubscribe-D2HmFcyp.js → unsubscribe-ajBobtwD.js} +1 -1
- package/dist/assets/{useAsync-CDzQ0uN6.js → useAsync-D2OhgEkV.js} +1 -1
- package/dist/assets/{useAsyncRetry-CcF3e_P6.js → useAsyncRetry-CEJwVPZ6.js} +1 -1
- package/dist/assets/{useLocalStorage-Nwt6lPBi.js → useLocalStorage-CtbpqE0c.js} +1 -1
- package/dist/assets/{user-center-Q-dkmQTy.js → user-center-D62gRjAl.js} +1 -1
- package/dist/assets/{util-DfhJqpch.js → util-CohOBosL.js} +1 -1
- package/dist/assets/{util-ChHwCleX.js → util-CzgwETtC.js} +1 -1
- package/dist/assets/{vendor-arcblock-BkdpkIRL.js → vendor-arcblock-E5QJEgSK.js} +1 -1
- package/dist/assets/{vendor-hooks-DbRTDIFw.js → vendor-hooks-CYyfK9g3.js} +1 -1
- package/dist/assets/{vendor-utils-DJ1bmiuG.js → vendor-utils-CbeKtci8.js} +1 -1
- package/dist/assets/{vendor-ux-did-connect-BUS40ceY.js → vendor-ux-did-connect-D75Zatzm.js} +44 -44
- package/dist/assets/{vi-hjA0ec5w.js → vi-ChkGdSKU.js} +1 -1
- package/dist/assets/wrap-locale-lZatlhee.js +1 -0
- package/dist/assets/{zh-BIwal6DF.js → zh-DDAGRLEd.js} +1 -1
- package/dist/assets/{zh-tw-Bj9DYpoo.js → zh-tw-DIWT2k6_.js} +1 -1
- package/dist/images/banner.png +0 -0
- package/dist/index.html +5 -5
- package/dist/service-worker.js +1 -1
- package/package.json +28 -28
- package/dist/assets/add-component-core-BJzkE6_k.js +0 -765
- package/dist/assets/add-resource-CFUb5VgO.js +0 -1
- package/dist/assets/api-D2GjOmnt.js +0 -1
- package/dist/assets/cloneDeep-SKWOTeUJ.js +0 -1
- package/dist/assets/config-navigation-Dm_JpS-L.js +0 -26
- package/dist/assets/domains-CO5BsFN8.js +0 -1
- package/dist/assets/index-Bm1Z6vIr.js +0 -220
- package/dist/assets/localization-UtRmFKb1.js +0 -1
- package/dist/assets/publish-resource-DDV8cXFW.js +0 -1
- package/dist/assets/sdk-msG4TyIo.js +0 -1
- package/dist/assets/setup-C9iZjtRd.js +0 -19
- package/dist/assets/wrap-locale-DnXm9Rv3.js +0 -1
|
@@ -1,765 +0,0 @@
|
|
|
1
|
-
import{a1 as Fo,j as i,E as _,a2 as gt,a9 as Ge,a3 as H,T as ge,t as qt,bn as Qr,bO as Zr,I as Bo,bC as $o,bP as Uo,z as Wo,be as Ra,b2 as zo,bl as Ca,M as hr,bv as Ia,bw as Pa,bx as La,br as _a,ac as qo,L as Na,b1 as Aa,b0 as Da,ai as ei,a4 as Ko,a6 as Ma,ad as tt,e as Yn,bE as Fa,x as Jn,R as Vo,V as Go,am as Ho,bK as Xo,af as Ba,aa as zt,bd as Hi,A as Xi,Z as $a,P as Ua,G as Wa,v as za,$ as qa,D as Ka,K as Yi,bp as Va}from"./vendor-mui-core-O22FPGM4.js";import{r as A,g as ti,f as Ga,k as Ha,a as ni,e as Ee,b as Xa,l as Ya}from"./vendor-react-DoD83n6N.js";import{j as Yo,d as Ja,S as Qa,s as Jo,A as Za}from"./item-3tNefK7M.js";import{r as Qo,B as dt,ak as ri,P as Zo,p as es,u as vt,i as lt,a as el,l as tl,aj as pr,aZ as nl,am as ts,bd as Ji,ap as rl,V as ii,C as il,s as Vt,U as cr,aw as Qi,af as ns,be as ar,f as oi,b2 as rs,g as is,X as ol,bf as sl,ai as zr,bg as al}from"./vendor-ux-did-connect-BUS40ceY.js";import{z as Cn,f as Mt,Z as ll,_ as cl,h as Ot,$ as ul,D as dl,a0 as hl,a1 as pl,a2 as fl,C as fr,a3 as os,X as ml,a4 as gl,a5 as vl,a6 as yl,a7 as tr,a8 as Zi,a9 as bl}from"./index-Do_PTy2g.js";import{j as eo,c as xl,E as mr,e as wl,f as El,g as Sl,L as Tl,S as jl}from"./vendor-arcblock-BkdpkIRL.js";import{L as to}from"./launch-result-message-WNYdod-D.js";import{P as ss}from"./page-header-C2MPWR-H.js";import{b as ut,p as Ol,B as kl,C as no,x as Gn,Y as as,a0 as Rl,ab as Cl,G as Il,J as Sr,w as si,W as Pl,ac as Ll,ad as _l,ae as Nl,y as qn,af as Al,c as Dl}from"./vendor-utils-DJ1bmiuG.js";import{u as Ml,C as Fl}from"./config-space-6wpekLZ1.js";import{R as Tr}from"./logo-uploader-Dh1aL_OF.js";import{S as Bl}from"./index-CKGdCheG.js";import{s as ls,h as $l,w as Ul,f as Wl,a as zl,b as ql,c as Kl,M as Vl}from"./index-oXEi5lCg.js";import{l as Qn,f as Gl,a as Hl,e as cs,w as Xl}from"./vendor-hooks-DbRTDIFw.js";import{g as Yl}from"./get-safe-url-C42wIqi-.js";import{p as Jl}from"./index-D_zMGAKU.js";import{r as Ql}from"./cloneDeep-SKWOTeUJ.js";import{I as ro}from"./index-F9fg_Rq5.js";import{u as Zl}from"./session-BcGa2Lwu.js";import{W as ec}from"./did-address-Dx-4WAXQ.js";import{_ as us}from"./useLocalStorage-Nwt6lPBi.js";import{f as ds}from"./format-error-LAoTjvJe.js";import{a as io}from"./api-D2GjOmnt.js";import{d as tc,a as nc,v as rc,e as ic}from"./util-DfhJqpch.js";import{u as hs}from"./use-mobile-Cb_97PZu.js";import{C as oc}from"./content-layout--DV54O6i.js";import{C as sc,D as ac,a as lc}from"./connect-to-BhxyRPHq.js";import{d as cc}from"./ArrowDropDown-Do4OWmCn.js";import{d as uc}from"./ChevronLeft-CLfrYODg.js";import{d as dc}from"./ChevronRight-OJJ2SUEU.js";const of="blocklet-add-component-registry",sf="server-add-registry",af=e=>`resource-${e}-add-registry`;var ai={},hc=Fo;Object.defineProperty(ai,"__esModule",{value:!0});var ps=ai.default=void 0,pc=hc(Qo()),fc=i;ps=ai.default=(0,pc.default)((0,fc.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function fs(e){const{info:t}=Cn();return A.useMemo(()=>{var n,r,o;return!e||!((n=e.docker)!=null&&n.image)||(r=e.docker)!=null&&r.image&&((o=e.docker)!=null&&o.runBaseScript)?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork},[e,t])}function li({disabled:e,children:t,onConfirm:n}){return A.useEffect(()=>{if(e)return()=>{};const r=o=>{o.code==="Enter"&&(o.metaKey===!0||o.ctrlKey===!0)&&(o.preventDefault(),o.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}li.propTypes={disabled:_.bool,children:_.any.isRequired,onConfirm:_.func.isRequired};li.defaultProps={disabled:!1};function ci({onContinue:e,nextDisabled:t,launching:n,texts:r,description:o}){const[u,d]=A.useState(!1),h=()=>d(v=>!v);return i.jsxs(i.Fragment,{children:[i.jsx(mc,{children:i.jsxs(li,{disabled:t,onConfirm:e,children:[i.jsx("div",{className:"eula-trigger",onClick:h,children:r.listenName}),i.jsx(dt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?i.jsxs(i.Fragment,{children:[i.jsx(gt,{size:14}),r.launchingText]}):r.buttonNext})]})}),i.jsx(ri,{open:u,title:r.listenName,onClose:()=>d(!1),children:o})]})}ci.propTypes={onContinue:_.func.isRequired,nextDisabled:_.bool,launching:_.bool,description:_.any,texts:_.object};ci.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const mc=Ge.div`
|
|
2
|
-
margin: 0 auto;
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
align-items: center;
|
|
6
|
-
|
|
7
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.eula-trigger {
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
text-decoration: underline;
|
|
14
|
-
${e=>e.theme.breakpoints.up("md")} {
|
|
15
|
-
padding-right: 24px;
|
|
16
|
-
}
|
|
17
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
18
|
-
padding: 16px;
|
|
19
|
-
}
|
|
20
|
-
font-size: 14px;
|
|
21
|
-
white-space: nowrap;
|
|
22
|
-
&:hover {
|
|
23
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.next-button {
|
|
28
|
-
min-width: 200px;
|
|
29
|
-
}
|
|
30
|
-
`;var ui={exports:{}},oo=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,gc=/\n/g,vc=/^\s*/,yc=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bc=/^:\s*/,xc=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,wc=/^[;\s]*/,Ec=/^\s+|\s+$/g,Sc=`
|
|
31
|
-
`,so="/",ao="*",un="",Tc="comment",jc="declaration",Oc=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(S){var R=S.match(gc);R&&(n+=R.length);var N=S.lastIndexOf(Sc);r=~N?S.length-N:r+S.length}function u(){var S={line:n,column:r};return function(R){return R.position=new d(S),x(),R}}function d(S){this.start=S,this.end={line:n,column:r},this.source=t.source}d.prototype.content=e;function h(S){var R=new Error(t.source+":"+n+":"+r+": "+S);if(R.reason=S,R.filename=t.source,R.line=n,R.column=r,R.source=e,!t.silent)throw R}function v(S){var R=S.exec(e);if(R){var N=R[0];return o(N),e=e.slice(N.length),R}}function x(){v(vc)}function s(S){var R;for(S=S||[];R=a();)R!==!1&&S.push(R);return S}function a(){var S=u();if(!(so!=e.charAt(0)||ao!=e.charAt(1))){for(var R=2;un!=e.charAt(R)&&(ao!=e.charAt(R)||so!=e.charAt(R+1));)++R;if(R+=2,un===e.charAt(R-1))return h("End of comment missing");var N=e.slice(2,R-2);return r+=2,o(N),e=e.slice(R),r+=2,S({type:Tc,comment:N})}}function k(){var S=u(),R=v(yc);if(R){if(a(),!v(bc))return h("property missing ':'");var N=v(xc),D=S({type:jc,property:lo(R[0].replace(oo,un)),value:N?lo(N[0].replace(oo,un)):un});return v(wc),D}}function b(){var S=[];s(S);for(var R;R=k();)R!==!1&&(S.push(R),s(S));return S}return x(),b()};function lo(e){return e?e.replace(Ec,un):un}var kc=Oc;function ms(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,o=kc(e),u=typeof t=="function",d,h,v=0,x=o.length;v<x;v++)r=o[v],d=r.property,h=r.value,u?t(d,h,r):h&&(n||(n={}),n[d]=h);return n}ui.exports=ms;ui.exports.default=ms;var Rc=ui.exports;const Cc=ti(Rc),Ic={}.hasOwnProperty;function Pc(e,t,n){if(typeof e!="function")throw new TypeError("h is not a function");const r=_c(e),o=Dc(e),u=Ac(e);let d,h;if(typeof n=="string"||typeof n=="boolean"?(d=n,n={}):(n||(n={}),d=n.prefix),t&&t.type==="root"){const v=t.children[0];h=t.children.length===1&&v.type==="element"?v:{type:"element",tagName:"div",properties:{},children:t.children}}else if(t&&t.type==="element")h=t;else throw new Error("Expected root or element, not `"+(t&&t.type||t)+"`");return gs(e,h,{schema:n.space==="svg"?ls:$l,prefix:d==null?r||o||u?"h-":void 0:typeof d=="string"?d:d?"h-":void 0,key:0,react:r,vue:o,vdom:u,hyperscript:Nc(e)})}function gs(e,t,n){const r=n.schema;let o=r,u=t.tagName;const d={},h=[];let v=-1,x;r.space==="html"&&u.toLowerCase()==="svg"&&(o=ls,n.schema=o);for(x in t.properties)t.properties&&Ic.call(t.properties,x)&&Lc(d,x,t.properties[x],n,u);if(n.vdom&&(o.space==="html"?u=u.toUpperCase():o.space&&(d.namespace=Ul[o.space])),n.prefix&&(n.key++,d.key=n.prefix+n.key),t.children)for(;++v<t.children.length;){const s=t.children[v];s.type==="element"?h.push(gs(e,s,n)):s.type==="text"&&h.push(s.value)}return n.schema=r,h.length>0?e.call(t,u,d,h):e.call(t,u,d)}function Lc(e,t,n,r,o){const u=Wl(r.schema,t);let d;n==null||typeof n=="number"&&Number.isNaN(n)||n===!1&&(r.vue||r.vdom||r.hyperscript)||!n&&u.boolean&&(r.vue||r.vdom||r.hyperscript)||(Array.isArray(n)&&(n=u.commaSeparated?zl(n):ql(n)),u.boolean&&r.hyperscript&&(n=""),u.property==="style"&&typeof n=="string"&&(r.react||r.vue||r.vdom)&&(n=Mc(n,o)),r.vue?u.property!=="style"&&(d="attrs"):u.mustUseProperty||(r.vdom?u.property!=="style"&&(d="attributes"):r.hyperscript&&(d="attrs")),d?e[d]=Object.assign(e[d]||{},{[u.attribute]:n}):u.space&&r.react?e[Kl[u.property]||u.property]=n:e[u.attribute]=n)}function _c(e){const t=e("div",{});return!!(t&&("_owner"in t||"_store"in t)&&(t.key===void 0||t.key===null))}function Nc(e){return"context"in e&&"cleanup"in e}function Ac(e){return e("div",{}).type==="VirtualNode"}function Dc(e){const t=e("div",{});return!!(t&&t.context&&t.context._isVue)}function Mc(e,t){const n={};try{Cc(e,(r,o)=>{r.slice(0,4)==="-ms-"&&(r="ms-"+r.slice(4)),n[r.replace(/-([a-z])/g,(u,d)=>d.toUpperCase())]=o})}catch(r){const o=r;throw o.message=t+"[style]"+o.message.slice(9),o}return n}var Fc=vs;function vs(e){if(typeof e=="string")return Wc(e);if(e==null)return zc;if(typeof e=="object")return("length"in e?Uc:$c)(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function Bc(e){for(var t=[],n=e.length,r=-1;++r<n;)t[r]=vs(e[r]);return t}function $c(e){return t;function t(n){var r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function Uc(e){var t=Bc(e),n=t.length;return r;function r(){for(var o=-1;++o<n;)if(t[o].apply(this,arguments))return!0;return!1}}function Wc(e){return t;function t(n){return!!(n&&n.type===e)}}function zc(){return!0}var qc=gr,Kc=Fc,ys=!0,bs="skip",lr=!1;gr.CONTINUE=ys;gr.SKIP=bs;gr.EXIT=lr;function gr(e,t,n,r){var o;typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),o=Kc(t),u(e,null,[]);function u(h,v,x){var s=[],a;return(!t||o(h,v,x[x.length-1]||null))&&(s=co(n(h,x)),s[0]===lr)?s:h.children&&s[0]!==bs?(a=co(d(h.children,x.concat(h))),a[0]===lr?a:s):s}function d(h,v){for(var x=-1,s=r?-1:1,a=(r?h.length:x)+s,k;a>x&&a<h.length;){if(k=u(h[a],a,v),k[0]===lr)return k;a=typeof k[1]=="number"?k[1]:a+s}}}function co(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[ys,e]:[e]}var Vc=yr,vr=qc,Gc=vr.CONTINUE,Hc=vr.SKIP,Xc=vr.EXIT;yr.CONTINUE=Gc;yr.SKIP=Hc;yr.EXIT=Xc;function yr(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),vr(e,t,o,r);function o(u,d){var h=d[d.length-1],v=h?h.children.indexOf(u):null;return n(u,v,h)}}var Yc=Vc,Jc=Object.prototype.hasOwnProperty,jr={align:"text-align",valign:"vertical-align",height:"height",width:"width"},Qc=function(t){return Yc(t,"element",Zc),t};function Zc(e){if(!(e.tagName!=="tr"&&e.tagName!=="td"&&e.tagName!=="th")){var t,n;for(t in jr)!Jc.call(jr,t)||e.properties[t]===void 0||(n=jr[t],eu(e,n,e.properties[t]),delete e.properties[t])}}function eu(e,t,n){var r=(e.properties.style||"").trim();r&&!/;\s*/.test(r)&&(r+=";"),r&&(r+=" ");var o=r+t+": "+n+";";e.properties.style=o}const tu=ti(Qc);function nu(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}const ru={}.hasOwnProperty,iu=new Set(["table","thead","tbody","tfoot","tr"]);function ou(e){if(!e||typeof e.createElement!="function")throw new TypeError("createElement is not a function");const t=e.createElement,n=e.fixTableCellAlign!==!1;Object.assign(this,{Compiler:r});function r(u){let d=Pc(o,n?tu(u):u,e.prefix);return u.type==="root"?(d=d&&typeof d=="object"&&"type"in d&&"props"in d&&d.type==="div"&&(u.children.length!==1||u.children[0].type!=="element")?d.props.children:[d],t(e.Fragment||"div",{},d)):d}function o(u,d,h){if(h&&iu.has(u)&&(h=h.filter(v=>!nu(v))),e.components&&ru.call(e.components,u)){const v=e.components[u];return e.passNode&&typeof v=="function"&&(d=Object.assign({node:this},d)),t(v,d,h)}return t(u,d,h)}}function di({children:e}){return i.jsx(su,{children:e})}const uo="source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important",su=Ge(H)`
|
|
32
|
-
.highlight pre,
|
|
33
|
-
pre {
|
|
34
|
-
border-radius: 5px;
|
|
35
|
-
}
|
|
36
|
-
code {
|
|
37
|
-
font-family: ${uo};
|
|
38
|
-
}
|
|
39
|
-
pre code {
|
|
40
|
-
font-size: 14px;
|
|
41
|
-
font-family: ${uo};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
h1,
|
|
45
|
-
h2,
|
|
46
|
-
h3,
|
|
47
|
-
h4,
|
|
48
|
-
h5,
|
|
49
|
-
h6 {
|
|
50
|
-
font-weight: 700 !important;
|
|
51
|
-
font-size: 1.2rem !important;
|
|
52
|
-
line-height: 1.5 !important;
|
|
53
|
-
margin-bottom: 16px;
|
|
54
|
-
margin-top: 24px;
|
|
55
|
-
border-bottom: initial !important;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.CodeMirror pre {
|
|
59
|
-
background: #f6f8fa !important;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.anchor {
|
|
63
|
-
display: none;
|
|
64
|
-
}
|
|
65
|
-
`;di.propTypes={children:_.any.isRequired};di.defaultProps={};function xs({infoList:e=[]}){return i.jsx(H,{className:"info-table",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"max-content 1fr"},columnGap:4,rowGap:1.5},children:e.map(t=>i.jsxs(i.Fragment,{children:[i.jsx(H,{component:"span",sx:{fontWeight:"bold",whiteSpace:"nowrap"},children:t.key}),i.jsx(H,{component:"span",sx:{marginTop:{xs:-1,md:0}},children:t.value})]}))})}xs.propTypes={infoList:_.arrayOf(_.shape({key:_.string,value:_.string}))};const au=e=>e.payment?(e.payment.price||[]).map(n=>n.value||0).every(n=>n===0):!0,lu=new ou({createElement:A.createElement}).Compiler,jt={zh:{appinfo:{name:"应用名",version:"版本号",author:"开发者",description:"描述",community:"社区地址",documentation:"文档手册",support:"服务支持",overview:"概述",requirements:"节点版本要求"}},en:{appinfo:{name:"Name",version:"Version",author:"Author",description:"Description",community:"Community",documentation:"Documentation",support:"Support",overview:"Overview",requirements:"Server requirements"}}};function hi({blockletMeta:e,locale:t,handleDescEle:n}){const{data:r}=e,{registryUrl:o,did:u}=r,d=Mt.getDisplayName({meta:r}),h=Qn(()=>o&&u?fetch(eo(o,"/api/blocklets",u,"readme")).then(S=>S.json()):null,{refreshDeps:[o,u]}),v=Gl(()=>h.data?h.data[t]||h.data.en||h.data[Object.keys(h.data)[0]]:"",[h]),x=r&&r.htmlAst?lu(r.htmlAst):"",s=au(r);let a=ut(r,"owner.fullName");if(a){const S=ut(r,"owner.did");S&&(a=i.jsxs(H,{sx:{display:"flex",alignItems:"center",gap:1},children:[a,i.jsx(Zo,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:S,compact:!0,size:14,locale:t})]}))}else a=ut(r,"author.name");const k=[{key:ut(jt[t],"appinfo.name"),value:Mt.getDisplayName({meta:r})},{key:ut(jt[t],"appinfo.version"),value:r.version},{key:ut(jt[t],"appinfo.author"),value:a},{type:"description",key:ut(jt[t],"appinfo.description"),value:r.description}];r.requirements&&k.push({key:ut(jt[t],"appinfo.requirements"),value:r.requirements.server}),r.community&&k.push({key:ut(jt[t],"appinfo.community"),value:i.jsx("a",{href:r.community,target:"_blank",rel:"noreferrer",children:r.community})}),r.documentation&&k.push({key:ut(jt[t],"appinfo.documentation"),value:i.jsx("a",{href:r.documentation,target:"_blank",rel:"noreferrer",children:r.documentation})}),r.support&&k.push({key:ut(jt[t],"appinfo.support"),value:i.jsx("a",{href:`mailto:${r.support}`,target:"_blank",rel:"noreferrer",children:r.support})}),x&&k.push({key:ut(jt[t],"appinfo.overview"),value:""});let b;return t==="zh"?b=i.jsxs(i.Fragment,{children:[s?i.jsxs("p",{children:["您可以免费使用 ",i.jsx("b",{children:d}),";"]}):i.jsxs("p",{children:["您需要购买才能使用 ",i.jsx("b",{children:d}),";"]}),i.jsx("p",{children:"在应用启动前,需要选择您的节点;"}),i.jsx("p",{children:"如果您没有节点,我们会引导您创建新的节点;"}),i.jsx("p",{children:"下面为该应用的信息:"})]}):b=i.jsxs(i.Fragment,{children:[s?i.jsxs("p",{children:["You can use ",i.jsx("b",{children:d})," for free;"]}):i.jsxs("p",{children:["You need to purchase before launch ",i.jsx("b",{children:d}),";"]}),i.jsx("p",{children:"Before the blocklet starts, you need to select your Blocklet Server; "}),i.jsx("p",{children:"If you do not have any Blocklet Server, we will guide you to create a new one; "}),i.jsx("p",{children:"Below is the information for the blocklet: "})]}),i.jsxs(uu,{children:[n||b,i.jsx(xs,{infoList:k}),v?i.jsxs("div",{className:"app-overview",children:[i.jsx(ge,{variant:"h5",gutterBottom:!0,children:ut(jt[t],"appinfo.overview")}),i.jsx(di,{children:i.jsx(cu,{component:"div",className:"content-wrapper post-content",children:i.jsx(Vl,{source:v,wrapperElement:{"data-color-mode":"light"},urlTransform:(S,R,N)=>S.startsWith("/")?eo(o,S):S})})})]}):x?i.jsx("div",{className:"app-overview",children:x}):null]})}const cu=Ge(ge)`
|
|
66
|
-
width: 100%;
|
|
67
|
-
word-wrap: break-word;
|
|
68
|
-
word-break: break-word;
|
|
69
|
-
line-height: 1.5em;
|
|
70
|
-
min-height: 10vh;
|
|
71
|
-
margin-bottom: 40px !important;
|
|
72
|
-
|
|
73
|
-
.alert-content {
|
|
74
|
-
max-width: 100%;
|
|
75
|
-
p:last-of-type {
|
|
76
|
-
margin-bottom: 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
iframe {
|
|
81
|
-
width: 100% !important;
|
|
82
|
-
}
|
|
83
|
-
`,uu=Ge.div`
|
|
84
|
-
.info-table {
|
|
85
|
-
a {
|
|
86
|
-
word-break: break-all;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
.app-overview {
|
|
90
|
-
font-size: 16px;
|
|
91
|
-
margin: 16px 0 0 16px;
|
|
92
|
-
h1 {
|
|
93
|
-
margin: 8px 0;
|
|
94
|
-
font-size: 20px;
|
|
95
|
-
}
|
|
96
|
-
h2 {
|
|
97
|
-
margin: 8px 0;
|
|
98
|
-
font-size: 18px;
|
|
99
|
-
}
|
|
100
|
-
ul {
|
|
101
|
-
display: block;
|
|
102
|
-
list-style-type: disc;
|
|
103
|
-
padding-left: 2em;
|
|
104
|
-
li {
|
|
105
|
-
display: list-item;
|
|
106
|
-
list-style: disc;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
blockquote {
|
|
110
|
-
margin-left: 2em;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
`;hi.propTypes={blockletMeta:_.object.isRequired,locale:_.string.isRequired,handleDescEle:_.node};hi.defaultProps={handleDescEle:""};function du({...e}){return i.jsxs("div",{...e,style:{width:"100%"},children:[i.jsx("h3",{children:"End User License Agreement for Application"}),i.jsxs("p",{children:["Blocklet Server License Agreement ",es.COPYRIGHT_OWNER," version 2020-08-28"]}),i.jsx("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),i.jsx("p",{children:"暂无"})]})}function hu(e){var t,n,r,o;return`${((t=e.bundleSource)==null?void 0:t.store)||e.meta.homepage}/assets/${(n=e.meta)==null?void 0:n.did}/${((r=e.meta)==null?void 0:r.logo)||"logo.png"}?v=${(o=e.meta)==null?void 0:o.version}`}function pi({installRelated:e,meta:t,show:n,onClose:r,components:o,loading:u}){const{t:d}=vt(),h=qt(a=>a.breakpoints.down("md"));if(!n)return null;const v=!u&&o.length===0,x=!u&&o.length!==0,s=40;return i.jsxs(ri,{title:d("blocklet.component.relatedComponents",{name:t.title}),maxWidth:!1,fullWidth:!1,onClose:(a,k)=>{k!=="backdropClick"&&r(!1)},PaperProps:{style:h?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[u&&i.jsx(H,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:i.jsx(H,{sx:{fontSize:32},color:"primary.main",component:lt,icon:"line-md:loading-loop"})}),v&&i.jsx(H,{sx:{textAlign:"center"},children:d("blocklet.component.noDependencies",{name:t.title})}),x&&i.jsx(H,{sx:{marginBottom:2},children:o.map(a=>{if(!a.meta)return null;const{required:k}=a;let b;return e||k?b=1:b=.5,i.jsxs(H,{sx:{opacity:b,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[i.jsx("img",{style:{width:s,height:s,minWidth:s,minHeight:s},src:hu(a),alt:a.meta.title}),i.jsxs(H,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[i.jsxs(H,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var S;window.open(Yl(`${((S=a.bundleSource)==null?void 0:S.store)||a.meta.homepage}/blocklets/${a.meta.did}`,{allowDomains:null}),"_blank")},children:[a.meta.title,i.jsx(H,{sx:{display:k?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:d("blocklet.component.required")}),i.jsxs(H,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[a.meta.version,i.jsx(H,{className:"link-icon",icon:"fluent:open-20-filled",component:lt,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),i.jsx(H,{sx:{marginTop:0,opacity:.7},children:a.meta.description})]})]},a.meta.did)})})]})}pi.propTypes={meta:_.object,show:_.bool,onClose:_.func.isRequired,installRelated:_.func,components:_.array.isRequired,loading:_.bool.isRequired};pi.defaultProps={meta:null,show:!1,installRelated:!1};function pu(e){return e&&(e.registryUrl||e.homepage)&&e.did?`${e.registryUrl||e.homepage}/api/blocklets/${e==null?void 0:e.did}/blocklet.json`:""}function fu(e){const{api:t}=Cn(),[n]=Ga(),r=n.get("blocklet_meta_url")||pu(e),[o,u]=A.useState([]),[d,h]=A.useState(!1);return A.useEffect(()=>{!r||e!=null&&e.inputUrl||(h(!0),t.getDynamicComponents({input:{url:r}}).then(v=>{u(v.components)}).finally(()=>{h(!1)}))},[r]),{components:o,loading:d}}function fi({installRelated:e,onChangeInstallRelated:t,meta:n,onClickNext:r,handleDescEle:o}){const u=Ha(),{t:d,locale:h}=vt(),[v,x]=A.useState(!1),{components:s,loading:a}=fu(n),k=fs(n),b=r||(()=>{u(`/launch-blocklet/install${window.location.search}`)}),S=()=>{x(!0)},R=()=>{x(!1)};return i.jsxs(mu,{children:[i.jsx("div",{className:"app-content",children:i.jsx("div",{className:"agreement",children:i.jsx("div",{className:"agreement-content",children:k?i.jsx(hi,{blockletMeta:{data:n},locale:h,handleDescEle:o}):i.jsx(H,{sx:{p:3},children:i.jsx(ge,{children:d("launchBlocklet.dockerBlockletCantInstall")})})})})}),i.jsxs(H,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[a?i.jsx(lt,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,k&&t&&(s!=null&&s.length)?i.jsxs(H,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[i.jsx(Qr,{sx:{mr:.5},checked:e,onChange:N=>t(N.currentTarget.checked),control:i.jsx(Zr,{}),label:i.jsx("span",{children:d("launchBlocklet.installRelatedComponents")})}),i.jsx(H,{sx:{"> button svg":{color:"primary.main"}},children:i.jsx(Bo,{size:"small",onClick:S,children:i.jsx(lt,{icon:"octicon:package-dependencies-16"})})})]}):null,i.jsx("div",{className:"button-container","data-cy":"agree-all",children:k?i.jsx(ci,{onContinue:b,description:i.jsx(du,{}),texts:{listenName:d("launchBlocklet.license"),buttonNext:d("launchBlocklet.next")}}):null})]}),i.jsx(pi,{installRelated:e,meta:n,show:v,onClose:R,components:s,loading:a})]})}fi.propTypes={meta:_.object.isRequired,onClickNext:_.func,handleDescEle:_.node,installRelated:_.bool,onChangeInstallRelated:_.func};fi.defaultProps={onClickNext:null,handleDescEle:"",installRelated:!0,onChangeInstallRelated:null};const mu=Ge.div`
|
|
114
|
-
display: flex;
|
|
115
|
-
flex-direction: column;
|
|
116
|
-
align-items: center;
|
|
117
|
-
width: 100%;
|
|
118
|
-
height: 100%;
|
|
119
|
-
flex: 1;
|
|
120
|
-
.app-content {
|
|
121
|
-
padding: 2px 24px 24px;
|
|
122
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
123
|
-
padding-top: 10px;
|
|
124
|
-
}
|
|
125
|
-
width: 100%;
|
|
126
|
-
flex: 1;
|
|
127
|
-
letter-spacing: normal;
|
|
128
|
-
}
|
|
129
|
-
.agreement {
|
|
130
|
-
position: relative;
|
|
131
|
-
display: flex;
|
|
132
|
-
flex-direction: column;
|
|
133
|
-
width: 100%;
|
|
134
|
-
height: 100%;
|
|
135
|
-
border: 1px solid ${e=>e.theme.palette.grey[100]};
|
|
136
|
-
border-radius: 12px;
|
|
137
|
-
${e=>e.theme.breakpoints.up("md")} {
|
|
138
|
-
margin-top: 24px;
|
|
139
|
-
}
|
|
140
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
141
|
-
margin-top: 16px;
|
|
142
|
-
}
|
|
143
|
-
.agreement-content {
|
|
144
|
-
position: absolute;
|
|
145
|
-
left: 0;
|
|
146
|
-
top: 0;
|
|
147
|
-
width: 100%;
|
|
148
|
-
height: 100%;
|
|
149
|
-
font-size: 14px;
|
|
150
|
-
overflow-y: auto;
|
|
151
|
-
${e=>e.theme.breakpoints.up("md")} {
|
|
152
|
-
padding: 0 24px;
|
|
153
|
-
}
|
|
154
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
155
|
-
padding: 0 16px;
|
|
156
|
-
}
|
|
157
|
-
&:after {
|
|
158
|
-
display: block;
|
|
159
|
-
content: '';
|
|
160
|
-
height: 24px;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
.agreement-bottom {
|
|
165
|
-
display: flex;
|
|
166
|
-
width: 100%;
|
|
167
|
-
padding: 24px;
|
|
168
|
-
${e=>e.theme.breakpoints.up("md")} {
|
|
169
|
-
flex-direction: row;
|
|
170
|
-
align-items: center;
|
|
171
|
-
margin-left: auto;
|
|
172
|
-
}
|
|
173
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
174
|
-
flex-direction: column;
|
|
175
|
-
align-items: center;
|
|
176
|
-
padding-top: 0;
|
|
177
|
-
padding-bottom: 16px;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
.button-container {
|
|
181
|
-
${e=>e.theme.breakpoints.up("md")} {
|
|
182
|
-
margin-left: auto;
|
|
183
|
-
}
|
|
184
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
185
|
-
padding-top: 0;
|
|
186
|
-
padding-bottom: 16px;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
`;var ws={},mi={exports:{}},Es={exports:{}},$n=Es.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(e){return"file-"+Ss(e)}}},ho={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:Ss};Object.keys($n).forEach(function(e){Object.keys(ho).forEach(function(t){$n[e][t]||($n[e][t]=ho[t])}),$n[e].protocols_re=RegExp("^("+$n[e].protocols.map(function(t){return t.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function Ss(e){return e.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var Ts=Es.exports,po=Ts,On=Object.assign||function(t,n){if(n===null||typeof n!="object")return t;const r=Object.keys(n);let o=r.length;for(;o--;)t[r[o]]=n[r[o]];return t},gu=Xe;function Xe(e,t,n,r,o,u,d){var h=this;h.type=e,Object.keys(po[e]).forEach(function(v){h[v]=po[e][v]}),h.user=t,h.auth=n,h.project=r,h.committish=o,h.default=u,h.opts=d||{}}Xe.prototype.hash=function(){return this.committish?"#"+this.committish:""};Xe.prototype._fill=function(e,t){if(e){var n=On({},t);n.path=n.path?n.path.replace(/^[/]+/g,""):"",t=On(On({},this.opts),t);var r=this;Object.keys(this).forEach(function(s){r[s]!=null&&n[s]==null&&(n[s]=r[s])});var o=n.auth,u=n.committish,d=n.fragment,h=n.path,v=n.project;Object.keys(n).forEach(function(s){var a=n[s];(s==="path"||s==="project")&&typeof a=="string"?n[s]=a.split("/").map(function(k){return encodeURIComponent(k)}).join("/"):s!=="domain"&&(n[s]=encodeURIComponent(a))}),n["auth@"]=o?o+"@":"",n["#fragment"]=d?"#"+this.hashformat(d):"",n.fragment=n.fragment?n.fragment:"",n["#path"]=h?"#"+this.hashformat(h):"",n["/path"]=n.path?"/"+n.path:"",n.projectPath=v.split("/").map(encodeURIComponent).join("/"),t.noCommittish?(n["#committish"]="",n["/tree/committish"]="",n["/committish"]="",n.committish=""):(n["#committish"]=u?"#"+u:"",n["/tree/committish"]=n.committish?"/"+n.treepath+"/"+n.committish:"",n["/committish"]=n.committish?"/"+n.committish:"",n.committish=n.committish||"master");var x=e;return Object.keys(n).forEach(function(s){x=x.replace(new RegExp("[{]"+s+"[}]","g"),n[s])}),t.noGitPlus?x.replace(/^git[+]/,""):x}};Xe.prototype.ssh=function(e){return this._fill(this.sshtemplate,e)};Xe.prototype.sshurl=function(e){return this._fill(this.sshurltemplate,e)};Xe.prototype.browse=function(e,t,n){return typeof e=="string"?(typeof t!="string"&&(n=t,t=null),this._fill(this.browsefiletemplate,On({fragment:t,path:e},n))):this._fill(this.browsetemplate,e)};Xe.prototype.docs=function(e){return this._fill(this.docstemplate,e)};Xe.prototype.bugs=function(e){return this._fill(this.bugstemplate,e)};Xe.prototype.https=function(e){return this._fill(this.httpstemplate,e)};Xe.prototype.git=function(e){return this._fill(this.gittemplate,e)};Xe.prototype.shortcut=function(e){return this._fill(this.shortcuttemplate,e)};Xe.prototype.path=function(e){return this._fill(this.pathtemplate,e)};Xe.prototype.tarball=function(e){var t=On({},e,{noCommittish:!1});return this._fill(this.tarballtemplate,t)};Xe.prototype.file=function(e,t){return this._fill(this.filetemplate,On({path:e},t))};Xe.prototype.getDefaultRepresentation=function(){return this.default};Xe.prototype.toString=function(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)};var Or,fo;function vu(){return fo||(fo=1,Or=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Or}var yu=ve;ve.Node=pn;ve.create=ve;function ve(e){var t=this;if(t instanceof ve||(t=new ve),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(o){t.push(o)});else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}ve.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t};ve.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};ve.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};ve.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)xu(this,arguments[e]);return this.length};ve.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)wu(this,arguments[e]);return this.length};ve.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};ve.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};ve.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;n!==null;r++)e.call(t,n.value,r,this),n=n.next};ve.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;n!==null;r--)e.call(t,n.value,r,this),n=n.prev};ve.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++)n=n.next;if(t===e&&n!==null)return n.value};ve.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++)n=n.prev;if(t===e&&n!==null)return n.value};ve.prototype.map=function(e,t){t=t||this;for(var n=new ve,r=this.head;r!==null;)n.push(e.call(t,r.value,this)),r=r.next;return n};ve.prototype.mapReverse=function(e,t){t=t||this;for(var n=new ve,r=this.tail;r!==null;)n.push(e.call(t,r.value,this)),r=r.prev;return n};ve.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else if(this.head)r=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;r!==null;o++)n=e(n,r.value,o),r=r.next;return n};ve.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;r!==null;o--)n=e(n,r.value,o),r=r.prev;return n};ve.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;n!==null;t++)e[t]=n.value,n=n.next;return e};ve.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;n!==null;t++)e[t]=n.value,n=n.prev;return e};ve.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new ve;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,o=this.head;o!==null&&r<e;r++)o=o.next;for(;o!==null&&r<t;r++,o=o.next)n.push(o.value);return n};ve.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new ve;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,o=this.tail;o!==null&&r>t;r--)o=o.prev;for(;o!==null&&r>e;r--,o=o.prev)n.push(o.value);return n};ve.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;o!==null&&r<e;r++)o=o.next;for(var u=[],r=0;o&&r<t;r++)u.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var r=0;r<n.length;r++)o=bu(this,o,n[r]);return u};ve.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;n!==null;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};function bu(e,t,n){var r=t===e.head?new pn(n,null,t,e):new pn(n,t,t.next,e);return r.next===null&&(e.tail=r),r.prev===null&&(e.head=r),e.length++,r}function xu(e,t){e.tail=new pn(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function wu(e,t){e.head=new pn(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function pn(e,t,n,r){if(!(this instanceof pn))return new pn(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{vu()(ve)}catch{}const Eu=yu,dn=Symbol("max"),Dt=Symbol("length"),jn=Symbol("lengthCalculator"),Kn=Symbol("allowStale"),hn=Symbol("maxAge"),At=Symbol("dispose"),mo=Symbol("noDisposeOnSet"),We=Symbol("lruList"),bt=Symbol("cache"),js=Symbol("updateAgeOnGet"),kr=()=>1;class Su{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[dn]=t.max||1/0;const n=t.length||kr;if(this[jn]=typeof n!="function"?kr:n,this[Kn]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[hn]=t.maxAge||0,this[At]=t.dispose,this[mo]=t.noDisposeOnSet||!1,this[js]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[dn]=t||1/0,Un(this)}get max(){return this[dn]}set allowStale(t){this[Kn]=!!t}get allowStale(){return this[Kn]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[hn]=t,Un(this)}get maxAge(){return this[hn]}set lengthCalculator(t){typeof t!="function"&&(t=kr),t!==this[jn]&&(this[jn]=t,this[Dt]=0,this[We].forEach(n=>{n.length=this[jn](n.value,n.key),this[Dt]+=n.length})),Un(this)}get lengthCalculator(){return this[jn]}get length(){return this[Dt]}get itemCount(){return this[We].length}rforEach(t,n){n=n||this;for(let r=this[We].tail;r!==null;){const o=r.prev;go(this,t,r,n),r=o}}forEach(t,n){n=n||this;for(let r=this[We].head;r!==null;){const o=r.next;go(this,t,r,n),r=o}}keys(){return this[We].toArray().map(t=>t.key)}values(){return this[We].toArray().map(t=>t.value)}reset(){this[At]&&this[We]&&this[We].length&&this[We].forEach(t=>this[At](t.key,t.value)),this[bt]=new Map,this[We]=new Eu,this[Dt]=0}dump(){return this[We].map(t=>ur(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[We]}set(t,n,r){if(r=r||this[hn],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const o=r?Date.now():0,u=this[jn](n,t);if(this[bt].has(t)){if(u>this[dn])return kn(this,this[bt].get(t)),!1;const v=this[bt].get(t).value;return this[At]&&(this[mo]||this[At](t,v.value)),v.now=o,v.maxAge=r,v.value=n,this[Dt]+=u-v.length,v.length=u,this.get(t),Un(this),!0}const d=new Tu(t,n,u,o,r);return d.length>this[dn]?(this[At]&&this[At](t,n),!1):(this[Dt]+=d.length,this[We].unshift(d),this[bt].set(t,this[We].head),Un(this),!0)}has(t){if(!this[bt].has(t))return!1;const n=this[bt].get(t).value;return!ur(this,n)}get(t){return Rr(this,t,!0)}peek(t){return Rr(this,t,!1)}pop(){const t=this[We].tail;return t?(kn(this,t),t.value):null}del(t){kn(this,this[bt].get(t))}load(t){this.reset();const n=Date.now();for(let r=t.length-1;r>=0;r--){const o=t[r],u=o.e||0;if(u===0)this.set(o.k,o.v);else{const d=u-n;d>0&&this.set(o.k,o.v,d)}}}prune(){this[bt].forEach((t,n)=>Rr(this,n,!1))}}const Rr=(e,t,n)=>{const r=e[bt].get(t);if(r){const o=r.value;if(ur(e,o)){if(kn(e,r),!e[Kn])return}else n&&(e[js]&&(r.value.now=Date.now()),e[We].unshiftNode(r));return o.value}},ur=(e,t)=>{if(!t||!t.maxAge&&!e[hn])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[hn]&&n>e[hn]},Un=e=>{if(e[Dt]>e[dn])for(let t=e[We].tail;e[Dt]>e[dn]&&t!==null;){const n=t.prev;kn(e,t),t=n}},kn=(e,t)=>{if(t){const n=t.value;e[At]&&e[At](n.key,n.value),e[Dt]-=n.length,e[bt].delete(n.key),e[We].removeNode(t)}};class Tu{constructor(t,n,r,o,u){this.key=t,this.value=n,this.length=r,this.now=o,this.maxAge=u||0}}const go=(e,t,n,r)=>{let o=n.value;ur(e,o)&&(kn(e,n),e[Kn]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};var ju=Su,qr=ll,vo=Ts,Ou=mi.exports=gu,ku=ju,Cr=new ku({max:1e3}),Ru={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function Cu(e){return Ru[e]||e.slice(0,-1)}var Iu={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};mi.exports.fromUrl=function(e,t){if(typeof e=="string"){var n=e+JSON.stringify(t||{});return Cr.has(n)||Cr.set(n,Pu(e,t)),Cr.get(n)}};function Pu(e,t){if(!(e==null||e==="")){var n=_u(Lu(e)?"github:"+e:e),r=Nu(n),o=n.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),u=Object.keys(vo).map(function(d){try{var h=vo[d],v=null;r.auth&&Iu[r.protocol]&&(v=r.auth);var x=r.hash?decodeURIComponent(r.hash.substr(1)):null,s=null,a=null,k=null;if(o&&o[1]===d)s=o[2]&&decodeURIComponent(o[2]),a=decodeURIComponent(o[3].replace(/\.git$/,"")),k="shortcut";else{if(r.host&&r.host!==h.domain&&r.host.replace(/^www[.]/,"")!==h.domain||!h.protocols_re.test(r.protocol)||!r.path)return;var b=h.pathmatch,S=r.path.match(b);if(!S)return;S[1]!==null&&S[1]!==void 0&&(s=decodeURIComponent(S[1].replace(/^:/,""))),a=decodeURIComponent(S[2]),k=Cu(r.protocol)}return new Ou(d,s,v,a,x,k,t)}catch(R){if(!(R instanceof URIError))throw R}}).filter(function(d){return d});if(u.length===1)return u[0]}}function Lu(e){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(e)}function _u(e){var t=qr.parse(e);return t.protocol==="gist:"&&t.host&&!t.path?t.protocol+"/"+t.host:e}function Nu(e){var t=e.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!t){var n=qr.parse(e);if(n.auth){const o=e.match(/[^@]+@[^:/]+/);if(o){var r=new qr.URL(o[0]);n.auth=r.username||"",r.password&&(n.auth+=":"+r.password)}}return n}return{protocol:"git+ssh:",slashes:!0,auth:t[1],host:t[2],port:null,hostname:t[2],hash:t[4],search:null,query:null,pathname:"/"+t[3],path:"/"+t[3],href:"git+ssh://"+t[1]+"@"+t[2]+"/"+t[3]+(t[4]||"")}}var Au=mi.exports,fn={},te={},Du=null;const Mu=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),Os=ni(Mu),Fu=["ᄀ-ᇹ"," -〿","ぁ-ゔ","゙-ゞ","ァ-ヾ","ㄱ-ㆎ","㆐-㆟","㈀-㈜","㈠-㉃","㉠-㊰","㋀-㍶","㍻-㏝","㏠-㏾","一-龥","가-힣","-","豈-鶴"],Bu=["︰-﹄","﹉-﹒","﹔-﹫","!-~","¢-₩"];var $u={charsWide:Fu,charsFullWidth:Bu};const{charsWide:Uu,charsFullWidth:Wu}=$u,ks=new RegExp(`[${Uu.join("")}${Wu.join("")}]`,"g"),zu=e=>e.replace(ks,"xx").length;var qu={default:zu,charsRegex:ks};/*!
|
|
190
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
191
|
-
*
|
|
192
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
193
|
-
* Licensed under the MIT License.
|
|
194
|
-
*/var Ku=function(t){if(typeof t!="string"||t==="")return!1;for(var n;n=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(n[2])return!0;t=t.slice(n.index+n[0].length)}return!1};/*!
|
|
195
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
196
|
-
*
|
|
197
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
198
|
-
* Released under the MIT License.
|
|
199
|
-
*/var Vu=Ku,Rs={"{":"}","(":")","[":"]"},Gu=function(e){if(e[0]==="!")return!0;for(var t=0,n=-2,r=-2,o=-2,u=-2,d=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||r!==-1&&e[t]==="["&&e[t+1]!=="]"&&(r<t&&(r=e.indexOf("]",t)),r>t&&(d===-1||d>r||(d=e.indexOf("\\",t),d===-1||d>r)))||o!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(o=e.indexOf("}",t),o>t&&(d=e.indexOf("\\",t),d===-1||d>o))||u!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(u=e.indexOf(")",t),u>t&&(d=e.indexOf("\\",t),d===-1||d>u))||n!==-1&&e[t]==="("&&e[t+1]!=="|"&&(n<t&&(n=e.indexOf("|",t)),n!==-1&&e[n+1]!==")"&&(u=e.indexOf(")",n),u>n&&(d=e.indexOf("\\",n),d===-1||d>u))))return!0;if(e[t]==="\\"){var h=e[t+1];t+=2;var v=Rs[h];if(v){var x=e.indexOf(v,t);x!==-1&&(t=x+1)}if(e[t]==="!")return!0}else t++}return!1},Hu=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var n=e[t+1];t+=2;var r=Rs[n];if(r){var o=e.indexOf(r,t);o!==-1&&(t=o+1)}if(e[t]==="!")return!0}else t++}return!1},Xu=function(t,n){if(typeof t!="string"||t==="")return!1;if(Vu(t))return!0;var r=Gu;return n&&n.strict===!1&&(r=Hu),r(t)},Kr={exports:{}};(function(e,t){var n={};t=e.exports=B;var r;typeof Ol=="object"&&n&&n.NODE_DEBUG&&/\bsemver\b/i.test(n.NODE_DEBUG)?r=function(){var l=Array.prototype.slice.call(arguments,0);l.unshift("SEMVER"),console.log.apply(console,l)}:r=function(){},t.SEMVER_SPEC_VERSION="2.0.0";var o=256,u=Number.MAX_SAFE_INTEGER||9007199254740991,d=16,h=o-6,v=t.re=[],x=t.safeRe=[],s=t.src=[],a=t.tokens={},k=0;function b(l){a[l]=k++}var S="[a-zA-Z0-9-]",R=[["\\s",1],["\\d",o],[S,h]];function N(l){for(var y=0;y<R.length;y++){var w=R[y][0],P=R[y][1];l=l.split(w+"*").join(w+"{0,"+P+"}").split(w+"+").join(w+"{1,"+P+"}")}return l}b("NUMERICIDENTIFIER"),s[a.NUMERICIDENTIFIER]="0|[1-9]\\d*",b("NUMERICIDENTIFIERLOOSE"),s[a.NUMERICIDENTIFIERLOOSE]="\\d+",b("NONNUMERICIDENTIFIER"),s[a.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+S+"*",b("MAINVERSION"),s[a.MAINVERSION]="("+s[a.NUMERICIDENTIFIER]+")\\.("+s[a.NUMERICIDENTIFIER]+")\\.("+s[a.NUMERICIDENTIFIER]+")",b("MAINVERSIONLOOSE"),s[a.MAINVERSIONLOOSE]="("+s[a.NUMERICIDENTIFIERLOOSE]+")\\.("+s[a.NUMERICIDENTIFIERLOOSE]+")\\.("+s[a.NUMERICIDENTIFIERLOOSE]+")",b("PRERELEASEIDENTIFIER"),s[a.PRERELEASEIDENTIFIER]="(?:"+s[a.NUMERICIDENTIFIER]+"|"+s[a.NONNUMERICIDENTIFIER]+")",b("PRERELEASEIDENTIFIERLOOSE"),s[a.PRERELEASEIDENTIFIERLOOSE]="(?:"+s[a.NUMERICIDENTIFIERLOOSE]+"|"+s[a.NONNUMERICIDENTIFIER]+")",b("PRERELEASE"),s[a.PRERELEASE]="(?:-("+s[a.PRERELEASEIDENTIFIER]+"(?:\\."+s[a.PRERELEASEIDENTIFIER]+")*))",b("PRERELEASELOOSE"),s[a.PRERELEASELOOSE]="(?:-?("+s[a.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+s[a.PRERELEASEIDENTIFIERLOOSE]+")*))",b("BUILDIDENTIFIER"),s[a.BUILDIDENTIFIER]=S+"+",b("BUILD"),s[a.BUILD]="(?:\\+("+s[a.BUILDIDENTIFIER]+"(?:\\."+s[a.BUILDIDENTIFIER]+")*))",b("FULL"),b("FULLPLAIN"),s[a.FULLPLAIN]="v?"+s[a.MAINVERSION]+s[a.PRERELEASE]+"?"+s[a.BUILD]+"?",s[a.FULL]="^"+s[a.FULLPLAIN]+"$",b("LOOSEPLAIN"),s[a.LOOSEPLAIN]="[v=\\s]*"+s[a.MAINVERSIONLOOSE]+s[a.PRERELEASELOOSE]+"?"+s[a.BUILD]+"?",b("LOOSE"),s[a.LOOSE]="^"+s[a.LOOSEPLAIN]+"$",b("GTLT"),s[a.GTLT]="((?:<|>)?=?)",b("XRANGEIDENTIFIERLOOSE"),s[a.XRANGEIDENTIFIERLOOSE]=s[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",b("XRANGEIDENTIFIER"),s[a.XRANGEIDENTIFIER]=s[a.NUMERICIDENTIFIER]+"|x|X|\\*",b("XRANGEPLAIN"),s[a.XRANGEPLAIN]="[v=\\s]*("+s[a.XRANGEIDENTIFIER]+")(?:\\.("+s[a.XRANGEIDENTIFIER]+")(?:\\.("+s[a.XRANGEIDENTIFIER]+")(?:"+s[a.PRERELEASE]+")?"+s[a.BUILD]+"?)?)?",b("XRANGEPLAINLOOSE"),s[a.XRANGEPLAINLOOSE]="[v=\\s]*("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:"+s[a.PRERELEASELOOSE]+")?"+s[a.BUILD]+"?)?)?",b("XRANGE"),s[a.XRANGE]="^"+s[a.GTLT]+"\\s*"+s[a.XRANGEPLAIN]+"$",b("XRANGELOOSE"),s[a.XRANGELOOSE]="^"+s[a.GTLT]+"\\s*"+s[a.XRANGEPLAINLOOSE]+"$",b("COERCE"),s[a.COERCE]="(^|[^\\d])(\\d{1,"+d+"})(?:\\.(\\d{1,"+d+"}))?(?:\\.(\\d{1,"+d+"}))?(?:$|[^\\d])",b("COERCERTL"),v[a.COERCERTL]=new RegExp(s[a.COERCE],"g"),x[a.COERCERTL]=new RegExp(N(s[a.COERCE]),"g"),b("LONETILDE"),s[a.LONETILDE]="(?:~>?)",b("TILDETRIM"),s[a.TILDETRIM]="(\\s*)"+s[a.LONETILDE]+"\\s+",v[a.TILDETRIM]=new RegExp(s[a.TILDETRIM],"g"),x[a.TILDETRIM]=new RegExp(N(s[a.TILDETRIM]),"g");var D="$1~";b("TILDE"),s[a.TILDE]="^"+s[a.LONETILDE]+s[a.XRANGEPLAIN]+"$",b("TILDELOOSE"),s[a.TILDELOOSE]="^"+s[a.LONETILDE]+s[a.XRANGEPLAINLOOSE]+"$",b("LONECARET"),s[a.LONECARET]="(?:\\^)",b("CARETTRIM"),s[a.CARETTRIM]="(\\s*)"+s[a.LONECARET]+"\\s+",v[a.CARETTRIM]=new RegExp(s[a.CARETTRIM],"g"),x[a.CARETTRIM]=new RegExp(N(s[a.CARETTRIM]),"g");var X="$1^";b("CARET"),s[a.CARET]="^"+s[a.LONECARET]+s[a.XRANGEPLAIN]+"$",b("CARETLOOSE"),s[a.CARETLOOSE]="^"+s[a.LONECARET]+s[a.XRANGEPLAINLOOSE]+"$",b("COMPARATORLOOSE"),s[a.COMPARATORLOOSE]="^"+s[a.GTLT]+"\\s*("+s[a.LOOSEPLAIN]+")$|^$",b("COMPARATOR"),s[a.COMPARATOR]="^"+s[a.GTLT]+"\\s*("+s[a.FULLPLAIN]+")$|^$",b("COMPARATORTRIM"),s[a.COMPARATORTRIM]="(\\s*)"+s[a.GTLT]+"\\s*("+s[a.LOOSEPLAIN]+"|"+s[a.XRANGEPLAIN]+")",v[a.COMPARATORTRIM]=new RegExp(s[a.COMPARATORTRIM],"g"),x[a.COMPARATORTRIM]=new RegExp(N(s[a.COMPARATORTRIM]),"g");var z="$1$2$3";b("HYPHENRANGE"),s[a.HYPHENRANGE]="^\\s*("+s[a.XRANGEPLAIN]+")\\s+-\\s+("+s[a.XRANGEPLAIN]+")\\s*$",b("HYPHENRANGELOOSE"),s[a.HYPHENRANGELOOSE]="^\\s*("+s[a.XRANGEPLAINLOOSE]+")\\s+-\\s+("+s[a.XRANGEPLAINLOOSE]+")\\s*$",b("STAR"),s[a.STAR]="(<|>)?=?\\s*\\*";for(var Y=0;Y<k;Y++)r(Y,s[Y]),v[Y]||(v[Y]=new RegExp(s[Y]),x[Y]=new RegExp(N(s[Y])));t.parse=O;function O(l,y){if((!y||typeof y!="object")&&(y={loose:!!y,includePrerelease:!1}),l instanceof B)return l;if(typeof l!="string"||l.length>o)return null;var w=y.loose?x[a.LOOSE]:x[a.FULL];if(!w.test(l))return null;try{return new B(l,y)}catch{return null}}t.valid=q;function q(l,y){var w=O(l,y);return w?w.version:null}t.clean=Z;function Z(l,y){var w=O(l.trim().replace(/^[=v]+/,""),y);return w?w.version:null}t.SemVer=B;function B(l,y){if((!y||typeof y!="object")&&(y={loose:!!y,includePrerelease:!1}),l instanceof B){if(l.loose===y.loose)return l;l=l.version}else if(typeof l!="string")throw new TypeError("Invalid Version: "+l);if(l.length>o)throw new TypeError("version is longer than "+o+" characters");if(!(this instanceof B))return new B(l,y);r("SemVer",l,y),this.options=y,this.loose=!!y.loose;var w=l.trim().match(y.loose?x[a.LOOSE]:x[a.FULL]);if(!w)throw new TypeError("Invalid Version: "+l);if(this.raw=l,this.major=+w[1],this.minor=+w[2],this.patch=+w[3],this.major>u||this.major<0)throw new TypeError("Invalid major version");if(this.minor>u||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>u||this.patch<0)throw new TypeError("Invalid patch version");w[4]?this.prerelease=w[4].split(".").map(function(P){if(/^[0-9]+$/.test(P)){var j=+P;if(j>=0&&j<u)return j}return P}):this.prerelease=[],this.build=w[5]?w[5].split("."):[],this.format()}B.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},B.prototype.toString=function(){return this.version},B.prototype.compare=function(l){return r("SemVer.compare",this.version,this.options,l),l instanceof B||(l=new B(l,this.options)),this.compareMain(l)||this.comparePre(l)},B.prototype.compareMain=function(l){return l instanceof B||(l=new B(l,this.options)),Se(this.major,l.major)||Se(this.minor,l.minor)||Se(this.patch,l.patch)},B.prototype.comparePre=function(l){if(l instanceof B||(l=new B(l,this.options)),this.prerelease.length&&!l.prerelease.length)return-1;if(!this.prerelease.length&&l.prerelease.length)return 1;if(!this.prerelease.length&&!l.prerelease.length)return 0;var y=0;do{var w=this.prerelease[y],P=l.prerelease[y];if(r("prerelease compare",y,w,P),w===void 0&&P===void 0)return 0;if(P===void 0)return 1;if(w===void 0)return-1;if(w===P)continue;return Se(w,P)}while(++y)},B.prototype.compareBuild=function(l){l instanceof B||(l=new B(l,this.options));var y=0;do{var w=this.build[y],P=l.build[y];if(r("prerelease compare",y,w,P),w===void 0&&P===void 0)return 0;if(P===void 0)return 1;if(w===void 0)return-1;if(w===P)continue;return Se(w,P)}while(++y)},B.prototype.inc=function(l,y){switch(l){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",y);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",y);break;case"prepatch":this.prerelease.length=0,this.inc("patch",y),this.inc("pre",y);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",y),this.inc("pre",y);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var w=this.prerelease.length;--w>=0;)typeof this.prerelease[w]=="number"&&(this.prerelease[w]++,w=-2);w===-1&&this.prerelease.push(0)}y&&(this.prerelease[0]===y?isNaN(this.prerelease[1])&&(this.prerelease=[y,0]):this.prerelease=[y,0]);break;default:throw new Error("invalid increment argument: "+l)}return this.format(),this.raw=this.version,this},t.inc=ue;function ue(l,y,w,P){typeof w=="string"&&(P=w,w=void 0);try{return new B(l,w).inc(y,P).version}catch{return null}}t.diff=J;function J(l,y){if(Rt(l,y))return null;var w=O(l),P=O(y),j="";if(w.prerelease.length||P.prerelease.length){j="pre";var L="prerelease"}for(var F in w)if((F==="major"||F==="minor"||F==="patch")&&w[F]!==P[F])return j+F;return L}t.compareIdentifiers=Se;var se=/^[0-9]+$/;function Se(l,y){var w=se.test(l),P=se.test(y);return w&&P&&(l=+l,y=+y),l===y?0:w&&!P?-1:P&&!w?1:l<y?-1:1}t.rcompareIdentifiers=De;function De(l,y){return Se(y,l)}t.major=Ue;function Ue(l,y){return new B(l,y).major}t.minor=rt;function rt(l,y){return new B(l,y).minor}t.patch=ee;function ee(l,y){return new B(l,y).patch}t.compare=fe;function fe(l,y,w){return new B(l,w).compare(new B(y,w))}t.compareLoose=K;function K(l,y){return fe(l,y,!0)}t.compareBuild=Te;function Te(l,y,w){var P=new B(l,w),j=new B(y,w);return P.compare(j)||P.compareBuild(j)}t.rcompare=oe;function oe(l,y,w){return fe(y,l,w)}t.sort=pt;function pt(l,y){return l.sort(function(w,P){return t.compareBuild(w,P,y)})}t.rsort=xe;function xe(l,y){return l.sort(function(w,P){return t.compareBuild(P,w,y)})}t.gt=Ye;function Ye(l,y,w){return fe(l,y,w)>0}t.lt=ze;function ze(l,y,w){return fe(l,y,w)<0}t.eq=Rt;function Rt(l,y,w){return fe(l,y,w)===0}t.neq=Gt;function Gt(l,y,w){return fe(l,y,w)!==0}t.gte=Ft;function Ft(l,y,w){return fe(l,y,w)>=0}t.lte=Ht;function Ht(l,y,w){return fe(l,y,w)<=0}t.cmp=Pe;function Pe(l,y,w,P){switch(y){case"===":return typeof l=="object"&&(l=l.version),typeof w=="object"&&(w=w.version),l===w;case"!==":return typeof l=="object"&&(l=l.version),typeof w=="object"&&(w=w.version),l!==w;case"":case"=":case"==":return Rt(l,w,P);case"!=":return Gt(l,w,P);case">":return Ye(l,w,P);case">=":return Ft(l,w,P);case"<":return ze(l,w,P);case"<=":return Ht(l,w,P);default:throw new TypeError("Invalid operator: "+y)}}t.Comparator=Le;function Le(l,y){if((!y||typeof y!="object")&&(y={loose:!!y,includePrerelease:!1}),l instanceof Le){if(l.loose===!!y.loose)return l;l=l.value}if(!(this instanceof Le))return new Le(l,y);l=l.trim().split(/\s+/).join(" "),r("comparator",l,y),this.options=y,this.loose=!!y.loose,this.parse(l),this.semver===Je?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}var Je={};Le.prototype.parse=function(l){var y=this.options.loose?x[a.COMPARATORLOOSE]:x[a.COMPARATOR],w=l.match(y);if(!w)throw new TypeError("Invalid comparator: "+l);this.operator=w[1]!==void 0?w[1]:"",this.operator==="="&&(this.operator=""),w[2]?this.semver=new B(w[2],this.options.loose):this.semver=Je},Le.prototype.toString=function(){return this.value},Le.prototype.test=function(l){if(r("Comparator.test",l,this.options.loose),this.semver===Je||l===Je)return!0;if(typeof l=="string")try{l=new B(l,this.options)}catch{return!1}return Pe(l,this.operator,this.semver,this.options)},Le.prototype.intersects=function(l,y){if(!(l instanceof Le))throw new TypeError("a Comparator is required");(!y||typeof y!="object")&&(y={loose:!!y,includePrerelease:!1});var w;if(this.operator==="")return this.value===""?!0:(w=new de(l.value,y),it(this.value,w,y));if(l.operator==="")return l.value===""?!0:(w=new de(this.value,y),it(l.semver,w,y));var P=(this.operator===">="||this.operator===">")&&(l.operator===">="||l.operator===">"),j=(this.operator==="<="||this.operator==="<")&&(l.operator==="<="||l.operator==="<"),L=this.semver.version===l.semver.version,F=(this.operator===">="||this.operator==="<=")&&(l.operator===">="||l.operator==="<="),ne=Pe(this.semver,"<",l.semver,y)&&(this.operator===">="||this.operator===">")&&(l.operator==="<="||l.operator==="<"),ae=Pe(this.semver,">",l.semver,y)&&(this.operator==="<="||this.operator==="<")&&(l.operator===">="||l.operator===">");return P||j||L&&F||ne||ae},t.Range=de;function de(l,y){if((!y||typeof y!="object")&&(y={loose:!!y,includePrerelease:!1}),l instanceof de)return l.loose===!!y.loose&&l.includePrerelease===!!y.includePrerelease?l:new de(l.raw,y);if(l instanceof Le)return new de(l.value,y);if(!(this instanceof de))return new de(l,y);if(this.options=y,this.loose=!!y.loose,this.includePrerelease=!!y.includePrerelease,this.raw=l.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(w){return this.parseRange(w.trim())},this).filter(function(w){return w.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}de.prototype.format=function(){return this.range=this.set.map(function(l){return l.join(" ").trim()}).join("||").trim(),this.range},de.prototype.toString=function(){return this.range},de.prototype.parseRange=function(l){var y=this.options.loose,w=y?x[a.HYPHENRANGELOOSE]:x[a.HYPHENRANGE];l=l.replace(w,Ze),r("hyphen replace",l),l=l.replace(x[a.COMPARATORTRIM],z),r("comparator trim",l,x[a.COMPARATORTRIM]),l=l.replace(x[a.TILDETRIM],D),l=l.replace(x[a.CARETTRIM],X),l=l.split(/\s+/).join(" ");var P=y?x[a.COMPARATORLOOSE]:x[a.COMPARATOR],j=l.split(" ").map(function(L){return Jt(L,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(j=j.filter(function(L){return!!L.match(P)})),j=j.map(function(L){return new Le(L,this.options)},this),j},de.prototype.intersects=function(l,y){if(!(l instanceof de))throw new TypeError("a Range is required");return this.set.some(function(w){return Xt(w,y)&&l.set.some(function(P){return Xt(P,y)&&w.every(function(j){return P.every(function(L){return j.intersects(L,y)})})})})};function Xt(l,y){for(var w=!0,P=l.slice(),j=P.pop();w&&P.length;)w=P.every(function(L){return j.intersects(L,y)}),j=P.pop();return w}t.toComparators=Yt;function Yt(l,y){return new de(l,y).set.map(function(w){return w.map(function(P){return P.value}).join(" ").trim().split(" ")})}function Jt(l,y){return r("comp",l,y),l=Qe(l,y),r("caret",l),l=Bt(l,y),r("tildes",l),l=Zt(l,y),r("xrange",l),l=Me(l,y),r("stars",l),l}function Oe(l){return!l||l.toLowerCase()==="x"||l==="*"}function Bt(l,y){return l.trim().split(/\s+/).map(function(w){return Pn(w,y)}).join(" ")}function Pn(l,y){var w=y.loose?x[a.TILDELOOSE]:x[a.TILDE];return l.replace(w,function(P,j,L,F,ne){r("tilde",l,P,j,L,F,ne);var ae;return Oe(j)?ae="":Oe(L)?ae=">="+j+".0.0 <"+(+j+1)+".0.0":Oe(F)?ae=">="+j+"."+L+".0 <"+j+"."+(+L+1)+".0":ne?(r("replaceTilde pr",ne),ae=">="+j+"."+L+"."+F+"-"+ne+" <"+j+"."+(+L+1)+".0"):ae=">="+j+"."+L+"."+F+" <"+j+"."+(+L+1)+".0",r("tilde return",ae),ae})}function Qe(l,y){return l.trim().split(/\s+/).map(function(w){return Qt(w,y)}).join(" ")}function Qt(l,y){r("caret",l,y);var w=y.loose?x[a.CARETLOOSE]:x[a.CARET];return l.replace(w,function(P,j,L,F,ne){r("caret",l,P,j,L,F,ne);var ae;return Oe(j)?ae="":Oe(L)?ae=">="+j+".0.0 <"+(+j+1)+".0.0":Oe(F)?j==="0"?ae=">="+j+"."+L+".0 <"+j+"."+(+L+1)+".0":ae=">="+j+"."+L+".0 <"+(+j+1)+".0.0":ne?(r("replaceCaret pr",ne),j==="0"?L==="0"?ae=">="+j+"."+L+"."+F+"-"+ne+" <"+j+"."+L+"."+(+F+1):ae=">="+j+"."+L+"."+F+"-"+ne+" <"+j+"."+(+L+1)+".0":ae=">="+j+"."+L+"."+F+"-"+ne+" <"+(+j+1)+".0.0"):(r("no pr"),j==="0"?L==="0"?ae=">="+j+"."+L+"."+F+" <"+j+"."+L+"."+(+F+1):ae=">="+j+"."+L+"."+F+" <"+j+"."+(+L+1)+".0":ae=">="+j+"."+L+"."+F+" <"+(+j+1)+".0.0"),r("caret return",ae),ae})}function Zt(l,y){return r("replaceXRanges",l,y),l.split(/\s+/).map(function(w){return en(w,y)}).join(" ")}function en(l,y){l=l.trim();var w=y.loose?x[a.XRANGELOOSE]:x[a.XRANGE];return l.replace(w,function(P,j,L,F,ne,ae){r("xRange",l,P,j,L,F,ne,ae);var Fe=Oe(L),Ne=Fe||Oe(F),we=Ne||Oe(ne),je=we;return j==="="&&je&&(j=""),ae=y.includePrerelease?"-0":"",Fe?j===">"||j==="<"?P="<0.0.0-0":P="*":j&&je?(Ne&&(F=0),ne=0,j===">"?(j=">=",Ne?(L=+L+1,F=0,ne=0):(F=+F+1,ne=0)):j==="<="&&(j="<",Ne?L=+L+1:F=+F+1),P=j+L+"."+F+"."+ne+ae):Ne?P=">="+L+".0.0"+ae+" <"+(+L+1)+".0.0"+ae:we&&(P=">="+L+"."+F+".0"+ae+" <"+L+"."+(+F+1)+".0"+ae),r("xRange return",P),P})}function Me(l,y){return r("replaceStars",l,y),l.trim().replace(x[a.STAR],"")}function Ze(l,y,w,P,j,L,F,ne,ae,Fe,Ne,we,je){return Oe(w)?y="":Oe(P)?y=">="+w+".0.0":Oe(j)?y=">="+w+"."+P+".0":y=">="+y,Oe(ae)?ne="":Oe(Fe)?ne="<"+(+ae+1)+".0.0":Oe(Ne)?ne="<"+ae+"."+(+Fe+1)+".0":we?ne="<="+ae+"."+Fe+"."+Ne+"-"+we:ne="<="+ne,(y+" "+ne).trim()}de.prototype.test=function(l){if(!l)return!1;if(typeof l=="string")try{l=new B(l,this.options)}catch{return!1}for(var y=0;y<this.set.length;y++)if(wt(this.set[y],l,this.options))return!0;return!1};function wt(l,y,w){for(var P=0;P<l.length;P++)if(!l[P].test(y))return!1;if(y.prerelease.length&&!w.includePrerelease){for(P=0;P<l.length;P++)if(r(l[P].semver),l[P].semver!==Je&&l[P].semver.prerelease.length>0){var j=l[P].semver;if(j.major===y.major&&j.minor===y.minor&&j.patch===y.patch)return!0}return!1}return!0}t.satisfies=it;function it(l,y,w){try{y=new de(y,w)}catch{return!1}return y.test(l)}t.maxSatisfying=Et;function Et(l,y,w){var P=null,j=null;try{var L=new de(y,w)}catch{return null}return l.forEach(function(F){L.test(F)&&(!P||j.compare(F)===-1)&&(P=F,j=new B(P,w))}),P}t.minSatisfying=Ct;function Ct(l,y,w){var P=null,j=null;try{var L=new de(y,w)}catch{return null}return l.forEach(function(F){L.test(F)&&(!P||j.compare(F)===1)&&(P=F,j=new B(P,w))}),P}t.minVersion=qe;function qe(l,y){l=new de(l,y);var w=new B("0.0.0");if(l.test(w)||(w=new B("0.0.0-0"),l.test(w)))return w;w=null;for(var P=0;P<l.set.length;++P){var j=l.set[P];j.forEach(function(L){var F=new B(L.semver.version);switch(L.operator){case">":F.prerelease.length===0?F.patch++:F.prerelease.push(0),F.raw=F.format();case"":case">=":(!w||Ye(w,F))&&(w=F);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+L.operator)}})}return w&&l.test(w)?w:null}t.validRange=vn;function vn(l,y){try{return new de(l,y).range||"*"}catch{return null}}t.ltr=tn;function tn(l,y,w){return I(l,y,"<",w)}t.gtr=yn;function yn(l,y,w){return I(l,y,">",w)}t.outside=I;function I(l,y,w,P){l=new B(l,P),y=new de(y,P);var j,L,F,ne,ae;switch(w){case">":j=Ye,L=Ht,F=ze,ne=">",ae=">=";break;case"<":j=ze,L=Ft,F=Ye,ne="<",ae="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(it(l,y,P))return!1;for(var Fe=0;Fe<y.set.length;++Fe){var Ne=y.set[Fe],we=null,je=null;if(Ne.forEach(function(He){He.semver===Je&&(He=new Le(">=0.0.0")),we=we||He,je=je||He,j(He.semver,we.semver,P)?we=He:F(He.semver,je.semver,P)&&(je=He)}),we.operator===ne||we.operator===ae||(!je.operator||je.operator===ne)&&L(l,je.semver))return!1;if(je.operator===ae&&F(l,je.semver))return!1}return!0}t.prerelease=St;function St(l,y){var w=O(l,y);return w&&w.prerelease.length?w.prerelease:null}t.intersects=It;function It(l,y,w){return l=new de(l,w),y=new de(y,w),l.intersects(y)}t.coerce=nn;function nn(l,y){if(l instanceof B)return l;if(typeof l=="number"&&(l=String(l)),typeof l!="string")return null;y=y||{};var w=null;if(!y.rtl)w=l.match(x[a.COERCE]);else{for(var P;(P=x[a.COERCERTL].exec(l))&&(!w||w.index+w[0].length!==l.length);)(!w||P.index+P[0].length!==w.index+w[0].length)&&(w=P),x[a.COERCERTL].lastIndex=P.index+P[1].length+P[2].length;x[a.COERCERTL].lastIndex=-1}return w===null?null:O(w[2]+"."+(w[3]||"0")+"."+(w[4]||"0"),y)}})(Kr,Kr.exports);var Yu=Kr.exports;const Cs=Yo,kt=Yu,$e="semver",Ju={base:Cs.string(),type:"semverRange",validate:function(e,{error:t}){return kt.validRange(e)?{value:e}:{errors:t(`${$e}.valid`)}},messages:{[`${$e}.valid`]:"{{#label}} needs to be a valid semver range"}},gn={};gn.compare={method:!1,validate:function(e,t,{exp:n},{name:r}){return kt[r](e,n)?e:t.error(`${$e}.${r}`,{exp:n})},args:[{name:"exp",assert:kt.valid,message:"needs to be a valid semver expression"}]};["gt","gte","lt","lte","eq","neq"].forEach(function(e){gn[e]={method:function(t){return this.$_addRule({name:e,method:"compare",args:{exp:t}})}}});gn.cmp={method:function(e,t){return this.$_addRule({name:"cmp",args:{cmp:e,exp:t}})},validate:function(e,t,{cmp:n,exp:r}){return kt.cmp(e,n,r)?e:t.error(`${$e}.cmp`,{cmp:n,exp:r})},args:[{name:"cmp",assert:e=>["===","!==","","=","==","!=",">",">=","<","<="].includes(e),message:"needs to be a valid comparator"},{name:"exp",assert:kt.valid,message:"needs to be a valid semver expression"}]};gn.compareRange={method:!1,validate:function(e,t,{rng:n},{name:r}){return kt[r](e,n)?e:t.error(`${$e}.${r}`,{rng:n})},args:[{name:"rng",assert:kt.validRange,message:"needs to be a valid semver range"}]};["satisfies","gtr","ltr"].forEach(function(e){gn[e]={method:function(t){return this.$_addRule({name:e,method:"compareRange",args:{rng:t}})}}});gn.outside={method:function(e,t){return this.$_addRule({name:"outside",args:{hilo:e,rng:t}})},validate:function(e,t,{hilo:n,rng:r}){return kt.outside(e,r,n)?e:t.error(`${$e}.outside`,{hilo:n,rng:r})},args:[{name:"hilo",assert:e=>[">","<"].includes(e),message:"needs to be a valid comparator"},{name:"rng",assert:kt.validRange,message:"needs to be a valid semver range"}]};const Qu={base:Cs.string(),type:"semver",validate:function(e,{error:t}){return kt.valid(e)?{value:e}:{errors:t(`${$e}.valid`)}},messages:{[`${$e}.valid`]:"{{#label}} needs to be a valid semver expression",[`${$e}.gt`]:"{{#label}} needs to be greater than {{#exp}}",[`${$e}.gte`]:"{{#label}} needs to be greater than or equal to {{#exp}}",[`${$e}.lt`]:"{{#label}} needs to be less than {{#exp}}",[`${$e}.lte`]:"{{#label}} needs to be less than or equal to {{#exp}}",[`${$e}.eq`]:"{{#label}} needs to be logically equivalent to {{#exp}}",[`${$e}.neq`]:"{{#label}} needs to be logically different than {{#exp}}",[`${$e}.cmp`]:"{{#label}} needs to satisfy {{#cmp}} on {{#exp}}",[`${$e}.satisfies`]:"{{#label}} needs to satisfy {{#rng}}",[`${$e}.gtr`]:"{{#label}} needs to be greater than range {{#rng}}",[`${$e}.ltr`]:"{{#label}} needs to be less than range {{#rng}}",[`${$e}.outside`]:"{{#label}} needs to be {{#hilo}} than range {{#rng}}"},rules:gn};var Zu={semver:Qu,semverRange:Ju};/*!
|
|
200
|
-
* is-var-name | ISC (c) Shinnosuke Watanabe
|
|
201
|
-
* https://github.com/shinnn/is-var-name
|
|
202
|
-
*/function ed(e){if(typeof e!="string"||e.trim()!==e)return!1;try{new Function(e,"var "+e)}catch{return!1}return!0}const td=Object.freeze(Object.defineProperty({__proto__:null,default:ed},Symbol.toStringTag,{value:"Module"})),nd=ni(td),rd=ni(Ja),id=el,od=tl,yo=pr,sd=e=>{if((0,yo.isValid)(e))return e;const t=(0,od.toHex)(kl.from(typeof e=="string"?e.trim():e));return(0,yo.fromPublicKey)(t,{role:id.types.RoleType.ROLE_ANY})};var ad=sd,mn={},Is=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mn,"__esModule",{value:!0});mn.didExtension=mn.fileExtension=void 0;const bo=Is(Os),ld=Is(Jl),cd=pr,Ps=e=>({type:"file",base:e.string(),validate(t,{error:n}){return t&&typeof t=="string"?{value:t}:{errors:n("file.empty",{file:t})}},messages:{"file.empty":'file "{{#file}}" must be non-empty string',"file.enoent":'file "{{#file}}" does not exist',"file.error.generic":'file could not be read. message: "{{#message}}"'},rules:{exists:{multi:!1,method({baseDir:t=null,canSkip:n=()=>!1}={}){return this.$_addRule({name:"exists",args:{baseDir:t,canSkip:n}})},args:[{name:"baseDir",assert:t=>bo.default.existsSync(t),message:"baseDir must exist"},{name:"canSkip",assert:t=>typeof t=="function",message:"canSkip must be a function"}],validate(t,{error:n},{baseDir:r,canSkip:o}={}){if(typeof o=="function"&&o(r,t))return t;try{return bo.default.statSync(ld.default.join(r,t)),t}catch(u){switch(u.code){case"ENOENT":return n("file.enoent",{file:t})}return n("file.error.generic",{message:u.message})}}}}});mn.fileExtension=Ps;const Ls=e=>({type:"DID",base:e.string(),validate(t,{error:n}){return!t||typeof t!="string"?{errors:n("did.empty",{did:t})}:(0,cd.isValid)(t)===!1?{errors:n("did.invalid",{did:t})}:{value:t}},messages:{"did.empty":'did "{{#did}}" must be non-empty string',"did.invalid":'did "{{#did}}" is not valid'}});mn.didExtension=Ls;mn.default={fileExtension:Ps,didExtension:Ls};var gi={},_s={exports:{}};const ud=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"];var Ns=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),dd=ud,hd=["node_modules","favicon.ico"],pd=_s.exports=function(e){var t=[],n=[];if(e===null)return n.push("name cannot be null"),Wn(t,n);if(e===void 0)return n.push("name cannot be undefined"),Wn(t,n);if(typeof e!="string")return n.push("name must be a string"),Wn(t,n);if(e.length||n.push("name length must be greater than zero"),e.match(/^\./)&&n.push("name cannot start with a period"),e.match(/^_/)&&n.push("name cannot start with an underscore"),e.trim()!==e&&n.push("name cannot contain leading or trailing spaces"),hd.forEach(function(d){e.toLowerCase()===d&&n.push(d+" is a blacklisted name")}),dd.forEach(function(d){e.toLowerCase()===d&&t.push(d+" is a core module name")}),e.length>214&&t.push("name can no longer contain more than 214 characters"),e.toLowerCase()!==e&&t.push("name can no longer contain capital letters"),/[~'!()*]/.test(e.split("/").slice(-1)[0])&&t.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(e)!==e){var r=e.match(Ns);if(r){var o=r[1],u=r[2];if(encodeURIComponent(o)===o&&encodeURIComponent(u)===u)return Wn(t,n)}n.push("name can only contain URL-friendly characters")}return Wn(t,n)};pd.scopedPackagePattern=Ns;var Wn=function(e,t){var n={validForNewPackages:t.length===0&&e.length===0,validForOldPackages:t.length===0,warnings:e,errors:t};return n.warnings.length||delete n.warnings,n.errors.length||delete n.errors,n},fd=_s.exports;(function(e){var t=Ee&&Ee.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.validateName=e.validateNewDid=void 0;const n=pr,r=t(fd),o=32,u=h=>{if((0,n.toTypeInfo)(h).role!==n.types.RoleType.ROLE_BLOCKLET)throw new Error("Blocklet DID's type must be ROLE_BLOCKLET")};e.validateNewDid=u;const d=(h,{checkDid:v=!0}={})=>{if((0,n.isValid)(h))v&&(0,e.validateNewDid)(h);else{const{validForNewPackages:x,errors:s=[],warnings:a=[]}=(0,r.default)(h);if(!x)throw new Error(s[0]||a[0]);if(h.length>o)throw new Error("Blocklet name is too long")}};e.validateName=d,e.default={validateName:e.validateName,validateNewDid:e.validateNewDid}})(gi);var md=Ee&&Ee.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),gd=Ee&&Ee.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vd=Ee&&Ee.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&md(n,t,r[o]);return gd(n,t),n}}(),In=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(te,"__esModule",{value:!0});te.Joi=te.eventsSchema=te.installBlockletDescriptionSchema=te.installBlockletTitleSchema=te.resourceBundleSchema=te.authConfigSchema=te.cacheableSchema=te.statsSchema=te.titleSchema=te.themeSchema=te.signatureSchema=te.serviceSchema=te.scriptsSchema=te.personSchema=te.navigationSchema=te.navigationItemSchema=te.updateMountPointSchema=te.mountPointSchema=te.logoSchema=te.interfaceSchema=te.environmentNameSchema=te.environmentSchema=te.engineSchema=te.endpointSchema=te.distSchema=te.descriptionSchema=te.createBlockletSchema=te.componentSchema=te.blockletNameSchema=te.blockletMetaSchema=void 0;const yd=In(Os),bd=In(Yo),xd=In(qu),wd=In(Xu),xo=Zu,Ed=In(nd),wo=es,Sd=pr,Td=rd,Ce=Ot,jd=In(ad),Eo=mn,Vr=gi,vi=vd(cl),Od=xd.default.default,So="/.well-known",c=bd.default.extend(xo.semver).extend(xo.semverRange).extend(Eo.fileExtension).extend(Eo.didExtension);te.Joi=c;const To=(e,t)=>(0,vi.checkLink)(e)?e:t.message(`Invalid navigation link: ${e}
|
|
203
|
-
|
|
204
|
-
A valid navigation link should be a relative url which start with '/' or a absolute url, such as:
|
|
205
|
-
- /en/home
|
|
206
|
-
- /zh/home
|
|
207
|
-
- https://www.arcblock.io
|
|
208
|
-
`),kd=(e,t)=>!e||(0,Ed.default)(e)?e:t.message(`Invalid navigation id: ${e}
|
|
209
|
-
|
|
210
|
-
A valid navigation id is should follow the rules of javascript variables, such as:
|
|
211
|
-
- foo
|
|
212
|
-
- fooBar
|
|
213
|
-
- foo123
|
|
214
|
-
|
|
215
|
-
see detail in https://www.npmjs.com/package/is-var-name
|
|
216
|
-
`),br=c.string().trim().min(1).custom(e=>{if(Od(e)>Ce.MAX_TITLE_LENGTH)throw new Error(`title length should not exceed ${Ce.MAX_TITLE_LENGTH} (see: https://www.npmjs.com/package/cjk-length)`);return e}).meta({className:"TTitle"});te.titleSchema=br;const xr=c.string().trim().min(3).max(160).meta({className:"TDescription"});te.descriptionSchema=xr;const As=c.string().trim().min(3).max(20).messages({"*":"Title length must be between 3 and 20 characters"}).meta({className:"TInstallBlockletTitle"});te.installBlockletTitleSchema=As;const Ds=c.string().trim().min(3).max(80).messages({"*":"Description length must be between 3 and 80 characters"}).meta({className:"TInstallBlockletDescription"});te.installBlockletDescriptionSchema=Ds;const Ms=c.string().uri({scheme:["http","https"],allowRelative:!0}).allow("").custom((e,t)=>e.includes(wo.WELLKNOWN_BLOCKLET_LOGO_PATH)?t.message(`logo url should not include ${wo.WELLKNOWN_BLOCKLET_LOGO_PATH}`):e).meta({className:"TLogo"});te.logoSchema=Ms;const Fs=c.string().trim().min(1),yi=Fs.meta({className:"TMountPoint"}).custom((e,t)=>(0,vi.isValidUrlPath)(e)?e:t.message(`mountPoint cannot contain such characters space $*+~()'"!:@\\`));te.mountPointSchema=yi;const Bs=Fs.meta({className:"TUpdateMountPoint"}).custom(e=>(0,vi.default)(e));te.updateMountPointSchema=Bs;const Rn=c.string().custom(e=>((0,Vr.validateName)(e),e)).meta({className:"TBlockletName"});te.blockletNameSchema=Rn;const Rd=[],bi=c.string().trim().min(1).max(50).required().custom((e,t)=>e.startsWith("BLOCKLET")&&!Rd.includes(e)?t.message("Env name can not start with BLOCKLET_"):e.startsWith("COMPONENT")?t.message("Env name can not start with COMPONENT_"):e.startsWith("ABTNODE")?t.message("Env name can not start with ABTNODE_"):/[^\w]/.test(e)?t.message('Env name can include only numbers or letters or "_"'):e).meta({className:"TEnvironmentName",unknownType:"any"});te.environmentNameSchema=bi;const xi=c.object({name:bi.required(),description:c.string().trim().required(),default:c.string().optional().allow("").default(""),required:c.boolean().default(!1),secure:c.boolean().default(!1),validation:c.string().optional(),shared:c.boolean().default(e=>e.secure?!1:void 0)}).custom((e,t)=>e.secure&&e.default?t.message(`Cannot declare default value for secure env ${e.name}`):e).meta({className:"TEnvironment",unknownType:"any"});te.environmentSchema=xi;const wi=c.object({dev:c.string().trim().min(1),e2eDev:c.string().trim().min(1),preFlight:c.string().trim().min(1),preInstall:c.string().trim().min(1),postInstall:c.string().trim().min(1),preStart:c.string().trim().min(1),postStart:c.string().trim().min(1),preStop:c.string().trim().min(1),preUninstall:c.string().trim().min(1),preConfig:c.string().trim().min(1)}).rename("pre-flight","preFlight").rename("pre-install","preInstall").rename("post-install","postInstall").rename("pre-start","preStart").rename("post-start","postStart").rename("pre-stop","preStop").rename("pre-uninstall","preUninstall").rename("pre-config","preConfig").optional().meta({className:"TScripts",unknownType:"any"});te.scriptsSchema=wi;const Ei=c.object({name:c.string().required().trim(),config:c.object().optional().default({})}).unknown(!0).meta({className:"TService",unknownType:"any"});te.serviceSchema=Ei;const Si=c.object({type:c.string().trim(!0).min(1).required(),path:c.string().required(),meta:c.object({vcType:c.string(),payable:c.boolean(),params:c.array().items({name:c.string().required().trim(),description:c.string().required().trim()})})}).meta({className:"TEndpoint",unknownType:"any"});te.endpointSchema=Si;const $s=c.string().trim().custom((e,t)=>{const n=e.split("/").filter(Boolean);return n.length===0?t.message("cacheable path must be a valid pathname that is not /"):`/${n.join("/")}`}).meta({className:"TPathPrefix",unknownType:"any"});te.cacheableSchema=$s;const Ti=c.object({type:c.string().lowercase().valid(...Ce.BLOCKLET_INTERFACE_TYPES).required(),name:c.string().trim().required(),path:c.string().trim().default("/"),prefix:c.string().trim().min(1).default(Ce.BLOCKLET_DYNAMIC_PATH_PREFIX),containerPort:c.number().port().optional(),hostIP:c.string().trim().ip({version:["ipv4","ipv6"]}).optional(),protocol:c.string().lowercase().valid(...Ce.BLOCKLET_INTERFACE_PROTOCOLS).default("http"),port:c.alternatives().try(c.string().uppercase().default(Ce.BLOCKLET_DEFAULT_PORT_NAME),c.object({internal:c.string().uppercase().required(),external:c.number().port().required()})).default(Ce.BLOCKLET_DEFAULT_PORT_NAME),cacheable:c.array().items($s).unique(),services:c.array().items(Ei).unique("name"),endpoints:c.array().items(Si).unique("type"),pageGroups:c.array().items(c.string().min(1).max(255).trim()).unique(),proxyBehavior:c.string().valid("service","direct").default("service").optional()}).meta({className:"TInterface",unknownType:"any"});te.interfaceSchema=Ti;const Cd=c.alternatives().try(c.string().required(),c.object({url:c.string().uri({scheme:["http","https","file"]}).required(),name:Rn.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid())}),c.object({store:c.string().uri({scheme:["http","https"]}).required(),name:Rn.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid()).default("latest")})),Gr=c.object({platform:c.string().valid(...Ce.BLOCKLET_PLATFORMS).optional(),interpreter:c.string().valid("binary","node","blocklet").default("node"),source:Cd,args:c.array().items(c.string()).optional().default([])}).meta({className:"TEngine",unknownType:"any"});te.engineSchema=Gr;const Vn=c.object({name:c.string().min(1).required(),email:c.string().email({tlds:!1}).optional(),url:c.string().uri().optional()}).meta({className:"TPerson",unknownType:"any"});te.personSchema=Vn;const Hn=c.object({tarball:c.alternatives().try(c.string().uri(),c.string()).required(),integrity:c.string().required(),size:c.number().optional()}).meta({className:"TDist",unknownType:"any"});te.distSchema=Hn;const Us=c.object({downloads:c.number().integer().greater(-1),star:c.number().default(0),purchases:c.number().default(0)}).meta({className:"TStats",unknownType:"any"});te.statsSchema=Us;const Id=c.alternatives().try(c.object({url:c.alternatives().try(c.string().uri(),c.array().items(c.string().uri()).min(1)).required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid())}),c.object({store:c.string().uri({scheme:["http","https"]}),name:Rn.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid()).default("latest")})),Ws={source:Id.required(),required:c.boolean(),title:br,description:xr,mountPoint:yi,name:Rn},zs=(e,t)=>c.object(e).custom((n,r)=>!t&&n.source&&n.source.name&&!n.source.store?r.message(`missing 'store' in source of component ${n.name}`):n),ji=zs(Ws).meta({className:"TComponent",unknownType:"any"});te.componentSchema=ji;const Pd=zs(Ws,!0),qs=({checkStore:e}={})=>{const t=[ji,Pd];return c.array().items(e?t[0]:t[1]).optional().default([])},Ks=c.object({type:c.string().required(),name:c.string().required(),signer:c.string().required(),pk:c.string().required(),created:c.string().isoDate().required(),sig:c.string().required(),excludes:c.array().items(c.string()).optional(),appended:c.array().items(c.string()).optional(),delegatee:c.string(),delegateePk:c.string(),delegation:c.string()}).meta({className:"TSignature",unknownType:"any"});te.signatureSchema=Ks;const Ir=["en","zh","fr","ru","ar","es","de","pt","ja","hi"],jo={id:c.string().custom(kd),title:c.alternatives().try(c.string().min(1).max(Ce.MAX_TITLE_LENGTH),c.object().min(1).pattern(c.string().valid(...Ir),c.string().min(1).max(Ce.MAX_TITLE_LENGTH))).required(),description:c.alternatives().try(c.string().min(1).max(Ce.MAX_DESCRIPTION_LENGTH),c.object().min(1).pattern(c.string().valid(...Ir),c.string().min(1).max(Ce.MAX_DESCRIPTION_LENGTH))),link:c.alternatives().try(c.string().custom(To),c.object().min(1).pattern(c.string().valid(...Ir),c.string().custom(To))),component:c.string().min(1),section:c.array().items(c.string().min(1)).single(),role:c.array().items(c.string().min(1)).single(),icon:c.string().min(1),visible:c.boolean()},Vs=c.object({...jo,items:c.array().items(c.object({...jo}).rename("child","component"))}).rename("child","component").meta({className:"TNavigationItem",unknownType:"any"});te.navigationItemSchema=Vs;const Oi=c.array().items(Vs).unique((e,t)=>e.id&&t.id?e.id===t.id:!1).meta({className:"TNavigation",unknownType:"any"});te.navigationSchema=Oi;const ki=c.object({background:c.alternatives().try(c.string().min(1),c.object({header:c.string().min(1),footer:c.string().min(1),default:c.string().min(1)}).min(1))}).meta({className:"TTheme",unknownType:"any"});te.themeSchema=ki;const Gs=c.object({whoCanAccess:c.string().valid("owner","invited","all"),profileFields:c.array().items(c.string().valid("fullName","email","avatar","phone")).unique(),ignoreUrls:c.array().items(c.string().min(1)),allowSwitchProfile:c.boolean(),blockUnauthenticated:c.boolean(),blockUnauthorized:c.boolean()}).options({stripUnknown:!0}).meta({className:"TAuthConfig",unknownType:"any"});te.authConfigSchema=Gs;const Ld=c.object({type:c.string().trim().min(1).required(),description:c.string().trim().min(1)}),Ri=c.object({did:c.DID().trim().required(),type:c.string().trim().min(1).required(),public:c.boolean()}).meta({className:"TResourceBundle",unknownType:"any"});te.resourceBundleSchema=Ri;const Ci=c.array().items(c.object({type:c.string().trim().min(1).max(128).pattern(/^(?!blocklet\.)[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/).message('Event type must be in format of "[noun.]verb" like "post.published" or "post.comment.published", and prefix "blocklet." is reserved').required(),description:c.string().trim().min(1).max(256).required()})).unique("type").meta({className:"TEvent",unknownType:"any"});te.eventsSchema=Ci;const Hs={did:c.DID().trim().required(),version:c.semver().valid().required(),name:c.string().optional(),description:xr.required(),group:c.string().valid(...Ce.BLOCKLET_GROUPS),main:c.string().trim(),title:br.optional().allow(""),logo:c.string().trim().optional(),specVersion:c.semver().valid().gte("1.0.0").optional(),author:Vn.optional(),contributors:c.array().items(Vn).optional(),maintainers:c.array().items(Vn).optional(),community:c.string().uri().optional().allow("").default(""),documentation:c.string().uri().optional().allow("").default(""),homepage:c.string().uri().optional().allow("").default(""),license:c.string().optional().allow("").default(""),support:c.alternatives().try(c.string().uri(),c.string().email({tlds:!1})).optional(),nftFactory:c.DID().optional().allow("").default(""),payment:c.object({price:c.array().max(1).items(c.object({value:c.number().greater(0).required(),address:c.DID().required()})).default([]),share:c.array().max(4).items(c.object({name:c.string().required(),address:c.DID().required(),value:c.number().greater(0).max(1).required()})).default([]).custom(e=>{if(e.length===0)return e;const t=e.reduce((n,r)=>n+r.value,0);if(t!==1)throw new Error(`Invalid blocklet payment share config: total share must be 1, got ${t}`);return e},"invalid blocklet share"),componentPrice:c.array().items(c.object({parentPriceRange:c.array().items(c.number()).custom((e,t)=>e.length!==2?t.message("length of range should be 2"):e[0]<0?t.message("the first value should not less than 0 in range"):e[1]<=e[0]?t.message("the second value should greater than the first value in range"):e),type:c.string().valid("fixed","percentage").required(),value:c.number().greater(0).required()})).single()}).default({price:[],share:[]}),keywords:c.alternatives().try(c.string().trim().min(1),c.array().items(c.string().min(1))).optional(),tags:c.alternatives().try(c.string().trim().min(1),c.array().items(c.string().min(1))).optional(),gitHash:c.string().optional().allow(""),repository:c.alternatives().try(c.string().min(1),c.object({type:c.string().valid("git","https","svn").required(),url:c.string().uri().required(),directory:c.string()})).optional(),timeout:c.object({start:c.number().min(10).max(600),script:c.number().min(1).max(1800)}).default({start:60}),requirements:c.object({abtnode:c.semverRange().valid(),server:c.semverRange().valid(),os:c.alternatives().try(c.string().valid("*",...Ce.BLOCKLET_PLATFORMS),c.array().items(c.string().valid(...Ce.BLOCKLET_PLATFORMS)).min(1)),cpu:c.alternatives().try(c.string().valid("*",...Ce.BLOCKLET_ARCHITECTURES),c.array().items(c.string().valid(...Ce.BLOCKLET_ARCHITECTURES)).min(1)),fuels:c.array().items(c.object({endpoint:c.string().trim().required(),address:c.string().trim(),value:c.string().trim().required(),reason:c.string().trim().required()})),nodejs:c.semverRange().valid()}).default({server:Ce.BLOCKLET_LATEST_REQUIREMENT_SERVER,os:"*",cpu:"*",nodejs:"*"}),interfaces:c.array().items(Ti).unique("name").custom((e,t)=>{if(e.filter(o=>o.type===Ce.BLOCKLET_INTERFACE_TYPE_WEB).length>1)return t.message(`Only one ${Ce.BLOCKLET_INTERFACE_TYPE_WEB} interface can be declared`);const r=e.filter(o=>o.type===Ce.BLOCKLET_INTERFACE_TYPE_WELLKNOWN);for(const o of r)if(!o.prefix.startsWith(So))return t.message(`Wellknown path prefix must start with: ${So}`);return e}).default([]),environments:c.array().items(xi).default([]).optional().custom((e,t)=>{if(e&&e.length){const n=e.filter((r,o)=>e.findIndex(u=>u.name===r.name)!==o);if(n.length)return t.message(`find duplicate environment names ${n.map(r=>r.name).join(", ")}`)}return e}),scripts:wi,capabilities:c.object({clusterMode:c.boolean(),didSpace:c.string().valid(...Object.values(Ce.BLOCKLET_APP_SPACE_REQUIREMENT)).optional(),navigation:c.boolean().default(!0),serverless:c.boolean().optional(),component:c.boolean(),sitemap:c.boolean().optional()}).default({}),files:c.array().items(c.string().trim()).optional(),resource:c.object({exportApi:c.string().trim(),bundles:c.array().items(Ri),types:c.array().items(Ld).max(10)}),engine:c.alternatives().try(Gr,c.array().items(Gr)).optional(),screenshots:c.array().items(c.string().min(1)).optional().default([]),videos:c.array().items(c.string().pattern(/^https:\/\/(www\.)?(youtube\.com|youtu\.be|vimeo\.com)\/[\w\-/?&=]+/).message("Each video URL must be a valid YouTube or Vimeo link")).max(3).optional(),logoUrl:c.string().optional().allow(""),dist:Hn.optional(),stats:Us.optional(),htmlAst:c.any().optional(),path:c.string().optional(),signatures:c.array().items(Ks).optional(),lastPublishedAt:c.string().isoDate().optional().allow(null),components:qs(),navigation:Oi,theme:ki,copyright:c.object({owner:c.string().min(1),year:c.alternatives().try(c.string(),c.number())}),bundleName:c.string(),bundleDid:c.DID().trim(),storeId:c.string(),events:Ci.optional()},_d=c.object(Hs).options({stripUnknown:!0,noDefaults:!1}).meta({className:"TBlockletMeta",unknownType:"any"});te.blockletMetaSchema=_d;const Xs=(e,{ensureFiles:t=!1,ensureDist:n=!1,ensureComponentStore:r=!0,ensureName:o=!1,skipValidateDidName:u=!1,...d}={})=>((!e||!yd.default.existsSync(e))&&(t=!1),c.object({...Hs,owner:c.object({avatar:c.string().optional(),did:c.DID().trim().required(),fullName:c.string().trim().required(),email:c.string().optional().allow(null).empty("").default("")}).optional(),logo:t?c.file().trim().exists({baseDir:e}).optional():c.string().trim().optional(),files:c.array().items(t?c.file().exists({baseDir:e,canSkip:(h,v)=>[Ce.BLOCKLET_ENTRY_FILE,Ce.BLOCKLET_BUNDLE_FILE].includes(v)||(0,wd.default)(v)}):c.string().trim()).optional(),dist:n?Hn.required():Hn.optional(),components:qs({checkStore:r}),name:o?c.string().optional():c.string().required(),egress:c.boolean().optional().default(!0),docker:Td.dockerSchema}).options({stripUnknown:!0,noDefaults:!1,...d}).rename("children","components").custom((h,v)=>{const{did:x,name:s,docker:a}=h;if(a){const{image:b,dockerfile:S,network:R}=a;if(!b&&!S)return v.message("Image or dockerfile must be set");if(b&&S)return v.message("Image and dockerfile cannot be set at the same time");if(R)return v.message("ExportPorts and network cannot be set at the same time");if(S&&(h.files||(h.files=[]),h.files.push(S)),a.volumes)for(const N of a.volumes){if(!N.startsWith("$BLOCKLET_APP_DIR/")&&!N.startsWith("$BLOCKLET_DATA_DIR/"))return v.message("Volume must start with $BLOCKLET_APP_DIR or $BLOCKLET_DATA_DIR");if(N.indexOf("..")>-1)return v.message('Volume cannot contain ".."')}}let k;if((0,Sd.isValid)(x))try{return(0,Vr.validateNewDid)(x),h}catch(b){k=b}if(s){(0,Vr.validateName)(s,{checkDid:!u});const b=(0,jd.default)(s);return b!==x?v.message(`The did of name "${s}" should be "${b}"`):h}return k?v.message(k.message):h}));te.createBlockletSchema=Xs;te.default={blockletNameSchema:Rn,componentSchema:ji,endpointSchema:Si,serviceSchema:Ei,createBlockletSchema:Xs,interfaceSchema:Ti,environmentSchema:xi,environmentNameSchema:bi,scriptsSchema:wi,personSchema:Vn,distSchema:Hn,titleSchema:br,descriptionSchema:xr,logoSchema:Ms,navigationSchema:Oi,themeSchema:ki,mountPointSchema:yi,updateMountPointSchema:Bs,authConfigSchema:Gs,resourceBundleSchema:Ri,installBlockletTitleSchema:As,installBlockletDescriptionSchema:Ds,eventsSchema:Ci,Joi:c};var xt={},Nd=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.setService=xt.findService=xt.getDefaultServiceConfig=xt.getServiceConfig=void 0;const Ad=Nd(Ql),Dd=te,Ys={},Ii=e=>{Ys[e.name]={validate:e.schema.validate.bind(e.schema),defaultConfig:e.default}};xt.setService=Ii;Ii({name:"auth",schema:Dd.authConfigSchema,default:{}});const Js=e=>{if(!e)throw new Error("service name should not be empty");const t=Ys[e];if(!t)throw new Error(`service ${e} does not exist`);return t},Qs=(e,t,{validate:n}={})=>{const r=Js(e),o=(0,Ad.default)(t||{}),{value:u,error:d}=r.validate(o);if(n&&d)throw new Error(`Invalid blocklet service config: ${d.details.map(h=>h.message).join(", ")}`);return u};xt.getServiceConfig=Qs;const Zs=e=>{const{defaultConfig:t}=Js(e);return t};xt.getDefaultServiceConfig=Zs;const ea=(e,t)=>{const n=[t];return(e||[]).find(r=>n.includes(r.name))};xt.findService=ea;xt.default={getServiceConfig:Qs,getDefaultServiceConfig:Zs,findService:ea,setService:Ii};Object.defineProperty(fn,"__esModule",{value:!0});fn.fixAndValidateService=fn.validateMeta=void 0;const Md=te,Fd=xt,Bd=e=>(!e.interfaces||!e.interfaces.length||e.interfaces.forEach(t=>{t.services&&t.services.length&&t.services.forEach(n=>{n.config=(0,Fd.getServiceConfig)(n.name,n.config,{validate:!0})})}),e);fn.fixAndValidateService=Bd;const ta=(e,{ensureFiles:t=!1,ensureDist:n=!1,ensureComponentStore:r=!0,ensureName:o=!1,skipValidateDidName:u=!1,schemaOptions:d={}}={})=>{const h=(0,Md.createBlockletSchema)(null,{ensureFiles:t,ensureDist:n,ensureComponentStore:r,ensureName:o,skipValidateDidName:u,...d}),{value:v,error:x}=h.validate(e);if(x)throw new Error(`Invalid blocklet meta: ${x.details.map(s=>s.message).join(", ")}`);return v};fn.validateMeta=ta;fn.default=ta;(function(e){var t=Ee&&Ee.__createBinding||(Object.create?function(O,q,Z,B){B===void 0&&(B=Z);var ue=Object.getOwnPropertyDescriptor(q,Z);(!ue||("get"in ue?!q.__esModule:ue.writable||ue.configurable))&&(ue={enumerable:!0,get:function(){return q[Z]}}),Object.defineProperty(O,B,ue)}:function(O,q,Z,B){B===void 0&&(B=Z),O[B]=q[Z]}),n=Ee&&Ee.__setModuleDefault||(Object.create?function(O,q){Object.defineProperty(O,"default",{enumerable:!0,value:q})}:function(O,q){O.default=q}),r=Ee&&Ee.__importStar||function(){var O=function(q){return O=Object.getOwnPropertyNames||function(Z){var B=[];for(var ue in Z)Object.prototype.hasOwnProperty.call(Z,ue)&&(B[B.length]=ue);return B},O(q)};return function(q){if(q&&q.__esModule)return q;var Z={};if(q!=null)for(var B=O(q),ue=0;ue<B.length;ue++)B[ue]!=="default"&&t(Z,q,B[ue]);return n(Z,q),Z}}(),o=Ee&&Ee.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.fixService=e.fixInterfaces=e.parsePerson=e.formatPerson=e.fixName=e.fixTags=e.fixPerson=e.fixKeywords=e.fixFiles=e.fixRepository=e.fixRequired=void 0;const u=o(ul),d=r(Au),h=Ot,v=fn;Object.defineProperty(e,"fixService",{enumerable:!0,get:function(){return v.fixAndValidateService}});const x=gi,s=(O,q)=>{O.description||(O.description=`Blocklet from ${q}`),O.version||(O.version=h.BLOCKLET_DEFAULT_VERSION)};e.fixRequired=s;const a=O=>{if(O.repository&&(typeof O.repository=="string"&&(O.repository={type:"git",url:O.repository}),O.repository.url)){const q=d.fromUrl(O.repository.url);q&&(O.repository.url=q.getDefaultRepresentation()==="shortcut"?q.https():q.toString())}};e.fixRepository=a;const k=O=>{Array.isArray(O.files)?O.files&&(O.files=O.files.filter(q=>!(!q||typeof q!="string"))):delete O.files};e.fixFiles=k;const b=O=>{typeof O.keywords=="string"&&(O.keywords=O.keywords.split(/,\s+/)),O.keywords&&!Array.isArray(O.keywords)?delete O.keywords:O.keywords&&(O.keywords=O.keywords.filter(q=>!(typeof q!="string"||!q)))};e.fixKeywords=b;const S=O=>{typeof O.tags=="string"&&(O.tags=O.tags.split(/,\s+/)),O.tags&&!Array.isArray(O.tags)?delete O.tags:O.tags&&(O.tags=O.tags.filter(q=>!(typeof q!="string"||!q)))};e.fixTags=S;const R=(O,q)=>(O.author&&(O.author=q(O.author)),["maintainers","contributors"].forEach(Z=>{Array.isArray(O[Z])&&(O[Z]=O[Z].map(q))}),O),N=O=>{if(!O)return"";if(typeof O=="string")return O;const q=O.name||"",Z=O.url||O.web,B=Z?` (${Z})`:"",ue=O.email||O.mail,J=ue?` <${ue}>`:"";return q+J+B};e.formatPerson=N;const D=O=>{if(typeof O!="string")return O;const q=O.match(/^([^(<]+)/),Z=O.match(/\(([^)]+)\)/),B=O.match(/<([^>]+)>/),ue={};return q&&q[0].trim()&&(ue.name=q[0].trim()),B&&([,ue.email]=B),Z&&([,ue.url]=Z),ue};e.parsePerson=D;const X=O=>(R(O,N),R(O,D),O);e.fixPerson=X;const z=(O,q=!0)=>{if(Array.isArray(O.interfaces)||(O.interfaces=[]),O.interfaces.length)return O.interfaces.forEach(J=>{J.type===h.BLOCKLET_INTERFACE_TYPE_WEB&&(J.protocol="http")}),O;const B=(0,u.default)(O,"capabilities.dynamicPathPrefix",!0)?h.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",ue=({type:J="web",name:se,path:Se="/",protocol:De="http",port:Ue=h.BLOCKLET_DEFAULT_PORT_NAME})=>{O.interfaces.push({type:J,name:se,path:Se,prefix:B,port:Ue,protocol:De})};return[h.BLOCKLET_INTERFACE_PUBLIC].forEach(J=>{O[J]&&ue({name:J,path:O[J]})}),Array.isArray(O.exposeServices)&&O.exposeServices.forEach(J=>{ue({type:"service",name:J.protocol,protocol:J.protocol,port:{internal:`BLOCKLET_${J.protocol}_PORT`.toUpperCase(),external:J.port}})}),q&&(delete O.publicUrl,delete O.adminUrl,delete O.configUrl,delete O.docUrl,delete O.exposeServices,O.capabilities&&delete O.capabilities.dynamicPathPrefix),O};e.fixInterfaces=z;const Y=O=>{const{did:q}=O;try{(0,x.validateNewDid)(q),O.name=q}catch{}return O};e.fixName=Y,e.default={fixRequired:s,fixRepository:a,fixFiles:k,fixKeywords:b,fixPerson:X,fixTags:S,fixName:Y,formatPerson:N,parsePerson:D,fixInterfaces:z,fixService:v.fixAndValidateService}})(ws);function na({owner:e,locale:t}){return i.jsxs(H,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.fullName,e.did?i.jsx(Zo,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:e.did,compact:!0,size:14,locale:t}):null]})}na.propTypes={owner:_.object.isRequired,locale:_.string.isRequired};const $d="install-blocklet-from-URL",ra=()=>{const[e,t]=us($d,"[]",{raw:!0}),n=o=>{const u=o.trim(),d=JSON.parse(e),h=d.findIndex(v=>v===u);h!==0&&(h>0&&d.splice(h,1),d.length>=10&&d.splice(9),d.unshift(u),t(JSON.stringify(d)))},r=o=>{if(!o)return;const u=JSON.parse(e),d=o.trim(),h=u.findIndex(v=>v===d);h>-1&&(u.splice(h,1),t(JSON.stringify(u)))};return{urls:e?JSON.parse(e):[],addUrlRecord:n,removeUrlRecord:r}},Ud=$o(()=>({listItemText:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}));function Pi(e){const{value:t,onValueChange:n,children:r,helperText:o}=e,{urls:u,removeUrlRecord:d}=ra(),h=(x,s)=>{x.preventDefault(),x.stopPropagation(),d(s)},v=Ud();return i.jsxs(H,{children:[i.jsx(Uo,{freeSolo:!0,options:u,inputValue:t,onInputChange:(x,s)=>{n(s)},disableClearable:!0,popupIcon:null,renderInput:x=>Xa.cloneElement(r,{...x}),renderOption:(x,s)=>A.createElement(Wo,{...x,key:s,secondaryAction:i.jsx(Bo,{edge:"end","aria-label":"delete",onClick:a=>h(a,s),children:i.jsx(nl,{})})},i.jsx(Ra,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:i.jsx(zo,{primary:s,className:v.listItemText})})),ListboxProps:{sx:{maxHeight:300,overflow:"auto"}}}),i.jsx(Ca,{style:{margin:0},children:o})]})}Pi.propTypes={onValueChange:_.func,children:_.node,value:_.string,helperText:_.string};Pi.defaultProps={onValueChange:()=>{},children:null,value:"",helperText:""};function Li({defaultUrl:e,onCancel:t,onSuccess:n,onError:r,mode:o,handleText:u}){const{api:d}=Cn(),{api:h}=Zl(),[v,x]=A.useState(!1),[s,a]=A.useState(""),{t:k,locale:b}=vt(),S={dist:{}},[R,N]=A.useState(e),[D,X]=A.useState(e?1:0),[z,Y]=A.useState(S),[O,q]=A.useState(!1),[Z,B]=A.useState({}),ue=o==="component",J=ue?!0:!e,{addUrlRecord:se}=ra(),Se=async()=>{Y(S),a(null),x(!0);let oe=R.trim();!oe.startsWith("https://")&&!oe.startsWith("http://")&&!oe.startsWith("file://")&&(oe=`file://${oe}`);try{const pt=decodeURIComponent(oe);try{new URL(pt)}catch{throw new Error("Invalid URL")}const{meta:xe,inStore:Ye,registryUrl:ze}=await d.getBlockletMetaFromUrl({input:{url:pt}});Y(xe),B({inStore:Ye,registryUrl:ze,inputUrl:oe}),se(oe)}catch(pt){console.error(pt);const xe=`Blocklet Install failed: ${ds(pt)}`;a(xe),r(pt)}finally{x(!1)}},De=()=>{if(ue){n({meta:z,...Z}),t();return}x(!0),q(!0)},Ue=()=>{x(!1),q(!1),n({meta:z,...Z}),t()},rt=()=>{x(!1),q(!1)};A.useEffect(()=>{e&&Se()},[e]);const ee=[{name:k("common.name"),value:Mt.getDisplayName({meta:z},!0)},{name:k("common.version"),value:z.version},{name:k("common.did"),value:z.did?i.jsx(ec,{did:z.did}):null},{name:k("common.author"),value:z.owner?i.jsx(na,{owner:z.owner,locale:b}):ws.formatPerson(z.author)},{name:k("blocklet.dist.downloadLink"),value:z.dist.tarball}],fe=()=>v?i.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:i.jsx(gt,{})}):z.did?i.jsx("div",{style:{paddingLeft:"10%"},children:ee.map(oe=>oe.name===k("common.did")?i.jsx(ro,{valueComponent:"div",nameWidth:120,name:oe.name,nameFormatter:()=>k("common.did"),children:oe.value},oe.name):i.jsx(ro,{valueComponent:"div",nameWidth:120,name:oe.name,children:oe.value},oe.name))}):null,K=[{label:k("blocklet.fromUrl.step0"),body:i.jsx(ge,{component:"div",children:i.jsx(Pi,{style:{marginBottom:32},value:R,helperText:k("blocklet.fromUrl.description"),onValueChange:oe=>{a(null),N(oe)},children:i.jsx(hr,{label:k("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:R,onChange:oe=>{a(null),N(oe.target.value)},disabled:v,onKeyPress:oe=>{oe.key==="Enter"&&(oe.preventDefault(),Se(),X(1))}})})}),cancel:k("common.cancel"),confirm:k("common.next"),onCancel:t,onConfirm:()=>{Se(),X(1)}},{label:k("blocklet.fromUrl.step1"),body:fe(),cancel:k(J?"common.pre":"common.cancel"),confirm:(u==null?void 0:u.confirm)||k("blocklet.fromUrl.confirm"),onCancel:()=>{J?X(oe=>oe-1):t()},onConfirm:()=>{De()}}],Te=K[D];return i.jsxs(i.Fragment,{children:[i.jsxs(ri,{title:(u==null?void 0:u.title)||k("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>Te.onCancel(),showCloseButton:D===0,disableEscapeKeyDown:!0,open:!0,actions:i.jsxs(i.Fragment,{children:[Te.cancel&&i.jsx(dt,{onClick:oe=>{oe.stopPropagation(),a(null),Te.onCancel()},color:"inherit",children:Te.cancel||k("common.cancel")}),i.jsxs(dt,{onClick:oe=>{oe.stopPropagation(),Te.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:v||!R||s,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[v&&D===0&&i.jsx(gt,{size:16}),Te.confirm]})]}),children:[J&&i.jsx(Ia,{alternativeLabel:!0,activeStep:D,children:K.map(({label:oe})=>i.jsx(Pa,{children:i.jsx(La,{children:oe})},oe))}),i.jsx(_a,{component:"div",style:{marginTop:24},children:Te.body}),!!s&&i.jsx(qo,{severity:"error",style:{width:"100%",marginTop:8},children:s})]}),z&&O&&i.jsx(ts,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Ue,extraParams:{title:z.title,wt:dl(z),blockletMetaUrl:decodeURIComponent(R.trim())},messages:{title:k("setup.keyPair.title"),scan:k("setup.keyPair.scan"),confirm:k("setup.keyPair.confirm"),success:k("setup.keyPair.success")},onClose:rt})]})}Li.propTypes={defaultUrl:_.string,onCancel:_.func.isRequired,onSuccess:_.func.isRequired,onError:_.func,mode:_.oneOf(["install","component"]),handleText:_.object};Li.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};const Wd={meta:_.object.isRequired,onCancel:_.func.isRequired},zd=$o(()=>({dialogAuth:{padding:"0 0 24px !important","& .auth-title":{textAlign:"center !important",marginBottom:"4px !important"},"& .auth-tip--scan":{textAlign:"center !important"}},iconRoot:{minWidth:48}}));function ia({action:e,onSelect:t,onNext:n}){const r=zd(),{t:o}=vt(),u=[{action:"purchase",title:o("store.purchase.purchase.title"),description:o("store.purchase.purchase.description")},{action:"verify",title:o("store.purchase.verify.title"),description:o("store.purchase.verify.description")}];return i.jsxs(i.Fragment,{children:[i.jsx(Na,{className:r.tabPanel,children:u.map(d=>i.jsxs(Wo,{button:!0,selected:e===d.action,onClick:()=>t(d.action),children:[i.jsx(Aa,{className:r.iconRoot,children:d.action==="purchase"?i.jsx(tc,{style:{color:e==="purchase"?Ji.primary.main:"#AAA",fontSize:32}}):i.jsx(nc,{style:{color:e==="verify"?Ji.primary.main:"#AAA",fontSize:32}})}),i.jsx(zo,{primary:d.title,secondary:d.description})]},d.action))}),n&&i.jsx(dt,{fullWidth:!0,disabled:!e,variant:"contained",color:"primary",style:{marginTop:16},onClick:n,children:o("common.next")})]})}ia.propTypes={action:_.oneOf(["both","purchase","verify"]).isRequired,onSelect:_.func.isRequired,onNext:_.func.isRequired};function _i({meta:e,onCancel:t,mode:n,handlePaySuccess:r}){const{t:o,locale:u}=vt(),{info:d}=Cn(),h=hl(d),[v,x]=A.useState(null),s=new URL(e==null?void 0:e.registryUrl).origin,a=Mt.getDisplayName({meta:e}),k=async(S,R)=>{const N=({downloadTokenList:z})=>{r({downloadTokenList:z})},D=z=>{ii.error(z),t(z)};function X(z){return rl(()=>io.get(z).then(async({data:Y})=>{const O=Y==null?void 0:Y.downloadTokenList;if(Y.status==="succeed"){if(O&&O.length)await N({downloadTokenList:O});else return await D(o("blocklet.component.missDownloadTokenTip")),!0;return!0}return Y.status==="error"?(console.error("vc error: ",Y),await D(Y==null?void 0:Y.error),!0):!1}),{interval:1e3})}if(n==="purchase"&&v){const{statusUrl:z}=pl(v);await X(z)}else await N({downloadTokenList:S.downloadTokenList&&R(S.downloadTokenList)})};if(A.useEffect(()=>{if(n==="purchase"){const S=new URL(s);S.pathname="/api/did/verify-purchase-blocklet/token",S.searchParams.set("serverDid",d.did),S.searchParams.set("blockletDid",e==null?void 0:e.did);try{io.get(S.href).then(({data:R})=>{const N=`${R.url}`;x(N)})}catch(R){console.error("get next workflow url error: ",R)}}return()=>{x(null)}},[n]),n==="purchase"&&!v)return"";const b={verify:{action:"verify-purchase-blocklet",checkFn:no.create({baseURL:s}).get,extraParams:{serverDid:d.did,blockletDid:e==null?void 0:e.did},messages:{title:o("store.purchase.verify.auth.title",{name:a}),scan:o("store.purchase.verify.auth.scan"),confirm:o("store.purchase.verify.auth.confirm"),success:o("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:no.create({baseURL:Gn(s,"/store")}).get,extraParams:{factory:e.nftFactory,nw:v},messages:{title:o("store.purchase.auth.title",{name:a}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:i.jsxs(i.Fragment,{children:[i.jsx("p",{children:o("store.purchase.auth.success")}),i.jsx("p",{children:o("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return i.jsx(ts,{open:!0,locale:u,popup:!1,saveConnect:!1,className:"connect",baseUrl:s,onSuccess:k,cancelWhenScanned:t,onClose:t,checkTimeout:60*5e3,webWalletUrl:h,disableClose:!0,showDownload:!1,...b[n]})}_i.propTypes={...Wd,handlePaySuccess:_.func,mode:_.oneOf(["verify","purchase"]).isRequired};_i.defaultProps={handlePaySuccess:()=>{}};const Ni=A.forwardRef(({mode:e,...t},n)=>{const[r,o]=A.useState(e!=="both"?e:"verify"),[u,d]=A.useState(e!=="both"?2:1),h=x=>{x!==r&&o(x)},v=()=>{r&&u!==2&&d(2)};return A.useImperativeHandle(n,()=>({onNext:v,getCurrentStep:()=>u})),u===1?i.jsx("div",{style:{maxWidth:520},children:i.jsx(ia,{action:r,onNext:null,onSelect:h})}):i.jsx(_i,{...t,mode:r})});Ni.propTypes={mode:_.oneOf(["both","verify","purchase"]).isRequired,ref:_.any};Ni.defaultProps={ref:{}};const qd=Ni;function Kd({...e}){return i.jsx(dt,{className:"bottom-button",variant:"contained",color:"primary",...e})}function Ai({blocklet:e,onStartNow:t,children:n,disabled:r}){const{t:o}=vt(),u=hs();return!e||fl(e.meta)?i.jsx(Vd,{children:n}):i.jsxs(Gd,{isMobile:u,children:[i.jsx(Kd,{className:"start-now",variant:"contained",color:"primary",disabled:r,onClick:()=>t(),children:o("setup.startNow")}),i.jsx(H,{display:"flex",alignItems:"center",children:n})]})}Ai.propTypes={blocklet:_.object,onStartNow:_.func,children:_.any,disabled:_.bool};Ai.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const Vd=Ge(H)`
|
|
217
|
-
width: 100%;
|
|
218
|
-
margin-top: auto;
|
|
219
|
-
padding-top: 24px;
|
|
220
|
-
display: flex;
|
|
221
|
-
align-items: center;
|
|
222
|
-
justify-content: center;
|
|
223
|
-
.bottom-button {
|
|
224
|
-
min-width: 200px;
|
|
225
|
-
}
|
|
226
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
227
|
-
.bottom-button {
|
|
228
|
-
width: 100%;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
`,Gd=Ge(H)`
|
|
232
|
-
padding-top: 24px;
|
|
233
|
-
margin-top: auto;
|
|
234
|
-
width: 100%;
|
|
235
|
-
display: flex;
|
|
236
|
-
align-items: center;
|
|
237
|
-
justify-content: space-between;
|
|
238
|
-
.start-now {
|
|
239
|
-
min-width: 140px;
|
|
240
|
-
}
|
|
241
|
-
.bottom-button {
|
|
242
|
-
min-width: 120px;
|
|
243
|
-
}
|
|
244
|
-
${e=>e.theme.breakpoints.down("lg")} {
|
|
245
|
-
width: 100%;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
249
|
-
.start-now {
|
|
250
|
-
min-width: inherit;
|
|
251
|
-
}
|
|
252
|
-
.bottom-button {
|
|
253
|
-
min-width: 100px;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
${e=>e.isMobile} {
|
|
258
|
-
justify-content: space-between;
|
|
259
|
-
gap: '32px',
|
|
260
|
-
}}
|
|
261
|
-
`;function Di({blockletMeta:e,onEndpointUpdate:t}){var h;const n=hs(),{blocklet:r}=fr(),{updateSpaceGateway:o,loading:u,hasStorageEndpoint:d}=Ml();return A.useEffect(()=>{t==null||t()},[r]),u?i.jsx(il,{relative:"parent",children:i.jsx(gt,{})}):i.jsxs(Hd,{children:[i.jsx(H,{width:n?"360px":"720px",children:d?i.jsx(sc,{}):i.jsx(ac,{})}),((h=e==null?void 0:e.capabilities)==null?void 0:h.didSpace)==="required"&&i.jsx(Ai,{mt:8,children:i.jsx(lc,{onConnect:o})})]})}Di.propTypes={blockletMeta:_.any.isRequired,onEndpointUpdate:Da.func};Di.defaultProps={onEndpointUpdate:()=>{}};const Hd=Ge(oc)`
|
|
262
|
-
height: 100%;
|
|
263
|
-
overflow-y: auto;
|
|
264
|
-
padding-bottom: 32px;
|
|
265
|
-
overflow-x: hidden;
|
|
266
|
-
`;function Mi({onChange:e,loading:t,children:n,extra:r,stores:o,storageKey:u}){const{t:d}=vt(),{info:h,inService:v}=Cn(),{blocklet:x}=fr(),[s,a]=A.useState(!1),k=A.useRef(null),[b,S]=A.useState(),[R,N]=us(u||"tmp"),[D,X]=u?[R,N]:[b,S],{storeList:z,teamDid:Y}=os({fromBlocklet:v,blocklet:x,nodeInfo:h}),O=as([...o.map(Z=>({...Z,protected:!0})),...z],"url"),q=D&&O.find(Z=>D===Z.url)||O[0];return i.jsxs(i.Fragment,{children:[i.jsxs(Xd,{children:[i.jsx(dt,{ref:k,color:"primary","data-cy":"add-component-select-store",endIcon:i.jsx(cc,{color:"primary"}),onClick:()=>{a(!0)},style:{padding:"0 2px"},children:i.jsx(ge,{color:"primary",children:q.name})}),i.jsx(ge,{color:"primary",children:r})]}),i.jsxs(hr,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:d("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:q,autoFocus:!0,onChange:Z=>{const B=Z.target.value;X(B.url),e(B)},SelectProps:{open:s,MenuProps:{anchorEl:k.current},renderValue:Z=>Z==null?void 0:Z.name,onClose:()=>{a(!1)}},style:{display:"none"},margin:"normal",children:[O==null?void 0:O.map(Z=>i.jsx(ei,{sx:{width:"400px",maxWidth:"90vw"},value:Z,"data-cy":Z.url,children:i.jsx(Qa,{teamDid:Y,store:Z,onDelete:()=>{var B;D===Z.url&&X((B=O[0])==null?void 0:B.url)}})},Z.url)),!Jo.isInServerlessMode(h)&&i.jsx(Za,{disabled:t,storeList:O,teamDid:Y,onAdd:Z=>{X(Z)}})]}),n({currentRegistry:q})]})}Mi.propTypes={onChange:_.func,loading:_.bool,children:_.any.isRequired,extra:_.node,storageKey:_.string,stores:_.arrayOf(_.shape({name:_.string.isRequired,url:_.string.isRequired}))};Mi.defaultProps={onChange:()=>{},loading:!1,extra:"",stores:[],storageKey:""};const Xd=Ge.div`
|
|
267
|
-
display: flex;
|
|
268
|
-
justify-content: space-between;
|
|
269
|
-
align-items: center;
|
|
270
|
-
margin-bottom: 16px;
|
|
271
|
-
|
|
272
|
-
span {
|
|
273
|
-
font-size: 16px;
|
|
274
|
-
color: ${e=>e.theme.palette.common.black};
|
|
275
|
-
// font-weight: bold;
|
|
276
|
-
}
|
|
277
|
-
`,Yd=Vt("div")`
|
|
278
|
-
background-color: transparent !important;
|
|
279
|
-
& > :not(.Mui-disabled) {
|
|
280
|
-
position: relative;
|
|
281
|
-
z-index: 1;
|
|
282
|
-
&::before {
|
|
283
|
-
content: '';
|
|
284
|
-
position: absolute;
|
|
285
|
-
height: 100%;
|
|
286
|
-
width: 100%;
|
|
287
|
-
left: 0;
|
|
288
|
-
top: 0;
|
|
289
|
-
transition: opacity 0.3s;
|
|
290
|
-
}
|
|
291
|
-
&:hover::before {
|
|
292
|
-
opacity: 0;
|
|
293
|
-
}
|
|
294
|
-
&::after {
|
|
295
|
-
content: '';
|
|
296
|
-
position: absolute;
|
|
297
|
-
height: 100%;
|
|
298
|
-
width: 100%;
|
|
299
|
-
top: 0;
|
|
300
|
-
left: 0;
|
|
301
|
-
border-radius: 2px;
|
|
302
|
-
background-color: ${e=>e.theme.palette.primary.main};
|
|
303
|
-
transform: scale(0.1);
|
|
304
|
-
opacity: 0;
|
|
305
|
-
z-index: -1;
|
|
306
|
-
transition:
|
|
307
|
-
transform 0.3s,
|
|
308
|
-
opacity 0.3s,
|
|
309
|
-
background-color 0.3s;
|
|
310
|
-
}
|
|
311
|
-
&:hover::after {
|
|
312
|
-
opacity: 1;
|
|
313
|
-
transform-origin: center;
|
|
314
|
-
transform: scale(1);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
& > :not(.Mui-disabled) {
|
|
318
|
-
background-color: transparent !important;
|
|
319
|
-
color: ${e=>e.theme.palette.primary.main}!important;
|
|
320
|
-
}
|
|
321
|
-
& > :not(.Mui-disabled) {
|
|
322
|
-
&:hover {
|
|
323
|
-
color: ${e=>e.theme.palette.common.white}!important;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
`;Vt("div")`
|
|
327
|
-
&.arcblock-blocklet {
|
|
328
|
-
padding: ${e=>e.theme.spacing(2)} ${e=>e.theme.spacing(2)} 0
|
|
329
|
-
${e=>e.theme.spacing(2)};
|
|
330
|
-
}
|
|
331
|
-
.arcblock-blocklet__content {
|
|
332
|
-
cursor: pointer;
|
|
333
|
-
display: flex;
|
|
334
|
-
${e=>e.theme.breakpoints.up("sm")} {
|
|
335
|
-
align-items: center;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
.arcblock-blocklet__cover {
|
|
339
|
-
width: 64px;
|
|
340
|
-
height: 64px;
|
|
341
|
-
margin-right: ${e=>e.theme.spacing(2)};
|
|
342
|
-
overflow: hidden;
|
|
343
|
-
border-radius: 12px;
|
|
344
|
-
/* see: https://stackoverflow.com/questions/49066011/overflow-hidden-with-border-radius-not-working-on-safari */
|
|
345
|
-
transform: translateZ(0);
|
|
346
|
-
${e=>e.theme.breakpoints.up("sm")} {
|
|
347
|
-
width: 80px;
|
|
348
|
-
height: 80px;
|
|
349
|
-
margin-bottom: 12px;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
.arcblock-blocklet__button--hover {
|
|
353
|
-
&:not(.Mui-disabled) {
|
|
354
|
-
position: relative;
|
|
355
|
-
z-index: 1;
|
|
356
|
-
&::before {
|
|
357
|
-
content: '';
|
|
358
|
-
position: absolute;
|
|
359
|
-
height: 100%;
|
|
360
|
-
width: 100%;
|
|
361
|
-
left: 0;
|
|
362
|
-
top: 0;
|
|
363
|
-
transition: opacity 0.3s;
|
|
364
|
-
}
|
|
365
|
-
&:hover::before {
|
|
366
|
-
opacity: 0;
|
|
367
|
-
}
|
|
368
|
-
&::after {
|
|
369
|
-
content: '';
|
|
370
|
-
position: absolute;
|
|
371
|
-
height: 100%;
|
|
372
|
-
width: 100%;
|
|
373
|
-
background-color: ${e=>e.theme.palette.primary.main};
|
|
374
|
-
transform: scale(0.1);
|
|
375
|
-
opacity: 0;
|
|
376
|
-
z-index: -1;
|
|
377
|
-
transition:
|
|
378
|
-
transform 0.3s,
|
|
379
|
-
opacity 0.3s,
|
|
380
|
-
background-color 0.3s;
|
|
381
|
-
}
|
|
382
|
-
&:hover::after {
|
|
383
|
-
opacity: 1;
|
|
384
|
-
transform-origin: center;
|
|
385
|
-
transform: scale(1);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
&:not(.Mui-disabled) {
|
|
390
|
-
background-color: transparent !important;
|
|
391
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
392
|
-
}
|
|
393
|
-
&:not(.Mui-disabled) {
|
|
394
|
-
&:hover {
|
|
395
|
-
color: ${e=>e.theme.palette.common.white};
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
.arcblock-blocklet__info {
|
|
400
|
-
flex: 1;
|
|
401
|
-
overflow: hidden;
|
|
402
|
-
border-bottom: 1px solid ${e=>e.theme.palette.divider};
|
|
403
|
-
padding-bottom: ${e=>e.theme.spacing(2)};
|
|
404
|
-
}
|
|
405
|
-
.arcblock-blocklet__text {
|
|
406
|
-
height: 65px;
|
|
407
|
-
overflow: hidden;
|
|
408
|
-
}
|
|
409
|
-
/* 设置多行文本溢出显示省略号 兼容fireFox、safari */
|
|
410
|
-
.arcblock-blocklet__title {
|
|
411
|
-
margin: 0;
|
|
412
|
-
font-size: 16px;
|
|
413
|
-
font-weight: 500;
|
|
414
|
-
overflow: hidden;
|
|
415
|
-
text-overflow: ellipsis;
|
|
416
|
-
white-space: nowrap;
|
|
417
|
-
}
|
|
418
|
-
.arcblock-blocklet__describe {
|
|
419
|
-
margin-top: ${e=>e.theme.spacing(.5)};
|
|
420
|
-
color: ${e=>e.theme.palette.grey[600]};
|
|
421
|
-
font-size: 14px;
|
|
422
|
-
font-weight: 500;
|
|
423
|
-
line-height: 17px;
|
|
424
|
-
max-height: 34px;
|
|
425
|
-
overflow: hidden;
|
|
426
|
-
text-overflow: ellipsis;
|
|
427
|
-
display: -webkit-box;
|
|
428
|
-
-webkit-line-clamp: 2;
|
|
429
|
-
-webkit-box-orient: vertical;
|
|
430
|
-
word-break: break-word;
|
|
431
|
-
}
|
|
432
|
-
.arcblock-blocklet__version {
|
|
433
|
-
color: ${e=>e.theme.palette.grey[600]};
|
|
434
|
-
font-size: 12px;
|
|
435
|
-
}
|
|
436
|
-
`;_.string||_.node,_.string,_.string||_.node,_.string,_.string,_.bool,_.bool,_.element,_.string,_.func,_.func,_.string;Vt("div")`
|
|
437
|
-
background-color: transparent !important;
|
|
438
|
-
& > :not(.Mui-disabled) {
|
|
439
|
-
position: relative;
|
|
440
|
-
z-index: 1;
|
|
441
|
-
&::before {
|
|
442
|
-
content: '';
|
|
443
|
-
position: absolute;
|
|
444
|
-
height: 100%;
|
|
445
|
-
width: 100%;
|
|
446
|
-
left: 0;
|
|
447
|
-
top: 0;
|
|
448
|
-
transition: opacity 0.3s;
|
|
449
|
-
}
|
|
450
|
-
&:hover::before {
|
|
451
|
-
opacity: 0;
|
|
452
|
-
}
|
|
453
|
-
&::after {
|
|
454
|
-
content: '';
|
|
455
|
-
position: absolute;
|
|
456
|
-
height: 100%;
|
|
457
|
-
width: 100%;
|
|
458
|
-
top: 0;
|
|
459
|
-
left: 0;
|
|
460
|
-
border-radius: 2px;
|
|
461
|
-
background-color: ${e=>e.theme.palette.primary.main};
|
|
462
|
-
transform: scale(0.1);
|
|
463
|
-
opacity: 0;
|
|
464
|
-
z-index: -1;
|
|
465
|
-
transition:
|
|
466
|
-
transform 0.3s,
|
|
467
|
-
opacity 0.3s,
|
|
468
|
-
background-color 0.3s;
|
|
469
|
-
}
|
|
470
|
-
&:hover::after {
|
|
471
|
-
opacity: 1;
|
|
472
|
-
transform-origin: center;
|
|
473
|
-
transform: scale(1);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
& > :not(.Mui-disabled) {
|
|
477
|
-
background-color: transparent !important;
|
|
478
|
-
color: ${e=>e.theme.palette.primary.main}!important;
|
|
479
|
-
}
|
|
480
|
-
& > :not(.Mui-disabled) {
|
|
481
|
-
&:hover {
|
|
482
|
-
color: ${e=>e.theme.palette.common.white}!important;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
`;const Oo=(e="")=>e.replace(/(<([^>]+)>)/gi,"").trim(),Jd=(e="")=>{const t=parseInt(e,10);return Number.isNaN(t)?e:t<1e3?t:t<1e6?`${(t/1e3).toFixed(1)}k`:t<1e9?`${(t/1e6).toFixed(1)}m`:`${(t/1e9).toFixed(1)}b`},oa={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 18a3.5 3.5 0 0 0 0-7h-1A5 4.5 0 0 0 7 9a4.6 4.4 0 0 0-2.1 8.4M12 13v9m-3-3l3 3l3-3"/>'};function Hr({title:e,sx:t,children:n,slotProps:r,fontSize:o=12,fontWeight:u=500,color:d="text.secondary",...h}){var v,x;return e?i.jsx(Ko,{title:e,placement:"top",...h,slotProps:{popper:{...r==null?void 0:r.popper,sx:[{[`& .${Ma.tooltip}`]:{backgroundColor:"common.white",fontSize:o,fontWeight:u,boxShadow:"0px 4px 8px 0px #03071214, 0px 0px 0px 1px #03071214",marginBottom:"6px !important",borderRadius:"8px",cursor:"default",color:d,display:"flex",alignItems:"center"}},...Array.isArray((v=r==null?void 0:r.popper)==null?void 0:v.sx)?r.popper.sx:[(x=r==null?void 0:r.popper)==null?void 0:x.sx]]}},children:n}):n}function nr({icon:e,children:t,maxWidth:n=100,title:r,sx:o}){return(t===0||t)&&i.jsxs(tt,{direction:"row",alignItems:"center",gap:.5,sx:[{maxWidth:n,overflow:"hidden"},...Array.isArray(o)?o:[o]],children:[e,i.jsx(Hr,{title:r||(typeof t=="string"?t:""),children:i.jsx(ge,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:t})})]})}function Qd(e){const{title:t,description:n="",cover:r="",avatar:o,author:u,download:d,did:h,official:v,buttonText:x="Install",buttonDisabled:s,buttonLoading:a,button:k,onButtonClick:b=()=>{},onMainClick:S,className:R,ref:N,icons:D,status:X,...z}=e,Y=Yn(),O=(J,se=()=>!1)=>(Se,...De)=>{const Ue=J instanceof Function;(se()||Ue)&&(Se.preventDefault(),Se.stopPropagation(),Ue&&J(...De))},q=S&&O(S),Z=O(b,()=>!!(k||s||a)),B=A.isValidElement(t)?{children:t}:{title:Oo(t),dangerouslySetInnerHTML:{__html:t}},ue=A.isValidElement(n)?{children:n}:{title:Oo(n),dangerouslySetInnerHTML:{__html:n}};return i.jsxs(Fa,{variant:"outlined",onClick:q,...z,sx:{p:{xs:2,md:3},borderRadius:2,...z.sx},children:[i.jsxs(tt,{flex:1,direction:"row",gap:1,alignItems:"center",overflow:"hidden",sx:{"& > *":{flexShrink:0}},children:[i.jsx(cr,{src:r,did:h,size:48,variant:"rounded",style:{borderRadius:"8px",overflow:"hidden"}}),i.jsx(ge,{className:"blocklet-title",fontWeight:"fontWeightMedium",sx:{fontSize:16,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",cursor:"default",pl:.5,"&&":{flexShrink:1}},...B}),i.jsxs(H,{flex:1,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1,children:[v&&i.jsx(Hr,{title:v.tooltip,children:i.jsx(xl,{sx:{color:v.color||"#D97706",fontSize:v.size||18}})}),D==null?void 0:D.map(J=>i.jsx(Hr,{title:J.title,children:typeof J.icon=="string"?i.jsx(lt,{icon:J.icon,style:{color:J.color}}):J.icon},J.key))]}),b&&i.jsxs(dt,{color:"reverse",variant:"outlined",size:"small",disabled:s||a,style:{borderColor:Y.palette.grey[300],borderRadius:8,fontSize:13,fontWeight:Y.typography.fontWeightMedium},onClick:Z,children:[a&&i.jsx(gt,{size:15,style:{marginRight:3,color:"inherit"}}),x]}),k]}),i.jsx(tt,{py:2,children:i.jsx(ge,{className:"blocklet-description",variant:"body2",color:"text.secondary",sx:{display:"-webkit-box",lineClamp:2,WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",cursor:"default",height:40},...ue})}),i.jsxs(tt,{direction:"row",alignItems:"center",gap:2,color:"text.secondary",children:[i.jsx(nr,{icon:i.jsx(cr,{src:o,did:h,size:20,variant:"circle"}),maxWidth:200,children:u}),i.jsx(nr,{icon:i.jsx(lt,{icon:oa}),title:d,children:Jd(d)}),X==null?void 0:X.filter(J=>J.align!=="right").map(J=>i.jsx(nr,{icon:typeof J.icon=="string"?i.jsx(lt,{icon:J.icon}):J.icon,title:J.title,maxWidth:J.maxWidth,children:J.text},J.key)),i.jsx(H,{sx:{flex:1}}),X==null?void 0:X.filter(J=>J.align==="right").map(J=>i.jsx(nr,{icon:typeof J.icon=="string"?i.jsx(lt,{icon:J.icon}):J.icon,title:J.title,maxWidth:J.maxWidth,sx:{color:J.color},children:J.text},J.key))]})]})}const Zd={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m8 16l2-6l6-2l-2 6l-6 2"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-9v2m0 14v2m-9-9h2m14 0h2"/></g>'};var sa={exports:{}};(function(e,t){(function(n,r){e.exports=r(A)})(Ee,n=>(()=>{var r={703:(h,v,x)=>{var s=x(414);function a(){}function k(){}k.resetWarningCache=a,h.exports=function(){function b(N,D,X,z,Y,O){if(O!==s){var q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw q.name="Invariant Violation",q}}function S(){return b}b.isRequired=b;var R={array:b,bool:b,func:b,number:b,object:b,string:b,symbol:b,any:b,arrayOf:S,element:b,elementType:b,instanceOf:S,node:b,objectOf:S,oneOf:S,oneOfType:S,shape:S,exact:S,checkPropTypes:k,resetWarningCache:a};return R.PropTypes=R,R}},697:(h,v,x)=>{h.exports=x(703)()},414:h=>{h.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},590:h=>{var v=typeof Element<"u",x=typeof Map=="function",s=typeof Set=="function",a=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function k(b,S){if(b===S)return!0;if(b&&S&&typeof b=="object"&&typeof S=="object"){if(b.constructor!==S.constructor)return!1;var R,N,D,X;if(Array.isArray(b)){if((R=b.length)!=S.length)return!1;for(N=R;N--!=0;)if(!k(b[N],S[N]))return!1;return!0}if(x&&b instanceof Map&&S instanceof Map){if(b.size!==S.size)return!1;for(X=b.entries();!(N=X.next()).done;)if(!S.has(N.value[0]))return!1;for(X=b.entries();!(N=X.next()).done;)if(!k(N.value[1],S.get(N.value[0])))return!1;return!0}if(s&&b instanceof Set&&S instanceof Set){if(b.size!==S.size)return!1;for(X=b.entries();!(N=X.next()).done;)if(!S.has(N.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(b)&&ArrayBuffer.isView(S)){if((R=b.length)!=S.length)return!1;for(N=R;N--!=0;)if(b[N]!==S[N])return!1;return!0}if(b.constructor===RegExp)return b.source===S.source&&b.flags===S.flags;if(b.valueOf!==Object.prototype.valueOf)return b.valueOf()===S.valueOf();if(b.toString!==Object.prototype.toString)return b.toString()===S.toString();if((R=(D=Object.keys(b)).length)!==Object.keys(S).length)return!1;for(N=R;N--!=0;)if(!Object.prototype.hasOwnProperty.call(S,D[N]))return!1;if(v&&b instanceof Element)return!1;for(N=R;N--!=0;)if((D[N]!=="_owner"&&D[N]!=="__v"&&D[N]!=="__o"||!b.$$typeof)&&!k(b[D[N]],S[D[N]]))return!1;return!0}return b!=b&&S!=S}h.exports=function(b,S){try{return k(b,S)}catch(R){if((R.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw R}}},359:h=>{h.exports=n}},o={};function u(h){var v=o[h];if(v!==void 0)return v.exports;var x=o[h]={exports:{}};return r[h](x,x.exports,u),x.exports}u.n=h=>{var v=h&&h.__esModule?()=>h.default:()=>h;return u.d(v,{a:v}),v},u.d=(h,v)=>{for(var x in v)u.o(v,x)&&!u.o(h,x)&&Object.defineProperty(h,x,{enumerable:!0,get:v[x]})},u.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),u.o=(h,v)=>Object.prototype.hasOwnProperty.call(h,v),u.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var d={};return(()=>{function h(g){var p,E,T="";if(typeof g=="string"||typeof g=="number")T+=g;else if(typeof g=="object")if(Array.isArray(g))for(p=0;p<g.length;p++)g[p]&&(E=h(g[p]))&&(T&&(T+=" "),T+=E);else for(p in g)g[p]&&(T&&(T+=" "),T+=p);return T}function v(){for(var g,p,E=0,T="";E<arguments.length;)(g=arguments[E++])&&(p=h(g))&&(T&&(T+=" "),T+=p);return T}u.r(d),u.d(d,{default:()=>Oa});var x=u(359),s=u.n(x);const a=function(g){var p=typeof g;return g!=null&&(p=="object"||p=="function")},k=typeof Ee=="object"&&Ee&&Ee.Object===Object&&Ee;var b=typeof self=="object"&&self&&self.Object===Object&&self;const S=k||b||Function("return this")(),R=function(){return S.Date.now()};var N=/\s/,D=/^\s+/;const X=function(g){return g&&g.slice(0,function(p){for(var E=p.length;E--&&N.test(p.charAt(E)););return E}(g)+1).replace(D,"")},z=S.Symbol;var Y=Object.prototype,O=Y.hasOwnProperty,q=Y.toString,Z=z?z.toStringTag:void 0,B=Object.prototype.toString,ue=z?z.toStringTag:void 0;const J=function(g){return g==null?g===void 0?"[object Undefined]":"[object Null]":ue&&ue in Object(g)?function(p){var E=O.call(p,Z),T=p[Z];try{p[Z]=void 0;var U=!0}catch{}var re=q.call(p);return U&&(E?p[Z]=T:delete p[Z]),re}(g):function(p){return B.call(p)}(g)};var se=/^[-+]0x[0-9a-f]+$/i,Se=/^0b[01]+$/i,De=/^0o[0-7]+$/i,Ue=parseInt;const rt=function(g){if(typeof g=="number")return g;if(function(T){return typeof T=="symbol"||function(U){return U!=null&&typeof U=="object"}(T)&&J(T)=="[object Symbol]"}(g))return NaN;if(a(g)){var p=typeof g.valueOf=="function"?g.valueOf():g;g=a(p)?p+"":p}if(typeof g!="string")return g===0?g:+g;g=X(g);var E=Se.test(g);return E||De.test(g)?Ue(g.slice(2),E?2:8):se.test(g)?NaN:+g};var ee=Math.max,fe=Math.min;const K=function(g,p,E){var T,U,re,me,m,f,C=0,M=!1,W=!1,$=!0;if(typeof g!="function")throw new TypeError("Expected a function");function ce(ie){var pe=T,ye=U;return T=U=void 0,C=ie,me=g.apply(ye,pe)}function le(ie){return C=ie,m=setTimeout(V,p),M?ce(ie):me}function he(ie){var pe=ie-f;return f===void 0||pe>=p||pe<0||W&&ie-C>=re}function V(){var ie=R();if(he(ie))return G(ie);m=setTimeout(V,function(pe){var ye=p-(pe-f);return W?fe(ye,re-(pe-C)):ye}(ie))}function G(ie){return m=void 0,$&&T?ce(ie):(T=U=void 0,me)}function Q(){var ie=R(),pe=he(ie);if(T=arguments,U=this,f=ie,pe){if(m===void 0)return le(f);if(W)return clearTimeout(m),m=setTimeout(V,p),ce(f)}return m===void 0&&(m=setTimeout(V,p)),me}return p=rt(p)||0,a(E)&&(M=!!E.leading,re=(W="maxWait"in E)?ee(rt(E.maxWait)||0,p):re,$="trailing"in E?!!E.trailing:$),Q.cancel=function(){m!==void 0&&clearTimeout(m),C=0,T=f=U=m=void 0},Q.flush=function(){return m===void 0?me:G(R())},Q},Te=function(g,p,E){var T=!0,U=!0;if(typeof g!="function")throw new TypeError("Expected a function");return a(E)&&(T="leading"in E?!!E.leading:T,U="trailing"in E?!!E.trailing:U),K(g,p,{leading:T,maxWait:p,trailing:U})};var oe=u(590),pt=u.n(oe),xe=function(){if(typeof Map<"u")return Map;function g(p,E){var T=-1;return p.some(function(U,re){return U[0]===E&&(T=re,!0)}),T}return function(){function p(){this.__entries__=[]}return Object.defineProperty(p.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),p.prototype.get=function(E){var T=g(this.__entries__,E),U=this.__entries__[T];return U&&U[1]},p.prototype.set=function(E,T){var U=g(this.__entries__,E);~U?this.__entries__[U][1]=T:this.__entries__.push([E,T])},p.prototype.delete=function(E){var T=this.__entries__,U=g(T,E);~U&&T.splice(U,1)},p.prototype.has=function(E){return!!~g(this.__entries__,E)},p.prototype.clear=function(){this.__entries__.splice(0)},p.prototype.forEach=function(E,T){T===void 0&&(T=null);for(var U=0,re=this.__entries__;U<re.length;U++){var me=re[U];E.call(T,me[1],me[0])}},p}()}(),Ye=typeof window<"u"&&typeof document<"u"&&window.document===document,ze=u.g!==void 0&&u.g.Math===Math?u.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Rt=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ze):function(g){return setTimeout(function(){return g(Date.now())},1e3/60)},Gt=["top","right","bottom","left","width","height","size","weight"],Ft=typeof MutationObserver<"u",Ht=function(){function g(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(p,E){var T=!1,U=!1,re=0;function me(){T&&(T=!1,p()),U&&f()}function m(){Rt(me)}function f(){var C=Date.now();if(T){if(C-re<2)return;U=!0}else T=!0,U=!1,setTimeout(m,20);re=C}return f}(this.refresh.bind(this))}return g.prototype.addObserver=function(p){~this.observers_.indexOf(p)||this.observers_.push(p),this.connected_||this.connect_()},g.prototype.removeObserver=function(p){var E=this.observers_,T=E.indexOf(p);~T&&E.splice(T,1),!E.length&&this.connected_&&this.disconnect_()},g.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},g.prototype.updateObservers_=function(){var p=this.observers_.filter(function(E){return E.gatherActive(),E.hasActive()});return p.forEach(function(E){return E.broadcastActive()}),p.length>0},g.prototype.connect_=function(){Ye&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ft?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},g.prototype.disconnect_=function(){Ye&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},g.prototype.onTransitionEnd_=function(p){var E=p.propertyName,T=E===void 0?"":E;Gt.some(function(U){return!!~T.indexOf(U)})&&this.refresh()},g.getInstance=function(){return this.instance_||(this.instance_=new g),this.instance_},g.instance_=null,g}(),Pe=function(g,p){for(var E=0,T=Object.keys(p);E<T.length;E++){var U=T[E];Object.defineProperty(g,U,{value:p[U],enumerable:!1,writable:!1,configurable:!0})}return g},Le=function(g){return g&&g.ownerDocument&&g.ownerDocument.defaultView||ze},Je=Oe(0,0,0,0);function de(g){return parseFloat(g)||0}function Xt(g){for(var p=[],E=1;E<arguments.length;E++)p[E-1]=arguments[E];return p.reduce(function(T,U){return T+de(g["border-"+U+"-width"])},0)}var Yt=typeof SVGGraphicsElement<"u"?function(g){return g instanceof Le(g).SVGGraphicsElement}:function(g){return g instanceof Le(g).SVGElement&&typeof g.getBBox=="function"};function Jt(g){return Ye?Yt(g)?function(p){var E=p.getBBox();return Oe(0,0,E.width,E.height)}(g):function(p){var E=p.clientWidth,T=p.clientHeight;if(!E&&!T)return Je;var U=Le(p).getComputedStyle(p),re=function($){for(var ce={},le=0,he=["top","right","bottom","left"];le<he.length;le++){var V=he[le],G=$["padding-"+V];ce[V]=de(G)}return ce}(U),me=re.left+re.right,m=re.top+re.bottom,f=de(U.width),C=de(U.height);if(U.boxSizing==="border-box"&&(Math.round(f+me)!==E&&(f-=Xt(U,"left","right")+me),Math.round(C+m)!==T&&(C-=Xt(U,"top","bottom")+m)),!function($){return $===Le($).document.documentElement}(p)){var M=Math.round(f+me)-E,W=Math.round(C+m)-T;Math.abs(M)!==1&&(f-=M),Math.abs(W)!==1&&(C-=W)}return Oe(re.left,re.top,f,C)}(g):Je}function Oe(g,p,E,T){return{x:g,y:p,width:E,height:T}}var Bt=function(){function g(p){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Oe(0,0,0,0),this.target=p}return g.prototype.isActive=function(){var p=Jt(this.target);return this.contentRect_=p,p.width!==this.broadcastWidth||p.height!==this.broadcastHeight},g.prototype.broadcastRect=function(){var p=this.contentRect_;return this.broadcastWidth=p.width,this.broadcastHeight=p.height,p},g}(),Pn=function(g,p){var E,T,U,re,me,m,f,C=(T=(E=p).x,U=E.y,re=E.width,me=E.height,m=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,f=Object.create(m.prototype),Pe(f,{x:T,y:U,width:re,height:me,top:U,right:T+re,bottom:me+U,left:T}),f);Pe(this,{target:g,contentRect:C})},Qe=function(){function g(p,E,T){if(this.activeObservations_=[],this.observations_=new xe,typeof p!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=p,this.controller_=E,this.callbackCtx_=T}return g.prototype.observe=function(p){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(p instanceof Le(p).Element))throw new TypeError('parameter 1 is not of type "Element".');var E=this.observations_;E.has(p)||(E.set(p,new Bt(p)),this.controller_.addObserver(this),this.controller_.refresh())}},g.prototype.unobserve=function(p){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(p instanceof Le(p).Element))throw new TypeError('parameter 1 is not of type "Element".');var E=this.observations_;E.has(p)&&(E.delete(p),E.size||this.controller_.removeObserver(this))}},g.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},g.prototype.gatherActive=function(){var p=this;this.clearActive(),this.observations_.forEach(function(E){E.isActive()&&p.activeObservations_.push(E)})},g.prototype.broadcastActive=function(){if(this.hasActive()){var p=this.callbackCtx_,E=this.activeObservations_.map(function(T){return new Pn(T.target,T.broadcastRect())});this.callback_.call(p,E,p),this.clearActive()}},g.prototype.clearActive=function(){this.activeObservations_.splice(0)},g.prototype.hasActive=function(){return this.activeObservations_.length>0},g}(),Qt=typeof WeakMap<"u"?new WeakMap:new xe,Zt=function g(p){if(!(this instanceof g))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var E=Ht.getInstance(),T=new Qe(p,E,this);Qt.set(this,T)};["observe","unobserve","disconnect"].forEach(function(g){Zt.prototype[g]=function(){var p;return(p=Qt.get(this))[g].apply(p,arguments)}});const en=ze.ResizeObserver!==void 0?ze.ResizeObserver:Zt,Me="Left",Ze="Right",wt="Up",it="Down",Et={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Ct={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},qe="mousemove",vn="mouseup";function tn(g,p){if(p===0)return g;const E=Math.PI/180*p;return[g[0]*Math.cos(E)+g[1]*Math.sin(E),g[1]*Math.cos(E)-g[0]*Math.sin(E)]}function yn(g){const{trackMouse:p}=g,E=x.useRef(Object.assign({},Ct)),T=x.useRef(Object.assign({},Et)),U=x.useRef(Object.assign({},T.current));let re;for(re in U.current=Object.assign({},T.current),T.current=Object.assign(Object.assign({},Et),g),Et)T.current[re]===void 0&&(T.current[re]=Et[re]);const[me,m]=x.useMemo(()=>function(f,C){const M=V=>{const G="touches"in V;G&&V.touches.length>1||f((Q,ie)=>{ie.trackMouse&&!G&&(document.addEventListener(qe,W),document.addEventListener(vn,ce));const{clientX:pe,clientY:ye}=G?V.touches[0]:V,_e=tn([pe,ye],ie.rotationAngle);return ie.onTouchStartOrOnMouseDown&&ie.onTouchStartOrOnMouseDown({event:V}),Object.assign(Object.assign(Object.assign({},Q),Ct),{initial:_e.slice(),xy:_e,start:V.timeStamp||0})})},W=V=>{f((G,Q)=>{const ie="touches"in V;if(ie&&V.touches.length>1)return G;if(V.timeStamp-G.start>Q.swipeDuration)return G.swiping?Object.assign(Object.assign({},G),{swiping:!1}):G;const{clientX:pe,clientY:ye}=ie?V.touches[0]:V,[_e,at]=tn([pe,ye],Q.rotationAngle),et=_e-G.xy[0],Ke=at-G.xy[1],Ie=Math.abs(et),be=Math.abs(Ke),Wt=(V.timeStamp||0)-G.start,Dn=Math.sqrt(Ie*Ie+be*be)/(Wt||1),Mn=[et/(Wt||1),Ke/(Wt||1)],Nt=function(Fn,Tn,Bn,ct){return Fn>Tn?Bn>0?Ze:Me:ct>0?it:wt}(Ie,be,et,Ke),ln=typeof Q.delta=="number"?Q.delta:Q.delta[Nt.toLowerCase()]||Et.delta;if(Ie<ln&&be<ln&&!G.swiping)return G;const Tt={absX:Ie,absY:be,deltaX:et,deltaY:Ke,dir:Nt,event:V,first:G.first,initial:G.initial,velocity:Dn,vxvy:Mn};Tt.first&&Q.onSwipeStart&&Q.onSwipeStart(Tt),Q.onSwiping&&Q.onSwiping(Tt);let Sn=!1;return(Q.onSwiping||Q.onSwiped||Q[`onSwiped${Nt}`])&&(Sn=!0),Sn&&Q.preventScrollOnSwipe&&Q.trackTouch&&V.cancelable&&V.preventDefault(),Object.assign(Object.assign({},G),{first:!1,eventData:Tt,swiping:!0})})},$=V=>{f((G,Q)=>{let ie;if(G.swiping&&G.eventData){if(V.timeStamp-G.start<Q.swipeDuration){ie=Object.assign(Object.assign({},G.eventData),{event:V}),Q.onSwiped&&Q.onSwiped(ie);const pe=Q[`onSwiped${ie.dir}`];pe&&pe(ie)}}else Q.onTap&&Q.onTap({event:V});return Q.onTouchEndOrOnMouseUp&&Q.onTouchEndOrOnMouseUp({event:V}),Object.assign(Object.assign(Object.assign({},G),Ct),{eventData:ie})})},ce=V=>{document.removeEventListener(qe,W),document.removeEventListener(vn,ce),$(V)},le=(V,G)=>{let Q=()=>{};if(V&&V.addEventListener){const ie=Object.assign(Object.assign({},Et.touchEventOptions),G.touchEventOptions),pe=[["touchstart",M,ie],["touchmove",W,Object.assign(Object.assign({},ie),G.preventScrollOnSwipe?{passive:!1}:{})],["touchend",$,ie]];pe.forEach(([ye,_e,at])=>V.addEventListener(ye,_e,at)),Q=()=>pe.forEach(([ye,_e])=>V.removeEventListener(ye,_e))}return Q},he={ref:V=>{V!==null&&f((G,Q)=>{if(G.el===V)return G;const ie={};return G.el&&G.el!==V&&G.cleanUpTouch&&(G.cleanUpTouch(),ie.cleanUpTouch=void 0),Q.trackTouch&&V&&(ie.cleanUpTouch=le(V,Q)),Object.assign(Object.assign(Object.assign({},G),{el:V}),ie)})}};return C.trackMouse&&(he.onMouseDown=M),[he,le]}(f=>E.current=f(E.current,T.current),{trackMouse:p}),[p]);return E.current=function(f,C,M,W){return C.trackTouch&&f.el?f.cleanUpTouch?C.preventScrollOnSwipe!==M.preventScrollOnSwipe||C.touchEventOptions.passive!==M.touchEventOptions.passive?(f.cleanUpTouch(),Object.assign(Object.assign({},f),{cleanUpTouch:W(f.el,C)})):f:Object.assign(Object.assign({},f),{cleanUpTouch:W(f.el,C)}):(f.cleanUpTouch&&f.cleanUpTouch(),Object.assign(Object.assign({},f),{cleanUpTouch:void 0}))}(E.current,T.current,U.current,m),me}var I=u(697);function St(g){return St=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},St(g)}function It(g,p){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(g);p&&(T=T.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),E.push.apply(E,T)}return E}function nn(g){for(var p=1;p<arguments.length;p++){var E=arguments[p]!=null?arguments[p]:{};p%2?It(Object(E),!0).forEach(function(T){l(g,T,E[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(E)):It(Object(E)).forEach(function(T){Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(E,T))})}return g}function l(g,p,E){return(p=function(T){var U=function(re,me){if(St(re)!=="object"||re===null)return re;var m=re[Symbol.toPrimitive];if(m!==void 0){var f=m.call(re,me);if(St(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(re)}(T,"string");return St(U)==="symbol"?U:String(U)}(p))in g?Object.defineProperty(g,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):g[p]=E,g}var y={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},w=s().memo(function(g){var p=nn(nn({},y),g),E=p.description,T=p.fullscreen,U=p.handleImageLoaded,re=p.isFullscreen,me=p.onImageError,m=p.original,f=p.originalAlt,C=p.originalHeight,M=p.originalWidth,W=p.originalTitle,$=p.sizes,ce=p.srcSet,le=p.loading,he=re&&T||m;return s().createElement(s().Fragment,null,s().createElement("img",{className:"image-gallery-image",src:he,alt:f,srcSet:ce,height:C,width:M,sizes:$,title:W,onLoad:function(V){return U(V,m)},onError:me,loading:le}),E&&s().createElement("span",{className:"image-gallery-description"},E))});w.displayName="Item",w.propTypes={description:I.string,fullscreen:I.string,handleImageLoaded:I.func.isRequired,isFullscreen:I.bool,onImageError:I.func.isRequired,original:I.string.isRequired,originalAlt:I.string,originalHeight:I.string,originalWidth:I.string,originalTitle:I.string,sizes:I.string,srcSet:I.string,loading:I.string};const P=w;function j(g){return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},j(g)}function L(g,p){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(g);p&&(T=T.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),E.push.apply(E,T)}return E}function F(g){for(var p=1;p<arguments.length;p++){var E=arguments[p]!=null?arguments[p]:{};p%2?L(Object(E),!0).forEach(function(T){ne(g,T,E[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(E)):L(Object(E)).forEach(function(T){Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(E,T))})}return g}function ne(g,p,E){return(p=function(T){var U=function(re,me){if(j(re)!=="object"||re===null)return re;var m=re[Symbol.toPrimitive];if(m!==void 0){var f=m.call(re,me);if(j(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(re)}(T,"string");return j(U)==="symbol"?U:String(U)}(p))in g?Object.defineProperty(g,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):g[p]=E,g}var ae={left:s().createElement("polyline",{points:"15 18 9 12 15 6"}),right:s().createElement("polyline",{points:"9 18 15 12 9 6"}),maximize:s().createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:s().createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:s().createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:s().createElement(s().Fragment,null,s().createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),s().createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},Fe={strokeWidth:1,viewBox:"0 0 24 24"},Ne=function(g){var p=F(F({},Fe),g),E=p.strokeWidth,T=p.viewBox,U=p.icon;return s().createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:T,fill:"none",stroke:"currentColor",strokeWidth:E,strokeLinecap:"round",strokeLinejoin:"round"},ae[U])};Ne.propTypes={strokeWidth:I.number,viewBox:I.string,icon:(0,I.oneOf)(["left","right","maximize","minimize","play","pause"]).isRequired};const we=Ne;var je=s().memo(function(g){var p=g.isFullscreen,E=g.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:E,"aria-label":"Open Fullscreen"},s().createElement(we,{strokeWidth:2,icon:p?"minimize":"maximize"}))});je.displayName="Fullscreen",je.propTypes={isFullscreen:I.bool.isRequired,onClick:I.func.isRequired};const He=je;var Pt=s().memo(function(g){var p=g.disabled,E=g.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:p,onClick:E,"aria-label":"Previous Slide"},s().createElement(we,{icon:"left",viewBox:"6 0 12 24"}))});Pt.displayName="LeftNav",Pt.propTypes={disabled:I.bool.isRequired,onClick:I.func.isRequired};const Ln=Pt;var Lt=s().memo(function(g){var p=g.disabled,E=g.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:p,onClick:E,"aria-label":"Next Slide"},s().createElement(we,{icon:"right",viewBox:"6 0 12 24"}))});Lt.displayName="RightNav",Lt.propTypes={disabled:I.bool.isRequired,onClick:I.func.isRequired};const ot=Lt;var $t=s().memo(function(g){var p=g.isPlaying,E=g.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:E,"aria-label":"Play or Pause Slideshow"},s().createElement(we,{strokeWidth:2,icon:p?"pause":"play"}))});$t.displayName="PlayPause",$t.propTypes={isPlaying:I.bool.isRequired,onClick:I.func.isRequired};const Ut=$t;function ft(g){return ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},ft(g)}function st(){return st=Object.assign?Object.assign.bind():function(g){for(var p=1;p<arguments.length;p++){var E=arguments[p];for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(g[T]=E[T])}return g},st.apply(this,arguments)}function _t(g,p){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(g);p&&(T=T.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),E.push.apply(E,T)}return E}function bn(g){for(var p=1;p<arguments.length;p++){var E=arguments[p]!=null?arguments[p]:{};p%2?_t(Object(E),!0).forEach(function(T){xn(g,T,E[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(E)):_t(Object(E)).forEach(function(T){Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(E,T))})}return g}function xn(g,p,E){return(p=function(T){var U=function(re,me){if(ft(re)!=="object"||re===null)return re;var m=re[Symbol.toPrimitive];if(m!==void 0){var f=m.call(re,me);if(ft(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(re)}(T,"string");return ft(U)==="symbol"?U:String(U)}(p))in g?Object.defineProperty(g,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):g[p]=E,g}var Zn={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},_n=function(g){var p=bn(bn({},Zn),g),E=p.children,T=p.className,U=yn({delta:p.delta,onSwiping:p.onSwiping,onSwiped:p.onSwiped});return s().createElement("div",st({},U,{className:T}),E)};_n.propTypes={children:I.node.isRequired,className:I.string,delta:I.number,onSwiped:I.func,onSwiping:I.func};const Nn=_n;function Be(g){return Be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},Be(g)}function wn(g,p){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(g);p&&(T=T.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),E.push.apply(E,T)}return E}function rn(g){for(var p=1;p<arguments.length;p++){var E=arguments[p]!=null?arguments[p]:{};p%2?wn(Object(E),!0).forEach(function(T){sn(g,T,E[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(E)):wn(Object(E)).forEach(function(T){Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(E,T))})}return g}function En(g,p){for(var E=0;E<p.length;E++){var T=p[E];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(g,an(T.key),T)}}function on(g,p){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,T){return E.__proto__=T,E},on(g,p)}function An(g,p){if(p&&(Be(p)==="object"||typeof p=="function"))return p;if(p!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ke(g)}function ke(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function yt(g){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(p){return p.__proto__||Object.getPrototypeOf(p)},yt(g)}function sn(g,p,E){return(p=an(p))in g?Object.defineProperty(g,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):g[p]=E,g}function an(g){var p=function(E,T){if(Be(E)!=="object"||E===null)return E;var U=E[Symbol.toPrimitive];if(U!==void 0){var re=U.call(E,T);if(Be(re)!=="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(E)}(g,"string");return Be(p)==="symbol"?p:String(p)}var er=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],ja=(0,I.arrayOf)((0,I.shape)({srcSet:I.string,media:I.string}));function Gi(g){var p=parseInt(g.keyCode||g.which||0,10);return p===66||p===62}var Er=function(g){(function(m,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(f&&f.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),f&&on(m,f)})(me,g);var p,E,T,U,re=(T=me,U=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var m,f=yt(T);if(U){var C=yt(this).constructor;m=Reflect.construct(f,arguments,C)}else m=f.apply(this,arguments);return An(this,m)});function me(m){var f;return function(C,M){if(!(C instanceof M))throw new TypeError("Cannot call a class as a function")}(this,me),sn(ke(f=re.call(this,m)),"onBulletClick",function(C,M){var W=f.props,$=W.onBulletClick,ce=W.items,le=f.state.currentIndex;C.target.blur(),le!==M&&(ce.length===2?f.slideToIndexWithStyleReset(M,C):f.slideToIndex(M,C)),$&&$(C,M)}),f.state={currentIndex:m.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(m.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},f.loadedImages={},f.imageGallery=s().createRef(),f.thumbnailsWrapper=s().createRef(),f.thumbnails=s().createRef(),f.imageGallerySlideWrapper=s().createRef(),f.handleImageLoaded=f.handleImageLoaded.bind(ke(f)),f.handleKeyDown=f.handleKeyDown.bind(ke(f)),f.handleMouseDown=f.handleMouseDown.bind(ke(f)),f.handleResize=f.handleResize.bind(ke(f)),f.handleTouchMove=f.handleTouchMove.bind(ke(f)),f.handleOnSwiped=f.handleOnSwiped.bind(ke(f)),f.handleScreenChange=f.handleScreenChange.bind(ke(f)),f.handleSwiping=f.handleSwiping.bind(ke(f)),f.handleThumbnailSwiping=f.handleThumbnailSwiping.bind(ke(f)),f.handleOnThumbnailSwiped=f.handleOnThumbnailSwiped.bind(ke(f)),f.onThumbnailMouseLeave=f.onThumbnailMouseLeave.bind(ke(f)),f.handleImageError=f.handleImageError.bind(ke(f)),f.pauseOrPlay=f.pauseOrPlay.bind(ke(f)),f.renderThumbInner=f.renderThumbInner.bind(ke(f)),f.renderItem=f.renderItem.bind(ke(f)),f.slideLeft=f.slideLeft.bind(ke(f)),f.slideRight=f.slideRight.bind(ke(f)),f.toggleFullScreen=f.toggleFullScreen.bind(ke(f)),f.togglePlay=f.togglePlay.bind(ke(f)),f.unthrottledSlideToIndex=f.slideToIndex,f.slideToIndex=Te(f.unthrottledSlideToIndex,m.slideDuration,{trailing:!1}),m.lazyLoad&&(f.lazyLoaded=[]),f}return p=me,E=[{key:"componentDidMount",value:function(){var m=this.props,f=m.autoPlay,C=m.useWindowKeyDown;f&&this.play(),C?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),window.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(m,f){var C=this.props,M=C.items,W=C.lazyLoad,$=C.slideDuration,ce=C.slideInterval,le=C.startIndex,he=C.thumbnailPosition,V=C.showThumbnails,G=C.useWindowKeyDown,Q=this.state,ie=Q.currentIndex,pe=Q.isPlaying,ye=m.items.length!==M.length,_e=!pt()(m.items,M),at=m.startIndex!==le,et=m.thumbnailPosition!==he,Ke=m.showThumbnails!==V;ce===m.slideInterval&&$===m.slideDuration||pe&&(this.pause(),this.play()),et&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),Ke&&V&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),Ke&&!V&&this.removeThumbnailsResizeObserver(),(ye||Ke)&&this.handleResize(),f.currentIndex!==ie&&this.slideThumbnailBar(),m.slideDuration!==$&&(this.slideToIndex=Te(this.unthrottledSlideToIndex,$,{trailing:!1})),!W||m.lazyLoad&&!_e||(this.lazyLoaded=[]),G!==m.useWindowKeyDown&&(G?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(at||_e)&&this.setState({currentIndex:le,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var m=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("touchmove",this.handleTouchMove),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),m?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var m=this,f=this.state,C=f.currentIndex,M=f.isTransitioning,W=this.props,$=W.onSlide,ce=W.slideDuration;this.transitionTimer=window.setTimeout(function(){M&&(m.setState({isTransitioning:!M,isSwipingThumbnail:!1}),$&&$(C))},ce+50)}},{key:"onThumbnailClick",value:function(m,f){var C=this.props,M=C.onThumbnailClick,W=C.items,$=this.state.currentIndex;m.target.parentNode.parentNode.blur(),$!==f&&(W.length===2?this.slideToIndexWithStyleReset(f,m):this.slideToIndex(f,m)),M&&M(m,f)}},{key:"onThumbnailMouseOver",value:function(m,f){var C=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout(function(){C.slideToIndex(f),C.pause()},300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var m=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,m&&this.play()}}},{key:"setThumbsTranslate",value:function(m){this.setState({thumbsTranslate:m})}},{key:"setModalFullscreen",value:function(m){var f=this.props.onScreenChange;this.setState({modalFullscreen:m}),f&&f(m)}},{key:"getThumbsTranslate",value:function(m){var f,C=this.props,M=C.disableThumbnailScroll,W=C.items,$=this.state,ce=$.thumbnailsWrapperWidth,le=$.thumbnailsWrapperHeight,he=this.thumbnails&&this.thumbnails.current;if(M)return 0;if(he){if(this.isThumbnailVertical()){if(he.scrollHeight<=le)return 0;f=he.scrollHeight-le}else{if(he.scrollWidth<=ce||ce<=0)return 0;f=he.scrollWidth-ce}return m*(f/(W.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(m){switch(m){case"left":m=" ".concat("image-gallery-thumbnails-left");break;case"right":m=" ".concat("image-gallery-thumbnails-right");break;case"bottom":m=" ".concat("image-gallery-thumbnails-bottom");break;case"top":m=" ".concat("image-gallery-thumbnails-top")}return m}},{key:"getAlignmentClassName",value:function(m){var f=this.state.currentIndex,C=this.props,M=C.infinite,W=C.items,$="",ce="image-gallery-left",le="image-gallery-right";switch(m){case f-1:$=" ".concat(ce);break;case f:$=" ".concat("image-gallery-center");break;case f+1:$=" ".concat(le)}return W.length>=3&&M&&(m===0&&f===W.length-1?$=" ".concat(le):m===W.length-1&&f===0&&($=" ".concat(ce))),$}},{key:"getTranslateXForTwoSlide",value:function(m){var f=this.state,C=f.currentIndex,M=f.currentSlideOffset,W=f.previousIndex,$=C!==W,ce=m===0&&W===0,le=m===1&&W===1,he=m===0&&C===1,V=m===1&&C===0,G=M===0,Q=-100*C+100*m+M;return M>0?this.direction="left":M<0&&(this.direction="right"),V&&M>0&&(Q=-100+M),he&&M<0&&(Q=100+M),$?ce&&G&&this.direction==="left"?Q=100:le&&G&&this.direction==="right"&&(Q=-100):(V&&G&&this.direction==="left"&&(Q=-100),he&&G&&this.direction==="right"&&(Q=100)),Q}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(m){var f=this.state,C=f.currentIndex,M=f.currentSlideOffset,W=f.slideStyle,$=this.props,ce=$.infinite,le=$.items,he=$.useTranslate3D,V=$.isRTL,G=-100*C,Q=le.length-1,ie=(G+100*m)*(V?-1:1)+M;ce&&le.length>2&&(C===0&&m===Q?ie=-100*(V?-1:1)+M:C===Q&&m===0&&(ie=100*(V?-1:1)+M)),ce&&le.length===2&&(ie=this.getTranslateXForTwoSlide(m));var pe="translate(".concat(ie,"%, 0)");return he&&(pe="translate3d(".concat(ie,"%, 0, 0)")),rn({display:this.isSlideVisible(m)?"inherit":"none",WebkitTransform:pe,MozTransform:pe,msTransform:pe,OTransform:pe,transform:pe},W)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var m,f=this.props,C=f.useTranslate3D,M=f.isRTL,W=this.state,$=W.thumbsTranslate,ce=W.thumbsStyle,le=M?-1*$:$;return this.isThumbnailVertical()?(m="translate(0, ".concat($,"px)"),C&&(m="translate3d(0, ".concat($,"px, 0)"))):(m="translate(".concat(le,"px, 0)"),C&&(m="translate3d(".concat(le,"px, 0, 0)"))),rn({WebkitTransform:m,MozTransform:m,msTransform:m,OTransform:m,transform:m},ce)}},{key:"getSlideItems",value:function(){var m=this,f=this.state.currentIndex,C=this.props,M=C.items,W=C.slideOnThumbnailOver,$=C.onClick,ce=C.lazyLoad,le=C.onTouchMove,he=C.onTouchEnd,V=C.onTouchStart,G=C.onMouseOver,Q=C.onMouseLeave,ie=C.renderItem,pe=C.renderThumbInner,ye=C.showThumbnails,_e=C.showBullets,at=[],et=[],Ke=[];return M.forEach(function(Ie,be){var Wt=m.getAlignmentClassName(be),Dn=Ie.originalClass?" ".concat(Ie.originalClass):"",Mn=Ie.thumbnailClass?" ".concat(Ie.thumbnailClass):"",Nt=Ie.renderItem||ie||m.renderItem,ln=Ie.renderThumbInner||pe||m.renderThumbInner,Tt=!ce||Wt||m.lazyLoaded[be];Tt&&ce&&!m.lazyLoaded[be]&&(m.lazyLoaded[be]=!0);var Sn=m.getSlideStyle(be),Fn=s().createElement("div",{"aria-label":"Go to Slide ".concat(be+1),key:"slide-".concat(be),tabIndex:"-1",className:"image-gallery-slide ".concat(Wt," ").concat(Dn),style:Sn,onClick:$,onKeyUp:m.handleSlideKeyUp,onTouchMove:le,onTouchEnd:he,onTouchStart:V,onMouseOver:G,onFocus:G,onMouseLeave:Q,role:"button"},Tt?Nt(Ie):s().createElement("div",{style:{height:"100%"}}));if(at.push(Fn),ye&&Ie.thumbnail){var Tn=v("image-gallery-thumbnail",Mn,{active:f===be});et.push(s().createElement("button",{key:"thumbnail-".concat(be),type:"button",tabIndex:"0","aria-pressed":f===be?"true":"false","aria-label":"Go to Slide ".concat(be+1),className:Tn,onMouseLeave:W?m.onThumbnailMouseLeave:null,onMouseOver:function(ct){return m.handleThumbnailMouseOver(ct,be)},onFocus:function(ct){return m.handleThumbnailMouseOver(ct,be)},onKeyUp:function(ct){return m.handleThumbnailKeyUp(ct,be)},onClick:function(ct){return m.onThumbnailClick(ct,be)}},ln(Ie)))}if(_e){var Bn=v("image-gallery-bullet",Ie.bulletClass,{active:f===be});Ke.push(s().createElement("button",{type:"button",key:"bullet-".concat(be),className:Bn,onClick:function(ct){return m.onBulletClick(ct,be)},"aria-pressed":f===be?"true":"false","aria-label":"Go to Slide ".concat(be+1)}))}}),{slides:at,thumbnails:et,bullets:Ke}}},{key:"ignoreIsTransitioning",value:function(){var m=this.props.items,f=this.state,C=f.previousIndex,M=f.currentIndex,W=m.length-1;return Math.abs(C-M)>1&&!(C===0&&M===W)&&!(C===W&&M===0)}},{key:"isFirstOrLastSlide",value:function(m){return m===this.props.items.length-1||m===0}},{key:"slideIsTransitioning",value:function(m){var f=this.state,C=f.isTransitioning,M=f.previousIndex,W=f.currentIndex;return C&&!(m===M||m===W)}},{key:"isSlideVisible",value:function(m){return!this.slideIsTransitioning(m)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(m)}},{key:"slideThumbnailBar",value:function(){var m=this.state,f=m.currentIndex,C=m.isSwipingThumbnail,M=-this.getThumbsTranslate(f);C||(f===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:M,thumbsSwipedTranslate:M}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){return this.props.infinite||this.canSlidePrevious()}},{key:"canSlideRight",value:function(){return this.props.infinite||this.canSlideNext()}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(m){var f=m.event,C=m.absX,M=m.dir,W=this.props,$=W.disableSwipe,ce=W.stopPropagation,le=this.state,he=le.galleryWidth,V=le.isTransitioning,G=le.swipingUpDown,Q=le.swipingLeftRight;if(M!==wt&&M!==it&&!G||Q){if(M!==Me&&M!==Ze||Q||this.setState({swipingLeftRight:!0}),!$){var ie=this.props.swipingTransitionDuration;if(ce&&f.preventDefault(),V)this.setState({currentSlideOffset:0});else{var pe=M===Ze?1:-1,ye=C/he*100;Math.abs(ye)>=100&&(ye=100);var _e={transition:"transform ".concat(ie,"ms ease-out")};this.setState({currentSlideOffset:pe*ye,slideStyle:_e})}}}else G||this.setState({swipingUpDown:!0})}},{key:"handleThumbnailSwiping",value:function(m){var f=m.event,C=m.absX,M=m.absY,W=m.dir,$=this.props,ce=$.stopPropagation,le=$.swipingThumbnailTransitionDuration,he=this.state,V=he.thumbsSwipedTranslate,G=he.thumbnailsWrapperHeight,Q=he.thumbnailsWrapperWidth,ie=he.swipingUpDown,pe=he.swipingLeftRight;if(this.isThumbnailVertical()){if((W===Me||W===Ze||pe)&&!ie)return void(pe||this.setState({swipingLeftRight:!0}));W!==wt&&W!==it||ie||this.setState({swipingUpDown:!0})}else{if((W===wt||W===it||ie)&&!pe)return void(ie||this.setState({swipingUpDown:!0}));W!==Me&&W!==Ze||pe||this.setState({swipingLeftRight:!0})}var ye,_e,at,et,Ke,Ie=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(ye=V+(W===it?M:-M),_e=Ie.scrollHeight-G+20,at=Math.abs(ye)>_e,et=ye>20,Ke=Ie.scrollHeight<=G):(ye=V+(W===Ze?C:-C),_e=Ie.scrollWidth-Q+20,at=Math.abs(ye)>_e,et=ye>20,Ke=Ie.scrollWidth<=Q),!Ke&&(W!==Me&&W!==wt||!at)&&(W!==Ze&&W!==it||!et)){ce&&f.stopPropagation();var be={transition:"transform ".concat(le,"ms ease-out")};this.setState({thumbsTranslate:ye,thumbsStyle:be})}}},{key:"handleOnThumbnailSwiped",value:function(){var m=this.state.thumbsTranslate,f=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:m,thumbsStyle:{transition:"all ".concat(f,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var m=this.state.currentSlideOffset,f=this.props.swipeThreshold;return Math.abs(m)>f}},{key:"resetSwipingDirection",value:function(){var m=this.state,f=m.swipingUpDown,C=m.swipingLeftRight;f&&this.setState({swipingUpDown:!1}),C&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(m){var f=m.event,C=m.dir,M=m.velocity,W=this.props,$=W.disableSwipe,ce=W.stopPropagation,le=W.flickThreshold;if(!$){var he=this.props.isRTL;ce&&f.stopPropagation(),this.resetSwipingDirection();var V=(C===Me?1:-1)*(he?-1:1),G=M>le&&!(C===wt||C===it);this.handleOnSwipedTo(V,G)}}},{key:"handleOnSwipedTo",value:function(m,f){var C=this.state,M=C.currentIndex,W=C.isTransitioning,$=M;!this.sufficientSwipe()&&!f||W||($+=m),(m===-1&&!this.canSlideLeft()||m===1&&!this.canSlideRight())&&($=M),this.unthrottledSlideToIndex($)}},{key:"handleTouchMove",value:function(m){this.state.swipingLeftRight&&m.preventDefault()}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(m){var f=this.props,C=f.disableKeyDown,M=f.useBrowserFullscreen,W=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!C)switch(parseInt(m.keyCode||m.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(m);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(m);break;case 27:W&&!M&&this.exitFullScreen()}}},{key:"handleImageError",value:function(m){var f=this.props.onErrorImageURL;f&&m.target.src.indexOf(f)===-1&&(m.target.src=f)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var m=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(m)))}},{key:"initSlideWrapperResizeObserver",value:function(m){var f=this;m&&!m.current||(this.resizeSlideWrapperObserver=new en(K(function(C){C&&C.forEach(function(M){f.setState({thumbnailsWrapperWidth:M.contentRect.width},f.handleResize)})},50)),this.resizeSlideWrapperObserver.observe(m.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(m){var f=this;m&&!m.current||(this.resizeThumbnailWrapperObserver=new en(K(function(C){C&&C.forEach(function(M){f.setState({thumbnailsWrapperHeight:M.contentRect.height},f.handleResize)})},50)),this.resizeThumbnailWrapperObserver.observe(m.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var m=this.props,f=m.onScreenChange,C=m.useBrowserFullscreen,M=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,W=this.imageGallery.current===M;f&&f(W),C&&this.setState({isFullscreen:W})}},{key:"slideToIndex",value:function(m,f){var C=this.state,M=C.currentIndex,W=C.isTransitioning,$=this.props,ce=$.items,le=$.slideDuration,he=$.onBeforeSlide;if(!W){f&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var V=ce.length-1,G=m;m<0?G=V:m>V&&(G=0),he&&G!==M&&he(G),this.setState({previousIndex:M,currentIndex:G,isTransitioning:G!==M,currentSlideOffset:0,slideStyle:{transition:"all ".concat(le,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(m){var f=this.props.isRTL;this.slideTo(m,f?"right":"left")}},{key:"slideRight",value:function(m){var f=this.props.isRTL;this.slideTo(m,f?"left":"right")}},{key:"slideTo",value:function(m,f){var C=this.state,M=C.currentIndex,W=C.isTransitioning,$=this.props.items,ce=M+(f==="left"?-1:1);W||($.length===2?this.slideToIndexWithStyleReset(ce,m):this.slideToIndex(ce,m))}},{key:"slideToIndexWithStyleReset",value:function(m,f){var C=this,M=this.state,W=M.currentIndex,$=M.currentSlideOffset;this.setState({currentSlideOffset:$+(W>m?.001:-.001),slideStyle:{transition:"none"}},function(){window.setTimeout(function(){return C.slideToIndex(m,f)},25)})}},{key:"handleThumbnailMouseOver",value:function(m,f){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(m,f)}},{key:"handleThumbnailKeyUp",value:function(m,f){Gi(m)&&this.onThumbnailClick(m,f)}},{key:"handleSlideKeyUp",value:function(m){Gi(m)&&(0,this.props.onClick)(m)}},{key:"isThumbnailVertical",value:function(){var m=this.props.thumbnailPosition;return m==="left"||m==="right"}},{key:"addScreenChangeEvent",value:function(){var m=this;er.forEach(function(f){document.addEventListener(f,m.handleScreenChange)})}},{key:"removeScreenChangeEvent",value:function(){var m=this;er.forEach(function(f){document.removeEventListener(f,m.handleScreenChange)})}},{key:"fullScreen",value:function(){var m=this.props.useBrowserFullscreen,f=this.imageGallery.current;m?f.requestFullscreen?f.requestFullscreen():f.msRequestFullscreen?f.msRequestFullscreen():f.mozRequestFullScreen?f.mozRequestFullScreen():f.webkitRequestFullscreen?f.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var m=this.state.isFullscreen,f=this.props.useBrowserFullscreen;m&&(f?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var m=this.props.infinite,f=this.state.currentIndex;m||this.canSlideRight()?this.slideToIndex(f+1):this.pause()}},{key:"play",value:function(){var m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],f=this.props,C=f.onPlay,M=f.slideInterval,W=f.slideDuration,$=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(M,W)),C&&m&&C($))}},{key:"pause",value:function(){var m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],f=this.props.onPause,C=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),f&&m&&f(C))}},{key:"isImageLoaded",value:function(m){return!!this.loadedImages[m.original]||(this.loadedImages[m.original]=!0,!1)}},{key:"handleImageLoaded",value:function(m,f){var C=this.props.onImageLoad;!this.loadedImages[f]&&C&&(this.loadedImages[f]=!0,C(m))}},{key:"renderItem",value:function(m){var f=this.state.isFullscreen,C=this.props.onImageError||this.handleImageError;return s().createElement(P,{description:m.description,fullscreen:m.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:f,onImageError:C,original:m.original,originalAlt:m.originalAlt,originalHeight:m.originalHeight,originalWidth:m.originalWidth,originalTitle:m.originalTitle,sizes:m.sizes,loading:m.loading,srcSet:m.srcSet})}},{key:"renderThumbInner",value:function(m){var f=this.props.onThumbnailError||this.handleImageError;return s().createElement("span",{className:"image-gallery-thumbnail-inner"},s().createElement("img",{className:"image-gallery-thumbnail-image",src:m.thumbnail,height:m.thumbnailHeight,width:m.thumbnailWidth,alt:m.thumbnailAlt,title:m.thumbnailTitle,loading:m.thumbnailLoading,onError:f}),m.thumbnailLabel&&s().createElement("div",{className:"image-gallery-thumbnail-label"},m.thumbnailLabel))}},{key:"render",value:function(){var m=this.state,f=m.currentIndex,C=m.isFullscreen,M=m.modalFullscreen,W=m.isPlaying,$=this.props,ce=$.additionalClass,le=$.disableThumbnailSwipe,he=$.indexSeparator,V=$.isRTL,G=$.items,Q=$.thumbnailPosition,ie=$.renderFullscreenButton,pe=$.renderCustomControls,ye=$.renderLeftNav,_e=$.renderRightNav,at=$.showBullets,et=$.showFullscreenButton,Ke=$.showIndex,Ie=$.showThumbnails,be=$.showNav,Wt=$.showPlayButton,Dn=$.renderPlayPauseButton,Mn=this.getThumbnailStyle(),Nt=this.getSlideItems(),ln=Nt.slides,Tt=Nt.thumbnails,Sn=Nt.bullets,Fn=v("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(Q),{"image-gallery-rtl":V}),Tn=s().createElement("div",{ref:this.imageGallerySlideWrapper,className:Fn},pe&&pe(),this.canSlide()?s().createElement(s().Fragment,null,be&&s().createElement(s().Fragment,null,ye(this.slideLeft,!this.canSlideLeft()),_e(this.slideRight,!this.canSlideRight())),s().createElement(Nn,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},s().createElement("div",{className:"image-gallery-slides"},ln))):s().createElement("div",{className:"image-gallery-slides"},ln),Wt&&Dn(this.togglePlay,W),at&&s().createElement("div",{className:"image-gallery-bullets"},s().createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},Sn)),et&&ie(this.toggleFullScreen,C),Ke&&s().createElement("div",{className:"image-gallery-index"},s().createElement("span",{className:"image-gallery-index-current"},f+1),s().createElement("span",{className:"image-gallery-index-separator"},he),s().createElement("span",{className:"image-gallery-index-total"},G.length))),Bn=v("image-gallery",ce,{"fullscreen-modal":M}),ct=v("image-gallery-content",this.getThumbnailPositionClassName(Q),{fullscreen:C}),ka=v("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(Q),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&V},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!le},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!le});return s().createElement("div",{ref:this.imageGallery,className:Bn,"aria-live":"polite"},s().createElement("div",{className:ct},(Q==="bottom"||Q==="right")&&Tn,Ie&&Tt.length>0?s().createElement(Nn,{className:ka,delta:0,onSwiping:!le&&this.handleThumbnailSwiping,onSwiped:!le&&this.handleOnThumbnailSwiped},s().createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},s().createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:Mn,"aria-label":"Thumbnail Navigation"},Tt))):null,(Q==="top"||Q==="left")&&Tn))}}],E&&En(p.prototype,E),Object.defineProperty(p,"prototype",{writable:!1}),me}(s().Component);Er.propTypes={flickThreshold:I.number,items:(0,I.arrayOf)((0,I.shape)({bulletClass:I.string,bulletOnClick:I.func,description:I.string,original:I.string,originalHeight:I.number,originalWidth:I.number,loading:I.string,thumbnailHeight:I.number,thumbnailWidth:I.number,thumbnailLoading:I.string,fullscreen:I.string,originalAlt:I.string,originalTitle:I.string,thumbnail:I.string,thumbnailAlt:I.string,thumbnailLabel:I.string,thumbnailTitle:I.string,originalClass:I.string,thumbnailClass:I.string,renderItem:I.func,renderThumbInner:I.func,imageSet:ja,srcSet:I.string,sizes:I.string})).isRequired,showNav:I.bool,autoPlay:I.bool,lazyLoad:I.bool,infinite:I.bool,showIndex:I.bool,showBullets:I.bool,showThumbnails:I.bool,showPlayButton:I.bool,showFullscreenButton:I.bool,disableThumbnailScroll:I.bool,disableKeyDown:I.bool,disableSwipe:I.bool,disableThumbnailSwipe:I.bool,useBrowserFullscreen:I.bool,onErrorImageURL:I.string,indexSeparator:I.string,thumbnailPosition:(0,I.oneOf)(["top","bottom","left","right"]),startIndex:I.number,slideDuration:I.number,slideInterval:I.number,slideOnThumbnailOver:I.bool,swipeThreshold:I.number,swipingTransitionDuration:I.number,swipingThumbnailTransitionDuration:I.number,onSlide:I.func,onBeforeSlide:I.func,onScreenChange:I.func,onPause:I.func,onPlay:I.func,onClick:I.func,onImageLoad:I.func,onImageError:I.func,onTouchMove:I.func,onTouchEnd:I.func,onTouchStart:I.func,onMouseOver:I.func,onMouseLeave:I.func,onBulletClick:I.func,onThumbnailError:I.func,onThumbnailClick:I.func,renderCustomControls:I.func,renderLeftNav:I.func,renderRightNav:I.func,renderPlayPauseButton:I.func,renderFullscreenButton:I.func,renderItem:I.func,renderThumbInner:I.func,stopPropagation:I.bool,additionalClass:I.string,useTranslate3D:I.bool,isRTL:I.bool,useWindowKeyDown:I.bool},Er.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onBulletClick:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,renderLeftNav:function(g,p){return s().createElement(Ln,{onClick:g,disabled:p})},renderRightNav:function(g,p){return s().createElement(ot,{onClick:g,disabled:p})},renderPlayPauseButton:function(g,p){return s().createElement(Ut,{onClick:g,isPlaying:p})},renderFullscreenButton:function(g,p){return s().createElement(He,{onClick:g,isFullscreen:p})},useWindowKeyDown:!0};const Oa=Er})(),d})())})(sa);var eh=sa.exports;const th=ti(eh);function nh(){var e=new Map;function t(n){var r=n.root,o=n.rootMargin,u=n.threshold,d=e.get(r);d||(d=new Map,e.set(r,d));var h=JSON.stringify({rootMargin:o,threshold:u}),v=d.get(h);if(!v){var x=new Map,s=new IntersectionObserver(function(a){a.forEach(function(k){var b=x.get(k.target);b==null||b(k)})},{root:r,rootMargin:o,threshold:u});v={observer:s,entryCallbacks:x},d.set(h,v)}return{observe:function(k,b){var S,R;(S=v)==null||S.entryCallbacks.set(k,b),(R=v)==null||R.observer.observe(k)},unobserve:function(k){var b,S;(b=v)==null||b.entryCallbacks.delete(k),(S=v)==null||S.observer.unobserve(k)}}}return{getObserver:t}}var rh="0px",ih=[0],oh=nh();function sh(e){var t,n,r=(t=e==null?void 0:e.rootMargin)!=null?t:rh,o=(n=e==null?void 0:e.threshold)!=null?n:ih,u=A.useRef(null),d=A.useRef(null),h=A.useRef(null),v=A.useState(),x=v[0],s=v[1],a=A.useCallback(function(){var R=u.current;if(!R){s(void 0);return}var N=oh.getObserver({root:d.current,rootMargin:r,threshold:o});N.observe(R,function(D){s(D)}),h.current=N},[r,o]),k=A.useCallback(function(){var R=h.current,N=u.current;N&&(R==null||R.unobserve(N)),h.current=null},[]),b=A.useCallback(function(R){k(),u.current=R,a()},[a,k]),S=A.useCallback(function(R){k(),d.current=R,a()},[a,k]);return[b,{entry:x,rootRef:S}]}function Xr(){return Xr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xr.apply(this,arguments)}function ah(e){var t,n=sh(e),r=n[0],o=n[1],u=!!((t=o.entry)!=null&&t.isIntersecting),d=A.useState(u),h=d[0],v=d[1];return u&&!h&&v(!0),[r,Xr({},o,{isVisible:u,wasEverVisible:h})]}var lh=100;function ch(e){var t=e.loading,n=e.hasNextPage,r=e.onLoadMore,o=e.rootMargin,u=e.disabled,d=e.delayInMs,h=d===void 0?lh:d,v=ah({rootMargin:o}),x=v[0],s=v[1],a=s.rootRef,k=s.isVisible,b=!u&&!t&&k&&n;return A.useEffect(function(){if(b){var S=setTimeout(function(){r()},h);return function(){clearTimeout(S)}}},[r,b,h]),[x,{rootRef:a}]}const uh={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>'},dh={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M18.333 2c1.96 0 3.56 1.537 3.662 3.472l.005.195v12.666c0 1.96-1.537 3.56-3.472 3.662l-.195.005H5.667a3.667 3.667 0 0 1-3.662-3.472L2 18.333V5.667c0-1.96 1.537-3.56 3.472-3.662L5.667 2h12.666zm-2.626 7.293a1 1 0 0 0-1.414 0L11 12.585l-1.293-1.292l-.094-.083a1 1 0 0 0-1.32 1.497l2 2l.094.083a1 1 0 0 0 1.32-.083l4-4l.083-.094a1 1 0 0 0-.083-1.32z"/></g>'};var Pr=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Lr(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function aa(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function la(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function hh(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,u=0;u<n.length;u++)r.indexOf(n[u])===-1&&(o=!1);return o}var Fi={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Pr?173:189,"=":Pr?61:187,";":Pr?59:186,"'":222,"[":219,"]":221,"\\":220},Kt={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Yr={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Ve={16:!1,18:!1,17:!1,91:!1},Ae={};for(var rr=1;rr<20;rr++)Fi["f".concat(rr)]=111+rr;var Re=[],ko=!1,ca="all",ua=[],wr=function(t){return Fi[t.toLowerCase()]||Kt[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function da(e){ca=e||"all"}function Xn(){return ca||"all"}function ph(){return Re.slice(0)}function fh(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function mh(e){return typeof e=="string"&&(e=wr(e)),Re.indexOf(e)!==-1}function gh(e,t){var n,r;e||(e=Xn());for(var o in Ae)if(Object.prototype.hasOwnProperty.call(Ae,o))for(n=Ae[o],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;Xn()===e&&da(t||"all")}function vh(e){var t=e.keyCode||e.which||e.charCode,n=Re.indexOf(t);if(n>=0&&Re.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Re.splice(0,Re.length),(t===93||t===224)&&(t=91),t in Ve){Ve[t]=!1;for(var r in Kt)Kt[r]===t&&(ht[r]=!1)}}function yh(e){if(typeof e>"u")Object.keys(Ae).forEach(function(d){return delete Ae[d]});else if(Array.isArray(e))e.forEach(function(d){d.key&&_r(d)});else if(typeof e=="object")e.key&&_r(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n[0],u=n[1];typeof o=="function"&&(u=o,o=""),_r({key:e,scope:o,method:u,splitKey:"+"})}}var _r=function(t){var n=t.key,r=t.scope,o=t.method,u=t.splitKey,d=u===void 0?"+":u,h=la(n);h.forEach(function(v){var x=v.split(d),s=x.length,a=x[s-1],k=a==="*"?"*":wr(a);if(Ae[k]){r||(r=Xn());var b=s>1?aa(Kt,x):[];Ae[k]=Ae[k].filter(function(S){var R=o?S.method===o:!0;return!(R&&S.scope===r&&hh(S.mods,b))})}})};function Ro(e,t,n,r){if(t.element===r){var o;if(t.scope===n||t.scope==="all"){o=t.mods.length>0;for(var u in Ve)Object.prototype.hasOwnProperty.call(Ve,u)&&(!Ve[u]&&t.mods.indexOf(+u)>-1||Ve[u]&&t.mods.indexOf(+u)===-1)&&(o=!1);(t.mods.length===0&&!Ve[16]&&!Ve[18]&&!Ve[17]&&!Ve[91]||o||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function Co(e,t){var n=Ae["*"],r=e.keyCode||e.which||e.charCode;if(ht.filter.call(this,e)){if((r===93||r===224)&&(r=91),Re.indexOf(r)===-1&&r!==229&&Re.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(S){var R=Yr[S];e[S]&&Re.indexOf(R)===-1?Re.push(R):!e[S]&&Re.indexOf(R)>-1?Re.splice(Re.indexOf(R),1):S==="metaKey"&&e[S]&&Re.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Re=Re.slice(Re.indexOf(R))))}),r in Ve){Ve[r]=!0;for(var o in Kt)Kt[o]===r&&(ht[o]=!0);if(!n)return}for(var u in Ve)Object.prototype.hasOwnProperty.call(Ve,u)&&(Ve[u]=e[Yr[u]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Re.indexOf(17)===-1&&Re.push(17),Re.indexOf(18)===-1&&Re.push(18),Ve[17]=!0,Ve[18]=!0);var d=Xn();if(n)for(var h=0;h<n.length;h++)n[h].scope===d&&(e.type==="keydown"&&n[h].keydown||e.type==="keyup"&&n[h].keyup)&&Ro(e,n[h],d,t);if(r in Ae){for(var v=0;v<Ae[r].length;v++)if((e.type==="keydown"&&Ae[r][v].keydown||e.type==="keyup"&&Ae[r][v].keyup)&&Ae[r][v].key){for(var x=Ae[r][v],s=x.splitKey,a=x.key.split(s),k=[],b=0;b<a.length;b++)k.push(wr(a[b]));k.sort().join("")===Re.sort().join("")&&Ro(e,x,d,t)}}}}function bh(e){return ua.indexOf(e)>-1}function ht(e,t,n){Re=[];var r=la(e),o=[],u="all",d=document,h=0,v=!1,x=!0,s="+",a=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(u=t.scope),t.element&&(d=t.element),t.keyup&&(v=t.keyup),t.keydown!==void 0&&(x=t.keydown),t.capture!==void 0&&(a=t.capture),typeof t.splitKey=="string"&&(s=t.splitKey)),typeof t=="string"&&(u=t);h<r.length;h++)e=r[h].split(s),o=[],e.length>1&&(o=aa(Kt,e)),e=e[e.length-1],e=e==="*"?"*":wr(e),e in Ae||(Ae[e]=[]),Ae[e].push({keyup:v,keydown:x,scope:u,mods:o,shortcut:r[h],method:n,key:r[h],splitKey:s,element:d});typeof d<"u"&&!bh(d)&&window&&(ua.push(d),Lr(d,"keydown",function(k){Co(k,d)},a),ko||(ko=!0,Lr(window,"focus",function(){Re=[]},a)),Lr(d,"keyup",function(k){Co(k,d),vh(k)},a))}function xh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Ae).forEach(function(n){var r=Ae[n].find(function(o){return o.scope===t&&o.shortcut===e});r&&r.method&&r.method()})}var Nr={setScope:da,getScope:Xn,deleteScope:gh,getPressedKeyCodes:ph,isPressed:mh,filter:fh,trigger:xh,unbind:yh,keyMap:Fi,modifier:Kt,modifierMap:Yr};for(var Ar in Nr)Object.prototype.hasOwnProperty.call(Nr,Ar)&&(ht[Ar]=Nr[Ar]);if(typeof window<"u"){var wh=window.hotkeys;ht.noConflict=function(e){return e&&window.hotkeys===ht&&(window.hotkeys=wh),ht},window.hotkeys=ht}ht.filter=function(){return!0};var ha=function(t,n){var r=t.target,o=r&&r.tagName;return!!(o&&n&&n.includes(o))},Eh=function(t){return ha(t,["INPUT","TEXTAREA","SELECT"])};function Sh(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var o=n||{},u=o.enableOnTags,d=o.filter,h=o.keyup,v=o.keydown,x=o.filterPreventDefault,s=x===void 0?!0:x,a=o.enabled,k=a===void 0?!0:a,b=o.enableOnContentEditable,S=b===void 0?!1:b,R=A.useRef(null),N=A.useCallback(function(D,X){var z,Y;return d&&!d(D)?!s:Eh(D)&&!ha(D,u)||(z=D.target)!=null&&z.isContentEditable&&!S?!0:R.current===null||document.activeElement===R.current||(Y=R.current)!=null&&Y.contains(document.activeElement)?(t(D,X),!0):!1},r?[R,u,d].concat(r):[R,u,d]);return A.useEffect(function(){if(!k){ht.unbind(e,N);return}return h&&v!==!0&&(n.keydown=!1),ht(e,n||{},N),function(){return ht.unbind(e,N)}},[N,e,k]),R}ht.isPressed;const pa=A.createContext({open:!1,toggleOpen:e=>{}});function Th({children:e}){const[t,n]=A.useState(!1),r=u=>{n(u??!u)},o=A.useMemo(()=>({open:t,toggleOpen:r}),[t]);return i.jsx(pa.Provider,{value:o,children:e})}function Bi(){return A.useContext(pa)}const mt={nameAsc:"title",nameDesc:"title",popularity:"stats.downloads",publishAt:"lastPublishedAt",mobilePageSize:10,pageSize:18,currentPage:1,defaultCurrentPage:1,blockletsPath:"/api/v2/blocklets.json",categoriesPath:"/api/blocklets/categories",explorePath:"/api/blocklets/explore",exploreDidsPath:"/api/blocklets/dids",cacheSize:100},jh=e=>Qn(async()=>{const{data:t}=await e.get(mt.categoriesPath);return Array.isArray(t)?t:[]},{manual:!0});function Oh(e,t){const n=e.menu?{sortBy:"popularity",sortDirection:"desc",showResources:"true",...Il(e,["sortBy","sortDirection","showResources"])}:{sortBy:"popularity",sortDirection:"desc",showResources:"true",...e,menu:void 0},{onFilterChange:r,onSearchSelect:o=h=>{t.onFilterChange({...n,keyword:h.title})},emptyCategory:u}=t;!n.category&&!u&&(n.category="All");const d=h=>{const v={...n,...h};r(Sr(v,x=>x===""||x===void 0))};return{filters:e,cleanFilter:h=>{const v=h?Sr(n,(x,s)=>h.includes(s)):{};r(Sr(v,x=>x===""||x===void 0))},handleActiveMenu:h=>{h!==e.menu&&r({menu:h})},handleSort:(h,v)=>{d({sortBy:h,sortDirection:v||h==="nameAsc"?"asc":"desc"})},handleKeyword:h=>{d({category:void 0,keyword:h||void 0})},handlePrice:h=>{d({price:h===e.price?void 0:h})},handleCategory:h=>{d({category:h===e.category?"":h})},handleDeveloper:h=>{d({owner:h||void 0})},handlePage:h=>{d({currentPage:h})},handleSwitchShowResources:h=>{d({showResources:h})},handleSearchSelect:h=>{o(h)}}}const kh=(e,t,n)=>e&&t||!n,fa=e=>[{name:e("sort.popularity"),value:"popularity"},{name:e("sort.lastPublished"),value:"publishAt"}],ma=(e,t,n)=>{var r,o;const u=Pl(e),d=Ll(u.search);if((r=_l(e,{strict:!0}))!=null&&r.endsWith(".gif"))return d.imageFilter?Nl({...u,search:""}):e;if(d.imageFilter)return e;const h=n||((o=window.blocklet)==null?void 0:o.version),{w:v,h:x}=typeof t=="object"?{w:t.w,h:t.h}:{w:t,h:t};return si(e,{...v||x?{imageFilter:"resize",w:v,h:x}:{},v:h})},Rh=e=>[{name:e("blocklet.free"),value:"free"},{name:e("blocklet.payment"),value:"payment"}],Ch=(e=[],t="en")=>e.map(n=>({name:n.locales[t]||n.locales.en,value:n._id})),Ih=(e,t)=>e==null?void 0:e.replace(/{(\w*)}/g,(n,r)=>t.hasOwnProperty(r)?t[r]:""),Ph=()=>window.innerWidth<=600,Lh={common:{title:"Blocklet Store",searchStore:"Search Blocklet",showResources:"Show extensions",price:"Price",category:"Category",categories:"Categories",resourceType:"Resource Type",clear:"Clear",cancel:"Cancel",search:"Search",fetchError:"Failed to fetch data, please try again later"},explore:{title:"Explore",trending:"Trending",topRated:"Top Rated",recentlyUpdated:"Recently Updated",viewDetail:"View Details"},sort:{sort:"Sort",rating:"Rating",popularity:"Most Popular",lastPublished:"Latest Published"},category:{all:"All",placeholder:"Category name",helperText:"Please select a category"},blocklet:{noResults:"No blocklet found.",free:"Free",search:'Results for "{keyword}"',authorTag:"Blocklet by {name}",resourceTag:"Extensions for {name}",resultCount:"{count} Blocklets",emptyTip:"Tips:",filterTip:"Appropriately reduce the filter conditions",keywordTip:"Try other keywords",owner:"Blocklets from {name}",noBlockletPart1:'No Blocklets associated with"',noBlockletPart2:'"were found',noCategoryResults1:'No "',noCategoryResults2:'" Blocklets'},autocomplete:{expandResult:'View all search results for "{name}"'}},_h={common:{title:"Blocklet 商店",searchStore:"搜索 Blocklet",showResources:"显示扩展",price:"价格",category:"类别",categories:"类别",resourceType:"资源类型",clear:"清除",cancel:"取消",search:"搜索",fetchError:"获取数据失败, 请稍后再试"},explore:{title:"探索",trending:"趋势",topRated:"评分最高",recentlyUpdated:"最近更新",viewDetail:"查看详情"},sort:{sort:"排序",rating:"评分",popularity:"最热门",lastPublished:"最新发布"},category:{all:"全部",placeholder:"分类名称",helperText:"请选择分类"},blocklet:{noResults:"未搜索到 Blocklet",free:"免费",search:'搜索 "{keyword}" 的结果',authorTag:"{name} 的 Blocklet",resourceTag:"{name} 的拓展",resultCount:"{count} 个 Blocklet",emptyTip:"建议:",filterTip:"适当减少筛选条件",keywordTip:"尝试其他关键字",owner:"来自 {name} 的 Blocklets",noBlockletPart1:'没有找到与"',noBlockletPart2:'"相关的 Blocklets',noCategoryResults1:'无 "',noCategoryResults2:'" 类别的 Blocklets'},autocomplete:{expandResult:"查看 “{name}” 的所有搜索结果"}},Dr={en:Qi(Lh),zh:Qi(_h)},ga=(e,t)=>{const n={};return e&&(n["x-blocklet-server-version"]=e),t&&(n["x-blocklet-store-version"]=t),n},Nh=e=>(t,n)=>{const r=Dr[e]?Dr[e][t]:Dr.en[t];return Ih(r,n)||t},va={errors:{fetchCategoriesError:null},loadings:{fetchCategoriesLoading:!1},endpoint:"",wrapChildren:()=>null,t:e=>e,storeVersion:"",minItemWidth:350,serverVersion:"",layout:{},selectedCategory:void 0,categoryList:[],blockletRender:()=>null,locale:"en",categoryOptions:[],priceOptions:[],storeApi:null,baseSearch:!1,showResourcesSwitch:!1,showCategory:!1,tagFilters:[],developerName:"",onFilterChange:()=>{},updateDeveloperName:()=>{},getCategoryLocale:()=>null,search:{filters:{},cleanFilter:()=>{},handleActiveMenu:()=>{},handleSort:()=>{},handleKeyword:()=>{},handlePrice:()=>{},handleCategory:()=>{},handleDeveloper:()=>{},handleSwitchShowResources:()=>{},handleSearchSelect:()=>{},handlePage:()=>{}}},ya=A.createContext(va),{Provider:Ah,Consumer:lf}=ya;function Dh(e){const{locale:t="zh",filters:n={},serverVersion:r="",onFilterChange:o=()=>{},minItemWidth:u=350,queryFilter:d=!0,layout:h={},wrapChildren:v=K=>K,extraFilter:x=K=>K,baseSearch:s=!1,fetchCategoryDelay:a=0,showResourcesSwitch:k=!1,showCategory:b=!0,tagFilters:S=[],children:R,storeVersion:N,onSearchSelect:D=()=>{},endpoint:X,blockletRender:z}=e,Y=ga(r,N),O=A.useMemo(()=>ns({baseURL:X,headers:Y}),[X]),q=Oh(n,{onFilterChange:o,emptyCategory:!h.showExplore,onSearchSelect:D}),[Z,B]=A.useState(""),{data:ue=[],error:J,loading:se,run:Se}=jh(O),De=A.useMemo(()=>{const K=Cl(ue,[oe=>oe.name],["asc"]),Te=K.findIndex(oe=>oe.name==="All"||oe.locales.en==="All");return Te>-1?[{...K[Te],_id:"All"},...K.slice(0,Te),...K.slice(Te+1)]:K},[ue]),Ue=A.useCallback(Nh(t),[t]),rt=A.useMemo(()=>Ch(De,t),[De,t]),ee=Rh(Ue),fe={search:q,errors:{fetchCategoriesError:J},loadings:{fetchCategoriesLoading:se},extraFilter:x,endpoint:X,queryFilter:d,layout:{showExplore:h.showExplore??!1,showCategory:h.showCategory??!0,showTitle:h.showTitle??!0,showSearch:h.showSearch??!0},minItemWidth:u,wrapChildren:v,t:Ue,storeVersion:N,serverVersion:r,selectedCategory:q.filters.category||(h.showExplore?"":"All"),categoryList:De,blockletRender:z,locale:t,categoryOptions:rt,priceOptions:ee,storeApi:O,baseSearch:s,showResourcesSwitch:k,showCategory:b,tagFilters:S,onFilterChange:o,getCategoryLocale:K=>{if(!K)return null;const Te=ue.find(oe=>oe._id===K||oe.locales.en==="All");return Te?Te.locales[t]||Te.locales.en:null},get developerName(){return Z},updateDeveloperName:B};return A.useEffect(()=>{setTimeout(Se,a||0)},[X,Se,a]),i.jsx(Ah,{value:fe,children:R})}function nt(){return A.useContext(ya)||va}function ba({children:e,onClick:t,size:n=32,...r}){return i.jsx(Jn,{...r,onClick:t,variant:"outlined",sx:[{minWidth:n,height:n,p:0,borderColor:"divider","&:hover":{borderColor:"divider"},borderRadius:2,color:"text.secondary"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:e})}function ir(e,t){return e===void 0?t:e}function $i({xs:e,sm:t,md:n,lg:r,xl:o,exact:u}){const d=Yn(),h=qt(d.breakpoints.down("sm")),v=qt(d.breakpoints.between("sm","md")),x=qt(d.breakpoints.between("md","lg")),s=qt(d.breakpoints.between("lg","xl"));if(u)return h?e||null:v?t||null:x?n||null:s?r||null:o||null;let a=e;return h||(a=ir(t,a),v)||(a=ir(n,a),x)||(a=ir(r,a),s)?a:ir(o,a)}function Mh({children:e}){const{open:t,toggleOpen:n}=Bi();return i.jsx($i,{xs:i.jsx(Ba,{open:t,onClose:()=>n(!1),children:e}),md:i.jsx(H,{children:e})})}const Fh=A.forwardRef(({loading:e,disabled:t,...n},r)=>i.jsx(Jn,{ref:r,disableElevation:!0,disabled:t||e,...n,sx:[{borderRadius:"4px"},...Array.isArray(n.sx)?n.sx:[n.sx]],startIcon:e&&i.jsx(gt,{size:"1em"})}));function xa({value:e,options:t,onChange:n,placeholder:r,...o}){var u;const d=A.useRef(null),h=Yn(),[v,x]=A.useState(!1),[s,a]=A.useState(e!==null?e:""),k=qt(h.breakpoints.down("sm"));A.useEffect(()=>{a(e!==null?e:"")},[e]);const b=A.useCallback(()=>{x(!1)},[]),S=A.useCallback(()=>{x(!0)},[]);function R(D){a(D.value),n(D.value),k&&b()}function N(D){return D===s}return i.jsxs(i.Fragment,{children:[i.jsxs(Bh,{ref:d,onClick:S,variant:"outlined",size:"medium",className:["my-select__selector",qn(s)?"":"my-select__selector--active"].join(" "),sx:{minWidth:"auto",color:"text.primary",borderRadius:"8px"},...o,children:[((u=t.find(D=>D.value===s))==null?void 0:u.name)||r,i.jsx($a,{className:"my-select__arrowdown",component:El,sx:{width:18,height:18}})]}),i.jsx(Ua,{open:v,anchorEl:d.current,transition:!0,sx:{zIndex:"9999"},children:({TransitionProps:D,placement:X})=>i.jsx(Wa,{...D,style:{transformOrigin:X==="bottom"?"center top":"center bottom"},children:i.jsx(za,{children:i.jsx(qa,{onClickAway:b,children:i.jsx($h,{autoFocusItem:v,onMouseEnter:S,onMouseLeave:b,children:t.map(z=>i.jsxs(ei,{onClick:()=>R(z),sx:{fontSize:14},children:[i.jsx(is,{sx:{mr:1,fontSize:16,visibility:N(z.value)?"visible":"hidden"}}),z.name]},z.value))})})})})})]})}const Bh=Vt(Fh)`
|
|
486
|
-
border: 1px solid #f0f0f0;
|
|
487
|
-
padding: 6px 8px 6px 12px;
|
|
488
|
-
font-weight: ${e=>e.theme.typography.fontWeightRegular};
|
|
489
|
-
font-size: 14px;
|
|
490
|
-
color: #666;
|
|
491
|
-
line-height: 1;
|
|
492
|
-
text-transform: none;
|
|
493
|
-
& + & {
|
|
494
|
-
margin-left: 10px;
|
|
495
|
-
}
|
|
496
|
-
&.my-select__selector--active {
|
|
497
|
-
&,
|
|
498
|
-
.my-select__arrowdown,
|
|
499
|
-
}
|
|
500
|
-
.my-select__arrowdown {
|
|
501
|
-
color: #999;
|
|
502
|
-
font-size: 14px;
|
|
503
|
-
margin-left: 6px;
|
|
504
|
-
}
|
|
505
|
-
.my-select__icon {
|
|
506
|
-
font-size: 0;
|
|
507
|
-
svg {
|
|
508
|
-
color: #999;
|
|
509
|
-
font-size: 18px;
|
|
510
|
-
margin-right: 3px;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
`,$h=Vt(Ho)`
|
|
514
|
-
.my-select__option__icon {
|
|
515
|
-
color: transparent;
|
|
516
|
-
font-size: 14px;
|
|
517
|
-
margin: 0 3px 0 -5px;
|
|
518
|
-
}
|
|
519
|
-
.my-select__option {
|
|
520
|
-
font-size: 14px;
|
|
521
|
-
color: #999;
|
|
522
|
-
}
|
|
523
|
-
.my-select__option--active {
|
|
524
|
-
&,
|
|
525
|
-
.my-select__option__icon {
|
|
526
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
`;function wa(){const{search:e,t}=nt(),{filters:n,handleSort:r,handlePrice:o}=e,u=fa(t);return i.jsxs(tt,{direction:{xs:"row",md:"column"},alignItems:{xs:"center",md:"flex-start"},gap:{xs:1,md:2},width:{xs:"100%",md:"auto"},justifyContent:"space-between",children:[i.jsx(Qr,{control:i.jsx(Zr,{checked:n.price==="free",size:"small",sx:{"& .MuiSvgIcon-fontSizeSmall":{fontSize:16,color:"text.lighter"}},onChange:d=>o(d.target.checked?"free":"")}),label:t("blocklet.free")}),i.jsx(xa,{value:n.sortBy||u[0].value,options:u,onChange:d=>r(d),placeholder:t("sort.sort")})]})}function Uh({menus:e}){const{selectedCategory:t,search:n,t:r,categoryOptions:o,loadings:u,layout:d,baseSearch:h}=nt(),{filters:v,handleActiveMenu:x,handleCategory:s,cleanFilter:a}=n,{toggleOpen:k}=Bi();A.useEffect(()=>{k(!1)},[Object.values(v).join("")]);const b=kh(h,d.showSearch,v.keyword);return d.showCategory?i.jsxs(Mh,{children:[i.jsx($i,{xs:i.jsxs(tt,{direction:"row",justifyContent:"space-between",alignItems:"center",p:2,mb:.5,gap:2,borderBottom:1,borderColor:"divider",children:[i.jsx(ba,{onClick:()=>k(!1),children:i.jsx(oi,{})}),i.jsx(ge,{flex:1,variant:"body1",fontWeight:"fontWeightMedium",children:r("common.category")})]}),md:null}),i.jsx(tt,{visibility:u.fetchCategoriesLoading?"hidden":"visible",width:{xs:268,md:200},boxSizing:"content-box",p:{xs:2,md:0},pr:{md:6},children:b?i.jsxs(i.Fragment,{children:[d.showExplore&&i.jsxs(H,{mb:3,pb:3,borderBottom:1,borderColor:"divider",children:[i.jsxs(H,{display:"flex",alignItems:"center",gap:1,children:[i.jsx(lt,{icon:Zd,width:20,height:20}),i.jsx(ge,{variant:"body1",color:!t&&!v.menu?"text.primary":"text.lighter",fontWeight:!t&&!v.menu?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{k(!1),a()},children:r("explore.title")})]}),e==null?void 0:e.map(S=>i.jsxs(H,{display:"flex",alignItems:"center",mt:2,gap:1,children:[typeof S.icon=="string"?i.jsx(lt,{icon:S.icon,width:20,height:20}):S.icon,i.jsx(ge,{variant:"body1",color:v.menu===S.key?"text.primary":"text.lighter",fontWeight:v.menu===S.key?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{var R;k(!1),x(S.key),(R=S.onClick)==null||R.call(S)},children:S.title})]},S.key))]}),!!o.length&&i.jsx(tt,{gap:2,children:o.map(S=>i.jsx(ge,{variant:"body1",title:S.name,sx:{cursor:"pointer"},"data-cy":"filter",color:t===S.value?"text.primary":"text.lighter",textTransform:"capitalize",onClick:()=>{t===S.value?a():s(S.value),k(!1)},children:S.name},S.value))})]}):i.jsx(wa,{})})]}):null}function Ui(){const{endpoint:e,serverVersion:t,storeVersion:n}=nt(),r=ga(t,n),o=A.useMemo(()=>ns({baseURL:e,headers:r}),[e]);return{get:async u=>{const{data:d}=await o.get(u);return d},post:async(u,d)=>{const{data:h}=await o.post(u,d);return h}}}const Ea=A.memo(function(e){return i.jsx(H,{height:60,display:"flex",alignItems:"center",justifyContent:"center",...e,children:i.jsx(gt,{})})});function Io({icon:e,children:t,maxWidth:n=100,title:r}){return(t===0||t)&&i.jsxs(tt,{direction:"row",alignItems:"center",gap:1,sx:{maxWidth:n,overflow:"hidden"},children:[e,i.jsx(ge,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:r||(typeof t=="string"?t:void 0),children:t})]})}const Wh=16/9,Mr=292,Jr=189,dr=336;function zh(){var e,t;const{t:n,search:r}=nt(),{get:o}=Ui(),u=Yn(),d=qt(u.breakpoints.down("md")),h=((t=(e=window.blocklet)==null?void 0:e.preferences)==null?void 0:t.homeBanner)||[],{data:v=[],error:x,loading:s}=Qn(async()=>{const D=await o(si(mt.blockletsPath,{didList:h.map(X=>X.did).join(",")}));return D!=null&&D.dataList?h.map(X=>D.dataList.find(z=>z.did===X.did)):[]});x&&console.error("Get Banner Blocklets error:",x);const a={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:100,cursor:"pointer",color:"text.lighter"};return!x&&h.length>0?i.jsxs(i.Fragment,{children:[i.jsx(ge,{component:"h2",variant:"h2",mt:{xs:2,md:0},mb:3,children:n("explore.title")}),i.jsx(H,{height:{xs:"auto",md:Mr},minHeight:Mr,position:"relative",border:1,borderColor:"divider",borderRadius:3,overflow:"hidden",children:s?i.jsxs(H,{p:5,display:{md:"flex"},gap:5,alignItems:"center",justifyContent:"center",children:[i.jsx(zt,{variant:"rounded",height:Jr,width:dr}),i.jsxs(H,{flex:1,height:"100%",children:[i.jsx(zt,{variant:"text",height:50,width:100}),i.jsx(zt,{variant:"text",height:40,width:"100%"}),i.jsx(zt,{variant:"text",height:40,width:300}),i.jsxs(H,{display:"flex",gap:1,my:2,children:[i.jsx(zt,{variant:"circular",height:20,width:20}),i.jsx(zt,{variant:"text",height:20,width:50})]}),i.jsx(zt,{variant:"rounded",height:30,width:100})]})]}):i.jsx(th,{showNav:!0,autoPlay:!0,slideDuration:d?500:1e3,slideInterval:5e3,showPlayButton:!1,showIndex:!1,showBullets:!1,showThumbnails:!1,showFullscreenButton:!1,renderLeftNav:D=>i.jsx(H,{onClick:D,sx:{display:{xs:"none",md:"block"}},children:i.jsx(uc,{sx:{...a,left:5}})}),renderRightNav:D=>i.jsx(H,{onClick:D,sx:{display:{xs:"none",md:"block"}},children:i.jsx(dc,{sx:{...a,right:5}})}),items:h.map((D,X)=>({original:D.did,renderItem:()=>{var z;const Y=v[X]||{},O=D.cover||Kh(D.did,(z=Y.screenshots)==null?void 0:z[0]),q=ma(O,u.breakpoints.values.md*2);return i.jsxs(tt,{height:{xs:"auto",md:Mr},sx:{cursor:"pointer","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url("${q}")`,backgroundSize:"cover",filter:"blur(50px)",opacity:.15,zIndex:0}},display:"flex",direction:{xs:"column",md:"row"},justifyContent:"center",alignItems:{xs:"flex-start",md:"center"},p:{xs:2,md:5},onClick:()=>r.handleSearchSelect(Y),gap:{xs:2,md:5},children:[k(q),i.jsxs(tt,{flex:1,height:"100%",gap:3,children:[i.jsxs(H,{flex:1,children:[b(D.name||Y.title||D.name),S(D.desc||Y.description)]}),Y.did&&R(Y,D.baseNum),N(Y)]})]})}}))})})]}):null;function k(D){return i.jsx(H,{borderRadius:2,overflow:"hidden",position:"relative",width:{xs:"100%",md:dr},children:i.jsx(Vh,{url:D})})}function b(D){return i.jsx(ge,{variant:"h2",width:"100%",children:D})}function S(D){return i.jsx(ge,{variant:"body2",color:"text.secondary",textAlign:"left",width:"100%",minHeight:70,maxHeight:70,pt:1,sx:{display:"-webkit-box",lineClamp:3,WebkitLineClamp:3,maxHeight:71,textWrap:"wrap",overflow:"hidden",WebkitBoxOrient:"vertical"},children:D})}function R(D,X=0){const{did:z,owner:Y,stats:O}=D;return i.jsxs(H,{display:"flex",alignItems:"center",gap:2,color:"text.secondary",children:[i.jsx(Io,{icon:i.jsx(cr,{src:Y.avatar,did:z,size:20,variant:"circle"}),children:Y.fullName}),i.jsx(Io,{icon:i.jsx(lt,{icon:oa}),title:`${O.downloads+X}`,children:qh(O.downloads+X)})]})}function N(D){return i.jsx(Jn,{variant:"outlined",size:"small",onClick:()=>r.handleSearchSelect(D),sx:{width:"fit-content",textTransform:"none",bgcolor:"white",borderRadius:"8px",borderColor:"divider","&:hover":{borderColor:"divider"}},children:n("explore.viewDetail")})}}const qh=e=>Number.isNaN(e)?0:e<1e3?e:e<1e6?`${(e/1e3).toFixed(1)}k`:e<1e9?`${(e/1e6).toFixed(1)}m`:`${(e/1e9).toFixed(1)}b`,Kh=(e,t)=>e&&t?`/assets/${e}/screenshots/${t}`:"";function Vh({url:e}){const[t,n]=A.useState(!0);return i.jsxs(i.Fragment,{children:[t&&i.jsx(zt,{variant:"rectangular",sx:{width:{xs:"100%",md:dr},height:{xs:"auto",md:Jr}}}),i.jsx(H,{display:t?"none":"block",component:"img",src:e,alt:"",width:{xs:"100%",md:dr},height:{xs:"auto",md:Jr},borderRadius:2,border:1,borderColor:"divider",sx:{objectFit:"container",cursor:"pointer",aspectRatio:Wh},onLoad:()=>n(!1),onError:()=>n(!1)})]})}function Gh({title:e,blocklets:t}){const{blockletRender:n,serverVersion:r}=nt();return i.jsxs(H,{mt:3,children:[i.jsx(ge,{component:"h3",variant:"h3",sx:{mb:2},children:e}),i.jsx(Hi,{container:!0,spacing:2,boxSizing:"border-box",maxWidth:"calc(100vw - 16px)",children:t.map(o=>i.jsx(Hi,{item:!0,xs:12,md:6,p:"2px","data-blocklet-did":o.did,children:i.jsx(H,{padding:"1px",children:n({blocklet:o,blocklets:t,serverVersion:r})})},o.did))})]})}function Hh(){const{get:e}=Ui(),{t}=nt(),{data:n=[],error:r,loading:o}=Qn(async()=>{const u=await e(mt.explorePath);return Array.isArray(u)?u:[]});return r?i.jsx(mr,{error:new Error(`Failed to fetch blocklets from ${mt.explorePath}`)}):o?i.jsx(Ea,{mt:15}):i.jsxs(i.Fragment,{children:[i.jsx(zh,{}),n.map(u=>{var d;return((d=u.blocklets)==null?void 0:d.length)>0?i.jsx(Gh,{title:t(`explore.${u.type}`),blocklets:u.blocklets},u.type):null})]})}const Fr="__FREE_TEXT__",Po="__NO_RESULT__",Br=40;function Xh({endpoint:e,t,locale:n,filters:r,handleKeyword:o,handleSearchSelect:u,...d}){const h=A.useRef(null),v=A.useRef(!1),[x,s]=A.useState(!1),[a,k]=A.useState(""),[b,S]=A.useState(!1),R=Ui(),[N,D]=A.useState(!1),X=(d==null?void 0:d.placeholder)||t("common.searchStore"),z=async ee=>{D(!0);const fe=await R.get(Gn(e,si(mt.blockletsPath,ee)));return D(!1),fe.dataList||[]},{data:Y,run:O}=Qn(ee=>ee?z({sortBy:mt.nameDesc,page:1,pageSize:10,keyword:ee,showResources:"true"}):Promise.resolve([]),{manual:!0});A.useEffect(()=>{D(!0),O(r.keyword),k(r.keyword||"")},[r.keyword,O]),Sh("ctrl + k, command + k",ee=>{var fe,K;return ee.stopPropagation(),ee.preventDefault(),(K=(fe=h.current)==null?void 0:fe.querySelector("input"))==null||K.focus(),!1},{enableOnTags:["INPUT"]});const q=cs(ee=>O(ee),{wait:300}),Z={name:Fr,title:a,did:""};let B=[];return a&&(N?B=[Z]:Y!=null&&Y.length?B=[Z,...Y]:B=[{name:Po,title:t("blocklet.noResults"),did:""}]),i.jsxs(i.Fragment,{children:[i.jsxs(Ka,{fullScreen:!0,open:b,sx:{display:{md:"none"}},children:[i.jsxs(H,{p:2,pb:0,display:"flex",alignItems:"center",gap:2,children:[i.jsx(Xo,{fullWidth:!0,sx:{bgcolor:"#F9FAFB",px:1,py:.5,".MuiInputBase-input":{p:1},".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},autoFocus:!0,placeholder:X,className:"bl-autocomplete-input",value:a,onChange:ee=>ue(ee.target.value),startAdornment:Ue(b),endAdornment:rt()}),i.jsx(Jn,{variant:"outlined",onClick:()=>{S(!1),k(r.keyword||"")},children:t("common.cancel")})]}),i.jsx(Ho,{sx:{p:.5},children:B.map(ee=>Se(ee))})]}),i.jsx(ar,{sx:{display:{sx:"block",md:"none"},fontSize:28,color:"text.lighter"},onClick:()=>S(!0)}),i.jsx(Uo,{ref:h,open:!!a&&x,size:"small",onOpen:()=>s(!0),onClose:(ee,fe)=>{s(!1),fe==="selectOption"&&!v.current&&o(a)},onKeyDown:ee=>{ee.key==="Enter"&&!a&&J()},disableClearable:!0,inputValue:a,onInputChange:(ee,fe)=>ue(fe),isOptionEqualToValue:(ee,fe)=>ee.name===fe.name,getOptionLabel:ee=>ee.title,getOptionKey:ee=>ee.name,noOptionsText:t("blocklet.noResults"),autoHighlight:!0,forcePopupIcon:!1,slotProps:{paper:{sx:{mt:.5,minWidth:"100%",width:"fit-content","& > ul":{p:.5}}}},renderInput:ee=>i.jsx(hr,{...ee,InputProps:{...ee.InputProps,autoFocus:!0,placeholder:X,className:"bl-autocomplete-input",value:a,startAdornment:Ue(x),endAdornment:rt()}}),filterOptions:ee=>ee,...d,options:B,renderOption:(ee,fe)=>Se(fe),value:Z,sx:[{bgcolor:"#F9FAFB",borderRadius:"8px",overflow:"hidden",".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},...Array.isArray(d.sx)?d.sx:[d.sx]]})]});function ue(ee){D(!0),k(ee),v.current=!1,q.run(ee)}function J(){S(!1),k(""),ue(""),o("")}function se(ee){ee!=null&&ee.did?(S(!1),v.current=!0,k(""),u(ee)):ee.name===Fr&&(S(!1),o(a))}function Se(ee){var fe,K;return i.jsxs(ei,{sx:{display:"flex",alignItems:"center",gap:1,p:1.5,borderRadius:"8px"},onClick:()=>se(ee),children:[De(ee),i.jsxs(ge,{variant:"body1",children:[i.jsx(ge,{fontWeight:"fontWeightMedium",display:"flex",alignItems:"center",gap:1,children:ee.title}),i.jsx(ge,{sx:{color:"text.lighter"},fontSize:"13px",children:((K=(fe=ee.category)==null?void 0:fe.locales)==null?void 0:K[n||"en"])||""})]})]},ee.did)}function De(ee){if([Fr,Po].includes(ee.name))return i.jsx(H,{width:Br,p:"6px",display:"flex",justifyContent:"center",alignItems:"center",color:"text.lighter",bgcolor:"#F1F3F5",borderRadius:"8px",children:i.jsx(ar,{sx:{fontSize:28}})});let fe="";return ee.logo&&(fe=Gn(e,"assets",ee.did,ma(ee.logo,Br,ee.version))),i.jsx(cr,{src:fe,size:Br,style:{borderRadius:"8px",overflow:"hidden"}})}function Ue(ee=!0){return i.jsx(H,{sx:{display:"flex",pl:.5,alignItems:"center",color:"text.lighter"},children:ee&&a&&N?i.jsx(gt,{color:"inherit",size:16}):i.jsx(ar,{sx:{fontSize:16,cursor:"default"}})})}function rt(){return a?i.jsx(H,{sx:{display:"flex",alignItems:"center",color:"text.lighter"},children:i.jsx(oi,{sx:{fontSize:20,cursor:"pointer"},onClick:()=>J()})}):null}}function Yh({placeholder:e="Type to search...",...t}){const{search:n}=nt(),{filters:r,handleKeyword:o}=n,[u,d]=A.useState(r.keyword||""),h=cs(o,{wait:300}),v=s=>{const{value:a}=s.target;d(a),h.run(a)},x=()=>{d(""),o("")};return A.useEffect(()=>{d(r.keyword||"")},[r.keyword]),i.jsx(Jh,{inputProps:{"data-cy":"search-blocklet"},startAdornment:i.jsx(Yi,{position:"start",children:i.jsx(Qh,{})}),onChange:v,placeholder:e,value:u,title:e,"data-cy":"search",endAdornment:u&&i.jsx(Yi,{position:"end",children:i.jsx(Zh,{"data-cy":"search-delete",onClick:x})}),...t})}const Jh=Vt(Xo)`
|
|
530
|
-
background-color: ${e=>e.theme.palette.grey[50]};
|
|
531
|
-
font-size: 14px;
|
|
532
|
-
border-radius: 6px;
|
|
533
|
-
width: 100%;
|
|
534
|
-
.MuiInputBase-input {
|
|
535
|
-
padding: 8px 0 8px 10px;
|
|
536
|
-
}
|
|
537
|
-
.MuiOutlinedInput-notchedOutline {
|
|
538
|
-
border: none;
|
|
539
|
-
}
|
|
540
|
-
.Mui-focused {
|
|
541
|
-
background-color: #f6f6f6;
|
|
542
|
-
.MuiInputBase-input::placeholder {
|
|
543
|
-
color: transparent;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
`,Qh=Vt(ar)`
|
|
547
|
-
color: ${e=>e.theme.palette.grey[500]};
|
|
548
|
-
font-size: 28px;
|
|
549
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
550
|
-
font-size: 24px;
|
|
551
|
-
}
|
|
552
|
-
`,Zh=Vt(oi)`
|
|
553
|
-
color: ${e=>e.theme.palette.grey[500]};
|
|
554
|
-
font-size: 16px;
|
|
555
|
-
cursor: pointer;
|
|
556
|
-
`;function ep(){const{search:e,t,endpoint:n,locale:r,getCategoryLocale:o,developerName:u,showResourcesSwitch:d,layout:h,baseSearch:v}=nt(),{filters:x,handleSort:s,handlePrice:a,handleDeveloper:k,handleSwitchShowResources:b,cleanFilter:S}=e,R=fa(t);return i.jsxs(tt,{className:"filter-bar",direction:{xs:"column",md:"row"},alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",gap:2,spacing:{xs:1,md:0},pt:{xs:2,md:0},px:0,pb:3,children:[i.jsx(ge,{variant:"h2",textTransform:"capitalize",children:o(x.category)}),i.jsxs(tt,{flex:1,direction:"row",alignItems:"center",width:"100%",justifyContent:{xs:"space-between",md:"flex-end"},gap:2,children:[h.showSearch?i.jsx(H,{flex:1,children:v?i.jsx(Yh,{}):i.jsx(Xh,{locale:r,endpoint:n,sx:{display:{md:"block",xs:"none"},flex:1,mr:1,width:"350px"},t,filters:e.filters,handleKeyword:e.handleKeyword,handleSearchSelect:e.handleSearchSelect})}):null,x.owner&&u&&i.jsx(Xi,{label:t("blocklet.authorTag",{name:u}),size:"small",onDelete:()=>k("")}),x.resourceDid&&x.resourceBlocklet&&i.jsx(Xi,{label:t("blocklet.resourceTag",{name:x.resourceBlocklet}),size:"small",onDelete:()=>S(["resourceDid","resourceBlocklet","showResources"])}),d?i.jsx(Lo,{checked:x.showResources!=="false",onChange:N=>b(N?"true":"false"),label:t("common.showResources")}):null,i.jsx(Lo,{checked:x.price==="free",onChange:N=>a(N?"free":""),label:t("blocklet.free")}),i.jsx(xa,{value:x.sortBy||R[0].value,options:R,placeholder:t("sort.sort"),onChange:N=>s(N)})]})]})}function Lo({checked:e,onChange:t,label:n}){return i.jsx(Qr,{sx:{m:0,p:0},className:"check-button",control:i.jsx(Zr,{checked:e,icon:i.jsx(lt,{style:{padding:0},icon:uh}),checkedIcon:i.jsx(lt,{style:{padding:0,color:"#3478E2"},icon:dh}),size:"large",sx:{p:0,mr:1},onChange:r=>t(r.target.checked)}),label:n})}function or({children:e}){return i.jsxs(H,{display:"flex",mt:2,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.lighter",children:[i.jsx(ol,{}),e]})}function _o(){const{t:e}=nt();return i.jsx(ge,{style:{textAlign:"center"},variant:"subtitle2",children:e("blocklet.noResults")})}function $r({filterTip:e,keywordTip:t}){const{t:n,locale:r}=nt(),o=()=>r==="zh"?"、":" , ";return i.jsxs(H,{mt:1,display:"flex",children:[i.jsx(ge,{style:{marginRight:"16px"},children:n("blocklet.emptyTip")}),e&&i.jsx(ge,{children:n("blocklet.filterTip")}),e&&t&&o(),t&&i.jsx(ge,{children:n("blocklet.keywordTip")})]})}function Ur({primaryStart:e,primaryEnd:t,filter:n}){return i.jsxs(ge,{variant:"subtitle2",display:"flex",gap:.5,mx:.5,children:[i.jsx(ge,{children:e}),i.jsx(ge,{color:"primary",children:n}),i.jsxs(ge,{children:[t," "]})]})}function tp(){const{t:e,search:t,getCategoryLocale:n,selectedCategory:r}=nt(),{filters:o}=t,u=!!r||!!o.price;if(o.keyword&&u)return i.jsxs(or,{children:[i.jsx(Ur,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:o.keyword}),i.jsx($r,{keywordTip:!0,filterTip:!0})]});if(o.keyword)return i.jsxs(or,{children:[i.jsx(Ur,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:o.keyword}),i.jsx($r,{keywordTip:!0})]});if(u){const d=n(r);return i.jsxs(or,{children:[d?i.jsx(Ur,{primaryStart:e("blocklet.noCategoryResults1"),primaryEnd:e("blocklet.noCategoryResults2"),filter:d}):i.jsx(_o,{}),i.jsx($r,{filterTip:!0})]})}return i.jsx(or,{children:i.jsx(_o,{})})}const np=(e,t,n,r)=>Xl(async o=>{o||(n.currentPage=n.defaultCurrentPage);const{currentPage:u,pageSize:d}=n,h={...t,category:t.category==="All"?"":t.category,sortBy:mt[t.sortBy],page:u,pageSize:d};r(null);const{data:v={}}=await e.get(mt.blockletsPath,{params:h});return n.currentPage++,{page:u,pageSize:d,list:(v==null?void 0:v.dataList)||[],total:(v==null?void 0:v.total)||0}},{isNoMore:o=>o?o.page*o.pageSize>=o.total:!1,reloadDeps:[e,sl(t)],onError:r});function rp(){var e;const{storeApi:t,search:n,extraFilter:r,errors:o,updateDeveloperName:u}=nt(),{filters:d}=n,h=Hl({currentPage:mt.currentPage,pageSize:Ph()?mt.mobilePageSize:mt.pageSize,defaultCurrentPage:mt.defaultCurrentPage}),[v,x]=A.useState(null),s=np(t,d,h,x),a=A.useMemo(()=>{var k,b;return r?r(((k=s.data)==null?void 0:k.list)||[]):((b=s.data)==null?void 0:b.list)||[]},[s.data,r]);return A.useEffect(()=>{const k=a.find(b=>b.owner.did===d.owner);u((k==null?void 0:k.owner.fullName)||(k==null?void 0:k.author.name)||"")},[d.owner,a,u]),{blocklets:a,fetchBlockletsError:v,loadMore:s.loadMore,hasNextPage:!s.noMore,total:((e=s.data)==null?void 0:e.total)||0,loadings:{fetchBlockletsLoading:s.loading,loadingMore:s.loadingMore},errors:{...o,fetchBlockletsError:v}}}function ip(){const{t:e,search:t,endpoint:n,blockletRender:r,serverVersion:o,minItemWidth:u,layout:d,baseSearch:h}=nt(),{filters:v}=t,{blocklets:x,errors:s,loadMore:a,loadings:k,hasNextPage:b,total:S}=rp(),[R]=ch({loading:k.fetchBlockletsLoading||k.loadingMore,hasNextPage:b,onLoadMore:a});if(s.fetchBlockletsError){const z=new Error(`Failed to fetch blocklets from ${n}: ${s.fetchBlockletsError.message}`);return i.jsx(mr,{error:z})}const N=h&&d.showSearch||!v.keyword;return i.jsxs(i.Fragment,{children:[N?i.jsx(ep,{}):i.jsxs(i.Fragment,{children:[i.jsx($i,{xs:i.jsx(wa,{}),md:null}),X()]}),D(),!k.fetchBlockletsLoading&&b&&i.jsx(H,{height:60,display:"flex",justifyContent:"center",py:2,ref:R,children:i.jsx(gt,{})})]});function D(){return k.fetchBlockletsLoading?i.jsx(Ea,{mt:15}):x.length?i.jsx(H,{className:"blocklet-list",display:"grid",gridTemplateColumns:{xs:"1fr",sm:`repeat(auto-fill, minmax(${u}px, 1fr))`},p:"2px",gap:2,children:x.map(z=>i.jsx(H,{"data-blocklet-did":z.did,minWidth:{xs:"100%",sm:u},maxWidth:"calc(100vw - 32px)",children:r({blocklet:z,blocklets:x,serverVersion:o})},z.did))}):i.jsx(tp,{})}function X(){return i.jsxs(tt,{direction:"row",className:"search-result-title",alignItems:"center",justifyContent:"space-between",mb:2,mt:{xs:2,md:0},children:[i.jsx(ge,{variant:"h3",children:e("blocklet.search",{keyword:v.keyword})}),i.jsx(ge,{variant:"body1",color:"text.lighter",fontSize:13,children:e("blocklet.resultCount",{count:S})})]})}}function op(){const{t:e,selectedCategory:t,getCategoryLocale:n}=nt(),{toggleOpen:r}=Bi();return i.jsxs(ge,{variant:"body1",display:{xs:"flex",md:"none"},alignItems:"center",gap:1,py:2,fontWeight:"fontWeightMedium",children:[i.jsx(ba,{onClick:()=>r(!0),children:i.jsx(wl,{})}),n(t)||e("common.category")]})}function sp({menus:e,children:t}){var n;const{search:r,layout:o}=nt(),{filters:u}=r,d=u.category||u.keyword||u.price,h=(n=e==null?void 0:e.find(v=>v.key===u.menu))==null?void 0:n.key;return i.jsx(Th,{children:i.jsxs(rs,{FallbackComponent:mr,children:[i.jsx(op,{}),i.jsxs(H,{display:"flex",height:"100%",className:"list-container",pt:{xs:0,md:5},children:[i.jsx(Uh,{menus:e}),i.jsxs(tt,{height:"100%",position:"relative",flex:1,overflow:"visible",children:[h&&(t==null?void 0:t(h)),!h&&(o.showExplore&&!d?i.jsx(Hh,{}):i.jsx(ip,{}))]})]})]})})}function ap(e){const{menus:t,children:n,...r}=e,o=Yn(),u=Vo(Rl({...o,typography:{h1:{fontSize:32,fontWeight:700,lineHeight:1.375,textAlign:"left"},h2:{fontSize:24,fontWeight:700,lineHeight:1.3333333,textAlign:"left"},h3:{fontSize:18,fontWeight:600,lineHeight:1.5,textAlign:"left"},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700}}));return i.jsx(Go,{theme:u,children:i.jsx(Dh,{...r,children:i.jsx(sp,{menus:t,children:n})})})}const lp={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M22 12.54c-1.804-.345-2.701-1.08-3.523-2.94c-.487.696-1.102 1.568-.92 2.4c.028.238-.32 1-.557 1H3c0 5.208 3.164 7 6.196 7c4.124.022 7.828-1.376 9.854-5c1.146-.101 2.296-1.505 2.95-2.46z"/><path d="M5 10h3v3H5zm3 0h3v3H8zm3 0h3v3h-3zM8 7h3v3H8zm3 0h3v3h-3zm0-3h3v3h-3zM4.571 18c1.5 0 2.047-.074 2.958-.78M10 16v.01"/></g>'},cp=lp;var Wi={},up=Fo;Object.defineProperty(Wi,"__esModule",{value:!0});var Sa=Wi.default=void 0,dp=up(Qo()),hp=i;Sa=Wi.default=(0,dp.default)((0,hp.jsx)("path",{d:"M16 18v2H8v-2zM11 7.99V16h2V7.99h3L12 4 8 7.99z"}),"Upgrade");const pp=(e,t)=>!t||!e?!0:zr.satisfies(zr.coerce(e),t);function zi({children:e,serverVersion:t="",requirementVersion:n="",...r}){const{t:o}=vt();return pp(t,n)?e:i.jsx(Ko,{title:o("store.tooltip.upgradeServer",{serverVersion:t,version:n}),arrow:!0,children:i.jsx(ge,{children:i.jsx(Jn,{disabled:!0,variant:"outlined",...r,children:o("common.upgradeServer")})})})}zi.propTypes={children:_.node.isRequired,serverVersion:_.string,requirementVersion:_.string};zi.defaultProps={serverVersion:"",requirementVersion:""};const zn=getComputedStyle(document.documentElement),fp=Vo({palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"},divider:zn.getPropertyValue("--stroke-sep").trim()||"#EFF1F5",text:{primary:zn.getPropertyValue("--foregrounds-fg-base").trim()||"#030712",secondary:zn.getPropertyValue("--foregrounds-fg-subtle").trim()||"#4b5563",lighter:zn.getPropertyValue("--foregrounds-fg-muted").trim()||"#9ca3af",link:zn.getPropertyValue("--foregrounds-fg-interactive").trim()||"#0086FF"}},typography:{fontSize:14,button:{textTransform:"none"},allVariants:{textTransform:"none"},h1:{fontSize:32,fontWeight:700,lineHeight:1.375,textAlign:"left"},h2:{fontSize:24,fontWeight:700,lineHeight:1.3333333,textAlign:"left"},h3:{fontSize:18,fontWeight:600,lineHeight:1.5,textAlign:"left"},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700},overrides:{MuiTableRow:{root:{"&:nth-child(even)":{backgroundColor:"rgba(0, 0, 0, 0.02)"}},head:{backgroundColor:"transparent"}}},breakpoints:{values:{xs:0,sm:600,md:960,lg:1280,xl:1920}}}),mp=(e,t)=>Gn(t,`/blocklets/${e.did}`),No=({blocklet:e,attribute:t,value:n})=>e._formatted?e._formatted[t]:n,gp=e=>e.inStore&&Mt.isFreeBlocklet(e)===!1;function qi({blocklet:e,blocklets:t,handleButtonClick:n,endpoint:r,serverVersion:o}){var D,X;const{t:u}=vt();let d=Gn(r,ml(e.did,e.logo||""));try{const z=new URL(d);z.searchParams.set("v",e.version||+new Date),d=z.href}catch{}const[h,v]=A.useState(!1),x=z=>z.currentTarget.contains(z.target)?!0:(z.preventDefault(),!1),s=async z=>{z.preventDefault(),z.stopPropagation();try{v(!0),await n({meta:e,registryUrl:r,blocklets:t})}catch(Y){ii.error(Y.message)}finally{v(!1)}},{blocklet:a}=fr(),k=()=>((a==null?void 0:a.children)||[]).find(O=>O.meta.bundleDid===e.did).meta.version,S=(()=>{const z=((a==null?void 0:a.children)||[]).find(Y=>Y.meta.bundleDid===e.did);if(z){try{const Y=z.meta.version,O=e.version;if(zr.gt(O,Y))return"upgrade"}catch{return"install"}return"disable"}return"install"})();let R=u("blocklet.component.choose");S==="upgrade"?R=u("blocklet.component.upgrade"):S==="disable"?R=u("blocklet.component.installed"):gp(e)&&(R=u("common.purchase"));const N=(D=e.requirements)==null?void 0:D.server;return i.jsx(Va,{href:mp(e,r),style:{color:"initial",textDecoration:"none"},onClick:x,target:"_blank",children:i.jsx(vp,{title:No({blocklet:e,attribute:"title",value:e.title||e.name}),did:e.did,description:No({blocklet:e,attribute:"description",value:e.description}),cover:e.logo?d:"",version:e.version,onButtonClick:null,icons:(X=e.docker)!=null&&X.image?[{key:"docker",icon:i.jsx(H,{display:"flex",color:"primary.main",children:i.jsx(lt,{icon:cp})}),title:u("blocklet.dockerImage")}]:[],button:i.jsx(zi,{serverVersion:o,requirementVersion:N,size:"small",children:i.jsx("div",{style:{display:"flex",alignItems:"center"},children:i.jsx(Yd,{children:i.jsxs(dt,{onClick:s,size:"small",disabled:h||S==="disable",variant:"outlined",color:"primary","data-cy":"install-blocklet",title:S==="upgrade"?`${k()} -> ${e.version}`:"",children:[h?i.jsxs(i.Fragment,{children:[i.jsx(gt,{size:16,style:{marginRight:3}}),R]}):R,S==="upgrade"?i.jsx(Sa,{style:{fontSize:"1.2rem"}}):null]},e.did)})})})})})}qi.propTypes={blocklet:_.object.isRequired,blocklets:_.array,handleButtonClick:_.func,endpoint:_.string,serverVersion:_.string};qi.defaultProps={handleButtonClick:null,endpoint:"",blocklets:[],serverVersion:""};function Ki({handleButtonClick:e,handleSearchSelect:t,storeUrl:n,handleBlockletRender:r,extraFilter:o,serverVersion:u,resourceType:d,resourceDid:h,showResourcesSwitch:v,showCategory:x,...s}){const{locale:a}=vt(),[k,b]=A.useState(!1),[S,R]=A.useState({}),N=X=>{R(X)},D=n;return A.useEffect(()=>{R({showResources:!0,resourceType:d,resourceDid:h})},[D,d,h]),A.useEffect(()=>{b(!0),R({showResources:!0,resourceType:d,resourceDid:h})},[]),i.jsx(Go,{theme:fp,children:i.jsx(rs,{FallbackComponent:mr,resetKeys:[D],children:i.jsxs(H,{...s,sx:[{overflow:"auto",".title-bar + div":{height:"unset"}},Array.isArray(s.sx)?s.sx:[s.sx]],children:[k&&i.jsx(ap,{showCategory:x,showResourcesSwitch:v,blockletRender:X=>{const z={...X,handleButtonClick:e,endpoint:D};return r({...X,defaultRender:i.jsx(qi,{...z})})},baseSearch:!0,endpoint:D,locale:a,onFilterChange:N,onSearchSelect:t,filters:S,extraFilter:o,serverVersion:u,fetchCategoryDelay:500}),i.jsx(H,{sx:{mt:2},children:" "})]})})})}Ki.propTypes={storeUrl:_.string.isRequired,handleButtonClick:_.func,handleSearchSelect:_.func,handleBlockletRender:_.func,extraFilter:_.func,serverVersion:_.string,resourceType:_.string,resourceDid:_.string,showResourcesSwitch:_.bool,showCategory:_.bool};Ki.defaultProps={handleButtonClick:null,handleSearchSelect:null,handleBlockletRender:null,extraFilter:void 0,serverVersion:"",resourceType:"",resourceDid:"",showResourcesSwitch:!0,showCategory:!0};const vp=Ge(Qd)`
|
|
557
|
-
.ms-highlight {
|
|
558
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
559
|
-
}
|
|
560
|
-
`,Vi=A.forwardRef(({meta:e,isMobile:t,onStepChange:n},r)=>{const{steps:o,activeStep:u,setActiveStepByKey:d,setActiveStepByIndex:h}=Sl(),{t:v,locale:x}=vt(),s=o[u];return A.useEffect(()=>{n(u)},[n,u]),A.useImperativeHandle(r,()=>({setActiveStepByKey:d,setActiveStepByIndex:h})),i.jsx(bp,{component:"div",className:t?"mobileStyle":"",sx:{height:"calc(100% - 56px)","&>div>div>div:first-child":{flex:{md:1}}},children:i.jsx(Tl,{locale:x,blockletMeta:{title:" ",...e},pcWidth:"100%",pcHeight:"100%",logoUrl:e&&e.logo&&e.registryUrl?gl({did:e.did,version:e.version,baseUrl:e.registryUrl,logoPath:e.logo}):null,stepTip:v("blocklet.component.add"),children:i.jsx(yp,{children:typeof(s==null?void 0:s.body)=="function"?s.body():s==null?void 0:s.body})})})});Vi.propTypes={meta:_.any,onStepChange:_.func.isRequired,isMobile:_.bool.isRequired};Vi.defaultProps={meta:null};const Ao=e=>e.isMobile?`
|
|
561
|
-
height: calc(100vh - 56px - 64px - 48px);
|
|
562
|
-
`:"",yp=Ge.div`
|
|
563
|
-
width: 100%;
|
|
564
|
-
height: 100%;
|
|
565
|
-
display: flex;
|
|
566
|
-
flex-direction: column;
|
|
567
|
-
justify-content: flex-start;
|
|
568
|
-
align-items: flex-start;
|
|
569
|
-
|
|
570
|
-
.bottom-button {
|
|
571
|
-
min-width: 200px;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
// blocklet-select-side
|
|
575
|
-
aside {
|
|
576
|
-
width: 140px;
|
|
577
|
-
}
|
|
578
|
-
`,bp=Ge(H)`
|
|
579
|
-
${({className:e})=>e==="mobileStyle"?`
|
|
580
|
-
& > div{
|
|
581
|
-
height: 100%;
|
|
582
|
-
}
|
|
583
|
-
.root-header {
|
|
584
|
-
.app-name-content {
|
|
585
|
-
display: none;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
// content-panel
|
|
590
|
-
.root-header + div{
|
|
591
|
-
padding-top: 0;
|
|
592
|
-
position: relative;
|
|
593
|
-
& > div {
|
|
594
|
-
padding-top: 0;
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
header + div {
|
|
599
|
-
padding-top: 0;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
header {
|
|
603
|
-
.header-title {
|
|
604
|
-
margin-left: 0;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
.header-title-name {
|
|
608
|
-
max-width: 100% !important;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
.app-content {
|
|
612
|
-
padding: 0!important;
|
|
613
|
-
}
|
|
614
|
-
`:`
|
|
615
|
-
position: relative;
|
|
616
|
-
.ll-container { // 通过 Launcher Layout 组件约定的 .ll-container class 自定义 Layout 样式
|
|
617
|
-
width: 100%;
|
|
618
|
-
height: 100%;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
.root-header {
|
|
622
|
-
z-index: auto !important;
|
|
623
|
-
position: fixed !important;
|
|
624
|
-
}
|
|
625
|
-
& > div {
|
|
626
|
-
height: 100%;
|
|
627
|
-
width: 100%;
|
|
628
|
-
max-width: 100%;
|
|
629
|
-
& > div {
|
|
630
|
-
max-height: unset !important;
|
|
631
|
-
max-width: 100%;
|
|
632
|
-
& > div {
|
|
633
|
-
// left-panel
|
|
634
|
-
&:first-child {
|
|
635
|
-
padding: 0;
|
|
636
|
-
width: 20%;
|
|
637
|
-
min-width: 180px;
|
|
638
|
-
|
|
639
|
-
& > div:first-child {
|
|
640
|
-
display: none;
|
|
641
|
-
}
|
|
642
|
-
// step
|
|
643
|
-
& > div:last-child {
|
|
644
|
-
// margin-top: 32px;
|
|
645
|
-
margin-top: 0;
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
// right-panel
|
|
649
|
-
&:last-child {
|
|
650
|
-
padding-top: 0;
|
|
651
|
-
padding-right: 0px;
|
|
652
|
-
overflow-y: hidden;
|
|
653
|
-
.app-content {
|
|
654
|
-
padding: 0 0 24px 0;
|
|
655
|
-
}
|
|
656
|
-
.button-container {
|
|
657
|
-
padding-right: 0;
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
`}
|
|
665
|
-
|
|
666
|
-
& .app-overview {
|
|
667
|
-
margin-left: 0 !important;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
& .flex-justify-center {
|
|
671
|
-
display: flex;
|
|
672
|
-
justify-content: center;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
& .flex-align-center {
|
|
676
|
-
display: flex;
|
|
677
|
-
height: 100%;
|
|
678
|
-
align-items: center;
|
|
679
|
-
${e=>Ao(e)}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
& .agreement-wrapper {
|
|
683
|
-
${e=>Ao(e)}
|
|
684
|
-
max-height: 60vh;
|
|
685
|
-
.eula-trigger {
|
|
686
|
-
padding-right: 0;
|
|
687
|
-
}
|
|
688
|
-
.next-button {
|
|
689
|
-
display: none;
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
& .connect {
|
|
694
|
-
background: white;
|
|
695
|
-
}
|
|
696
|
-
`,xp=Vi,wp=e=>e.inStore&&Mt.isFreeBlocklet(e)===!1,Ep=e=>{var t;return[Ot.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED,Ot.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP].includes((t=e==null?void 0:e.capabilities)==null?void 0:t.didSpace)},Wr=e=>{var t,n;return((n=(t=e==null?void 0:e.configs)==null?void 0:t.find(r=>r.key===Ot.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT))==null?void 0:n.value)||null},Sp=e=>(e.environments||[]).some(t=>t.required),Do=(e,t)=>e==null?void 0:e.some(n=>n.required&&!t[n.key]),Tp=({params:e,blocklet:t,t:n})=>{const r=e.title||e.name;return r?((t==null?void 0:t.children)||[]).find(u=>u.meta.bundleDid===e.bundleDid)?n("blocklet.component.upgradeNext",{name:r}):n("blocklet.component.addNext",{name:r}):n("common.next")},Mo=({componentDid:e,timeout:t=1e3,manual:n=!1}={})=>{setTimeout(()=>{window.parent.postMessage({event:"component.installed",componentDid:e,manual:n},"*")},t)};function Ta({onClose:e,mode:t,stores:n,resourceType:r,resourceDid:o,storageKey:u,inDialog:d,selectedMeta:h,storeUrl:v,showResourcesSwitch:x,showFromUrl:s,enableRunBackground:a,showCategory:k}){var tn,yn,I,St,It,nn,l,y,w,P;const{t:b,locale:S}=vt(),[R,N]=A.useState(!1),[D,X]=A.useState(null),[z,Y]=A.useState(""),[O,q]=A.useState(""),{api:Z,ws:{useSubscription:B},inService:ue,info:J}=Cn(),{blocklet:se,actions:{refreshBlocklet:Se}}=fr(),[De,Ue]=A.useState(null),[rt,ee]=A.useState(!1),fe={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceIsRequiredSetup:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},[K,Te]=A.useState(fe),[oe,pt]=A.useState(0),xe=A.useRef({}),Ye=A.useRef({}),ze=A.useRef({}),Rt=qt(j=>j.breakpoints.down("md")),Gt=Ya(),[Ft,Ht]=A.useState(!0),{meta:Pe}=xe.current,Le=fs(Pe),Je=A.useRef(!1),de=j=>Te(L=>({...L,...j}));A.useEffect(()=>{if(K.pathPrefix){const{errMsg:j}=en({...K,pathPrefix:K.pathPrefix,locale:S});Y(j)}},[K.pathPrefix]),A.useEffect(()=>{oe===0&&Te(fe)},[oe]);const Xt=()=>{const j=Wr(se)??"";de({didSpaceEndpoint:j})},Yt=()=>{var j;return(j=xe==null?void 0:xe.current)!=null&&j.meta?Mt.getDisplayName(xe.current):""},Jt=()=>{N(!1),Te({}),Je.current=!1,xe.current={},e()},Oe=j=>{const L=F=>{de({installResultProps:{variant:"error",title:Yt(),subTitle:j,footer:i.jsx(dt,{className:"bottom-button",disabled:F,"data-cy":"retry-install-component",onClick:async()=>{L(!0),await Zt(xe.current.installInput)},children:i.jsxs(H,{display:"flex",alignItems:"center",children:[F&&i.jsx(gt,{size:16,style:{marginRight:8}}),b("common.retry")]})})}})};L()},Bt=j=>L=>{var F,ne;(((F=L==null?void 0:L.meta)==null?void 0:F.did)||(L==null?void 0:L.meta))===((ne=se==null?void 0:se.meta)==null?void 0:ne.did)&&j(L)},Pn=()=>{Mo({timeout:0,componentDid:Gt.componentDid,manual:!0}),Jt(),setTimeout(()=>{const j=document.getElementsByClassName("dashboard-main")[0];j&&(j.scrollTop=j.scrollHeight)},200)};B(Ot.BlockletEvents.componentInstalled,Bt(()=>{de({installResultProps:{variant:"success",title:Yt(),subTitle:b("blocklet.component.installSuccessTip")}}),Mo({componentDid:Gt.componentDid})}),[(tn=se==null?void 0:se.meta)==null?void 0:tn.did]),B(Ot.BlockletEvents.statusChange,Bt(()=>{const j=Wr(se);de(L=>({...L,didSpaceEndpoint:j}))}),[(yn=se==null?void 0:se.meta)==null?void 0:yn.did]),B(Ot.BlockletEvents.downloadFailed,Bt(()=>{Je.current=!1,Oe(b("blocklet.component.installComponentError"))}),[(I=se==null?void 0:se.meta)==null?void 0:I.did]),B(Ot.BlockletEvents.installFailed,Bt(()=>{Je.current=!1,Oe(b("blocklet.component.installComponentError"))}),[(St=se==null?void 0:se.meta)==null?void 0:St.did]);const Qe=[],Qt=j=>((se==null?void 0:se.children)||[]).find(L=>L.meta.did===j),Zt=async j=>{var Ut,ft;Je.current=!0;const{pathPrefix:L,bundleDid:F,title:ne,componentName:ae="",componentDid:Fe=""}=K,Ne=((Ut=xe.current)==null?void 0:Ut.meta)||{},{configs:we=[],registryUrl:je,inStore:He,inputUrl:Pt,dist:Ln}=Ne,Lt=(ft=xe.current)==null?void 0:ft.downloadTokenList,ot=Pt||(He?Zi(je,F,Ln):"");N(!0);const $t={rootDid:se.meta.did,url:ot,mountPoint:L?tr(L):`/${tr(Ne.title||Ne.name)}`,title:ne,name:ae,did:Fe,onlyRequired:!Ft,...K.hasEnvironmentsStep&&we.length>0?{configs:we.map(st=>({...st,value:K.configsValue[st.key]||""}))}:{},...Lt?{downloadTokenList:Lt}:{},...j};try{if(await Z.installComponent({input:$t}),je){const{teamDid:st,storeList:_t}=os({fromBlocklet:ue,nodeInfo:J,blocklet:se}),{isNew:bn,decoded:xn}=bl(je,_t);bn&&await Z.addBlockletStore({input:{teamDid:st,url:xn}})}de({installResultProps:{}}),Se({showError:!1,attachRuntimeInfo:!1})}catch(st){const _t=ds(st);ii.error(_t),console.error("installComponent error: ",st),Oe(_t)}finally{N(!1),xe.current.installInput=$t}},en=j=>{const L=rc({params:{...j,did:j.bundleDid},blocklets:[se],blocklet:se,locale:S});if(L){const F=Qt(j.bundleDid),ne=ic({params:{...j,did:j.bundleDid},blocklet:se});if(F&&F.mountPoint===ne)return{errMsg:""}}return{errMsg:L}},Me=async j=>{var F,ne;const{errMsg:L}=en({...K,locale:S});Y(L),oe===Qe.length-2&&!Je.current&&await Zt(j),(ne=(F=Ye.current)==null?void 0:F.setActiveStepByIndex)==null||ne.call(F,ae=>ae+1)},Ze=()=>{var j,L;(L=(j=Ye.current)==null?void 0:j.setActiveStepByIndex)==null||L.call(j,F=>F-1)},wt=()=>{const{pathPrefix:j,bundleDid:L,title:F,componentName:ne="",componentDid:ae=""}=K,{meta:Fe={}}=xe.current||{},{registryUrl:Ne,inStore:we,inputUrl:je,dist:He}=Fe,Pt=we?Zi(Ne,L,He):je;Ue({meta:Fe,installOpts:{type:"component",rootDid:se.meta.did,mountPoint:j,url:Pt,title:F,name:ne,did:ae}})},it=j=>{ee(!1),de({purchaseResultProps:{variant:"error",title:Yt(),subTitle:j,style:{paddingTop:120},footer:i.jsx(dt,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{de({purchaseResultProps:{}})},children:b("common.retry")})}})},Et=({downloadTokenList:j})=>{xe.current.downloadTokenList=j,ee(!1),Me()},Ct=({chooseParams:j=xe.current,componentDid:L,isInit:F=!1})=>{var xn,Zn,_n,Nn;const{meta:ne,registryUrl:ae,inStore:Fe,inputUrl:Ne}=j,{did:we,title:je,name:He}=ne,Pt=(((xn=se.settings)==null?void 0:xn.children)||[]).filter(Be=>Be.status==="deleted"&&Be.meta.bundleDid===we),Ln=L||"",Lt=(Zn=ne.environments)==null?void 0:Zn.map(Be=>{const{name:wn,validation:rn,...En}=Be,on={validation:Dl(rn)?"":rn};return{...En,key:wn,...on}});xe.current={...j,meta:{...ne,configs:Lt,registryUrl:ae,inStore:Fe,inputUrl:Ne}};let ot={};if(F){const Be=[se],wn=Lt||[],rn=[],En=as(Al([...wn,...rn]),"key").filter(yt=>!!yt.key).sort((yt,sn)=>yt.required&&!sn.required?-1:sn.required&&!yt.required?1:0),on=Mt.getSharedConfigObj(Be[0],{configs:En}),An={},ke=En.map(yt=>{const{default:sn,key:an,...er}=yt;return An[an]=on[an]||sn,{...er,key:an,hidden:!!Ot.BLOCKLET_CONFIGURABLE_KEY[an]}});ot={...ot,configsList:ke,configsValue:An,hasMissRequiredConfigs:Do(ke,An)}}const $t=se.children.some(Be=>Be.mountPoint==="/"),Ut=Pt.find(Be=>Be.meta.bundleDid===we),ft=se.children.find(Be=>Be.meta.bundleDid===we);ot.title=je||"",Ut?ot={...ot,pathPrefix:Ut.mountPoint||"",componentName:Ut.meta.name,hasEnvironmentsStep:!1}:ft?ot={...ot,pathPrefix:ft.mountPoint||"",componentName:ft.meta.name,hasEnvironmentsStep:!1}:ot={...ot,pathPrefix:$t?`/${tr(je)||tr(He)}`.toLowerCase():"/",componentName:"",hasEnvironmentsStep:((Nn=(_n=xe.current.meta)==null?void 0:_n.environments)==null?void 0:Nn.length)>0};const st=wp(xe.current.meta),_t=Ep(xe.current.meta),bn=Wr(se);de({bundleDid:we,componentDid:Ln,...ot,hasRequiredEnvironments:Sp(xe.current.meta),requirePurchase:st,didSpaceIsRequiredSetup:_t,didSpaceEndpoint:bn}),F&&st&&wt()};A.useEffect(()=>{!h||oe!==0||!se||(Ct({chooseParams:{blocklets:[h],meta:h,registryUrl:v||h.homepage,inStore:!0},isInit:!0}),de({showFromUrlDialog:!1}),Me())},[h,oe,se]),Qe.push({key:"selectComponent",name:b("blocklet.component.selectComponent"),body:i.jsxs(cn,{sx:{width:400},component:"div",children:[s&&K.showFromUrlDialog&&i.jsx(Li,{mode:"component",onCancel:()=>{de({showFromUrlDialog:!1})},onSuccess:({meta:j,inputUrl:L,inStore:F,registryUrl:ne})=>{Ct({chooseParams:{meta:j,inputUrl:L,inStore:F,registryUrl:ne},isInit:!0}),de({showFromUrlDialog:!1}),Me()},handleText:{title:b("blocklet.component.addComponentTip.fromUrl"),confirm:b("blocklet.component.choose")}}),i.jsx(Mi,{stores:n,extra:Jo.isInServerlessMode(J)?null:s?i.jsxs(dt,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{de({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[i.jsx(ps,{style:{fontSize:20,marginRight:4}})," ",b("blocklet.component.addComponentTip.fromUrl")," "]}):null,loading:R,onChange:()=>{Te({}),xe.current={}},storageKey:u,children:({currentRegistry:j})=>i.jsx(Ki,{showResourcesSwitch:x,showCategory:k,serverVersion:J==null?void 0:J.version,style:Rt?{height:"calc(100vh - 56px - 80px - 32px - 10px )"}:{height:"calc(100% - 10px)"},storeUrl:j.url,resourceType:r,resourceDid:o,handleButtonClick:L=>{Ct({chooseParams:{...L,inStore:!0},isInit:!0})},handleBlockletRender:({blocklet:L,defaultRender:F})=>{const ne=(K==null?void 0:K.bundleDid)&&(K==null?void 0:K.bundleDid)===(L==null?void 0:L.did);return i.jsxs(Op,{children:[ne&&i.jsx("div",{className:"check-container",children:i.jsx(is,{className:"check-icon"})}),i.jsx("div",{className:ne?"choose-blocklet":"",style:{marginLeft:16},children:F})]})}})})]}),cancel:t==="embed"?void 0:b("common.cancel"),confirm:Tp({params:K,blocklet:se,t:b}),onCancel:Jt,onConfirm:()=>{Me()}}),Qe.push({key:"agreement",name:b("launchBlocklet.introduction"),body:i.jsxs(cn,{component:"div",className:"agreement-wrapper",children:[i.jsx(ss,{title:b("launchBlocklet.introduction"),subTitle:b("blocklet.component.addComponentTip.introduction")}),i.jsx(fi,{meta:Pe,onClickNext:Me,installRelated:Ft,onChangeInstallRelated:Ht,handleDescEle:i.jsx("p",{children:b("blocklet.component.addComponentTip.belowInformation")})})]}),cancel:h?void 0:b("common.pre"),disabled:!Le,confirm:b(Le?"launchBlocklet.next":"launchBlocklet.canNotInstall"),onCancel:h?Jt:Ze,onConfirm:()=>{ee(!1),Me()}}),Pe&&K.requirePurchase&&Qe.push({key:"purchase",name:i.jsxs(i.Fragment,{children:[b("common.verifyNFT"),i.jsx(Tr,{})]}),body:i.jsxs(cn,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(((nn=(It=ze.current)==null?void 0:It.getCurrentStep)==null?void 0:nn.call(It))===2||rt)&&i.jsx(sr,{title:b("common.verifyNFT"),subTitle:b("blocklet.component.addComponentTip.verifyNFT")}),qn(K.purchaseResultProps)?De&&i.jsx(qd,{ref:ze,meta:De.meta,mode:K.componentDid?"verify":"both",onCancel:it,installOpts:De.installOpts,handlePaySuccess:Et}):i.jsx("div",{className:"flex-align-center flex-justify-center",children:i.jsx(to,{...K.purchaseResultProps})})]}),disabled:((y=(l=ze.current)==null?void 0:l.getCurrentStep)==null?void 0:y.call(l))===2||rt,cancel:b("common.pre"),confirm:b("common.next"),onConfirm:()=>{typeof ze.current.onNext=="function"&&(ze.current.onNext(),ee(!0))},onCancel:()=>{Ze()}}),Mt.hasStartEngine(Pe)&&vl.hasMountPoint(Pe)?Qe.push({key:"config",name:b("common.config"),error:z,body:i.jsxs(cn,{component:"div",children:[i.jsx(sr,{title:b("common.config"),subTitle:b("blocklet.component.addComponentTip.config")}),i.jsx(hr,{label:b("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"mount-point-input"},fullWidth:!0,helperText:O||b("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:K.pathPrefix,onChange:j=>{const L=j.target.value;de({pathPrefix:L}),q(b("common.slugifyHint",{value:yl(L)}))}}),!!z&&i.jsx(qo,{severity:"error",style:{width:"100%",marginTop:8},children:z})]}),cancel:b("common.pre"),confirm:b("common.next"),onCancel:Ze,onConfirm:()=>{Me()}}):Pe&&(K.pathPrefix=((P=(w=Pe.interfaces)==null?void 0:w[0])==null?void 0:P.path)||`/${Pe.did}`),Pe&&(K!=null&&K.hasEnvironmentsStep)&&Qe.push({key:"environment",name:i.jsxs(i.Fragment,{children:[b("common.environment")," ",K.hasRequiredEnvironments&&i.jsx(Tr,{})]}),disabled:!!D||(K==null?void 0:K.hasMissRequiredConfigs),body:()=>i.jsxs(cn,{component:"div",style:{overflowY:"auto"},children:[i.jsx(sr,{title:b("common.environment"),subTitle:b("blocklet.component.addComponentTip.environment")}),i.jsx(Bl,{style:{marginTop:-12,width:"100%"},schema:K.configsList,defaultValue:K.configsValue,onChange:(j,{action:L,currentItem:F,allValues:ne})=>{L==="confirm"&&de({hasMissRequiredConfigs:Do(K.configsList,ne),configsValue:ne}),L==="edit"?X(F):["cancel","confirm"].includes(L)&&X(null)}})]}),cancel:b("common.pre"),confirm:b("common.next"),onCancel:Ze,onConfirm:Me}),Pe&&(K!=null&&K.didSpaceIsRequiredSetup)&&Qe.push({key:"didSpace",name:i.jsxs(i.Fragment,{children:[b("blocklet.component.didSpaceConfig")," ",K.didSpaceIsRequiredSetup==="required"&&i.jsx(Tr,{})]}),disabled:(K==null?void 0:K.didSpaceIsRequiredSetup)&&!K.didSpaceEndpoint,body:()=>i.jsx(Fl,{children:i.jsxs(cn,{component:"div",children:[i.jsx(sr,{title:b("blocklet.component.didSpaceConfig"),subTitle:b("blocklet.component.didSpaceConfigTip")}),i.jsx(H,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:i.jsx(Di,{blockletMeta:xe.current.meta,onNext:()=>{Me()},onEndpointUpdate:Xt})})]})}),cancel:b("common.pre"),confirm:b("common.next"),onCancel:Ze,onConfirm:Me}),Qe.push({key:"install",name:Qt(Pe==null?void 0:Pe.did)?b("common.upgrade"):b("common.install"),disabled:a?!1:qn(K.installResultProps),loading:a?!1:qn(K.installResultProps),body:i.jsx(cn,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:qn(K.installResultProps)?i.jsx(al,{message:i.jsx(kp,{children:b(a?"blocklet.component.installingCanCloseWindowTip":"blocklet.component.installingTip")}),increaseSpeed:.3,messageLoop:!1}):i.jsx("div",{style:{marginTop:120},children:i.jsx(to,{...K.installResultProps})})}),confirm:b("common.complete"),onConfirm:Pn});const qe=Qe[oe]||{},vn=()=>R||qe.error||!K.bundleDid?!0:oe>1?!K.pathPrefix:!1;return se?i.jsxs(jp,{sx:{width:"100%",height:Rt?window.innerHeight:d?"72vh":"100vh"},children:[i.jsx(jl,{steps:Qe,mode:"memory",children:i.jsx(xp,{ref:Ye,meta:Pe,isMobile:Rt,onStepChange:j=>{pt(j)}})}),i.jsxs(H,{className:"action-bar",children:[qe.cancel&&i.jsx(dt,{onClick:j=>{j.stopPropagation(),qe.onCancel()},disabled:oe===Qe.length-2&&R,color:"inherit",children:qe.cancel||b("common.cancel")}),qe.confirm&&i.jsx(dt,{onClick:j=>{j.stopPropagation(),qe.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:R||(typeof qe.disabled=="boolean"?qe.disabled:vn()),variant:"contained",autoFocus:!0,title:qe.confirm,style:{marginLeft:8,overflow:"hidden",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:i.jsxs(H,{display:"flex",alignItems:"center",overflow:"hidden",children:[(typeof qe.loading=="boolean"?qe.loading:R)&&i.jsx(gt,{style:{marginRight:8},size:16}),i.jsx(H,{component:"span",flex:1,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:qe.confirm})]})})]})]}):null}Ta.propTypes={onClose:_.func,mode:_.oneOf(["normal","embed"]),inDialog:_.bool,stores:_.arrayOf(_.string),storeUrl:_.string,resourceType:_.string,resourceDid:_.string,storageKey:_.string,selectedMeta:_.object,showResourcesSwitch:_.bool,showFromUrl:_.bool,enableRunBackground:_.bool,showCategory:_.bool};Ta.defaultProps={onClose:()=>{},mode:"normal",stores:[],storeUrl:"",resourceType:"",resourceDid:"",storageKey:"",inDialog:!0,selectedMeta:null,showResourcesSwitch:!0,showFromUrl:!0,enableRunBackground:!0,showCategory:!0};const jp=Ge(H)`
|
|
697
|
-
.action-bar {
|
|
698
|
-
display: flex;
|
|
699
|
-
justify-content: flex-end;
|
|
700
|
-
position: sticky;
|
|
701
|
-
bottom: 0;
|
|
702
|
-
padding-top: 16px;
|
|
703
|
-
z-index: 100;
|
|
704
|
-
width: 100%;
|
|
705
|
-
background: #fff;
|
|
706
|
-
border-top: 1px solid #eee;
|
|
707
|
-
}
|
|
708
|
-
`,cn=Ge(ge)`
|
|
709
|
-
width: 100%;
|
|
710
|
-
height: 100%;
|
|
711
|
-
`,sr=Ge(ss)`
|
|
712
|
-
margin-bottom: 24px;
|
|
713
|
-
`,Op=Ge.div`
|
|
714
|
-
position: relative;
|
|
715
|
-
|
|
716
|
-
.choose-blocklet {
|
|
717
|
-
background-color: rgb(236, 251, 253);
|
|
718
|
-
border-color: rgb(236, 251, 253);
|
|
719
|
-
border-radius: 8px;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
.check-container {
|
|
723
|
-
position: absolute;
|
|
724
|
-
right: 0;
|
|
725
|
-
bottom: 0;
|
|
726
|
-
display: flex;
|
|
727
|
-
justify-content: flex-end;
|
|
728
|
-
align-items: flex-end;
|
|
729
|
-
width: 30px;
|
|
730
|
-
height: 30px;
|
|
731
|
-
border-radius: 0 0 8px 0;
|
|
732
|
-
color: ${e=>e.theme.palette.common.white};
|
|
733
|
-
overflow: hidden;
|
|
734
|
-
transition: all ease 0.3s;
|
|
735
|
-
&:after {
|
|
736
|
-
position: absolute;
|
|
737
|
-
z-index: 0;
|
|
738
|
-
display: block;
|
|
739
|
-
width: 0;
|
|
740
|
-
height: 0;
|
|
741
|
-
border-top: transparent solid 15px;
|
|
742
|
-
border-left: transparent solid 15px;
|
|
743
|
-
border-bottom: ${e=>e.theme.palette.primary.main} solid 15px;
|
|
744
|
-
border-right: ${e=>e.theme.palette.primary.main} solid 15px;
|
|
745
|
-
transition: all ease 0.1s;
|
|
746
|
-
content: '';
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
.check-icon {
|
|
750
|
-
position: relative;
|
|
751
|
-
z-index: 2;
|
|
752
|
-
margin: 0 1px 1px 0;
|
|
753
|
-
font-size: 16px;
|
|
754
|
-
transition: all ease 0.2s;
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
`,kp=Ge.div`
|
|
758
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
759
|
-
.msg-before {
|
|
760
|
-
display: inline-block;
|
|
761
|
-
color: #aaa;
|
|
762
|
-
font-size: 14px;
|
|
763
|
-
margin-right: 6px;
|
|
764
|
-
}
|
|
765
|
-
`;export{Ta as A,na as B,af as S,of as a,sf as b,cp as c,ps as d,ws as f};
|