@abtnode/webapp 1.17.8-beta-20260205-074433-9d1114cf → 1.17.8
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-IaUSFlm4.js → AdapterDayjs-CXgBZcQU.js} +1 -1
- package/dist/assets/{Add-D1qtasGt.js → Add-B-lIYZBc.js} +1 -1
- package/dist/assets/ArrowDropDown-C1ynmK1V.js +1 -0
- package/dist/assets/{Autocomplete-DTKIP70z.js → Autocomplete-BHqH72uG.js} +1 -1
- package/dist/assets/{Breadcrumbs-DYu6Ih3W.js → Breadcrumbs-CpZ2DeBG.js} +1 -1
- package/dist/assets/{ButtonGroup-BmKH0AR_.js → ButtonGroup-CXwzM552.js} +1 -1
- package/dist/assets/{CSSTransition-By0IzEZz.js → CSSTransition-hTlKGu0l.js} +1 -1
- package/dist/assets/{CallMerge-CBsd3n82.js → CallMerge-V8M4tzIM.js} +1 -1
- package/dist/assets/{CardContent-uQht8_nO.js → CardContent-MdG6Fo_s.js} +1 -1
- package/dist/assets/{ChevronLeft-YHLhmhXY.js → ChevronLeft-BPs9Erbv.js} +1 -1
- package/dist/assets/{ChevronRight-Bry_Rp2n.js → ChevronRight-C_yvQN06.js} +1 -1
- package/dist/assets/{Clear-C9b1QEIp.js → Clear-XkW6YpHE.js} +1 -1
- package/dist/assets/{Delete-BR43GocU.js → Delete-CCasVLgy.js} +1 -1
- package/dist/assets/{DeleteOutline-BknUUIOQ.js → DeleteOutline-CocEa6gq.js} +1 -1
- package/dist/assets/{Done-D38mSa7e.js → Done-DfHgd6VN.js} +1 -1
- package/dist/assets/{Edit-Cezv9GPx.js → Edit-CGdW8_LW.js} +1 -1
- package/dist/assets/{ErrorOutline-DSSui5bs.js → ErrorOutline-D3nJBXYA.js} +1 -1
- package/dist/assets/{FilterList-ByiwX7w6.js → FilterList-BiaeVs0C.js} +1 -1
- package/dist/assets/{Google-DW20cCdB.js → Google-D9HgkG4U.js} +1 -1
- package/dist/assets/{HelpOutline-C8Ii5pdp.js → HelpOutline-s5mQqTw1.js} +1 -1
- package/dist/assets/{Launch-BjUxWdZ_.js → Launch-DHnB5pzO.js} +1 -1
- package/dist/assets/{Link-rwof5_jN.js → Link-DUSQD8mc.js} +1 -1
- package/dist/assets/{ListItemButton-CLYRGxS5.js → ListItemButton-BIo7wBNv.js} +1 -1
- package/dist/assets/{ListSubheader-BrZqDYTB.js → ListSubheader-rZisNvzB.js} +1 -1
- package/dist/assets/{LoadingButton-CEhniQ1z.js → LoadingButton-egcGN7yK.js} +1 -1
- package/dist/assets/{LottiePlayer.modern-BOVXfijb.js → LottiePlayer.modern-DuQJ5g1j.js} +1 -1
- package/dist/assets/{MoreVert-YQMFdAci.js → MoreVert-Cw1fjU9L.js} +1 -1
- package/dist/assets/{OpenInNew-D__db3UD.js → OpenInNew-2i4mGCRx.js} +1 -1
- package/dist/assets/{Refresh-CEyibS7R.js → Refresh-BIkqgW7p.js} +1 -1
- package/dist/assets/{Replay-DJEt53W0.js → Replay-3PaYn2br.js} +1 -1
- package/dist/assets/{Search-B-Kpov_x.js → Search-mc0LftDb.js} +1 -1
- package/dist/assets/{Stepper-BkvTFi6y.js → Stepper-CnqNXODv.js} +1 -1
- package/dist/assets/{TableSearch-QTEwGVjE.js → TableSearch-ZIwL7jK3.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-leiBEwd_.js → ToggleButtonGroup-DeGfqT0G.js} +1 -1
- package/dist/assets/{UnfoldMore-BtGzVWNn.js → UnfoldMore-DFA58tLQ.js} +1 -1
- package/dist/assets/{Verified-GvGnFXRL.js → Verified-se8hbTqT.js} +1 -1
- package/dist/assets/{VerifiedUser-D8u3Hj9z.js → VerifiedUser-8QA2XNlm.js} +1 -1
- package/dist/assets/{ViewList-CI4jp_14.js → ViewList-DgyKMmIc.js} +1 -1
- package/dist/assets/{Visibility-Bmnp5dVh.js → Visibility-BqBwXDHr.js} +1 -1
- package/dist/assets/{_createAggregator-DcJLZ0MZ.js → _createAggregator-BS_ZCLsv.js} +1 -1
- package/dist/assets/{actions-CCjvPhEB.js → actions-BuX7-i-0.js} +1 -1
- package/dist/assets/{actions-DaRBxjah.js → actions-DR8B4Taf.js} +2 -2
- package/dist/assets/{actions-CAvjo_Ow.js → actions-Zy-oEKVg.js} +1 -1
- package/dist/assets/{agreement-B5uBdrUm.js → agreement-3SHQ4MuR.js} +1 -1
- package/dist/assets/api-DBq1KtcA.js +1 -0
- package/dist/assets/{appearance-BWTNqmDR.js → appearance-CRQaeOoe.js} +1 -1
- package/dist/assets/{audit-logs-BAppUNme.js → audit-logs-BGRhRsNS.js} +2 -2
- package/dist/assets/{babel-BttEwFDF.js → babel-BILHfcMU.js} +1 -1
- package/dist/assets/{base-chart-nzAgs-vq.js → base-chart-Cp-etWR-.js} +1 -1
- package/dist/assets/{blocklet-mQW2VRE3.js → blocklet-D7q_eJsm.js} +1 -1
- package/dist/assets/{chain-Bajmovwi.js → chain-DDmwEbOF.js} +1 -1
- package/dist/assets/{click-to-copy-BJwHXTAU.js → click-to-copy-wk3E32eY.js} +1 -1
- package/dist/assets/cloneDeep-BEJXcFgb.js +1 -0
- package/dist/assets/{config-navigation-DhuiKMvJ.js → config-navigation-iUuwjLA_.js} +17 -17
- package/dist/assets/{connect-lnVGHfaY.js → connect-DGRM2e01.js} +1 -1
- package/dist/assets/{connect-to-HWRwV1Zb.js → connect-to-BdinmIba.js} +3 -3
- package/dist/assets/{delete-confirm-D-pHWenk.js → delete-confirm-C8X53PNk.js} +1 -1
- package/dist/assets/{depsEqual-BTB47kAG.js → depsEqual-FU6HOfMn.js} +1 -1
- package/dist/assets/{detail-DPUG43Cf.js → detail-BX_klHKR.js} +2 -2
- package/dist/assets/domains-DlW2t7QG.js +28 -0
- package/dist/assets/{download-B_GCffOL.js → download-CHMW-VV9.js} +1 -1
- package/dist/assets/{edit.svg-DgkWXClh.js → edit.svg-CBqxioRV.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-D6kXFXIA.js +1 -0
- package/dist/assets/engine-hQAyActy.js +1 -0
- package/dist/assets/{federated-detail-dialog-BAAYkStt.js → federated-detail-dialog-C93dA_OW.js} +1 -1
- package/dist/assets/{get-safe-url-BmWKThk5.js → get-safe-url-n4nPkbEQ.js} +1 -1
- package/dist/assets/getValidReactChildren-dJeDeNuf.js +1 -0
- package/dist/assets/{graphql-DRZgDRnJ.js → graphql-BOG1t7Ob.js} +1 -1
- package/dist/assets/{graphqlMode-D6Ry3UyA.js → graphqlMode-BuOU6E0N.js} +2 -2
- package/dist/assets/{html-title-BO3r7YSd.js → html-title-DwrWBQUt.js} +1 -1
- package/dist/assets/{iframe-DaoKgbiQ.js → iframe-B0inMXzK.js} +1 -1
- package/dist/assets/{index-BsfgDen6.js → index-0lc-age1.js} +1 -1
- package/dist/assets/index-1nsTMIEw.js +1 -0
- package/dist/assets/{index-xie30Dh0.js → index-2jRJYLHP.js} +1 -1
- package/dist/assets/{index-DwPMkrzc.js → index-2tPqycMJ.js} +2 -2
- package/dist/assets/{index-Ohp5zy8G.js → index-4OvGI3tM.js} +1 -1
- package/dist/assets/{index-BA_zqSiS.js → index-7TgPZijh.js} +1 -1
- package/dist/assets/{index-IQ8RBJFB.js → index-8K8V7S7h.js} +1 -1
- package/dist/assets/{index-DgAeLiKC.js → index-B01of1n7.js} +1 -1
- package/dist/assets/{index-PZ2fx_h4.js → index-B8jKymjp.js} +3 -3
- package/dist/assets/{index-DUa2rZxk.js → index-B9oDQ5jy.js} +20 -20
- package/dist/assets/{index-CcXfL7E7.js → index-BDQexjSt.js} +1 -1
- package/dist/assets/{index-CAbi4Q6i.js → index-BFpYSXLl.js} +3 -3
- package/dist/assets/{index-CcPy8sB_.js → index-BIOcSTv1.js} +1 -1
- package/dist/assets/{index-BdqGdcv2.js → index-BJsW1I-W.js} +1 -1
- package/dist/assets/{index-DrKVMSE5.js → index-BPu5OFdR.js} +1 -1
- package/dist/assets/{index-DscVI0IV.js → index-BQ0GXRUy.js} +1 -1
- package/dist/assets/{index-C7RFlKtP.js → index-BbnbDlTc.js} +2 -2
- package/dist/assets/{index-I3asAR5r.js → index-Bg6xcyjD.js} +6 -6
- package/dist/assets/{index-N0aqGit9.js → index-BsmvyFtw.js} +1 -1
- package/dist/assets/{index-BfWiTV5L.js → index-C5xvmzdD.js} +1 -1
- package/dist/assets/{index-D7zthsmK.js → index-CGJGuomb.js} +3 -3
- package/dist/assets/{index-DEflHlyo.js → index-CP8e2zcP.js} +3 -3
- package/dist/assets/{index-CENTGsHb.js → index-CRRnOuLM.js} +3 -3
- package/dist/assets/{index-AGlbL6jT.js → index-Cm_CX9Km.js} +1 -1
- package/dist/assets/{index-C07Ljz-P.js → index-CqXuTw4d.js} +1 -1
- package/dist/assets/{index-Cj38JD_6.js → index-Cske9PWb.js} +3 -3
- package/dist/assets/{index-BWxIl7Zm.js → index-CyXVLDQI.js} +1 -1
- package/dist/assets/{index-DZ_f5Dfi.js → index-D3qtx7de.js} +1 -1
- package/dist/assets/{index-BcRKEX-z.js → index-DK8BRrRb.js} +2 -2
- package/dist/assets/{index-CWEDY4A2.js → index-DNGIFQtW.js} +4 -4
- package/dist/assets/{index-Bl5zzd5F.js → index-DX_ig3IR.js} +1 -1
- package/dist/assets/{index-CJe-L0_W.js → index-De_3fKYA.js} +1 -1
- package/dist/assets/{index-CXj3-Qmy.js → index-G4GuFOuO.js} +1 -1
- package/dist/assets/{index-DA3gthJ9.js → index-MLCJ7HJV.js} +2 -2
- package/dist/assets/{index-BlU32mL_.js → index-OZjARxbD.js} +1 -1
- package/dist/assets/{index-BbxLly-V.js → index-Oah-jRyx.js} +1 -1
- package/dist/assets/{index-22B4OxZa.js → index-PzC6rkTH.js} +1 -1
- package/dist/assets/{index-ll7_pfKU.js → index-StdVm_EG.js} +1 -1
- package/dist/assets/{index--_MX4Y7D.js → index-_qKxdWY4.js} +10 -10
- package/dist/assets/{index-C2XQ9Wkq.js → index-dKtf23Ej.js} +1 -1
- package/dist/assets/{index-C4zhyFnN.js → index-erCgIvu7.js} +1 -1
- package/dist/assets/{index-DzQavNm8.js → index-hxHDV4zb.js} +2 -2
- package/dist/assets/{index-PupLKSg6.js → index-mGRBDoXw.js} +1 -1
- package/dist/assets/{index-B9lrrb_O.js → index-p8ewFFuc.js} +5 -5
- package/dist/assets/{index-BI2ulEux.js → index-pMmL--Md.js} +1 -1
- package/dist/assets/{index.esm-uIPkYqTP.js → index.esm-DjcC6_YD.js} +1 -1
- package/dist/assets/{install-from-url-6nN6p8KI.js → install-from-url-DfM4lxPD.js} +1 -1
- package/dist/assets/{invitation-BwJczXLd.js → invitation-CyjIyIIY.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-B5QaVi7p.js → is-path-prefix-equal-sWdIB_FI.js} +1 -1
- package/dist/assets/{isEmail-DYZ2ooZR.js → isEmail-CpvKmXxu.js} +1 -1
- package/dist/assets/{item-9r2fa-dg.js → item-NX8BCXwV.js} +6 -6
- package/dist/assets/{jsonMode--ELrQNuw.js → jsonMode-wNz3PCor.js} +1 -1
- package/dist/assets/{list-header-W2Zqfuhf.js → list-header-DXqt77-Y.js} +1 -1
- package/dist/assets/{lite-eb-MtGjP.js → lite-D7_0Kk8P.js} +2 -2
- package/dist/assets/{lock.svg-BAPv5bGI.js → lock.svg-D22_UbmU.js} +1 -1
- package/dist/assets/{log-DfRitFTN.js → log-BtG4l72D.js} +1 -1
- package/dist/assets/{login-method-item-duWmEQ4c.js → login-method-item-CGUaonon.js} +1 -1
- package/dist/assets/{lottie-react.esm-Dg4E2zZC.js → lottie-react.esm-Cj9O6Lld.js} +1 -1
- package/dist/assets/{memory-CVCAiVAD.js → memory-MEOErB2y.js} +1 -1
- package/dist/assets/{metric-DGyzAosW.js → metric-DzrjUE5P.js} +1 -1
- package/dist/assets/{monaco-editor-CIyTCq3w.js → monaco-editor-i4E7Erh-.js} +3 -3
- package/dist/assets/{mouseTarget-yzhGv1sN.js → mouseTarget-DHjy6bBl.js} +1 -1
- package/dist/assets/omit-C1X-CRrb.js +1 -0
- package/dist/assets/{overview-CjC2_6TA.js → overview-BPSzB7yi.js} +1 -1
- package/dist/assets/{permission-Dgeoh_gC.js → permission-D6xGjoP4.js} +1 -1
- package/dist/assets/{preference-DPXvsW07.js → preference-CWfaETuk.js} +9 -9
- package/dist/assets/{provider-icon-H03n2Hjs.js → provider-icon-D-a204Ay.js} +1 -1
- package/dist/assets/{raf-schd.esm-Dgds4zE-.js → raf-schd.esm-vaS856Rv.js} +1 -1
- package/dist/assets/{rotate-session-key-Cg34J7dQ.js → rotate-session-key-Cn3NVWRi.js} +1 -1
- package/dist/assets/runtime-BJVsSRvX.js +1 -0
- package/dist/assets/schema-DeNYz3hJ.js +1 -0
- package/dist/assets/sdk-CyaYnqk4.js +1 -0
- package/dist/assets/{service-DoInkZVF.js → service-COrrqY-3.js} +1 -1
- package/dist/assets/{shorten-label-Ct9vHiPy.js → shorten-label-j-itDv6J.js} +1 -1
- package/dist/assets/{simple-select-DUBD32-K.js → simple-select-DApzKMrW.js} +1 -1
- package/dist/assets/{spaces-Ca-nLDun.js → spaces-BqdEt5Dg.js} +1 -1
- package/dist/assets/{status-DJJQr33v.js → status-CFw68CfZ.js} +2 -2
- package/dist/assets/{status-B8aMCivY.js → status-vwaEURfH.js} +1 -1
- package/dist/assets/{switch-control-DN6AO5e-.js → switch-control-BEw34mlq.js} +1 -1
- package/dist/assets/{table-icons-DPN-ujpU.js → table-icons-V0nzUvpC.js} +1 -1
- package/dist/assets/team-Bp-ehLS6.js +1 -0
- package/dist/assets/toLower-C4OoJYWk.js +1 -0
- package/dist/assets/toUpper-P-IpqDCE.js +1 -0
- package/dist/assets/{traffic-Coyo0eln.js → traffic-BuuDuC5C.js} +1 -1
- package/dist/assets/trim-BrqZEf0Q.js +1 -0
- package/dist/assets/{url-evaluation-DF8LRV6u.js → url-evaluation-BotqjpOW.js} +1 -1
- package/dist/assets/{url-join-BAOkJVTN.js → url-join-BYRfgTzL.js} +1 -1
- package/dist/assets/{use-mobile-D8q1By2e.js → use-mobile-BIorytbM.js} +1 -1
- package/dist/assets/{use-mobile-DjOKbbdW.js → use-mobile-BxCxZMSF.js} +1 -1
- package/dist/assets/{useAsync-CpuSmv4M.js → useAsync-CbHsXkPS.js} +1 -1
- package/dist/assets/{useAsyncRetry-DQ-1kK3Z.js → useAsyncRetry-6ULbruV9.js} +1 -1
- package/dist/assets/{useLocalStorage-B1cIHaab.js → useLocalStorage-CBx2eW_l.js} +1 -1
- package/dist/assets/{useThemeProps-CaL-a5Z3.js → useThemeProps-BWD3Vp6O.js} +1 -1
- package/dist/assets/{util-Dk5V-b84.js → util-BF2dKFyL.js} +1 -1
- package/dist/assets/{wait-container-BxmUT_e8.js → wait-container-Cc0h_2b3.js} +1 -1
- package/dist/assets/{without-wallet-DdcteX-E.js → without-wallet-lUjEmpWw.js} +1 -1
- package/dist/assets/wrap-locale-CF87ubG3.js +1 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-CLtIK8Ds.js +0 -1
- package/dist/assets/api-CtY709C1.js +0 -1
- package/dist/assets/cloneDeep-DcL7wHTZ.js +0 -1
- package/dist/assets/domains-DgOFqkxv.js +0 -28
- package/dist/assets/emotion-cache.browser.esm-C9pXLaus.js +0 -1
- package/dist/assets/engine-CsOVDEBF.js +0 -1
- package/dist/assets/getValidReactChildren-CaUdxsqb.js +0 -1
- package/dist/assets/index-DTHqSol2.js +0 -1
- package/dist/assets/omit-C9i7Uayy.js +0 -1
- package/dist/assets/runtime-3p5sMXNX.js +0 -1
- package/dist/assets/schema-DtiemgGr.js +0 -1
- package/dist/assets/sdk-CChXw_FN.js +0 -1
- package/dist/assets/team-pgmvSiLk.js +0 -1
- package/dist/assets/toUpper-DWIvDS3T.js +0 -1
- package/dist/assets/trim-CGi2LMwA.js +0 -1
- package/dist/assets/wrap-locale-BD1k5sx5.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./overview-
|
|
2
|
-
import{V as Ue,d as qe,aR as Tt,r as b,by as Ge,j as d,as as Qe,B as Y,bz as Ke,A as jt,aT as j,bA as Pt,H as W,bB as We,bC as Pe,bD as At,a as Je,u as Ot,b as Lt,bE as Dt,bF as Bt,bG as Mt,bH as Ae,bI as Rt,bJ as Nt,b3 as Oe,C as Le,bK as Ft,bL as Vt,J as le,bM as zt,G as I,q as $t}from"./index-DEflHlyo.js";import{T as Ht,u as Ut}from"./html-title-BO3r7YSd.js";import{B as qt}from"./status-DJJQr33v.js";import{D as Gt,B as Qt}from"./actions-CCjvPhEB.js";import{u as Kt}from"./blocklet-mQW2VRE3.js";import{p as Wt}from"./index-xie30Dh0.js";import{B as Jt,u as Xt,T as Yt}from"./team-pgmvSiLk.js";import{P as Zt}from"./permission-Dgeoh_gC.js";import{B as en}from"./Breadcrumbs-DYu6Ih3W.js";import"./useLocalStorage-B1cIHaab.js";import"./MoreVert-YQMFdAci.js";import"./DeleteOutline-BknUUIOQ.js";import"./get-safe-url-BmWKThk5.js";import"./ButtonGroup-BmKH0AR_.js";import"./getValidReactChildren-CaUdxsqb.js";import"./url-evaluation-DF8LRV6u.js";const Xe=Object.freeze({left:0,top:0,width:16,height:16}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),H=Object.freeze({...Xe,...Z}),pe=Object.freeze({...H,body:"",hidden:!1});function tn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function De(e,t){const n=tn(e,t);for(const r in pe)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function nn(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,l=c&&s(c);l&&(o[i]=[c].concat(l))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function on(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(c){s=De(r[c]||o[c],s)}return i(t),n.forEach(i),De(e,s)}function rn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=nn(e);for(const o in r){const s=r[o];s&&(t(o,on(e,o,s)),n.push(o))}return n}const F=/^[a-z0-9]+(-[a-z0-9]+)*$/,R=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!J(a)?null:a}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!J(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!J(c,n)?null:c}return null},J=(e,t)=>e?!!((e.provider===""||e.provider.match(F))&&(t&&e.prefix===""||e.prefix.match(F))&&e.name.match(F)):!1,sn={provider:"",aliases:{},not_found:{},...Xe};function ue(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function cn(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ue(e,sn))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(F)||typeof s.body!="string"||!ue(s,pe))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(F)||typeof i!="string"||!n[i]&&!r[i]||!ue(s,pe))return null}return t}const ee=Object.create(null);function an(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function _(e,t){const n=ee[e]||(ee[e]=Object.create(null));return n[t]||(n[t]=an(e,t))}function ke(e,t){return cn(t)?rn(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ln(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function un(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(ee)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(ee[o]||{})).forEach(i=>{const c=_(o,i);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+i+":"+l))})}),n}let Ee=!1;function fn(e){return Ee}function U(e){const t=typeof e=="string"?R(e,!0,Ee):e;if(t){const n=_(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function dn(e,t){const n=R(e,!0,Ee);if(!n)return!1;const r=_(n.provider,n.prefix);return ln(r,n.name,t)}function Ye(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!J({provider:t,prefix:n,name:"a"}))return!1;const r=_(t,n);return!!ke(r,e)}function pn(e){return!!U(e)}function mn(e){const t=U(e);return t?{...H,...t}:null}const Ze=Object.freeze({width:null,height:null}),et=Object.freeze({...Ze,...Z}),hn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function me(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(hn);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=gn.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const bn=e=>e==="unset"||e==="undefined"||e==="none";function oe(e,t){const n={...H,...e},r={...et,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],E=g.hFlip,A=g.vFlip;let w=g.rotate;E?A?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):A&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=o.height/2+o.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,c=r.height,l=o.width,a=o.height;let u,p;i===null?(p=c===null?"1em":c==="auto"?a:c,u=me(p,l/a)):(u=i==="auto"?l:i,p=c===null?me(u,a/l):c==="auto"?a:c);const f={},h=(g,y)=>{bn(y)||(f[g]=y.toString())};return h("width",u),h("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+a.toString(),{attributes:f,body:s}}const yn=/\sid="(\S+)"/g,vn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xn=0;function tt(e,t=vn){const n=[];let r;for(;r=yn.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(xn++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const O={local:!0,session:!0},nt={local:new Set,session:new Set};let Ce=!1;function wn(e){Ce=e}const Be="iconify2",$="iconify",ot=$+"-count",Me=$+"-version",rt=36e5,Sn=168;function he(e,t){try{return e.getItem(t)}catch{}}function _e(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Re(e,t){try{e.removeItem(t)}catch{}}function ge(e,t){return _e(e,ot,t.toString())}function be(e){return parseInt(he(e,ot))||0}let Q=typeof window>"u"?{}:window;function st(e){const t=e+"Storage";try{if(Q&&Q[t]&&typeof Q[t].length=="number")return Q[t]}catch{}O[e]=!1}function it(e,t){const n=st(e);if(!n)return;const r=he(n,Me);if(r!==Be){if(r){const c=be(n);for(let l=0;l<c;l++)Re(n,$+l.toString())}_e(n,Me,Be),ge(n,0);return}const o=Math.floor(Date.now()/rt)-Sn,s=c=>{const l=$+c.toString(),a=he(n,l);if(typeof a=="string"){try{const u=JSON.parse(a);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}Re(n,l)}};let i=be(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,ge(n,i)):nt[e].add(c))}function ct(){if(!Ce){wn(!0);for(const e in O)it(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=_(r,o);if(!ke(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function at(e,t){switch(e){case"local":case"session":O[e]=t;break;case"all":for(const n in O)O[n]=t;break}}const ye=Object.create(null);function lt(e,t){ye[e]=t}function ve(e){return ye[e]||ye[""]}function Te(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const re=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];for(;N.length>0;)N.length===1||Math.random()>.5?X.push(N.shift()):X.push(N.pop());re[""]=Te({resources:["https://api.iconify.design"].concat(X)});function ut(e,t){const n=Te(t);return n===null?!1:(re[e]=n,!0)}function se(e){return re[e]}function In(){return Object.keys(re)}const kn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let te=kn();function En(e){te=e}function Cn(){return te}function _n(e,t){const n=se(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Tn(e){return e===404}const jn=(e,t,n)=>{const r=[],o=_n(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),r.push(i),r};function Pn(e){if(typeof e=="string"){const t=se(e);if(t)return t.path}return"/"}const An=(e,t,n)=>{if(!te){n("abort",424);return}let r=Pn(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;te(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Tn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},On={prepare:jn,send:An};function Ln(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,l=n[s]||(n[s]=Object.create(null)),a=l[i]||(l[i]=_(s,i));let u;c in a.icons?u=t.loaded:i===""||a.missing.has(c)?u=t.missing:u=t.pending;const p={provider:s,prefix:i,name:c};u.push(p)}),t}function ft(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==o)return!0;const a=l.name;if(e.icons[a])i.loaded.push({provider:r,prefix:o,name:a});else if(e.missing.has(a))i.missing.push({provider:r,prefix:o,name:a});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||ft([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Bn=0;function Mn(e,t,n){const r=Bn++,o=ft.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Rn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?R(o,t,n):o;s&&r.push(s)}),r}var Nn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Fn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let m=e.resources.slice(0);for(i=[];m.length>1;){const k=Math.floor(Math.random()*m.length);i.push(m[k]),m=m.slice(0,k).concat(m.slice(k+1))}i=i.concat(m)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",a=0,u,p=null,f=[],h=[];typeof r=="function"&&h.push(r);function g(){p&&(clearTimeout(p),p=null)}function y(){l==="pending"&&(l="aborted"),g(),f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function E(m,k){k&&(h=[]),typeof m=="function"&&h.push(m)}function A(){return{startTime:c,payload:t,status:l,queriesSent:a,queriesPending:f.length,subscribe:E,abort:y}}function w(){l="failed",h.forEach(m=>{m(void 0,u)})}function S(){f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function D(m,k,C){const B=k!=="success";switch(f=f.filter(T=>T!==m),l){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=C,w();return}if(B){u=C,f.length||(i.length?v():w());return}if(g(),S(),!e.random){const T=e.resources.indexOf(m.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",h.forEach(T=>{T(C)})}function v(){if(l!=="pending")return;g();const m=i.shift();if(m===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(S(),w())},e.timeout);return}w();return}const k={status:"pending",resource:m,callback:(C,B)=>{D(k,C,B)}};f.push(k),a++,p=setTimeout(v,e.rotate),n(m,t,k.callback)}return setTimeout(v),A}function dt(e){const t={...Nn,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,a){const u=Fn(t,c,l,(p,f)=>{r(),a&&a(p,f)});return n.push(u),u}function s(c){return n.find(l=>c(l))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const fe=Object.create(null);function Vn(e){if(!fe[e]){const t=se(e);if(!t)return;const n=dt(t),r={config:t,redundancy:n};fe[e]=r}return fe[e]}function pt(e,t,n){let r,o;if(typeof e=="string"){const s=ve(e);if(!s)return n(void 0,424),Ne;o=s.send;const i=Vn(e);i&&(r=i.redundancy)}else{const s=Te(e);if(s){r=dt(s);const i=e.resources?e.resources[0]:"",c=ve(i);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Ne):r.query(t,o,n)().abort}function zn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in O)it(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function $n(e,t){Ce||ct();function n(r){let o;if(!O[r]||!(o=st(r)))return;const s=nt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=be(o),!ge(o,i+1))return;const c={cached:Math.floor(Date.now()/rt),provider:e.provider,data:t};return _e(o,$+i.toString(),JSON.stringify(c))}t.lastModified&&!zn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fe(){}function Hn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function Un(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ve(n)))return;s.prepare(n,r,o).forEach(c=>{pt(n,c,l=>{if(typeof l!="object")c.icons.forEach(a=>{e.missing.add(a)});else try{const a=ke(e,l);if(!a.length)return;const u=e.pendingIcons;u&&a.forEach(p=>{u.delete(p)}),$n(e,l)}catch(a){console.error(a)}Hn(e)})})}))}const qn=e=>{const n=_(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},je=(e,t)=>{const n=Rn(e,!0,fn()),r=Ln(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Fe)}),()=>{l=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(l=>{const{provider:a,prefix:u}=l;if(u===c&&a===i)return;i=a,c=u,s.push(_(a,u));const p=o[a]||(o[a]=Object.create(null));p[u]||(p[u]=[])}),r.pending.forEach(l=>{const{provider:a,prefix:u,name:p}=l,f=_(a,u),h=f.pendingIcons||(f.pendingIcons=new Set);h.has(p)||(h.add(p),o[a][u].push(p))}),s.forEach(l=>{const{provider:a,prefix:u}=l;o[a][u].length&&Un(l,o[a][u])}),t?Mn(t,r,s):Fe},Gn=e=>new Promise((t,n)=>{const r=typeof e=="string"?R(e,!0):e;if(!r){n(e);return}je([r||e],o=>{if(o.length&&r){const s=U(r);if(s){t({...H,...s});return}}n(e)})});function mt(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Ze?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ie={...et,inline:!1},de="iconify",xe="iconify-inline",P="iconifyData"+Date.now();let L=[];function q(e){for(let t=0;t<L.length;t++){const n=L[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function ht(e,t=!1){let n=q(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},L.push(n),n)}function Qn(){if(document.documentElement)return ht(document.documentElement);L.push({node:()=>document.documentElement})}function Kn(e){L=L.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function G(){return L}function Wn(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let V=null;const Jn={childList:!0,subtree:!0,attributes:!0};function gt(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,V&&V(e)}))}function Xn(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[P]!==void 0){n.paused||gt(e);return}}}function bt(e,t){e.observer.instance.observe(t,Jn)}function ne(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Xn.bind(null,e)),bt(e,n),t.paused||gt(e))}function Ve(){G().forEach(ne)}function yt(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Yn(e){const t=V!==null;if(V!==e&&(V=e,t&&G().forEach(yt)),t){Ve();return}Wn(Ve)}function we(e){(e?[e]:G()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Zn(e){if(e){const t=q(e);t&&we(t)}else we()}function Se(e){(e?[e]:G()).forEach(t=>{if(!t.observer){ne(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?bt(t,r):ne(t);else return}})}function eo(e){if(e){const t=q(e);t&&Se(t)}else Se()}function vt(e,t=!1){const n=ht(e,t);return ne(n),n}function xt(e){const t=q(e);t&&(yt(t),Kn(e))}function to(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in ie)if(n[o]!==r[o])return!0;return!1}function no(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const oo=/[\s,]+/;function ro(e,t){t.split(oo).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const so=["width","height"],io=["inline","hFlip","vFlip"];function co(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function ao(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&R(t,!0);if(!n)return null;const r={...ie,inline:e.classList&&e.classList.contains(xe)};so.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=no(o));const s=e.getAttribute("data-flip");typeof s=="string"&&ro(r,s),io.forEach(c=>{const l="data-"+c,a=co(e.getAttribute(l),l);typeof a=="boolean"&&(r[c]=a)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:i}}const lo="svg."+de+", i."+de+", span."+de+", i."+xe+", span."+xe;function uo(e){const t=[];return e.querySelectorAll(lo).forEach(n=>{const r=n[P]||n.tagName.toLowerCase()!=="svg"?ao(n):null;r&&t.push({node:n,props:r})}),t}function wt(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let z;function fo(){try{z=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{z=null}}function po(e){return z===void 0&&fo(),z?z.createHTML(e):e}function St(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function It(e,t,n,r){const o=e.classList;if(r){const i=r.classList;Array.from(i).forEach(c=>{o.add(c)})}const s=[];return t.forEach(i=>{o.contains(i)?n.has(i)&&s.push(i):(o.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||o.remove(i)}),s}function kt(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function Et(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,s=oe(n,o),i=e[P],c=wt(tt(s.body),{"aria-hidden":"true",role:"img",...s.attributes});r.innerHTML=po(c);const l=r.childNodes[0],a=e.attributes;for(let g=0;g<a.length;g++){const y=a.item(g),E=y.name;E!=="class"&&!l.hasAttribute(E)&&l.setAttribute(E,y.value)}const u=St(t.icon),p=It(l,u,new Set(i&&i.addedClasses),e),f=kt(l,o.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),h={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[P]=h,e.parentNode&&e.parentNode.replaceChild(l,e),l}function mo(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ho(e){return"data:image/svg+xml,"+mo(e)}function go(e){return'url("'+ho(e)+'")'}const bo={display:"inline-block"},Ie={"background-color":"currentColor"},Ct={"background-color":"transparent"},ze={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},$e={"-webkit-mask":Ie,mask:Ie,background:Ct};for(const e in $e){const t=$e[e];for(const n in ze)t[e+"-"+n]=ze[n]}function He(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function yo(e,t,n,r){const o=t.customisations,s=oe(n,o),i=s.attributes,c=e[P],l=wt(s.body,{...i,width:n.width+"",height:n.height+""}),a=St(t.icon),u=It(e,a,new Set(c&&c.addedClasses)),f={"--svg":go(l),width:He(i.width),height:He(i.height),...bo,...r?Ie:Ct};o.inline&&(f["vertical-align"]="-0.125em");const h=kt(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:u,addedStyles:h};return e[P]=g,e}let K=!1;function vo(){K||(K=!0,setTimeout(()=>{K&&(K=!1,M())}))}function M(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:i,prefix:c,name:l}=o,a=_(i,c),u=a.icons[l];if(u)return{status:"loaded",icon:u};if(a.missing.has(l))return{status:"missing"};if(s&&!qn(o)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:G()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(a,u,p){if(c||(c=!0,we(o)),a.tagName.toUpperCase()!=="SVG"){const f=u.mode,h=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof h=="boolean"){yo(a,u,{...H,...p},h);return}}Et(a,u,p)}uo(s).forEach(({node:a,props:u})=>{const p=a[P];if(!p){const{status:h,icon:g}=r(u.icon,!0);if(g){l(a,u,g);return}i=i||h==="loading",a[P]={...u,status:h};return}let f;if(to(p,u)){if(f=r(u.icon,p.name!==u.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...u,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(u.icon,!1),!f.icon){p.status=f.status;return}}l(a,u,f.icon)}),o.temporary&&!i?xt(s):t&&i?vt(s,!0):c&&o.observer&&Se(o)});for(const o in n){const s=n[o];for(const i in s){const c=s[i];je(Array.from(c).map(l=>({provider:o,prefix:i,name:l})),vo)}}}function xo(e){const t=q(e);t?M(t):M({node:e,temporary:!0},!0)}function _t(e,t,n=!1){const r=U(e);if(!r)return null;const o=R(e),s=mt(ie,t||{}),i=Et(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?i.outerHTML:i}function wo(){return"3.1.1"}function So(e,t){return _t(e,t,!1)}function Io(e,t){return _t(e,t,!0)}function ko(e,t){const n=U(e);if(!n)return null;const r=mt(ie,t||{});return oe(n,r)}function Eo(e){e?xo(e):M()}if(typeof document<"u"&&typeof window<"u"){Qn();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Ye(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Yn(M),M()})}function Co(e,t){at(e,t!==!1)}function _o(e){at(e,!0)}lt("",On);if(typeof document<"u"&&typeof window<"u"){ct();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;ut(n,o)||console.error(r)}catch{console.error(r)}}}}const To={getAPIConfig:se,setAPIModule:lt,sendAPIQuery:pt,setFetch:En,getFetch:Cn,listAPIProviders:In},jo={_api:To,addAPIProvider:ut,loadIcons:je,loadIcon:Gn,iconExists:pn,getIcon:mn,listIcons:un,addIcon:dn,addCollection:Ye,replaceIDs:tt,calculateSize:me,buildIcon:oe,getVersion:wo,renderSVG:So,renderHTML:Io,renderIcon:ko,scan:Eo,observe:vt,stopObserving:xt,pauseObserver:Zn,resumeObserver:eo,enableCache:Co,disableCache:_o};try{self.Iconify===void 0&&(self.Iconify=jo)}catch{}const Po=e=>{const t={};let n=null;return j.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=j.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},Ao=(e,t,n)=>{const{hostname:r,href:o}=e;if(!t)return o;if(n){const i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;const c=i[0],a=((t.site?.domainAliases||[]).map(u=>u.value).filter(Boolean).find(u=>u.endsWith(Pe))||"").replace(`.${Pe}`,"");return a?o.replace(r,`${a}-${c}.${At}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Oo(){const{t:e}=Ue(),{api:t}=qe(),{blocklet:n}=Kt(),{inService:r}=Tt(),[o,s]=b.useState(!1),[i,c]=b.useState(5),l=n&&n.structVersion!==Ge,a=()=>{try{if(j.isBlockletRunning(n)){W.error(e("blocklet.migrate.tip.running"));return}const f=Po(n);if(f){W.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){W.error(We(f))}},u=()=>{const f=Ao(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(h=>h-1)},1e3)},p=()=>s(!1);return[l&&d.jsxs(Qe,{severity:"warning",style:{margin:"12px 0"},children:[d.jsxs(Y,{sx:{display:"flex",alignItems:"center"},children:[d.jsx(Ke,{variant:"contained",size:"small",color:"primary",onClick:()=>a(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),d.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>d.jsx(Y,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&d.jsx(jt,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:300*1e3,onSuccess:u,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Pt(n,!0),title:j.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}const Lo=b.lazy(()=>I(()=>import("./overview-CjC2_6TA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url)),Do=b.lazy(()=>I(()=>import("./domains-DgOFqkxv.js"),__vite__mapDeps([18,1,2,19,20,21,6,22,23,24,25,26,27,28,15,29,30,31,5,32,33,34,35,36,10]),import.meta.url)),Bo=b.lazy(()=>I(()=>import("./index-BI2ulEux.js"),__vite__mapDeps([37,1,2,38,39,40,41,42,43,44,8,22,45,46,10,47,12,48,49,50,51,52,53,54,55,56,57,6,26,7,5,58,9,11,13,59,60,61,62,63,64,65,66,67,23,29,68,69,70,71,72,73,20,74,75,76,77,15]),import.meta.url)),Mo=b.lazy(()=>I(()=>import("./appearance-BWTNqmDR.js"),__vite__mapDeps([78,1,2,6,77]),import.meta.url)),Ro=b.lazy(()=>I(()=>import("./config-navigation-DhuiKMvJ.js"),__vite__mapDeps([79,1,2,12,80,48,81,73,6,62,63,64,82,7,8,38,39,40,41,42,43,44,22,60,67,46,76,51,17,54,55,83,31,84,53,36]),import.meta.url)),No=b.lazy(()=>I(()=>import("./index-B9lrrb_O.js"),__vite__mapDeps([85,1,2,69,70,71,72,62,63,64,73,20,74,75,76,40,86,5,46,87,88,89,53,90,45,91,92,93,94,95,57]),import.meta.url)),Fo=b.lazy(()=>I(()=>import("./audit-logs-BAppUNme.js"),__vite__mapDeps([96,20,1,2,74,75,76,39,97,98,99,86,7,6,8]),import.meta.url)),Vo=b.lazy(()=>I(()=>import("./index--_MX4Y7D.js").then(e=>e.i),__vite__mapDeps([100,1,2,69,70,71,72,62,63,64,73,20,74,75,76,40,46,7,6,8,101,77,102,43,44,22,103,80,29,50,104,58,105,106,19]),import.meta.url)),zo=b.lazy(()=>I(()=>import("./index-CJe-L0_W.js").then(e=>e.i),__vite__mapDeps([107,1,2,29,108,69,70,71,72,62,63,64,73,20,74,75,76,40,13,102,43,44,7,6,8,60,103,80,54,55,99,68,5,22,26,94,95,57,46,109,41,110,11,111,112,113,19,66,114,61,77,23,24,86,101,67]),import.meta.url)),$o=b.lazy(()=>I(()=>import("./service-DoInkZVF.js"),__vite__mapDeps([115,1,2,116,70,71,72,91,64,82,63,95,46,29,23,76,117,45,90,75,51]),import.meta.url)),Ho=b.lazy(()=>I(()=>import("./index-CENTGsHb.js"),__vite__mapDeps([118,1,2,20,38,39,40,41,42,43,44,8,22,59,6,117,116,70,71,72,91,64,82,63,95,46,29,23,76,45,90,75,51,47,12,48,49,50,52,53,26,102,119,120,109,54,55,28,121,25,122,123,124,34,125,4,16,17,35,126,3,127,97,98,103,80,128,27,129,114,66,5,83,130,32,33,77,11,110,106,87,24,131,7]),import.meta.url)),Uo=b.lazy(()=>I(()=>import("./log-DfRitFTN.js"),__vite__mapDeps([132,1,2,39,133,43,44,55]),import.meta.url)),qo=b.lazy(()=>I(()=>import("./runtime-3p5sMXNX.js"),__vite__mapDeps([134,1,2,69,70,71,72,62,63,64,73,20,74,75,76,40,6,126,135,92,93,27,105,44]),import.meta.url)),Go=b.lazy(()=>I(()=>import("./traffic-Coyo0eln.js").then(e=>e.t),__vite__mapDeps([89,1,2,53,90,45,91,64,92,93,94,95,57,71]),import.meta.url)),Qo=b.lazy(()=>I(()=>import("./index-DA3gthJ9.js"),__vite__mapDeps([136,1,2,46,6,77,125,4,16,17,41,35,126,3,102,43,44,5,93,69,70,71,72,62,63,64,73,20,74,75,76,40,42,59,104]),import.meta.url)),Ko=({children:e})=>e;function Wo(){const e=Ot(),{tab:t="overview"}=Je(),{did:n,blocklet:r,error:o,client:s,actions:{setBlocklet:i,refreshBlocklet:c}}=Xt(),{refresh:l}=Lt(),{t:a}=Ue(),{session:u}=qe(),{data:p}=Dt(),f=Bt(()=>u.user?.role&&Mt.includes(u.user.role),[u]),h=b.useCallback(()=>d.jsx(Fo,{scope:n,blocklets:p}),[n,p]),g=b.useCallback(()=>f?d.jsx(No,{blocklet:r}):d.jsx(Wt,{status:403}),[r,f]),y=r?.environments.find(x=>x.key==="BLOCKLET_APP_URL")?.value||window.location.origin,E=x=>Nt(x,y),A=x=>{e(`/blocklets/${n}/${x}`)},w=x=>{x&&i(x),c()},S=!r||Ae(r.status)?[]:j.getAppMissingConfigs(r);let D=null;const v=[{label:a("common.overview"),value:"overview"},{breadcrumbsLabel:a("common.components"),label:d.jsx(Rt,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!S.length,children:a("common.components")}),value:"components"}];if(o)D=d.jsxs(d.Fragment,{children:[d.jsx(Qe,{severity:"error",children:We(o)}),d.jsx(Ke,{onClick:()=>c(),children:d.jsx("span",{style:{textDecoration:"underline"},children:a("common.retry")})})]});else if(r){const x={overview:d.jsx(Lo,{}),domains:d.jsx(Do,{}),configuration:Bo,appearance:Mo,navigation:Ro,services:$o,members:d.jsx(zo,{type:"blocklet",createPassportSvg:E}),passports:Vo,components:Ho,"audit-logs":h,notifications:g,logs:Uo,runtime:d.jsx(qo,{}),traffic:d.jsx(Go,{client:s,did:n}),didSpaces:d.jsx(Qo,{})};t==="configuration"&&Ae(r.status)&&A("overview"),v.push({label:a("common.domains"),value:"domains"}),v.push({label:a("common.members"),value:"members"}),v.push({label:a("team.member.passports"),value:"passports"}),v.push({label:a("common.configuration"),value:"configuration"}),v.push({label:a("common.appearance"),value:"appearance"}),v.push({label:a("common.auditLogs"),value:"audit-logs"}),f&&v.push({label:a("common.notificationRecords"),value:"notifications"}),r&&r.children?.length&&r.structVersion===Ge&&v.push({label:a("common.logs"),value:"logs"}),v.push({label:a("common.configNavigation"),value:"navigation"}),v.push({label:a("common.runtime"),value:"runtime"}),v.push({label:a("common.traffic"),value:"traffic"}),v.push({label:a("storage.spaces.title"),value:"didSpaces"}),j.getBlockletServices(r).length&&v.splice(2,0,{label:a("blocklet.services"),value:"services"});const ae=x[t]||x.overview;D=d.jsxs(Gt,{type:"components",children:[!j.isExternalBlocklet(r)&&d.jsx(Ht,{tabs:v,current:t,onChange:A,scrollButtons:"auto"}),d.jsx("div",{className:"page-content",children:d.jsx(b.Suspense,{fallback:d.jsx(Oe,{relative:"parent",children:d.jsx(Le,{})}),children:b.isValidElement(ae)?ae:d.jsx(ae,{blocklet:r,onUpdate:w,createPassportSvg:E})})})]})}else D=d.jsx(Oe,{relative:"parent",children:d.jsx(Le,{})});const m=()=>{},k=({action:x,error:ce})=>{if(ce){W.error(ce.message);return}x==="remove"?(l(),e("/blocklets")):c()},C=v.find(x=>x.value===t),B=r?Yt:Ko,T=Ut(C,r?.meta?.title||a("common.blocklets"));return d.jsxs(B,{teamDid:n,children:[T,d.jsxs(Jo,{children:[d.jsxs(en,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[d.jsx(Ft,{color:"textSecondary",to:"/blocklets",children:a("common.blocklets")}),d.jsx(Vt,{to:`/blocklets/${n}/overview`,style:x=>x?{color:"inherit"}:{},children:a("common.detail")}),d.jsx(le,{color:"textSecondary",children:C?C.breadcrumbsLabel||C.label:""})]}),d.jsxs(le,{component:"div",className:"page-header",children:[d.jsxs(le,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[r?d.jsx(zt,{blocklet:r,style:{marginRight:16}}):null,r?d.jsxs(Y,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1},children:[d.jsx(Y,{children:j.getDisplayName(r)}),r?.status!=="unknown"&&d.jsx(qt,{size:"12px",status:r.status,source:r.source,progress:r.progress})]}):`${a("common.blocklet")} ${a("common.detail")}`]}),d.jsx(Zt,{permission:"mutate_blocklets",children:!!r&&!j.isExternalBlocklet(r)&&d.jsx(Qt,{className:"page-actions",blocklet:r,onStart:m,onComplete:k,variant:"group",source:"blocklet-detail"})})]}),d.jsx(Oo,{}),D]})]})}function pr(){const{did:e}=Je();return e?d.jsx(Jt,{did:e,children:d.jsx(Wo,{})}):null}const Jo=$t.main`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./overview-BPSzB7yi.js","./index-CP8e2zcP.js","./index-BLDnEtdF.css","./HelpOutline-s5mQqTw1.js","./index-BojVbZw0.js","./index-8K8V7S7h.js","./blocklet-D7q_eJsm.js","./team-Bp-ehLS6.js","./url-evaluation-BotqjpOW.js","./status-vwaEURfH.js","./index-1nsTMIEw.js","./ErrorOutline-D3nJBXYA.js","./omit-C1X-CRrb.js","./index-D3qtx7de.js","./metric-DzrjUE5P.js","./CardContent-MdG6Fo_s.js","./spaces-BqdEt5Dg.js","./api-DBq1KtcA.js","./domains-DlW2t7QG.js","./trim-BrqZEf0Q.js","./index-DX_ig3IR.js","./useAsync-CbHsXkPS.js","./permission-D6xGjoP4.js","./Delete-CCasVLgy.js","./actions-Zy-oEKVg.js","./delete-confirm-C8X53PNk.js","./click-to-copy-wk3E32eY.js","./status-CFw68CfZ.js","./VerifiedUser-8QA2XNlm.js","./Add-B-lIYZBc.js","./CallMerge-V8M4tzIM.js","./toLower-C4OoJYWk.js","./use-mobile-BxCxZMSF.js","./util-BF2dKFyL.js","./is-path-prefix-equal-sWdIB_FI.js","./engine-hQAyActy.js","./OpenInNew-2i4mGCRx.js","./LoadingButton-egcGN7yK.js","./index-pMmL--Md.js","./actions-BuX7-i-0.js","./useLocalStorage-CBx2eW_l.js","./MoreVert-Cw1fjU9L.js","./DeleteOutline-CocEa6gq.js","./get-safe-url-n4nPkbEQ.js","./ButtonGroup-CXwzM552.js","./getValidReactChildren-dJeDeNuf.js","./ChevronRight-C_yvQN06.js","./html-title-DwrWBQUt.js","./preference-CWfaETuk.js","./index-PzC6rkTH.js","./Done-DfHgd6VN.js","./edit.svg-CBqxioRV.js","./ArrowDropDown-C1ynmK1V.js","./index-B01of1n7.js","./iframe-B0inMXzK.js","./Autocomplete-BHqH72uG.js","./ListSubheader-rZisNvzB.js","./rotate-session-key-Cn3NVWRi.js","./visuallyHidden-Dan1xhjv.js","./chain-DDmwEbOF.js","./switch-control-BEw34mlq.js","./index.esm-DjcC6_YD.js","./isEmail-CpvKmXxu.js","./index-CyXVLDQI.js","./redux-Ab4buSXY.js","./typeof-QjJsDpFa.js","./provider-icon-D-a204Ay.js","./passkey-rounded-_WDHIZVd.js","./simple-select-DApzKMrW.js","./federated-detail-dialog-C93dA_OW.js","./index-7TgPZijh.js","./FilterList-BiaeVs0C.js","./CSSTransition-hTlKGu0l.js","./emotion-cache.browser.esm-D6kXFXIA.js","./depsEqual-FU6HOfMn.js","./TableSearch-ZIwL7jK3.js","./Search-mc0LftDb.js","./Clear-XkW6YpHE.js","./use-mobile-BIorytbM.js","./appearance-CRQaeOoe.js","./config-navigation-iUuwjLA_.js","./cloneDeep-BEJXcFgb.js","./_createAggregator-BS_ZCLsv.js","./raf-schd.esm-vaS856Rv.js","./ListItemButton-BIo7wBNv.js","./index-CqXuTw4d.js","./index-p8ewFFuc.js","./shorten-label-j-itDv6J.js","./Replay-3PaYn2br.js","./Refresh-BIkqgW7p.js","./traffic-BuuDuC5C.js","./ChevronLeft-BPs9Erbv.js","./index-CVhk080O.js","./base-chart-Cp-etWR-.js","./index-erCgIvu7.js","./AdapterDayjs-CXgBZcQU.js","./useThemeProps-BWD3Vp6O.js","./audit-logs-BGRhRsNS.js","./index-BPu5OFdR.js","./index-ed1TwQco.css","./UnfoldMore-DFA58tLQ.js","./index-_qKxdWY4.js","./ua-parser-D6QF1h5N.js","./index-hxHDV4zb.js","./Google-D9HgkG4U.js","./list-header-DXqt77-Y.js","./ToggleButtonGroup-DeGfqT0G.js","./lock.svg-D22_UbmU.js","./index-De_3fKYA.js","./ViewList-DgyKMmIc.js","./Verified-se8hbTqT.js","./Visibility-BqBwXDHr.js","./index-G4GuFOuO.js","./sdk-CyaYnqk4.js","./actions-DR8B4Taf.js","./login-method-item-CGUaonon.js","./service-COrrqY-3.js","./table-icons-V0nzUvpC.js","./Edit-CGdW8_LW.js","./index-CRRnOuLM.js","./Link-DUSQD8mc.js","./item-NX8BCXwV.js","./Launch-DHnB5pzO.js","./item-D4DUnQj0.css","./index-Cske9PWb.js","./url-join-BYRfgTzL.js","./connect-to-BdinmIba.js","./index-D29L5UKE.js","./agreement-3SHQ4MuR.js","./install-from-url-DfM4lxPD.js","./without-wallet-lUjEmpWw.js","./Stepper-CnqNXODv.js","./toUpper-P-IpqDCE.js","./log-BtG4l72D.js","./download-CHMW-VV9.js","./runtime-BJVsSRvX.js","./memory-MEOErB2y.js","./index-MLCJ7HJV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{V as He,d as qe,aS as Tt,r as b,by as Ge,j as d,at as Qe,B as Y,bz as Ke,A as jt,aU as j,bA as Pt,H as W,bB as We,bC as Pe,bD as At,a as Je,u as Ot,b as Lt,bE as Dt,bF as Bt,bG as Mt,bH as Ae,bI as Rt,bJ as Nt,b3 as Oe,C as Le,bK as Ft,bL as Vt,J as le,bM as zt,G as I,q as $t}from"./index-CP8e2zcP.js";import{T as Ut,u as Ht}from"./html-title-DwrWBQUt.js";import{B as qt}from"./status-CFw68CfZ.js";import{D as Gt,B as Qt}from"./actions-BuX7-i-0.js";import{u as Kt}from"./blocklet-D7q_eJsm.js";import{p as Wt}from"./index-2jRJYLHP.js";import{B as Jt,u as Xt,T as Yt}from"./team-Bp-ehLS6.js";import{P as Zt}from"./permission-D6xGjoP4.js";import{B as en}from"./Breadcrumbs-CpZ2DeBG.js";import"./useLocalStorage-CBx2eW_l.js";import"./MoreVert-Cw1fjU9L.js";import"./DeleteOutline-CocEa6gq.js";import"./get-safe-url-n4nPkbEQ.js";import"./ButtonGroup-CXwzM552.js";import"./getValidReactChildren-dJeDeNuf.js";import"./url-evaluation-BotqjpOW.js";const Xe=Object.freeze({left:0,top:0,width:16,height:16}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),U=Object.freeze({...Xe,...Z}),pe=Object.freeze({...U,body:"",hidden:!1});function tn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function De(e,t){const n=tn(e,t);for(const r in pe)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function nn(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,l=c&&s(c);l&&(o[i]=[c].concat(l))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function on(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(c){s=De(r[c]||o[c],s)}return i(t),n.forEach(i),De(e,s)}function rn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=nn(e);for(const o in r){const s=r[o];s&&(t(o,on(e,o,s)),n.push(o))}return n}const F=/^[a-z0-9]+(-[a-z0-9]+)*$/,R=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!J(a)?null:a}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!J(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!J(c,n)?null:c}return null},J=(e,t)=>e?!!((e.provider===""||e.provider.match(F))&&(t&&e.prefix===""||e.prefix.match(F))&&e.name.match(F)):!1,sn={provider:"",aliases:{},not_found:{},...Xe};function ue(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function cn(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ue(e,sn))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(F)||typeof s.body!="string"||!ue(s,pe))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(F)||typeof i!="string"||!n[i]&&!r[i]||!ue(s,pe))return null}return t}const ee=Object.create(null);function an(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function _(e,t){const n=ee[e]||(ee[e]=Object.create(null));return n[t]||(n[t]=an(e,t))}function ke(e,t){return cn(t)?rn(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ln(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function un(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(ee)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(ee[o]||{})).forEach(i=>{const c=_(o,i);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+i+":"+l))})}),n}let Ee=!1;function fn(e){return Ee}function H(e){const t=typeof e=="string"?R(e,!0,Ee):e;if(t){const n=_(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function dn(e,t){const n=R(e,!0,Ee);if(!n)return!1;const r=_(n.provider,n.prefix);return ln(r,n.name,t)}function Ye(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!J({provider:t,prefix:n,name:"a"}))return!1;const r=_(t,n);return!!ke(r,e)}function pn(e){return!!H(e)}function mn(e){const t=H(e);return t?{...U,...t}:null}const Ze=Object.freeze({width:null,height:null}),et=Object.freeze({...Ze,...Z}),hn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function me(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(hn);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=gn.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const bn=e=>e==="unset"||e==="undefined"||e==="none";function oe(e,t){const n={...U,...e},r={...et,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],E=g.hFlip,A=g.vFlip;let w=g.rotate;E?A?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):A&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=o.height/2+o.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,c=r.height,l=o.width,a=o.height;let u,p;i===null?(p=c===null?"1em":c==="auto"?a:c,u=me(p,l/a)):(u=i==="auto"?l:i,p=c===null?me(u,a/l):c==="auto"?a:c);const f={},h=(g,y)=>{bn(y)||(f[g]=y.toString())};return h("width",u),h("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+a.toString(),{attributes:f,body:s}}const yn=/\sid="(\S+)"/g,vn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xn=0;function tt(e,t=vn){const n=[];let r;for(;r=yn.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(xn++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const O={local:!0,session:!0},nt={local:new Set,session:new Set};let Ce=!1;function wn(e){Ce=e}const Be="iconify2",$="iconify",ot=$+"-count",Me=$+"-version",rt=36e5,Sn=168;function he(e,t){try{return e.getItem(t)}catch{}}function _e(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Re(e,t){try{e.removeItem(t)}catch{}}function ge(e,t){return _e(e,ot,t.toString())}function be(e){return parseInt(he(e,ot))||0}let Q=typeof window>"u"?{}:window;function st(e){const t=e+"Storage";try{if(Q&&Q[t]&&typeof Q[t].length=="number")return Q[t]}catch{}O[e]=!1}function it(e,t){const n=st(e);if(!n)return;const r=he(n,Me);if(r!==Be){if(r){const c=be(n);for(let l=0;l<c;l++)Re(n,$+l.toString())}_e(n,Me,Be),ge(n,0);return}const o=Math.floor(Date.now()/rt)-Sn,s=c=>{const l=$+c.toString(),a=he(n,l);if(typeof a=="string"){try{const u=JSON.parse(a);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}Re(n,l)}};let i=be(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,ge(n,i)):nt[e].add(c))}function ct(){if(!Ce){wn(!0);for(const e in O)it(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=_(r,o);if(!ke(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function at(e,t){switch(e){case"local":case"session":O[e]=t;break;case"all":for(const n in O)O[n]=t;break}}const ye=Object.create(null);function lt(e,t){ye[e]=t}function ve(e){return ye[e]||ye[""]}function Te(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const re=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];for(;N.length>0;)N.length===1||Math.random()>.5?X.push(N.shift()):X.push(N.pop());re[""]=Te({resources:["https://api.iconify.design"].concat(X)});function ut(e,t){const n=Te(t);return n===null?!1:(re[e]=n,!0)}function se(e){return re[e]}function In(){return Object.keys(re)}const kn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let te=kn();function En(e){te=e}function Cn(){return te}function _n(e,t){const n=se(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Tn(e){return e===404}const jn=(e,t,n)=>{const r=[],o=_n(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),r.push(i),r};function Pn(e){if(typeof e=="string"){const t=se(e);if(t)return t.path}return"/"}const An=(e,t,n)=>{if(!te){n("abort",424);return}let r=Pn(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;te(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Tn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},On={prepare:jn,send:An};function Ln(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,l=n[s]||(n[s]=Object.create(null)),a=l[i]||(l[i]=_(s,i));let u;c in a.icons?u=t.loaded:i===""||a.missing.has(c)?u=t.missing:u=t.pending;const p={provider:s,prefix:i,name:c};u.push(p)}),t}function ft(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==o)return!0;const a=l.name;if(e.icons[a])i.loaded.push({provider:r,prefix:o,name:a});else if(e.missing.has(a))i.missing.push({provider:r,prefix:o,name:a});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||ft([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Bn=0;function Mn(e,t,n){const r=Bn++,o=ft.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Rn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?R(o,t,n):o;s&&r.push(s)}),r}var Nn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Fn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let m=e.resources.slice(0);for(i=[];m.length>1;){const k=Math.floor(Math.random()*m.length);i.push(m[k]),m=m.slice(0,k).concat(m.slice(k+1))}i=i.concat(m)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",a=0,u,p=null,f=[],h=[];typeof r=="function"&&h.push(r);function g(){p&&(clearTimeout(p),p=null)}function y(){l==="pending"&&(l="aborted"),g(),f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function E(m,k){k&&(h=[]),typeof m=="function"&&h.push(m)}function A(){return{startTime:c,payload:t,status:l,queriesSent:a,queriesPending:f.length,subscribe:E,abort:y}}function w(){l="failed",h.forEach(m=>{m(void 0,u)})}function S(){f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function D(m,k,C){const B=k!=="success";switch(f=f.filter(T=>T!==m),l){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=C,w();return}if(B){u=C,f.length||(i.length?v():w());return}if(g(),S(),!e.random){const T=e.resources.indexOf(m.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",h.forEach(T=>{T(C)})}function v(){if(l!=="pending")return;g();const m=i.shift();if(m===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(S(),w())},e.timeout);return}w();return}const k={status:"pending",resource:m,callback:(C,B)=>{D(k,C,B)}};f.push(k),a++,p=setTimeout(v,e.rotate),n(m,t,k.callback)}return setTimeout(v),A}function dt(e){const t={...Nn,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,a){const u=Fn(t,c,l,(p,f)=>{r(),a&&a(p,f)});return n.push(u),u}function s(c){return n.find(l=>c(l))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const fe=Object.create(null);function Vn(e){if(!fe[e]){const t=se(e);if(!t)return;const n=dt(t),r={config:t,redundancy:n};fe[e]=r}return fe[e]}function pt(e,t,n){let r,o;if(typeof e=="string"){const s=ve(e);if(!s)return n(void 0,424),Ne;o=s.send;const i=Vn(e);i&&(r=i.redundancy)}else{const s=Te(e);if(s){r=dt(s);const i=e.resources?e.resources[0]:"",c=ve(i);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Ne):r.query(t,o,n)().abort}function zn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in O)it(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function $n(e,t){Ce||ct();function n(r){let o;if(!O[r]||!(o=st(r)))return;const s=nt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=be(o),!ge(o,i+1))return;const c={cached:Math.floor(Date.now()/rt),provider:e.provider,data:t};return _e(o,$+i.toString(),JSON.stringify(c))}t.lastModified&&!zn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fe(){}function Un(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function Hn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ve(n)))return;s.prepare(n,r,o).forEach(c=>{pt(n,c,l=>{if(typeof l!="object")c.icons.forEach(a=>{e.missing.add(a)});else try{const a=ke(e,l);if(!a.length)return;const u=e.pendingIcons;u&&a.forEach(p=>{u.delete(p)}),$n(e,l)}catch(a){console.error(a)}Un(e)})})}))}const qn=e=>{const n=_(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},je=(e,t)=>{const n=Rn(e,!0,fn()),r=Ln(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Fe)}),()=>{l=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(l=>{const{provider:a,prefix:u}=l;if(u===c&&a===i)return;i=a,c=u,s.push(_(a,u));const p=o[a]||(o[a]=Object.create(null));p[u]||(p[u]=[])}),r.pending.forEach(l=>{const{provider:a,prefix:u,name:p}=l,f=_(a,u),h=f.pendingIcons||(f.pendingIcons=new Set);h.has(p)||(h.add(p),o[a][u].push(p))}),s.forEach(l=>{const{provider:a,prefix:u}=l;o[a][u].length&&Hn(l,o[a][u])}),t?Mn(t,r,s):Fe},Gn=e=>new Promise((t,n)=>{const r=typeof e=="string"?R(e,!0):e;if(!r){n(e);return}je([r||e],o=>{if(o.length&&r){const s=H(r);if(s){t({...U,...s});return}}n(e)})});function mt(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Ze?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ie={...et,inline:!1},de="iconify",xe="iconify-inline",P="iconifyData"+Date.now();let L=[];function q(e){for(let t=0;t<L.length;t++){const n=L[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function ht(e,t=!1){let n=q(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},L.push(n),n)}function Qn(){if(document.documentElement)return ht(document.documentElement);L.push({node:()=>document.documentElement})}function Kn(e){L=L.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function G(){return L}function Wn(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let V=null;const Jn={childList:!0,subtree:!0,attributes:!0};function gt(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,V&&V(e)}))}function Xn(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[P]!==void 0){n.paused||gt(e);return}}}function bt(e,t){e.observer.instance.observe(t,Jn)}function ne(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Xn.bind(null,e)),bt(e,n),t.paused||gt(e))}function Ve(){G().forEach(ne)}function yt(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Yn(e){const t=V!==null;if(V!==e&&(V=e,t&&G().forEach(yt)),t){Ve();return}Wn(Ve)}function we(e){(e?[e]:G()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Zn(e){if(e){const t=q(e);t&&we(t)}else we()}function Se(e){(e?[e]:G()).forEach(t=>{if(!t.observer){ne(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?bt(t,r):ne(t);else return}})}function eo(e){if(e){const t=q(e);t&&Se(t)}else Se()}function vt(e,t=!1){const n=ht(e,t);return ne(n),n}function xt(e){const t=q(e);t&&(yt(t),Kn(e))}function to(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in ie)if(n[o]!==r[o])return!0;return!1}function no(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const oo=/[\s,]+/;function ro(e,t){t.split(oo).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const so=["width","height"],io=["inline","hFlip","vFlip"];function co(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function ao(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&R(t,!0);if(!n)return null;const r={...ie,inline:e.classList&&e.classList.contains(xe)};so.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=no(o));const s=e.getAttribute("data-flip");typeof s=="string"&&ro(r,s),io.forEach(c=>{const l="data-"+c,a=co(e.getAttribute(l),l);typeof a=="boolean"&&(r[c]=a)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:i}}const lo="svg."+de+", i."+de+", span."+de+", i."+xe+", span."+xe;function uo(e){const t=[];return e.querySelectorAll(lo).forEach(n=>{const r=n[P]||n.tagName.toLowerCase()!=="svg"?ao(n):null;r&&t.push({node:n,props:r})}),t}function wt(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let z;function fo(){try{z=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{z=null}}function po(e){return z===void 0&&fo(),z?z.createHTML(e):e}function St(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function It(e,t,n,r){const o=e.classList;if(r){const i=r.classList;Array.from(i).forEach(c=>{o.add(c)})}const s=[];return t.forEach(i=>{o.contains(i)?n.has(i)&&s.push(i):(o.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||o.remove(i)}),s}function kt(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function Et(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,s=oe(n,o),i=e[P],c=wt(tt(s.body),{"aria-hidden":"true",role:"img",...s.attributes});r.innerHTML=po(c);const l=r.childNodes[0],a=e.attributes;for(let g=0;g<a.length;g++){const y=a.item(g),E=y.name;E!=="class"&&!l.hasAttribute(E)&&l.setAttribute(E,y.value)}const u=St(t.icon),p=It(l,u,new Set(i&&i.addedClasses),e),f=kt(l,o.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),h={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[P]=h,e.parentNode&&e.parentNode.replaceChild(l,e),l}function mo(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ho(e){return"data:image/svg+xml,"+mo(e)}function go(e){return'url("'+ho(e)+'")'}const bo={display:"inline-block"},Ie={"background-color":"currentColor"},Ct={"background-color":"transparent"},ze={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},$e={"-webkit-mask":Ie,mask:Ie,background:Ct};for(const e in $e){const t=$e[e];for(const n in ze)t[e+"-"+n]=ze[n]}function Ue(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function yo(e,t,n,r){const o=t.customisations,s=oe(n,o),i=s.attributes,c=e[P],l=wt(s.body,{...i,width:n.width+"",height:n.height+""}),a=St(t.icon),u=It(e,a,new Set(c&&c.addedClasses)),f={"--svg":go(l),width:Ue(i.width),height:Ue(i.height),...bo,...r?Ie:Ct};o.inline&&(f["vertical-align"]="-0.125em");const h=kt(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:u,addedStyles:h};return e[P]=g,e}let K=!1;function vo(){K||(K=!0,setTimeout(()=>{K&&(K=!1,M())}))}function M(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:i,prefix:c,name:l}=o,a=_(i,c),u=a.icons[l];if(u)return{status:"loaded",icon:u};if(a.missing.has(l))return{status:"missing"};if(s&&!qn(o)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:G()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(a,u,p){if(c||(c=!0,we(o)),a.tagName.toUpperCase()!=="SVG"){const f=u.mode,h=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof h=="boolean"){yo(a,u,{...U,...p},h);return}}Et(a,u,p)}uo(s).forEach(({node:a,props:u})=>{const p=a[P];if(!p){const{status:h,icon:g}=r(u.icon,!0);if(g){l(a,u,g);return}i=i||h==="loading",a[P]={...u,status:h};return}let f;if(to(p,u)){if(f=r(u.icon,p.name!==u.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...u,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(u.icon,!1),!f.icon){p.status=f.status;return}}l(a,u,f.icon)}),o.temporary&&!i?xt(s):t&&i?vt(s,!0):c&&o.observer&&Se(o)});for(const o in n){const s=n[o];for(const i in s){const c=s[i];je(Array.from(c).map(l=>({provider:o,prefix:i,name:l})),vo)}}}function xo(e){const t=q(e);t?M(t):M({node:e,temporary:!0},!0)}function _t(e,t,n=!1){const r=H(e);if(!r)return null;const o=R(e),s=mt(ie,t||{}),i=Et(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?i.outerHTML:i}function wo(){return"3.1.1"}function So(e,t){return _t(e,t,!1)}function Io(e,t){return _t(e,t,!0)}function ko(e,t){const n=H(e);if(!n)return null;const r=mt(ie,t||{});return oe(n,r)}function Eo(e){e?xo(e):M()}if(typeof document<"u"&&typeof window<"u"){Qn();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Ye(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Yn(M),M()})}function Co(e,t){at(e,t!==!1)}function _o(e){at(e,!0)}lt("",On);if(typeof document<"u"&&typeof window<"u"){ct();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;ut(n,o)||console.error(r)}catch{console.error(r)}}}}const To={getAPIConfig:se,setAPIModule:lt,sendAPIQuery:pt,setFetch:En,getFetch:Cn,listAPIProviders:In},jo={_api:To,addAPIProvider:ut,loadIcons:je,loadIcon:Gn,iconExists:pn,getIcon:mn,listIcons:un,addIcon:dn,addCollection:Ye,replaceIDs:tt,calculateSize:me,buildIcon:oe,getVersion:wo,renderSVG:So,renderHTML:Io,renderIcon:ko,scan:Eo,observe:vt,stopObserving:xt,pauseObserver:Zn,resumeObserver:eo,enableCache:Co,disableCache:_o};try{self.Iconify===void 0&&(self.Iconify=jo)}catch{}const Po=e=>{const t={};let n=null;return j.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=j.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},Ao=(e,t,n)=>{const{hostname:r,href:o}=e;if(!t)return o;if(n){const i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;const c=i[0],a=((t.site?.domainAliases||[]).map(u=>u.value).filter(Boolean).find(u=>u.endsWith(Pe))||"").replace(`.${Pe}`,"");return a?o.replace(r,`${a}-${c}.${At}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Oo(){const{t:e}=He(),{api:t}=qe(),{blocklet:n}=Kt(),{inService:r}=Tt(),[o,s]=b.useState(!1),[i,c]=b.useState(5),l=n&&n.structVersion!==Ge,a=()=>{try{if(j.isBlockletRunning(n)){W.error(e("blocklet.migrate.tip.running"));return}const f=Po(n);if(f){W.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){W.error(We(f))}},u=()=>{const f=Ao(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(h=>h-1)},1e3)},p=()=>s(!1);return[l&&d.jsxs(Qe,{severity:"warning",style:{margin:"12px 0"},children:[d.jsxs(Y,{sx:{display:"flex",alignItems:"center"},children:[d.jsx(Ke,{variant:"contained",size:"small",color:"primary",onClick:()=>a(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),d.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>d.jsx(Y,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&d.jsx(jt,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:300*1e3,onSuccess:u,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Pt(n,!0),title:j.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}const Lo=b.lazy(()=>I(()=>import("./overview-BPSzB7yi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url)),Do=b.lazy(()=>I(()=>import("./domains-DlW2t7QG.js"),__vite__mapDeps([18,1,2,19,20,21,6,22,23,24,25,26,27,28,15,29,30,31,32,5,33,34,35,36,37,10]),import.meta.url)),Bo=b.lazy(()=>I(()=>import("./index-pMmL--Md.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,8,22,46,47,10,48,12,49,50,51,52,53,54,55,56,57,58,6,26,7,5,59,9,11,13,60,61,62,63,64,65,66,67,68,23,29,69,70,71,72,73,74,20,75,76,77,78,15]),import.meta.url)),Mo=b.lazy(()=>I(()=>import("./appearance-CRQaeOoe.js"),__vite__mapDeps([79,1,2,6,78]),import.meta.url)),Ro=b.lazy(()=>I(()=>import("./config-navigation-iUuwjLA_.js"),__vite__mapDeps([80,1,2,12,81,49,82,74,6,63,64,65,83,7,8,39,40,41,42,43,44,45,22,61,68,47,77,52,17,55,56,84,32,85,54,37]),import.meta.url)),No=b.lazy(()=>I(()=>import("./index-p8ewFFuc.js"),__vite__mapDeps([86,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,87,5,47,88,89,90,54,91,46,92,93,94,95,96,58]),import.meta.url)),Fo=b.lazy(()=>I(()=>import("./audit-logs-BGRhRsNS.js"),__vite__mapDeps([97,20,1,2,75,76,77,40,98,99,100,87,7,6,8]),import.meta.url)),Vo=b.lazy(()=>I(()=>import("./index-_qKxdWY4.js").then(e=>e.i),__vite__mapDeps([101,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,47,7,6,8,102,78,103,44,45,22,104,81,29,51,105,59,106,107,19]),import.meta.url)),zo=b.lazy(()=>I(()=>import("./index-De_3fKYA.js").then(e=>e.i),__vite__mapDeps([108,1,2,29,109,70,71,72,73,63,64,65,74,20,75,76,77,41,13,103,44,45,7,6,8,61,104,81,55,56,100,69,5,22,26,95,96,58,47,110,42,111,11,112,113,114,19,67,115,62,78,23,24,87,102,68]),import.meta.url)),$o=b.lazy(()=>I(()=>import("./service-COrrqY-3.js"),__vite__mapDeps([116,1,2,117,71,72,73,92,65,83,64,96,47,29,23,77,118,46,91,76,52]),import.meta.url)),Uo=b.lazy(()=>I(()=>import("./index-CRRnOuLM.js"),__vite__mapDeps([119,1,2,20,39,40,41,42,43,44,45,8,22,60,6,118,117,71,72,73,92,65,83,64,96,47,29,23,77,46,91,76,52,48,12,49,50,51,53,54,26,103,120,121,110,55,56,28,122,25,123,124,125,35,126,4,16,17,36,127,3,128,98,99,104,81,129,27,130,115,67,5,84,131,33,34,78,11,111,107,88,24,132,7]),import.meta.url)),Ho=b.lazy(()=>I(()=>import("./log-BtG4l72D.js"),__vite__mapDeps([133,1,2,40,134,44,45,56]),import.meta.url)),qo=b.lazy(()=>I(()=>import("./runtime-BJVsSRvX.js"),__vite__mapDeps([135,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,6,127,136,93,94,27,106,45]),import.meta.url)),Go=b.lazy(()=>I(()=>import("./traffic-BuuDuC5C.js").then(e=>e.t),__vite__mapDeps([90,1,2,54,91,46,92,65,93,94,95,96,58,72]),import.meta.url)),Qo=b.lazy(()=>I(()=>import("./index-MLCJ7HJV.js"),__vite__mapDeps([137,1,2,47,6,78,126,4,16,17,42,36,127,3,103,44,45,5,94,70,71,72,73,63,64,65,74,20,75,76,77,41,43,60,105]),import.meta.url)),Ko=({children:e})=>e;function Wo(){const e=Ot(),{tab:t="overview"}=Je(),{did:n,blocklet:r,error:o,client:s,actions:{setBlocklet:i,refreshBlocklet:c}}=Xt(),{refresh:l}=Lt(),{t:a}=He(),{session:u}=qe(),{data:p}=Dt(),f=Bt(()=>u.user?.role&&Mt.includes(u.user.role),[u]),h=b.useCallback(()=>d.jsx(Fo,{scope:n,blocklets:p}),[n,p]),g=b.useCallback(()=>f?d.jsx(No,{blocklet:r}):d.jsx(Wt,{status:403}),[r,f]),y=r?.environments.find(x=>x.key==="BLOCKLET_APP_URL")?.value||window.location.origin,E=x=>Nt(x,y),A=x=>{e(`/blocklets/${n}/${x}`)},w=x=>{x&&i(x),c()},S=!r||Ae(r.status)?[]:j.getAppMissingConfigs(r);let D=null;const v=[{label:a("common.overview"),value:"overview"},{breadcrumbsLabel:a("common.components"),label:d.jsx(Rt,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!S.length,children:a("common.components")}),value:"components"}];if(o)D=d.jsxs(d.Fragment,{children:[d.jsx(Qe,{severity:"error",children:We(o)}),d.jsx(Ke,{onClick:()=>c(),children:d.jsx("span",{style:{textDecoration:"underline"},children:a("common.retry")})})]});else if(r){const x={overview:d.jsx(Lo,{}),domains:d.jsx(Do,{}),configuration:Bo,appearance:Mo,navigation:Ro,services:$o,members:d.jsx(zo,{type:"blocklet",createPassportSvg:E}),passports:Vo,components:Uo,"audit-logs":h,notifications:g,logs:Ho,runtime:d.jsx(qo,{}),traffic:d.jsx(Go,{client:s,did:n}),didSpaces:d.jsx(Qo,{})};t==="configuration"&&Ae(r.status)&&A("overview"),v.push({label:a("common.domains"),value:"domains"}),v.push({label:a("common.members"),value:"members"}),v.push({label:a("team.member.passports"),value:"passports"}),v.push({label:a("common.configuration"),value:"configuration"}),v.push({label:a("common.appearance"),value:"appearance"}),v.push({label:a("common.auditLogs"),value:"audit-logs"}),f&&v.push({label:a("common.notificationRecords"),value:"notifications"}),r&&r.children?.length&&r.structVersion===Ge&&v.push({label:a("common.logs"),value:"logs"}),v.push({label:a("common.configNavigation"),value:"navigation"}),v.push({label:a("common.runtime"),value:"runtime"}),v.push({label:a("common.traffic"),value:"traffic"}),v.push({label:a("storage.spaces.title"),value:"didSpaces"}),j.getBlockletServices(r).length&&v.splice(2,0,{label:a("blocklet.services"),value:"services"});const ae=x[t]||x.overview;D=d.jsxs(Gt,{type:"components",children:[!j.isExternalBlocklet(r)&&d.jsx(Ut,{tabs:v,current:t,onChange:A,scrollButtons:"auto"}),d.jsx("div",{className:"page-content",children:d.jsx(b.Suspense,{fallback:d.jsx(Oe,{relative:"parent",children:d.jsx(Le,{})}),children:b.isValidElement(ae)?ae:d.jsx(ae,{blocklet:r,onUpdate:w,createPassportSvg:E})})})]})}else D=d.jsx(Oe,{relative:"parent",children:d.jsx(Le,{})});const m=()=>{},k=({action:x,error:ce})=>{if(ce){W.error(ce.message);return}x==="remove"?(l(),e("/blocklets")):c()},C=v.find(x=>x.value===t),B=r?Yt:Ko,T=Ht(C,r?.meta?.title||a("common.blocklets"));return d.jsxs(B,{teamDid:n,children:[T,d.jsxs(Jo,{children:[d.jsxs(en,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[d.jsx(Ft,{color:"textSecondary",to:"/blocklets",children:a("common.blocklets")}),d.jsx(Vt,{to:`/blocklets/${n}/overview`,style:x=>x?{color:"inherit"}:{},children:a("common.detail")}),d.jsx(le,{color:"textSecondary",children:C?C.breadcrumbsLabel||C.label:""})]}),d.jsxs(le,{component:"div",className:"page-header",children:[d.jsxs(le,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[r?d.jsx(zt,{blocklet:r,style:{marginRight:16}}):null,r?d.jsxs(Y,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1},children:[d.jsx(Y,{children:j.getDisplayName(r)}),r?.status!=="unknown"&&d.jsx(qt,{size:"12px",status:r.status,source:r.source,progress:r.progress})]}):`${a("common.blocklet")} ${a("common.detail")}`]}),d.jsx(Zt,{permission:"mutate_blocklets",children:!!r&&!j.isExternalBlocklet(r)&&d.jsx(Qt,{className:"page-actions",blocklet:r,onStart:m,onComplete:k,variant:"group",source:"blocklet-detail"})})]}),d.jsx(Oo,{}),D]})]})}function pr(){const{did:e}=Je();return e?d.jsx(Jt,{did:e,children:d.jsx(Wo,{})}):null}const Jo=$t.main`
|
|
3
3
|
.page-header {
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: space-between;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{aZ as V,aY as G,r as D,$ as Q,j as e,gc as Ut,a3 as X,a4 as Z,a5 as K,a9 as Je,gd as ke,c as et,f_ as tt,x as le,ge as Ft,ao as Nt,aM as nt,T as zt,V as S,i as $t,k as se,gf as Ht,cu as _t,B as x,C as z,b8 as Ot,J as T,at as ue,ct as me,ab as Y,al as pe,ad as E,fe as ot,gg as Wt,gh as st,bt as Vt,aS as L,c7 as Gt,am as Fe,as as fe,H as q,o,bz as xe,f8 as Qt,M as it,az as Xt,aA as Zt,R as Kt,w as Yt,fd as Ne,gi as Jt,bG as en,ep as rt,gj as at,dX as we,aI as _,bc as lt,gk as tn,bb as nn,d4 as ct,q as on,gl as dt,gm as sn,gn as rn,ai as ut,bj as an,go as ln,Q as cn,gp as H,bB as $,aU as ce,gq as dn,v as un,af as ie,b3 as ze,au as mn,bq as pn,d2 as fn,gr as xn}from"./index-CP8e2zcP.js";import{t as Ae,a as hn}from"./trim-BrqZEf0Q.js";import{y as gn}from"./index-DX_ig3IR.js";import{u as Dn}from"./useAsync-CbHsXkPS.js";import{u as J}from"./blocklet-D7q_eJsm.js";import{w as mt}from"./permission-D6xGjoP4.js";import{D as pt}from"./Delete-CCasVLgy.js";import{A as yn}from"./actions-Zy-oEKVg.js";import{D as bn}from"./delete-confirm-C8X53PNk.js";import{D as $e}from"./status-CFw68CfZ.js";import{S as jn,V as vn}from"./VerifiedUser-8QA2XNlm.js";import{C as Cn}from"./CardContent-MdG6Fo_s.js";import{A as wn}from"./Add-B-lIYZBc.js";import{A as Rn}from"./CallMerge-V8M4tzIM.js";import{a as Sn}from"./toLower-C4OoJYWk.js";import{u as Tn}from"./use-mobile-BxCxZMSF.js";import{v as kn}from"./index-8K8V7S7h.js";import{g as An,p as be}from"./util-BF2dKFyL.js";import{O as In}from"./OpenInNew-2i4mGCRx.js";import{C as Pn}from"./click-to-copy-wk3E32eY.js";import{L as ft}from"./LoadingButton-egcGN7yK.js";import{u as Mn}from"./index-1nsTMIEw.js";import"./is-path-prefix-equal-sWdIB_FI.js";import"./engine-hQAyActy.js";function qn(t){return V("MuiTable",t)}G("MuiTable",["root","stickyHeader"]);const En=t=>{const{classes:n,stickyHeader:s}=t;return K({root:["root",s&&"stickyHeader"]},qn,n)},Ln=X("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.stickyHeader&&n.stickyHeader]}})(Je(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:n})=>n.stickyHeader,style:{borderCollapse:"separate"}}]}))),He="table",Bn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTable"}),{className:i,component:r=He,padding:d="normal",size:l="medium",stickyHeader:c=!1,...m}=a,p={...a,component:r,padding:d,size:l,stickyHeader:c},u=En(p),g=D.useMemo(()=>({padding:d,size:l,stickyHeader:c}),[d,l,c]);return e.jsx(Ut.Provider,{value:g,children:e.jsx(Ln,{as:r,role:r===He?null:"table",ref:s,className:Z(u.root,i),ownerState:p,...m})})});function Un(t){return V("MuiTableBody",t)}G("MuiTableBody",["root"]);const Fn=t=>{const{classes:n}=t;return K({root:["root"]},Un,n)},Nn=X("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),zn={variant:"body"},_e="tbody",$n=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableBody"}),{className:i,component:r=_e,...d}=a,l={...a,component:r},c=Fn(l);return e.jsx(ke.Provider,{value:zn,children:e.jsx(Nn,{className:Z(c.root,i),as:r,ref:s,role:r===_e?null:"rowgroup",ownerState:l,...d})})});function Hn(t){return V("MuiTableContainer",t)}G("MuiTableContainer",["root"]);const _n=t=>{const{classes:n}=t;return K({root:["root"]},Hn,n)},On=X("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),Wn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableContainer"}),{className:i,component:r="div",...d}=a,l={...a,component:r},c=_n(l);return e.jsx(On,{ref:s,as:r,className:Z(c.root,i),ownerState:l,...d})});function Vn(t){return V("MuiTableHead",t)}G("MuiTableHead",["root"]);const Gn=t=>{const{classes:n}=t;return K({root:["root"]},Vn,n)},Qn=X("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),Xn={variant:"head"},Oe="thead",Zn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableHead"}),{className:i,component:r=Oe,...d}=a,l={...a,component:r},c=Gn(l);return e.jsx(ke.Provider,{value:Xn,children:e.jsx(Qn,{as:r,className:Z(c.root,i),ref:s,role:r===Oe?null:"rowgroup",ownerState:l,...d})})});function Kn(t){return V("MuiTableRow",t)}const We=G("MuiTableRow",["root","selected","hover","head","footer"]),Yn=t=>{const{classes:n,selected:s,hover:a,head:i,footer:r}=t;return K({root:["root",s&&"selected",a&&"hover",i&&"head",r&&"footer"]},Kn,n)},Jn=X("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.head&&n.head,s.footer&&n.footer]}})(Je(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${We.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${We.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),Ve="tr",Ge=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableRow"}),{className:i,component:r=Ve,hover:d=!1,selected:l=!1,...c}=a,m=D.useContext(ke),p={...a,component:r,hover:d,selected:l,head:m&&m.variant==="head",footer:m&&m.variant==="footer"},u=Yn(p);return e.jsx(Jn,{as:r,ref:s,className:Z(u.root,i),role:r===Ve?null:"row",ownerState:p,...c})}),eo=et(e.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),to=et(e.jsx("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-1 6h2v2h-2zm0 4h2v6h-2z"})),no=tt({});no.interceptors.request.use(t=>{const n=window.blocklet?window.blocklet.prefix:"/";return t.baseURL=n||"",t.url=le("/api",String(t.url)),t.timeout=2e5,t.params=t.params||{},new URLSearchParams(t.url.split("?")[1]).has("locale")||(t.params.locale=Ft()),t},t=>Promise.reject(t));const xt=(...t)=>tt(...t),oo=(t,n)=>n?t?[t,...Array.isArray(n)?n:[n]]:n:t,so=(t,{width:n=600,height:s=700,name:a="did-domain:popup"}={})=>{const i=window.screenX+(window.innerWidth-n)/2,r=window.screenY+(window.innerHeight-s)/2,d=[`left=${i}`,`top=${r}`,`width=${n}`,`height=${s}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],l=window.open("",a,d.join(","));if(l===null)throw new Error("Failed to open popup");return l.location.href=Nt(t,{opener:window.location.origin}),l},io="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",ht=async t=>{if(!t||!t?.trim())return null;const n=xt(),s=new URL(t);s.pathname="__blocklet__.js",s.searchParams.set("type","json");const{data:a}=await n.get(s.toString()),i=a?.componentMountPoints?.find(c=>c.did===io),r=new URL(t);r.pathname=i?.mountPoint;const d=r.toString(),l=le(d,"/api");return{base:d,api:l}},ro=nt({embed:{iconTip:"Click to view subscription details"},buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),ao=nt({embed:{iconTip:"点击查看订阅详情"},buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),lo={zh:ao,en:ro},co=async({didDomainURL:t,delegatee:n,delegateePk:s})=>{const a=await ht(t);if(!a)return null;const i=xt({baseURL:a.api}),{data:r}=await i.post("/payment/session",{delegatee:n,delegateePk:s});return{sessionId:r.sessionId,baseURL:a.base}};function uo({delegatee:t,delegateePk:n,didDomainURL:s,locale:a,title:i="",onSuccess:r=()=>{},...d}){const{t:l}=S(),[c,m]=Mn({currentState:1}),p=D.useRef(null),u=$t(async()=>{const f=await co({didDomainURL:s,delegatee:t,delegateePk:n});return f},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(f){console.error(f)}}),g=se(f=>{f.data.type==="didDomain.success"&&(r?.({nftDid:f.data?.nftDid,domain:f.data?.domain,chainHost:f.data?.chainHost}),p.current?.close(),p.current=null,m({currentState:4}),setTimeout(()=>{m({currentState:8})},2e3))});Ht(()=>{try{window.removeEventListener("message",g),p.current?.close(),p.current=null}catch(f){console.warn("Failed to close popup",f)}});const b=se(()=>{m({currentState:1})}),h=se(()=>{if(m({currentState:2}),!u.data){console.error("Failed to create session");return}v({sessionId:u.data.sessionId,baseURL:u.data.baseURL})}),v=se(({sessionId:f,baseURL:y})=>{window.addEventListener("message",g);const w=new URL(y);w.searchParams.set("sessionId",f),w.searchParams.set("locale",a),w.searchParams.set("embed","1"),p.current=so(w.toString());const P=setInterval(()=>{p.current?.closed&&(clearInterval(P),b())},1e3);return()=>clearInterval(P)});return e.jsxs(e.Fragment,{children:[e.jsx(ft,{loading:u.loading,onClick:h,variant:"contained",startIcon:e.jsx(jn,{}),...d,children:i||l("buy.button.title")}),e.jsxs(_t,{fullWidth:!0,maxWidth:"xs",open:c.currentState>1&&c.currentState<8,onClose:b,children:[!u.error&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[c.currentState===2&&e.jsx(z,{size:50}),c.currentState===4&&e.jsx(Ot,{sx:{color:"primary.main",fontSize:"5rem"}}),c.currentState===2&&e.jsx(T,{children:l("buy.status.inProgress")}),c.currentState===4&&e.jsx(T,{children:l("buy.status.success")})]}),u.error&&e.jsx(ue,{severity:"error",children:l("buy.error.failedToCreateSession")})]})]})}function mo(t){return e.jsx(zt,{locale:t.locale,translations:lo,children:e.jsx(uo,{...t})})}function po({nftDid:t,didDomainURL:n,locale:s,sx:a={}}){const{t:i}=S(),[r,d]=me({safeIframeRef:null,popoverAnchorEl:null}),l=D.useRef(null),c=Y(),m=pe(c.breakpoints.down("md")),p=h=>{d({popoverAnchorEl:h.currentTarget})},u=()=>{d({popoverAnchorEl:null})},g=Dn(async()=>{const h=await ht(n);return h?h.base:null});if(!g.value)return null;if(g.loading)return e.jsx(z,{});const b=le(g.value,`/embed/domain?nft-did=${t}&locale=${s}`);return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:i("embed.iconTip"),children:e.jsx(x,{component:"img",src:le(n,"/.well-known/service/blocklet/logo"),alt:"logo",onClick:p,sx:[{width:16,height:16},oo({cursor:"pointer"},a)]})}),e.jsx(ot,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:l,title:i("common.subscription"),width:m?"320px":"400px",height:"350px",style:{border:0,display:"block"},src:b})})]})}const fo=t=>["waiting","creating","renewaling"].includes(t);function gt({siteId:t,domain:n,onAdd:s=()=>{},children:a=null,did:i,issuing:r=!1,setIssuing:d=()=>{}}){const{t:l}=S(),[c,m]=D.useState(!1),{inService:p}=L(),[u,g]=D.useState(null),{api:b,ws:{useSubscription:h}}=L(),{mode:v,actions:{refreshDomainStatus:f}}=J(),y=Gt(async()=>{const{cert:A}=await b.findCertificateByDomain({input:{domain:n,did:i}});return A}),w=(A,R)=>{A.domain===n&&(d(!1),m(!1),p&&v!=="setup"&&(R==="success"?q.success(l("setup.domain.genCertSuccess",{domain:A.domain})):R==="error"&&q.error(l("setup.domain.genCertFailed",{domain:A.domain,message:A.message}))))};if(D.useEffect(()=>{y.loading||d(fo(y.value?.status))},[y.loading,y.value?.status,d]),h(Fe.BlockletEvents.certError,A=>w(A,"error")),h(Fe.BlockletEvents.certIssued,A=>{y.retry(),f(A.domain),w(A,"success")}),y.loading||y.value?.status==="normal")return"";const P=()=>{m(!1),g(null)},F=async()=>{m(!0);try{await b.issueLetsEncryptCert({input:{siteId:t,domain:n,did:i,inBlockletSetup:v==="setup"}}),s(),d(!0)}catch(A){console.error(A),d(!1)}finally{m(!1),g(null)}},U={title:l("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(ue,{severity:"success",children:l("router.cert.genLetsEncryptCert.dnsTip")}),l("router.cert.genLetsEncryptCert.description")]}),confirm:l("common.confirm"),onConfirm:F,onCancel:P},N=A=>{A.stopPropagation(),g(U)};return e.jsxs(e.Fragment,{children:[r?e.jsx(E,{title:l("router.cert.issuing"),children:e.jsx(z,{size:13,style:{fontSize:"13px"}})}):a({loading:c,open:N}),u&&e.jsx(fe,{color:"primary",title:u.title,description:u.description,confirm:u.confirm,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}gt.propTypes={domain:o.string.isRequired,did:o.string.isRequired,siteId:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function Dt({domain:t,domainStatus:n,did:s,onAdd:a=()=>{},children:i=null,issuing:r=!1,setIssuing:d=()=>{},...l}){return Wt(t)||!st(t)||Vt(n)||n?.isHttps?"":e.jsx(gt,{...l,domain:t,did:s,onAdd:a,issuing:r,setIssuing:d,children:i})}Dt.propTypes={domain:o.string.isRequired,domainStatus:o.shape({isHttps:o.bool}).isRequired,did:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function yt({id:t,domain:n,children:s=null,teamDid:a="",onDelete:i=null}){const{t:r}=S(),[d,l]=D.useState(!1),[c,m]=D.useState(null),{api:p}=L(),u=()=>{l(!1),m(null)},g=async()=>{l(!0);try{await p.deleteDomainAlias({input:{id:t,domainAlias:n,teamDid:a}}),i?.(),await Qt(2e3)}catch(v){q.error(v.message)}finally{m(null),l(!1)}},b={keyName:n,title:r("router.domainAlias.delete.title"),description:r("router.domainAlias.delete.description",{domain:n}),confirmPlaceholder:r("router.domainAlias.delete.confirmPlaceholder",{domain:n}),confirm:r("common.delete"),onConfirm:g,onCancel:u},h=v=>{v.stopPropagation(),m(b)};return e.jsxs(e.Fragment,{children:[typeof s=="function"?s({loading:d,open:h}):e.jsxs(xe,{edge:"end",onClick:h,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[d?e.jsx(z,{size:16}):e.jsx(pt,{style:{fontSize:16}}),r("common.delete")]}),c&&e.jsx(bn,{keyName:c.keyName,title:c.title,description:c.description,confirmPlaceholder:c.confirmPlaceholder,confirm:c.confirm,params:c.params,onConfirm:c.onConfirm,onCancel:c.onCancel})]})}yt.propTypes={id:o.string.isRequired,domain:o.string.isRequired,children:o.any,teamDid:o.string,onDelete:o.func};function bt({site:t,domain:n,blocklet:s,onDelete:a=()=>{}}){const{t:i}=S(),r=n.value===window.location.hostname;return e.jsx(yn,{"data-cy":"domain-actions",size:"large",actions:[({close:d})=>e.jsx(yt,{id:t.id,domain:n.value,teamDid:s?.meta?.did,onDelete:a,children:({open:l})=>e.jsx(E,{title:r?i("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(it,{disabled:n.isProtected||r,dense:!0,onClick:c=>{d(),l(c)},"data-cy":"action-toggle-block",children:[e.jsx(Xt,{style:{minWidth:24,marginRight:8},children:e.jsx(pt,{})}),e.jsx(Zt,{primary:i("common.delete")})]},"remove")})})})]})}bt.propTypes={site:o.object.isRequired,domain:o.object.isRequired,blocklet:o.object.isRequired,onDelete:o.func};const he=o.shape({href:o.string,accessibility:o.shape({loading:o.bool,accessible:o.bool}),domainStatus:o.shape({isHttps:o.bool,matchedCert:o.object}),dns:o.shape({resolved:o.bool,ip:o.string})});function jt({certificate:t={}}){const[n,s]=D.useState(null),a=L(),{t:i,locale:r}=S(),d=m=>{s(m.currentTarget)},l=()=>{s(null)},c=!!n;return e.jsxs(e.Fragment,{children:[e.jsx(vn,{"aria-owns":c?"mouse-over-popover":void 0,onMouseEnter:d,onMouseLeave:l,style:{color:"#44cdc6",fontSize:"1em",cursor:"pointer"}}),e.jsx(ot,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:c,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:e.jsx(Kt,{children:e.jsxs(Cn,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${a.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(T,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(T,{component:"div",style:{fontWeight:"bold"},children:t.domain}),e.jsx(T,{component:"div",children:`${i("common.issuer")}: ${Yt(t,"issuer.commonName","")}`}),e.jsx(T,{component:"div",children:`${i("router.cert.issuedOn")}: ${Ne(t.validFrom,r)}`}),e.jsx(T,{component:"div",children:`${i("router.cert.expiryOn")}: ${Ne(t.validTo,r)}`})]})]})})})]})}jt.propTypes={certificate:o.object};function de({domain:t,filters:n=["domain","http"]}){const{t:s}=S(),{value:a,domainStatus:i}=t;if(!st(a))return null;let r=null,d=null;const{isHttps:l,matchedCert:c}=i,{dns:{ip:m,isDnsResolved:p,isCnameMatch:u}={}}=i,g=t.type==="nft-domain-forwarding",b=p&&(g||u);Jt(a)||(b||m==="127.0.0.1"?r=e.jsx(E,{title:s("router.domain.verify.ok"),children:e.jsx($e,{color:"success"})}):r=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx($e,{color:"error"})})),b?l?d=e.jsx(jt,{certificate:c}):d=e.jsx(E,{title:s("router.domain.https.bad"),children:e.jsx(to,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})}):d=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx(eo,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})});const h=n.map(v=>v==="domain"?r:v==="http"?d:null);return D.createElement(D.Fragment,null,...h)}de.propTypes={domain:he.isRequired,filters:o.array};const xo=mt(Ie,"mutate_blocklets"),ho=mt(Ie,"",en);function go(t){const{inService:n}=L(),{blocklet:s,loadingRuntimeInfo:a}=J();let i=xo;return n&&(i=ho),e.jsx(i,{...t,blocklet:s,inService:n,loadingRuntimeInfo:a})}const Qe="nft-domain",Xe="nft-domain-forwarding";function Ie({hasPermission:t=!1,blocklet:n,loadingRuntimeInfo:s=!1,inService:a=!1,showAllDomains:i=!1,updateBlockletDomainAliases:r=()=>{},systemTips:d=null}){const{t:l}=S(),c=pe(y=>y.breakpoints.down("md")),m=D.useMemo(()=>{let y=t;return rt(n)&&(y=y&&a),y},[t,a,n]),{site:p}=n,u=D.useMemo(()=>at(n.site?.domainAliases),[n.site?.domainAliases]),g=D.useMemo(()=>u.filter(y=>!we.isCustomDomain(y.value)),[u]),b=D.useMemo(()=>u.filter(y=>we.isCustomDomain(y.value)),[u]),h=D.useMemo(()=>b.filter(y=>y.type!==Qe&&y.type!==Xe),[b]),v=D.useMemo(()=>b.filter(y=>y.type===Qe),[b]),f=D.useMemo(()=>b.filter(y=>y.type===Xe),[b]);return e.jsxs(e.Fragment,{children:[e.jsxs(_,{sx:{gap:3},children:[!!v.length&&e.jsx(W,{title:l("common.didDomains"),description:l("common.didDomainsDescription"),domains:v,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!f.length&&e.jsx(W,{title:l("common.forwardingDomains"),description:l("common.forwardingDomainsDescription"),domains:f,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!h.length&&e.jsx(W,{title:l("common.manualDomains"),description:l("common.manualDomainsDescription"),domains:h,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!g.length&&e.jsxs(x,{children:[d,e.jsx(W,{title:l("common.systemDomains"),description:l("common.systemDomainsDescription"),domains:g,hasMutatePermission:m,blocklet:n,site:p,mobile:c,updateBlockletDomainAliases:r})]})]}),!u.length&&(s?e.jsx(z,{size:16}):e.jsx(gn,{children:l("common.empty")}))]})}Ie.propTypes={hasPermission:o.bool,blocklet:o.object.isRequired,loadingRuntimeInfo:o.bool,inService:o.bool.isRequired,showAllDomains:o.bool,updateBlockletDomainAliases:o.func,systemTips:o.node};function re({children:t=null}){return e.jsx(x,{component:"span",sx:{verticalAlign:"bottom"},children:t})}re.propTypes={children:o.node};function Re({domain:t,children:n,suffix:s=null,...a}){const{t:i,locale:r}=S(),d=Y(),{href:l,accessibility:c,value:m}=t,p=D.useCallback(()=>e.jsx(ct,{content:Ae(m),locale:r,style:{marginLeft:"4px",color:d.palette.text.secondary,fontSize:"0.8em"}}),[m,r,d]);return!c||c.loading?e.jsxs(je,{component:"span",...a,children:[e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),p(),e.jsx(re,{children:s}),e.jsx(E,{title:i("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx(x,{component:"span",className:"status",children:e.jsx(z,{size:13,style:{fontSize:"13px"}})})})]}):c.accessible?e.jsxs(je,{component:"span",...a,children:[e.jsx(x,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{color:t.loading?"text.disabled":void 0},children:e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})})}),p(),e.jsx(re,{children:s})]}):e.jsxs(je,{component:"span",...a,children:[e.jsx(E,{title:i("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),!t.loading&&p(),e.jsx(re,{children:s})]})}Re.propTypes={domain:he.isRequired,children:o.any.isRequired,suffix:o.node};const je=on(x)`
|
|
2
|
+
display: inline-block;
|
|
3
|
+
vertical-align: middle;
|
|
4
|
+
|
|
5
|
+
& > span {
|
|
6
|
+
line-height: 24px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&,
|
|
10
|
+
& > * {
|
|
11
|
+
color: ${({theme:t})=>t.palette.text.primary};
|
|
12
|
+
font-size: 18px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&,
|
|
16
|
+
& > * {
|
|
17
|
+
word-break: break-all;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
svg {
|
|
21
|
+
vertical-align: text-top;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.status {
|
|
25
|
+
margin-left: 8px;
|
|
26
|
+
font-size: 13px;
|
|
27
|
+
}
|
|
28
|
+
`;function Se({hasMutatePermission:t,site:n,domain:s,blocklet:a,onDelete:i}){return t&&!s.isProtected?e.jsx(bt,{site:n,domain:s,blocklet:a,onDelete:i}):null}Se.propTypes={hasMutatePermission:o.bool.isRequired,site:o.object.isRequired,domain:he.isRequired,blocklet:o.object.isRequired,onDelete:o.func.isRequired};function ae({siteId:t,domain:n,blocklet:s,hasMutatePermission:a}){const{info:i}=L(),{t:r,locale:d}=S(),[l,c]=D.useState(!1);return e.jsxs(x,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:.5,button:{lineHeight:1}},children:[n.type==="nft-domain"&&e.jsx(po,{locale:d,nftDid:n.nftDid,didDomainURL:i.nftDomainUrl}),e.jsx(x,{sx:{display:"flex",mt:"-1px"},children:e.jsx(de,{domain:n,filters:["http"]},`${n.value}-http`)}),a&&n.canGenerateCertificate&&e.jsx(Dt,{siteId:t,domain:n.value,domainStatus:n.domainStatus,did:s.meta.did,issuing:l,setIssuing:c,children:({open:m})=>e.jsx(xe,{sx:{padding:0},size:"small",onClick:p=>m(p),children:r("router.cert.genLetsEncryptCert.title")})})]})}ae.propTypes={siteId:o.string.isRequired,domain:he.isRequired,blocklet:o.object.isRequired,hasMutatePermission:o.bool.isRequired};function W({title:t,description:n,domains:s=[],hasMutatePermission:a,blocklet:i,site:r,mobile:d,showAllDomains:l=!1,updateBlockletDomainAliases:c=()=>{}}){const[m,p]=D.useState(!1),u=D.useMemo(()=>l||m?s:s.slice(0,1),[s,m,l]),g=s.length>1,b=h=>a&&!h.isProtected;return e.jsx(lt,{elevation:0,sx:{p:3,pb:l?3:1.5,display:"flex",alignItems:"flex-start",gap:3,borderRadius:2,border:"1px solid",borderColor:"divider",transition:"box-shadow 0.2s ease-in-out"},children:e.jsxs(_,{sx:{width:1},children:[e.jsxs(x,{sx:{mb:1.5},children:[e.jsx(T,{variant:"h6",children:t}),e.jsx(T,{sx:{fontSize:12,color:"text.secondary",mt:.5},children:n})]}),u.map((h,v)=>e.jsxs(_,{children:[v!==0&&e.jsx(x,{sx:{my:.75,width:1,height:"1px"}}),!d&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(x,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(x,{sx:{height:28,display:"flex",alignItems:"center"},children:e.jsx(de,{domain:h,filters:["domain"]},`${h.value}-domain`)}),e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,svg:{width:"1em",height:"1em"},img:{width:"0.9em",height:"0.9em"}},children:[e.jsx(Re,{domain:h,target:"_blank",children:h.value}),e.jsx(x,{sx:{mt:"2px"},children:e.jsx(ae,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})})]})]}),e.jsx(x,{sx:{button:{padding:0}},children:e.jsx(Se,{hasMutatePermission:a,site:r,domain:h,blocklet:i,onDelete:()=>c(h,"delete")})})]}),d&&e.jsxs(x,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(x,{sx:{display:"flex",justifyContent:"flex-start",gap:1},children:[e.jsx(x,{sx:{height:28,display:"flex",alignItems:"center"},children:e.jsx(de,{domain:h,filters:["domain"]},`${h.value}-domain`)}),e.jsx(Re,{domain:h,target:"_blank",suffix:b(h)?null:e.jsx(x,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"space-between",svg:{width:"1em",height:"1rem"},img:{width:"0.9rem",height:"0.9rem"}},children:e.jsx(ae,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})}),children:h.value})]}),b(h)&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",ml:"18px"},children:[e.jsx(x,{sx:{display:"flex",alignItems:"center"},children:e.jsx(ae,{siteId:i.site?.id,domain:h,blocklet:i,hasMutatePermission:a})}),e.jsx(x,{sx:{button:{padding:0}},children:e.jsx(Se,{hasMutatePermission:a,site:r,domain:h,blocklet:i,onDelete:()=>c(h,"delete")})})]})]})]},h.value)),g&&!l&&e.jsx(xe,{onClick:()=>p(!m),sx:{p:0,mt:.5,alignSelf:"center"},children:m?e.jsx(tn,{}):e.jsx(nn,{})})]})})}W.propTypes={title:o.string.isRequired,description:o.string.isRequired,domains:o.array.isRequired,hasMutatePermission:o.bool.isRequired,blocklet:o.object.isRequired,site:o.object.isRequired,mobile:o.bool.isRequired,showAllDomains:o.bool,updateBlockletDomainAliases:o.func};const vt=D.createContext({}),{Provider:Do,Consumer:es}=vt;function yo({children:t}){const[n,s]=me({domain:"",error:null}),{locale:a}=S(),i={error:n.error,domain:n.domain,setError:r=>{s({error:r})},setDomain:r=>{const d=Ae(r),l=dt(d,a);s({domain:d,error:l})}};return e.jsx(Do,{value:{value:i},children:t})}function bo(){const{value:t}=D.useContext(vt);return t}var ve,Ze;function jo(){if(Ze)return ve;Ze=1;const{joinURL:t}=sn(),n=rn(),s="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p";return ve={DID_DOMAIN_SERVICE_DID:s,getDidDomainServiceURL:async i=>{if(!i||!i?.trim())return null;const r=new URL(i);r.pathname="__blocklet__.js",r.searchParams.set("type","json");const{data:d}=await n.get(r.toString()),l=d?.componentMountPoints?.find(u=>u.did===s),c=new URL(i);c.pathname=l?.mountPoint;const m=c.toString(),p=t(m,"/api");return{base:m,api:p,domain:t(p,"/domains")}}},ve}var vo=jo();const Co=ut(Sn),wo=ut(hn);var Ce,Ke;function Ro(){if(Ke)return Ce;Ke=1;const t=Co,n=wo;function s(i){return!i||typeof i!="string"?!1:i.split(".").length===2}return Ce={isTopLevelDomain:s,formatTopLevelDidDomain:i=>{const r=t(n(i));return r&&(s(r)?`www.${r}`:r)}},Ce}var Ye=Ro(),So=ln();const To=an(So);function Ct({domain:t="",resolvedTarget:n,...s}){const{t:a,locale:i}=S();return e.jsxs(x,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...s,children:[e.jsxs(x,{sx:{display:"flex",flexWrap:"wrap"},children:[a("router.domain.setup.tipStart"),t&&e.jsx(x,{sx:{mx:.5,color:"primary.main",fontWeight:"fontWeightBold"},children:t}),a("router.domain.setup.tipEnd"),":"]}),e.jsxs(_,{sx:{gap:.5,"&>div":{mb:0},marginTop:"12px"},children:[e.jsx(Te,{label:a("router.domain.setup.recordType"),value:"CNAME",locale:i}),e.jsx(Te,{label:a("router.domain.setup.recordValue"),value:n,locale:i})]})]})}Ct.propTypes={domain:o.string,resolvedTarget:o.string.isRequired};function Te({locale:t,label:n,value:s}){const a=pe(r=>r.breakpoints.down("md")),i=Y();return e.jsx(kn,{name:n,nameWidth:120,children:e.jsxs(x,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(T,{component:"span",sx:[{color:"primary.main",overflow:"auto"},a?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"}],children:s}),e.jsx(ct,{content:s,locale:t,style:{marginLeft:"4px",color:i.palette.text.secondary}})]})})}Te.propTypes={locale:o.string.isRequired,label:o.string.isRequired,value:o.string.isRequired};function wt({children:t=null,href:n="",sx:s=null,showIcon:a=!1,...i}){const r=Y();return e.jsxs(cn,{href:n,target:"_blank",...i,sx:{display:"inline-flex",alignItems:"center",color:"text.primary",":hover":{color:r.palette.primary.main},...s},children:[t,a&&e.jsx(In,{fontSize:"small",sx:{ml:"4px",fontSize:"1rem"}})]})}wt.propTypes={children:o.node,sx:o.object,href:o.string,showIcon:o.bool};function Rt({records:t}){return e.jsx(Wn,{component:x,sx:{".MuiTableCell-root":{color:"text.primary"}},children:e.jsxs(Bn,{children:[e.jsx(Zn,{children:e.jsxs(Ge,{children:[e.jsx(H,{children:"Type"}),e.jsx(H,{children:"Name"}),e.jsx(H,{children:"Data"})]})}),e.jsx($n,{children:t.map(n=>e.jsxs(Ge,{children:[e.jsx(H,{children:n.type}),e.jsx(H,{children:n.name}),e.jsx(H,{sx:{wordBreak:"break-word"},children:e.jsx(Pn,{children:n.data})})]},n.name))})]})})}Rt.propTypes={records:o.array.isRequired};function St({url:t,domain:n=""}){const{t:s}=S();return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step1Title")}),e.jsxs(T,{component:"section",children:[s("setting.dns.step1Desc1"),e.jsx(wt,{href:"https://lookup.icann.org/",target:"_blank",children:"ICANN"})]})]}),e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step2Title",{url:t})}),e.jsx(T,{component:"section",children:s("setting.dns.step2Desc")})]}),e.jsxs(x,{sx:{display:"flex",flexDirection:"column",gap:1},children:[e.jsx(T,{component:"h3",variant:"h6",children:s("setting.dns.step3Title")}),e.jsx(T,{component:"section",children:s("setting.dns.step3Desc")}),e.jsx(Rt,{records:[{type:"CNAME",name:An(t),data:n}]})]})]})}St.propTypes={url:o.string.isRequired,domain:o.string};const Tt=D.createContext();function ko({children:t}){const{t:n}=S(),{api:s}=L(),{blocklet:a}=J(),[i,r]=D.useState(null),d=D.useCallback(async(m,p)=>{try{const u=await s.getBlocklet({input:{domain:m,did:a?.meta?.did}});return u?.blocklet?new Promise(g=>{r({title:n("setting.domain.conflictTitle",{domain:m}),description:n("setting.domain.conflictDescription",{domain:m,title:u.blocklet.meta?.title,from:u.blocklet.meta?.title,to:a.meta?.title}),confirm:n("common.confirm"),cancel:n("common.cancel"),onConfirm:async()=>{r(null),await p?.(),g(!0)},onCancel:()=>{r(null),g(!1)}})}):!1}catch(u){return console.error(u),q.error($(u)),!1}},[s,n,a]),l=D.useCallback(()=>i?e.jsx(fe,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,onConfirm:i.onConfirm,onCancel:i.onCancel}):null,[i]),c=D.useMemo(()=>({checkConflict:d}),[d]);return e.jsxs(Tt.Provider,{value:c,children:[t,l()]})}function kt(){return D.useContext(Tt)}function At({siteId:t,teamDid:n,cnameDomain:s,defaultCustomDomain:a="",onInputDomain:i=ie,appId:r="",appPk:d="",onSuccess:l=ie,onError:c=ie,disabled:m=!1,autoFocus:p=!0,inBlockletSetup:u=!1,shouldCheckDomain:g=!1,onStateChange:b=ie,currentIp:h="",...v}){const{t:f,locale:y}=S(),{api:w,info:P}=L(),{blocklet:F}=J(),U=bo(),N=Y(),A=Tn({key:"sm"}),[R,I]=me({submittingDomain:!1,domain:a,error:null,type:P?.nftDomainUrl?"nftDomain":"inputDomain",showDnsTip:!1}),ge=ce.getDisplayName(F),{checkConflict:Pe}=kt(),{connectApi:Et}=dn(),ee=un(()=>vo.getDidDomainServiceURL(P?.nftDomainUrl));if(P?.nftDomainUrl&&ee.loading)return e.jsx(x,{...v,onError:c,currentIp:h,children:e.jsx(ze,{relative:"parent",children:e.jsx(z,{})})});if(ee.error)return e.jsx(x,{...v,onError:c,currentIp:h,children:e.jsx(ze,{relative:"parent",children:ee.error.message})});const Me=ee.value,De=()=>{I({invalidDNSDomain:null})},qe=async(j,C,k=!1)=>{await w.addDomainAlias({input:{id:t,domainAlias:j,teamDid:n,inBlockletSetup:!0,force:k}}),I({submittingDomain:!1}),l({domain:j,type:"inputDomain",canGenerateCertificate:!C})},ye=async(j,C)=>{b(f("setting.domain.addingDomain"));try{await qe(j,C,!1)}catch(k){if(console.error(k),De(),$(k).includes("already exists")){await Pe(j,()=>qe(j,C,!0));return}q.error($(k))}},Ee=async({domain:j,type:C,nftDid:k,chainHost:O})=>{try{if(!g){if(C==="inputDomain"){await ye(j);return}l({domain:j,type:C,nftDid:k,chainHost:O});return}b({text:f("setting.domain.checkingResolvable")});let B=30;const M=3e3,te=B*1e3/M,Ue=setInterval(()=>{if(B<=0){clearInterval(Ue);return}b({text:`${f("setting.domain.checkingResolvable")} (${B--}s)`})},1e3),ne=await To(()=>w.getDomainDNS({input:{teamDid:n,domain:j}}),{retries:te,minTimeout:M,maxTimeout:M,onFailedAttempt:console.error});if(clearInterval(Ue),!ne?.isDnsResolved||!ne?.isCnameMatch){let oe="";if(ne.isDnsResolved?ne.isCnameMatch||(oe=f("setting.domain.resolvedAddressError",{domain:j,curDomain:s})):oe=f("setting.domain.cannotResolve",{domain:j}),C==="nftDomain"){q.error(oe),l({domain:j,type:"nftDomain"});return}b({text:""}),I({invalidDNSDomain:{domain:j,error:oe},domain:j,type:C,submittingDomain:!1});return}if(C==="nftDomain"){l({domain:j,type:"nftDomain"});return}await ye(j)}catch(B){q.error(B.message),b({text:""}),I({submittingDomain:!1}),C==="nftDomain"&&l({domain:j,type:"nftDomain",error:B.message})}},Le=async({domain:j,nftDid:C,chainHost:k,force:O})=>{const B=be(j),M=Ye.formatTopLevelDidDomain(B);I({submittingDomain:!0}),await w.addDomainAlias({input:{id:t,type:"nft-domain",domainAlias:M,nftDid:C,chainHost:k,teamDid:n,inBlockletSetup:u,force:O}});const te="nftDomain";I({type:te}),await Ee({domain:M,type:te,nftDid:C,chainHost:k})},Lt=async({domain:j,nftDid:C,chainHost:k,isDomainOwner:O})=>{if(!O){const M=f("router.domainAlias.addDomainNFT.authorizeFailed");q.error(M),I({submittingDomain:!1,error:M});return}const B=Ye.formatTopLevelDidDomain(be(j));try{await Le({domain:j,nftDid:C,chainHost:k,force:!1})}catch(M){if(console.error(M),De(),$(M).includes("already exists")){await Pe(B,()=>Le({domain:j,nftDid:C,chainHost:k,force:!0}));return}q.error($(M))}finally{I({submittingDomain:!1})}},Bt=async()=>{try{I({submittingDomain:!0});const j=be(R.domain);if(P.nftDomainUrl&&Me&&(await w.isDidDomain({input:{domain:j}})).value===!0){Et.openPopup({prefix:"/connect-to-did-domain",custom:!0,locale:y,extraParams:{provider:"wallet",delegatee:r,delegateePk:d,domain:R.domain,appName:ge,appUrl:ce.getAppUrl(F)},message:{title:f("router.domainAlias.addDomainNFT.connect.title",{appName:ge}),scan:f("router.domainAlias.addDomainNFT.connect.scan",{domain:R.domain,appName:ge}),confirm:f("router.domainAlias.addDomainNFT.connect.confirm"),success:f("router.domainAlias.addDomainNFT.connect.success")},onSuccess:Lt,onError:k=>{q.error(k.message),I({submittingDomain:!1})},onClose:()=>I({submittingDomain:!1}),checkTimeout:60*5e3},{baseUrl:Me.base,locale:y});return}await Ee({domain:j,type:R.type})}catch(j){I({submittingDomain:!1}),U.setError(j.message)}},Be=U.error||R.error;return e.jsx(x,{...v,onError:c,currentIp:h,children:e.jsxs(x,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(x,{component:"form",onSubmit:j=>{j.preventDefault(),Bt()},sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[e.jsx(T,{sx:{color:N.palette.text.primary},children:f("router.domainAlias.add.tips")}),e.jsx(mn,{sx:{display:"block",marginTop:"8px"},label:f("router.domainAlias.add.domainDescription"),helperText:R.type==="inputDomain"&&Be||f("router.domainAlias.add.helperText"),fullWidth:!0,disabled:m,value:R.domain,size:"small",variant:"outlined",error:!!Be&&R.type==="inputDomain",onChange:j=>{const C=Ae(j.target?.value);U.setDomain(C);const k=dt(C,y);I({domain:C,error:k,type:"inputDomain"}),i({domain:C,error:k,type:"inputDomain"})},autoFocus:p,onBlur:()=>{U.domain||(I({error:null}),U.setError(null))},slotProps:{htmlInput:{"data-cy":"domain-name-input"}}}),e.jsx(x,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(ft,{"data-cy":"confirm-add-domain",fullWidth:A,variant:"contained",loading:R.submittingDomain,type:"submit",children:f("common.add")})}),e.jsx(x,{sx:{backgroundColor:()=>pn(N.palette.primary.light,.1),borderRadius:"8px",padding:"12px"},children:f("router.domainAlias.addDomainNFT.topLevelDidDomainHint")}),e.jsxs(x,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:N.palette.primary.main},onClick:()=>I({showDnsTip:!R.showDnsTip}),children:[e.jsx(fn,{fontSize:"1em"}),f("router.domainAlias.showTipHint")]}),R.showDnsTip&&e.jsx(Ct,{domain:R.domain,resolvedTarget:s,style:{marginTop:"4px"}})]}),R.invalidDNSDomain&&e.jsx(fe,{maxWidth:"md",title:f("common.reminder"),description:e.jsxs(_,{sx:{gap:2},children:[e.jsx(ue,{severity:"warning",children:f("setting.domain.invalidDNSReminder",{error:R.invalidDNSDomain.error})}),e.jsx(St,{url:R.domain,domain:s})]}),color:"primary",confirm:f("setting.domain.continueAdd"),onConfirm:()=>ye(R.invalidDNSDomain.domain,R.type),onCancel:De})]})})}At.propTypes={siteId:o.string.isRequired,currentIp:o.string,teamDid:o.string.isRequired,cnameDomain:o.string.isRequired,defaultCustomDomain:o.string,onInputDomain:o.func,onSuccess:o.func,appId:o.string,appPk:o.string,disabled:o.bool,autoFocus:o.bool,inBlockletSetup:o.bool,shouldCheckDomain:o.bool,onStateChange:o.func,onError:o.func};function It({id:t,children:n=null,title:s="",teamDid:a="",systemDomains:i,appId:r=null,appPk:d,onAddDomainAlias:l=()=>{},...c}){const{t:m}=S(),[p,u]=me({loading:!1,confirmSetting:null}),g=i.find(f=>we.isDidDomain(f)),b=()=>{u({loading:!1,confirmSetting:null})},h={title:s||m("router.domainAlias.add.title"),description:function(y,w,P){return e.jsx(At,{siteId:t,teamDid:a,cnameDomain:g,onSuccess:F=>{l(F),u({confirmSetting:null})},onInputDomain:({domain:F,type:U,error:N})=>{w({...y,domain:F,type:U,__disableConfirm:!!N}),P(N)},appId:r,appPk:d,...c})},confirm:m("common.confirm"),cancel:m("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:b},v=f=>{f.stopPropagation(),u({confirmSetting:h})};return e.jsxs(e.Fragment,{children:[typeof n=="function"?n({loading:p.loading,open:v}):e.jsxs(it,{onClick:v,className:"rule-action","data-cy":"action-add-domain-alias",children:[p.loading?e.jsx(z,{size:16}):e.jsx(Rn,{style:{fontSize:18,marginRight:5}}),m("router.domainAlias.add.title")]}),p.confirmSetting&&e.jsx(fe,{title:p.confirmSetting.title,description:p.confirmSetting.description,confirm:p.confirmSetting.confirm,cancel:p.confirmSetting.cancel,params:p.confirmSetting.params,onCancel:p.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:p.loading,maxWidth:"sm"})]})}It.propTypes={id:o.string.isRequired,children:o.any,title:o.string,teamDid:o.string,systemDomains:o.arrayOf(o.string).isRequired,appId:o.string,appPk:o.string.isRequired,onAddDomainAlias:o.func};function Ao(t){return e.jsx(yo,{children:e.jsx(It,{...t})})}function Pt({appId:t,appPk:n,siteId:s,inBlockletSetup:a,teamDid:i,sx:r={},onAddDomainAlias:d=()=>{},...l}){const{api:c,info:m}=L(),{locale:p,t:u}=S(),{checkConflict:g}=kt(),b=async({domain:v,nftDid:f,chainHost:y,force:w})=>{const P={id:s,type:"nft-domain",domainAlias:v,nftDid:f,chainHost:y,teamDid:i,inBlockletSetup:a,force:w};return await c.addDomainAlias({input:P}),P},h=async({domain:v,nftDid:f,chainHost:y})=>{try{const w=await b({domain:v,nftDid:f,chainHost:y,force:!1});d(w)}catch(w){if($(w).includes("already exists")){await g(v,()=>b({domain:v,nftDid:f,chainHost:y,force:!0}));return}q.error($(w))}};return e.jsx(mo,{delegatee:t,delegateePk:n,didDomainURL:m.nftDomainUrl,onSuccess:h,locale:p,variant:"outlined",sx:r,title:u("router.domainAlias.addDomainNFT.buy"),...l})}Pt.propTypes={appId:o.string.isRequired,appPk:o.string.isRequired,siteId:o.string.isRequired,inBlockletSetup:o.bool.isRequired,teamDid:o.string.isRequired,sx:o.object,onAddDomainAlias:o.func};function Mt({blocklet:t,bugDidDomainProps:n={},connectDomainProps:s={},updateBlockletDomainAliases:a=()=>{}}){const{t:i}=S(),{info:r}=L(),d=pe(u=>u.breakpoints.down("md")),{site:l}=t,c=D.useMemo(()=>at(t.site?.domainAliases),[t.site?.domainAliases]),m=t.environments?.find(u=>u.key==="BLOCKLET_APP_PK")?.value,p=xn(c);return e.jsx(ko,{children:e.jsx(qt,{action:e.jsxs(x,{sx:{display:"flex",alignItems:d?"stretch":"center",flexDirection:d?"column":"row",gap:1},children:[r.nftDomainUrl&&e.jsx(Pt,{variant:"contained",appId:t.appPid,appPk:m,siteId:l.id,inBlockletSetup:!1,teamDid:t.meta.did,onAddDomainAlias:u=>{const g={value:u.domainAlias,isProtected:!1,type:u.type,nftDid:u.nftDid,chainHost:u.chainHost,accessibility:{loading:!0}};a(g)},...n}),e.jsx(Ao,{id:l.id,title:i("common.connectExistingDomain"),teamDid:t.meta?.did,appId:t.appPid,appPk:m,systemDomains:p?.map(u=>u.value),onAddDomainAlias:u=>{const g={value:u.domain,isProtected:!1,type:u.type==="nftDomain"?"nft-domain":"",nftDid:u.nftDid,chainHost:u.chainHost,accessibility:{loading:!0},canGenerateCertificate:u.canGenerateCertificate===void 0?!0:u.canGenerateCertificate};a(g)},...s,children:({open:u})=>e.jsxs(xe,{variant:"outlined",sx:{borderColor:"#ddd",color:"text.primary","&:hover":{bgcolor:g=>g.palette.primary.main,color:g=>g.palette.primary.contrastText}},"data-cy":"add-domain-alias",onClick:u,disabled:ce.isInProgress(t.status),children:[e.jsx(wn,{style:{fontSize:"1.3em",marginRight:4}}),i("common.connectExistingDomain")]})})]})})})}Mt.propTypes={blocklet:o.object.isRequired,bugDidDomainProps:o.object,connectDomainProps:o.object,updateBlockletDomainAliases:o.func};function qt({action:t}){const{t:n}=S();return e.jsxs(lt,{elevation:0,sx:{p:3,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(x,{sx:{display:"flex",alignItems:"center",gap:2},children:e.jsxs(x,{sx:{flex:1,width:0,mb:1.5},children:[e.jsx(T,{variant:"h6",children:n("common.bugOrConnectDomain")}),e.jsx(T,{sx:{fontSize:12,color:"text.secondary",mt:.5},children:n("common.bugOrConnectDomainTip")})]})}),t]})}qt.propTypes={action:o.element.isRequired};function ts(){const{blocklet:t,actions:{updateBlockletDomainAliases:n}}=J(),{inService:s}=L(),{t:a}=S(),i=D.useMemo(()=>{let r=!0;return rt(t)&&(r=r&&s),r},[s,t]);return e.jsxs(x,{component:_,sx:{gap:3,maxWidth:820},children:[e.jsxs(e.Fragment,{children:[ce.isAccessible(t.status)===!1&&e.jsx(ue,{severity:"warning",children:a("blocklet.router.noRunning")}),i&&e.jsx(Mt,{blocklet:t,updateBlockletDomainAliases:n,connectDomainProps:{shouldCheckDomain:!0}})]}),e.jsx(go,{showAllDomains:!0,updateBlockletDomainAliases:n})]})}export{ts as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Ne,j as Y,ah as ke,q as ge,U as $e,d1 as je,af as Le,o as te,r as he,fi as ze,br as Ke,
|
|
1
|
+
import{c as Ne,j as Y,ah as ke,q as ge,U as $e,d1 as je,af as Le,o as te,r as he,fi as ze,br as Ke,aS as Ie,al as qe,aB as Ve,bj as Ge,V as Ye,B as pe,bz as De,C as Re,cu as Xe,F as Je,S as Ze,M as Qe,dg as et,H as tt}from"./index-CP8e2zcP.js";import{B as it}from"./ButtonGroup-CXwzM552.js";const rt=Ne(Y.jsx("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}));var we={exports:{}},Ae;function st(){return Ae||(Ae=1,(function(X,q){(function(j,V){X.exports=V()})(globalThis,(()=>(()=>{var j={4567:function(A,s,o){var d=this&&this.__decorate||function(e,r,a,f){var p,g=arguments.length,l=g<3?r:f===null?f=Object.getOwnPropertyDescriptor(r,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(e,r,a,f);else for(var m=e.length-1;m>=0;m--)(p=e[m])&&(l=(g<3?p(l):g>3?p(r,a,l):p(r,a))||l);return g>3&&l&&Object.defineProperty(r,a,l),l},_=this&&this.__param||function(e,r){return function(a,f){r(a,f,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const n=o(9042),c=o(9924),u=o(844),v=o(4725),h=o(2585),t=o(3656);let i=s.AccessibilityManager=class extends u.Disposable{constructor(e,r,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let p=0;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);if(this._topBoundaryFocusListener=p=>this._handleBoundaryFocus(p,0),this._bottomBoundaryFocusListener=p=>this._handleBoundaryFocus(p,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new c.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((p=>this._handleResize(p.rows)))),this.register(this._terminal.onRender((p=>this._refreshRows(p.start,p.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((p=>this._handleChar(p)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
2
2
|
`)))),this.register(this._terminal.onA11yTab((p=>this._handleTab(p)))),this.register(this._terminal.onKey((p=>this._handleKey(p.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,t.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,u.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let r=0;r<e;r++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,r){this._liveRegionDebouncer.refresh(e,r,this._terminal.rows)}_renderRows(e,r){const a=this._terminal.buffer,f=a.lines.length.toString();for(let p=e;p<=r;p++){const g=a.lines.get(a.ydisp+p),l=[],m=g?.translateToString(!0,void 0,void 0,l)||"",E=(a.ydisp+p+1).toString(),x=this._rowElements[p];x&&(m.length===0?(x.innerText=" ",this._rowColumns.set(x,[0,1])):(x.textContent=m,this._rowColumns.set(x,l)),x.setAttribute("aria-posinset",E),x.setAttribute("aria-setsize",f))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,r){const a=e.target,f=this._rowElements[r===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(r===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==f)return;let p,g;if(r===0?(p=a,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(p=this._rowElements.shift(),g=a,this._rowContainer.removeChild(p)),p.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),r===0){const l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{const l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(r===0?-1:1),this._rowElements[r===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let r={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((r.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||r.node===a.node&&r.offset>a.offset)&&([r,a]=[a,r]),r.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(r={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(r.node))return;const f=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(f)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:f,offset:f.textContent?.length??0}),!this._rowContainer.contains(a.node))return;const p=({node:m,offset:E})=>{const x=m instanceof Text?m.parentNode:m;let L=parseInt(x?.getAttribute("aria-posinset"),10)-1;if(isNaN(L))return console.warn("row is invalid. Race condition?"),null;const b=this._rowColumns.get(x);if(!b)return console.warn("columns is null. Race condition?"),null;let R=E<b.length?b[E]:b.slice(-1)[0]+1;return R>=this._terminal.cols&&(++L,R=0),{row:L,column:R}},g=p(r),l=p(a);if(g&&l){if(g.row>l.row||g.row===l.row&&g.column>=l.column)throw new Error("invalid range");this._terminal.select(g.column,g.row,(l.row-g.row)*this._terminal.cols-g.column+l.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let r=this._rowContainer.children.length;r<this._terminal.rows;r++)this._rowElements[r]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[r]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=i=d([_(1,h.IInstantiationService),_(2,v.ICoreBrowserService),_(3,v.IRenderService)],i)},3614:(A,s)=>{function o(c){return c.replace(/\r?\n/g,"\r")}function d(c,u){return u?"\x1B[200~"+c+"\x1B[201~":c}function _(c,u,v,h){c=d(c=o(c),v.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),v.triggerDataEvent(c,!0),u.value=""}function n(c,u,v){const h=v.getBoundingClientRect(),t=c.clientX-h.left-10,i=c.clientY-h.top-10;u.style.width="20px",u.style.height="20px",u.style.left=`${t}px`,u.style.top=`${i}px`,u.style.zIndex="1000",u.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=o,s.bracketTextForPaste=d,s.copyHandler=function(c,u){c.clipboardData&&c.clipboardData.setData("text/plain",u.selectionText),c.preventDefault()},s.handlePasteEvent=function(c,u,v,h){c.stopPropagation(),c.clipboardData&&_(c.clipboardData.getData("text/plain"),u,v,h)},s.paste=_,s.moveTextAreaUnderMouseCursor=n,s.rightClickHandler=function(c,u,v,h,t){n(c,u,v),t&&h.rightClickSelect(c),u.value=h.selectionText,u.select()}},7239:(A,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const d=o(1505);s.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,n,c){this._css.set(_,n,c)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,c){this._color.set(_,n,c)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(A,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(o,d,_,n){o.addEventListener(d,_,n);let c=!1;return{dispose:()=>{c||(c=!0,o.removeEventListener(d,_,n))}}}},3551:function(A,s,o){var d=this&&this.__decorate||function(i,e,r,a){var f,p=arguments.length,g=p<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,r):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,e,r,a);else for(var l=i.length-1;l>=0;l--)(f=i[l])&&(g=(p<3?f(g):p>3?f(e,r,g):f(e,r))||g);return p>3&&g&&Object.defineProperty(e,r,g),g},_=this&&this.__param||function(i,e){return function(r,a){e(r,a,i)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier=void 0;const n=o(3656),c=o(8460),u=o(844),v=o(2585),h=o(4725);let t=s.Linkifier=class extends u.Disposable{get currentLink(){return this._currentLink}constructor(i,e,r,a,f){super(),this._element=i,this._mouseService=e,this._renderService=r,this._bufferService=a,this._linkProviderService=f,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new c.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new c.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,u.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,u.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(i){this._lastMouseEvent=i;const e=this._positionFromMouseEvent(i,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const r=i.composedPath();for(let a=0;a<r.length;a++){const f=r[a];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(i){if(this._activeLine!==i.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(i,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))}_askForLink(i,e){this._activeProviderReplies&&e||(this._activeProviderReplies?.forEach((a=>{a?.forEach((f=>{f.link.dispose&&f.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=i.y);let r=!1;for(const[a,f]of this._linkProviderService.linkProviders.entries())e?this._activeProviderReplies?.get(a)&&(r=this._checkLinkProviderResult(a,i,r)):f.provideLinks(i.y,(p=>{if(this._isMouseOut)return;const g=p?.map((l=>({link:l})));this._activeProviderReplies?.set(a,g),r=this._checkLinkProviderResult(a,i,r),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(i.y,this._activeProviderReplies)}))}_removeIntersectingLinks(i,e){const r=new Set;for(let a=0;a<e.size;a++){const f=e.get(a);if(f)for(let p=0;p<f.length;p++){const g=f[p],l=g.link.range.start.y<i?0:g.link.range.start.x,m=g.link.range.end.y>i?this._bufferService.cols:g.link.range.end.x;for(let E=l;E<=m;E++){if(r.has(E)){f.splice(p--,1);break}r.add(E)}}}}_checkLinkProviderResult(i,e,r){if(!this._activeProviderReplies)return r;const a=this._activeProviderReplies.get(i);let f=!1;for(let p=0;p<i;p++)this._activeProviderReplies.has(p)&&!this._activeProviderReplies.get(p)||(f=!0);if(!f&&a){const p=a.find((g=>this._linkAtPosition(g.link,e)));p&&(r=!0,this._handleNewLink(p))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let p=0;p<this._activeProviderReplies.size;p++){const g=this._activeProviderReplies.get(p)?.find((l=>this._linkAtPosition(l.link,e)));if(g){r=!0,this._handleNewLink(g);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(i){if(!this._currentLink)return;const e=this._positionFromMouseEvent(i,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(i,this._currentLink.link.text)}_clearCurrentLink(i,e){this._currentLink&&this._lastMouseEvent&&(!i||!e||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,u.disposeArray)(this._linkCacheDisposables))}_handleNewLink(i){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(i.link,e)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:r=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:r=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(i.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((r=>{if(!this._currentLink)return;const a=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,f=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=f&&(this._clearCurrentLink(a,f),this._lastMouseEvent)){const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._askForLink(p,!1)}}))))}_linkHover(i,e,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(r,e.text)}_fireUnderlineEvent(i,e){const r=i.range,a=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-a-1,r.end.x,r.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)}_linkLeave(i,e,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(r,e.text)}_linkAtPosition(i,e){const r=i.range.start.y*this._bufferService.cols+i.range.start.x,a=i.range.end.y*this._bufferService.cols+i.range.end.x,f=e.y*this._bufferService.cols+e.x;return r<=f&&f<=a}_positionFromMouseEvent(i,e,r){const a=r.getCoords(i,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(i,e,r,a,f){return{x1:i,y1:e,x2:r,y2:a,cols:this._bufferService.cols,fg:f}}};s.Linkifier=t=d([_(1,h.IMouseService),_(2,h.IRenderService),_(3,v.IBufferService),_(4,h.ILinkProviderService)],t)},9042:(A,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(A,s,o){var d=this&&this.__decorate||function(h,t,i,e){var r,a=arguments.length,f=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(h,t,i,e);else for(var p=h.length-1;p>=0;p--)(r=h[p])&&(f=(a<3?r(f):a>3?r(t,i,f):r(t,i))||f);return a>3&&f&&Object.defineProperty(t,i,f),f},_=this&&this.__param||function(h,t){return function(i,e){t(i,e,h)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const n=o(511),c=o(2585);let u=s.OscLinkProvider=class{constructor(h,t,i){this._bufferService=h,this._optionsService=t,this._oscLinkService=i}provideLinks(h,t){const i=this._bufferService.buffer.lines.get(h-1);if(!i)return void t(void 0);const e=[],r=this._optionsService.rawOptions.linkHandler,a=new n.CellData,f=i.getTrimmedLength();let p=-1,g=-1,l=!1;for(let m=0;m<f;m++)if(g!==-1||i.hasContent(m)){if(i.loadCell(m,a),a.hasExtendedAttrs()&&a.extended.urlId){if(g===-1){g=m,p=a.extended.urlId;continue}l=a.extended.urlId!==p}else g!==-1&&(l=!0);if(l||g!==-1&&m===f-1){const E=this._oscLinkService.getLinkData(p)?.uri;if(E){const x={start:{x:g+1,y:h},end:{x:m+(l||m!==f-1?0:1),y:h}};let L=!1;if(!r?.allowNonHttpProtocols)try{const b=new URL(E);["http:","https:"].includes(b.protocol)||(L=!0)}catch{L=!0}L||e.push({text:E,range:x,activate:(b,R)=>r?r.activate(b,R,x):v(0,R),hover:(b,R)=>r?.hover?.(b,R,x),leave:(b,R)=>r?.leave?.(b,R,x)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(g=m,p=a.extended.urlId):(g=-1,p=-1)}}t(e)}};function v(h,t){if(confirm(`Do you want to navigate to ${t}?
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./index-
|
|
1
|
+
import{r as a}from"./index-CP8e2zcP.js";const r=t=>a.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},a.createElement("path",{d:"M6.04 17.625a.953.953 0 0 0 .14-.012l3.943-.691a.23.23 0 0 0 .124-.066l9.935-9.935a.233.233 0 0 0 0-.33l-3.895-3.898a.232.232 0 0 0-.167-.068.232.232 0 0 0-.166.068l-9.935 9.935a.238.238 0 0 0-.066.124l-.691 3.943a.785.785 0 0 0 .22.698c.155.15.35.232.558.232zm1.58-4.088 8.5-8.498 1.718 1.718-8.5 8.498-2.084.368.366-2.085zm13.005 6.057H3.375a.75.75 0 0 0-.75.75v.843c0 .104.084.188.188.188h18.375a.188.188 0 0 0 .187-.188v-.843a.75.75 0 0 0-.75-.75z"}));export{r as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ai as e,bg as r,bh as s}from"./index-CP8e2zcP.js";const o=e(r),t=e(s);export{t as a,o as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ar as r}from"./index-CP8e2zcP.js";var a=r();export{a as e};
|
package/dist/assets/{federated-detail-dialog-BAAYkStt.js → federated-detail-dialog-C93dA_OW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,j as t,dp as
|
|
1
|
+
import{c as w,j as t,dp as _,bk as N,dq as T,dr as U,ds as $,r as P,p as O,aS as z,b6 as M,af as F,ab as y,k as p,bF as q,x as W,W as H,dt as b,bt as V,B as A,du as G,cu as X,aB as j,C as L,o as J}from"./index-CP8e2zcP.js";import{v as K}from"./index-8K8V7S7h.js";import{u as Q}from"./blocklet-D7q_eJsm.js";const de=w(t.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"})),Y=w(t.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"}));var Z=Array.prototype,k=Z.splice;function ee(s,a,m,c){var e=N,g=-1,l=a.length,d=s;for(s===a&&(a=_(a));++g<l;)for(var i=0,f=a[g],h=f;(i=e(d,h,i))>-1;)d!==s&&k.call(d,i,1),k.call(s,i,1);return s}function ae(s,a){return s&&s.length&&a&&a.length?ee(s,a):s}var te=T(ae),D,B;function oe(){if(B)return D;B=1;const{DEFAULT_IP_DOMAIN_SUFFIX:s,SLOT_FOR_IP_DNS_SITE:a,DEFAULT_DID_DOMAIN:m}=U(),{encode:c}=$();return D={getIpDnsDomainForBlocklet:l=>`${c(l.meta.did)}-${a}.${s}`,getDidDomainForBlocklet:({did:l,didDomain:d=m})=>`${c(l)}.${d}`},D}var se=oe();function ie({ref:s=null}){const{t:a}=P.useContext(O),{blocklet:m}=Q(),{api:c}=z(),e=M({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:F}),l=y()?.transitions?.duration?.leavingScreen||300,d=p(()=>{e.mode="view",e.data={},e.callback=F}),i=p(()=>{e.show=!1,setTimeout(()=>{d()},l)}),f=p(n=>{e.mode="view",e.show=!0,e.data=n}),h=p((n,r=F)=>{e.mode="approve",e.show=!0,e.data=n,e.callback=r});P.useImperativeHandle(s,()=>({open:f,close:i,approve:h}),[f,i,h]);const R=q(()=>{if(!e.show)return[];e.data.migratedFrom=[e.data.appId,e.data.appPid];const n=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return e.data.isMaster!==!1&&te(n,"appliedAt","status"),n.map(r=>{const S=a(`federated.info.${r}`);let o=e.data[r];if(r==="appName"&&e.data.isMaster&&(o=t.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:.5},children:[t.jsx(G,{component:Y}),o]})),["appId","appPid","serverId"].includes(r)&&(o=t.jsx(b,{children:o})),["appUrl"].includes(r)&&(o=t.jsx(A,{component:"a",href:o,target:"_blank",children:o})),["appLogo"].includes(r)){const v=W(`https://${se.getDidDomainForBlocklet({did:e.data.appPid})}`,H,"/blocklet/logo");try{const u=new URL(v);u.searchParams.set("imageFilter","resize"),u.searchParams.set("w","80"),u.searchParams.set("h","80"),o=t.jsx("img",{src:u.href,width:"60",height:"60",alt:e.data.appName})}catch{o=t.jsx("img",{src:v,width:"60",height:"60",alt:e.data.appName})}}return r==="status"&&(o=o&&a(`federated.status.${o}`)),r==="migratedFrom"&&(o=(e.data.migratedFrom||[]).filter(x=>![e.data.appId,e.data.appPid].includes(x)).map(x=>t.jsx(b,{children:x}))),V(o)&&(o="-"),{name:S,value:o}})},[e.data]),I=e.mode==="approve",C=p(async()=>{try{e.loadingReject=!0,await c.auditFederatedLogin({input:{memberPid:e.data.appPid,did:m.appPid,status:"rejected"}}),i(),e?.callback(!1)}finally{e.loadingReject=!1}}),E=p(async()=>{try{e.loadingApprove=!0,await c.auditFederatedLogin({input:{memberPid:e.data.appPid,did:m.appPid,status:"approved"}}),i(),e?.callback(!0)}finally{e.loadingApprove=!1}});return t.jsx(X,{open:e.show,title:a(I?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:i,actions:I?t.jsxs(t.Fragment,{children:[t.jsxs(j,{color:"error",variant:"contained",onClick:C,disabled:e.loadingReject,children:[e.loadingReject?t.jsx(L,{size:16,color:"grey"}):null,a("common.reject")]}),t.jsxs(j,{variant:"contained",onClick:E,disabled:e.loadingApprove,children:[e.loadingApprove?t.jsx(L,{size:16,color:"grey"}):null,a("common.approve")]})]}):t.jsx(j,{variant:"outlined",onClick:i,children:a("common.close")}),children:R.map(n=>t.jsx(K,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:n.name,children:n.value},n.name))})}ie.propTypes={ref:J.any};export{de as E,ie as F,Y as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as t,H as o}from"./index-
|
|
1
|
+
import{n as t,H as o}from"./index-CP8e2zcP.js";function i(...e){try{return t(...e)}catch(r){throw o.error("Invalid redirect url"),console.error("Invalid redirect url",r),r}}export{i as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r}from"./index-CP8e2zcP.js";function a(t){return r.Children.toArray(t).filter(e=>r.isValidElement(e))}export{a as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bj as fn}from"./index-
|
|
1
|
+
import{bj as fn}from"./index-CP8e2zcP.js";function En(w,G){for(var _=0;_<G.length;_++){const g=G[_];if(typeof g!="string"&&!Array.isArray(g)){for(const D in g)if(D!=="default"&&!(D in w)){const P=Object.getOwnPropertyDescriptor(g,D);P&&Object.defineProperty(w,D,P.get?P:{enumerable:!0,get:()=>g[D]})}}}return Object.freeze(Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}))}var Z={exports:{}},xe;function mn(){return xe||(xe=1,(function(w,G){(function(_){function g(){var D=_();return D.default||D}w.exports=g()})(function(){var _=Object.defineProperty,g=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,P=Object.prototype.hasOwnProperty,ee=(e,t)=>{for(var n in t)_(e,n,{get:t[n],enumerable:!0})},ke=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of D(t))!P.call(e,i)&&i!==n&&_(e,i,{get:()=>t[i],enumerable:!(r=g(t,i))||r.enumerable});return e},Ce=e=>ke(_({},"__esModule",{value:!0}),e),te={};ee(te,{languages:()=>At,options:()=>gt,parsers:()=>de,printers:()=>dn});var Se=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),be=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Re=Se("replaceAll",function(){if(typeof this=="string")return be}),Y=Re,Le=()=>{},Fe=Le,we="indent",Pe="group",Me="if-break",q="line",Ue="break-parent",Ve=Fe;function N(e){return{type:we,contents:e}}var Be={type:Ue};function y(e,t={}){return Ve(t.expandedStates),{type:Pe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function A(e,t="",n={}){return{type:Me,breakContents:e,flatContents:t,groupId:n.groupId}}function E(e,t){let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var S={type:q},u={type:q,soft:!0},je={type:q,hard:!0},h=[je,Be];function J(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{length:s}=t,l=n;for(;l>=0&&l<s;){let c=t.charAt(l);if(e instanceof RegExp){if(!e.test(c))return l}else if(!e.includes(c))return l;i?l--:l++}return l===-1||l===s?l:!1}}var ne=J(" "),$e=J(",; "),Ke=J(/[^\n\r]/u),ie=e=>e===`
|
|
2
2
|
`||e==="\r"||e==="\u2028"||e==="\u2029";function Ge(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===`
|
|
3
3
|
`)return t-2;if(ie(i))return t-1}else{if(i==="\r"&&e.charAt(t+1)===`
|
|
4
4
|
`)return t+2;if(ie(i))return t+1}return t}var re=Ge;function Ye(e,t,n={}){let r=ne(e,n.backwards?t-1:t,n),i=re(e,r,n);return r!==i}var qe=Ye;function Je(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Qe=Je;function Xe(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Ke(e,t):t}var ze=Xe;function He(e,t){let n=null,r=t;for(;r!==n;)n=r,r=$e(e,r),r=Qe(e,r),r=ne(e,r);return r=ze(e,r),r=re(e,r),r!==!1&&qe(e,r)}var We=He;function Ze(e){return Array.isArray(e)&&e.length>0}var se=Ze,et=class extends Error{name="UnexpectedNodeError";constructor(e,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},tt=et,M=null;function U(e){if(M!==null&&typeof M.property){let t=M;return M=U.prototype=null,t}return M=U.prototype=e??Object.create(null),new U}var nt=10;for(let e=0;e<=nt;e++)U();function it(e){return U(e)}function rt(e,t="type"){it(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var st=rt,at=class{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},ae=class{constructor(e,t,n,r,i,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},oe={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]};new Set(Object.keys(oe));var b;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(b||(b={}));var le={...oe};for(let e of["ArgumentCoordinate","DirectiveArgumentCoordinate","DirectiveCoordinate","MemberCoordinate","TypeCoordinate"])delete le[e];var ot=le,lt=st(ot,"kind"),ct=lt,ce=e=>e.loc.start,ue=e=>e.loc.end,ut="format",pt=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,ht=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u,dt=e=>ht.test(e),ft=e=>pt.test(e),Et=e=>`# @${ut}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./monaco-editor-
|
|
2
|
-
import{e as h,U as v,l as m}from"./monaco-editor-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./monaco-editor-i4E7Erh-.js","./index-CP8e2zcP.js","./index-BLDnEtdF.css","./mouseTarget-DHjy6bBl.js","./index-Bg6xcyjD.js","./index-CWrrTi4L.css","./monaco-editor-C5ZQUaPo.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{e as h,U as v,l as m}from"./monaco-editor-i4E7Erh-.js";import{g as M,a as f,C as r}from"./index-Bg6xcyjD.js";import{G as T}from"./index-CP8e2zcP.js";import"./mouseTarget-DHjy6bBl.js";const x=120*1e3;class F{_defaults;_idleCheckInterval;_lastUsedTime=0;_configChangeListener;_worker=null;_client=null;constructor(e){this._defaults=e,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._configChangeListener=this._defaults.onDidChange(()=>{this._stopWorker()})}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>x&&this._stopWorker()}async _getClient(){if(this._lastUsedTime=Date.now(),!this._client&&!this._worker)try{const{languageId:e,formattingOptions:s,schemas:c,externalFragmentDefinitions:a,completionSettings:l}=this._defaults;this._worker=h.createWebWorker({moduleId:"monaco-graphql/esm/GraphQLWorker.js",label:e,createData:{languageId:e,formattingOptions:s,languageConfig:{schemas:c?.map(M),externalFragmentDefinitions:a,fillLeafsOnComplete:l.__experimental__fillLeafsOnComplete}}}),this._client=this._worker.getProxy()}catch(e){console.error("error loading worker",e)}return this._client}async getLanguageServiceWorker(...e){const s=await this._getClient();return await this._worker.withSyncedResources(e),s}}class b{defaults;_worker;_disposables=[];_listener=Object.create(null);constructor(e,s){this.defaults=e,this._worker=s,this._worker=s;let c;const a=t=>{const d=f(t);if(d!==this.defaults.languageId)return;const g=t.uri.toString(),u=e.diagnosticSettings.validateVariablesJSON?.[g];c=setTimeout(()=>{this._doValidate(t.uri,d,u)},400),this._listener[g]=t.onDidChangeContent(()=>{clearTimeout(c),c=setTimeout(()=>{this._doValidate(t.uri,d,u)},400)})},l=t=>{h.setModelMarkers(t,this.defaults.languageId,[]);const d=t.uri.toString(),g=this._listener[d];g&&(g.dispose(),delete this._listener[d])};this._disposables.push(h.onDidCreateModel(a),{dispose(){clearTimeout(c)}},h.onWillDisposeModel(t=>{l(t)}),h.onDidChangeModelLanguage(t=>{l(t.model),a(t.model)}),{dispose:()=>{for(const t of Object.values(this._listener))t.dispose()}},e.onDidChange(()=>{for(const t of h.getModels())f(t)===this.defaults.languageId&&(l(t),a(t))}));for(const t of h.getModels())f(t)===this.defaults.languageId&&a(t)}dispose(){for(const e of this._disposables)e.dispose();this._disposables=[]}async _doValidate(e,s,c){const a=await this._worker(e);if(!a)return;const l=await a.doValidation(e.toString());if(h.setModelMarkers(h.getModel(e),s,l),c){if(await T(()=>import("./monaco-editor-i4E7Erh-.js").then(p=>p.a),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),!c.length)throw new Error("No variables URI strings provided to validate");const t=await a.doGetVariablesJSONSchema(e.toString());if(!t)return;const d=v.file(c[0].replace(".json","-schema.json")).toString(),g={uri:d,schema:t,fileMatch:c},u=m.json.jsonDefaults.diagnosticsOptions.schemas?.filter(p=>p.uri!==d)||[];m.json.jsonDefaults.setDiagnosticsOptions({schemaValidation:"error",validate:!0,...this.defaults.diagnosticSettings.jsonDiagnosticSettings,schemas:[...u,g],enableSchemaRequest:!1})}}}const i=m.CompletionItemKind,C={[r.Text]:i.Text,[r.Method]:i.Method,[r.Function]:i.Function,[r.Constructor]:i.Constructor,[r.Field]:i.Field,[r.Variable]:i.Variable,[r.Class]:i.Class,[r.Interface]:i.Interface,[r.Module]:i.Module,[r.Property]:i.Property,[r.Unit]:i.Unit,[r.Value]:i.Value,[r.Enum]:i.Enum,[r.Keyword]:i.Keyword,[r.Snippet]:i.Snippet,[r.Color]:i.Color,[r.File]:i.File,[r.Reference]:i.Reference,[r.Folder]:i.Folder,[r.EnumMember]:i.EnumMember,[r.Constant]:i.Constant,[r.Struct]:i.Struct,[r.Event]:i.Event,[r.Operator]:i.Operator,[r.TypeParameter]:i.TypeParameter};function E(o){return o in C?C[o]:i.Text}function O(o){return{range:o.range,kind:E(o.kind),label:o.label,insertText:o.insertText??o.label,insertTextRules:o.insertText?m.CompletionItemInsertTextRule.InsertAsSnippet:void 0,sortText:o.sortText,filterText:o.filterText,documentation:o.documentation,detail:o.detail,command:o.command}}class L{_worker;constructor(e){this._worker=e,this._worker=e}get triggerCharacters(){return[":","$"," ","(","@"]}async provideCompletionItems(e,s,c,a){try{return{incomplete:!0,suggestions:(await(await this._worker(e.uri)).doComplete(e.uri.toString(),s)).map(O)}}catch(l){return console.error("Error fetching completion items",l),{suggestions:[]}}}}class P{_worker;constructor(e){this._worker=e,this._worker=e}async provideDocumentFormattingEdits(e,s,c){const l=await(await this._worker(e.uri)).doFormat(e.uri.toString());return l?[{range:e.getFullModelRange(),text:l}]:[]}}class V{_worker;constructor(e){this._worker=e}async provideHover(e,s,c){const a=e.uri,t=await(await this._worker(e.uri)).doHover(a.toString(),s);return t?{range:t.range,contents:[{value:t.content}]}:{contents:[]}}dispose(){}}function A(o){const e=[],s=[],c=new F(o);e.push(c);const a=(...n)=>{try{return c.getLanguageServiceWorker(...n)}catch{throw new Error("Error fetching graphql language service worker")}};function l(){const{modeConfiguration:n,languageId:_}=o;n.documentFormattingEdits&&s.push(m.registerDocumentFormattingEditProvider(_,new P(a)))}function t(n){const{modeConfiguration:_,languageId:w}=o;S(s),_.completionItems&&s.push(m.registerCompletionItemProvider(w,new L(a))),_.diagnostics&&s.push(new b(n,a)),_.hovers&&s.push(m.registerHoverProvider(w,new V(a))),l()}let{modeConfiguration:d,formattingOptions:g,diagnosticSettings:u,externalFragmentDefinitions:p,schemas:k}=o;return t(o),o.onDidChange(n=>{n.modeConfiguration!==d&&(d=n.modeConfiguration,t(n)),n.formattingOptions!==g&&(g=n.formattingOptions,l()),n.externalFragmentDefinitions!==p&&(p=n.externalFragmentDefinitions,t(n)),n.diagnosticSettings!==u&&(u=n.diagnosticSettings,t(n)),n.schemas!==k&&(k=n.schemas,t(n))}),e.push(I(s)),I(e)}function I(o){return{dispose:()=>S(o)}}function S(o){for(;o.length;)o.pop().dispose()}export{A as setupMode};
|