@abtnode/webapp 1.16.31-beta-8548ddf1 → 1.16.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-Cgp6UmAg.js → Add-YuGHCX93.js} +1 -1
- package/dist/assets/{ArrowDropDown-BVjtUDnO.js → ArrowDropDown-Dq_r4Xqb.js} +1 -1
- package/dist/assets/{Autocomplete-CX2pOSKy.js → Autocomplete-BVeL1Yo7.js} +1 -1
- package/dist/assets/{Breadcrumbs-CfLdvQuh.js → Breadcrumbs-CMvJXPnU.js} +1 -1
- package/dist/assets/{ButtonGroup-BFB8FBwo.js → ButtonGroup-Dk1mLt3h.js} +1 -1
- package/dist/assets/{CheckCircle-BxN7W-le.js → CheckCircle-Cn-sNTZK.js} +1 -1
- package/dist/assets/{ChevronLeft-Pw3iZqJe.js → ChevronLeft-CGibP5P0.js} +1 -1
- package/dist/assets/{ChevronRight-CmJg2Cw4.js → ChevronRight-DakQosJn.js} +1 -1
- package/dist/assets/{Close-bUHIxhaj.js → Close-DpmK9wKZ.js} +1 -1
- package/dist/assets/{Delete-D_OS9ALf.js → Delete-ukzbwUp3.js} +1 -1
- package/dist/assets/DeleteOutline-DWR_h5F3.js +1 -0
- package/dist/assets/{Done-B3fd1NBv.js → Done-CvSFHISO.js} +1 -1
- package/dist/assets/{Edit-D0kDKp7P.js → Edit-qncNJ4F1.js} +1 -1
- package/dist/assets/{EditIcon-BK0ltKbv.js → EditIcon-BU_hSrvO.js} +1 -1
- package/dist/assets/{ExpandMore-Bf1LLE51.js → ExpandMore-BzXUe6hQ.js} +1 -1
- package/dist/assets/{FilterList-DmnR7V-T.js → FilterList-B3q8z3Ai.js} +1 -1
- package/dist/assets/{Google-DQcXNjwe.js → Google-BFCcXFWg.js} +1 -1
- package/dist/assets/{Https-DOuq786b.js → Https-c9HUx4_F.js} +1 -1
- package/dist/assets/{InputAdornment-B4c5V3Mf.js → InputAdornment-CmItI7-a.js} +1 -1
- package/dist/assets/{InputLabel-BH8ojsN6.js → InputLabel-DiJjRX8c.js} +1 -1
- package/dist/assets/{LastPage-VB_AS_Vh.js → LastPage-BVKCAcZd.js} +1 -1
- package/dist/assets/{Launch-DVaDsXRB.js → Launch-ixFhPrIJ.js} +1 -1
- package/dist/assets/{Link-Cq7wD1in.js → Link-D21zoGLh.js} +1 -1
- package/dist/assets/{LoadingButton-BB0SfI5U.js → LoadingButton-C-VdleqP.js} +1 -1
- package/dist/assets/{LockIcon-ikzn_F6v.js → LockIcon-DWwaclI2.js} +1 -1
- package/dist/assets/{Loop-CoIB6wNF.js → Loop-cNToB-Hw.js} +1 -1
- package/dist/assets/{MoreHoriz-ipAxzckg.js → MoreHoriz-BlJZBfL5.js} +1 -1
- package/dist/assets/{MoreVert-nny3Ft7E.js → MoreVert-72FLA6F7.js} +1 -1
- package/dist/assets/{Pagination-DupWn88M.js → Pagination-BE1Nzv5c.js} +1 -1
- package/dist/assets/{Public-7nhJMjBD.js → Public-DwfXfE3x.js} +1 -1
- package/dist/assets/{SchemaReference.es-BMApSZwQ.js → SchemaReference.es-DSZJxlJs.js} +1 -1
- package/dist/assets/{Search-BUTthfzy.js → Search-DPoHYjEM.js} +1 -1
- package/dist/assets/{Select-BARjOLQh.js → Select-CZslLkS9.js} +1 -1
- package/dist/assets/{Skeleton-TUa0fNMH.js → Skeleton-BRE8g3Nr.js} +1 -1
- package/dist/assets/{Slider-DiT8jKeQ.js → Slider-BXYbXQK6.js} +1 -1
- package/dist/assets/{Stepper-BolhLUn_.js → Stepper-C2cskkxs.js} +1 -1
- package/dist/assets/{TextField-DLzLnEQT.js → TextField-FjVpB8_i.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-cXYZUu5r.js → ToggleButtonGroup-BLKzb8eH.js} +1 -1
- package/dist/assets/{ViewList-DxCKhzhs.js → ViewList-BWR6vvRA.js} +1 -1
- package/dist/assets/{actions-ieXq1D_3.js → actions-DI7j7zyh.js} +1 -1
- package/dist/assets/{actions-DuBtPyY2.js → actions-DMatOIO9.js} +1 -1
- package/dist/assets/{agreement--45MLHN7.js → agreement-CLCrNvvc.js} +1 -1
- package/dist/assets/api-BxXFuqVr.js +1 -0
- package/dist/assets/{app-avatar-2eSD2CPg.js → app-avatar-Dp7pMuua.js} +1 -1
- package/dist/assets/{audit-logs-Dt9lalk3.js → audit-logs-BmIfy96g.js} +1 -1
- package/dist/assets/blocklet-xgPL6JoP.js +1 -0
- package/dist/assets/{brace-fold.es-Cx7Pp8oO.js → brace-fold.es-CjpHnqaJ.js} +1 -1
- package/dist/assets/{bundle-avatar-CstwvF2w.js → bundle-avatar-BOdLBYt_.js} +1 -1
- package/dist/assets/{chart-DEAsbY7p.js → chart-ChpsdZ5w.js} +1 -1
- package/dist/assets/{click-to-copy-Bsaf2xRi.js → click-to-copy-qnXvH47O.js} +1 -1
- package/dist/assets/{closebrackets.es-LDf_Hccp.js → closebrackets.es-BAkyQEkz.js} +1 -1
- package/dist/assets/{codemirror.es-DCD0kuMs.js → codemirror.es-DyYoQOkc.js} +1 -1
- package/dist/assets/{comment.es-RtZGLLrV.js → comment.es-B0snLVGE.js} +1 -1
- package/dist/assets/{config-navigation-_ZUWFkgh.js → config-navigation-qB3p7zP-.js} +1 -1
- package/dist/assets/{delete-confirm-CpfgPoTZ.js → delete-confirm-BG1I5J0u.js} +1 -1
- package/dist/assets/{detail-CGNFghKt.js → detail-DHBrhfaQ.js} +3 -3
- package/dist/assets/{dialog.es-CY4DcxNf.js → dialog.es-C9szbcAW.js} +1 -1
- package/dist/assets/{download-CWVMCLbP.js → download-CIK2Rd3G.js} +1 -1
- package/dist/assets/{foldgutter.es-BZu7SNj_.js → foldgutter.es-B7n9tC8r.js} +1 -1
- package/dist/assets/getValidReactChildren-anMSyFv4.js +1 -0
- package/dist/assets/{hint.es-DdDZBiN1.js → hint.es-CBGKcJ0H.js} +1 -1
- package/dist/assets/{hint.es2-B6S-tUTH.js → hint.es2-9eR9yDN0.js} +1 -1
- package/dist/assets/{iframe-BkaiAX0T.js → iframe-DeTHfFVQ.js} +1 -1
- package/dist/assets/{index-CNLVpIub.js → index-04gl6pO4.js} +1 -1
- package/dist/assets/{index-DojNP9lM.js → index-15yTTSQp.js} +1 -1
- package/dist/assets/{index-juZnKaO5.js → index-3regrC4H.js} +1 -1
- package/dist/assets/{index-BkZfZe7e.js → index-6UQZCJ9z.js} +1 -1
- package/dist/assets/{index-DXkDzCPE.js → index-7aCT4zwx.js} +1 -1
- package/dist/assets/{index-6-px9qAy.js → index-9o5SBOBg.js} +1 -1
- package/dist/assets/{index-D6A1AZLm.js → index-B4nATnEq.js} +2 -2
- package/dist/assets/{index-DqEMTm5N.js → index-BIUglsRs.js} +1 -1
- package/dist/assets/{index-CEIupTjX.js → index-BZQ6Sdlq.js} +1 -1
- package/dist/assets/{index-DwxAoeFn.js → index-BjH9WeIg.js} +5 -5
- package/dist/assets/{index-Cqx1aanX.js → index-BtcEDL3C.js} +1 -1
- package/dist/assets/{index-wpCTocms.js → index-BuNJbfxi.js} +1 -1
- package/dist/assets/{index-DfvPVPq7.js → index-BwAMNnCK.js} +3 -3
- package/dist/assets/{index-PdOAjq0M.js → index-C7m9dmdb.js} +3 -3
- package/dist/assets/{index-C0C9n0GF.js → index-CANtQh-8.js} +1 -1
- package/dist/assets/{index-JFZCWUM3.js → index-CD-UcGPr.js} +1 -1
- package/dist/assets/{index-B_Mci9Ef.js → index-CG4MmDuK.js} +1 -1
- package/dist/assets/{index-0Sgb5oPf.js → index-CJeF5ewa.js} +1 -1
- package/dist/assets/{index-C6PRgT9c.js → index-CLbWUy8O.js} +1 -1
- package/dist/assets/{index-CDfDGgRs.js → index-CUnYmZv8.js} +1 -1
- package/dist/assets/{index-B0m14nWb.js → index-ClNOtPm5.js} +3 -3
- package/dist/assets/{index-CRNV5rSE.js → index-CoOBWTGS.js} +1 -1
- package/dist/assets/{index-D9MRQCOD.js → index-Ct2fXBsa.js} +1 -1
- package/dist/assets/{index-BnYjPpqB.js → index-CupkOe8N.js} +1 -1
- package/dist/assets/{index-BkB6wU5C.js → index-D3y-Mq0t.js} +1 -1
- package/dist/assets/index-D8rh69R2.js +21 -0
- package/dist/assets/{index-BQXrgmCr.js → index-DDRhCg0G.js} +1 -1
- package/dist/assets/{index-Dhhn-NRS.js → index-DJs7uyCT.js} +1 -1
- package/dist/assets/{index-DVSDRPzS.js → index-DNivFScD.js} +1 -1
- package/dist/assets/{index--loYEiKM.js → index-DP0iPBNh.js} +1 -1
- package/dist/assets/{index-DEogVXBk.js → index-DmdQsIN9.js} +1 -1
- package/dist/assets/{index-CPI218vA.js → index-DnBiGZ_C.js} +1 -1
- package/dist/assets/{index-BZAu7qvV.js → index-Dpawm4Ki.js} +2 -2
- package/dist/assets/{index-Cyskc2Kt.js → index-KENXSHGT.js} +1 -1
- package/dist/assets/{index-Bmta40GX.js → index-MRb9RAJK.js} +1 -1
- package/dist/assets/{index-gLfOV5I3.js → index-TFGhlmJg.js} +1 -1
- package/dist/assets/index-TMoSb8Hc.js +68 -0
- package/dist/assets/{index-BD4I6crD.js → index-WbFA75dB.js} +1 -1
- package/dist/assets/{index-CWuN3id6.js → index-l9RwTjEt.js} +1 -1
- package/dist/assets/{index-CiBtNKkh.js → index-oVy0lmae.js} +1 -1
- package/dist/assets/{index-Bv32KhPI.js → index-qm1NSTqx.js} +1 -1
- package/dist/assets/{index-xLDIvbfZ.js → index-vxqr_A7H.js} +1 -1
- package/dist/assets/{index-CDZ9mGf1.js → index-y0r_CDsH.js} +1 -1
- package/dist/assets/{index.es-rNOLQa7L.js → index.es-iY0s9qTe.js} +1 -1
- package/dist/assets/{index.esm-DsLyE9Xu.js → index.esm-Lol3I37E.js} +1 -1
- package/dist/assets/{info-addon.es-BbJL0YX-.js → info-addon.es-U5Ih2Oar.js} +1 -1
- package/dist/assets/{info.es-9ZCzgTD_.js → info.es-B24BQRjf.js} +1 -1
- package/dist/assets/{install-from-url-BBpJ4CMF.js → install-from-url-DrOGJntu.js} +1 -1
- package/dist/assets/{invitation-CikC7uq2.js → invitation-B4r3Uuqv.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-J2hOhmvd.js → is-path-prefix-equal-BsUunwOH.js} +1 -1
- package/dist/assets/{isEqual-Bmi5Bu3B.js → isEqual-DvDsjofF.js} +1 -1
- package/dist/assets/{item-CnEz-3f1.js → item-BQ-lq0dH.js} +1 -1
- package/dist/assets/{javascript.es-BF3qqDhg.js → javascript.es-DmenNz71.js} +1 -1
- package/dist/assets/{jump-to-line.es-BN5G6tY4.js → jump-to-line.es-BT9o4hFe.js} +1 -1
- package/dist/assets/{jump.es-CnQvllfZ.js → jump.es-BJH_IFbo.js} +1 -1
- package/dist/assets/{line-UNVSEb9_.js → line-C7Ytimyk.js} +3 -3
- package/dist/assets/{lint.es-C2AN8ZFv.js → lint.es-BsdVLYYK.js} +1 -1
- package/dist/assets/{lint.es2-C2WqkHvr.js → lint.es2-CT9E8RI5.js} +1 -1
- package/dist/assets/{lint.es3-Fz-_4dtf.js → lint.es3-CjbW7OcU.js} +1 -1
- package/dist/assets/{list-header-DA_lXPf6.js → list-header-C1ycqwNT.js} +1 -1
- package/dist/assets/{log-C8vvn-bO.js → log-CrPoPCZq.js} +1 -1
- package/dist/assets/{lottie-BKBPu1u_.js → lottie-E7kaZ5f2.js} +1 -1
- package/dist/assets/{matchbrackets.es-DO06XhQI.js → matchbrackets.es-Bdv2zR-T.js} +1 -1
- package/dist/assets/{memory-WvEFC3gh.js → memory-Br7PUWs3.js} +1 -1
- package/dist/assets/{mode.es-CRa-no-H.js → mode.es-C0DC5igF.js} +1 -1
- package/dist/assets/{mode.es2-CHXzYyrw.js → mode.es2-BvMpbvGY.js} +1 -1
- package/dist/assets/{mode.es3-DLPMB81l.js → mode.es3-BzN1VyV9.js} +1 -1
- package/dist/assets/{onlineParser.es-B30kjcEV.js → onlineParser.es-DhWzlYWG.js} +1 -1
- package/dist/assets/{overview-CQAvezED.js → overview-RRUNlHLn.js} +1 -1
- package/dist/assets/{react-BaSd4pJ4.js → react-Cw_CkYN1.js} +3 -3
- package/dist/assets/{redux-DM810vAx.js → redux-B9BtMJgi.js} +1 -1
- package/dist/assets/{resource-dialog-2z0a-PF6.js → resource-dialog-0uswwg4x.js} +1 -1
- package/dist/assets/{runtime-CIi4aCkC.js → runtime-C6dWdPqY.js} +1 -1
- package/dist/assets/{schema-DuwsmSM1.js → schema-rBztjvAB.js} +1 -1
- package/dist/assets/sdk-B77IQB17.js +1 -0
- package/dist/assets/{search.es-cqcZ4Cw-.js → search.es-lkmhiqmF.js} +1 -1
- package/dist/assets/{searchcursor.es-B3Ng334L.js → searchcursor.es-CyKx0v-U.js} +1 -1
- package/dist/assets/service-DumyHxMs.js +1 -0
- package/dist/assets/{shorten-label-DkMvii7f.js → shorten-label-MAGXebJW.js} +1 -1
- package/dist/assets/{show-hint.es-Dp6As-xn.js → show-hint.es-DiObn3_W.js} +1 -1
- package/dist/assets/{slicedToArray-CtU0PO29.js → slicedToArray-Cd-fJo2i.js} +1 -1
- package/dist/assets/{spaces-D1jkJ7_l.js → spaces-q5OlP__P.js} +1 -1
- package/dist/assets/{status-rJ7yuno3.js → status-93gUV3__.js} +1 -1
- package/dist/assets/{sublime.es-_V1o9dX1.js → sublime.es-CaUPtnXc.js} +1 -1
- package/dist/assets/{switch-control-CfrXUkfO.js → switch-control-Dd1suGf_.js} +1 -1
- package/dist/assets/{table-icons-Kvp_gs0u.js → table-icons-BuE8hjls.js} +2 -2
- package/dist/assets/{team-Y8ObkRFn.js → team-B75Qqpfx.js} +1 -1
- package/dist/assets/{toUpper-DjqnYte2.js → toUpper-BPjfk0vW.js} +1 -1
- package/dist/assets/{traffic-Co02z8Fi.js → traffic-Dm5MXy9S.js} +1 -1
- package/dist/assets/{url-evaluation-B6AI2aUV.js → url-evaluation-BfNZVzn8.js} +1 -1
- package/dist/assets/{url-join-FDweORaV.js → url-join-uVmSvxHB.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DsZkMmxY.js → use-blocklet-info-for-connect-did-spaces--c0ZcRNe.js} +1 -1
- package/dist/assets/{useLocalStorage-BoA343IZ.js → useLocalStorage-C-9FT6wS.js} +1 -1
- package/dist/assets/{useThemeProps-C9K3QBYc.js → useThemeProps-D2picXH9.js} +1 -1
- package/dist/assets/{util-D5fDZ_8L.js → util-B3g0jIJB.js} +1 -1
- package/dist/assets/{wait-container-f5I4qQ6M.js → wait-container-CS2sL203.js} +1 -1
- package/dist/assets/{withStyles-CenNsZ2i.js → withStyles-D9ls3p7Y.js} +1 -1
- package/dist/assets/{wrap-locale-6M8hS8dV.js → wrap-locale-CJcLTW-n.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-BvZiK55n.js +0 -1
- package/dist/assets/DeleteOutline-DMSjGyRf.js +0 -1
- package/dist/assets/api-DJ02_-Oy.js +0 -1
- package/dist/assets/blocklet-C4NgRaSH.js +0 -1
- package/dist/assets/getValidReactChildren-CLVx1EWM.js +0 -1
- package/dist/assets/index-BJGMWnA_.js +0 -68
- package/dist/assets/index-D0sHKZuS.js +0 -21
- package/dist/assets/sdk-BKOngHkd.js +0 -1
- package/dist/assets/service-Bmw11bED.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as We,Y as Ge,n as P,Q as v,Z as Q,j as e,$ as ke,r as x,P as E,t as _,a0 as ue,a1 as be,q as C,a2 as se,a3 as He,E as M,M as K,a4 as qe,m as A,T as Ve,a5 as Ye,B,D as Qe,C as ve,x as Ke,K as Se,a6 as Je,a7 as Ze,a8 as Xe,u as I,f as et,a9 as W,v as te,F as tt,aa as oe,A as je,w as re,ab as st,W as ne,i as J,y as Ce,z as Z,ac as ot,ad as rt,ae as Pe,af as nt,b as D,ag as at,O as it,ah as lt,R as ct,J as Re,ai as dt,aj as pt,ak as Te,al as Ee,am as De,an as Be,ao as Ue,ap as N,aq as Oe,ar as _e,as as Fe,at as ht}from"./index-
|
|
1
|
+
import{g as We,Y as Ge,n as P,Q as v,Z as Q,j as e,$ as ke,r as x,P as E,t as _,a0 as ue,a1 as be,q as C,a2 as se,a3 as He,E as M,M as K,a4 as qe,m as A,T as Ve,a5 as Ye,B,D as Qe,C as ve,x as Ke,K as Se,a6 as Je,a7 as Ze,a8 as Xe,u as I,f as et,a9 as W,v as te,F as tt,aa as oe,A as je,w as re,ab as st,W as ne,i as J,y as Ce,z as Z,ac as ot,ad as rt,ae as Pe,af as nt,b as D,ag as at,O as it,ah as lt,R as ct,J as Re,ai as dt,aj as pt,ak as Te,al as Ee,am as De,an as Be,ao as Ue,ap as N,aq as Oe,ar as _e,as as Fe,at as ht}from"./index-Dpawm4Ki.js";import{P as H,L as mt,A as ut,S as Ae,a as Le}from"./index-BuNJbfxi.js";import{A as ft,D as ae,u as xt,W as gt,P as wt,L as $e,d as Ne,a as Me}from"./wait-container-CS2sL203.js";import{_ as fe}from"./useLocalStorage-C-9FT6wS.js";import{d as yt}from"./Launch-ixFhPrIJ.js";import{d as kt}from"./DeleteOutline-DWR_h5F3.js";import{g as bt,i as vt}from"./spaces-q5OlP__P.js";import{T as St}from"./TextField-FjVpB8_i.js";import{i as xe}from"./isEqual-DvDsjofF.js";import{d as jt}from"./MoreVert-72FLA6F7.js";import{E as Ct}from"./index-DDRhCg0G.js";import"./url-join-uVmSvxHB.js";import"./Skeleton-BRE8g3Nr.js";import"./Close-DpmK9wKZ.js";import"./lottie-E7kaZ5f2.js";import"./api-BxXFuqVr.js";import"./Select-CZslLkS9.js";import"./InputLabel-DiJjRX8c.js";var Pt=Ge;function Rt(t){return Pt(t).toLowerCase()}var Tt=Rt;const Et=We(Tt);function ie({children:t,selected:i}){return e.jsxs(Dt,{children:[t,e.jsx(v,{className:`selected-container ${i?"selected":""}`,children:e.jsx(ke,{className:"selected-icon"})})]})}const Dt=P(v)`
|
|
2
2
|
position: relative;
|
|
3
3
|
|
|
4
4
|
.selected-container {
|
|
@@ -53,7 +53,7 @@ import{g as We,Y as Ge,n as P,Q as v,Z as Q,j as e,$ as ke,r as x,P as E,t as _,
|
|
|
53
53
|
visibility: visible;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
`;ie.propTypes={children:Q.node.isRequired,selected:Q.bool};ie.defaultProps={selected:!1};const Ie=x.createContext({}),{Provider:Bt,Consumer:
|
|
56
|
+
`;ie.propTypes={children:Q.node.isRequired,selected:Q.bool};ie.defaultProps={selected:!1};const Ie=x.createContext({}),{Provider:Bt,Consumer:Ps}=Ie;function le({children:t}){const{t:i}=_(),[s,c]=fe("spaceGatewaysForRestore",[{name:"Prod DID Spaces",url:"https://www.didspaces.com/app",protected:!0},{name:"Staging DID Spaces",url:"https://spaces.staging.arcblock.io/app",protected:!0}]),[d,u]=fe("selectedSpaceGatewayForRestore",s.find(r=>r.url==="https://www.didspaces.com/app")),p=r=>{const a=s.find(h=>r.url===h.url);if(a)throw new Error(i("storage.spaces.gateway.add.duplicate",{name:a.name}));c(()=>[...s,ue.cloneDeep(r)]),u(r)},l=r=>{if(r.url===d.url)throw new Error(i("storage.spaces.gateway.delete.failedForSelected"));c(()=>s.filter(a=>a.url!==r.url))},g=r=>{u(r)};return x.useEffect(()=>{async function r(){const a=await Promise.all(s.map(async h=>{const{data:n}=await be.get(C(h.url,"/__blocklet__.js?type=json"),{timeout:5e3}).catch(R=>(console.error(R),{data:{}})),m=n.appName??h.name;return ue.merge(h,{name:m})}));c(a)}r()},[]),e.jsx(Bt,{value:{spaceGateways:s,selectedSpaceGateway:d,addSpaceGateway:p,deleteSpaceGateway:l,handleSelectSpaceGateway:g},children:t})}le.propTypes={children:E.any.isRequired};le.defaultProps={};function Ut(){return x.useContext(Ie)}function ce({spaceGateway:t,onDeleteSpaceGateway:i}){const{t:s}=_(),[c,d]=x.useState(!1),[u,p]=x.useState(!1),l=(r,a)=>{r==null||r.stopPropagation(),d(a)},g=async r=>{try{r==null||r.stopPropagation(),p(!0),await i(t),d(!1)}catch(a){console.error(a),M.error(`${s("storage.spaces.gateway.delete.failed")}: ${K(a)}`)}finally{p(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(se,{size:"small",onClick:r=>l(r,!0),children:e.jsx(kt,{})}),e.jsx(He,{title:s("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`}),open:c,confirmButton:{text:s("common.confirm"),props:{variant:"contained",color:"error",loading:u}},cancelButton:{text:s("common.cancel"),props:{variant:"contained",color:"primary"}},onConfirm:g,onCancel:r=>l(r,!1)})]})}ce.propTypes={onDeleteSpaceGateway:E.func,spaceGateway:E.shape({name:E.string.isRequired,url:E.string.isRequired,protected:E.bool}).isRequired};ce.defaultProps={onDeleteSpaceGateway:()=>{}};const Ot=qe(()=>({menuName:{minWidth:0,display:"flex",flex:1,flexDirection:"column",paddingRight:"64px","& span":{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}));function de({spaceGateway:t,selected:i,onDeleteSpaceGateway:s,onSelectGateway:c,...d}){const u=Ot(),{t:p}=_(),l=r=>{r.stopPropagation(),window.open(t.url)},g=async()=>{await s(t)};return e.jsxs(_t,{...d,children:[e.jsx(v,{display:"inline-flex",marginRight:"8px",alignItems:"center",children:e.jsx("img",{alt:t.name,src:C(t.url,"favicon.ico"),width:"48px",height:"48px"})}),e.jsxs(v,{className:u.menuName,onClick:c,children:[e.jsxs(A,{component:"span",variant:"subtitle1",style:{fontWeight:"400"},children:[t==null?void 0:t.name," ",i&&e.jsx(Ve,{color:"primary",style:{marginLeft:"8px"},children:p("common.selected")})]}),e.jsx(A,{className:"url",component:"span",variant:"inherit",children:t==null?void 0:t.url})]}),e.jsxs(Ye,{children:[e.jsx(se,{onClick:l,size:"small",children:e.jsx(yt,{})}),(t==null?void 0:t.protected)!==!0&&e.jsx(ce,{spaceGateway:t,onDeleteSpaceGateway:g})]})]})}const _t=P(v)`
|
|
57
57
|
display: flex;
|
|
58
58
|
`;de.propTypes={spaceGateway:E.shape({name:E.string.isRequired,url:E.string.isRequired,protected:E.bool}).isRequired,selected:E.bool,onDeleteSpaceGateway:E.func,onSelectGateway:Q.func};de.defaultProps={onDeleteSpaceGateway:()=>{},selected:!1,onSelectGateway:()=>{}};function pe({onAddGateway:t,...i}){const{t:s,locale:c}=_(),[d,u]=x.useState(""),[p,l]=x.useState(!1),[g,r]=x.useState(!1),[a,h]=x.useState(""),n=async()=>{try{l(!0);const m=await bt(d,{withSearchParams:!1});if(!await vt(m))throw new Error(s("storage.spaces.gateway.add.invalidUrl"));const{data:R}=await be.get(C(new URL(m).origin,"/__blocklet__.js?type=json")),w={name:R.appName,url:m,protected:!1};await t(w),M.success(s("storage.spaces.addedWithName",{name:w.name})),r(!1)}catch(m){h(`${s("storage.spaces.gateway.add.failed",c)}: ${K(m)}`)}finally{l(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(B,{size:"middle",color:"primary",variant:"outlined",onClick:()=>r(!0),...i,children:s("storage.spaces.gateway.add.title")}),e.jsxs(Qe,{title:s("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:g,onClose:()=>r(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(B,{onClick:m=>{m.stopPropagation(),r(!1)},color:"inherit",children:s("common.cancel")}),e.jsxs(B,{onClick:m=>{m.stopPropagation(),n()},color:"primary","data-cy":"install-blocklet-next-step",disabled:p||!d,variant:"contained",autoFocus:!0,children:[p&&e.jsx(ve,{size:16}),s("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(Ke,{component:"div",children:e.jsx(A,{component:"div",children:e.jsx(St,{label:s("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:d,onChange:m=>{h(null),u(m.target.value)},disabled:p,onKeyPress:async m=>{m.key==="Enter"&&(m.preventDefault(),await n())},autoFocus:!0})})})}),!!a&&e.jsx(Se,{severity:"error",style:{width:"100%"},children:a})]})]})}pe.propTypes={onAddGateway:E.func};pe.defaultProps={onAddGateway:()=>{}};function he({onConnect:t,...i}){const{spaceGateways:s,selectedSpaceGateway:c,handleSelectSpaceGateway:d,addSpaceGateway:u,deleteSpaceGateway:p}=Ut(),{t:l}=_(),g=n=>{d(n)},r=async n=>{await u(n)},a=()=>{t(c)},h=async n=>{await p(n)};return e.jsxs(v,{...i,children:[e.jsx(Je,{children:s.map(n=>{const m=(n==null?void 0:n.url)===c.url;return e.jsx(ie,{selected:m,children:e.jsx(Ze,{button:!0,selected:m,"data-cy":"get-space-endpoint-for-restore",children:e.jsx(Xe,{children:e.jsx(de,{spaceGateway:n,onDeleteSpaceGateway:h,selected:m,onSelectGateway:()=>g(n)})})},n.url)})})}),e.jsxs(v,{display:"flex",marginTop:"16px",justifyContent:"center",alignItems:"center",children:[e.jsx(pe,{onAddGateway:r}),e.jsx(B,{sx:{marginLeft:"16px"},size:"middle",variant:"contained",onClick:a,children:l("storage.spaces.connect.now")})]})]})}he.propTypes={onConnect:Q.func};he.defaultProps={onConnect:()=>{}};const Ft=P("div")`
|
|
59
59
|
width: 100%;
|
|
@@ -311,4 +311,4 @@ import{g as We,Y as Ge,n as P,Q as v,Z as Q,j as e,$ as ke,r as x,P as E,t as _,
|
|
|
311
311
|
&.logo-can-click {
|
|
312
312
|
cursor: pointer;
|
|
313
313
|
}
|
|
314
|
-
`;function
|
|
314
|
+
`;function Rs(){const{search:t}=window.location;return t.includes("restoreFrom=server")?e.jsx(rs,{}):e.jsx(Yt,{})}export{Rs as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as Oe,aL as we,j as t,P as U,n as ye,dQ as pa,r as K,bb as ma,Q as m,fc as kn,ez as as,a2 as De,C as sn,t as Ee,v as ha,w as ba,H as _e,gP as Ea,E as Y,N as Pe,ac as _a,y as rs,fK as xa,m as Ht,gQ as ya,at as Sa,aZ as Ce,a_ as is,D as tt,B as ie,x as va,K as Na,M as os,b as ae,bl as me,bG as cs,cb as Aa,f as Se,bo as zt,bd as Xe,V as Ta,g as nt,ch as j,aO as Be,ds as be,a3 as Ca,gR as Re,f1 as Ra,q as gt,fd as We,U as ls,ai as st,a8 as Oa,k as rt,bH as wa,bI as Ia,ax as Pn,b6 as La,dM as Te,d0 as it,fM as Ge,gS as ja,gT as Ma,gU as Da,aS as ka,bt as Pa,bu as Ba,gV as Fa,gD as $a,bA as Ua,b7 as us,bj as Gt,R as Ka,eT as ds,s as Ha,fi as je,$ as za,cO as fs,F as Ga,G as Rt}from"./index-
|
|
1
|
+
import{aK as Oe,aL as we,j as t,P as U,n as ye,dQ as pa,r as K,bb as ma,Q as m,fc as kn,ez as as,a2 as De,C as sn,t as Ee,v as ha,w as ba,H as _e,gP as Ea,E as Y,N as Pe,ac as _a,y as rs,fK as xa,m as Ht,gQ as ya,at as Sa,aZ as Ce,a_ as is,D as tt,B as ie,x as va,K as Na,M as os,b as ae,bl as me,bG as cs,cb as Aa,f as Se,bo as zt,bd as Xe,V as Ta,g as nt,ch as j,aO as Be,ds as be,a3 as Ca,gR as Re,f1 as Ra,q as gt,fd as We,U as ls,ai as st,a8 as Oa,k as rt,bH as wa,bI as Ia,ax as Pn,b6 as La,dM as Te,d0 as it,fM as Ge,gS as ja,gT as Ma,gU as Da,aS as ka,bt as Pa,bu as Ba,gV as Fa,gD as $a,bA as Ua,b7 as us,bj as Gt,R as Ka,eT as ds,s as Ha,fi as je,$ as za,cO as fs,F as Ga,G as Rt}from"./index-Dpawm4Ki.js";import{I as Wa}from"./iframe-DeTHfFVQ.js";import{F as qa,R as Va,I as Ya,a as Wt,L as Ot,b as Za,d as Xa}from"./line-C7Ytimyk.js";import{d as gs}from"./ChevronRight-DakQosJn.js";import{d as ps}from"./ExpandMore-BzXUe6hQ.js";import{T as an}from"./index-04gl6pO4.js";import{B as ms}from"./bundle-avatar-BOdLBYt_.js";import{u as Ja,B as Qa}from"./app-avatar-Dp7pMuua.js";import{i as er}from"./isEqual-DvDsjofF.js";import{d as tr}from"./Loop-cNToB-Hw.js";import{d as nr}from"./Done-CvSFHISO.js";import{a as Bn,A as sr}from"./Autocomplete-BVeL1Yo7.js";import{T as ne,F as ar}from"./TextField-FjVpB8_i.js";import{e as rr}from"./mode-B2dWMeTO.js";import{C as ir,d as or}from"./Public-DwfXfE3x.js";import{u as he}from"./blocklet-xgPL6JoP.js";import{C as cr}from"./click-to-copy-qnXvH47O.js";import{a as rn}from"./team-B75Qqpfx.js";import{a as Me}from"./index-TFGhlmJg.js";import{E as on}from"./index-DDRhCg0G.js";import{u as Fe,C as ee}from"./index.esm-Lol3I37E.js";import{F as re}from"./Select-CZslLkS9.js";import{d as lr}from"./Launch-ixFhPrIJ.js";import{d as ur}from"./EditIcon-BU_hSrvO.js";import{d as dr}from"./Edit-qncNJ4F1.js";import{d as fr}from"./actions-DI7j7zyh.js";import{u as gr,a as pr,D as mr,H as hr}from"./index-DJs7uyCT.js";import{S as bt}from"./switch-control-Dd1suGf_.js";import{K as br}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{S as Er}from"./Slider-BXYbXQK6.js";import{D as _r}from"./index-vxqr_A7H.js";import{I as xr}from"./index-CUnYmZv8.js";import"./index-D3y-Mq0t.js";import"./ArrowDropDown-Dq_r4Xqb.js";import"./ButtonGroup-Dk1mLt3h.js";import"./getValidReactChildren-anMSyFv4.js";import"./index-DnBiGZ_C.js";import"./Delete-ukzbwUp3.js";import"./InputLabel-DiJjRX8c.js";import"./url-evaluation-BfNZVzn8.js";import"./useLocalStorage-C-9FT6wS.js";import"./MoreVert-72FLA6F7.js";import"./status-93gUV3__.js";import"./redux-B9BtMJgi.js";import"./FilterList-B3q8z3Ai.js";import"./useThemeProps-D2picXH9.js";import"./LastPage-BVKCAcZd.js";import"./Search-DPoHYjEM.js";var cn={},yr=we;Object.defineProperty(cn,"__esModule",{value:!0});var hs=cn.default=void 0,Sr=yr(Oe()),vr=t;hs=cn.default=(0,Sr.default)((0,vr.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var ln={},Nr=we;Object.defineProperty(ln,"__esModule",{value:!0});var bs=ln.default=void 0,Ar=Nr(Oe()),Tr=t;bs=ln.default=(0,Ar.default)((0,Tr.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var un={},Cr=we;Object.defineProperty(un,"__esModule",{value:!0});var Es=un.default=void 0,Rr=Cr(Oe()),Or=t;Es=un.default=(0,Rr.default)((0,Or.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var dn={},wr=we;Object.defineProperty(dn,"__esModule",{value:!0});var _s=dn.default=void 0,Ir=wr(Oe()),Lr=t;_s=dn.default=(0,Ir.default)((0,Lr.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");function fn({label:e,disabled:n,required:s,initialValue:r,onChange:u,style:c,onSubmit:o,triggers:a,options:i,formatterBeforeSubmit:d,helperText:l,placeholder:y,renderImage:E,renderLabel:h,filterKeys:v,noEmpty:A,...T}){const[w,f]=K.useState(!1),[g,S]=K.useState(!1),[p,x]=ma.useState(""),[R,D]=K.useState(r),[O,_]=K.useState(R),I=K.useMemo(()=>{if(!i)return{};const $={};return i.forEach(b=>{$[b.code]=b}),$},[i]),C=()=>{if(!i)return[];if(!p)return i.map(b=>b.code);const $=new RegExp(p.toLowerCase());return i.filter(b=>{var N;for(let k=0;k<v.length;k++){const H=v[k];if($.test((N=b[H])==null?void 0:N.toLowerCase()))return!0}return!1}).map(b=>b.code)},M=async()=>{S(!0);try{await o(typeof d=="function"?d(O):O)===!1?_(R):A&&!O.length?(_(r),D(r)):(_(O),D(O))}catch{_(R)}finally{S(!1),f(!1)}},F=($,b)=>{if(!Array.isArray(b)){_([]),u([]);return}const N=b.filter(k=>I[k]);if(!N.length){_([]),u([]);return}_(N),u(N)},q=w?t.jsx(sr,{options:i,value:O,onChange:F,inputValue:p,onInputChange:($,b)=>{x(b)},PopperComponent:Mr,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:C,getOptionLabel:$=>{var b;return(b=I[$])==null?void 0:b.name},renderInput:$=>t.jsx(ne,{...$,label:"",placeholder:y}),renderOption:($,b)=>{var k;const N=O.indexOf(b)!==-1;return K.createElement(jr,{component:"li",...$,key:b},E(I[b]||{}),t.jsx(m,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:h(b,I[b])||((k=I[b])==null?void 0:k.name)}),t.jsx(m,{component:kn,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...T}):t.jsx(m,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:O.filter($=>i.some(b=>b.code===$)).map($=>t.jsx(as,{label:i.find(b=>b.code===$).name,style:{marginRight:8},size:"small"},$))});return t.jsx(qa,{className:"form",style:c,children:t.jsxs(m,{className:"form-item",children:[t.jsxs(m,{className:"form-item-label",children:[e,s&&t.jsx(Va,{})]}),t.jsxs(m,{className:"form-item-body",children:[t.jsx(m,{className:"form-item-input",children:q}),t.jsx(m,{className:"form-item-action",children:w?t.jsxs(t.Fragment,{children:[t.jsx(De,{"data-cy":"schema-form-item-confirm",onClick:M,disabled:n||g,size:"large",children:g?t.jsx(sn,{size:24}):t.jsx(nr,{})}),t.jsx(De,{"data-cy":"schema-form-item-cancel",onClick:()=>{_(R),f(!1)},disabled:n||g,size:"large",children:t.jsx(kn,{})})]}):t.jsx(Ya,{triggers:a,onEnterEdit:()=>f(!0),disabled:n})})]}),w&&l&&t.jsx(ar,{children:l})]})})}fn.propTypes={style:U.object,onSubmit:U.func,onChange:U.func,label:U.string,initialValue:U.string,required:U.bool,disabled:U.bool,triggers:U.array,options:U.array,helperText:U.string,formatterBeforeSubmit:U.func,placeholder:U.string,renderImage:U.func,filterKeys:U.arrayOf(U.string),noEmpty:U.bool,renderLabel:U.func};fn.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:e=>e.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(e,n)=>"",noEmpty:!1};const jr=ye.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as j,cN as O}from"./index-
|
|
1
|
+
import{g as j,cN as O}from"./index-Dpawm4Ki.js";function N(i,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const e in a)if(e!=="default"&&!(e in i)){const s=Object.getOwnPropertyDescriptor(a,e);s&&Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var d={default:O,call:function(i,t,r){var a="";typeof t=="function"&&(r=t,t={});var e={data:t===void 0?null:t};if(typeof r=="function"){var s="dscb"+window.dscb++;window[s]=r,e._dscbstub=s}return e=JSON.stringify(e),window._dsbridge?a=_dsbridge.call(i,e):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(a=prompt("_dsbridge="+i,e)),JSON.parse(a||"{}").data},register:function(i,t,r){var a=r?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){d.call("_dsb.dsinit")},0)),typeof t=="object"?a._obs[i]=t:a[i]=t},registerAsyn:function(i,t){this.register(i,t,!0)},hasNativeMethod:function(i,t){return this.call("_dsb.hasNativeMethod",{name:i,type:t||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};(function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:d,close:function(){d.call("_dsb.closePage")},_handleMessageFromNative:function(r){var a=JSON.parse(r.data),e={id:r.callbackId,complete:!0},s=this._dsf[r.method],o=this._dsaf[r.method],p=function(u,_){e.data=u.apply(_,a),d.call("_dsb.returnValue",e)},v=function(u,_){a.push(function(w,y){e.data=w,e.complete=y!==!1,d.call("_dsb.returnValue",e)}),u.apply(_,a)};if(s)p(s,this._dsf);else if(o)v(o,this._dsaf);else{var l=r.method.split(".");if(l.length<2)return;var g=l.pop(),b=l.join("."),c=this._dsf._obs,f=c[b]||{},n=f[g];if(n&&typeof n=="function"){p(n,f);return}if(c=this._dsaf._obs,f=c[b]||{},n=f[g],n&&typeof n=="function"){v(n,f);return}}}};for(var t in i)window[t]=i[t];d.register("_hasJavascriptMethod",function(r,a){var e=r.split(".");if(e.length<2)return!!(_dsf[e]||_dsaf[e]);var r=e.pop(),s=e.join("."),o=_dsf._obs[s]||_dsaf._obs[s];return o&&!!o[r]})}})();var h=d;const J=j(h),k=N({__proto__:null,default:J},[h]);export{k as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as ge,n as N,P as S,r as D,f as ke,j as e,C as V,i as je,u as me,t as K,v as ye,w as Ce,D as ve,B as z,x as Se,m as E,y as Be,z as we,A as de,E as $,F as De,d as Te,H as Ae,J as Ee,K as se,M as Ie,N as W,O as oe,Q as j,R as Le,S as R,U as Pe,V as Re,X as _e}from"./index-
|
|
1
|
+
import{q as ge,n as N,P as S,r as D,f as ke,j as e,C as V,i as je,u as me,t as K,v as ye,w as Ce,D as ve,B as z,x as Se,m as E,y as Be,z as we,A as de,E as $,F as De,d as Te,H as Ae,J as Ee,K as se,M as Ie,N as W,O as oe,Q as j,R as Le,S as R,U as Pe,V as Re,X as _e}from"./index-Dpawm4Ki.js";import{_ as Fe}from"./useLocalStorage-C-9FT6wS.js";import{g as Ne,D as Ue}from"./index-vxqr_A7H.js";import{E as Oe}from"./index-DDRhCg0G.js";import{B as ne}from"./status-93gUV3__.js";import{D as Me,u as We,B as le}from"./actions-DI7j7zyh.js";import{l as re}from"./index-BtcEDL3C.js";import{u as pe,W as ze}from"./url-evaluation-BfNZVzn8.js";import{I as $e,B as qe}from"./install-from-url-DrOGJntu.js";import{B as ae}from"./app-avatar-Dp7pMuua.js";import{d as Ve}from"./Add-YuGHCX93.js";import{S as A}from"./index-CupkOe8N.js";import{i as Ke,a as Qe}from"./schema-rBztjvAB.js";import{T as ie}from"./TextField-FjVpB8_i.js";import{F as Xe,S as He}from"./Select-CZslLkS9.js";import"./FilterList-B3q8z3Ai.js";import"./useThemeProps-D2picXH9.js";import"./Delete-ukzbwUp3.js";import"./InputLabel-DiJjRX8c.js";import"./LastPage-BVKCAcZd.js";import"./index-DJs7uyCT.js";import"./redux-B9BtMJgi.js";import"./Search-DPoHYjEM.js";import"./MoreVert-72FLA6F7.js";import"./ButtonGroup-Dk1mLt3h.js";import"./getValidReactChildren-anMSyFv4.js";import"./isEqual-DvDsjofF.js";import"./index-CUnYmZv8.js";import"./Stepper-C2cskkxs.js";import"./ExpandMore-BzXUe6hQ.js";import"./index-l9RwTjEt.js";const Je=(p,c)=>{if(!p)return"";const m=new URL(p),l=new URLSearchParams(m.searchParams),b=new URL(ge(m.origin,c));return b.search=l.toString(),b.toString()};function F({blocklet:p,skipAccessibilityCheck:c=!1,...m}){const{t:l}=D.useContext(ke),{urls:b,loading:n,recommendedUrl:u}=pe(p);if(n&&!c)return e.jsx(V,{size:12,...m});const f=c?b[0]:u;return f?e.jsx(Ye,{...m,children:e.jsx(Ge,{children:e.jsx(je,{href:f,target:"_blank",className:"blocklet-interface",underline:"hover",children:l("common.open")})})}):l("blocklet.router.noAccessibleUrl")}const Ge=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
margin: 4px 0;
|
|
4
4
|
`,Ye=N.div`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as R,j as o,C,aw as F,cy as T,A as b,t as W,cs as D,r,aU as _,k as d,q as x,ak as k,ad as E,y as O,av as $,z as q,bk as z,n as A}from"./index-
|
|
1
|
+
import{u as R,j as o,C,aw as F,cy as T,A as b,t as W,cs as D,r,aU as _,k as d,q as x,ak as k,ad as E,y as O,av as $,z as q,bk as z,n as A}from"./index-Dpawm4Ki.js";import{I as K}from"./invitation-B4r3Uuqv.js";import"./index-CoOBWTGS.js";import"./index-D3y-Mq0t.js";import"./sdk-B77IQB17.js";import"./CheckCircle-Cn-sNTZK.js";import"./wrap-locale-CJcLTW-n.js";function M(v){const{api:i,session:f}=F(),{info:s}=R(),c=T(),p=b(),{t:l,locale:m}=W(),{encryptKey:P,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),t=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(t){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",P),u.searchParams.set("inviteId",h);const{data:j}=await i.get(u.href);e=j}return{invitation:n,nextWorkflow:e,needReceiveNFT:t}}),y=r.useCallback(()=>{w(!0)},[]),L=r.useCallback(()=>{if(a.error)throw a.error;return a.value.invitation},[a]),g=r.useCallback(async e=>{e&&E(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const t=n.toString();await f.refresh(),p(`/${t&&`?${t}`}`,{replace:!0})},[c,p,f]);if(a.loading)return o.jsx(C,{});const I=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",a.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(t),g(t))},2e3)},U=()=>{w(!1)};return o.jsxs(B,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:$.create({baseURL:s.launcher.url}).get,onSuccess:I,onClose:U,checkTimeout:5*60*1e3,webWalletUrl:q(s),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(K,{...v,getDataFn:L,createPassportSvg:e=>z(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?y:null})]})}const B=A.div`
|
|
2
2
|
width: 100vw;
|
|
3
3
|
height: 100%;
|
|
4
4
|
min-height: 100vh;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,c as ue,u as Z,e as Ie,aE as Tr,j as e,H as T,aF as ln,aG as Mn,aH as Er,aI as cn,aJ as qe,aK as he,aL as xe,P as u,n as V,t as N,ac as ne,aM as dn,aN as Pr,aO as Ar,aP as Ir,E as le,R as un,m as O,V as te,ax as pe,C as Y,K as ge,B as G,aQ as zn,M as de,Q as ee,f as Dt,S as Bn,aR as Lr,aS as Or,a9 as kr,aT as Fr,aU as Nr,aV as Ur,A as Wn,W as mn,T as fn,k as Q,aW as Rt,a as yt,U as ie,b as et,aX as qn,aY as Hn,aZ as Kn,a_ as $r,a2 as Mr,a$ as zr,b0 as Br,b1 as Wr,b2 as qr,b3 as Hr,b4 as He,a7 as Kr,d as Gn,N as Gr,b5 as Yr,aD as ze,a8 as ft,a5 as pt,b6 as Vr,a6 as vt,i as Yn,O as Xr,b7 as Qr,b8 as we,b9 as _e,ba as Zr,bb as Jr,D as Vn,x as bt,ai as ei,h as ti,at as pn,bc as ni,bd as gn,aj as ri,be as ii,bf as oi,bg as ai}from"./index-
|
|
1
|
+
import{r as p,c as ue,u as Z,e as Ie,aE as Tr,j as e,H as T,aF as ln,aG as Mn,aH as Er,aI as cn,aJ as qe,aK as he,aL as xe,P as u,n as V,t as N,ac as ne,aM as dn,aN as Pr,aO as Ar,aP as Ir,E as le,R as un,m as O,V as te,ax as pe,C as Y,K as ge,B as G,aQ as zn,M as de,Q as ee,f as Dt,S as Bn,aR as Lr,aS as Or,a9 as kr,aT as Fr,aU as Nr,aV as Ur,A as Wn,W as mn,T as fn,k as Q,aW as Rt,a as yt,U as ie,b as et,aX as qn,aY as Hn,aZ as Kn,a_ as $r,a2 as Mr,a$ as zr,b0 as Br,b1 as Wr,b2 as qr,b3 as Hr,b4 as He,a7 as Kr,d as Gn,N as Gr,b5 as Yr,aD as ze,a8 as ft,a5 as pt,b6 as Vr,a6 as vt,i as Yn,O as Xr,b7 as Qr,b8 as we,b9 as _e,ba as Zr,bb as Jr,D as Vn,x as bt,ai as ei,h as ti,at as pn,bc as ni,bd as gn,aj as ri,be as ii,bf as oi,bg as ai}from"./index-Dpawm4Ki.js";import{T as si}from"./index-04gl6pO4.js";import{d as li}from"./ArrowDropDown-Dq_r4Xqb.js";import{u as Tt,C as re,a as hn}from"./index.esm-Lol3I37E.js";import{S as Ce}from"./switch-control-Dd1suGf_.js";import{d as Xn,i as ci}from"./is-path-prefix-equal-BsUunwOH.js";import{T as K,F as di}from"./TextField-FjVpB8_i.js";import{D as Qn,g as ui}from"./index-vxqr_A7H.js";import{d as Zn}from"./Link-D21zoGLh.js";import{d as Le}from"./Delete-ukzbwUp3.js";import{C as Et}from"./delete-confirm-BG1I5J0u.js";import{I as Ke}from"./index-CUnYmZv8.js";import{s as mi}from"./logo-BKA11TRi.js";import{_ as fi}from"./useLocalStorage-C-9FT6wS.js";import{L as pi}from"./LoadingButton-C-VdleqP.js";import{C as gi,d as Jn}from"./Public-DwfXfE3x.js";import{d as Pt}from"./Add-YuGHCX93.js";import{a as hi,W as Be}from"./url-evaluation-BfNZVzn8.js";import{B as er,D as xn,R as xi,a as yi}from"./status-93gUV3__.js";import{d as vi}from"./CheckCircle-Cn-sNTZK.js";import{d as bi}from"./ExpandMore-BzXUe6hQ.js";import{d as ji}from"./ChevronRight-DakQosJn.js";import{d as Ci}from"./MoreVert-72FLA6F7.js";import{d as tr}from"./Edit-qncNJ4F1.js";import{d as Si,a as nr}from"./Https-c9HUx4_F.js";import{w as wi}from"./withStyles-D9ls3p7Y.js";import{S as _i}from"./Slider-BXYbXQK6.js";import"./index-TFGhlmJg.js";import"./Select-CZslLkS9.js";import"./InputLabel-DiJjRX8c.js";import"./FilterList-B3q8z3Ai.js";import"./useThemeProps-D2picXH9.js";import"./LastPage-BVKCAcZd.js";import"./index-DJs7uyCT.js";import"./redux-B9BtMJgi.js";import"./Search-DPoHYjEM.js";import"./index-DDRhCg0G.js";import"./click-to-copy-qnXvH47O.js";import"./shorten-label-MAGXebJW.js";const fe="Dashboard",rr=p.createContext({}),{Provider:Di,Consumer:ds}=rr,yn=[fe,T.DOMAIN_FOR_IP_SITE,T.DOMAIN_FOR_IP_SITE_REGEXP],Ri=(t,n)=>{if(t.name===T.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===T.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=yn.includes(t.name),i=yn.includes(n.name);return r&&i?cn(t.name,n.name):r?-1:i?1:cn(t.name,n.name)},Ti=({sites:t,nodePort:n})=>{const r=window.location.host,o=(t||[]).map(a=>{const{id:l,rules:c=[],corsAllowedOrigins:h=[]}=a;let{domain:d,domainAliases:m}=a;m=m||[],[T.DOMAIN_FOR_IP_SITE,T.DOMAIN_FOR_IP_SITE_REGEXP].includes(d)&&(d=fe,m.find(f=>f.value===r)||m.unshift({protected:!1,value:r}));const g={id:l,name:d,type:"domain",items:[],domainAliases:m,isProtected:a.isProtected,corsAllowedOrigins:h};return(c||[]).forEach(f=>{const{id:y,isProtected:b,from:{pathPrefix:v},to:C}=f;if(C.type===T.ROUTING_RULE_TYPES.BLOCKLET){let R="";Number.parseInt(C.port,10)===Number.parseInt(n,10)?(R="Blocklet Server Dashboard",C.type=T.ROUTING_RULE_TYPES.DAEMON):R=C.did,g.items.push({id:y,name:ln(v||"/"),title:R,type:"rule",isProtected:b,pathPrefix:v,to:C})}else g.items.push({id:y,pathPrefix:v,name:ln(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:b,to:C})}),g.items=Mn(g.items,f=>f.name),g}).sort(Ri),s=o.reduce((a,l)=>{let{name:c}=l;return c.endsWith(T.BLOCKLET_SITE_GROUP_SUFFIX)&&([c]=c.split(".")),a[c]={...l,rules:l.items},a},{});return{sites:o,siteMap:s}},Ei=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const s=i[t];if(!s)return null;const a=n||(s.domainAliases||[])[0];if(!a)return null;let l=r;if(!l){const c=s.rules.filter(h=>!h.name.startsWith(T.WELLKNOWN_PATH_PREFIX))[0];l=c?c.name:"/"}return qe(a.value,l,o)},Pi=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const s=o.domainAliases||[];if(!s.length)return[];let a=n;if(!a){const l=o.rules.filter(c=>!c.name.startsWith(T.WELLKNOWN_PATH_PREFIX))[0];a=l?l.name:"/"}return s.map(l=>qe(l.value,a,i))},Ai=t=>{const n=t.map(i=>i.domain).filter(i=>![T.DOMAIN_FOR_IP_SITE_REGEXP,T.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function vn({children:t}){const n=ue(),{info:r}=Z(),[i,o]=p.useState([]),[s,a]=p.useState([]),[l,c]=p.useState([]),h=Ie(async()=>{const{sites:S}=await n.getRoutingSites({input:{snapshotHash:""}}),E=S||[];await Promise.all(E.map(async w=>(w.domainAliases=await Tr(w.domainAliases,{getIP:Er}),w)));const L=Ai(E);o(E),a(L.domains),c([window.location.hostname,...L.domains,...L.domainsAliases.map(w=>w.value)])},[r]),d=(S,E)=>{o(L=>L.map(w=>w.id===S?E.domain?E:{...E,domain:w.domain}:w))},m=S=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(S)}}),g=async S=>{const E=await n.addRoutingSite({input:S});o(i.concat(E.site))},f=async(S,E)=>{const L=await n.updateRoutingSite({input:{id:S,...E}});if(L.site&&L.site.id){const w=i.findIndex(P=>P.id===L.site.id);w!==-1&&(i.splice(w,1,L.site),o([].concat(i)))}},y=async S=>{await n.deleteRoutingSite({input:{id:S}}),o(i.filter(E=>E.id!==S))},b=async(S,E,L)=>{const w=await n.addDomainAlias({input:{id:S,domainAlias:E,force:L}});d(S,w.site)},v=async(S,E)=>{const L=await n.deleteDomainAlias({input:{id:S,domainAlias:E}});d(S,L.site)},C=async(S,E)=>{const{site:L}=await n.addRoutingRule({input:{id:S,rule:E}});d(S,L)},R=async(S,E)=>{const{site:L}=await n.updateRoutingRule({input:{id:S,rule:E}});d(S,L)},j=async(S,E)=>{const{site:L}=await n.deleteRoutingRule({input:{id:S,ruleId:E}});d(S,L)},x={loading:h.loading,error:h.error,refresh:h.retry,api:n,actions:{addSite:g,updateSite:f,deleteSite:y,addDomainAlias:b,deleteDomainAlias:v,takeSnapshot:m,addRule:C,updateRule:R,deleteRule:j}},{sites:I,siteMap:D}=Ti({sites:i,nodePort:r.port});return x.sites=I,x.siteMap=D,x.domains=s,x.allDomains=l,x.getBlockletUrl=({did:S,domain:E,mountPoint:L,params:w})=>Ei({did:S,domain:E,mountPoint:L,siteMap:x.siteMap,params:w}),x.getBlockletUrls=({did:S,mountPoint:E,params:L})=>Pi({did:S,mountPoint:E,siteMap:x.siteMap,params:L}),e.jsx(Di,{value:{routing:x},children:t})}function ae(){const{routing:t}=p.useContext(rr);return t}function At(t){const n=[T.DOMAIN_FOR_IP_SITE_REGEXP,T.DOMAIN_FOR_DEFAULT_SITE,T.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var It={},Ii=xe;Object.defineProperty(It,"__esModule",{value:!0});var ir=It.default=void 0,Li=Ii(he()),Oi=e;ir=It.default=(0,Li.default)((0,Oi.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function ki(){return null}function Lt({confirm:t}){const[n,r]=p.useState(null),{t:i}=N(),o=()=>{r(null)},s=async l=>{if(l){let c=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";c==="/"?dn.push(`${l.pathname}`):(c.endsWith("/")&&(c=c.substring(0,c.length-1)),dn.push(`${c}${l.pathname}`)),window.location.reload()}},a=(l,...c)=>{let h=typeof t=="function"?t(l,...c):t;return h?(typeof h=="string"&&(h={description:h}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>s(l),onCancel:()=>o(),...h}),!1):!0};return e.jsxs(Fi,{children:[e.jsx(ki,{message:a}),n&&e.jsx(ne,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}Lt.propTypes={confirm:u.oneOfType([u.object,u.string,u.func])};Lt.defaultProps={confirm:null};const Fi=V.div`
|
|
2
2
|
margin-bottom: 24px;
|
|
3
3
|
.top-btns-alert {
|
|
4
4
|
@media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,m as i,P as e,d4 as c,d5 as f,s as u}from"./index-
|
|
1
|
+
import{j as r,m as i,P as e,d4 as c,d5 as f,s as u}from"./index-Dpawm4Ki.js";function l({name:t,nameFormatter:o,layout:a,children:n,valueComponent:s,nameWidth:m,...p}){return r.jsxs(d,{layout:a,width:m,...p,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:o(t)}),n&&r.jsx(i,{color:"textPrimary",component:s,className:"info-row__value",children:n})]})}l.propTypes={name:e.any.isRequired,layout:e.oneOf(["horizontal","vertical"]),children:e.any,nameFormatter:e.func,valueComponent:e.string,nameWidth:e.number};l.defaultProps={children:null,nameWidth:90,nameFormatter:t=>{const o=t.split(" ").map(a=>c(f(a))).join(" ");return typeof t=="string"?o:t},valueComponent:"div",layout:"horizontal"};const d=u("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
|
|
4
4
|
justify-content: flex-start;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as p,ci as X,cj as F,ck as O,cl as H,aK as q,aL as G,j as s,n as R,P as y,J,aO as Q,f as V,cm as K,y as I,Q as x,cd as Y,W as Z,B as M,m as D,O as ee,cn as te,bn as se,co as ae,cp as ne,u as oe,z as re,am as ie,bk as ce,ad as le}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CD-UcGPr.js","./index-Dpawm4Ki.js","./index-BEj64JY8.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as p,ci as X,cj as F,ck as O,cl as H,aK as q,aL as G,j as s,n as R,P as y,J,aO as Q,f as V,cm as K,y as I,Q as x,cd as Y,W as Z,B as M,m as D,O as ee,cn as te,bn as se,co as ae,cp as ne,u as oe,z as re,am as ie,bk as ce,ad as le}from"./index-Dpawm4Ki.js";import{d as pe}from"./CheckCircle-Cn-sNTZK.js";import{d as de}from"./ViewList-BWR6vvRA.js";import{d as ue}from"./Done-CvSFHISO.js";import{w as me}from"./wrap-locale-CJcLTW-n.js";import{S as fe,a as he,b as xe}from"./Stepper-C2cskkxs.js";var S=function(e){if(!e)return 0;var r=H(e).valueOf()-Date.now();return r<0?0:r},ge=function(e){return{days:Math.floor(e/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},ve=function(e){e===void 0&&(e={});var r=e||{},l=r.leftTime,i=r.targetDate,d=r.interval,v=d===void 0?1e3:d,b=r.onEnd,g=p.useMemo(function(){return X(l)&&l>0?Date.now()+l:void 0},[l]),a="leftTime"in e?g:i,f=F(p.useState(function(){return S(a)}),2),h=f[0],u=f[1],n=O(b);p.useEffect(function(){if(!a){u(0);return}u(S(a));var w=setInterval(function(){var o,c=S(a);u(c),c===0&&(clearInterval(w),(o=n.current)===null||o===void 0||o.call(n))},v);return function(){return clearInterval(w)}},[a,v]);var j=p.useMemo(function(){return ge(h)},[h]);return[h,j]},k={},be=G;Object.defineProperty(k,"__esModule",{value:!0});var E=k.default=void 0,we=be(q()),je=s;E=k.default=(0,we.default)((0,je.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");function T({list:e,width:r,height:l,cardSpace:i,onSelect:d,defaultIndex:v}){const[b,g]=p.useState(0),[a,f]=p.useState(0),h=p.useRef(null),u=o=>{if(o<0||o>e.length-1)return;g(o);const c=h.current.clientWidth;f(o*(r+i)-(c-r)/2+i*.5),d(o)};p.useEffect(()=>{u(v);const o=c=>c.preventDefault();h.current.addEventListener("touchmove",o,{passive:!1})},[]);let n;const j=o=>{n=o.touches[0].clientX},w=o=>{const c=o.changedTouches[0],P=n-c.clientX;Math.abs(P)>60&&(P>0?u(b+1):u(b-1))};return s.jsx(ye,{ref:h,onTouchStart:j,onTouchEnd:w,children:s.jsx("div",{className:"card-container",style:{transform:`translate(${-a}px, 0)`},children:e.map((o,c)=>s.jsx("div",{className:`card-item ${c===b?"selected":""}`,style:{width:r,height:l,margin:i/2},onClick:()=>u(c),children:s.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:o.src}})},o.id))})})}const ye=R.div`
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
|
|
5
5
|
overflow: hidden;
|
|
@@ -33,7 +33,7 @@ import{r as p,ci as X,cj as F,ck as O,cl as H,aK as q,aL as G,j as s,n as R,P as
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`;T.propTypes={list:y.array,width:y.number,height:y.number,cardSpace:y.number,onSelect:y.func,defaultIndex:y.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};const $=()=>{const{searchParams:e}=new URL(window.location.href);return e.get("fromWallet")==="1"};function Pe({icon:e,active:r,completed:l}){const i={1:s.jsx(de,{className:"step-icon"}),2:s.jsx(E,{className:"step-icon"}),3:s.jsx(ue,{className:"step-icon"})},d=["step-icon-w"];return r&&d.push("step-icon-w--active"),l&&d.push("step-icon-w--completed"),s.jsx("div",{className:d.join(" "),children:i[String(e)]})}function Se({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:d}){const{api:v,session:b}=p.useContext(e),g=J(t=>t.breakpoints.down("sm")),a=Q({user:null,passport:null,success:!1,activeStep:0}),f=p.useRef({sessionToken:"",refreshToken:""}),{setPassportId:h,clearPassportId:u}=ne(),{t:n,locale:j}=p.useContext(V),{wallet:w}=K(),[o,c]=p.useState(0),{searchParams:P}=new URL(window.location.href),C=()=>{a.activeStep++},W=t=>{a.user=t.user},A=()=>{C()},z=(t,m)=>{t!=null&&t.passportId&&h(t.passportId),t!=null&&t.sessionToken&&(f.current.sessionToken=m(t.sessionToken)),t!=null&&t.refreshToken&&(f.current.refreshToken=m(t.refreshToken)),a.success=!0,C()},U=()=>new Promise(t=>{try{b.logout(()=>{t()})}catch{t()}}),L=async()=>{if(w&&$()){se(()=>import("./index-
|
|
36
|
+
`;T.propTypes={list:y.array,width:y.number,height:y.number,cardSpace:y.number,onSelect:y.func,defaultIndex:y.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};const $=()=>{const{searchParams:e}=new URL(window.location.href);return e.get("fromWallet")==="1"};function Pe({icon:e,active:r,completed:l}){const i={1:s.jsx(de,{className:"step-icon"}),2:s.jsx(E,{className:"step-icon"}),3:s.jsx(ue,{className:"step-icon"})},d=["step-icon-w"];return r&&d.push("step-icon-w--active"),l&&d.push("step-icon-w--completed"),s.jsx("div",{className:d.join(" "),children:i[String(e)]})}function Se({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:d}){const{api:v,session:b}=p.useContext(e),g=J(t=>t.breakpoints.down("sm")),a=Q({user:null,passport:null,success:!1,activeStep:0}),f=p.useRef({sessionToken:"",refreshToken:""}),{setPassportId:h,clearPassportId:u}=ne(),{t:n,locale:j}=p.useContext(V),{wallet:w}=K(),[o,c]=p.useState(0),{searchParams:P}=new URL(window.location.href),C=()=>{a.activeStep++},W=t=>{a.user=t.user},A=()=>{C()},z=(t,m)=>{t!=null&&t.passportId&&h(t.passportId),t!=null&&t.sessionToken&&(f.current.sessionToken=m(t.sessionToken)),t!=null&&t.refreshToken&&(f.current.refreshToken=m(t.refreshToken)),a.success=!0,C()},U=()=>new Promise(t=>{try{b.logout(()=>{t()})}catch{t()}}),L=async()=>{if(w&&$()){se(()=>import("./index-CD-UcGPr.js").then(m=>m.i),__vite__mapDeps([0,1,2]),import.meta.url).then(m=>{m.call("arcClosePage")});return}await U(),ae(d)&&d({sessionToken:f.current.sessionToken,refreshToken:f.current.refreshToken});const t=P.get("redirect");if(t){window.location.replace(t);return}u(),window.location.replace("/")},B=t=>{a.passport=t.target.value},[N]=ve({leftTime:o,onEnd:()=>{L()}}),_=[{label:n("lostPassport.selectPassport"),content:()=>a.user?s.jsxs(x,{className:"select-passport",children:[s.jsxs(x,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[s.jsx(Y,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),s.jsxs(x,{children:[s.jsx(x,{className:"name",children:a.user.fullName}),s.jsx(x,{className:"did",mt:1,children:s.jsx(Z,{responsive:!g,compact:g,did:a.user.did})})]})]}),s.jsx("div",{children:s.jsx(T,{width:g?180:230,height:g?240:306,cardSpace:24,list:a.user.passportTypes.map(t=>({src:l({title:t.title,issuer:t.issuer.name,issuerDid:t.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:i||"auto"}),name:t.title,id:t.id})),onSelect:t=>B({target:{value:a.user.passportTypes[t].name}}),defaultIndex:0})}),s.jsx(x,{textAlign:"center",children:s.jsx(M,{variant:"contained",color:"primary",onClick:()=>A(),disabled:!a.passport,children:n("common.next")})})]}):s.jsx(I,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:v.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:W,locale:j,messages:{title:n("lostPassport.dialog.title"),scan:n("lostPassport.dialog.scan"),confirm:n("lostPassport.dialog.confirm"),success:n("lostPassport.dialog.success")}})},{label:n("lostPassport.receivePassport"),content:()=>{var m;const t={receiverDid:a.user.did,passportName:a.passport,teamDid:((m=window==null?void 0:window.blocklet)==null?void 0:m.did)||""};return s.jsx(I,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:v.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:z,locale:j,messages:{title:`${n("lostPassport.dialog.title")}`,scan:n("lostPassport.dialog.scan"),confirm:n("lostPassport.dialog.confirm"),success:n("lostPassport.dialog.success")},extraParams:t})}},{label:n("common.complete"),content:()=>(o===0&&c(3e3),s.jsxs(x,{textAlign:"center",children:[s.jsx(x,{mb:3,color:"success.main",children:s.jsx(pe,{style:{fontSize:60}})}),s.jsx(D,{component:"p",variant:"body1",className:"subheader",children:n("issuePassport.dialog.success")}),s.jsx(D,{component:"p",variant:"body2",color:"gray",children:w&&$()?n("issuePassport.dialog.autoClose",{seconds:Math.round(N/1e3)}):n("issuePassport.dialog.autoJump",{seconds:Math.round(N/1e3)})}),s.jsx(M,{style:{marginTop:40},variant:"contained",color:"primary",onClick:L,children:n("issuePassport.dialog.loginWithPassport")})]}))}];return s.jsx(ke,{children:s.jsxs("div",{className:"stepper",children:[s.jsx(fe,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:_.map(({label:t})=>s.jsx(he,{children:s.jsx(xe,{StepIconComponent:Pe,children:t})},t))}),s.jsx("div",{className:"stepper-content",children:_[a.activeStep].content()}),!a.success&&s.jsx(x,{textAlign:"center",fontSize:12,children:s.jsx(ee,{to:"/",style:{color:"#4598FA"},children:n("lostPassport.return")})})]})})}const ke=R(te)`
|
|
37
37
|
padding-top: 46px;
|
|
38
38
|
padding-bottom: 46px;
|
|
39
39
|
height: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as o,s as C,j as n,Q as u,aK as x,aL as g,ai as j,t as T}from"./index-
|
|
1
|
+
import{P as o,s as C,j as n,Q as u,aK as x,aL as g,ai as j,t as T}from"./index-Dpawm4Ki.js";function i({icon:e,title:t,description:s,extra:I,...O}){return n.jsxs(w,{...O,children:[e,typeof t=="string"?n.jsx(u,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:t}):t,typeof s=="string"?n.jsx(u,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:s}):s,n.jsx(u,{mt:3,children:I})]})}i.propTypes={icon:o.element,title:o.oneOfType([o.string,o.element]),description:o.oneOfType([o.string,o.element]),actions:o.any,extra:o.element};i.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const w=C("div")`
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hf as W,r as L,hg as z,ck as R,f6 as N,hh as x,hi as P,ci as j,hj as S}from"./index-
|
|
1
|
+
import{hf as W,r as L,hg as z,ck as R,f6 as N,hh as x,hi as P,ci as j,hj as S}from"./index-Dpawm4Ki.js";var V=function(r,a){return r===void 0&&(r=[]),a===void 0&&(a=[]),W(r,a)},I=function(r,a,n){var e=L.useRef(),u=L.useRef(0);V(a,e.current)||(u.current+=1),e.current=a,z(r,[u.current],n)},J=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator==null?void 0:navigator.platform:""),B={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:J?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},E={ctrl:function(r){return r.ctrlKey},shift:function(r){return r.shiftKey},alt:function(r){return r.altKey},meta:function(r){return r.type==="keyup"?B.meta.includes(r.keyCode):r.metaKey}};function G(r){return P(r)||j(r)}function Q(r){var a=Object.keys(E).reduce(function(n,e){return E[e](r)?n+1:n},0);return[16,17,18,91,92].includes(r.keyCode)?a:a+1}function T(r,a,n){var e,u;if(!r.key)return!1;if(j(a))return r.keyCode===a?a:!1;var o=a.split("."),s=0;try{for(var c=x(o),l=c.next();!l.done;l=c.next()){var p=l.value,y=E[p],m=B[p.toLowerCase()];(y&&y(r)||m&&m===r.keyCode)&&s++}}catch(k){e={error:k}}finally{try{l&&!l.done&&(u=c.return)&&u.call(c)}finally{if(e)throw e.error}}return n?s===o.length&&Q(r)===o.length?a:!1:s===o.length?a:!1}function U(r,a){return S(r)?r:G(r)?function(n){return T(n,r,a)}:Array.isArray(r)?function(n){return r.find(function(e){return T(n,e,a)})}:function(){return!!r}}var X=["keydown"];function Z(r,a,n){var e=n||{},u=e.events,o=u===void 0?X:u,s=e.target,c=e.exactMatch,l=c===void 0?!1:c,p=e.useCapture,y=p===void 0?!1:p,m=R(a),k=R(r);I(function(){var b,C,K,t=N(s,window);if(t){var q=function(i){var v,g=U(k.current,l),f=g(i),d=G(f)?f:i.key;if(f)return(v=m.current)===null||v===void 0?void 0:v.call(m,i,d)};try{for(var w=x(o),h=w.next();!h.done;h=w.next()){var H=h.value;(K=t==null?void 0:t.addEventListener)===null||K===void 0||K.call(t,H,q,y)}}catch(i){b={error:i}}finally{try{h&&!h.done&&(C=w.return)&&C.call(w)}finally{if(b)throw b.error}}return function(){var i,v,g;try{for(var f=x(o),d=f.next();!d.done;d=f.next()){var M=d.value;(g=t==null?void 0:t.removeEventListener)===null||g===void 0||g.call(t,M,q,y)}}catch(O){i={error:O}}finally{try{d&&!d.done&&(v=f.return)&&v.call(f)}finally{if(i)throw i.error}}}}},[o],s)}export{Z as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,U as u,j as e,dM as p,dN as I,dO as z,dP as b,P as t,ds as E,s as m,dQ as S}from"./index-
|
|
1
|
+
import{r,U as u,j as e,dM as p,dN as I,dO as z,dP as b,P as t,ds as E,s as m,dQ as S}from"./index-Dpawm4Ki.js";import{d as v}from"./ExpandMore-BzXUe6hQ.js";import{B as A}from"./ButtonGroup-Dk1mLt3h.js";function d(s){const{size:f,color:i,menu:a,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),o=r.useRef(null),P=Array.isArray(a)?a.map((n,M)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:M})):a,k=()=>{c(n=>!n)},B=n=>{o.current&&o.current.contains(n.target)||c(!1)},C=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(L,{variant:h,size:f,color:i,ref:o,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:i,children:l}),e.jsx(p,{onClick:k,color:i,...y,"aria-label":"more functions",children:e.jsx(v,{})})]}),e.jsx(O,{open:j,anchorEl:o.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(I,{children:e.jsx(z,{onClickAway:B,children:e.jsx(b,{onClick:C,children:P})})})})]})}d.propTypes={size:t.string,color:t.string,menu:t.oneOfType([t.node,t.array]),children:t.node,variant:t.oneOf(["outlined","contained"]),onClick:t.func,menuButtonProps:t.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:E,menuButtonProps:{}};d.Item=u;const L=m(A)`
|
|
2
2
|
> .MuiButtonBase-root:last-of-type {
|
|
3
3
|
min-width: 2em;
|
|
4
4
|
padding-left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as s,j as t,B as i,gj as r}from"./index-
|
|
1
|
+
import{P as s,j as t,B as i,gj as r}from"./index-Dpawm4Ki.js";function n({children:e,...o}){return t.jsxs(i,{color:"did",variant:"contained",...o,children:[t.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),t.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}n.propTypes={children:s.any};n.defaultProps={children:""};export{n as C};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{aj as X,A as N,r as p,a as Z,b as ee,P as x,t as j,u as P,z as te,au as $,N as _,j as t,y as q,av as se,q as S,m as v,D as M,aw as oe,V as O,ax as re,B as W,C as z,ay as ne,E as K,M as V,az as ae,aA as ie,aB as le,H as ce,aC as B,i as ue,n as H,a9 as de,a4 as pe,a6 as he,a7 as fe,aD as me,a8 as ge,Q as xe}from"./index-Dpawm4Ki.js";import{_ as D}from"./useLocalStorage-C-9FT6wS.js";import{c as be,C as ke,A as ye,D as Se,B as je,S as G,a as Pe,b as we}from"./item-BQ-lq0dH.js";import{d as Re}from"./ArrowDropDown-Dq_r4Xqb.js";import{B as ve}from"./Breadcrumbs-CMvJXPnU.js";import"./index-3regrC4H.js";import"./index-ZG7jWpak.js";import"./index-DDRhCg0G.js";import"./Search-DPoHYjEM.js";import"./index-TFGhlmJg.js";import"./Select-CZslLkS9.js";import"./InputAdornment-CmItI7-a.js";import"./preact.module-DJUF--8d.js";import"./Add-YuGHCX93.js";import"./TextField-FjVpB8_i.js";import"./InputLabel-DiJjRX8c.js";import"./Launch-ixFhPrIJ.js";import"./Done-CvSFHISO.js";import"./DeleteOutline-DWR_h5F3.js";import"./delete-confirm-BG1I5J0u.js";import"./click-to-copy-qnXvH47O.js";import"./shorten-label-MAGXebJW.js";import"./blocklet-xgPL6JoP.js";import"./MoreVert-72FLA6F7.js";import"./ButtonGroup-Dk1mLt3h.js";import"./getValidReactChildren-anMSyFv4.js";function Ce(e){const n=X(),c=N(),[s,o]=D(`sid:blocklet:purchase:${e}`),[l,u]=p.useState(!1),[h,a]=p.useState(null),d=()=>{const{pathname:r,searchParams:m}=new URL(window.location.href),b=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";m.get("sid")&&(o(""),c(r.replace(b,"/"),{replace:!0}))},i=!!(n.get("assetDid")&&s&&n.get("sid")===s);return Z(ee.BlockletEvents.purchaseChange,r=>{r.did===e&&(a(r.session),["declined","confirmed","error"].includes(r.session.status)&&(u(!0),setTimeout(d,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:l,hasPurchased:i,session:h,setSession:a,doRedirect:d}}function E({meta:e,onCancel:n,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:l}=P(),[u,h]=p.useState("both"),[a,d]=p.useState(1),i=te(l),r=$(e,l,s),m=R=>{R!==u&&h(R)},b=()=>{u&&(d(2),u==="verify"&&(window.location.href=r))},k=(R,L)=>{L!=="backdropClick"&&n()},w=()=>{c(r)},f=_.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:se.create({baseURL:S(s,"/store")}).get,onSuccess:w,onClose:n,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:f}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(v,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(v,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:f})]})]})}});const g=M;return t.jsx(g,{title:o("store.purchase.title",{name:f}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:k,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(ke,{action:u,onNext:b,onSelect:m})})})}E.propTypes={...be,storeUrl:x.string.isRequired,handlePaySuccess:x.func};E.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=e},1e3)}};function U({meta:e,buttonText:n,storeUrl:c,isResource:s}){const{t:o}=j(),l=N(),{info:u}=P(),{api:h}=oe(),a=_.isFreeBlocklet(e)===!1,[d,i]=p.useState(!1),{hasPurchased:r}=Ce(e.did),[m,b]=p.useState(!1),[k]=D("instant-blocklet-install",!1),[w,f]=p.useState(!1),g=p.useMemo(()=>d?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[d,o,a]),R=p.useMemo(()=>s?o("blocklet.status.resource"):a?n.purchase:n.launch,[a,n,s]),L=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){b(!0);return}if(k){f(!0);return}if(!a){const C=$(e,u,c);window.location.href=C}}catch(C){K.error(V(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{i(!1)}},Q=()=>{i(!1),b(!1)},Y=y=>{i(!1),f(!1),l(`/blocklets/${y.appDid}/components`)},J=()=>{i(!1),f(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(O,{permission:"mutate_blocklets",children:y=>t.jsx(re,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(W,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer"},disabled:!!(g||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:g?t.jsxs(t.Fragment,{children:[t.jsx(z,{size:16,style:{marginRight:3}}),g]}):R},e.did)})})}),(r||m)&&t.jsx(E,{method:"launch",meta:e,mode:"both",onCancel:Q,storeUrl:c}),w&&t.jsx(q,{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:Y,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ne(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:J})]})}U.propTypes={isResource:x.bool,meta:x.object.isRequired,buttonText:x.shape({purchase:x.string.isRequired,launch:x.string.isRequired}).isRequired,storeUrl:x.string.isRequired};U.defaultProps={isResource:!1};const De=(e,n,c)=>{const s=de(n);return S(c,`/blocklets/${e.did}/?server-url=${s}`)},F=({meta:e,attribute:n,value:c})=>e._formatted?e._formatted[n]:c;function T({blocklet:e,endpoint:n}){const{t:c}=j(),s=P();let o=S(s.imgPrefix,"blocklet.png");const l=n;if(l.startsWith("http")&&e.logo)o=S(l,le(e.did,e.logo,e.version));else{let r=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");r&&(r=`/${r}`),o=S(r,`/blocklet/logo/${e.did}`)}try{const i=new URL(o);i.searchParams.set("v",e.version||+new Date),o=i.href}catch{}const u=(s==null?void 0:s.info.mode)!==ce.NODE_MODES.SERVERLESS,h=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:c("common.purchase"),launch:c("common.launch")},storeUrl:l};let d=null;return u&&(d=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(U,{isResource:!(B.hasStartEngine(e)||B.isGatewayBlocklet(e)||B.isPackBlocklet(e)),...a})})),t.jsx(ue,{href:De(e,s.info,n),style:{color:"initial",textDecoration:"none"},onClick:h,target:"_blank",children:t.jsx(Le,{title:F({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:F({meta:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,button:d})})}T.propTypes={blocklet:x.object.isRequired,endpoint:x.string};T.defaultProps={endpoint:""};function I({storeUrl:e,handleSearchSelect:n,extraFilter:c,...s}){var r;const{locale:o}=j(),l=P(),[u,h]=p.useState({}),a=m=>{h(m)},d=e,i=(r=l==null?void 0:l.info)==null?void 0:r.version;return p.useEffect(()=>{h({})},[d]),t.jsx(ae,{FallbackComponent:ie,resetKeys:[d],children:t.jsx("div",{...s,children:t.jsx(Se,{blockletRender:m=>{const b={...m,endpoint:d};return t.jsx(T,{...b})},baseSearch:!0,endpoint:d,locale:o,onFilterChange:a,onSearchSelect:n,filters:u,extraFilter:c,serverVersion:i})})})}I.propTypes={storeUrl:x.string.isRequired,handleSearchSelect:x.func,extraFilter:x.func};I.defaultProps={handleSearchSelect:null,extraFilter:void 0};const Le=H(je)`
|
|
2
|
+
.ms-highlight {
|
|
3
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
4
|
+
}
|
|
5
|
+
`,Be=pe(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})),A=p.forwardRef(({onChange:e,onDelete:n},c)=>{const{info:s}=P(),{t:o}=j(),[l,u]=p.useState(!1),[h,a]=p.useState(!1),[d,i]=p.useState(-1),r=Be(),[m,b]=D(G),k=Math.max(s.blockletRegistryList.findIndex(f=>f.url===m),0),w=f=>{try{u(!0),i(f);const g=s.blockletRegistryList[f];b(g.url),e(g.url),a(!1)}catch(g){console.error(g),K.error(`${o("store.blockletRegistry.changeFailed")} ${V(g)}`)}finally{u(!1)}};return p.useImperativeHandle(c,()=>({setOpen:a})),t.jsxs(t.Fragment,{children:[t.jsx(W,{classes:{text:r.buttonText},color:"secondary","data-cy":"store-toggle",onClick:()=>{a(!0)},endIcon:t.jsx(Re,{}),children:t.jsx(v,{color:"secondary",children:s.blockletRegistryList[k].name})}),t.jsx(M,{title:o("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:h,onClose:()=>a(!1),children:t.jsxs(he,{className:r.tabPanel,children:[s.blockletRegistryList.map((f,g)=>t.jsxs(fe,{button:!0,disabled:l,selected:k===g,"data-cy":"store-switch",onClick:()=>{if(!l){if(g===k){a(!1);return}w(g)}},children:[d===g&&l&&t.jsx(me,{className:r.iconRoot,children:t.jsx(z,{size:16})}),t.jsx(ge,{children:t.jsx(Pe,{teamDid:s.did,store:f,onDelete:()=>n(f.url)})})]},f.url)),t.jsx(O,{permission:"mutate_node",children:f=>t.jsx(we,{disabled:l||!f,onAdd:e,teamDid:s.did,blockletRegistryList:s.blockletRegistryList})})]})})]})});A.propTypes={onChange:x.func,onDelete:x.func};A.defaultProps={onChange:()=>{},onDelete:()=>{}};const Ee=A;function nt(){const{t:e}=j(),{info:n}=P(),[c]=D(G),{blockletRegistryList:s}=n,o=s.find(r=>c===r.url)||s[0],[l,u]=p.useState(o.url),h=n.routing.adminPath,a=S(window.location.origin,h),d=({detailUrl:r})=>{const m=new URL(r);m.searchParams.set("server-url",a);const b=document.createElement("a");b.setAttribute("target","_blank"),b.setAttribute("href",m.href),b.click()},i=p.useRef(null);return t.jsxs(Ue,{children:[t.jsxs(ve,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[t.jsx(v,{color:"textPrimary",children:e("common.store")}),t.jsx(Ee,{ref:i,onChange:r=>u(r),onDelete:r=>{var m;l===r&&u((m=n.blockletRegistryList[0])==null?void 0:m.url)}})]}),t.jsx(xe,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:t.jsx(v,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),t.jsx(I,{className:"blocklet-list",handleSearchSelect:d,storeUrl:l})]})}const Ue=H.main`
|
|
6
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
+
.store-header {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
margin-bottom: 32px !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.page-header {
|
|
13
|
+
margin-bottom: 16px !important;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.blocklet-list {
|
|
17
|
+
aside:hover {
|
|
18
|
+
height: calc(100vh - 235px);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;export{nt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as o,s as h,Q as p,P as i}from"./index-
|
|
1
|
+
import{r as d,j as o,s as h,Q as p,P as i}from"./index-Dpawm4Ki.js";var a={};Object.defineProperty(a,"__esModule",{value:!0});var f=a.default=void 0;v(d);var c=o;function v(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(y){return Object.getOwnPropertyDescriptor(e,y).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(n){b(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b(e,t,r){return(t=j(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){var t=g(e,"string");return typeof t=="symbol"?t:t+""}function g(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,c.jsx)("svg",u(u({},t),{},{children:(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.361 2.4a.8.8 0 0 0-.728.469L.873 15.54a.8.8 0 0 0-.072.33V27.393a.8.8 0 0 0 .8.8h28.8a.8.8 0 0 0 .8-.8v-11.52a.8.8 0 0 0-.072-.331L25.37 2.869a.8.8 0 0 0-.728-.47H7.361zm-4.96 14.4v9.792h27.2v-9.799a.814.814 0 0 1-.104.007h-7.098l-2.066 3.1a.8.8 0 0 1-.666.356h-8.064a.8.8 0 0 1-.665-.356L8.87 16.8h-6.47zm26.816-1.6H21.97a.8.8 0 0 0-.665.356l-2.067 3.1h-7.208l-2.066-3.1a.8.8 0 0 0-.666-.356H2.785L7.876 4h16.25l5.09 11.2z",fill:"currentColor"})}))};l.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};l.displayName="empty";f=a.default=l;const O=h(p)`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cN as Ie,g as _a,cL as je,r as D,cU as Er,cI as Ea}from"./index-BZAu7qvV.js";import{c as Pa}from"./redux-DM810vAx.js";var Le={exports:{}};Le.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",a=1,o=2,s=9007199254740991,c="[object Arguments]",f="[object Array]",d="[object AsyncFunction]",v="[object Boolean]",b="[object Date]",O="[object Error]",m="[object Function]",S="[object GeneratorFunction]",I="[object Map]",N="[object Number]",G="[object Null]",P="[object Object]",T="[object Promise]",p="[object Proxy]",A="[object RegExp]",$="[object Set]",k="[object String]",Y="[object Symbol]",ue="[object Undefined]",se="[object WeakMap]",Ot="[object ArrayBuffer]",ye="[object DataView]",nn="[object Float32Array]",an="[object Float64Array]",on="[object Int8Array]",un="[object Int16Array]",sn="[object Int32Array]",cn="[object Uint8Array]",fn="[object Uint8ClampedArray]",ln="[object Uint16Array]",dn="[object Uint32Array]",gn=/[\\^$.*+?()[\]{}|]/g,hn=/^\[object .+?Constructor\]$/,pn=/^(?:0|[1-9]\d*)$/,w={};w[nn]=w[an]=w[on]=w[un]=w[sn]=w[cn]=w[fn]=w[ln]=w[dn]=!0,w[c]=w[f]=w[Ot]=w[v]=w[ye]=w[b]=w[O]=w[m]=w[I]=w[N]=w[P]=w[A]=w[$]=w[k]=w[se]=!1;var Tt=typeof Ie=="object"&&Ie&&Ie.Object===Object&&Ie,vn=typeof self=="object"&&self&&self.Object===Object&&self,W=Tt||vn||Function("return this")(),wt=t&&!t.nodeType&&t,Ct=wt&&!0&&e&&!e.nodeType&&e,It=Ct&&Ct.exports===wt,Xe=It&&Tt.process,_t=function(){try{return Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),Et=_t&&_t.isTypedArray;function yn(i,u){for(var l=-1,g=i==null?0:i.length,C=0,y=[];++l<g;){var E=i[l];u(E,l,i)&&(y[C++]=E)}return y}function mn(i,u){for(var l=-1,g=u.length,C=i.length;++l<g;)i[C+l]=u[l];return i}function bn(i,u){for(var l=-1,g=i==null?0:i.length;++l<g;)if(u(i[l],l,i))return!0;return!1}function Dn(i,u){for(var l=-1,g=Array(i);++l<i;)g[l]=u(l);return g}function Sn(i){return function(u){return i(u)}}function On(i,u){return i.has(u)}function Tn(i,u){return i==null?void 0:i[u]}function wn(i){var u=-1,l=Array(i.size);return i.forEach(function(g,C){l[++u]=[C,g]}),l}function Cn(i,u){return function(l){return i(u(l))}}function In(i){var u=-1,l=Array(i.size);return i.forEach(function(g){l[++u]=g}),l}var _n=Array.prototype,En=Function.prototype,me=Object.prototype,Ke=W["__core-js_shared__"],Pt=En.toString,B=me.hasOwnProperty,At=function(){var i=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),kt=me.toString,Pn=RegExp("^"+Pt.call(B).replace(gn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=It?W.Buffer:void 0,be=W.Symbol,Mt=W.Uint8Array,$t=me.propertyIsEnumerable,An=_n.splice,Z=be?be.toStringTag:void 0,xt=Object.getOwnPropertySymbols,kn=Rt?Rt.isBuffer:void 0,Rn=Cn(Object.keys,Object),Ye=ie(W,"DataView"),ce=ie(W,"Map"),Ve=ie(W,"Promise"),Qe=ie(W,"Set"),Je=ie(W,"WeakMap"),fe=ie(Object,"create"),Mn=re(Ye),$n=re(ce),xn=re(Ve),Nn=re(Qe),jn=re(Je),Nt=be?be.prototype:void 0,Ze=Nt?Nt.valueOf:void 0;function ee(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Ln(){this.__data__=fe?fe(null):{},this.size=0}function Hn(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function Un(i){var u=this.__data__;if(fe){var l=u[i];return l===n?void 0:l}return B.call(u,i)?u[i]:void 0}function Fn(i){var u=this.__data__;return fe?u[i]!==void 0:B.call(u,i)}function qn(i,u){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=fe&&u===void 0?n:u,this}ee.prototype.clear=Ln,ee.prototype.delete=Hn,ee.prototype.get=Un,ee.prototype.has=Fn,ee.prototype.set=qn;function X(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Gn(){this.__data__=[],this.size=0}function Bn(i){var u=this.__data__,l=Se(u,i);if(l<0)return!1;var g=u.length-1;return l==g?u.pop():An.call(u,l,1),--this.size,!0}function zn(i){var u=this.__data__,l=Se(u,i);return l<0?void 0:u[l][1]}function Wn(i){return Se(this.__data__,i)>-1}function Xn(i,u){var l=this.__data__,g=Se(l,i);return g<0?(++this.size,l.push([i,u])):l[g][1]=u,this}X.prototype.clear=Gn,X.prototype.delete=Bn,X.prototype.get=zn,X.prototype.has=Wn,X.prototype.set=Xn;function te(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Kn(){this.size=0,this.__data__={hash:new ee,map:new(ce||X),string:new ee}}function Yn(i){var u=Oe(this,i).delete(i);return this.size-=u?1:0,u}function Vn(i){return Oe(this,i).get(i)}function Qn(i){return Oe(this,i).has(i)}function Jn(i,u){var l=Oe(this,i),g=l.size;return l.set(i,u),this.size+=l.size==g?0:1,this}te.prototype.clear=Kn,te.prototype.delete=Yn,te.prototype.get=Vn,te.prototype.has=Qn,te.prototype.set=Jn;function De(i){var u=-1,l=i==null?0:i.length;for(this.__data__=new te;++u<l;)this.add(i[u])}function Zn(i){return this.__data__.set(i,n),this}function ea(i){return this.__data__.has(i)}De.prototype.add=De.prototype.push=Zn,De.prototype.has=ea;function V(i){var u=this.__data__=new X(i);this.size=u.size}function ta(){this.__data__=new X,this.size=0}function ra(i){var u=this.__data__,l=u.delete(i);return this.size=u.size,l}function na(i){return this.__data__.get(i)}function aa(i){return this.__data__.has(i)}function ia(i,u){var l=this.__data__;if(l instanceof X){var g=l.__data__;if(!ce||g.length<r-1)return g.push([i,u]),this.size=++l.size,this;l=this.__data__=new te(g)}return l.set(i,u),this.size=l.size,this}V.prototype.clear=ta,V.prototype.delete=ra,V.prototype.get=na,V.prototype.has=aa,V.prototype.set=ia;function oa(i,u){var l=Te(i),g=!l&&Sa(i),C=!l&&!g&&et(i),y=!l&&!g&&!C&&zt(i),E=l||g||C||y,R=E?Dn(i.length,String):[],M=R.length;for(var _ in i)B.call(i,_)&&!(E&&(_=="length"||C&&(_=="offset"||_=="parent")||y&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||va(_,M)))&&R.push(_);return R}function Se(i,u){for(var l=i.length;l--;)if(Ft(i[l][0],u))return l;return-1}function ua(i,u,l){var g=u(i);return Te(i)?g:mn(g,l(i))}function le(i){return i==null?i===void 0?ue:G:Z&&Z in Object(i)?ha(i):Da(i)}function jt(i){return de(i)&&le(i)==c}function Lt(i,u,l,g,C){return i===u?!0:i==null||u==null||!de(i)&&!de(u)?i!==i&&u!==u:sa(i,u,l,g,Lt,C)}function sa(i,u,l,g,C,y){var E=Te(i),R=Te(u),M=E?f:Q(i),_=R?f:Q(u);M=M==c?P:M,_=_==c?P:_;var j=M==P,q=_==P,x=M==_;if(x&&et(i)){if(!et(u))return!1;E=!0,j=!1}if(x&&!j)return y||(y=new V),E||zt(i)?Ht(i,u,l,g,C,y):da(i,u,M,l,g,C,y);if(!(l&a)){var L=j&&B.call(i,"__wrapped__"),H=q&&B.call(u,"__wrapped__");if(L||H){var J=L?i.value():i,K=H?u.value():u;return y||(y=new V),C(J,K,l,g,y)}}return x?(y||(y=new V),ga(i,u,l,g,C,y)):!1}function ca(i){if(!Bt(i)||ma(i))return!1;var u=qt(i)?Pn:hn;return u.test(re(i))}function fa(i){return de(i)&&Gt(i.length)&&!!w[le(i)]}function la(i){if(!ba(i))return Rn(i);var u=[];for(var l in Object(i))B.call(i,l)&&l!="constructor"&&u.push(l);return u}function Ht(i,u,l,g,C,y){var E=l&a,R=i.length,M=u.length;if(R!=M&&!(E&&M>R))return!1;var _=y.get(i);if(_&&y.get(u))return _==u;var j=-1,q=!0,x=l&o?new De:void 0;for(y.set(i,u),y.set(u,i);++j<R;){var L=i[j],H=u[j];if(g)var J=E?g(H,L,j,u,i,y):g(L,H,j,i,u,y);if(J!==void 0){if(J)continue;q=!1;break}if(x){if(!bn(u,function(K,ne){if(!On(x,ne)&&(L===K||C(L,K,l,g,y)))return x.push(ne)})){q=!1;break}}else if(!(L===H||C(L,H,l,g,y))){q=!1;break}}return y.delete(i),y.delete(u),q}function da(i,u,l,g,C,y,E){switch(l){case ye:if(i.byteLength!=u.byteLength||i.byteOffset!=u.byteOffset)return!1;i=i.buffer,u=u.buffer;case Ot:return!(i.byteLength!=u.byteLength||!y(new Mt(i),new Mt(u)));case v:case b:case N:return Ft(+i,+u);case O:return i.name==u.name&&i.message==u.message;case A:case k:return i==u+"";case I:var R=wn;case $:var M=g&a;if(R||(R=In),i.size!=u.size&&!M)return!1;var _=E.get(i);if(_)return _==u;g|=o,E.set(i,u);var j=Ht(R(i),R(u),g,C,y,E);return E.delete(i),j;case Y:if(Ze)return Ze.call(i)==Ze.call(u)}return!1}function ga(i,u,l,g,C,y){var E=l&a,R=Ut(i),M=R.length,_=Ut(u),j=_.length;if(M!=j&&!E)return!1;for(var q=M;q--;){var x=R[q];if(!(E?x in u:B.call(u,x)))return!1}var L=y.get(i);if(L&&y.get(u))return L==u;var H=!0;y.set(i,u),y.set(u,i);for(var J=E;++q<M;){x=R[q];var K=i[x],ne=u[x];if(g)var Wt=E?g(ne,K,x,u,i,y):g(K,ne,x,i,u,y);if(!(Wt===void 0?K===ne||C(K,ne,l,g,y):Wt)){H=!1;break}J||(J=x=="constructor")}if(H&&!J){var we=i.constructor,Ce=u.constructor;we!=Ce&&"constructor"in i&&"constructor"in u&&!(typeof we=="function"&&we instanceof we&&typeof Ce=="function"&&Ce instanceof Ce)&&(H=!1)}return y.delete(i),y.delete(u),H}function Ut(i){return ua(i,wa,pa)}function Oe(i,u){var l=i.__data__;return ya(u)?l[typeof u=="string"?"string":"hash"]:l.map}function ie(i,u){var l=Tn(i,u);return ca(l)?l:void 0}function ha(i){var u=B.call(i,Z),l=i[Z];try{i[Z]=void 0;var g=!0}catch{}var C=kt.call(i);return g&&(u?i[Z]=l:delete i[Z]),C}var pa=xt?function(i){return i==null?[]:(i=Object(i),yn(xt(i),function(u){return $t.call(i,u)}))}:Ca,Q=le;(Ye&&Q(new Ye(new ArrayBuffer(1)))!=ye||ce&&Q(new ce)!=I||Ve&&Q(Ve.resolve())!=T||Qe&&Q(new Qe)!=$||Je&&Q(new Je)!=se)&&(Q=function(i){var u=le(i),l=u==P?i.constructor:void 0,g=l?re(l):"";if(g)switch(g){case Mn:return ye;case $n:return I;case xn:return T;case Nn:return $;case jn:return se}return u});function va(i,u){return u=u??s,!!u&&(typeof i=="number"||pn.test(i))&&i>-1&&i%1==0&&i<u}function ya(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function ma(i){return!!At&&At in i}function ba(i){var u=i&&i.constructor,l=typeof u=="function"&&u.prototype||me;return i===l}function Da(i){return kt.call(i)}function re(i){if(i!=null){try{return Pt.call(i)}catch{}try{return i+""}catch{}}return""}function Ft(i,u){return i===u||i!==i&&u!==u}var Sa=jt(function(){return arguments}())?jt:function(i){return de(i)&&B.call(i,"callee")&&!$t.call(i,"callee")},Te=Array.isArray;function Oa(i){return i!=null&&Gt(i.length)&&!qt(i)}var et=kn||Ia;function Ta(i,u){return Lt(i,u)}function qt(i){if(!Bt(i))return!1;var u=le(i);return u==m||u==S||u==d||u==p}function Gt(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=s}function Bt(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function de(i){return i!=null&&typeof i=="object"}var zt=Et?Sn(Et):fa;function wa(i){return Oa(i)?oa(i):la(i)}function Ca(){return[]}function Ia(){return!1}e.exports=Ta})(Le,Le.exports);var Aa=Le.exports;const As=_a(Aa);var F;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(F||(F={}));function h(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];if(!e){var o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;o=new Error(t.replace(/%s/g,function(){return n[s++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var gt="dnd-core/INIT_COORDS",qe="dnd-core/BEGIN_DRAG",ht="dnd-core/PUBLISH_DRAG_SOURCE",Ge="dnd-core/HOVER",Be="dnd-core/DROP",ze="dnd-core/END_DRAG";function Xt(e,t){return{type:gt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Pe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(r){return typeof r}:Pe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pe(e)}function ka(e,t,r){return t.split(".").reduce(function(n,a){return n&&n[a]?n[a]:r||null},e)}function Ra(e,t){return e.filter(function(r){return r!==t})}function Pr(e){return Pe(e)==="object"}function Ma(e,t){var r=new Map,n=function(s){r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);var a=[];return r.forEach(function(o,s){o===1&&a.push(s)}),a}function $a(e,t){return e.filter(function(r){return t.indexOf(r)>-1})}var xa={type:gt,payload:{clientOffset:null,sourceClientOffset:null}};function Na(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},a=n.publishSource,o=a===void 0?!0:a,s=n.clientOffset,c=n.getSourceClientOffset,f=e.getMonitor(),d=e.getRegistry();e.dispatch(Xt(s)),ja(r,f,d);var v=Ua(r,f);if(v===null){e.dispatch(xa);return}var b=null;if(s){if(!c)throw new Error("getSourceClientOffset must be defined");La(c),b=c(v)}e.dispatch(Xt(s,b));var O=d.getSource(v),m=O.beginDrag(f,v);Ha(m),d.pinSource(v);var S=d.getSourceType(v);return{type:qe,payload:{itemType:S,item:m,sourceId:v,clientOffset:s||null,sourceClientOffset:b||null,isSourcePublic:!!o}}}}function ja(e,t,r){h(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){h(r.getSource(n),"Expected sourceIds to be registered.")})}function La(e){h(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Ha(e){h(Pr(e),"Item must be an object.")}function Ua(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Fa(e){return function(){var r=e.getMonitor();if(r.isDragging())return{type:ht}}}function ot(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(r){return r===t}):e===t}function qa(e){return function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.clientOffset;Ga(r);var o=r.slice(0),s=e.getMonitor(),c=e.getRegistry();Ba(o,s,c);var f=s.getItemType();return za(o,c,f),Wa(o,s,c),{type:Ge,payload:{targetIds:o,clientOffset:a||null}}}}function Ga(e){h(Array.isArray(e),"Expected targetIds to be an array.")}function Ba(e,t,r){h(t.isDragging(),"Cannot call hover while not dragging."),h(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var a=e[n];h(e.lastIndexOf(a)===n,"Expected targetIds to be unique in the passed array.");var o=r.getTarget(a);h(o,"Expected targetIds to be registered.")}}function za(e,t,r){for(var n=e.length-1;n>=0;n--){var a=e[n],o=t.getTargetType(a);ot(o,r)||e.splice(n,1)}}function Wa(e,t,r){e.forEach(function(n){var a=r.getTarget(n);a.hover(t,n)})}function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kt(Object(r),!0).forEach(function(n){Xa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ka(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),a=e.getRegistry();Ya(n);var o=Ja(n);o.forEach(function(s,c){var f=Va(s,c,a,n),d={type:Be,payload:{dropResult:Yt(Yt({},r),f)}};e.dispatch(d)})}}function Ya(e){h(e.isDragging(),"Cannot call drop while not dragging."),h(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Va(e,t,r,n){var a=r.getTarget(e),o=a?a.drop(n,e):void 0;return Qa(o),typeof o>"u"&&(o=t===0?{}:n.getDropResult()),o}function Qa(e){h(typeof e>"u"||Pr(e),"Drop result must either be an object or undefined.")}function Ja(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Za(e){return function(){var r=e.getMonitor(),n=e.getRegistry();ei(r);var a=r.getSourceId();if(a!=null){var o=n.getSource(a,!0);o.endDrag(r,a),n.unpinSource()}return{type:ze}}}function ei(e){h(e.isDragging(),"Cannot call endDrag while not dragging.")}function ti(e){return{beginDrag:Na(e),publishDragSource:Fa(e),hover:qa(e),drop:Ka(e),endDrag:Za(e)}}var ri=function(t,r){return t===r};function ni(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function ai(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ri;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vt(Object(r),!0).forEach(function(n){ii(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ii(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Jt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function oi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jt,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case gt:case qe:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Ge:return ni(e.clientOffset,r.clientOffset)?e:Qt(Qt({},e),{},{clientOffset:r.clientOffset});case ze:case Be:return Jt;default:return e}}var pt="dnd-core/ADD_SOURCE",vt="dnd-core/ADD_TARGET",yt="dnd-core/REMOVE_SOURCE",We="dnd-core/REMOVE_TARGET";function ui(e){return{type:pt,payload:{sourceId:e}}}function si(e){return{type:vt,payload:{targetId:e}}}function ci(e){return{type:yt,payload:{sourceId:e}}}function fi(e){return{type:We,payload:{targetId:e}}}function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zt(Object(r),!0).forEach(function(n){li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function li(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var di={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function gi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:di,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case qe:return U(U({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case ht:return U(U({},e),{},{isSourcePublic:!0});case Ge:return U(U({},e),{},{targetIds:r.targetIds});case We:return e.targetIds.indexOf(r.targetId)===-1?e:U(U({},e),{},{targetIds:Ra(e.targetIds,r.targetId)});case Be:return U(U({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ze:return U(U({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function hi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case pt:case vt:return e+1;case yt:case We:return e-1;default:return e}}var He=[],mt=[];He.__IS_NONE__=!0;mt.__IS_ALL__=!0;function pi(e,t){if(e===He)return!1;if(e===mt||typeof t>"u")return!0;var r=$a(t,e);return r.length>0}function vi(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Ge:break;case pt:case vt:case We:case yt:return He;case qe:case ht:case ze:case Be:default:return mt}var t=e.payload,r=t.targetIds,n=r===void 0?[]:r,a=t.prevTargetIds,o=a===void 0?[]:a,s=Ma(n,o),c=s.length>0||!ai(n,o);if(!c)return He;var f=o[o.length-1],d=n[n.length-1];return f!==d&&(f&&s.push(f),d&&s.push(d)),s}function yi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return e+1}function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?er(Object(r),!0).forEach(function(n){mi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:vi(e.dirtyHandlerIds,{type:t.type,payload:tr(tr({},t.payload),{},{prevTargetIds:ka(e,"dragOperation.targetIds",[])})}),dragOffset:oi(e.dragOffset,t),refCount:hi(e.refCount,t),dragOperation:gi(e.dragOperation,t),stateId:yi(e.stateId)}}function Di(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ar(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Si(e){var t=e.clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset;return!t||!r||!n?null:Ar(Di(t,n),r)}function Oi(e){var t=e.clientOffset,r=e.initialClientOffset;return!t||!r?null:Ar(t,r)}function Ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ci(e,t,r){return t&&wi(e.prototype,t),e}var Ii=function(){function e(t,r){Ti(this,e),this.store=t,this.registry=r}return Ci(e,[{key:"subscribeToStateChange",value:function(r){var n=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=a.handlerIds;h(typeof r=="function","listener must be a function."),h(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var s=this.store.getState().stateId,c=function(){var d=n.store.getState(),v=d.stateId;try{var b=v===s||v===s+1&&!pi(d.dirtyHandlerIds,o);b||r()}finally{s=v}};return this.store.subscribe(c)}},{key:"subscribeToOffsetChange",value:function(r){var n=this;h(typeof r=="function","listener must be a function.");var a=this.store.getState().dragOffset,o=function(){var c=n.store.getState().dragOffset;c!==a&&(a=c,r())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r);return h(n,"Expected to find a valid source."),this.isDragging()?!1:n.canDrag(this,r)}},{key:"canDropOnTarget",value:function(r){if(!r)return!1;var n=this.registry.getTarget(r);if(h(n,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var a=this.registry.getTargetType(r),o=this.getItemType();return ot(a,o)&&n.canDrop(this,r)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r,!0);if(h(n,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var a=this.registry.getSourceType(r),o=this.getItemType();return a!==o?!1:n.isDragging(this,r)}},{key:"isOverTarget",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!r)return!1;var a=n.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(r),s=this.getItemType();if(s&&!ot(o,s))return!1;var c=this.getTargetIds();if(!c.length)return!1;var f=c.indexOf(r);return a?f===c.length-1:f>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Si(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Oi(this.store.getState().dragOffset)}}]),e}(),_i=0;function Ei(){return _i++}function Ae(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ae=function(r){return typeof r}:Ae=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ae(e)}function Pi(e){h(typeof e.canDrag=="function","Expected canDrag to be a function."),h(typeof e.beginDrag=="function","Expected beginDrag to be a function."),h(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Ai(e){h(typeof e.canDrop=="function","Expected canDrop to be a function."),h(typeof e.hover=="function","Expected hover to be a function."),h(typeof e.drop=="function","Expected beginDrag to be a function.")}function ut(e,t){if(t&&Array.isArray(e)){e.forEach(function(r){return ut(r,!1)});return}h(typeof e=="string"||Ae(e)==="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const rr=typeof je<"u"?je:self,kr=rr.MutationObserver||rr.WebKitMutationObserver;function Rr(e){return function(){const r=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(r),clearInterval(n),e()}}}function ki(e){let t=1;const r=new kr(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Ri=typeof kr=="function"?ki:Rr;class Mi{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,a=t.length-this.index;n<a;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Ri(this.flush),this.requestErrorThrow=Rr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class $i{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class xi{create(t){const r=this.freeTasks,n=r.length?r.pop():new $i(this.onError,a=>r[r.length]=a);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Mr=new Mi,Ni=new xi(Mr.registerPendingError);function ji(e){Mr.enqueueTask(Ni.create(e))}function Li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ui(e,t,r){return t&&Hi(e.prototype,t),e}function Fi(e,t){return zi(e)||Bi(e,t)||Gi(e,t)||qi()}function qi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{cN as Ie,g as _a,cL as je,r as D,cU as Er,cI as Ea}from"./index-Dpawm4Ki.js";import{c as Pa}from"./redux-B9BtMJgi.js";var Le={exports:{}};Le.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",a=1,o=2,s=9007199254740991,c="[object Arguments]",f="[object Array]",d="[object AsyncFunction]",v="[object Boolean]",b="[object Date]",O="[object Error]",m="[object Function]",S="[object GeneratorFunction]",I="[object Map]",N="[object Number]",G="[object Null]",P="[object Object]",T="[object Promise]",p="[object Proxy]",A="[object RegExp]",$="[object Set]",k="[object String]",Y="[object Symbol]",ue="[object Undefined]",se="[object WeakMap]",Ot="[object ArrayBuffer]",ye="[object DataView]",nn="[object Float32Array]",an="[object Float64Array]",on="[object Int8Array]",un="[object Int16Array]",sn="[object Int32Array]",cn="[object Uint8Array]",fn="[object Uint8ClampedArray]",ln="[object Uint16Array]",dn="[object Uint32Array]",gn=/[\\^$.*+?()[\]{}|]/g,hn=/^\[object .+?Constructor\]$/,pn=/^(?:0|[1-9]\d*)$/,w={};w[nn]=w[an]=w[on]=w[un]=w[sn]=w[cn]=w[fn]=w[ln]=w[dn]=!0,w[c]=w[f]=w[Ot]=w[v]=w[ye]=w[b]=w[O]=w[m]=w[I]=w[N]=w[P]=w[A]=w[$]=w[k]=w[se]=!1;var Tt=typeof Ie=="object"&&Ie&&Ie.Object===Object&&Ie,vn=typeof self=="object"&&self&&self.Object===Object&&self,W=Tt||vn||Function("return this")(),wt=t&&!t.nodeType&&t,Ct=wt&&!0&&e&&!e.nodeType&&e,It=Ct&&Ct.exports===wt,Xe=It&&Tt.process,_t=function(){try{return Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),Et=_t&&_t.isTypedArray;function yn(i,u){for(var l=-1,g=i==null?0:i.length,C=0,y=[];++l<g;){var E=i[l];u(E,l,i)&&(y[C++]=E)}return y}function mn(i,u){for(var l=-1,g=u.length,C=i.length;++l<g;)i[C+l]=u[l];return i}function bn(i,u){for(var l=-1,g=i==null?0:i.length;++l<g;)if(u(i[l],l,i))return!0;return!1}function Dn(i,u){for(var l=-1,g=Array(i);++l<i;)g[l]=u(l);return g}function Sn(i){return function(u){return i(u)}}function On(i,u){return i.has(u)}function Tn(i,u){return i==null?void 0:i[u]}function wn(i){var u=-1,l=Array(i.size);return i.forEach(function(g,C){l[++u]=[C,g]}),l}function Cn(i,u){return function(l){return i(u(l))}}function In(i){var u=-1,l=Array(i.size);return i.forEach(function(g){l[++u]=g}),l}var _n=Array.prototype,En=Function.prototype,me=Object.prototype,Ke=W["__core-js_shared__"],Pt=En.toString,B=me.hasOwnProperty,At=function(){var i=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),kt=me.toString,Pn=RegExp("^"+Pt.call(B).replace(gn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=It?W.Buffer:void 0,be=W.Symbol,Mt=W.Uint8Array,$t=me.propertyIsEnumerable,An=_n.splice,Z=be?be.toStringTag:void 0,xt=Object.getOwnPropertySymbols,kn=Rt?Rt.isBuffer:void 0,Rn=Cn(Object.keys,Object),Ye=ie(W,"DataView"),ce=ie(W,"Map"),Ve=ie(W,"Promise"),Qe=ie(W,"Set"),Je=ie(W,"WeakMap"),fe=ie(Object,"create"),Mn=re(Ye),$n=re(ce),xn=re(Ve),Nn=re(Qe),jn=re(Je),Nt=be?be.prototype:void 0,Ze=Nt?Nt.valueOf:void 0;function ee(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Ln(){this.__data__=fe?fe(null):{},this.size=0}function Hn(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function Un(i){var u=this.__data__;if(fe){var l=u[i];return l===n?void 0:l}return B.call(u,i)?u[i]:void 0}function Fn(i){var u=this.__data__;return fe?u[i]!==void 0:B.call(u,i)}function qn(i,u){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=fe&&u===void 0?n:u,this}ee.prototype.clear=Ln,ee.prototype.delete=Hn,ee.prototype.get=Un,ee.prototype.has=Fn,ee.prototype.set=qn;function X(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Gn(){this.__data__=[],this.size=0}function Bn(i){var u=this.__data__,l=Se(u,i);if(l<0)return!1;var g=u.length-1;return l==g?u.pop():An.call(u,l,1),--this.size,!0}function zn(i){var u=this.__data__,l=Se(u,i);return l<0?void 0:u[l][1]}function Wn(i){return Se(this.__data__,i)>-1}function Xn(i,u){var l=this.__data__,g=Se(l,i);return g<0?(++this.size,l.push([i,u])):l[g][1]=u,this}X.prototype.clear=Gn,X.prototype.delete=Bn,X.prototype.get=zn,X.prototype.has=Wn,X.prototype.set=Xn;function te(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Kn(){this.size=0,this.__data__={hash:new ee,map:new(ce||X),string:new ee}}function Yn(i){var u=Oe(this,i).delete(i);return this.size-=u?1:0,u}function Vn(i){return Oe(this,i).get(i)}function Qn(i){return Oe(this,i).has(i)}function Jn(i,u){var l=Oe(this,i),g=l.size;return l.set(i,u),this.size+=l.size==g?0:1,this}te.prototype.clear=Kn,te.prototype.delete=Yn,te.prototype.get=Vn,te.prototype.has=Qn,te.prototype.set=Jn;function De(i){var u=-1,l=i==null?0:i.length;for(this.__data__=new te;++u<l;)this.add(i[u])}function Zn(i){return this.__data__.set(i,n),this}function ea(i){return this.__data__.has(i)}De.prototype.add=De.prototype.push=Zn,De.prototype.has=ea;function V(i){var u=this.__data__=new X(i);this.size=u.size}function ta(){this.__data__=new X,this.size=0}function ra(i){var u=this.__data__,l=u.delete(i);return this.size=u.size,l}function na(i){return this.__data__.get(i)}function aa(i){return this.__data__.has(i)}function ia(i,u){var l=this.__data__;if(l instanceof X){var g=l.__data__;if(!ce||g.length<r-1)return g.push([i,u]),this.size=++l.size,this;l=this.__data__=new te(g)}return l.set(i,u),this.size=l.size,this}V.prototype.clear=ta,V.prototype.delete=ra,V.prototype.get=na,V.prototype.has=aa,V.prototype.set=ia;function oa(i,u){var l=Te(i),g=!l&&Sa(i),C=!l&&!g&&et(i),y=!l&&!g&&!C&&zt(i),E=l||g||C||y,R=E?Dn(i.length,String):[],M=R.length;for(var _ in i)B.call(i,_)&&!(E&&(_=="length"||C&&(_=="offset"||_=="parent")||y&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||va(_,M)))&&R.push(_);return R}function Se(i,u){for(var l=i.length;l--;)if(Ft(i[l][0],u))return l;return-1}function ua(i,u,l){var g=u(i);return Te(i)?g:mn(g,l(i))}function le(i){return i==null?i===void 0?ue:G:Z&&Z in Object(i)?ha(i):Da(i)}function jt(i){return de(i)&&le(i)==c}function Lt(i,u,l,g,C){return i===u?!0:i==null||u==null||!de(i)&&!de(u)?i!==i&&u!==u:sa(i,u,l,g,Lt,C)}function sa(i,u,l,g,C,y){var E=Te(i),R=Te(u),M=E?f:Q(i),_=R?f:Q(u);M=M==c?P:M,_=_==c?P:_;var j=M==P,q=_==P,x=M==_;if(x&&et(i)){if(!et(u))return!1;E=!0,j=!1}if(x&&!j)return y||(y=new V),E||zt(i)?Ht(i,u,l,g,C,y):da(i,u,M,l,g,C,y);if(!(l&a)){var L=j&&B.call(i,"__wrapped__"),H=q&&B.call(u,"__wrapped__");if(L||H){var J=L?i.value():i,K=H?u.value():u;return y||(y=new V),C(J,K,l,g,y)}}return x?(y||(y=new V),ga(i,u,l,g,C,y)):!1}function ca(i){if(!Bt(i)||ma(i))return!1;var u=qt(i)?Pn:hn;return u.test(re(i))}function fa(i){return de(i)&&Gt(i.length)&&!!w[le(i)]}function la(i){if(!ba(i))return Rn(i);var u=[];for(var l in Object(i))B.call(i,l)&&l!="constructor"&&u.push(l);return u}function Ht(i,u,l,g,C,y){var E=l&a,R=i.length,M=u.length;if(R!=M&&!(E&&M>R))return!1;var _=y.get(i);if(_&&y.get(u))return _==u;var j=-1,q=!0,x=l&o?new De:void 0;for(y.set(i,u),y.set(u,i);++j<R;){var L=i[j],H=u[j];if(g)var J=E?g(H,L,j,u,i,y):g(L,H,j,i,u,y);if(J!==void 0){if(J)continue;q=!1;break}if(x){if(!bn(u,function(K,ne){if(!On(x,ne)&&(L===K||C(L,K,l,g,y)))return x.push(ne)})){q=!1;break}}else if(!(L===H||C(L,H,l,g,y))){q=!1;break}}return y.delete(i),y.delete(u),q}function da(i,u,l,g,C,y,E){switch(l){case ye:if(i.byteLength!=u.byteLength||i.byteOffset!=u.byteOffset)return!1;i=i.buffer,u=u.buffer;case Ot:return!(i.byteLength!=u.byteLength||!y(new Mt(i),new Mt(u)));case v:case b:case N:return Ft(+i,+u);case O:return i.name==u.name&&i.message==u.message;case A:case k:return i==u+"";case I:var R=wn;case $:var M=g&a;if(R||(R=In),i.size!=u.size&&!M)return!1;var _=E.get(i);if(_)return _==u;g|=o,E.set(i,u);var j=Ht(R(i),R(u),g,C,y,E);return E.delete(i),j;case Y:if(Ze)return Ze.call(i)==Ze.call(u)}return!1}function ga(i,u,l,g,C,y){var E=l&a,R=Ut(i),M=R.length,_=Ut(u),j=_.length;if(M!=j&&!E)return!1;for(var q=M;q--;){var x=R[q];if(!(E?x in u:B.call(u,x)))return!1}var L=y.get(i);if(L&&y.get(u))return L==u;var H=!0;y.set(i,u),y.set(u,i);for(var J=E;++q<M;){x=R[q];var K=i[x],ne=u[x];if(g)var Wt=E?g(ne,K,x,u,i,y):g(K,ne,x,i,u,y);if(!(Wt===void 0?K===ne||C(K,ne,l,g,y):Wt)){H=!1;break}J||(J=x=="constructor")}if(H&&!J){var we=i.constructor,Ce=u.constructor;we!=Ce&&"constructor"in i&&"constructor"in u&&!(typeof we=="function"&&we instanceof we&&typeof Ce=="function"&&Ce instanceof Ce)&&(H=!1)}return y.delete(i),y.delete(u),H}function Ut(i){return ua(i,wa,pa)}function Oe(i,u){var l=i.__data__;return ya(u)?l[typeof u=="string"?"string":"hash"]:l.map}function ie(i,u){var l=Tn(i,u);return ca(l)?l:void 0}function ha(i){var u=B.call(i,Z),l=i[Z];try{i[Z]=void 0;var g=!0}catch{}var C=kt.call(i);return g&&(u?i[Z]=l:delete i[Z]),C}var pa=xt?function(i){return i==null?[]:(i=Object(i),yn(xt(i),function(u){return $t.call(i,u)}))}:Ca,Q=le;(Ye&&Q(new Ye(new ArrayBuffer(1)))!=ye||ce&&Q(new ce)!=I||Ve&&Q(Ve.resolve())!=T||Qe&&Q(new Qe)!=$||Je&&Q(new Je)!=se)&&(Q=function(i){var u=le(i),l=u==P?i.constructor:void 0,g=l?re(l):"";if(g)switch(g){case Mn:return ye;case $n:return I;case xn:return T;case Nn:return $;case jn:return se}return u});function va(i,u){return u=u??s,!!u&&(typeof i=="number"||pn.test(i))&&i>-1&&i%1==0&&i<u}function ya(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function ma(i){return!!At&&At in i}function ba(i){var u=i&&i.constructor,l=typeof u=="function"&&u.prototype||me;return i===l}function Da(i){return kt.call(i)}function re(i){if(i!=null){try{return Pt.call(i)}catch{}try{return i+""}catch{}}return""}function Ft(i,u){return i===u||i!==i&&u!==u}var Sa=jt(function(){return arguments}())?jt:function(i){return de(i)&&B.call(i,"callee")&&!$t.call(i,"callee")},Te=Array.isArray;function Oa(i){return i!=null&&Gt(i.length)&&!qt(i)}var et=kn||Ia;function Ta(i,u){return Lt(i,u)}function qt(i){if(!Bt(i))return!1;var u=le(i);return u==m||u==S||u==d||u==p}function Gt(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=s}function Bt(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function de(i){return i!=null&&typeof i=="object"}var zt=Et?Sn(Et):fa;function wa(i){return Oa(i)?oa(i):la(i)}function Ca(){return[]}function Ia(){return!1}e.exports=Ta})(Le,Le.exports);var Aa=Le.exports;const As=_a(Aa);var F;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(F||(F={}));function h(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];if(!e){var o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;o=new Error(t.replace(/%s/g,function(){return n[s++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var gt="dnd-core/INIT_COORDS",qe="dnd-core/BEGIN_DRAG",ht="dnd-core/PUBLISH_DRAG_SOURCE",Ge="dnd-core/HOVER",Be="dnd-core/DROP",ze="dnd-core/END_DRAG";function Xt(e,t){return{type:gt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Pe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(r){return typeof r}:Pe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pe(e)}function ka(e,t,r){return t.split(".").reduce(function(n,a){return n&&n[a]?n[a]:r||null},e)}function Ra(e,t){return e.filter(function(r){return r!==t})}function Pr(e){return Pe(e)==="object"}function Ma(e,t){var r=new Map,n=function(s){r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);var a=[];return r.forEach(function(o,s){o===1&&a.push(s)}),a}function $a(e,t){return e.filter(function(r){return t.indexOf(r)>-1})}var xa={type:gt,payload:{clientOffset:null,sourceClientOffset:null}};function Na(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},a=n.publishSource,o=a===void 0?!0:a,s=n.clientOffset,c=n.getSourceClientOffset,f=e.getMonitor(),d=e.getRegistry();e.dispatch(Xt(s)),ja(r,f,d);var v=Ua(r,f);if(v===null){e.dispatch(xa);return}var b=null;if(s){if(!c)throw new Error("getSourceClientOffset must be defined");La(c),b=c(v)}e.dispatch(Xt(s,b));var O=d.getSource(v),m=O.beginDrag(f,v);Ha(m),d.pinSource(v);var S=d.getSourceType(v);return{type:qe,payload:{itemType:S,item:m,sourceId:v,clientOffset:s||null,sourceClientOffset:b||null,isSourcePublic:!!o}}}}function ja(e,t,r){h(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){h(r.getSource(n),"Expected sourceIds to be registered.")})}function La(e){h(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Ha(e){h(Pr(e),"Item must be an object.")}function Ua(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Fa(e){return function(){var r=e.getMonitor();if(r.isDragging())return{type:ht}}}function ot(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(r){return r===t}):e===t}function qa(e){return function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.clientOffset;Ga(r);var o=r.slice(0),s=e.getMonitor(),c=e.getRegistry();Ba(o,s,c);var f=s.getItemType();return za(o,c,f),Wa(o,s,c),{type:Ge,payload:{targetIds:o,clientOffset:a||null}}}}function Ga(e){h(Array.isArray(e),"Expected targetIds to be an array.")}function Ba(e,t,r){h(t.isDragging(),"Cannot call hover while not dragging."),h(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var a=e[n];h(e.lastIndexOf(a)===n,"Expected targetIds to be unique in the passed array.");var o=r.getTarget(a);h(o,"Expected targetIds to be registered.")}}function za(e,t,r){for(var n=e.length-1;n>=0;n--){var a=e[n],o=t.getTargetType(a);ot(o,r)||e.splice(n,1)}}function Wa(e,t,r){e.forEach(function(n){var a=r.getTarget(n);a.hover(t,n)})}function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kt(Object(r),!0).forEach(function(n){Xa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ka(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),a=e.getRegistry();Ya(n);var o=Ja(n);o.forEach(function(s,c){var f=Va(s,c,a,n),d={type:Be,payload:{dropResult:Yt(Yt({},r),f)}};e.dispatch(d)})}}function Ya(e){h(e.isDragging(),"Cannot call drop while not dragging."),h(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Va(e,t,r,n){var a=r.getTarget(e),o=a?a.drop(n,e):void 0;return Qa(o),typeof o>"u"&&(o=t===0?{}:n.getDropResult()),o}function Qa(e){h(typeof e>"u"||Pr(e),"Drop result must either be an object or undefined.")}function Ja(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Za(e){return function(){var r=e.getMonitor(),n=e.getRegistry();ei(r);var a=r.getSourceId();if(a!=null){var o=n.getSource(a,!0);o.endDrag(r,a),n.unpinSource()}return{type:ze}}}function ei(e){h(e.isDragging(),"Cannot call endDrag while not dragging.")}function ti(e){return{beginDrag:Na(e),publishDragSource:Fa(e),hover:qa(e),drop:Ka(e),endDrag:Za(e)}}var ri=function(t,r){return t===r};function ni(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function ai(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ri;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vt(Object(r),!0).forEach(function(n){ii(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ii(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Jt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function oi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jt,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case gt:case qe:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Ge:return ni(e.clientOffset,r.clientOffset)?e:Qt(Qt({},e),{},{clientOffset:r.clientOffset});case ze:case Be:return Jt;default:return e}}var pt="dnd-core/ADD_SOURCE",vt="dnd-core/ADD_TARGET",yt="dnd-core/REMOVE_SOURCE",We="dnd-core/REMOVE_TARGET";function ui(e){return{type:pt,payload:{sourceId:e}}}function si(e){return{type:vt,payload:{targetId:e}}}function ci(e){return{type:yt,payload:{sourceId:e}}}function fi(e){return{type:We,payload:{targetId:e}}}function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zt(Object(r),!0).forEach(function(n){li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function li(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var di={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function gi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:di,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case qe:return U(U({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case ht:return U(U({},e),{},{isSourcePublic:!0});case Ge:return U(U({},e),{},{targetIds:r.targetIds});case We:return e.targetIds.indexOf(r.targetId)===-1?e:U(U({},e),{},{targetIds:Ra(e.targetIds,r.targetId)});case Be:return U(U({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ze:return U(U({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function hi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case pt:case vt:return e+1;case yt:case We:return e-1;default:return e}}var He=[],mt=[];He.__IS_NONE__=!0;mt.__IS_ALL__=!0;function pi(e,t){if(e===He)return!1;if(e===mt||typeof t>"u")return!0;var r=$a(t,e);return r.length>0}function vi(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Ge:break;case pt:case vt:case We:case yt:return He;case qe:case ht:case ze:case Be:default:return mt}var t=e.payload,r=t.targetIds,n=r===void 0?[]:r,a=t.prevTargetIds,o=a===void 0?[]:a,s=Ma(n,o),c=s.length>0||!ai(n,o);if(!c)return He;var f=o[o.length-1],d=n[n.length-1];return f!==d&&(f&&s.push(f),d&&s.push(d)),s}function yi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return e+1}function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?er(Object(r),!0).forEach(function(n){mi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:vi(e.dirtyHandlerIds,{type:t.type,payload:tr(tr({},t.payload),{},{prevTargetIds:ka(e,"dragOperation.targetIds",[])})}),dragOffset:oi(e.dragOffset,t),refCount:hi(e.refCount,t),dragOperation:gi(e.dragOperation,t),stateId:yi(e.stateId)}}function Di(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ar(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Si(e){var t=e.clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset;return!t||!r||!n?null:Ar(Di(t,n),r)}function Oi(e){var t=e.clientOffset,r=e.initialClientOffset;return!t||!r?null:Ar(t,r)}function Ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ci(e,t,r){return t&&wi(e.prototype,t),e}var Ii=function(){function e(t,r){Ti(this,e),this.store=t,this.registry=r}return Ci(e,[{key:"subscribeToStateChange",value:function(r){var n=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=a.handlerIds;h(typeof r=="function","listener must be a function."),h(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var s=this.store.getState().stateId,c=function(){var d=n.store.getState(),v=d.stateId;try{var b=v===s||v===s+1&&!pi(d.dirtyHandlerIds,o);b||r()}finally{s=v}};return this.store.subscribe(c)}},{key:"subscribeToOffsetChange",value:function(r){var n=this;h(typeof r=="function","listener must be a function.");var a=this.store.getState().dragOffset,o=function(){var c=n.store.getState().dragOffset;c!==a&&(a=c,r())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r);return h(n,"Expected to find a valid source."),this.isDragging()?!1:n.canDrag(this,r)}},{key:"canDropOnTarget",value:function(r){if(!r)return!1;var n=this.registry.getTarget(r);if(h(n,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var a=this.registry.getTargetType(r),o=this.getItemType();return ot(a,o)&&n.canDrop(this,r)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r,!0);if(h(n,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var a=this.registry.getSourceType(r),o=this.getItemType();return a!==o?!1:n.isDragging(this,r)}},{key:"isOverTarget",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!r)return!1;var a=n.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(r),s=this.getItemType();if(s&&!ot(o,s))return!1;var c=this.getTargetIds();if(!c.length)return!1;var f=c.indexOf(r);return a?f===c.length-1:f>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Si(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Oi(this.store.getState().dragOffset)}}]),e}(),_i=0;function Ei(){return _i++}function Ae(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ae=function(r){return typeof r}:Ae=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ae(e)}function Pi(e){h(typeof e.canDrag=="function","Expected canDrag to be a function."),h(typeof e.beginDrag=="function","Expected beginDrag to be a function."),h(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Ai(e){h(typeof e.canDrop=="function","Expected canDrop to be a function."),h(typeof e.hover=="function","Expected hover to be a function."),h(typeof e.drop=="function","Expected beginDrag to be a function.")}function ut(e,t){if(t&&Array.isArray(e)){e.forEach(function(r){return ut(r,!1)});return}h(typeof e=="string"||Ae(e)==="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const rr=typeof je<"u"?je:self,kr=rr.MutationObserver||rr.WebKitMutationObserver;function Rr(e){return function(){const r=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(r),clearInterval(n),e()}}}function ki(e){let t=1;const r=new kr(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Ri=typeof kr=="function"?ki:Rr;class Mi{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,a=t.length-this.index;n<a;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Ri(this.flush),this.requestErrorThrow=Rr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class $i{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class xi{create(t){const r=this.freeTasks,n=r.length?r.pop():new $i(this.onError,a=>r[r.length]=a);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Mr=new Mi,Ni=new xi(Mr.registerPendingError);function ji(e){Mr.enqueueTask(Ni.create(e))}function Li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ui(e,t,r){return t&&Hi(e.prototype,t),e}function Fi(e,t){return zi(e)||Bi(e,t)||Gi(e,t)||qi()}function qi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gi(e,t){if(e){if(typeof e=="string")return nr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nr(e,t)}}function nr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bi(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),c;!(n=(c=s.next()).done)&&(r.push(c.value),!(t&&r.length===t));n=!0);}catch(f){a=!0,o=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw o}}return r}}function zi(e){if(Array.isArray(e))return e}function Wi(e){var t=Ei().toString();switch(e){case F.SOURCE:return"S".concat(t);case F.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function ar(e){switch(e[0]){case"S":return F.SOURCE;case"T":return F.TARGET;default:h(!1,"Cannot parse handler ID: ".concat(e))}}function ir(e,t){var r=e.entries(),n=!1;do{var a=r.next(),o=a.done,s=Fi(a.value,2),c=s[1];if(c===t)return!0;n=!!o}while(!n);return!1}var Xi=function(){function e(t){Li(this,e),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}return Ui(e,[{key:"addSource",value:function(r,n){ut(r),Pi(n);var a=this.addHandler(F.SOURCE,r,n);return this.store.dispatch(ui(a)),a}},{key:"addTarget",value:function(r,n){ut(r,!0),Ai(n);var a=this.addHandler(F.TARGET,r,n);return this.store.dispatch(si(a)),a}},{key:"containsHandler",value:function(r){return ir(this.dragSources,r)||ir(this.dropTargets,r)}},{key:"getSource",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;h(this.isSourceId(r),"Expected a valid source ID.");var a=n&&r===this.pinnedSourceId,o=a?this.pinnedSource:this.dragSources.get(r);return o}},{key:"getTarget",value:function(r){return h(this.isTargetId(r),"Expected a valid target ID."),this.dropTargets.get(r)}},{key:"getSourceType",value:function(r){return h(this.isSourceId(r),"Expected a valid source ID."),this.types.get(r)}},{key:"getTargetType",value:function(r){return h(this.isTargetId(r),"Expected a valid target ID."),this.types.get(r)}},{key:"isSourceId",value:function(r){var n=ar(r);return n===F.SOURCE}},{key:"isTargetId",value:function(r){var n=ar(r);return n===F.TARGET}},{key:"removeSource",value:function(r){var n=this;h(this.getSource(r),"Expected an existing source."),this.store.dispatch(ci(r)),ji(function(){n.dragSources.delete(r),n.types.delete(r)})}},{key:"removeTarget",value:function(r){h(this.getTarget(r),"Expected an existing target."),this.store.dispatch(fi(r)),this.dropTargets.delete(r),this.types.delete(r)}},{key:"pinSource",value:function(r){var n=this.getSource(r);h(n,"Expected an existing source."),this.pinnedSourceId=r,this.pinnedSource=n}},{key:"unpinSource",value:function(){h(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(r,n,a){var o=Wi(r);return this.types.set(o,n),r===F.SOURCE?this.dragSources.set(o,a):r===F.TARGET&&this.dropTargets.set(o,a),o}}]),e}();function Ki(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vi(e,t,r){return t&&Yi(e.prototype,t),e}function Qi(e){var t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Pa(bi,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var Ji=function(){function e(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ki(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var a=t.store.getState().refCount>0;t.backend&&(a&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!a&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var n=Qi(r);this.store=n,this.monitor=new Ii(n,new Xi(n)),n.subscribe(this.handleRefCountChange)}return Vi(e,[{key:"receiveBackend",value:function(r){this.backend=r}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var r=this,n=this.store.dispatch;function a(s){return function(){for(var c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];var v=s.apply(r,f);typeof v<"u"&&n(v)}}var o=ti(this);return Object.keys(o).reduce(function(s,c){var f=o[c];return s[c]=a(f),s},{})}},{key:"dispatch",value:function(r){this.store.dispatch(r)}}]),e}();function Zi(e,t,r,n){var a=new Ji(n),o=e(a,t,r);return a.receiveBackend(o),a}var ve=D.createContext({dragDropManager:void 0});function $r(e,t,r,n){return{dragDropManager:Zi(e,t,r,n)}}function eo(e,t){return ao(e)||no(e,t)||ro(e,t)||to()}function to(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ro(e,t){if(e){if(typeof e=="string")return or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return or(e,t)}}function or(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function no(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),c;!(n=(c=s.next()).done)&&(r.push(c.value),!(t&&r.length===t));n=!0);}catch(f){a=!0,o=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw o}}return r}}function ao(e){if(Array.isArray(e))return e}function io(e,t){if(e==null)return{};var r=oo(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oo(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var tt=0,xr=D.memo(function(e){var t=e.children,r=io(e,["children"]),n=uo(r),a=eo(n,2),o=a[0],s=a[1];return D.useEffect(function(){return s&&tt++,function(){if(s&&(tt--,tt===0)){var c=Nr();c[ke]=null}}},[]),D.createElement(ve.Provider,{value:o},t)});xr.displayName="DndProvider";function uo(e){if("manager"in e){var t={dragDropManager:e.manager};return[t,!1]}var r=so(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[r,n]}var ke=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function so(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nr(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,a=t;return a[ke]||(a[ke]=$r(e,t,r,n)),a[ke]}function Nr(){return typeof je<"u"?je:window}var jr=D.memo(function(e){var t=e.connect,r=e.src;return D.useEffect(function(){if(!(typeof Image>"u")){var n=!1,a=new Image;return a.src=r,a.onload=function(){t(a),n=!0},function(){n&&t(null)}}}),null});jr.displayName="DragPreviewImage";var ae=typeof window<"u"?D.useLayoutEffect:D.useEffect;function z(e,t,r,n){var a=r?r.call(n,e,t):void 0;if(a!==void 0)return!!a;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),f=0;f<o.length;f++){var d=o[f];if(!c(d))return!1;var v=e[d],b=t[d];if(a=r?r.call(n,v,b,d):void 0,a===!1||a===void 0&&v!==b)return!1}return!0}function co(e,t){return ho(e)||go(e,t)||lo(e,t)||fo()}function fo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lo(e,t){if(e){if(typeof e=="string")return ur(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ur(e,t)}}function ur(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function go(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),c;!(n=(c=s.next()).done)&&(r.push(c.value),!(t&&r.length===t));n=!0);}catch(f){a=!0,o=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw o}}return r}}function ho(e){if(Array.isArray(e))return e}function Lr(e,t,r){var n=D.useState(function(){return t(e)}),a=co(n,2),o=a[0],s=a[1],c=D.useCallback(function(){var f=t(e);z(o,f)||(s(f),r&&r())},[o,e,r]);return ae(c,[]),[o,c]}function po(e,t){return bo(e)||mo(e,t)||yo(e,t)||vo()}function vo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|