@abtnode/webapp 1.17.7-beta-20251230-120126-2836fe04 → 1.17.7-beta-20260104-034806-6a4e6fba
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-D4yhIBjp.js → AdapterDayjs-Bf62_KHd.js} +1 -1
- package/dist/assets/{Add-BqehlncY.js → Add-DsCZxomS.js} +1 -1
- package/dist/assets/ArrowDropDown-Cm-Ihf0X.js +1 -0
- package/dist/assets/{Autocomplete-DQwU_oez.js → Autocomplete-3RVWHTcY.js} +1 -1
- package/dist/assets/{Breadcrumbs-DWjoGi7V.js → Breadcrumbs-Ce4oQ7Yc.js} +1 -1
- package/dist/assets/{ButtonGroup-CiscHb2s.js → ButtonGroup-BBkFKNOE.js} +1 -1
- package/dist/assets/{CSSTransition-R4tGAk7r.js → CSSTransition-Bdj4Mjb5.js} +1 -1
- package/dist/assets/{CallMerge-BeazH3jg.js → CallMerge-DB0zaZAy.js} +1 -1
- package/dist/assets/{CardContent-C5NwNVow.js → CardContent-DYbZwS2P.js} +1 -1
- package/dist/assets/{ChevronLeft-BaZj3l6K.js → ChevronLeft-LUIxb-Gs.js} +1 -1
- package/dist/assets/{ChevronRight-CpLm1bKY.js → ChevronRight-CMxsc1-C.js} +1 -1
- package/dist/assets/{Clear-siFOH-um.js → Clear-C3sN6cHh.js} +1 -1
- package/dist/assets/{Delete-8zGU1uok.js → Delete-Dfzx-_QK.js} +1 -1
- package/dist/assets/{DeleteOutline-BiwjsR6p.js → DeleteOutline-DpQcJ9uI.js} +1 -1
- package/dist/assets/{Done-DzBppTPg.js → Done-B-lhh5Lr.js} +1 -1
- package/dist/assets/{Edit-CKpLr219.js → Edit-BC3nr7bV.js} +1 -1
- package/dist/assets/{ErrorOutline-B0v25XAB.js → ErrorOutline-B8rqfUz9.js} +1 -1
- package/dist/assets/{FilterList-Be5ZzrNM.js → FilterList-rsYn09vK.js} +1 -1
- package/dist/assets/{Google-BB2TEIzp.js → Google-DvG9EWSC.js} +1 -1
- package/dist/assets/{HelpOutline-D4ZrboH1.js → HelpOutline-DV_Sx2ni.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-DdCuxSq1.js → KeyboardArrowDown-DrxfizRQ.js} +1 -1
- package/dist/assets/{Launch-BiV6tbTp.js → Launch-CtQmWL-A.js} +1 -1
- package/dist/assets/{Link-Cogxu9aB.js → Link-DWefbDaG.js} +1 -1
- package/dist/assets/{ListItemButton-C9pXyehQ.js → ListItemButton-3I3mSJkP.js} +1 -1
- package/dist/assets/{ListSubheader-I1pRAfr2.js → ListSubheader-6QF36c7B.js} +1 -1
- package/dist/assets/{LoadingButton-BCz99YbN.js → LoadingButton-BYeGfUfG.js} +1 -1
- package/dist/assets/{MoreVert-BOGr0n7e.js → MoreVert-trwGA3wl.js} +1 -1
- package/dist/assets/{OpenInNew-CCra_7I0.js → OpenInNew-BPFABZ3A.js} +1 -1
- package/dist/assets/{Refresh-EilcFp8b.js → Refresh-BHzztae5.js} +1 -1
- package/dist/assets/{Replay-N-tBrT6I.js → Replay-DL5tXUkH.js} +1 -1
- package/dist/assets/{Search-BwAHZ5GK.js → Search-3NZ8vA4F.js} +1 -1
- package/dist/assets/{Stepper-Bn1MKAsJ.js → Stepper-Czt9JHmf.js} +1 -1
- package/dist/assets/{TableSearch-BFj05c9C.js → TableSearch-B_n7jlL9.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-npFh1mr6.js → ToggleButtonGroup-BUuAjiiA.js} +1 -1
- package/dist/assets/{UnfoldMore-DVoycFqc.js → UnfoldMore-C_VudNPV.js} +1 -1
- package/dist/assets/{Verified-CWEd1DVE.js → Verified-Wsp8TANt.js} +1 -1
- package/dist/assets/{VerifiedUser-CigB8Fdv.js → VerifiedUser-BtmbPbB1.js} +1 -1
- package/dist/assets/{ViewList-D7TqVQ4P.js → ViewList-B70rgoza.js} +1 -1
- package/dist/assets/{_createAggregator-CQ-mLfMP.js → _createAggregator-3CFJfow4.js} +1 -1
- package/dist/assets/{actions-GoWYDb6F.js → actions-BAAc2dMh.js} +1 -1
- package/dist/assets/{actions-CDHomwcW.js → actions-CVw0Ioh6.js} +1 -1
- package/dist/assets/{agreement-BhNIuQec.js → agreement-CN5OCdHh.js} +1 -1
- package/dist/assets/api-DSxoqzJR.js +1 -0
- package/dist/assets/{appearance-Bux4sdxO.js → appearance-Bg3eFrYH.js} +1 -1
- package/dist/assets/{ar-B4BSOV5G.js → ar-BukCw0OI.js} +1 -1
- package/dist/assets/{audit-logs-CpckHt6s.js → audit-logs-BqRm_F9G.js} +1 -1
- package/dist/assets/{base-chart-CxDa_CaZ.js → base-chart-CLPgrkli.js} +1 -1
- package/dist/assets/{blocklet-D4otp8nH.js → blocklet-DI09kb3z.js} +1 -1
- package/dist/assets/{chain-CfwM2JWo.js → chain-C3ooT1VP.js} +1 -1
- package/dist/assets/{click-to-copy-CcQkmf0B.js → click-to-copy-D3DsyQ7B.js} +1 -1
- package/dist/assets/cloneDeep-Dt4wqcIj.js +1 -0
- package/dist/assets/{config-navigation-DVGyxdD_.js → config-navigation-B2tX-3vU.js} +3 -3
- package/dist/assets/{connect-to-CbHwvZLx.js → connect-to-D2kofpuz.js} +1 -1
- package/dist/assets/{cssMode-CtObRSSW.js → cssMode-C-HXmW9S.js} +1 -1
- package/dist/assets/{de-EFAP4yzZ.js → de-Br0tDZam.js} +1 -1
- package/dist/assets/{delete-confirm-DfVCfmx_.js → delete-confirm-y9uI0hXG.js} +1 -1
- package/dist/assets/{depsEqual-BF3eoqLy.js → depsEqual-AZEPsRt3.js} +1 -1
- package/dist/assets/{detail-DYfAWDl1.js → detail-CUJgqlsd.js} +3 -3
- package/dist/assets/{domains-CC4Opwi7.js → domains-Ds-t-5cC.js} +1 -1
- package/dist/assets/{download-scJq5nd3.js → download-CRh8yH_q.js} +1 -1
- package/dist/assets/{edit.svg-BgAMrWjM.js → edit.svg-BRRfsd3L.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-D3p6zzp2.js +1 -0
- package/dist/assets/engine-PI4c2H--.js +1 -0
- package/dist/assets/{es-BqFCfGn2.js → es-D_e0gGgp.js} +1 -1
- package/dist/assets/{fr-CksqMtzK.js → fr-DXizOT4b.js} +1 -1
- package/dist/assets/{freemarker2-D5TW5Eft.js → freemarker2-CGpgj78_.js} +1 -1
- package/dist/assets/{get-safe-url-HOLWsAs0.js → get-safe-url-BR_QU8Dh.js} +1 -1
- package/dist/assets/getValidReactChildren-COj4IOg4.js +1 -0
- package/dist/assets/{graphqlMode-Bblq7qR7.js → graphqlMode-C9KkLkCB.js} +2 -2
- package/dist/assets/{handlebars-WxLGbhWH.js → handlebars-D_BNerME.js} +1 -1
- package/dist/assets/{hi-Bztwk-sg.js → hi-D2FEb_Tx.js} +1 -1
- package/dist/assets/{html-DuZCuVkX.js → html-C8nmUyPA.js} +1 -1
- package/dist/assets/{html-title-CifiMfjt.js → html-title-CHWL92Ab.js} +1 -1
- package/dist/assets/{htmlMode-0w5arQMe.js → htmlMode-Cbln7vuj.js} +1 -1
- package/dist/assets/{id-C5p-l7lp.js → id-Dw9URVwP.js} +1 -1
- package/dist/assets/{iframe-Dq0hkTrq.js → iframe-DJmf2DN1.js} +1 -1
- package/dist/assets/{index-DN9WepcN.js → index--aRvqG_y.js} +1 -1
- package/dist/assets/{index-CGzi7zV_.js → index--sEMugrz.js} +1 -1
- package/dist/assets/{index-DYW_sHYx.js → index-2MKd-1Yf.js} +3 -3
- package/dist/assets/{index-nvPO7sCa.js → index-52mqVMFt.js} +1 -1
- package/dist/assets/{index-DAMZQWKn.js → index-6nMPypbs.js} +1 -1
- package/dist/assets/{index-DBJqSNjU.js → index-8mapgkUu.js} +1 -1
- package/dist/assets/{index-DPs8sVol.js → index-BAreTrrc.js} +1 -1
- package/dist/assets/{index-COhyQV8C.js → index-BDT45MlS.js} +1 -1
- package/dist/assets/{index-BnXKKyQZ.js → index-BHXV_Uyd.js} +1 -1
- package/dist/assets/{index-CbKLDJsb.js → index-BWJoCxfo.js} +1 -1
- package/dist/assets/{index-CNVrqxCI.js → index-BZEpEbZE.js} +1 -1
- package/dist/assets/{index-_-mWQ6ov.js → index-BbeJesOq.js} +1 -1
- package/dist/assets/{index-CrQaw0BF.js → index-BeQc3UkQ.js} +329 -329
- package/dist/assets/{index-D2gNdot7.js → index-BgCWds86.js} +2 -2
- package/dist/assets/{index-DzQWOvtr.js → index-Bl4BVg_B.js} +3 -3
- package/dist/assets/{index-D57ncOaj.js → index-BozRXjdh.js} +1 -1
- package/dist/assets/{index-C8Yc1xhR.js → index-C6cCABCg.js} +1 -1
- package/dist/assets/{index-wIt3UxPD.js → index-CJ1w1KYa.js} +9 -9
- package/dist/assets/index-CNkhBuLJ.js +1 -0
- package/dist/assets/{index-BGcMePQ8.js → index-CODhl4Ao.js} +1 -1
- package/dist/assets/{index-ZCO60mrW.js → index-COUqJ9-z.js} +1 -1
- package/dist/assets/{index-rsjiYKAZ.js → index-CbALc3XH.js} +1 -1
- package/dist/assets/{index-yQeeHJJ2.js → index-ClbnPUTw.js} +1 -1
- package/dist/assets/{index-C9Doh9s3.js → index-CxvZy8qq.js} +1 -1
- package/dist/assets/{index-BPA__Xw6.js → index-D-SnE_aW.js} +1 -1
- package/dist/assets/{index-Ci0V4E2u.js → index-D31fr5VL.js} +1 -1
- package/dist/assets/{index-CzQzijaC.js → index-D3Ou3XmE.js} +1 -1
- package/dist/assets/{index-B24ZOg0s.js → index-D3erh2pC.js} +3 -3
- package/dist/assets/{index-DDG-ZEI-.js → index-DKUJWUc3.js} +1 -1
- package/dist/assets/index-DNUQq8Bi.js +16 -0
- package/dist/assets/{index-DVOJBn33.js → index-DOgexfV_.js} +1 -1
- package/dist/assets/{index-B3lwT4Ol.js → index-DOir4J5b.js} +2 -2
- package/dist/assets/index-DiZi9bmR.js +1 -0
- package/dist/assets/{index-Cs8W6nmK.js → index-DqxSKSRU.js} +1 -1
- package/dist/assets/{index-BD7A3_Da.js → index-Fn1MOxir.js} +1 -1
- package/dist/assets/{index-CXTibO7-.js → index-L59zcQ3y.js} +19 -19
- package/dist/assets/{index-DWm5KlVP.js → index-O0QMxlIj.js} +1 -1
- package/dist/assets/{index-DyIPXbau.js → index-TBuePazk.js} +1 -1
- package/dist/assets/{index-CFu4UTTj.js → index-aU6di1GB.js} +1 -1
- package/dist/assets/{index-DhXU_Vz9.js → index-hAMgv1Ac.js} +1 -1
- package/dist/assets/{index-OtVuze_0.js → index-sdZCV0b1.js} +3 -3
- package/dist/assets/{index-b78VjA-Y.js → index-xEJdUfGB.js} +1 -1
- package/dist/assets/{index-DidKpbc0.js → index-xcANvyL-.js} +1 -1
- package/dist/assets/{index-CH_WzJ6f.js → index-xstE610P.js} +1 -1
- package/dist/assets/{index.esm-B06DCVM7.js → index.esm-DWSKQCVf.js} +1 -1
- package/dist/assets/{install-from-url-B0gehZWB.js → install-from-url-DDaq0WfF.js} +1 -1
- package/dist/assets/{invitation-DjNwS-Ha.js → invitation-BtOYVKCc.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-Dr7EUhi7.js → is-path-prefix-equal-DSamcBqo.js} +1 -1
- package/dist/assets/{item-Bojg28Ma.js → item-DixRT1Ir.js} +1 -1
- package/dist/assets/{ja-2cGMwCig.js → ja-DBxpsmGJ.js} +1 -1
- package/dist/assets/{javascript-xUySVVaa.js → javascript-COnhTyPR.js} +1 -1
- package/dist/assets/{jsonMode-aXjE405B.js → jsonMode-B-wg4b0L.js} +1 -1
- package/dist/assets/{ko-DDVloIXx.js → ko-CCAdSyce.js} +1 -1
- package/dist/assets/{liquid-CqO0loMD.js → liquid-DkJ8XF8g.js} +1 -1
- package/dist/assets/{list-header-D5a_5edu.js → list-header-CQPLxTLi.js} +1 -1
- package/dist/assets/{lock.svg-Bnm1mppT.js → lock.svg-CfRs8nBP.js} +1 -1
- package/dist/assets/{log-Dh6sGyEk.js → log-3m4zIEL-.js} +1 -1
- package/dist/assets/{lottie-react.esm-uLWIPZ8N.js → lottie-react.esm-Ho0K4HxG.js} +1 -1
- package/dist/assets/{mdx-gAWRd386.js → mdx-BaqshKqy.js} +1 -1
- package/dist/assets/{memory-BwHtkqHB.js → memory-Bmu9KdH5.js} +1 -1
- package/dist/assets/{metric-Q_9BNbHj.js → metric-CYgfR-6x.js} +1 -1
- package/dist/assets/omit-BmEXjsUv.js +1 -0
- package/dist/assets/overview-DPxRgZrc.js +13 -0
- package/dist/assets/{permission-B8q324ya.js → permission-fAWDL6eA.js} +1 -1
- package/dist/assets/{preference-DjOBLR-v.js → preference-BdCzfdKd.js} +3 -3
- package/dist/assets/{pt-FIIPCfqU.js → pt-CrMGrBZ6.js} +1 -1
- package/dist/assets/{python-DnlpLwjq.js → python-DDh1Sld9.js} +1 -1
- package/dist/assets/{raf-schd.esm-B2LNukSh.js → raf-schd.esm-y75m-HYf.js} +1 -1
- package/dist/assets/{razor-JAsAlMne.js → razor-B6iT4xzc.js} +1 -1
- package/dist/assets/{rotate-session-key-BFiVoa6I.js → rotate-session-key-Bh2rfrqq.js} +1 -1
- package/dist/assets/{ru-BjRgz8OF.js → ru-up3R57Pv.js} +1 -1
- package/dist/assets/{runtime-BB_E-r_A.js → runtime-Br6d5OIR.js} +1 -1
- package/dist/assets/schema-BeTx8rxj.js +1 -0
- package/dist/assets/sdk-D4uiEFbJ.js +1 -0
- package/dist/assets/{service-DLwgL4rt.js → service-CktTTJWl.js} +1 -1
- package/dist/assets/{shorten-label-CybgQDYs.js → shorten-label-hqt7jmPr.js} +1 -1
- package/dist/assets/{simple-select-DJn1UT5H.js → simple-select-CQeor5tC.js} +1 -1
- package/dist/assets/{spaces-DBXblECR.js → spaces-CfDVuFGr.js} +1 -1
- package/dist/assets/{status-CW0QYGeF.js → status--oG1pao2.js} +1 -1
- package/dist/assets/{status-DG36cpK9.js → status-B5KZ8DJC.js} +1 -1
- package/dist/assets/{switch-control-Bzy_oqas.js → switch-control-Ce7-RZ39.js} +1 -1
- package/dist/assets/{table-icons-DKoPQwjv.js → table-icons-CRF7M3DQ.js} +1 -1
- package/dist/assets/{team-DLwXXgYX.js → team-B5ZkAUsr.js} +1 -1
- package/dist/assets/{th-DKiwQ6t6.js → th-DdNj2Ao6.js} +1 -1
- package/dist/assets/{toLower-CXuGXHcC.js → toLower-D3hDe9vm.js} +1 -1
- package/dist/assets/toUpper-DLp0iOYu.js +1 -0
- package/dist/assets/{traffic-DSdpsMku.js → traffic-DLkNU8lW.js} +1 -1
- package/dist/assets/{tsMode-Dh0Ri32L.js → tsMode-Cgz7fmer.js} +1 -1
- package/dist/assets/{typescript-D316NgIh.js → typescript-DeFz7cju.js} +1 -1
- package/dist/assets/{url-evaluation-DMCBEvQj.js → url-evaluation-CnA0uWcs.js} +1 -1
- package/dist/assets/{url-join-DoFkjCNr.js → url-join-Di70zMv6.js} +1 -1
- package/dist/assets/{use-mobile-BGG1Yti5.js → use-mobile-BoSC-OO1.js} +1 -1
- package/dist/assets/{use-mobile-DqSNKVo1.js → use-mobile-DHdENrRR.js} +1 -1
- package/dist/assets/{useAsync-ByRujkOO.js → useAsync-EIK7zv0J.js} +1 -1
- package/dist/assets/{useAsyncRetry-CLcTront.js → useAsyncRetry-CDmpGaec.js} +1 -1
- package/dist/assets/{useLocalStorage-DjnxkTrj.js → useLocalStorage-CAyV6Ga8.js} +1 -1
- package/dist/assets/{useThemeProps-CFIloaX5.js → useThemeProps-BT_wjfR7.js} +1 -1
- package/dist/assets/{util-DvscRj0S.js → util-D64hwso0.js} +1 -1
- package/dist/assets/{vi-C4aNShnq.js → vi-HNh41Xxk.js} +1 -1
- package/dist/assets/{wait-container-BPFMrDUL.js → wait-container-XW4Jhu4r.js} +1 -1
- package/dist/assets/{without-wallet-D2bQnWJt.js → without-wallet-BasvtIaA.js} +1 -1
- package/dist/assets/wrap-locale--ZpyxCeq.js +1 -0
- package/dist/assets/{xml-BGgxhX96.js → xml-C_dKn8b3.js} +1 -1
- package/dist/assets/{yaml-9hmveKGV.js → yaml-BUcCDLGx.js} +1 -1
- package/dist/assets/{zh-Cb0McG4r.js → zh-MM5bvwO_.js} +1 -1
- package/dist/assets/{zh-tw-PfYv9beR.js → zh-tw-Dr5DyPwA.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-Cc-RKnnq.js +0 -1
- package/dist/assets/api-CSBvUv9A.js +0 -1
- package/dist/assets/cloneDeep-B3VWXnFc.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-DyzCXqsA.js +0 -1
- package/dist/assets/engine-KybwGdMh.js +0 -1
- package/dist/assets/getValidReactChildren-Ck9KmKnh.js +0 -1
- package/dist/assets/index-BcmOVFqY.js +0 -1
- package/dist/assets/index-CIAqUMHH.js +0 -1
- package/dist/assets/index-D93jIJAg.js +0 -16
- package/dist/assets/omit-DeumLxdH.js +0 -1
- package/dist/assets/overview-DZjSoaFM.js +0 -13
- package/dist/assets/schema-DC2ou5i0.js +0 -1
- package/dist/assets/sdk-DZJdUnPV.js +0 -1
- package/dist/assets/toUpper-DN59t43l.js +0 -1
- package/dist/assets/wrap-locale-BbIFvnmJ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eI as D}from"./index-CrQaw0BF.js";function f(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function I(e){return f(e)==="object"}function re(e){return Array.isArray(e)&&e.length>0&&e.every(m=>"message"in m)}function Y(e,m){return e.length<124?e:m}const ne="graphql-transport-ws";var g;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(g||(g={}));var c;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(c||(c={}));function v(e){if(!I(e))throw new Error(`Message is expected to be an object, but got ${f(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${f(e.type)}`);switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:{if(e.payload!=null&&!I(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case c.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!I(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${f(e.payload.query)}`);if(e.payload.variables!=null&&!I(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${f(e.payload.variables)}`);if(e.payload.operationName!=null&&f(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${f(e.payload.operationName)}`);if(e.payload.extensions!=null&&!I(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${f(e.payload.extensions)}`);break}case c.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!I(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);break}case c.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!re(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case c.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function oe(e,m){return v(typeof e=="string"?JSON.parse(e,m):e)}function W(e,m){return v(e),JSON.stringify(e,m)}var A=function(e){return this instanceof A?(this.v=e,this):new A(e)},ie=function(e,m,R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var M=R.apply(e,m||[]),b,w=[];return b={},E("next"),E("throw"),E("return"),b[Symbol.asyncIterator]=function(){return this},b;function E(u){M[u]&&(b[u]=function(r){return new Promise(function(S,L){w.push([u,r,S,L])>1||$(u,r)})})}function $(u,r){try{q(M[u](r))}catch(S){j(w[0][3],S)}}function q(u){u.value instanceof A?Promise.resolve(u.value.v).then(z,G):j(w[0][2],u)}function z(u){$("next",u)}function G(u){$("throw",u)}function j(u,r){u(r),w.shift(),w.length&&$(w[0][0],w[0][1])}};function pe(e){const{url:m,connectionParams:R,lazy:M=!0,onNonLazyError:b=console.error,lazyCloseTimeout:w=0,keepAlive:E=0,disablePong:$,connectionAckWaitTimeout:q=0,retryAttempts:z=5,retryWait:G=async function(a){let t=1e3;for(let o=0;o<a;o++)t*=2;await new Promise(o=>setTimeout(o,t+Math.floor(Math.random()*2700+300)))},shouldRetry:j=J,isFatalConnectionProblem:u,on:r,webSocketImpl:S,generateID:L=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{const t=Math.random()*16|0;return(a=="x"?t:t&3|8).toString(16)})},jsonMessageReplacer:U,jsonMessageReviver:ee}=e;let T;if(S){if(!ae(S))throw new Error("Invalid WebSocket implementation provided");T=S}else typeof WebSocket<"u"?T=WebSocket:typeof D<"u"?T=D.WebSocket||D.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=T,d=(()=>{const n=(()=>{const t={};return{on(o,s){return t[o]=s,()=>{delete t[o]}},emit(o){var s;"id"in o&&((s=t[o.id])===null||s===void 0||s.call(t,o))}}})(),a={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[n.emit,r.message]:[n.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:n.on,on(t,o){const s=a[t];return s.push(o),()=>{s.splice(s.indexOf(o),1)}},emit(t,...o){for(const s of[...a[t]])s(...o)}}})();function Q(n){const a=[d.on("error",t=>{a.forEach(o=>o()),n(t)}),d.on("closed",t=>{a.forEach(o=>o()),n(t)})]}let h,k=0,H,O=!1,B=0,C=!1;async function K(){clearTimeout(H);const[n,a]=await(h??(h=new Promise((s,y)=>(async()=>{if(O){if(await G(B),!k)return h=void 0,y({code:1e3,reason:"All Subscriptions Gone"});B++}d.emit("connecting",O);const i=new N(typeof m=="function"?await m():m,ne);let x,_;function F(){isFinite(E)&&E>0&&(clearTimeout(_),_=setTimeout(()=>{i.readyState===N.OPEN&&(i.send(W({type:c.Ping})),d.emit("ping",!1,void 0))},E))}Q(l=>{h=void 0,clearTimeout(x),clearTimeout(_),y(l),l instanceof Z&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=l=>d.emit("error",l),i.onclose=l=>d.emit("closed",l),i.onopen=async()=>{try{d.emit("opened",i);const l=typeof R=="function"?await R():R;if(i.readyState!==N.OPEN)return;i.send(W(l?{type:c.ConnectionInit,payload:l}:{type:c.ConnectionInit},U)),isFinite(q)&&q>0&&(x=setTimeout(()=>{i.close(g.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},q)),F()}catch(l){d.emit("error",l),i.close(g.InternalClientError,Y(l instanceof Error?l.message:new Error(l).message,"Internal client error"))}};let P=!1;i.onmessage=({data:l})=>{try{const p=oe(l,ee);if(d.emit("message",p),p.type==="ping"||p.type==="pong"){d.emit(p.type,!0,p.payload),p.type==="pong"?F():$||(i.send(W(p.payload?{type:c.Pong,payload:p.payload}:{type:c.Pong})),d.emit("pong",!1,p.payload));return}if(P)return;if(p.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${p.type}`);clearTimeout(x),P=!0,d.emit("connected",i,p.payload,O),O=!1,B=0,s([i,new Promise((ce,te)=>Q(te))])}catch(p){i.onmessage=null,d.emit("error",p),i.close(g.BadResponse,Y(p instanceof Error?p.message:new Error(p).message,"Bad response"))}}})())));n.readyState===N.CLOSING&&await a;let t=()=>{};const o=new Promise(s=>t=s);return[n,t,Promise.race([o.then(()=>{if(!k){const s=()=>n.close(1e3,"Normal Closure");isFinite(w)&&w>0?H=setTimeout(()=>{n.readyState===N.OPEN&&s()},w):s()}}),a])]}function V(n){if(J(n)&&(se(n.code)||[g.InternalServerError,g.InternalClientError,g.BadRequest,g.BadResponse,g.Unauthorized,g.SubprotocolNotAcceptable,g.SubscriberAlreadyExists,g.TooManyInitialisationRequests].includes(n.code)))throw n;if(C)return!1;if(J(n)&&n.code===1e3)return k>0;if(!z||B>=z||!j(n)||u?.(n))throw n;return O=!0}M||(async()=>{for(k++;;)try{const[,,n]=await K();await n}catch(n){try{if(!V(n))return}catch(a){return b?.(a)}}})();function X(n,a){const t=L(n);let o=!1,s=!1,y=()=>{k--,o=!0};return(async()=>{for(k++;;)try{const[i,x,_]=await K();if(o)return x();const F=d.onMessage(t,P=>{switch(P.type){case c.Next:{a.next(P.payload);return}case c.Error:{s=!0,o=!0,a.error(P.payload),y();return}case c.Complete:{o=!0,y();return}}});i.send(W({id:t,type:c.Subscribe,payload:n},U)),y=()=>{!o&&i.readyState===N.OPEN&&i.send(W({id:t,type:c.Complete},U)),k--,o=!0,x()},await _.finally(F);return}catch(i){if(!V(i))return}})().then(()=>{s||a.complete()}).catch(i=>{a.error(i)}),()=>{o||y()}}return{on:d.on,subscribe:X,iterate(n){const a=[],t={done:!1,error:null,resolve:()=>{}},o=X(n,{next(y){a.push(y),t.resolve()},error(y){t.done=!0,t.error=y,t.resolve()},complete(){t.done=!0,t.resolve()}}),s=function(){return ie(this,arguments,function*(){for(;;){for(a.length||(yield A(new Promise(x=>t.resolve=x)));a.length;)yield yield A(a.shift());if(t.error)throw t.error;if(t.done)return yield A(void 0)}})}();return s.throw=async y=>(t.done||(t.done=!0,t.error=y,t.resolve()),{done:!0,value:void 0}),s.return=async()=>(o(),{done:!0,value:void 0}),s},async dispose(){if(C=!0,h){const[n]=await h;n.close(1e3,"Normal Closure")}},terminate(){h&&d.emit("closed",new Z)}}}class Z extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J(e){return I(e)&&"code"in e&&"reason"in e}function se(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function ae(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}export{g as CloseCode,ne as GRAPHQL_TRANSPORT_WS_PROTOCOL,c as MessageType,Z as TerminatedCloseEvent,pe as createClient,oe as parseMessage,W as stringifyMessage,v as validateMessage};
|
|
1
|
+
import{eI as D}from"./index-BeQc3UkQ.js";function f(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function I(e){return f(e)==="object"}function re(e){return Array.isArray(e)&&e.length>0&&e.every(m=>"message"in m)}function Y(e,m){return e.length<124?e:m}const ne="graphql-transport-ws";var g;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(g||(g={}));var c;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(c||(c={}));function v(e){if(!I(e))throw new Error(`Message is expected to be an object, but got ${f(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${f(e.type)}`);switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:{if(e.payload!=null&&!I(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case c.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!I(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${f(e.payload.query)}`);if(e.payload.variables!=null&&!I(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${f(e.payload.variables)}`);if(e.payload.operationName!=null&&f(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${f(e.payload.operationName)}`);if(e.payload.extensions!=null&&!I(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${f(e.payload.extensions)}`);break}case c.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!I(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);break}case c.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!re(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case c.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function oe(e,m){return v(typeof e=="string"?JSON.parse(e,m):e)}function W(e,m){return v(e),JSON.stringify(e,m)}var A=function(e){return this instanceof A?(this.v=e,this):new A(e)},ie=function(e,m,R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var M=R.apply(e,m||[]),b,w=[];return b={},E("next"),E("throw"),E("return"),b[Symbol.asyncIterator]=function(){return this},b;function E(u){M[u]&&(b[u]=function(r){return new Promise(function(S,L){w.push([u,r,S,L])>1||$(u,r)})})}function $(u,r){try{q(M[u](r))}catch(S){j(w[0][3],S)}}function q(u){u.value instanceof A?Promise.resolve(u.value.v).then(z,G):j(w[0][2],u)}function z(u){$("next",u)}function G(u){$("throw",u)}function j(u,r){u(r),w.shift(),w.length&&$(w[0][0],w[0][1])}};function pe(e){const{url:m,connectionParams:R,lazy:M=!0,onNonLazyError:b=console.error,lazyCloseTimeout:w=0,keepAlive:E=0,disablePong:$,connectionAckWaitTimeout:q=0,retryAttempts:z=5,retryWait:G=async function(a){let t=1e3;for(let o=0;o<a;o++)t*=2;await new Promise(o=>setTimeout(o,t+Math.floor(Math.random()*2700+300)))},shouldRetry:j=J,isFatalConnectionProblem:u,on:r,webSocketImpl:S,generateID:L=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{const t=Math.random()*16|0;return(a=="x"?t:t&3|8).toString(16)})},jsonMessageReplacer:U,jsonMessageReviver:ee}=e;let T;if(S){if(!ae(S))throw new Error("Invalid WebSocket implementation provided");T=S}else typeof WebSocket<"u"?T=WebSocket:typeof D<"u"?T=D.WebSocket||D.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=T,d=(()=>{const n=(()=>{const t={};return{on(o,s){return t[o]=s,()=>{delete t[o]}},emit(o){var s;"id"in o&&((s=t[o.id])===null||s===void 0||s.call(t,o))}}})(),a={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[n.emit,r.message]:[n.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:n.on,on(t,o){const s=a[t];return s.push(o),()=>{s.splice(s.indexOf(o),1)}},emit(t,...o){for(const s of[...a[t]])s(...o)}}})();function Q(n){const a=[d.on("error",t=>{a.forEach(o=>o()),n(t)}),d.on("closed",t=>{a.forEach(o=>o()),n(t)})]}let h,k=0,H,O=!1,B=0,C=!1;async function K(){clearTimeout(H);const[n,a]=await(h??(h=new Promise((s,y)=>(async()=>{if(O){if(await G(B),!k)return h=void 0,y({code:1e3,reason:"All Subscriptions Gone"});B++}d.emit("connecting",O);const i=new N(typeof m=="function"?await m():m,ne);let x,_;function F(){isFinite(E)&&E>0&&(clearTimeout(_),_=setTimeout(()=>{i.readyState===N.OPEN&&(i.send(W({type:c.Ping})),d.emit("ping",!1,void 0))},E))}Q(l=>{h=void 0,clearTimeout(x),clearTimeout(_),y(l),l instanceof Z&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=l=>d.emit("error",l),i.onclose=l=>d.emit("closed",l),i.onopen=async()=>{try{d.emit("opened",i);const l=typeof R=="function"?await R():R;if(i.readyState!==N.OPEN)return;i.send(W(l?{type:c.ConnectionInit,payload:l}:{type:c.ConnectionInit},U)),isFinite(q)&&q>0&&(x=setTimeout(()=>{i.close(g.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},q)),F()}catch(l){d.emit("error",l),i.close(g.InternalClientError,Y(l instanceof Error?l.message:new Error(l).message,"Internal client error"))}};let P=!1;i.onmessage=({data:l})=>{try{const p=oe(l,ee);if(d.emit("message",p),p.type==="ping"||p.type==="pong"){d.emit(p.type,!0,p.payload),p.type==="pong"?F():$||(i.send(W(p.payload?{type:c.Pong,payload:p.payload}:{type:c.Pong})),d.emit("pong",!1,p.payload));return}if(P)return;if(p.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${p.type}`);clearTimeout(x),P=!0,d.emit("connected",i,p.payload,O),O=!1,B=0,s([i,new Promise((ce,te)=>Q(te))])}catch(p){i.onmessage=null,d.emit("error",p),i.close(g.BadResponse,Y(p instanceof Error?p.message:new Error(p).message,"Bad response"))}}})())));n.readyState===N.CLOSING&&await a;let t=()=>{};const o=new Promise(s=>t=s);return[n,t,Promise.race([o.then(()=>{if(!k){const s=()=>n.close(1e3,"Normal Closure");isFinite(w)&&w>0?H=setTimeout(()=>{n.readyState===N.OPEN&&s()},w):s()}}),a])]}function V(n){if(J(n)&&(se(n.code)||[g.InternalServerError,g.InternalClientError,g.BadRequest,g.BadResponse,g.Unauthorized,g.SubprotocolNotAcceptable,g.SubscriberAlreadyExists,g.TooManyInitialisationRequests].includes(n.code)))throw n;if(C)return!1;if(J(n)&&n.code===1e3)return k>0;if(!z||B>=z||!j(n)||u?.(n))throw n;return O=!0}M||(async()=>{for(k++;;)try{const[,,n]=await K();await n}catch(n){try{if(!V(n))return}catch(a){return b?.(a)}}})();function X(n,a){const t=L(n);let o=!1,s=!1,y=()=>{k--,o=!0};return(async()=>{for(k++;;)try{const[i,x,_]=await K();if(o)return x();const F=d.onMessage(t,P=>{switch(P.type){case c.Next:{a.next(P.payload);return}case c.Error:{s=!0,o=!0,a.error(P.payload),y();return}case c.Complete:{o=!0,y();return}}});i.send(W({id:t,type:c.Subscribe,payload:n},U)),y=()=>{!o&&i.readyState===N.OPEN&&i.send(W({id:t,type:c.Complete},U)),k--,o=!0,x()},await _.finally(F);return}catch(i){if(!V(i))return}})().then(()=>{s||a.complete()}).catch(i=>{a.error(i)}),()=>{o||y()}}return{on:d.on,subscribe:X,iterate(n){const a=[],t={done:!1,error:null,resolve:()=>{}},o=X(n,{next(y){a.push(y),t.resolve()},error(y){t.done=!0,t.error=y,t.resolve()},complete(){t.done=!0,t.resolve()}}),s=function(){return ie(this,arguments,function*(){for(;;){for(a.length||(yield A(new Promise(x=>t.resolve=x)));a.length;)yield yield A(a.shift());if(t.error)throw t.error;if(t.done)return yield A(void 0)}})}();return s.throw=async y=>(t.done||(t.done=!0,t.error=y,t.resolve()),{done:!0,value:void 0}),s.return=async()=>(o(),{done:!0,value:void 0}),s},async dispose(){if(C=!0,h){const[n]=await h;n.close(1e3,"Normal Closure")}},terminate(){h&&d.emit("closed",new Z)}}}class Z extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J(e){return I(e)&&"code"in e&&"reason"in e}function se(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function ae(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}export{g as CloseCode,ne as GRAPHQL_TRANSPORT_WS_PROTOCOL,c as MessageType,Z as TerminatedCloseEvent,pe as createClient,oe as parseMessage,W as stringifyMessage,v as validateMessage};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{r as i,dJ as E,X as p,j as e,bB as m,b6 as C,dK as L,bz as I,dL as v,bs as f,dM as z}from"./index-BeQc3UkQ.js";import{B as A}from"./ButtonGroup-BBkFKNOE.js";function P(t,s){i.useEffect(()=>{function r(o){!t||!t.current||t.current.contains(o.target)||s(o)}return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[t,s])}function w({...t}){const{size:s="medium",color:r="primary",menu:o=[],children:c=null,variant:x="contained",onClick:h=E,menuButtonProps:g={},...j}=t,[k,l]=i.useState(!1),a=i.useRef(null),u=i.useRef(null),y=Array.isArray(o)?o.map((n,B)=>i.isValidElement(n)?n:i.createElement(p,{...n,key:B})):o,M=()=>{l(n=>!n)},d=n=>{a.current&&a.current.contains(n.target)||l(!1)};P(u,d);const b=n=>{n.target.closest(".MuiMenuItem-root")&&l(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(R,{variant:x,size:s,color:r,ref:a,...j,children:[typeof c=="function"?c():e.jsx(m,{onClick:h,color:r,children:c}),e.jsx(m,{onClick:M,color:r,...g,"aria-label":"more functions",children:e.jsx(C,{})})]}),e.jsx(V,{open:k,anchorEl:a.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(L,{ref:u,children:e.jsx(I,{onClickAway:d,children:e.jsx(v,{onClick:b,children:y})})})})]})}w.Item=p;const R=f(A)`
|
|
2
|
+
> .MuiButtonBase-root:last-of-type {
|
|
3
|
+
min-width: 2em;
|
|
4
|
+
padding-left: 0;
|
|
5
|
+
padding-right: 0;
|
|
6
|
+
}
|
|
7
|
+
`,V=f(z)`
|
|
8
|
+
z-index: ${t=>t.theme.zIndex.tooltip};
|
|
9
|
+
.MuiList-root {
|
|
10
|
+
padding: 4px 0;
|
|
11
|
+
}
|
|
12
|
+
.MuiListItem-root {
|
|
13
|
+
padding-top: 4px;
|
|
14
|
+
padding-bottom: 4px;
|
|
15
|
+
}
|
|
16
|
+
`;export{w as O};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{al as ee,A as T,r as f,a as te,b as se,V as S,u as j,x as re,ax as A,i as F,j as t,w as q,ay as oe,T as C,y as k,$ as _,o as m,az as ne,Q as ae,v as $,C as N,aA as ie,H as W,_ as M,aB as le,aC as ce,K as E,aD as ue,L as de,aE as pe,ab as he,s as O,a8 as fe,a9 as me,aF as ge,aa as xe}from"./index-
|
|
1
|
+
import{al as ee,A as T,r as f,a as te,b as se,V as S,u as j,x as re,ax as A,i as F,j as t,w as q,ay as oe,T as C,y as k,$ as _,o as m,az as ne,Q as ae,v as $,C as N,aA as ie,H as W,_ as M,aB as le,aC as ce,K as E,aD as ue,L as de,aE as pe,ab as he,s as O,a8 as fe,a9 as me,aF as ge,aa as xe}from"./index-BeQc3UkQ.js";import{u as B}from"./useLocalStorage-CAyV6Ga8.js";import{C as be,c as ke,e as ye,_ as Se,a as je,d as we,s as ve,S as V,b as Pe,A as Ce}from"./item-DixRT1Ir.js";import{e as L}from"./engine-PI4c2H--.js";import{g as U}from"./get-safe-url-BR_QU8Dh.js";import{P as z}from"./permission-fAWDL6eA.js";import{A as Re}from"./ArrowDropDown-Cm-Ihf0X.js";import{B as Le}from"./Breadcrumbs-Ce4oQ7Yc.js";import"./index-8mapgkUu.js";import"./KeyboardArrowDown-DrxfizRQ.js";import"./ChevronLeft-LUIxb-Gs.js";import"./ChevronRight-CMxsc1-C.js";import"./Search-3NZ8vA4F.js";import"./blocklet-DI09kb3z.js";import"./Autocomplete-3RVWHTcY.js";import"./ListSubheader-6QF36c7B.js";import"./Verified-Wsp8TANt.js";import"./VerifiedUser-BtmbPbB1.js";import"./Add-DsCZxomS.js";import"./Launch-CtQmWL-A.js";import"./Done-B-lhh5Lr.js";import"./DeleteOutline-DpQcJ9uI.js";import"./delete-confirm-y9uI0hXG.js";import"./click-to-copy-D3DsyQ7B.js";import"./MoreVert-trwGA3wl.js";import"./ButtonGroup-BBkFKNOE.js";import"./getValidReactChildren-COj4IOg4.js";function Be(e){const r=ee(),c=T(),[s,o]=B(`sid:blocklet:purchase:${e}`),[l,u]=f.useState(!1),[d,a]=f.useState(null),p=()=>{const{pathname:n,searchParams:b}=new URL(window.location.href),g=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";b.get("sid")&&(o(""),c(n.replace(g,"/"),{replace:!0}))},i=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(a(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(p,2e3)))}),f.useEffect(()=>{d&&d.id!==s&&o(d.id)},[d]),{hasCompleted:l,hasPurchased:i,session:d,setSession:a,doRedirect:p}}function De(e){setTimeout(()=>{window.location.href=U(e,{allowDomains:null})},1e3)}function K({meta:e,onCancel:r,handlePaySuccess:c=De,storeUrl:s}){const{t:o}=S(),{info:l}=j(),[u,d]=f.useState("both"),[a,p]=f.useState(1),i=re(l),n=A(e,l,s),b=P=>{P!==u&&d(P)},g=()=>{u&&(p(2),u==="verify"&&(window.location.href=U(n)))},w=(P,D)=>{D!=="backdropClick"&&r()},x=()=>{c(n)},h=F.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:oe.create({baseURL:k(s,"/store")}).get,onSuccess:x,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:h}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(C,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(C,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:h})]})]})}});const v=_;return t.jsx(v,{title:o("store.purchase.title",{name:h}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:w,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:g,onSelect:b})})})}K.propTypes={...ke,storeUrl:m.string.isRequired,handlePaySuccess:m.func};function H({meta:e,buttonText:r,storeUrl:c,isResource:s=!1}){const{t:o}=S(),l=T(),{info:u}=j(),{api:d}=ne(),a=F.isFreeBlocklet(e)===!1,[p,i]=f.useState(!1),{hasPurchased:n}=Be(e.did),[b,g]=f.useState(!1),[w]=B("instant-blocklet-install",!1),[x,h]=f.useState(!1),v=f.useMemo(()=>p?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[p,o,a]),P=f.useMemo(()=>s?o("blocklet.status.resource"):a?r.purchase:r.launch,[a,r,s]),D=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){g(!0);return}if(w){h(!0);return}if(!a){const R=A(e,u,c);window.location.href=U(R)}}catch(R){W.error(M(R),{autoHideDuration:5e3}),console.error("Blocklet installed failed",R)}finally{i(!1)}},J=()=>{i(!1),g(!1)},X=y=>{i(!1),h(!1),l(`/blocklets/${y.appDid}/components`)},Z=()=>{i(!1),h(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(z,{permission:"mutate_blocklets",children:y=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx($,{onClick:D,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(v||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:v?t.jsxs(t.Fragment,{children:[t.jsx(N,{size:16,style:{marginRight:3}}),v]}):P},e.did)})})}),(n||b)&&t.jsx(K,{method:"launch",meta:e,mode:"both",onCancel:J,storeUrl:c}),x&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:d.get,checkTimeout:5*60*1e3,onSuccess:X,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ie(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:Z})]})}H.propTypes={isResource:m.bool,meta:m.object.isRequired,buttonText:m.shape({purchase:m.string.isRequired,launch:m.string.isRequired}).isRequired,storeUrl:m.string.isRequired};const Ee=(e,r,c)=>{const s=he(r);return k(c,`/blocklets/${e.did}/?server-url=${s}`)},I=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return k(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function G({blocklet:e,endpoint:r="",serverVersion:c=""}){const{t:s}=S(),o=j();let l=k(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)l=k(u,ue(e.did,e.logo,e.version));else{let n=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");n&&(n=`/${n}`),l=k(n,`/blocklet/logo/${e.did}`)}try{const i=new URL(l);i.searchParams.set("v",e.version||+new Date),l=i.href}catch{}const d=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u},p=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(je,{serverVersion:c,requirementVersion:e.requirements?.server,size:"small",children:t.jsx(H,{isResource:!(L.hasStartEngine(e)||L.isGatewayBlocklet(e)||L.isPackBlocklet(e)||L.hasMountPoint(e)),...a})})});return t.jsx(de,{href:Ee(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:d,target:"_blank",children:t.jsx(Ie,{title:I({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:I({meta:e,attribute:"description",value:e.description}),cover:e.logo?l:"",version:e.version,onButtonClick:null,icons:e.docker?.image?[{key:"docker",icon:t.jsx(E,{sx:{display:"flex",color:"primary.main"},children:t.jsx(pe,{icon:we})}),title:s("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:s("blocklet.component.isOfficial")}:void 0,author:e.owner.fullName,avatar:Ue(e.owner.avatar,r),download:e.stats.downloads,button:p})})}G.propTypes={blocklet:m.object.isRequired,serverVersion:m.string,endpoint:m.string};function Q({storeUrl:e,handleSearchSelect:r=null,extraFilter:c=void 0,...s}){const{locale:o}=S(),l=j(),[u,d]=f.useState({}),a=n=>{d(n)},p=e,i=l?.info?.version;return f.useEffect(()=>{d({})},[p]),t.jsx(le,{FallbackComponent:ce,resetKeys:[p],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(Se,{layout:{showExplore:!1,showTitle:!0},blockletRender:n=>t.jsx(G,{...n,endpoint:p}),baseSearch:!0,endpoint:p,locale:o,onFilterChange:a,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:i})})})}Q.propTypes={storeUrl:m.string.isRequired,handleSearchSelect:m.func,extraFilter:m.func};const Ie=O(ve)`
|
|
2
2
|
.ms-highlight {
|
|
3
3
|
color: ${e=>e.theme.palette.primary.main};
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as t,p as n,j as r,bK as i,d5 as a}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CJ1w1KYa.js","./index-BeQc3UkQ.js","./index-DGkT7afN.css","./decode-DPztD6kB.js","./index-CX3PrUL2.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as t,p as n,j as r,bK as i,d5 as a}from"./index-BeQc3UkQ.js";const s=t.lazy(()=>i(()=>import("./index-CJ1w1KYa.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),d=`{
|
|
3
3
|
getNodeInfo {
|
|
4
4
|
code
|
|
5
5
|
info {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bK as r,fc as _,gZ as e}from"./index-BeQc3UkQ.js";const i={en:_(e),ar:()=>r(()=>import("./ar-BukCw0OI.js"),[],import.meta.url).then(t=>_(t.default)),de:()=>r(()=>import("./de-Br0tDZam.js"),[],import.meta.url).then(t=>_(t.default)),es:()=>r(()=>import("./es-D_e0gGgp.js"),[],import.meta.url).then(t=>_(t.default)),fr:()=>r(()=>import("./fr-DXizOT4b.js"),[],import.meta.url).then(t=>_(t.default)),hi:()=>r(()=>import("./hi-D2FEb_Tx.js"),[],import.meta.url).then(t=>_(t.default)),id:()=>r(()=>import("./id-Dw9URVwP.js"),[],import.meta.url).then(t=>_(t.default)),ja:()=>r(()=>import("./ja-DBxpsmGJ.js"),[],import.meta.url).then(t=>_(t.default)),ko:()=>r(()=>import("./ko-CCAdSyce.js"),[],import.meta.url).then(t=>_(t.default)),pt:()=>r(()=>import("./pt-CrMGrBZ6.js"),[],import.meta.url).then(t=>_(t.default)),ru:()=>r(()=>import("./ru-up3R57Pv.js"),[],import.meta.url).then(t=>_(t.default)),th:()=>r(()=>import("./th-DdNj2Ao6.js"),[],import.meta.url).then(t=>_(t.default)),vi:()=>r(()=>import("./vi-HNh41Xxk.js"),[],import.meta.url).then(t=>_(t.default)),"zh-TW":()=>r(()=>import("./zh-tw-Dr5DyPwA.js"),[],import.meta.url).then(t=>_(t.default)),zh:()=>r(()=>import("./zh-MM5bvwO_.js"),[],import.meta.url).then(t=>_(t.default))};export{i as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as je,j as e,u as Q,r as g,e as $e,aH as Wr,aI as E,aJ as ln,aK as Vn,aL as qr,aM as cn,aN as rt,V as M,ae as le,s as re,aO as dn,o as f,aP as Hr,aQ as un,aR as Gr,H as te,O as mn,T as L,t as H,Q as fe,aS as Ae,C as K,Z as be,v as Z,aT as Xn,_ as pe,K as W,p as mt,F as Kr,X as V,aF as Ie,aa as et,P as it,aU as Yr,d as Ht,aV as Fe,aW as me,ab as Vr,aX as Xr,aY as Qr,y as Zr,A as Qn,W as fn,g as pn,h as ne,aZ as Gt,a as At,b as ft,a_ as Zn,a$ as Jn,Y as er,a5 as It,b0 as Jr,b1 as ei,b2 as ti,b3 as ni,b4 as ot,i as gn,b5 as ri,b6 as ii,a7 as kt,b7 as oi,a8 as Lt,L as Kt,N as ai,b8 as si,b9 as tr,a9 as li,ba as nr,bb as De,bc as Te,bd as ci,be as Yt,bf as di,$ as rr,D as Ft,f as ir,bg as ui,bh as hn,al as mi,bi as fi,bj as ee,bk as pi,U as xn,l as yn,m as bn,bl as gi,bm as hi,bn as xi}from"./index-
|
|
1
|
+
import{aG as je,j as e,u as Q,r as g,e as $e,aH as Wr,aI as E,aJ as ln,aK as Vn,aL as qr,aM as cn,aN as rt,V as M,ae as le,s as re,aO as dn,o as f,aP as Hr,aQ as un,aR as Gr,H as te,O as mn,T as L,t as H,Q as fe,aS as Ae,C as K,Z as be,v as Z,aT as Xn,_ as pe,K as W,p as mt,F as Kr,X as V,aF as Ie,aa as et,P as it,aU as Yr,d as Ht,aV as Fe,aW as me,ab as Vr,aX as Xr,aY as Qr,y as Zr,A as Qn,W as fn,g as pn,h as ne,aZ as Gt,a as At,b as ft,a_ as Zn,a$ as Jn,Y as er,a5 as It,b0 as Jr,b1 as ei,b2 as ti,b3 as ni,b4 as ot,i as gn,b5 as ri,b6 as ii,a7 as kt,b7 as oi,a8 as Lt,L as Kt,N as ai,b8 as si,b9 as tr,a9 as li,ba as nr,bb as De,bc as Te,bd as ci,be as Yt,bf as di,$ as rr,D as Ft,f as ir,bg as ui,bh as hn,al as mi,bi as fi,bj as ee,bk as pi,U as xn,l as yn,m as bn,bl as gi,bm as hi,bn as xi}from"./index-BeQc3UkQ.js";import{u as yi,T as bi}from"./html-title-CHWL92Ab.js";import{A as vi}from"./ArrowDropDown-Cm-Ihf0X.js";import{u as Vt,C as B,a as vn}from"./index.esm-DWSKQCVf.js";import{S as se,a as ji}from"./switch-control-Ce7-RZ39.js";import{P as ie}from"./permission-fAWDL6eA.js";import{H as or,g as wi}from"./index-BZEpEbZE.js";import{A as ar}from"./Link-DWefbDaG.js";import{A as Ci}from"./actions-BAAc2dMh.js";import{D as ve}from"./Delete-Dfzx-_QK.js";import{D as pt}from"./delete-confirm-y9uI0hXG.js";import{v as at}from"./index-6nMPypbs.js";import{s as Si}from"./logo-BKA11TRi.js";import{R as sr,a as Ot,b as ki}from"./url-evaluation-CnA0uWcs.js";import{u as Di}from"./useLocalStorage-CAyV6Ga8.js";import{R as Ti}from"./Refresh-BHzztae5.js";import{L as Ri}from"./LoadingButton-BYeGfUfG.js";import{C as Ei,R as Pi,P as lr,S as _i}from"./rotate-session-key-Bh2rfrqq.js";import{A as Oe}from"./Add-DsCZxomS.js";import{B as cr,D as jn,W as Ke}from"./status--oG1pao2.js";import{i as Ai}from"./is-path-prefix-equal-DSamcBqo.js";import{N as Ii}from"./ChevronRight-CMxsc1-C.js";import{I as Li}from"./MoreVert-trwGA3wl.js";import{E as dr}from"./Edit-BC3nr7bV.js";import{A as Fi}from"./CallMerge-DB0zaZAy.js";import{C as Oi}from"./CardContent-DYbZwS2P.js";import"./FilterList-rsYn09vK.js";import"./CSSTransition-Bdj4Mjb5.js";import"./emotion-cache.browser.esm-D3p6zzp2.js";import"./index-O0QMxlIj.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-AZEPsRt3.js";import"./TableSearch-B_n7jlL9.js";import"./Search-3NZ8vA4F.js";import"./Clear-C3sN6cHh.js";import"./click-to-copy-D3DsyQ7B.js";import"./visuallyHidden-Dan1xhjv.js";const Ni=je(e.jsx("path",{d:"m7 14 5-5 5 5z"})),$i=je(e.jsx("path",{d:"M12 3 2 21h20zm1 5.92L18.6 19H13zm-2 0V19H5.4z"})),Ui=je(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),ur=je(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),zi=je(e.jsx("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"})),Mi=je(e.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"})),Bi=je(e.jsx("path",{d:"m19 15-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9z"})),ye="Dashboard",mr=g.createContext({}),{Provider:Wi,Consumer:ms}=mr,wn=[ye,E.DOMAIN_FOR_IP_SITE,E.DOMAIN_FOR_IP_SITE_REGEXP],qi=(t,r)=>{if(t.name===E.DOMAIN_FOR_DEFAULT_SITE)return-1;if(r.name===E.DOMAIN_FOR_DEFAULT_SITE)return 1;const n=wn.includes(t.name),i=wn.includes(r.name);return n&&i?cn(t.name,r.name):n?-1:i?1:cn(t.name,r.name)},Cn=({sites:t,nodePort:r})=>{const n=window.location.hostname,a=(t||[]).map(o=>{const{id:s,rules:d=[],corsAllowedOrigins:m=[]}=o;let{domain:c,domainAliases:u}=o;u=u||[],[E.DOMAIN_FOR_IP_SITE,E.DOMAIN_FOR_IP_SITE_REGEXP].includes(c)&&(c=ye,u.find(v=>v.value===n)||u.unshift({protected:!1,value:n}));const j={id:s,name:c,type:"domain",items:[],domainAliases:u,isProtected:o.isProtected,corsAllowedOrigins:m};return(d||[]).forEach(v=>{const{id:h,isProtected:S,from:{pathPrefix:b},to:k}=v;if(k.type===E.ROUTING_RULE_TYPES.BLOCKLET){let D="";Number.parseInt(k.port,10)===Number.parseInt(r,10)?(D="Blocklet Server Dashboard",k.type=E.ROUTING_RULE_TYPES.DAEMON):D=k.did,j.items.push({id:h,name:ln(b||"/"),title:D,type:"rule",isProtected:S,pathPrefix:b,to:k})}else j.items.push({id:h,pathPrefix:b,name:ln(b||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:S,to:k})}),j.items=Vn(j.items,v=>v.name),j}).sort(qi),l=a.reduce((o,s)=>{let{name:d}=s;return d.endsWith(E.BLOCKLET_SITE_GROUP_SUFFIX)&&([d]=d.split(".")),o[d]={...s,rules:s.items},o},{});return{sites:a,siteMap:l}},Hi=({did:t,domain:r,mountPoint:n,siteMap:i,params:a}={})=>{if(!i)return null;const l=i[t];if(!l)return null;const o=r||(l.domainAliases||[])[0];if(!o)return null;let s=n;if(!s){const d=l.rules.filter(m=>!m.name.startsWith(E.WELLKNOWN_PATH_PREFIX))[0];s=d?d.name:"/"}return rt(o.value,s,a)},Gi=({did:t,mountPoint:r,siteMap:n,params:i}={})=>{if(!n)return[];const a=n[t];if(!a)return[];const l=a.domainAliases||[];if(!l.length)return[];let o=r;if(!o){const s=a.rules.filter(d=>!d.name.startsWith(E.WELLKNOWN_PATH_PREFIX))[0];o=s?s.name:"/"}return l.map(s=>rt(s.value,o,i))},Ki=t=>{const r=t.map(i=>i.domain).filter(i=>![E.DOMAIN_FOR_IP_SITE_REGEXP,E.DOMAIN_FOR_DEFAULT_SITE].includes(i));let n=[];return t.forEach(i=>n.push(...i.domainAliases||[])),n=n.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:r,domainsAliases:n}};function Sn({children:t}){const{api:r,info:n}=Q(),[i,a]=g.useState([]),[l,o]=g.useState([]),[s,d]=g.useState([]),m=$e(async()=>{const{sites:y}=await r.getRoutingSites({input:{snapshotHash:""}}),P=y||[];await Promise.all(P.map(async w=>(w.domainAliases=await Wr(w.domainAliases,{getIP:qr}),w)));const x=Ki(P);a(P),o(x.domains);const p=Cn({sites:P,nodePort:n.port});d((p?.sites||[]).map(w=>w.domainAliases.map(_=>_.value)).filter(w=>w.length))},[n]),c=(y,P)=>{a(x=>x.map(p=>p.id===y?P.domain?P:{...P,domain:p.domain}:p))},u=async y=>{const P=await r.addRoutingSite({input:y});a(i.concat(P.site))},j=async(y,P)=>{const x=await r.updateRoutingSite({input:{id:y,...P}});if(x.site&&x.site.id){const p=i.findIndex(w=>w.id===x.site.id);p!==-1&&(i.splice(p,1,x.site),a([].concat(i)))}},v=async y=>{await r.deleteRoutingSite({input:{id:y}}),a(i.filter(P=>P.id!==y))},h=async(y,P,x)=>{const p=await r.addDomainAlias({input:{id:y,domainAlias:P,force:x}});c(y,p.site)},S=async(y,P)=>{const x=await r.deleteDomainAlias({input:{id:y,domainAlias:P}});c(y,x.site)},b=async(y,P)=>{const{site:x}=await r.addRoutingRule({input:{id:y,rule:P}});c(y,x)},k=async(y,P)=>{const{site:x}=await r.updateRoutingRule({input:{id:y,rule:P}});c(y,x)},D=async(y,P)=>{const{site:x}=await r.deleteRoutingRule({input:{id:y,ruleId:P}});c(y,x)},C={loading:m.loading,error:m.error,refresh:m.retry,api:r,actions:{addSite:u,updateSite:j,deleteSite:v,addDomainAlias:h,deleteDomainAlias:S,addRule:b,updateRule:k,deleteRule:D}},{sites:T,siteMap:R}=Cn({sites:i,nodePort:n.port});return C.sites=T,C.siteMap=R,C.domains=l,C.allDomains=s,C.getBlockletUrl=({did:y,domain:P,mountPoint:x,params:p})=>Hi({did:y,domain:P,mountPoint:x,siteMap:C.siteMap,params:p}),C.getBlockletUrls=({did:y,mountPoint:P,params:x})=>Gi({did:y,mountPoint:P,siteMap:C.siteMap,params:x}),e.jsx(Wi,{value:{routing:C},children:t})}function de(){const{routing:t}=g.useContext(mr);return t}function Xt(t){const r=[E.DOMAIN_FOR_IP_SITE_REGEXP,E.DOMAIN_FOR_DEFAULT_SITE,E.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&r.push(window.location.hostname),r.includes(t)}function Yi(){return null}function fr({confirm:t=null}){const[r,n]=g.useState(null),{t:i}=M(),a=()=>{n(null)},l=async s=>{if(s){let d=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";d==="/"?dn.push(`${s.pathname}`):(d.endsWith("/")&&(d=d.substring(0,d.length-1)),dn.push(`${d}${s.pathname}`)),window.location.reload()}},o=(s,...d)=>{let m=typeof t=="function"?t(s,...d):t;return m?(typeof m=="string"&&(m={description:m}),n({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>l(s),onCancel:()=>a(),...m}),!1):!0};return e.jsxs(Vi,{children:[e.jsx(Yi,{message:o}),r&&e.jsx(le,{title:r.title,description:r.description,confirm:r.confirm,cancel:r.cancel,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}fr.propTypes={confirm:f.oneOfType([f.object,f.string,f.func])};const Vi=re.div`
|
|
2
2
|
margin-bottom: 24px;
|
|
3
3
|
.top-btns-alert {
|
|
4
4
|
@media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{be as x}from"./index-
|
|
1
|
+
import{be as x}from"./index-BeQc3UkQ.js";function D(a,i){for(var r=0;r<i.length;r++){const e=i[r];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in a)){const t=Object.getOwnPropertyDescriptor(e,s);t&&Object.defineProperty(a,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var l,w;function J(){if(w)return l;w=1;var a={default:l,call:function(i,r,e){var s="";typeof r=="function"&&(e=r,r={});var t={data:r===void 0?null:r};if(typeof e=="function"){var n="dscb"+window.dscb++;window[n]=e,t._dscbstub=n}return t=JSON.stringify(t),window._dsbridge?s=_dsbridge.call(i,t):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(s=prompt("_dsbridge="+i,t)),JSON.parse(s||"{}").data},register:function(i,r,e){var s=e?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){a.call("_dsb.dsinit")},0)),typeof r=="object"?s._obs[i]=r:s[i]=r},registerAsyn:function(i,r){this.register(i,r,!0)},hasNativeMethod:function(i,r){return this.call("_dsb.hasNativeMethod",{name:i,type:r||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};return function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:a,close:function(){a.call("_dsb.closePage")},_handleMessageFromNative:function(e){var s=JSON.parse(e.data),t={id:e.callbackId,complete:!0},n=this._dsf[e.method],o=this._dsaf[e.method],v=function(_,p){t.data=_.apply(p,s),a.call("_dsb.returnValue",t)},g=function(_,p){s.push(function(O,j){t.data=O,t.complete=j!==!1,a.call("_dsb.returnValue",t)}),_.apply(p,s)};if(n)v(n,this._dsf);else if(o)g(o,this._dsaf);else{var u=e.method.split(".");if(u.length<2)return;var b=u.pop(),h=u.join("."),c=this._dsf._obs,f=c[h]||{},d=f[b];if(d&&typeof d=="function"){v(d,f);return}if(c=this._dsaf._obs,f=c[h]||{},d=f[b],d&&typeof d=="function"){g(d,f);return}}}};for(var r in i)window[r]=i[r];a.register("_hasJavascriptMethod",function(e,s){var t=e.split(".");if(t.length<2)return!!(_dsf[t]||_dsaf[t]);var e=t.pop(),n=t.join("."),o=_dsf._obs[n]||_dsaf._obs[n];return o&&!!o[e]})}}(),l=a,l}var y=J();const N=x(y),k=D({__proto__:null,default:N},[y]);export{k as i};
|