@abtnode/webapp 1.16.29-beta-2eaf40bc → 1.16.29-beta-112566d5
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-3VAJlzWu.js → Add-LTC9ZPHh.js} +1 -1
- package/dist/assets/{ArrowDropDown-DehQx6JH.js → ArrowDropDown-B9TabCUQ.js} +1 -1
- package/dist/assets/{Autocomplete-Dd8-Wnl0.js → Autocomplete-DA6il_1i.js} +1 -1
- package/dist/assets/{Breadcrumbs-B-3iNfJV.js → Breadcrumbs-Ch6zvYxu.js} +1 -1
- package/dist/assets/{ButtonGroup-4dUIbekw.js → ButtonGroup-reI4zw37.js} +1 -1
- package/dist/assets/{CheckCircle-DQOA10VV.js → CheckCircle-ColTEZil.js} +1 -1
- package/dist/assets/{ChevronLeft-BovE6bSi.js → ChevronLeft-n-Lu674N.js} +1 -1
- package/dist/assets/{ChevronRight-COT0_GJ0.js → ChevronRight-BQAiuHlI.js} +1 -1
- package/dist/assets/{Close-DSOnajKv.js → Close-BHCZ0Bw1.js} +1 -1
- package/dist/assets/Delete-CUte0jEQ.js +1 -0
- package/dist/assets/DeleteOutline-Aff6fJia.js +1 -0
- package/dist/assets/{Done-C6j7V5dY.js → Done-Z8bUrs-4.js} +1 -1
- package/dist/assets/{Edit-UiTtw7ED.js → Edit-CAjWk028.js} +1 -1
- package/dist/assets/{EditIcon-D-Dhs8bv.js → EditIcon-5cOXjWt1.js} +1 -1
- package/dist/assets/{ExpandMore-CBwUEwtf.js → ExpandMore-D_XvdPjT.js} +1 -1
- package/dist/assets/{FilterList-BfkrQFl0.js → FilterList-BY5T-hLB.js} +4 -4
- package/dist/assets/{Google-U8HcYuII.js → Google-8ss7z7oB.js} +1 -1
- package/dist/assets/{Https-DJQ_Uk5c.js → Https-CRlx_3vN.js} +1 -1
- package/dist/assets/{InputAdornment-xbC4GBmg.js → InputAdornment-C1r6p7SP.js} +1 -1
- package/dist/assets/{InputLabel-Dyg2n4KM.js → InputLabel-CExB3j6D.js} +1 -1
- package/dist/assets/{LastPage-g6ViU_79.js → LastPage-BlukH42P.js} +1 -1
- package/dist/assets/{Launch-CstW8TMa.js → Launch-yLPtDPJO.js} +1 -1
- package/dist/assets/{Link-Bz3bTK5Z.js → Link-CYdb8X6z.js} +1 -1
- package/dist/assets/{LoadingButton-yzy8vaq4.js → LoadingButton-Cgv6BHxA.js} +1 -1
- package/dist/assets/{LockIcon-C86uaqg6.js → LockIcon-BrZi13Aj.js} +1 -1
- package/dist/assets/{Loop-D_KRqy9W.js → Loop-BZATCgNU.js} +1 -1
- package/dist/assets/{MoreVert-BB46cKFe.js → MoreVert-NYc6koTI.js} +1 -1
- package/dist/assets/{Pagination-JhNJfD4t.js → Pagination-Bpr_MZG3.js} +1 -1
- package/dist/assets/{Public-BjhCkcv9.js → Public-DJVLXFlr.js} +1 -1
- package/dist/assets/{SchemaReference.es-HI-2_6NF.js → SchemaReference.es-CjPEyQC-.js} +1 -1
- package/dist/assets/{Search-rqHI-c1S.js → Search-Dz7VM7PV.js} +1 -1
- package/dist/assets/{Select-BioDM9Sd.js → Select-Bmr7GD2T.js} +2 -2
- package/dist/assets/{Skeleton-DZ26ugSB.js → Skeleton-OnJKCtYu.js} +5 -5
- package/dist/assets/{Slider-CIc45JJ9.js → Slider-CGhiUOe5.js} +1 -1
- package/dist/assets/{Stepper-BXZWzSgf.js → Stepper-CpM3LrYF.js} +1 -1
- package/dist/assets/TextField-BtpuNQ33.js +1 -0
- package/dist/assets/{ToggleButtonGroup-DRfzhnnx.js → ToggleButtonGroup-BoN6aVCj.js} +1 -1
- package/dist/assets/{ViewList-Cm-dAQhY.js → ViewList-Cw1uswUG.js} +1 -1
- package/dist/assets/actions-634dtGmR.js +11 -0
- package/dist/assets/{actions-Bi_LOjPn.js → actions-DGOwZ57C.js} +1 -1
- package/dist/assets/{agreement-DPo8tjJ3.js → agreement-C6HTWVte.js} +1 -1
- package/dist/assets/api-Bo8RrpVh.js +1 -0
- package/dist/assets/{app-avatar-CF6TIYj9.js → app-avatar-B_rQHqOY.js} +1 -1
- package/dist/assets/{audit-logs-DK4wA_bl.js → audit-logs-BzdTb6u7.js} +1 -1
- package/dist/assets/blocklet-CtCpIFeQ.js +1 -0
- package/dist/assets/{brace-fold.es-DwWLXH4V.js → brace-fold.es-D_r4-J2g.js} +1 -1
- package/dist/assets/{bundle-avatar-B6arcSZZ.js → bundle-avatar-Ci6-oNkL.js} +1 -1
- package/dist/assets/{chart-DVdOH_wE.js → chart-D7fTlbH5.js} +1 -1
- package/dist/assets/{click-to-copy-BwGLfwQv.js → click-to-copy-BwIQhcuz.js} +1 -1
- package/dist/assets/{closebrackets.es-piHSryNk.js → closebrackets.es-BpVvbcYW.js} +1 -1
- package/dist/assets/{codemirror.es-BX7gc_SI.js → codemirror.es-BvooWNLt.js} +1 -1
- package/dist/assets/{comment.es-kfTcaTaN.js → comment.es-BiPY7IRp.js} +1 -1
- package/dist/assets/{config-navigation-BjBcMzix.js → config-navigation-eG4f_Oyq.js} +5 -5
- package/dist/assets/{delete-confirm-B6Tu_cjp.js → delete-confirm-I7gjtI2L.js} +1 -1
- package/dist/assets/detail-BF4hjmdI.js +58 -0
- package/dist/assets/{dialog.es-qczXxs5i.js → dialog.es-B2-FUZME.js} +1 -1
- package/dist/assets/{download-hCU_NL5Y.js → download-rpw9Qgoj.js} +1 -1
- package/dist/assets/{foldgutter.es-CNjZdGfG.js → foldgutter.es-8iFRTP0a.js} +1 -1
- package/dist/assets/getValidReactChildren-9TX6zfai.js +1 -0
- package/dist/assets/{hint.es-BcTOFmVv.js → hint.es-CHvxg9mK.js} +1 -1
- package/dist/assets/{hint.es2-Po_QXCs2.js → hint.es2-hI3iweAO.js} +1 -1
- package/dist/assets/{iframe-D60s0j4M.js → iframe-BqS-rkNh.js} +1 -1
- package/dist/assets/{index-By48hREf.js → index--nbglgQ3.js} +1 -1
- package/dist/assets/{index-rYvrv8TX.js → index-B03uYmVa.js} +1 -1
- package/dist/assets/index-B3KTzQCX.js +21 -0
- package/dist/assets/{index--pVRVvBB.js → index-B46J_78A.js} +1 -1
- package/dist/assets/{index-DS0UcZlk.js → index-BAQzBJFH.js} +3 -3
- package/dist/assets/{index-CfMrG-6m.js → index-BIBIrwyW.js} +1 -1
- package/dist/assets/index-BJ5g3x0B.js +1 -0
- package/dist/assets/{index-p_USl--w.js → index-BMAflILV.js} +1 -1
- package/dist/assets/{index-B_G8iSj9.js → index-BNcA--Hd.js} +1 -1
- package/dist/assets/{index-CJQiOTRD.js → index-BOmHLMq9.js} +1 -1
- package/dist/assets/{index-ClJrGzyV.js → index-BahC2Tvl.js} +1 -1
- package/dist/assets/{index-20iGb6mA.js → index-Binus2lr.js} +1 -1
- package/dist/assets/{index-B6BXxNti.js → index-BkAFfbQ9.js} +8 -8
- package/dist/assets/{index-C2qpMC0j.js → index-BqAzzrC8.js} +1 -1
- package/dist/assets/{index-Dpr1-GCJ.js → index-C1sxwK1q.js} +2 -2
- package/dist/assets/{index-CS1WMiVI.js → index-C3DKd4Ro.js} +17 -17
- package/dist/assets/{index-CHD6Sawv.js → index-C8ojF8vN.js} +1 -1
- package/dist/assets/{index-T3bFNwLt.js → index-CD_6QFg_.js} +1 -1
- package/dist/assets/{index-DWoEF0Xz.js → index-CKd5FqHo.js} +1 -1
- package/dist/assets/{index-D6BTN5bJ.js → index-CUmTKs9Z.js} +10 -10
- package/dist/assets/{index-C2D98lgI.js → index-CX7wbZNb.js} +1 -1
- package/dist/assets/{index-CjpSyZA2.js → index-C_7vG059.js} +1 -1
- package/dist/assets/{index-wtjGA_La.js → index-Ca4ojQR0.js} +5 -5
- package/dist/assets/{index-CYa2z0tY.js → index-CblMKkQZ.js} +1 -1
- package/dist/assets/{index-D79trrES.js → index-CiOtSWYB.js} +1 -1
- package/dist/assets/{index-pZ4wuW0n.js → index-CpP8o0B-.js} +1 -1
- package/dist/assets/{index-CLxOAjUq.js → index-CroucXQb.js} +1 -1
- package/dist/assets/{index-BpaAmbjH.js → index-CvBzQQ4d.js} +7 -7
- package/dist/assets/{index-FuyWc2kY.js → index-CzSKzhki.js} +12 -14
- package/dist/assets/{index-CuSKWisM.js → index-D-L4Ck2v.js} +1 -1
- package/dist/assets/{index-CSHzjJLI.js → index-D5Rsk7dq.js} +1 -1
- package/dist/assets/{index-BOVEdIid.js → index-D5dR4ANx.js} +1 -1
- package/dist/assets/{index-DZMLm25q.js → index-DHoU0zZM.js} +7 -7
- package/dist/assets/{index-BlJ5mRs4.js → index-DKQUFPxk.js} +9 -9
- package/dist/assets/{index-BqZEyDkY.js → index-DkiVDcrH.js} +1 -1
- package/dist/assets/{index-G0ifYRE5.js → index-Dn-_3zh6.js} +1 -1
- package/dist/assets/{index-CjoxtNQO.js → index-Dp_bcKBe.js} +1 -1
- package/dist/assets/index-Dv4oZdvT.js +54 -0
- package/dist/assets/{index-CtJUE_Ce.js → index-Dww51D0I.js} +1 -1
- package/dist/assets/{index-Dv0PfLaH.js → index-G-HOuVIA.js} +1 -1
- package/dist/assets/{index-D7CruCrK.js → index-KlCiTQS2.js} +3 -3
- package/dist/assets/{index-CgFNSj9q.js → index-PpzEIdrF.js} +1 -1
- package/dist/assets/{index-D5mvFHwK.js → index-i7GCH6dr.js} +1 -1
- package/dist/assets/{index-Q8ecyTb-.js → index-iGKrAz05.js} +1 -1
- package/dist/assets/{index.es-BQGldbXt.js → index.es-DYaTMj-N.js} +1 -1
- package/dist/assets/{index.esm-DqRgonGB.js → index.esm-Bm9YBLeo.js} +1 -1
- package/dist/assets/{info-addon.es-CYKOi7kz.js → info-addon.es-Do7YC0D2.js} +1 -1
- package/dist/assets/{info.es-CKNL-yym.js → info.es-CFNCQt9o.js} +1 -1
- package/dist/assets/{install-from-url-DPfj2cnI.js → install-from-url-BjHwxVqE.js} +1 -1
- package/dist/assets/{invitation-BY43eo5D.js → invitation-CeRy7vzg.js} +5 -5
- package/dist/assets/{is-path-prefix-equal-OAOH-qOd.js → is-path-prefix-equal-CQJCYqAH.js} +1 -1
- package/dist/assets/{isEqual-C32HztcX.js → isEqual-BsT1dZPE.js} +1 -1
- package/dist/assets/{item-CDyVRhvg.js → item-ERkcgOMO.js} +1 -1
- package/dist/assets/{javascript.es-BYVV5293.js → javascript.es-CpC9TJXL.js} +1 -1
- package/dist/assets/{jump-to-line.es-jsNifFMh.js → jump-to-line.es-CylECZ7R.js} +1 -1
- package/dist/assets/{jump.es-BzHWkDXH.js → jump.es-DLrluqHg.js} +1 -1
- package/dist/assets/{line-BZys0zer.js → line-C_2Hrpy1.js} +4 -4
- package/dist/assets/{lint.es-BFWMqOv1.js → lint.es-BKML4shq.js} +1 -1
- package/dist/assets/{lint.es2-CUt2AauZ.js → lint.es2-BF1HKCYF.js} +1 -1
- package/dist/assets/{lint.es3-di_bUcOb.js → lint.es3-C2QSNF0z.js} +1 -1
- package/dist/assets/{list-header-d25I2byh.js → list-header-QjKUcFTw.js} +1 -1
- package/dist/assets/{log-DTxt_dGq.js → log-CJHqgb2_.js} +1 -1
- package/dist/assets/{lottie-CVFkVbsZ.js → lottie-D3czc7v1.js} +1 -1
- package/dist/assets/{matchbrackets.es-DVkRqCgH.js → matchbrackets.es-e9aBYOv_.js} +1 -1
- package/dist/assets/{memory-Bv9qf5X_.js → memory-CsXj8UaO.js} +1 -1
- package/dist/assets/{mode.es-CifbNh02.js → mode.es-5cZhDtkZ.js} +1 -1
- package/dist/assets/{mode.es2-cIWGTWZh.js → mode.es2-CodDnKLI.js} +1 -1
- package/dist/assets/{mode.es3-aQZkTGg6.js → mode.es3-BuILqhlX.js} +1 -1
- package/dist/assets/{onlineParser.es-DLUHNAdN.js → onlineParser.es-C6-JEN2E.js} +1 -1
- package/dist/assets/{overview-6t6Ij2OO.js → overview-DAw_INYh.js} +2 -2
- package/dist/assets/{react-Rgfin0TQ.js → react-BzW-kb6J.js} +3 -3
- package/dist/assets/{redux-I4eB06Ek.js → redux-JVkClYgC.js} +1 -1
- package/dist/assets/{resource-dialog-BqDlfetI.js → resource-dialog-D78t25J3.js} +2 -2
- package/dist/assets/{runtime-KPnZVG0c.js → runtime-W4J04CkM.js} +1 -1
- package/dist/assets/{search.es-BBE6mbEs.js → search.es-bB_x3JL4.js} +1 -1
- package/dist/assets/{searchcursor.es-BijniVLl.js → searchcursor.es-DgL4C9GF.js} +1 -1
- package/dist/assets/service-UeJj__8r.js +1 -0
- package/dist/assets/{shorten-label-Io_PRP3C.js → shorten-label-9iEtol8i.js} +1 -1
- package/dist/assets/{show-hint.es-DS-7hlNh.js → show-hint.es-CTIxfu4n.js} +1 -1
- package/dist/assets/{slicedToArray-BXSVsBoG.js → slicedToArray-C-KIkXYs.js} +1 -1
- package/dist/assets/{spaces-DxJMOXk2.js → spaces-BDlrJxSc.js} +1 -1
- package/dist/assets/{sublime.es-7jzC1I8A.js → sublime.es-BIpvOaG_.js} +1 -1
- package/dist/assets/{switch-control-BemP3Qoi.js → switch-control-BiRMcVKp.js} +1 -1
- package/dist/assets/{table-icons-D4d7sHXC.js → table-icons-Bx8jlz8p.js} +9 -9
- package/dist/assets/{tag-DJbcwSVc.js → tag-BsLtzNgc.js} +1 -1
- package/dist/assets/{team-FBszwXwa.js → team-Ct35NqwR.js} +1 -1
- package/dist/assets/toUpper-DV-JI2EJ.js +1 -0
- package/dist/assets/{traffic-IVSZlM0h.js → traffic-BEKDCWfv.js} +5 -5
- package/dist/assets/{url-evaluation-D7EkdGbI.js → url-evaluation-Ctc4DSd9.js} +4 -4
- package/dist/assets/{url-join-Bw5bTuVj.js → url-join-4YCGlq9R.js} +1 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-B1om2dOQ.js +1 -0
- package/dist/assets/{useLocalStorage-HB6kerLO.js → useLocalStorage-02uWRCTE.js} +1 -1
- package/dist/assets/{util-IfcYVLEi.js → util-Bl1tgqEu.js} +1 -1
- package/dist/assets/{wait-container-c5_W7fTC.js → wait-container-CUarPEd7.js} +1 -1
- package/dist/assets/withStyles-mwdAF397.js +1 -0
- package/dist/assets/{wrap-locale-CTfg_3mB.js → wrap-locale-DDhOh8hH.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Delete-B0dIMgAO.js +0 -1
- package/dist/assets/DeleteOutline-BqV9pNFr.js +0 -1
- package/dist/assets/DeleteOutline-C3yNjgmc.js +0 -1
- package/dist/assets/TextField-BKw9m9nx.js +0 -1
- package/dist/assets/actions-DMSeOF_9.js +0 -11
- package/dist/assets/api-DQe-yphm.js +0 -1
- package/dist/assets/blocklet-BJt-raxF.js +0 -1
- package/dist/assets/detail-DXun71hQ.js +0 -58
- package/dist/assets/getValidReactChildren-Bfzg_2yP.js +0 -1
- package/dist/assets/index--tmgIfny.js +0 -1
- package/dist/assets/index-5ep8c_KG.js +0 -54
- package/dist/assets/index-rBCOxvDw.js +0 -21
- package/dist/assets/service-9ctjdI1h.js +0 -1
- package/dist/assets/toUpper-DcVgFeb6.js +0 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-D16GfTTc.js +0 -1
- package/dist/assets/withStyles-C51kZpfM.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C}from"./codemirror.es-
|
|
1
|
+
import{C}from"./codemirror.es-BvooWNLt.js";import"./show-hint.es-CTIxfu4n.js";import{R as a,C as m,g as A,i as F,T as fe,S as Te,a as ge,I as Ee,G as H,b as O,d as me,e as ve,f as Se,h as ye,j as Ie,D as E,v as De,p as Fe,k as w,l as Ne,m as P,n as z,K as Y,o as be,q as _e,r as Ae}from"./index-Ca4ojQR0.js";import{P as ke,C as Q}from"./Range.es-DaV7MD2W.js";import{o as Oe}from"./onlineParser.es-C6-JEN2E.js";import{S as J,T as K,a as $}from"./introspection.es-CPJcz6nz.js";import"./index-C1sxwK1q.js";var Me=Object.defineProperty,T=(t,r)=>Me(t,"name",{value:r,configurable:!0});function W(t){let r;return j(t,i=>{switch(i.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":r=i;break}}),r}T(W,"getDefinitionState");function V(t,r,i){return i===J.name&&t.getQueryType()===r?J:i===K.name&&t.getQueryType()===r?K:i===$.name&&F(r)?$:"getFields"in r?r.getFields()[i]:null}T(V,"getFieldDef");function j(t,r){const i=[];let n=t;for(;n!=null&&n.kind;)i.push(n),n=n.prevState;for(let e=i.length-1;e>=0;e--)r(i[e])}T(j,"forEachState");function N(t){const r=Object.keys(t),i=r.length,n=new Array(i);for(let e=0;e<i;++e)n[e]=t[r[e]];return n}T(N,"objectValues");function I(t,r){return X(r,G(t.string))}T(I,"hintList");function X(t,r){if(!r)return h(t,n=>!n.isDeprecated);const i=t.map(n=>({proximity:Z(G(n.label),r),entry:n}));return h(h(i,n=>n.proximity<=2),n=>!n.entry.isDeprecated).sort((n,e)=>(n.entry.isDeprecated?1:0)-(e.entry.isDeprecated?1:0)||n.proximity-e.proximity||n.entry.label.length-e.entry.label.length).map(n=>n.entry)}T(X,"filterAndSortList");function h(t,r){const i=t.filter(r);return i.length===0?t:i}T(h,"filterNonEmpty");function G(t){return t.toLowerCase().replace(/\W/g,"")}T(G,"normalizeText");function Z(t,r){let i=q(r,t);return t.length>r.length&&(i-=t.length-r.length-1,i+=t.indexOf(r)===0?0:.5),i}T(Z,"getProximity");function q(t,r){let i,n;const e=[],l=t.length,o=r.length;for(i=0;i<=l;i++)e[i]=[i];for(n=1;n<=o;n++)e[0][n]=n;for(i=1;i<=l;i++)for(n=1;n<=o;n++){const u=t[i-1]===r[n-1]?0:1;e[i][n]=Math.min(e[i-1][n]+1,e[i][n-1]+1,e[i-1][n-1]+u),i>1&&n>1&&t[i-1]===r[n-2]&&t[i-2]===r[n-1]&&(e[i][n]=Math.min(e[i][n],e[i-2][n-2]+u))}return e[l][o]}T(q,"lexicalDistance");const ee={command:"editor.action.triggerSuggest",title:"Suggestions"},Le=T(t=>{const r=[];if(t)try{De(Fe(t),{FragmentDefinition(i){r.push(i)}})}catch{return[]}return r},"collectFragmentDefs");function ne(t,r,i,n,e,l){var o;const u=Object.assign(Object.assign({},l),{schema:t}),s=n||ue(r,i),c=s.state.kind==="Invalid"?s.state.prevState:s.state;if(!c)return[];const p=c.kind,g=c.step,S=pe(t,s.state);if(p===a.DOCUMENT)return I(s,[{label:"query",kind:m.Function},{label:"mutation",kind:m.Function},{label:"subscription",kind:m.Function},{label:"fragment",kind:m.Function},{label:"{",kind:m.Constructor}]);if(p===a.IMPLEMENTS||p===a.NAMED_TYPE&&((o=c.prevState)===null||o===void 0?void 0:o.kind)===a.IMPLEMENTS)return re(s,c,t,r,S);if(p===a.SELECTION_SET||p===a.FIELD||p===a.ALIASED_FIELD)return te(s,S,u);if(p===a.ARGUMENTS||p===a.ARGUMENT&&g===0){const d=S.argDefs;if(d)return I(s,d.map(f=>{var v;return{label:f.name,insertText:f.name+": ",command:ee,detail:String(f.type),documentation:(v=f.description)!==null&&v!==void 0?v:void 0,kind:m.Variable,type:f.type}}))}if((p===a.OBJECT_VALUE||p===a.OBJECT_FIELD&&g===0)&&S.objectFieldDefs){const d=N(S.objectFieldDefs),f=p===a.OBJECT_VALUE?m.Value:m.Field;return I(s,d.map(v=>{var D;return{label:v.name,detail:String(v.type),documentation:(D=v.description)!==null&&D!==void 0?D:void 0,kind:f,type:v.type}}))}if(p===a.ENUM_VALUE||p===a.LIST_VALUE&&g===1||p===a.OBJECT_FIELD&&g===2||p===a.ARGUMENT&&g===2)return ie(s,S,r,t);if(p===a.VARIABLE&&g===1){const d=A(S.inputType),f=B(r,t,s);return I(s,f.filter(v=>v.detail===(d==null?void 0:d.name)))}return p===a.TYPE_CONDITION&&g===1||p===a.NAMED_TYPE&&c.prevState!=null&&c.prevState.kind===a.TYPE_CONDITION?ae(s,S,t):p===a.FRAGMENT_SPREAD&&g===1?oe(s,S,t,r,Array.isArray(e)?e:Le(e)):p===a.VARIABLE_DEFINITION&&g===2||p===a.LIST_TYPE&&g===1||p===a.NAMED_TYPE&&c.prevState&&(c.prevState.kind===a.VARIABLE_DEFINITION||c.prevState.kind===a.LIST_TYPE||c.prevState.kind===a.NON_NULL_TYPE)?le(s,t):p===a.DIRECTIVE?ce(s,c,t):[]}T(ne,"getAutocompleteSuggestions");const R=` {
|
|
2
2
|
$1
|
|
3
3
|
}`,Ce=T(t=>{const r=t.type;return F(r)||w(r)&&F(r.ofType)||Ne(r)&&(F(r.ofType)||w(r.ofType)&&F(r.ofType.ofType))?R:null},"getInsertText");function te(t,r,i){var n;if(r.parentType){const e=r.parentType;let l=[];return"getFields"in e&&(l=N(e.getFields())),F(e)&&l.push(fe),e===((n=i==null?void 0:i.schema)===null||n===void 0?void 0:n.getQueryType())&&l.push(Te,ge),I(t,l.map((o,u)=>{var s;const c={sortText:String(u)+o.name,label:o.name,detail:String(o.type),documentation:(s=o.description)!==null&&s!==void 0?s:void 0,deprecated:!!o.deprecationReason,isDeprecated:!!o.deprecationReason,deprecationReason:o.deprecationReason,kind:m.Field,type:o.type},p=Ce(o);return p&&(c.insertText=o.name+p,c.insertTextFormat=Ee.Snippet,c.command=ee),c}))}return[]}T(te,"getSuggestionsForFieldNames");function ie(t,r,i,n){const e=A(r.inputType),l=B(i,n,t).filter(o=>o.detail===e.name);if(e instanceof H){const o=e.getValues();return I(t,o.map(u=>{var s;return{label:u.name,detail:String(e),documentation:(s=u.description)!==null&&s!==void 0?s:void 0,deprecated:!!u.deprecationReason,isDeprecated:!!u.deprecationReason,deprecationReason:u.deprecationReason,kind:m.EnumMember,type:e}}).concat(l))}else if(e===O)return I(t,l.concat([{label:"true",detail:String(O),documentation:"Not false.",kind:m.Variable,type:O},{label:"false",detail:String(O),documentation:"Not true.",kind:m.Variable,type:O}]));return l}T(ie,"getSuggestionsForInputValues");function re(t,r,i,n,e){if(r.needsSeparator)return[];const l=i.getTypeMap(),o=N(l).filter(me),u=o.map(({name:d})=>d),s=new Set;M(n,(d,f)=>{var v,D,_,b,y;if(f.name&&(f.kind===a.INTERFACE_DEF&&!u.includes(f.name)&&s.add(f.name),f.kind===a.NAMED_TYPE&&((v=f.prevState)===null||v===void 0?void 0:v.kind)===a.IMPLEMENTS)){if(e.interfaceDef){if((D=e.interfaceDef)===null||D===void 0?void 0:D.getInterfaces().find(({name:x})=>x===f.name))return;const U=i.getType(f.name),k=(_=e.interfaceDef)===null||_===void 0?void 0:_.toConfig();e.interfaceDef=new P(Object.assign(Object.assign({},k),{interfaces:[...k.interfaces,U||new P({name:f.name,fields:{}})]}))}else if(e.objectTypeDef){if((b=e.objectTypeDef)===null||b===void 0?void 0:b.getInterfaces().find(({name:x})=>x===f.name))return;const U=i.getType(f.name),k=(y=e.objectTypeDef)===null||y===void 0?void 0:y.toConfig();e.objectTypeDef=new z(Object.assign(Object.assign({},k),{interfaces:[...k.interfaces,U||new P({name:f.name,fields:{}})]}))}}});const c=e.interfaceDef||e.objectTypeDef,g=((c==null?void 0:c.getInterfaces())||[]).map(({name:d})=>d),S=o.concat([...s].map(d=>({name:d}))).filter(({name:d})=>d!==(c==null?void 0:c.name)&&!g.includes(d));return I(t,S.map(d=>{const f={label:d.name,kind:m.Interface,type:d};return d!=null&&d.description&&(f.documentation=d.description),f}))}T(re,"getSuggestionsForImplements");function ae(t,r,i,n){let e;if(r.parentType)if(ve(r.parentType)){const l=Se(r.parentType),o=i.getPossibleTypes(l),u=Object.create(null);o.forEach(s=>{s.getInterfaces().forEach(c=>{u[c.name]=c})}),e=o.concat(N(u))}else e=[r.parentType];else{const l=i.getTypeMap();e=N(l).filter(F)}return I(t,e.map(l=>{const o=A(l);return{label:String(l),documentation:(o==null?void 0:o.description)||"",kind:m.Field}}))}T(ae,"getSuggestionsForFragmentTypeConditions");function oe(t,r,i,n,e){if(!n)return[];const l=i.getTypeMap(),o=W(t.state),u=se(n);e&&e.length>0&&u.push(...e);const s=u.filter(c=>l[c.typeCondition.name.value]&&!(o&&o.kind===a.FRAGMENT_DEFINITION&&o.name===c.name.value)&&F(r.parentType)&&F(l[c.typeCondition.name.value])&&ye(i,r.parentType,l[c.typeCondition.name.value]));return I(t,s.map(c=>({label:c.name.value,detail:String(l[c.typeCondition.name.value]),documentation:`fragment ${c.name.value} on ${c.typeCondition.name.value}`,kind:m.Field,type:l[c.typeCondition.name.value]})))}T(oe,"getSuggestionsForFragmentSpread");const Re=T((t,r)=>{var i,n,e,l,o,u,s,c,p,g;if(((i=t.prevState)===null||i===void 0?void 0:i.kind)===r)return t.prevState;if(((e=(n=t.prevState)===null||n===void 0?void 0:n.prevState)===null||e===void 0?void 0:e.kind)===r)return t.prevState.prevState;if(((u=(o=(l=t.prevState)===null||l===void 0?void 0:l.prevState)===null||o===void 0?void 0:o.prevState)===null||u===void 0?void 0:u.kind)===r)return t.prevState.prevState.prevState;if(((g=(p=(c=(s=t.prevState)===null||s===void 0?void 0:s.prevState)===null||c===void 0?void 0:c.prevState)===null||p===void 0?void 0:p.prevState)===null||g===void 0?void 0:g.kind)===r)return t.prevState.prevState.prevState.prevState},"getParentDefinition");function B(t,r,i){let n=null,e;const l=Object.create({});return M(t,(o,u)=>{if((u==null?void 0:u.kind)===a.VARIABLE&&u.name&&(n=u.name),(u==null?void 0:u.kind)===a.NAMED_TYPE&&n){const s=Re(u,a.TYPE);s!=null&&s.type&&(e=r.getType(s==null?void 0:s.type))}n&&e&&(l[n]||(l[n]={detail:e.toString(),insertText:i.string==="$"?n:"$"+n,label:n,type:e,kind:m.Variable},n=null,e=null))}),N(l)}T(B,"getVariableCompletions");function se(t){const r=[];return M(t,(i,n)=>{n.kind===a.FRAGMENT_DEFINITION&&n.name&&n.type&&r.push({kind:a.FRAGMENT_DEFINITION,name:{kind:Y.NAME,value:n.name},selectionSet:{kind:a.SELECTION_SET,selections:[]},typeCondition:{kind:a.NAMED_TYPE,name:{kind:Y.NAME,value:n.type}}})}),r}T(se,"getFragmentDefinitions");function le(t,r,i){const n=r.getTypeMap(),e=N(n).filter(Ie);return I(t,e.map(l=>({label:l.name,documentation:l.description,kind:m.Variable})))}T(le,"getSuggestionsForVariableDefinition");function ce(t,r,i,n){var e;if(!((e=r.prevState)===null||e===void 0)&&e.kind){const l=i.getDirectives().filter(o=>de(r.prevState,o));return I(t,l.map(o=>({label:o.name,documentation:o.description||"",kind:m.Function})))}return[]}T(ce,"getSuggestionsForDirective");function ue(t,r){let i=null,n=null,e=null;const l=M(t,(o,u,s,c)=>{if(c===r.line&&o.getCurrentPosition()>=r.character)return i=s,n=Object.assign({},u),e=o.current(),"BREAK"});return{start:l.start,end:l.end,string:e||l.string,state:n||l.state,style:i||l.style}}T(ue,"getTokenAtPosition");function M(t,r){const i=t.split(`
|
|
4
4
|
`),n=Oe();let e=n.startState(),l="",o=new Q("");for(let u=0;u<i.length;u++){for(o=new Q(i[u]);!o.eol()&&(l=n.token(o,e),r(o,e,l,u)!=="BREAK"););r(o,e,l,u),e.kind||(e=n.startState())}return{start:o.getStartOfToken(),end:o.getCurrentPosition(),string:o.current(),state:e,style:l}}T(M,"runOnlineParser");function de(t,r){var i;if(!t||!t.kind)return!1;const n=t.kind,e=r.locations;switch(n){case a.QUERY:return e.indexOf(E.QUERY)!==-1;case a.MUTATION:return e.indexOf(E.MUTATION)!==-1;case a.SUBSCRIPTION:return e.indexOf(E.SUBSCRIPTION)!==-1;case a.FIELD:case a.ALIASED_FIELD:return e.indexOf(E.FIELD)!==-1;case a.FRAGMENT_DEFINITION:return e.indexOf(E.FRAGMENT_DEFINITION)!==-1;case a.FRAGMENT_SPREAD:return e.indexOf(E.FRAGMENT_SPREAD)!==-1;case a.INLINE_FRAGMENT:return e.indexOf(E.INLINE_FRAGMENT)!==-1;case a.SCHEMA_DEF:return e.indexOf(E.SCHEMA)!==-1;case a.SCALAR_DEF:return e.indexOf(E.SCALAR)!==-1;case a.OBJECT_TYPE_DEF:return e.indexOf(E.OBJECT)!==-1;case a.FIELD_DEF:return e.indexOf(E.FIELD_DEFINITION)!==-1;case a.INTERFACE_DEF:return e.indexOf(E.INTERFACE)!==-1;case a.UNION_DEF:return e.indexOf(E.UNION)!==-1;case a.ENUM_DEF:return e.indexOf(E.ENUM)!==-1;case a.ENUM_VALUE:return e.indexOf(E.ENUM_VALUE)!==-1;case a.INPUT_DEF:return e.indexOf(E.INPUT_OBJECT)!==-1;case a.INPUT_VALUE_DEF:switch((i=t.prevState)===null||i===void 0?void 0:i.kind){case a.ARGUMENTS_DEF:return e.indexOf(E.ARGUMENT_DEFINITION)!==-1;case a.INPUT_DEF:return e.indexOf(E.INPUT_FIELD_DEFINITION)!==-1}}return!1}T(de,"canUseDirective");function pe(t,r){let i,n,e,l,o,u,s,c,p,g,S;return j(r,d=>{var f;switch(d.kind){case a.QUERY:case"ShortQuery":g=t.getQueryType();break;case a.MUTATION:g=t.getMutationType();break;case a.SUBSCRIPTION:g=t.getSubscriptionType();break;case a.INLINE_FRAGMENT:case a.FRAGMENT_DEFINITION:d.type&&(g=t.getType(d.type));break;case a.FIELD:case a.ALIASED_FIELD:{!g||!d.name?o=null:(o=p?V(t,p,d.name):null,g=o?o.type:null);break}case a.SELECTION_SET:p=A(g);break;case a.DIRECTIVE:e=d.name?t.getDirective(d.name):null;break;case a.INTERFACE_DEF:d.name&&(s=null,S=new P({name:d.name,interfaces:[],fields:{}}));break;case a.OBJECT_TYPE_DEF:d.name&&(S=null,s=new z({name:d.name,interfaces:[],fields:{}}));break;case a.ARGUMENTS:{if(!d.prevState)n=null;else switch(d.prevState.kind){case a.FIELD:n=o&&o.args;break;case a.DIRECTIVE:n=e&&e.args;break;case a.ALIASED_FIELD:{const y=(f=d.prevState)===null||f===void 0?void 0:f.name;if(!y){n=null;break}const L=p?V(t,p,y):null;if(!L){n=null;break}n=L.args;break}default:n=null;break}break}case a.ARGUMENT:if(n){for(let y=0;y<n.length;y++)if(n[y].name===d.name){i=n[y];break}}u=i==null?void 0:i.type;break;case a.ENUM_VALUE:const v=A(u);l=v instanceof H?v.getValues().find(y=>y.value===d.name):null;break;case a.LIST_VALUE:const D=_e(u);u=D instanceof Ae?D.ofType:null;break;case a.OBJECT_VALUE:const _=A(u);c=_ instanceof be?_.getFields():null;break;case a.OBJECT_FIELD:const b=d.name&&c?c[d.name]:null;u=b==null?void 0:b.type;break;case a.NAMED_TYPE:d.name&&(g=t.getType(d.name));break}}),{argDef:i,argDefs:n,directiveDef:e,enumValue:l,fieldDef:o,inputType:u,objectFieldDefs:c,parentType:p,type:g,interfaceDef:S,objectTypeDef:s}}T(pe,"getTypeInfo");C.registerHelper("hint","graphql",(t,r)=>{const i=r.schema;if(!i)return;const n=t.getCursor(),e=t.getTokenAt(n),l=e.type!==null&&/"|\w/.test(e.string[0])?e.start:e.end,o=new ke(n.line,l),s={list:ne(i,t.getValue(),o,e,r.externalFragments).map(c=>({text:c.label,type:c.type,description:c.documentation,isDeprecated:c.isDeprecated,deprecationReason:c.deprecationReason})),from:{line:n.line,ch:l},to:{line:n.line,ch:e.end}};return s!=null&&s.list&&s.list.length>0&&(s.from=C.Pos(s.from.line,s.from.ch),s.to=C.Pos(s.to.line,s.to.ch),C.signal(t,"hasCompletion",t,s,e)),s});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as u}from"./codemirror.es-
|
|
1
|
+
import{C as u}from"./codemirror.es-BvooWNLt.js";import{f as j}from"./forEachState.es-D8bf0zSr.js";import{g,o as b,G as O,b as d,q as N,r as D}from"./index-Ca4ojQR0.js";import"./index-C1sxwK1q.js";var M=Object.defineProperty,p=(r,n)=>M(r,"name",{value:n,configurable:!0});function f(r,n,t){const i=x(t,m(n.string));if(!i)return;const e=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:i,from:{line:r.line,ch:e},to:{line:r.line,ch:n.end}}}p(f,"hintList");function x(r,n){if(!n)return y(r,l=>!l.isDeprecated);const t=r.map(l=>({proximity:T(m(l.text),n),entry:l}));return y(y(t,l=>l.proximity<=2),l=>!l.entry.isDeprecated).sort((l,o)=>(l.entry.isDeprecated?1:0)-(o.entry.isDeprecated?1:0)||l.proximity-o.proximity||l.entry.text.length-o.entry.text.length).map(l=>l.entry)}p(x,"filterAndSortList");function y(r,n){const t=r.filter(n);return t.length===0?r:t}p(y,"filterNonEmpty");function m(r){return r.toLowerCase().replace(/\W/g,"")}p(m,"normalizeText");function T(r,n){let t=v(n,r);return r.length>n.length&&(t-=r.length-n.length-1,t+=r.indexOf(n)===0?0:.5),t}p(T,"getProximity");function v(r,n){let t,i;const e=[],l=r.length,o=n.length;for(t=0;t<=l;t++)e[t]=[t];for(i=1;i<=o;i++)e[0][i]=i;for(t=1;t<=l;t++)for(i=1;i<=o;i++){const c=r[t-1]===n[i-1]?0:1;e[t][i]=Math.min(e[t-1][i]+1,e[t][i-1]+1,e[t-1][i-1]+c),t>1&&i>1&&r[t-1]===n[i-2]&&r[t-2]===n[i-1]&&(e[t][i]=Math.min(e[t][i],e[t-2][i-2]+c))}return e[l][o]}p(v,"lexicalDistance");u.registerHelper("hint","graphql-variables",(r,n)=>{const t=r.getCursor(),i=r.getTokenAt(t),e=L(t,i,n);return e!=null&&e.list&&e.list.length>0&&(e.from=u.Pos(e.from.line,e.from.ch),e.to=u.Pos(e.to.line,e.to.ch),u.signal(r,"hasCompletion",r,e,i)),e});function L(r,n,t){const i=n.state.kind==="Invalid"?n.state.prevState:n.state,e=i.kind,l=i.step;if(e==="Document"&&l===0)return f(r,n,[{text:"{"}]);const o=t.variableToType;if(!o)return;const c=V(o,n.state);if(e==="Document"||e==="Variable"&&l===0){const a=Object.keys(o);return f(r,n,a.map(s=>({text:`"${s}": `,type:o[s]})))}if((e==="ObjectValue"||e==="ObjectField"&&l===0)&&c.fields){const a=Object.keys(c.fields).map(s=>c.fields[s]);return f(r,n,a.map(s=>({text:`"${s.name}": `,type:s.type,description:s.description})))}if(e==="StringValue"||e==="NumberValue"||e==="BooleanValue"||e==="NullValue"||e==="ListValue"&&l===1||e==="ObjectField"&&l===2||e==="Variable"&&l===2){const a=c.type?g(c.type):void 0;if(a instanceof b)return f(r,n,[{text:"{"}]);if(a instanceof O){const s=a.getValues();return f(r,n,s.map(h=>({text:`"${h.name}"`,type:a,description:h.description})))}else if(a===d)return f(r,n,[{text:"true",type:d,description:"Not false."},{text:"false",type:d,description:"Not true."}])}}p(L,"getVariablesHint");function V(r,n){const t={type:null,fields:null};return j(n,i=>{if(i.kind==="Variable")t.type=r[i.name];else if(i.kind==="ListValue"){const e=t.type?N(t.type):void 0;t.type=e instanceof D?e.ofType:null}else if(i.kind==="ObjectValue"){const e=t.type?g(t.type):void 0;t.fields=e instanceof b?e.getFields():null}else if(i.kind==="ObjectField"){const e=i.name&&t.fields?t.fields[i.name]:null;t.type=e==null?void 0:e.type}}),t}p(V,"getTypeInfo");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gv as x,bb as E}from"./index-
|
|
1
|
+
import{gv as x,bb as E}from"./index-C1sxwK1q.js";const L=({url:r,allowFullScreen:o,position:a,display:u,height:i,width:c,overflow:y,styles:f,onLoad:p,onMouseOver:b,onMouseOut:w,scrolling:d,id:m,frameBorder:n,ariaHidden:O,sandbox:s,allow:j,className:g,title:h,ariaLabel:k,ariaLabelledby:v,name:I,target:P,loading:A,importance:F,referrerpolicy:M,allowpaymentrequest:S,src:$,key:q})=>{const t=x({src:$||r,target:P||null,style:{position:a||null,display:u||"initial",overflow:y||null},scrolling:d||null,allowpaymentrequest:S||null,importance:F||null,sandbox:s&&[...s].join(" ")||null,loading:A||null,styles:f||null,name:I||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:M||null,title:h||null,allow:j||null,id:m||null,"aria-labelledby":v||null,"aria-hidden":O||null,"aria-label":k||null,width:c||null,height:i||null,onLoad:p||null,onMouseOver:b||null,onMouseOut:w||null,key:q||"iframe"});let l=Object.create(null);for(let e of Object.keys(t))t[e]!=null&&(l[e]=t[e]);for(let e of Object.keys(l.style))l.style[e]==null&&delete l.style[e];if(l.styles)for(let e of Object.keys(l.styles))l.styles.hasOwnProperty(e)&&(l.style[e]=l.styles[e]),Object.keys(l.styles).pop()==e&&delete l.styles;if(o)if("allow"in l){const e=l.allow.replace("fullscreen","");l.allow=`fullscreen ${e.trim()}`.trim()}else l.allow="fullscreen";return n>=0&&(l.style.hasOwnProperty("border")||(l.style.border=n)),E.createElement("iframe",Object.assign({},l))},R=L;export{R as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as z,j as n,r as d,L as X,P as h,f as V,l as b,O as m,m as E,d as Y,V as Z,C as ee,q as te,M as v,a as f,F as T,b as j,c$ as re,G as y,A as L,p as ne,o as oe,z as se,bh as ie,n as ae}from"./index-Dpr1-GCJ.js";import{T as me}from"./index-C2qpMC0j.js";import le from"./traffic-IVSZlM0h.js";import{D as ce}from"./index-G0ifYRE5.js";import{B as ue}from"./app-avatar-CF6TIYj9.js";import{B as de}from"./bundle-avatar-B6arcSZZ.js";import{C as pe,M as S}from"./memory-Bv9qf5X_.js";import{I as fe}from"./chart-DVdOH_wE.js";import{w as he}from"./withStyles-C51kZpfM.js";import{_ as ge}from"./useLocalStorage-HB6kerLO.js";import{T as ve,a as ye}from"./ToggleButtonGroup-DRfzhnnx.js";import"./Delete-B0dIMgAO.js";import"./iframe-D60s0j4M.js";import"./ChevronLeft-BovE6bSi.js";import"./ChevronRight-COT0_GJ0.js";import"./Select-BioDM9Sd.js";import"./TextField-BKw9m9nx.js";import"./InputLabel-Dyg2n4KM.js";import"./InputAdornment-xbC4GBmg.js";import"./FilterList-BfkrQFl0.js";import"./LastPage-g6ViU_79.js";import"./index-B6BXxNti.js";import"./redux-I4eB06Ek.js";import"./Search-rqHI-c1S.js";import"./index-D5mvFHwK.js";import"./MoreVert-BB46cKFe.js";import"./getValidReactChildren-Bfzg_2yP.js";function xe(){const{api:e,info:t}=z();return n.jsx(le,{client:e,did:t.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var $=M.default=void 0;je(d);var C=n;function je(e){return e&&e.__esModule?e:{default:e}}function k(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function _(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?k(Object(i),!0).forEach(function(a){be(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function be(e,t,i){return t=Ie(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ie(e){var t=Ne(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O=function(t){return(0,C.jsxs)("svg",_(_({},t),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};O.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};O.displayName="server";$=M.default=O;const Pe=he(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(X);function A(e){const{value:t}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Pe,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(E,{variant:"body2",color:"textSecondary",children:`${Math.round(t)}%`})})]})}A.propTypes={value:h.number.isRequired};function R({disk:e}){const{t}=d.useContext(V),i=[{id:1,className:"used",title:t("system.used"),metric:b(e.used)},{id:2,className:"free",title:t("system.free"),metric:b(e.free)},{id:3,className:"total",title:t("system.total"),metric:b(e.total)}];return n.jsx(fe,{title:`${t("common.disk")} (${e.device})`,value:b(e.used),graph:n.jsx(m,{mt:3,children:n.jsx(A,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}R.propTypes={disk:h.shape({used:h.number,free:h.number,total:h.number,device:h.string})};R.defaultProps={disk:{used:0,free:0,total:1,device:""}};const D={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function H({initialBlocklets:e}){const{t,locale:i}=te(),{api:a}=z(),[u,I]=ge("runtime-view-interval",6),x=d.useMemo(()=>{const r=[];return r.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:D}),r.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:D}),e.forEach(o=>{v.forEachBlockletSync(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&r.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:l,name:v.getDisplayName(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),r},[]),[p,N]=d.useState(x),[g,F]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,q]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(T.EVENTS.NODE_RUNTIME_INFO,r=>{r.mem.total=r.mem.total||0,r.mem.used=r.mem.total-(r.mem.available||0),F(r),N(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...r.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...r.service}}:s))}),f(T.EVENTS.BLOCKLETS_RUNTIME_INFO,r=>{if(!r||!r.length){console.error("incorrect blocklets runtime info format",r);return}N(o=>o.map(s=>{const l=r.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=r=>{N(o=>o.filter(s=>s.groupId!==r.meta.did))},B=async r=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:r.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),N(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return v.forEachBlockletSync(o,(c,{id:J,ancestors:Q})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:J,name:v.getDisplayName(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:Q})}),l})}catch(o){L.error(o.message)}};f(j.BlockletEvents.removed,w),f(j.BlockletEvents.startFailed,w),f(j.BlockletEvents.statusChange,r=>{if(r.status!=="running"){w(r);return}B(r)}),f(j.BlockletEvents.updated,B),f(j.BlockletEvents.started,B);const G=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(r=>{const o=r.history||[];q({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(r=>{L.error(r.message)})};d.useEffect(()=>{G()},[u]);const W=r=>ne(Number(r||0),{locale:oe(i)}),K=[{label:t("common.group"),name:"groupName",options:{customBodyRenderLite(r){const{type:o,blocklet:s,groupName:l}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(re,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ue,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:t("common.name"),name:"name",options:{customBodyRenderLite(r){const{type:o,name:s,component:l,ancestors:c}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx($,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:t("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return W(o.uptime)}}},{label:t("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return b((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:t("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:t("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:t("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(E,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:t("analytics.trend")}),n.jsx(ve,{size:"small",exclusive:!0,value:u,onChange:(r,o)=>I(o),children:[1,3,6,12,24].map(r=>n.jsxs(ye,{value:r,children:[r,"H"]},r))})]}),n.jsxs(y,{mb:4,container:!0,spacing:4,children:[n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(pe,{...g.cpu,history:P.cpu})},"cpu"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{...g.mem,history:P.mem})},"memory"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Daemon)`,used:g.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Service)`,instanceCount:g.service.instanceCount||0,used:g.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),g.disks.map(r=>n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(R,{disk:r})},"disk"))]}),n.jsx(ce,{className:"runtime-insight-list",title:t("analytics.detail"),locale:i,data:p,columns:K,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}H.propTypes={initialBlocklets:h.array.isRequired};function we(){const{data:e,externalData:t,initialized:i}=Y();if(!i)return n.jsx(Z,{relative:"parent",children:n.jsx(ee,{})});const a=[...e,...t];return n.jsx(H,{initialBlocklets:a})}function et(){const e=se(),{t}=d.useContext(V),{tab:i="traffic"}=ie(),a=p=>{e(`/analytics/${p}`)},u=[{label:t("common.traffic"),value:"traffic"},{label:t("common.runtime"),value:"runtime"}],I={traffic:xe,runtime:we},x=I[i]||I.traffic;return n.jsxs(Be,{children:[n.jsx(E,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.analytics")}),n.jsx(me,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(x)?x:n.jsx(x,{})})]})}const Be=ae.main`
|
|
1
|
+
import{u as z,j as n,r as d,L as X,P as h,f as V,l as b,O as m,m as E,d as Y,V as Z,C as ee,q as te,M as v,a as f,F as T,b as j,c_ as re,G as y,A as L,p as ne,o as oe,z as se,bh as ie,n as ae}from"./index-C1sxwK1q.js";import{T as me}from"./index-BqAzzrC8.js";import le from"./traffic-BEKDCWfv.js";import{D as ce}from"./index-Dn-_3zh6.js";import{B as ue}from"./app-avatar-B_rQHqOY.js";import{B as de}from"./bundle-avatar-Ci6-oNkL.js";import{C as pe,M as S}from"./memory-CsXj8UaO.js";import{I as fe}from"./chart-D7fTlbH5.js";import{w as he}from"./withStyles-mwdAF397.js";import{_ as ge}from"./useLocalStorage-02uWRCTE.js";import{T as ve,a as ye}from"./ToggleButtonGroup-BoN6aVCj.js";import"./Delete-CUte0jEQ.js";import"./iframe-BqS-rkNh.js";import"./ChevronLeft-n-Lu674N.js";import"./ChevronRight-BQAiuHlI.js";import"./Select-Bmr7GD2T.js";import"./TextField-BtpuNQ33.js";import"./InputLabel-CExB3j6D.js";import"./InputAdornment-C1r6p7SP.js";import"./FilterList-BY5T-hLB.js";import"./LastPage-BlukH42P.js";import"./index-BkAFfbQ9.js";import"./redux-JVkClYgC.js";import"./Search-Dz7VM7PV.js";import"./index-i7GCH6dr.js";import"./MoreVert-NYc6koTI.js";import"./getValidReactChildren-9TX6zfai.js";function xe(){const{api:e,info:t}=z();return n.jsx(le,{client:e,did:t.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var A=M.default=void 0;je(d);var C=n;function je(e){return e&&e.__esModule?e:{default:e}}function _(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function k(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?_(Object(i),!0).forEach(function(a){be(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function be(e,t,i){return t=Ie(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ie(e){var t=Ne(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O=function(t){return(0,C.jsxs)("svg",k(k({},t),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};O.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};O.displayName="server";A=M.default=O;const Pe=he(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(X);function H(e){const{value:t}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Pe,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(E,{variant:"body2",color:"textSecondary",children:`${Math.round(t)}%`})})]})}H.propTypes={value:h.number.isRequired};function R({disk:e}){const{t}=d.useContext(V),i=[{id:1,className:"used",title:t("system.used"),metric:b(e.used)},{id:2,className:"free",title:t("system.free"),metric:b(e.free)},{id:3,className:"total",title:t("system.total"),metric:b(e.total)}];return n.jsx(fe,{title:`${t("common.disk")} (${e.device})`,value:b(e.used),graph:n.jsx(m,{mt:3,children:n.jsx(H,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}R.propTypes={disk:h.shape({used:h.number,free:h.number,total:h.number,device:h.string})};R.defaultProps={disk:{used:0,free:0,total:1,device:""}};const D={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function $({initialBlocklets:e}){const{t,locale:i}=te(),{api:a}=z(),[u,I]=ge("runtime-view-interval",6),x=d.useMemo(()=>{const r=[];return r.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:D}),r.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:D}),e.forEach(o=>{v.forEachBlockletSync(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&r.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:l,name:v.getDisplayName(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),r},[]),[p,N]=d.useState(x),[g,F]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,q]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(T.EVENTS.NODE_RUNTIME_INFO,r=>{r.mem.total=r.mem.total||0,r.mem.used=r.mem.total-(r.mem.available||0),F(r),N(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...r.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...r.service}}:s))}),f(T.EVENTS.BLOCKLETS_RUNTIME_INFO,r=>{if(!r||!r.length){console.error("incorrect blocklets runtime info format",r);return}N(o=>o.map(s=>{const l=r.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=r=>{N(o=>o.filter(s=>s.groupId!==r.meta.did))},B=async r=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:r.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),N(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return v.forEachBlockletSync(o,(c,{id:J,ancestors:Q})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:J,name:v.getDisplayName(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:Q})}),l})}catch(o){L.error(o.message)}};f(j.BlockletEvents.removed,w),f(j.BlockletEvents.startFailed,w),f(j.BlockletEvents.statusChange,r=>{if(r.status!=="running"){w(r);return}B(r)}),f(j.BlockletEvents.updated,B),f(j.BlockletEvents.started,B);const G=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(r=>{const o=r.history||[];q({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(r=>{L.error(r.message)})};d.useEffect(()=>{G()},[u]);const W=r=>ne(Number(r||0),{locale:oe(i)}),K=[{label:t("common.group"),name:"groupName",options:{customBodyRenderLite(r){const{type:o,blocklet:s,groupName:l}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(re,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ue,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:t("common.name"),name:"name",options:{customBodyRenderLite(r){const{type:o,name:s,component:l,ancestors:c}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(A,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:t("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return W(o.uptime)}}},{label:t("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return b((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:t("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:t("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:t("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(E,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:t("analytics.trend")}),n.jsx(ve,{size:"small",exclusive:!0,value:u,onChange:(r,o)=>I(o),children:[1,3,6,12,24].map(r=>n.jsxs(ye,{value:r,children:[r,"H"]},r))})]}),n.jsxs(y,{mb:4,container:!0,spacing:4,children:[n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(pe,{...g.cpu,history:P.cpu})},"cpu"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{...g.mem,history:P.mem})},"memory"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Daemon)`,used:g.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Service)`,instanceCount:g.service.instanceCount||0,used:g.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),g.disks.map(r=>n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(R,{disk:r})},"disk"))]}),n.jsx(ce,{className:"runtime-insight-list",title:t("analytics.detail"),locale:i,data:p,columns:K,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}$.propTypes={initialBlocklets:h.array.isRequired};function we(){const{data:e,externalData:t,initialized:i}=Y();if(!i)return n.jsx(Z,{relative:"parent",children:n.jsx(ee,{})});const a=[...e,...t];return n.jsx($,{initialBlocklets:a})}function et(){const e=se(),{t}=d.useContext(V),{tab:i="traffic"}=ie(),a=p=>{e(`/analytics/${p}`)},u=[{label:t("common.traffic"),value:"traffic"},{label:t("common.runtime"),value:"runtime"}],I={traffic:xe,runtime:we},x=I[i]||I.traffic;return n.jsxs(Be,{children:[n.jsx(E,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.analytics")}),n.jsx(me,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(x)?x:n.jsx(x,{})})]})}const Be=ae.main`
|
|
2
2
|
.page-header {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-
|
|
1
|
+
import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-C1sxwK1q.js";import{f as oe}from"./index-D9k2I5J1.js";import{I as E}from"./index-D5Rsk7dq.js";import{C as I}from"./click-to-copy-BwIQhcuz.js";import{w as ie}from"./withStyles-mwdAF397.js";var le=F,ce=le(function(n,i,r){return n+(r?" ":"")+i.toLowerCase()}),me=ce;const de=O(me);function w({icon:n,value:i,name:r,url:x,animated:c,LinkComponent:l,prefix:d}){const s=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"metric__image",children:e.jsx(Y,{name:n,alt:typeof r=="string"?r:"",size:30,prefix:d,color:"#222222"})}),e.jsxs("div",{children:[e.jsx("div",{className:`metric__number ${c?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:i}}),e.jsx("div",{className:"metric__name",children:r})]})]});return e.jsx(ue,{children:x?e.jsx(l,{to:x,children:s}):s})}w.propTypes={icon:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,name:o.node.isRequired,animated:o.bool,url:o.string,LinkComponent:o.any,prefix:o.string};w.defaultProps={animated:!1,url:"",LinkComponent:null,prefix:"/images"};const ue=Q("div")`
|
|
2
2
|
border-left: 1px solid ${n=>n.theme.typography.color.main};
|
|
3
3
|
padding: 10px 0 10px 16px;
|
|
4
4
|
@media (max-width: ${n=>n.theme.breakpoints.values.sm}px) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{aj as X,z as $,r as p,a as Z,b as ee,P as x,q as j,u as P,y as te,au as N,M as _,j as t,x as q,av as se,a1 as S,m as v,D as M,aw as oe,U as O,ax as re,B as W,C as z,ay as ne,A as K,K as V,az as ae,aA as ie,aB as le,F as ce,aC as B,i as ue,n as G,aa as de,a4 as pe,a7 as he,a8 as fe,aD as me,a9 as ge,O as xe}from"./index-C1sxwK1q.js";import{_ as D}from"./useLocalStorage-02uWRCTE.js";import{c as be,C as ke,A as ye,D as Se,B as je,S as H,a as Pe,b as we}from"./item-ERkcgOMO.js";import{d as Re}from"./ArrowDropDown-B9TabCUQ.js";import{B as ve}from"./Breadcrumbs-Ch6zvYxu.js";import"./index-C_7vG059.js";import"./index-ZG7jWpak.js";import"./index-i7GCH6dr.js";import"./Search-Dz7VM7PV.js";import"./index-BJ5g3x0B.js";import"./Select-Bmr7GD2T.js";import"./InputAdornment-C1r6p7SP.js";import"./preact.module-B1z5cdvs.js";import"./Add-LTC9ZPHh.js";import"./TextField-BtpuNQ33.js";import"./InputLabel-CExB3j6D.js";import"./Launch-yLPtDPJO.js";import"./Done-Z8bUrs-4.js";import"./DeleteOutline-Aff6fJia.js";import"./delete-confirm-I7gjtI2L.js";import"./click-to-copy-BwIQhcuz.js";import"./shorten-label-9iEtol8i.js";import"./blocklet-CtCpIFeQ.js";import"./MoreVert-NYc6koTI.js";import"./ButtonGroup-reI4zw37.js";import"./getValidReactChildren-9TX6zfai.js";function Ce(e){const n=X(),c=$(),[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=N(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=$(),{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=N(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}`)},A=({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:A({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:A({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=G(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"}}})),F=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(H),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(O,{permission:"mutate_node",children:f=>t.jsx(W,{disabled:!f,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(we,{disabled:l,onAdd:e,teamDid:s.did,blockletRegistryList:s.blockletRegistryList})]})})]})});F.propTypes={onChange:x.func,onDelete:x.func};F.defaultProps={onChange:()=>{},onDelete:()=>{}};const Ee=F;function nt(){const{t:e}=j(),{info:n}=P(),[c]=D(H),{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=G.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 +1 @@
|
|
|
1
|
-
import{g as j,
|
|
1
|
+
import{g as j,cy as O}from"./index-C1sxwK1q.js";function J(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 N=j(h),k=J({__proto__:null,default:N},[h]);export{k as i};
|