@abtnode/webapp 1.16.45-beta-20250618-073451-6e48fb62 → 1.16.45-beta-20250624-134945-a23c15fc

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.
Files changed (232) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-Cf6af3xk.js → AdapterDayjs-cf9EXlHB.js} +1 -1
  4. package/dist/assets/{Add-BFsFN1Gy.js → Add-ClzfE4cH.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-CejcJzkX.js → ArrowDropDown-CJ2MJgn5.js} +1 -1
  6. package/dist/assets/{Autocomplete-PeF181FR.js → Autocomplete-CayznxGz.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-B6YSRzTf.js → Breadcrumbs-C9QQGBOd.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BzAT8pGA.js → ButtonGroup-B3J8Qdyl.js} +1 -1
  9. package/dist/assets/{CSSTransition-Byi2ne4y.js → CSSTransition-Cz8SmnJv.js} +1 -1
  10. package/dist/assets/{CallMerge-CaTZFXVq.js → CallMerge-B6RVJ3nX.js} +1 -1
  11. package/dist/assets/{CardContent-Dk0Md6L4.js → CardContent-Cg4RjHpv.js} +1 -1
  12. package/dist/assets/{ChevronLeft-CDs40tmH.js → ChevronLeft-BNmKlc1J.js} +1 -1
  13. package/dist/assets/{ChevronRight-CFfmouwT.js → ChevronRight-DRPUyxAK.js} +1 -1
  14. package/dist/assets/{Clear-CmPKgcDo.js → Clear-C1AC1AtD.js} +1 -1
  15. package/dist/assets/{Close-C8GsrnLa.js → Close-DRWGcKKl.js} +1 -1
  16. package/dist/assets/{Community-D1NMDj2P.js → Community-BPBk9hGT.js} +1 -1
  17. package/dist/assets/{Delete-CiU1bEBu.js → Delete-CcdfJXTL.js} +1 -1
  18. package/dist/assets/{DeleteOutline-reI_idEa.js → DeleteOutline-US18RBQ-.js} +1 -1
  19. package/dist/assets/{Done-BFMi5HXU.js → Done-DoaEDHCG.js} +1 -1
  20. package/dist/assets/{Edit-BvogU5l2.js → Edit-CJQK4atN.js} +1 -1
  21. package/dist/assets/{ErrorOutline-CLZmnhnI.js → ErrorOutline-CR7yRjZc.js} +1 -1
  22. package/dist/assets/{HelpOutline-hZN36iob.js → HelpOutline-DIMDDIpO.js} +1 -1
  23. package/dist/assets/{Holiday-CVr2LMMz.js → Holiday-DwuuABxa.js} +1 -1
  24. package/dist/assets/{Launch-BVKqak_-.js → Launch-CSu1nrjk.js} +1 -1
  25. package/dist/assets/{Link-C4o8Tfyg.js → Link-CBIXUB_y.js} +1 -1
  26. package/dist/assets/{ListItemButton-D2V2qgeT.js → ListItemButton-FKXnIc0i.js} +1 -1
  27. package/dist/assets/{ListSubheader-BSK-B-Hs.js → ListSubheader-Cawr8223.js} +1 -1
  28. package/dist/assets/{LoadingButton-VMcNYQ8q.js → LoadingButton-CRKt-OT1.js} +1 -1
  29. package/dist/assets/{LockIcon-C58tNgx9.js → LockIcon-CnYrREef.js} +1 -1
  30. package/dist/assets/{Meeting-ocx742Wk.js → Meeting-COxcunCf.js} +1 -1
  31. package/dist/assets/{MoreHoriz-CPdB-acW.js → MoreHoriz-JIt9gEw_.js} +1 -1
  32. package/dist/assets/{MoreVert-BZT8paNd.js → MoreVert-CjjkmApl.js} +1 -1
  33. package/dist/assets/{OffSick-a8D-sUdt.js → OffSick-Dlf0wRCP.js} +1 -1
  34. package/dist/assets/{OpenInNew-DJsi1NWq.js → OpenInNew-D-RnzHyt.js} +1 -1
  35. package/dist/assets/{Public-DSbGTo8s.js → Public-DQrPVGw9.js} +1 -1
  36. package/dist/assets/{Refresh-BK_aBn8t.js → Refresh-g_ze8RC-.js} +1 -1
  37. package/dist/assets/{SchemaReference.es-BYITplvj.js → SchemaReference.es-Bs4TGph_.js} +1 -1
  38. package/dist/assets/{Search-DGRuo7t-.js → Search-DmfQzntI.js} +1 -1
  39. package/dist/assets/{Slider-CS-gjd3v.js → Slider-C7KUHAl4.js} +1 -1
  40. package/dist/assets/{Stepper-ZCO4EB3o.js → Stepper-ECw_WCHI.js} +1 -1
  41. package/dist/assets/{Switch-CG3jQlg3.js → Switch-D1aSf0Rk.js} +1 -1
  42. package/dist/assets/{TableRow-Cyof88VP.js → TableRow-CL8yhyVQ.js} +1 -1
  43. package/dist/assets/{TableSearch-CxutcmoF.js → TableSearch-CxUE73Wm.js} +1 -1
  44. package/dist/assets/{ToggleButtonGroup-Dldk8U9s.js → ToggleButtonGroup-BADZ1hmi.js} +1 -1
  45. package/dist/assets/{Verified-DVQjMky2.js → Verified-CoaucJDJ.js} +1 -1
  46. package/dist/assets/{VerifiedUser-350MitWy.js → VerifiedUser-CGiTKpYb.js} +1 -1
  47. package/dist/assets/{ViewColumn-BSxTQVZ-.js → ViewColumn-DVO6c2uh.js} +1 -1
  48. package/dist/assets/{ViewList-BEu0UPsS.js → ViewList-CaLfZh_J.js} +1 -1
  49. package/dist/assets/{WorkingRemotely-BEw6X98n.js → WorkingRemotely-CIlCJe_n.js} +1 -1
  50. package/dist/assets/{_createAggregator-Djv2-ovu.js → _createAggregator-DKh4oPcE.js} +1 -1
  51. package/dist/assets/{actions-LyrEo_Cb.js → actions-D0cYymRM.js} +1 -1
  52. package/dist/assets/{actions-DNqu-9QQ.js → actions-DMblPsrA.js} +1 -1
  53. package/dist/assets/{agreement-Cc4wdZqi.js → agreement-CmpcKfmG.js} +1 -1
  54. package/dist/assets/api-D8CXYVbD.js +1 -0
  55. package/dist/assets/{appearance-BkddHlmf.js → appearance-CC06pu2W.js} +1 -1
  56. package/dist/assets/ar-BN95HEFs.js +7 -0
  57. package/dist/assets/{audit-logs-EkgBhSvA.js → audit-logs-D9nHuKQm.js} +1 -1
  58. package/dist/assets/{base-chart-C63mtC4Z.js → base-chart-DHzZnb2L.js} +1 -1
  59. package/dist/assets/{blocklet-BzkaFDNW.js → blocklet-C56CLqfn.js} +1 -1
  60. package/dist/assets/{brace-fold.es-CyCMNzH4.js → brace-fold.es-WYquVZ0Q.js} +1 -1
  61. package/dist/assets/{chain-DJhIX7OW.js → chain-DKfcWWlC.js} +1 -1
  62. package/dist/assets/{click-to-copy-CYaDSQoy.js → click-to-copy-CiS9u8Lz.js} +1 -1
  63. package/dist/assets/cloneDeep-fDhnQcTQ.js +1 -0
  64. package/dist/assets/{closebrackets.es-DvIy3kAL.js → closebrackets.es-BTFbO_zS.js} +1 -1
  65. package/dist/assets/{codemirror.es-BtJVhvPq.js → codemirror.es-bTfvwT0x.js} +1 -1
  66. package/dist/assets/{collapse-BhbkfN99.js → collapse-De1M4hZU.js} +1 -1
  67. package/dist/assets/{comment.es-BWJma_ss.js → comment.es-CfIJpCF-.js} +1 -1
  68. package/dist/assets/{config-navigation-DfmuKS6F.js → config-navigation-NKWvqO8O.js} +3 -3
  69. package/dist/assets/{connect-to-CorUs381.js → connect-to-B4CwZqBJ.js} +1 -1
  70. package/dist/assets/de-BmXl3Jnb.js +7 -0
  71. package/dist/assets/{delete-confirm-D2071wW2.js → delete-confirm-Ca6B5KxO.js} +1 -1
  72. package/dist/assets/{detail-BgptcQe2.js → detail-B0kwpZJg.js} +3 -3
  73. package/dist/assets/{dialog.es-DNRuZxpL.js → dialog.es-b4YsH3yO.js} +1 -1
  74. package/dist/assets/{domains-Dw6WVrfK.js → domains-DfM0llnu.js} +1 -1
  75. package/dist/assets/{download-mU0RETFZ.js → download-D2RXPhXc.js} +1 -1
  76. package/dist/assets/emotion-react.browser.esm-CyqIkV2y.js +1 -0
  77. package/dist/assets/es-C0fHeuzj.js +9 -0
  78. package/dist/assets/{foldgutter.es-BfaddajE.js → foldgutter.es-Bmzc1lAn.js} +1 -1
  79. package/dist/assets/fr-CO0NFjy0.js +7 -0
  80. package/dist/assets/{get-safe-url-COP_ZxQz.js → get-safe-url-Dsy-huUv.js} +1 -1
  81. package/dist/assets/{get-safe-url-DS1bGOO2.js → get-safe-url-DuYpuHQJ.js} +1 -1
  82. package/dist/assets/getValidReactChildren-BhCPp8PX.js +1 -0
  83. package/dist/assets/hi-Cms3dwY-.js +5 -0
  84. package/dist/assets/{hint.es-DhVyUt1d.js → hint.es-D3enHBIe.js} +1 -1
  85. package/dist/assets/{hint.es2-uDqXrloM.js → hint.es2-D_8pEhNZ.js} +1 -1
  86. package/dist/assets/id-Bo8dj7EE.js +7 -0
  87. package/dist/assets/{iframe-D-LcA3MK.js → iframe-JzwQis4I.js} +1 -1
  88. package/dist/assets/{index-CdU6oLkY.js → index--aogETCe.js} +1 -1
  89. package/dist/assets/{index-DOsDgrew.js → index-1fDaH0GR.js} +3 -3
  90. package/dist/assets/{index-oBJqRsld.js → index-8TfE60DJ.js} +1 -1
  91. package/dist/assets/{index-qfTOhIhQ.js → index-B8Ac-C82.js} +1 -1
  92. package/dist/assets/{index-C0dOEsU4.js → index-BOaWHm3y.js} +1 -1
  93. package/dist/assets/{index-B0UMNJnN.js → index-BR_N19sK.js} +1 -1
  94. package/dist/assets/{index-BhAPLn1b.js → index-BVHtC5Hk.js} +1 -1
  95. package/dist/assets/{index-DbTX57bM.js → index-BcLnPbZ_.js} +1 -1
  96. package/dist/assets/index-Bmgy-F8w.js +550 -0
  97. package/dist/assets/{index-CeNoqA4g.js → index-Bp85PVE7.js} +1 -1
  98. package/dist/assets/{index-DU-OQYbG.js → index-Br9fC4wn.js} +1 -1
  99. package/dist/assets/{index-B8IA5mbU.js → index-BsTEuRio.js} +6 -6
  100. package/dist/assets/{index-QU1qCf8F.js → index-Bv0UYgtN.js} +1 -1
  101. package/dist/assets/{index-B-SlNWYL.js → index-BwtBZueg.js} +1 -1
  102. package/dist/assets/{index-CZ5-hnEn.js → index-C-gpDEaK.js} +1 -1
  103. package/dist/assets/{index-BIgkt_q9.js → index-C-wwh49Y.js} +1 -1
  104. package/dist/assets/{index-BZMWcUCX.js → index-C40_ZUH_.js} +1 -1
  105. package/dist/assets/{index-Cb3Huyfb.js → index-CEkzM2Hy.js} +1 -1
  106. package/dist/assets/{index-DUIS5TWY.js → index-CEwaV1Oe.js} +1 -1
  107. package/dist/assets/{index-oc5ucOuy.js → index-CHr_TiKg.js} +1 -1
  108. package/dist/assets/{index-DVrUurys.js → index-CPkjKWDT.js} +1 -1
  109. package/dist/assets/{index-C9oR1oH6.js → index-CUf9smnR.js} +1 -1
  110. package/dist/assets/{index-czhxiIDF.js → index-CbpkZm_D.js} +1 -1
  111. package/dist/assets/{index-BcbNijWK.js → index-Ci6qo3N4.js} +1 -1
  112. package/dist/assets/{index-CCINW9gm.js → index-CuCDUbks.js} +3 -3
  113. package/dist/assets/{index-C9buY914.js → index-D651LXXD.js} +1 -1
  114. package/dist/assets/{index-CFkoE5Gw.js → index-DJfwuANq.js} +1 -1
  115. package/dist/assets/{index-C5ZlPR3p.js → index-DPPR0A8j.js} +5 -5
  116. package/dist/assets/{index-Cy666DOY.js → index-DdKwcnDa.js} +1 -1
  117. package/dist/assets/{index-P1DlwKGv.js → index-Diry1rOC.js} +1 -1
  118. package/dist/assets/{index-fHnSssqp.js → index-DmqHgbIB.js} +1 -1
  119. package/dist/assets/index-DqZUR6e0.js +120 -0
  120. package/dist/assets/index-DtQb3yWv.js +1 -0
  121. package/dist/assets/{index-rZ1SBrH_.js → index-DuyB74pI.js} +1 -1
  122. package/dist/assets/{index-zsz18EZU.js → index-Dy6Ndspk.js} +1 -1
  123. package/dist/assets/{index-4aFZazff.js → index-DzIW7WPn.js} +1 -1
  124. package/dist/assets/{index-BRvaeUvs.js → index-QAr8nKeC.js} +3 -3
  125. package/dist/assets/{index-BblGFvvF.js → index-Xeh4Hy1K.js} +1 -1
  126. package/dist/assets/{index-BJQjXoNM.js → index-YHRJ5Z9D.js} +1 -1
  127. package/dist/assets/{index-LcQ1y9fq.js → index-f3wryxsZ.js} +1 -1
  128. package/dist/assets/{index-5OOYkflw.js → index-hpqdONWL.js} +1 -1
  129. package/dist/assets/{index-CW7SH6ZA.js → index-mJjX2o0I.js} +1 -1
  130. package/dist/assets/{index-CHPEHw0Y.js → index-mWC0dxsG.js} +1 -1
  131. package/dist/assets/{index-BOH-YtOs.js → index-p0Tn5q9W.js} +1 -1
  132. package/dist/assets/{index-BkRO05--.js → index-pLwCyBIW.js} +1 -1
  133. package/dist/assets/{index-D6ARqm6f.js → index-qPfSbb8F.js} +1 -1
  134. package/dist/assets/{index-DNITJyFR.js → index-uhXfBcTY.js} +1 -1
  135. package/dist/assets/{index.esm-F8b32K2k.js → index.esm-BeKnx9US.js} +1 -1
  136. package/dist/assets/{info-addon.es-CPDzNYQ-.js → info-addon.es-DcDBZCZ9.js} +1 -1
  137. package/dist/assets/{info.es-B-z85utp.js → info.es-CMDl0oHG.js} +1 -1
  138. package/dist/assets/{install-from-url-BNqF6NV-.js → install-from-url-T6jdS-sd.js} +1 -1
  139. package/dist/assets/{invitation-qmFlHZV_.js → invitation-BQpAoUra.js} +1 -1
  140. package/dist/assets/is-path-prefix-equal-DAINokq6.js +1 -0
  141. package/dist/assets/{item-DuGkpxdL.js → item-zzpJhUAv.js} +1 -1
  142. package/dist/assets/ja-zaAhH8mE.js +9 -0
  143. package/dist/assets/{javascript.es-DwEw3iuE.js → javascript.es-rVaecCeY.js} +1 -1
  144. package/dist/assets/{jump-to-line.es-BaO-Qct6.js → jump-to-line.es-fZd9SPeK.js} +1 -1
  145. package/dist/assets/{jump.es-DEVhkMqg.js → jump.es-C2i0yVn0.js} +1 -1
  146. package/dist/assets/ko-CoZQ7a7T.js +9 -0
  147. package/dist/assets/{lint.es-DNf7-y3f.js → lint.es-T7Eyo8Ee.js} +1 -1
  148. package/dist/assets/{lint.es2-CkGacl6V.js → lint.es2-D9w-DqTv.js} +1 -1
  149. package/dist/assets/{lint.es3-ddr9rdgz.js → lint.es3-BR3fJTRU.js} +1 -1
  150. package/dist/assets/{list-header-DL9A5VcR.js → list-header-BHP30ooa.js} +1 -1
  151. package/dist/assets/{log-JH4lXNVE.js → log-BPS1ovHk.js} +1 -1
  152. package/dist/assets/{lottie-react.esm-Dr-WheMr.js → lottie-react.esm-BHwF6ttF.js} +1 -1
  153. package/dist/assets/{matchbrackets.es-XuVMbpLz.js → matchbrackets.es-B45wj5E9.js} +1 -1
  154. package/dist/assets/{memory-C_p3X92I.js → memory-CNHjW2ab.js} +1 -1
  155. package/dist/assets/{metric-CB_GPXBA.js → metric-BcRet1lX.js} +1 -1
  156. package/dist/assets/{mode.es-Dqrxjy1v.js → mode.es-BLJK3yl5.js} +1 -1
  157. package/dist/assets/{mode.es2-VNAXkQps.js → mode.es2-hlIytxg7.js} +1 -1
  158. package/dist/assets/{mode.es3-BN6h3Bus.js → mode.es3-CVTYL_Rp.js} +1 -1
  159. package/dist/assets/omit-Difyap46.js +1 -0
  160. package/dist/assets/{onlineParser.es-D4el_PBT.js → onlineParser.es-D7LXCAe9.js} +1 -1
  161. package/dist/assets/{overview-BXzzQmbs.js → overview-Dl1-aEub.js} +1 -1
  162. package/dist/assets/{permission-JEjDz9i9.js → permission-syQYMJDU.js} +1 -1
  163. package/dist/assets/{preference-QWJp9UJS.js → preference-Bjp0l-rP.js} +3 -3
  164. package/dist/assets/pt-D4wJ-rZD.js +5 -0
  165. package/dist/assets/{raf-schd.esm-D-4-98oh.js → raf-schd.esm-D4X3rkFT.js} +1 -1
  166. package/dist/assets/refType-Bi7lNIS6.js +1 -0
  167. package/dist/assets/{resource-dialog-BSxf3l0v.js → resource-dialog-Bj4Rm8z8.js} +4 -4
  168. package/dist/assets/ru-CmWrzb7M.js +5 -0
  169. package/dist/assets/{runtime-DFh8uNkc.js → runtime-DHGpU07w.js} +1 -1
  170. package/dist/assets/sdk--zV5g1Ng.js +1 -0
  171. package/dist/assets/{search.es-CvgIaw00.js → search.es-DEh8WYav.js} +1 -1
  172. package/dist/assets/{searchcursor.es-OCU4Stl-.js → searchcursor.es-BHK3Udfj.js} +1 -1
  173. package/dist/assets/{service-C2aUE-9d.js → service-BLsXGeBF.js} +1 -1
  174. package/dist/assets/{shorten-label-DEXH98Sk.js → shorten-label-rkbgI37z.js} +1 -1
  175. package/dist/assets/{show-hint.es-Ddp99Kzq.js → show-hint.es-TLn5XERt.js} +1 -1
  176. package/dist/assets/{simple-select-DtUilbs1.js → simple-select-CqR13Ja_.js} +1 -1
  177. package/dist/assets/{spaces-C01mORkW.js → spaces-DLzKX3Ra.js} +1 -1
  178. package/dist/assets/{status-DaQfjPiw.js → status-CtyoZCac.js} +1 -1
  179. package/dist/assets/{status-DwmHBBa8.js → status-CyZk73aw.js} +1 -1
  180. package/dist/assets/{sublime.es-D01aXBye.js → sublime.es-B7ROfjSt.js} +1 -1
  181. package/dist/assets/{switch-control-BUF_yGeD.js → switch-control-DRItWC8V.js} +1 -1
  182. package/dist/assets/{table-icons-C5qrNAvA.js → table-icons-CN1Rmj7L.js} +1 -1
  183. package/dist/assets/{team-BcbX_cMl.js → team-7oU1sdtL.js} +1 -1
  184. package/dist/assets/th-DkqBkRH_.js +5 -0
  185. package/dist/assets/{toLower-GSZ9DJJ3.js → toLower-BetQNSka.js} +1 -1
  186. package/dist/assets/toUpper-CnLEnHph.js +1 -0
  187. package/dist/assets/{traffic-CTPgH40k.js → traffic-BXrg_wx7.js} +1 -1
  188. package/dist/assets/{url-evaluation-DmRIkzYe.js → url-evaluation-PNUzVXFG.js} +1 -1
  189. package/dist/assets/{url-join-BSWLYThb.js → url-join-BT4uwgMW.js} +1 -1
  190. package/dist/assets/{use-mobile-DU80Jj4U.js → use-mobile-DaylDy56.js} +1 -1
  191. package/dist/assets/{use-mobile-DxY5BxAJ.js → use-mobile-zJMHEWPE.js} +1 -1
  192. package/dist/assets/{useAsync-Ct1xKput.js → useAsync-8QQYXZ2o.js} +1 -1
  193. package/dist/assets/{useAsyncRetry-Bis_hMS7.js → useAsyncRetry-CGk8Cu9u.js} +1 -1
  194. package/dist/assets/{useLocalStorage-CRy7LFYG.js → useLocalStorage-DdJoK4w7.js} +1 -1
  195. package/dist/assets/{useThemeProps-C3mE_-3Z.js → useThemeProps-Rte_NmVE.js} +1 -1
  196. package/dist/assets/{util-Ctz_J-u1.js → util-DlhHM2MK.js} +1 -1
  197. package/dist/assets/vi-D4Y0EZ10.js +5 -0
  198. package/dist/assets/{wait-container-Der-CqPb.js → wait-container-BPSvZhQ4.js} +1 -1
  199. package/dist/assets/{withStyles-DWhl0Lx-.js → withStyles-D2YScWal.js} +1 -1
  200. package/dist/assets/{without-wallet-Bmmbgqin.js → without-wallet-CXyXy2KB.js} +1 -1
  201. package/dist/assets/wrap-locale-kaXbWMUB.js +1 -0
  202. package/dist/assets/{zh-DJTjvgj8.js → zh-CXbCDXZ8.js} +1 -1
  203. package/dist/assets/zh-tw-DaTNZcVC.js +9 -0
  204. package/dist/index.html +1 -1
  205. package/dist/service-worker.js +1 -1
  206. package/package.json +1 -1
  207. package/dist/assets/api-CSrxJE-w.js +0 -1
  208. package/dist/assets/ar-DLXKKOGO.js +0 -7
  209. package/dist/assets/cloneDeep-C6XYSA9m.js +0 -1
  210. package/dist/assets/de-CnbmrteH.js +0 -7
  211. package/dist/assets/emotion-react.browser.esm-CSjORkdU.js +0 -1
  212. package/dist/assets/es-C7oXJBWv.js +0 -9
  213. package/dist/assets/fr-DzleTcLj.js +0 -7
  214. package/dist/assets/getValidReactChildren-CxwCdnNW.js +0 -1
  215. package/dist/assets/hi-B24wH0bs.js +0 -5
  216. package/dist/assets/id-BIjW1vW9.js +0 -7
  217. package/dist/assets/index-DCo8_mUx.js +0 -1
  218. package/dist/assets/index-DrxRISPM.js +0 -120
  219. package/dist/assets/index-Dyvb9fH4.js +0 -521
  220. package/dist/assets/is-path-prefix-equal-lgGkNkcR.js +0 -1
  221. package/dist/assets/ja-mu0bc5Fx.js +0 -9
  222. package/dist/assets/ko-CSWdQF8q.js +0 -9
  223. package/dist/assets/omit-Bc4_KMtF.js +0 -1
  224. package/dist/assets/pt-Odg8daEV.js +0 -5
  225. package/dist/assets/refType-Dqlqmha-.js +0 -1
  226. package/dist/assets/ru-OkiNIvy3.js +0 -5
  227. package/dist/assets/sdk-DtMj7H7_.js +0 -1
  228. package/dist/assets/th-esLoaeiE.js +0 -5
  229. package/dist/assets/toUpper-BPMwwnP-.js +0 -1
  230. package/dist/assets/vi-BF6u6-98.js +0 -5
  231. package/dist/assets/wrap-locale-rE7v3anU.js +0 -1
  232. package/dist/assets/zh-tw-B7cFexwg.js +0 -9
@@ -1,4 +1,4 @@
1
- import{bm as Vn,aQ as qn,aR as Jn,j as G,n as Qn,r as et,a1 as nt,d9 as tt,dq as st,g3 as ce}from"./index-B8IA5mbU.js";function dn(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(n=>{const t=e[n],s=typeof t;(s==="object"||s==="function")&&!Object.isFrozen(t)&&dn(t)}),e}class Qe{constructor(n){n.data===void 0&&(n.data={}),this.data=n.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function En(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ae(e,...n){const t=Object.create(null);for(const s in e)t[s]=e[s];return n.forEach(function(s){for(const b in s)t[b]=s[b]}),t}const at="</span>",en=e=>!!e.scope,it=(e,{prefix:n})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const t=e.split(".");return[`${n}${t.shift()}`,...t.map((s,b)=>`${s}${"_".repeat(b+1)}`)].join(" ")}return`${n}${e}`};class rt{constructor(n,t){this.buffer="",this.classPrefix=t.classPrefix,n.walk(this)}addText(n){this.buffer+=En(n)}openNode(n){if(!en(n))return;const t=it(n.scope,{prefix:this.classPrefix});this.span(t)}closeNode(n){en(n)&&(this.buffer+=at)}value(){return this.buffer}span(n){this.buffer+=`<span class="${n}">`}}const nn=(e={})=>{const n={children:[]};return Object.assign(n,e),n};class ze{constructor(){this.rootNode=nn(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(n){this.top.children.push(n)}openNode(n){const t=nn({scope:n});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(n){return this.constructor._walk(n,this.rootNode)}static _walk(n,t){return typeof t=="string"?n.addText(t):t.children&&(n.openNode(t),t.children.forEach(s=>this._walk(n,s)),n.closeNode(t)),n}static _collapse(n){typeof n!="string"&&n.children&&(n.children.every(t=>typeof t=="string")?n.children=[n.children.join("")]:n.children.forEach(t=>{ze._collapse(t)}))}}class ct extends ze{constructor(n){super(),this.options=n}addText(n){n!==""&&this.add(n)}startScope(n){this.openNode(n)}endScope(){this.closeNode()}__addSublanguage(n,t){const s=n.root;t&&(s.scope=`language:${t}`),this.add(s)}toHTML(){return new rt(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function pe(e){return e?typeof e=="string"?e:e.source:null}function bn(e){return le("(?=",e,")")}function ot(e){return le("(?:",e,")*")}function lt(e){return le("(?:",e,")?")}function le(...e){return e.map(t=>pe(t)).join("")}function ut(e){const n=e[e.length-1];return typeof n=="object"&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function We(...e){return"("+(ut(e).capture?"":"?:")+e.map(s=>pe(s)).join("|")+")"}function fn(e){return new RegExp(e.toString()+"|").exec("").length-1}function gt(e,n){const t=e&&e.exec(n);return t&&t.index===0}const dt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ze(e,{joinWith:n}){let t=0;return e.map(s=>{t+=1;const b=t;let f=pe(s),i="";for(;f.length>0;){const a=dt.exec(f);if(!a){i+=f;break}i+=f.substring(0,a.index),f=f.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?i+="\\"+String(Number(a[1])+b):(i+=a[0],a[0]==="("&&t++)}return i}).map(s=>`(${s})`).join(n)}const Et=/\b\B/,_n="[a-zA-Z]\\w*",Ye="[a-zA-Z_]\\w*",pn="\\b\\d+(\\.\\d+)?",Nn="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",hn="\\b(0b[01]+)",bt="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ft=(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=le(n,/.*\b/,e.binary,/\b.*/)),ae({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(t,s)=>{t.index!==0&&s.ignoreMatch()}},e)},Ne={begin:"\\\\[\\s\\S]",relevance:0},_t={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ne]},pt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ne]},Nt={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Le=function(e,n,t={}){const s=ae({scope:"comment",begin:e,end:n,contains:[]},t);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const b=We("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:le(/[ ]+/,"(",b,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},ht=Le("//","$"),St=Le("/\\*","\\*/"),mt=Le("#","$"),At={scope:"number",begin:pn,relevance:0},Rt={scope:"number",begin:Nn,relevance:0},Tt={scope:"number",begin:hn,relevance:0},yt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ne,{begin:/\[/,end:/\]/,relevance:0,contains:[Ne]}]},Ot={scope:"title",begin:_n,relevance:0},It={scope:"title",begin:Ye,relevance:0},Mt={begin:"\\.\\s*"+Ye,relevance:0},Ct=function(e){return Object.assign(e,{"on:begin":(n,t)=>{t.data._beginMatch=n[1]},"on:end":(n,t)=>{t.data._beginMatch!==n[1]&&t.ignoreMatch()}})};var Ae=Object.freeze({__proto__:null,APOS_STRING_MODE:_t,BACKSLASH_ESCAPE:Ne,BINARY_NUMBER_MODE:Tt,BINARY_NUMBER_RE:hn,COMMENT:Le,C_BLOCK_COMMENT_MODE:St,C_LINE_COMMENT_MODE:ht,C_NUMBER_MODE:Rt,C_NUMBER_RE:Nn,END_SAME_AS_BEGIN:Ct,HASH_COMMENT_MODE:mt,IDENT_RE:_n,MATCH_NOTHING_RE:Et,METHOD_GUARD:Mt,NUMBER_MODE:At,NUMBER_RE:pn,PHRASAL_WORDS_MODE:Nt,QUOTE_STRING_MODE:pt,REGEXP_MODE:yt,RE_STARTERS_RE:bt,SHEBANG:ft,TITLE_MODE:Ot,UNDERSCORE_IDENT_RE:Ye,UNDERSCORE_TITLE_MODE:It});function wt(e,n){e.input[e.index-1]==="."&&n.ignoreMatch()}function Lt(e,n){e.className!==void 0&&(e.scope=e.className,delete e.className)}function xt(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=wt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function vt(e,n){Array.isArray(e.illegal)&&(e.illegal=We(...e.illegal))}function Dt(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Bt(e,n){e.relevance===void 0&&(e.relevance=1)}const kt=(e,n)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},e);Object.keys(e).forEach(s=>{delete e[s]}),e.keywords=t.keywords,e.begin=le(t.beforeMatch,bn(t.begin)),e.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},e.relevance=0,delete t.beforeMatch},$t=["of","and","for","in","not","or","if","then","parent","list","value"],Ut="keyword";function Sn(e,n,t=Ut){const s=Object.create(null);return typeof e=="string"?b(t,e.split(" ")):Array.isArray(e)?b(t,e):Object.keys(e).forEach(function(f){Object.assign(s,Sn(e[f],n,f))}),s;function b(f,i){n&&(i=i.map(a=>a.toLowerCase())),i.forEach(function(a){const c=a.split("|");s[c[0]]=[f,Ft(c[0],c[1])]})}}function Ft(e,n){return n?Number(n):Pt(e)?0:1}function Pt(e){return $t.includes(e.toLowerCase())}const tn={},oe=e=>{console.error(e)},sn=(e,...n)=>{console.log(`WARN: ${e}`,...n)},ge=(e,n)=>{tn[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),tn[`${e}/${n}`]=!0)},Me=new Error;function mn(e,n,{key:t}){let s=0;const b=e[t],f={},i={};for(let a=1;a<=n.length;a++)i[a+s]=b[a],f[a+s]=!0,s+=fn(n[a-1]);e[t]=i,e[t]._emit=f,e[t]._multi=!0}function Kt(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw oe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Me;if(typeof e.beginScope!="object"||e.beginScope===null)throw oe("beginScope must be object"),Me;mn(e,e.begin,{key:"beginScope"}),e.begin=Ze(e.begin,{joinWith:""})}}function Ht(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw oe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Me;if(typeof e.endScope!="object"||e.endScope===null)throw oe("endScope must be object"),Me;mn(e,e.end,{key:"endScope"}),e.end=Ze(e.end,{joinWith:""})}}function Gt(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function zt(e){Gt(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Kt(e),Ht(e)}function Wt(e){function n(i,a){return new RegExp(pe(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,a]),this.matchAt+=fn(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(c=>c[1]);this.matcherRe=n(Ze(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(a);if(!c)return null;const u=c.findIndex((m,_)=>_>0&&m!==void 0),g=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,g)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const c=new t;return this.rules.slice(a).forEach(([u,g])=>c.addRule(u,g)),c.compile(),this.multiRegexes[a]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,c){this.rules.push([a,c]),c.type==="begin"&&this.count++}exec(a){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const g=this.getMatcher(0);g.lastIndex=this.lastIndex+1,u=g.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function b(i){const a=new s;return i.contains.forEach(c=>a.addRule(c.begin,{rule:c,type:"begin"})),i.terminatorEnd&&a.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&a.addRule(i.illegal,{type:"illegal"}),a}function f(i,a){const c=i;if(i.isCompiled)return c;[Lt,Dt,zt,kt].forEach(g=>g(i,a)),e.compilerExtensions.forEach(g=>g(i,a)),i.__beforeBegin=null,[xt,vt,Bt].forEach(g=>g(i,a)),i.isCompiled=!0;let u=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),u=i.keywords.$pattern,delete i.keywords.$pattern),u=u||/\w+/,i.keywords&&(i.keywords=Sn(i.keywords,e.case_insensitive)),c.keywordPatternRe=n(u,!0),a&&(i.begin||(i.begin=/\B|\b/),c.beginRe=n(c.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(c.endRe=n(c.end)),c.terminatorEnd=pe(c.end)||"",i.endsWithParent&&a.terminatorEnd&&(c.terminatorEnd+=(i.end?"|":"")+a.terminatorEnd)),i.illegal&&(c.illegalRe=n(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(g){return Zt(g==="self"?i:g)})),i.contains.forEach(function(g){f(g,c)}),i.starts&&f(i.starts,a),c.matcher=b(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ae(e.classNameAliases||{}),f(e)}function An(e){return e?e.endsWithParent||An(e.starts):!1}function Zt(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(n){return ae(e,{variants:null},n)})),e.cachedVariants?e.cachedVariants:An(e)?ae(e,{starts:e.starts?ae(e.starts):null}):Object.isFrozen(e)?ae(e):e}var Yt="11.10.0";class Xt extends Error{constructor(n,t){super(n),this.name="HTMLInjectionError",this.html=t}}const Pe=En,an=ae,rn=Symbol("nomatch"),jt=7,Rn=function(e){const n=Object.create(null),t=Object.create(null),s=[];let b=!0;const f="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:ct};function c(r){return a.noHighlightRe.test(r)}function u(r){let o=r.className+" ";o+=r.parentNode?r.parentNode.className:"";const E=a.languageDetectRe.exec(o);if(E){const N=D(E[1]);return N||(sn(f.replace("{}",E[1])),sn("Falling back to no-highlight mode for this block.",r)),N?E[1]:"no-highlight"}return o.split(/\s+/).find(N=>c(N)||D(N))}function g(r,o,E){let N="",A="";typeof o=="object"?(N=r,E=o.ignoreIllegals,A=o.language):(ge("10.7.0","highlight(lang, code, ...args) has been deprecated."),ge("10.7.0",`Please use highlight(code, options) instead.
1
+ import{bm as Vn,aQ as qn,aR as Jn,j as G,n as Qn,r as et,a1 as nt,d9 as tt,dq as st,g3 as ce}from"./index-BsTEuRio.js";function dn(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(n=>{const t=e[n],s=typeof t;(s==="object"||s==="function")&&!Object.isFrozen(t)&&dn(t)}),e}class Qe{constructor(n){n.data===void 0&&(n.data={}),this.data=n.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function En(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ae(e,...n){const t=Object.create(null);for(const s in e)t[s]=e[s];return n.forEach(function(s){for(const b in s)t[b]=s[b]}),t}const at="</span>",en=e=>!!e.scope,it=(e,{prefix:n})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const t=e.split(".");return[`${n}${t.shift()}`,...t.map((s,b)=>`${s}${"_".repeat(b+1)}`)].join(" ")}return`${n}${e}`};class rt{constructor(n,t){this.buffer="",this.classPrefix=t.classPrefix,n.walk(this)}addText(n){this.buffer+=En(n)}openNode(n){if(!en(n))return;const t=it(n.scope,{prefix:this.classPrefix});this.span(t)}closeNode(n){en(n)&&(this.buffer+=at)}value(){return this.buffer}span(n){this.buffer+=`<span class="${n}">`}}const nn=(e={})=>{const n={children:[]};return Object.assign(n,e),n};class ze{constructor(){this.rootNode=nn(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(n){this.top.children.push(n)}openNode(n){const t=nn({scope:n});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(n){return this.constructor._walk(n,this.rootNode)}static _walk(n,t){return typeof t=="string"?n.addText(t):t.children&&(n.openNode(t),t.children.forEach(s=>this._walk(n,s)),n.closeNode(t)),n}static _collapse(n){typeof n!="string"&&n.children&&(n.children.every(t=>typeof t=="string")?n.children=[n.children.join("")]:n.children.forEach(t=>{ze._collapse(t)}))}}class ct extends ze{constructor(n){super(),this.options=n}addText(n){n!==""&&this.add(n)}startScope(n){this.openNode(n)}endScope(){this.closeNode()}__addSublanguage(n,t){const s=n.root;t&&(s.scope=`language:${t}`),this.add(s)}toHTML(){return new rt(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function pe(e){return e?typeof e=="string"?e:e.source:null}function bn(e){return le("(?=",e,")")}function ot(e){return le("(?:",e,")*")}function lt(e){return le("(?:",e,")?")}function le(...e){return e.map(t=>pe(t)).join("")}function ut(e){const n=e[e.length-1];return typeof n=="object"&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function We(...e){return"("+(ut(e).capture?"":"?:")+e.map(s=>pe(s)).join("|")+")"}function fn(e){return new RegExp(e.toString()+"|").exec("").length-1}function gt(e,n){const t=e&&e.exec(n);return t&&t.index===0}const dt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ze(e,{joinWith:n}){let t=0;return e.map(s=>{t+=1;const b=t;let f=pe(s),i="";for(;f.length>0;){const a=dt.exec(f);if(!a){i+=f;break}i+=f.substring(0,a.index),f=f.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?i+="\\"+String(Number(a[1])+b):(i+=a[0],a[0]==="("&&t++)}return i}).map(s=>`(${s})`).join(n)}const Et=/\b\B/,_n="[a-zA-Z]\\w*",Ye="[a-zA-Z_]\\w*",pn="\\b\\d+(\\.\\d+)?",Nn="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",hn="\\b(0b[01]+)",bt="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ft=(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=le(n,/.*\b/,e.binary,/\b.*/)),ae({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(t,s)=>{t.index!==0&&s.ignoreMatch()}},e)},Ne={begin:"\\\\[\\s\\S]",relevance:0},_t={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ne]},pt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ne]},Nt={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Le=function(e,n,t={}){const s=ae({scope:"comment",begin:e,end:n,contains:[]},t);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const b=We("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:le(/[ ]+/,"(",b,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},ht=Le("//","$"),St=Le("/\\*","\\*/"),mt=Le("#","$"),At={scope:"number",begin:pn,relevance:0},Rt={scope:"number",begin:Nn,relevance:0},Tt={scope:"number",begin:hn,relevance:0},yt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ne,{begin:/\[/,end:/\]/,relevance:0,contains:[Ne]}]},Ot={scope:"title",begin:_n,relevance:0},It={scope:"title",begin:Ye,relevance:0},Mt={begin:"\\.\\s*"+Ye,relevance:0},Ct=function(e){return Object.assign(e,{"on:begin":(n,t)=>{t.data._beginMatch=n[1]},"on:end":(n,t)=>{t.data._beginMatch!==n[1]&&t.ignoreMatch()}})};var Ae=Object.freeze({__proto__:null,APOS_STRING_MODE:_t,BACKSLASH_ESCAPE:Ne,BINARY_NUMBER_MODE:Tt,BINARY_NUMBER_RE:hn,COMMENT:Le,C_BLOCK_COMMENT_MODE:St,C_LINE_COMMENT_MODE:ht,C_NUMBER_MODE:Rt,C_NUMBER_RE:Nn,END_SAME_AS_BEGIN:Ct,HASH_COMMENT_MODE:mt,IDENT_RE:_n,MATCH_NOTHING_RE:Et,METHOD_GUARD:Mt,NUMBER_MODE:At,NUMBER_RE:pn,PHRASAL_WORDS_MODE:Nt,QUOTE_STRING_MODE:pt,REGEXP_MODE:yt,RE_STARTERS_RE:bt,SHEBANG:ft,TITLE_MODE:Ot,UNDERSCORE_IDENT_RE:Ye,UNDERSCORE_TITLE_MODE:It});function wt(e,n){e.input[e.index-1]==="."&&n.ignoreMatch()}function Lt(e,n){e.className!==void 0&&(e.scope=e.className,delete e.className)}function xt(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=wt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function vt(e,n){Array.isArray(e.illegal)&&(e.illegal=We(...e.illegal))}function Dt(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Bt(e,n){e.relevance===void 0&&(e.relevance=1)}const kt=(e,n)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},e);Object.keys(e).forEach(s=>{delete e[s]}),e.keywords=t.keywords,e.begin=le(t.beforeMatch,bn(t.begin)),e.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},e.relevance=0,delete t.beforeMatch},$t=["of","and","for","in","not","or","if","then","parent","list","value"],Ut="keyword";function Sn(e,n,t=Ut){const s=Object.create(null);return typeof e=="string"?b(t,e.split(" ")):Array.isArray(e)?b(t,e):Object.keys(e).forEach(function(f){Object.assign(s,Sn(e[f],n,f))}),s;function b(f,i){n&&(i=i.map(a=>a.toLowerCase())),i.forEach(function(a){const c=a.split("|");s[c[0]]=[f,Ft(c[0],c[1])]})}}function Ft(e,n){return n?Number(n):Pt(e)?0:1}function Pt(e){return $t.includes(e.toLowerCase())}const tn={},oe=e=>{console.error(e)},sn=(e,...n)=>{console.log(`WARN: ${e}`,...n)},ge=(e,n)=>{tn[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),tn[`${e}/${n}`]=!0)},Me=new Error;function mn(e,n,{key:t}){let s=0;const b=e[t],f={},i={};for(let a=1;a<=n.length;a++)i[a+s]=b[a],f[a+s]=!0,s+=fn(n[a-1]);e[t]=i,e[t]._emit=f,e[t]._multi=!0}function Kt(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw oe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Me;if(typeof e.beginScope!="object"||e.beginScope===null)throw oe("beginScope must be object"),Me;mn(e,e.begin,{key:"beginScope"}),e.begin=Ze(e.begin,{joinWith:""})}}function Ht(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw oe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Me;if(typeof e.endScope!="object"||e.endScope===null)throw oe("endScope must be object"),Me;mn(e,e.end,{key:"endScope"}),e.end=Ze(e.end,{joinWith:""})}}function Gt(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function zt(e){Gt(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Kt(e),Ht(e)}function Wt(e){function n(i,a){return new RegExp(pe(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,a]),this.matchAt+=fn(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(c=>c[1]);this.matcherRe=n(Ze(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(a);if(!c)return null;const u=c.findIndex((m,_)=>_>0&&m!==void 0),g=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,g)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const c=new t;return this.rules.slice(a).forEach(([u,g])=>c.addRule(u,g)),c.compile(),this.multiRegexes[a]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,c){this.rules.push([a,c]),c.type==="begin"&&this.count++}exec(a){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const g=this.getMatcher(0);g.lastIndex=this.lastIndex+1,u=g.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function b(i){const a=new s;return i.contains.forEach(c=>a.addRule(c.begin,{rule:c,type:"begin"})),i.terminatorEnd&&a.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&a.addRule(i.illegal,{type:"illegal"}),a}function f(i,a){const c=i;if(i.isCompiled)return c;[Lt,Dt,zt,kt].forEach(g=>g(i,a)),e.compilerExtensions.forEach(g=>g(i,a)),i.__beforeBegin=null,[xt,vt,Bt].forEach(g=>g(i,a)),i.isCompiled=!0;let u=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),u=i.keywords.$pattern,delete i.keywords.$pattern),u=u||/\w+/,i.keywords&&(i.keywords=Sn(i.keywords,e.case_insensitive)),c.keywordPatternRe=n(u,!0),a&&(i.begin||(i.begin=/\B|\b/),c.beginRe=n(c.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(c.endRe=n(c.end)),c.terminatorEnd=pe(c.end)||"",i.endsWithParent&&a.terminatorEnd&&(c.terminatorEnd+=(i.end?"|":"")+a.terminatorEnd)),i.illegal&&(c.illegalRe=n(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(g){return Zt(g==="self"?i:g)})),i.contains.forEach(function(g){f(g,c)}),i.starts&&f(i.starts,a),c.matcher=b(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ae(e.classNameAliases||{}),f(e)}function An(e){return e?e.endsWithParent||An(e.starts):!1}function Zt(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(n){return ae(e,{variants:null},n)})),e.cachedVariants?e.cachedVariants:An(e)?ae(e,{starts:e.starts?ae(e.starts):null}):Object.isFrozen(e)?ae(e):e}var Yt="11.10.0";class Xt extends Error{constructor(n,t){super(n),this.name="HTMLInjectionError",this.html=t}}const Pe=En,an=ae,rn=Symbol("nomatch"),jt=7,Rn=function(e){const n=Object.create(null),t=Object.create(null),s=[];let b=!0;const f="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:ct};function c(r){return a.noHighlightRe.test(r)}function u(r){let o=r.className+" ";o+=r.parentNode?r.parentNode.className:"";const E=a.languageDetectRe.exec(o);if(E){const N=D(E[1]);return N||(sn(f.replace("{}",E[1])),sn("Falling back to no-highlight mode for this block.",r)),N?E[1]:"no-highlight"}return o.split(/\s+/).find(N=>c(N)||D(N))}function g(r,o,E){let N="",A="";typeof o=="object"?(N=r,E=o.ignoreIllegals,A=o.language):(ge("10.7.0","highlight(lang, code, ...args) has been deprecated."),ge("10.7.0",`Please use highlight(code, options) instead.
2
2
  https://github.com/highlightjs/highlight.js/issues/2277`),A=r,N=o),E===void 0&&(E=!0);const M={code:N,language:A};j("before:highlight",M);const F=M.result?M.result:m(M.language,M.code,E);return F.code=M.code,j("after:highlight",F),F}function m(r,o,E,N){const A=Object.create(null);function M(l,d){return l.keywords[d]}function F(){if(!p.keywords){B.addText(w);return}let l=0;p.keywordPatternRe.lastIndex=0;let d=p.keywordPatternRe.exec(w),h="";for(;d;){h+=w.substring(l,d.index);const T=K.case_insensitive?d[0].toLowerCase():d[0],H=M(p,T);if(H){const[ee,Xn]=H;if(B.addText(h),h="",A[T]=(A[T]||0)+1,A[T]<=jt&&(me+=Xn),ee.startsWith("_"))h+=d[0];else{const jn=K.classNameAliases[ee]||ee;Z(d[0],jn)}}else h+=d[0];l=p.keywordPatternRe.lastIndex,d=p.keywordPatternRe.exec(w)}h+=w.substring(l),B.addText(h)}function ue(){if(w==="")return;let l=null;if(typeof p.subLanguage=="string"){if(!n[p.subLanguage]){B.addText(w);return}l=m(p.subLanguage,w,!0,Je[p.subLanguage]),Je[p.subLanguage]=l._top}else l=S(w,p.subLanguage.length?p.subLanguage:null);p.relevance>0&&(me+=l.relevance),B.__addSublanguage(l._emitter,l.language)}function P(){p.subLanguage!=null?ue():F(),w=""}function Z(l,d){l!==""&&(B.startScope(d),B.addText(l),B.endScope())}function he(l,d){let h=1;const T=d.length-1;for(;h<=T;){if(!l._emit[h]){h++;continue}const H=K.classNameAliases[l[h]]||l[h],ee=d[h];H?Z(ee,H):(w=ee,F(),w=""),h++}}function fe(l,d){return l.scope&&typeof l.scope=="string"&&B.openNode(K.classNameAliases[l.scope]||l.scope),l.beginScope&&(l.beginScope._wrap?(Z(w,K.classNameAliases[l.beginScope._wrap]||l.beginScope._wrap),w=""):l.beginScope._multi&&(he(l.beginScope,d),w="")),p=Object.create(l,{parent:{value:p}}),p}function Se(l,d,h){let T=gt(l.endRe,h);if(T){if(l["on:end"]){const H=new Qe(l);l["on:end"](d,H),H.isMatchIgnored&&(T=!1)}if(T){for(;l.endsParent&&l.parent;)l=l.parent;return l}}if(l.endsWithParent)return Se(l.parent,d,h)}function xe(l){return p.matcher.regexIndex===0?(w+=l[0],1):(Fe=!0,0)}function ve(l){const d=l[0],h=l.rule,T=new Qe(h),H=[h.__beforeBegin,h["on:begin"]];for(const ee of H)if(ee&&(ee(l,T),T.isMatchIgnored))return xe(d);return h.skip?w+=d:(h.excludeBegin&&(w+=d),P(),!h.returnBegin&&!h.excludeBegin&&(w=d)),fe(h,l),h.returnBegin?0:d.length}function De(l){const d=l[0],h=o.substring(l.index),T=Se(p,l,h);if(!T)return rn;const H=p;p.endScope&&p.endScope._wrap?(P(),Z(d,p.endScope._wrap)):p.endScope&&p.endScope._multi?(P(),he(p.endScope,l)):H.skip?w+=d:(H.returnEnd||H.excludeEnd||(w+=d),P(),H.excludeEnd&&(w=d));do p.scope&&B.closeNode(),!p.skip&&!p.subLanguage&&(me+=p.relevance),p=p.parent;while(p!==T.parent);return T.starts&&fe(T.starts,l),H.returnEnd?0:d.length}function Be(){const l=[];for(let d=p;d!==K;d=d.parent)d.scope&&l.unshift(d.scope);l.forEach(d=>B.openNode(d))}let R={};function ie(l,d){const h=d&&d[0];if(w+=l,h==null)return P(),0;if(R.type==="begin"&&d.type==="end"&&R.index===d.index&&h===""){if(w+=o.slice(d.index,d.index+1),!b){const T=new Error(`0 width match regex (${r})`);throw T.languageName=r,T.badRule=R.rule,T}return 1}if(R=d,d.type==="begin")return ve(d);if(d.type==="illegal"&&!E){const T=new Error('Illegal lexeme "'+h+'" for mode "'+(p.scope||"<unnamed>")+'"');throw T.mode=p,T}else if(d.type==="end"){const T=De(d);if(T!==rn)return T}if(d.type==="illegal"&&h==="")return 1;if(Ue>1e5&&Ue>d.index*3)throw new Error("potential infinite loop, way more iterations than matches");return w+=h,h.length}const K=D(r);if(!K)throw oe(f.replace("{}",r)),new Error('Unknown language: "'+r+'"');const ke=Wt(K);let $e="",p=N||ke;const Je={},B=new a.__emitter(a);Be();let w="",me=0,re=0,Ue=0,Fe=!1;try{if(K.__emitTokens)K.__emitTokens(o,B);else{for(p.matcher.considerAll();;){Ue++,Fe?Fe=!1:p.matcher.considerAll(),p.matcher.lastIndex=re;const l=p.matcher.exec(o);if(!l)break;const d=o.substring(re,l.index),h=ie(d,l);re=l.index+h}ie(o.substring(re))}return B.finalize(),$e=B.toHTML(),{language:r,value:$e,relevance:me,illegal:!1,_emitter:B,_top:p}}catch(l){if(l.message&&l.message.includes("Illegal"))return{language:r,value:Pe(o),illegal:!0,relevance:0,_illegalBy:{message:l.message,index:re,context:o.slice(re-100,re+100),mode:l.mode,resultSoFar:$e},_emitter:B};if(b)return{language:r,value:Pe(o),illegal:!1,relevance:0,errorRaised:l,_emitter:B,_top:p};throw l}}function _(r){const o={value:Pe(r),illegal:!1,relevance:0,_top:i,_emitter:new a.__emitter(a)};return o._emitter.addText(r),o}function S(r,o){o=o||a.languages||Object.keys(n);const E=_(r),N=o.filter(D).filter(ne).map(P=>m(P,r,!1));N.unshift(E);const A=N.sort((P,Z)=>{if(P.relevance!==Z.relevance)return Z.relevance-P.relevance;if(P.language&&Z.language){if(D(P.language).supersetOf===Z.language)return 1;if(D(Z.language).supersetOf===P.language)return-1}return 0}),[M,F]=A,ue=M;return ue.secondBest=F,ue}function L(r,o,E){const N=o&&t[o]||E;r.classList.add("hljs"),r.classList.add(`language-${N}`)}function x(r){let o=null;const E=u(r);if(c(E))return;if(j("before:highlightElement",{el:r,language:E}),r.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",r);return}if(r.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(r)),a.throwUnescapedHTML))throw new Xt("One of your code blocks includes unescaped HTML.",r.innerHTML);o=r;const N=o.textContent,A=E?g(N,{language:E,ignoreIllegals:!0}):S(N);r.innerHTML=A.value,r.dataset.highlighted="yes",L(r,E,A.language),r.result={language:A.language,re:A.relevance,relevance:A.relevance},A.secondBest&&(r.secondBest={language:A.secondBest.language,relevance:A.secondBest.relevance}),j("after:highlightElement",{el:r,result:A,text:N})}function C(r){a=an(a,r)}const v=()=>{$(),ge("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function z(){$(),ge("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let k=!1;function $(){if(document.readyState==="loading"){k=!0;return}document.querySelectorAll(a.cssSelector).forEach(x)}function I(){k&&$()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",I,!1);function U(r,o){let E=null;try{E=o(e)}catch(N){if(oe("Language definition for '{}' could not be registered.".replace("{}",r)),b)oe(N);else throw N;E=i}E.name||(E.name=r),n[r]=E,E.rawDefinition=o.bind(null,e),E.aliases&&q(E.aliases,{languageName:r})}function X(r){delete n[r];for(const o of Object.keys(t))t[o]===r&&delete t[o]}function Y(){return Object.keys(n)}function D(r){return r=(r||"").toLowerCase(),n[r]||n[t[r]]}function q(r,{languageName:o}){typeof r=="string"&&(r=[r]),r.forEach(E=>{t[E.toLowerCase()]=o})}function ne(r){const o=D(r);return o&&!o.disableAutodetect}function J(r){r["before:highlightBlock"]&&!r["before:highlightElement"]&&(r["before:highlightElement"]=o=>{r["before:highlightBlock"](Object.assign({block:o.el},o))}),r["after:highlightBlock"]&&!r["after:highlightElement"]&&(r["after:highlightElement"]=o=>{r["after:highlightBlock"](Object.assign({block:o.el},o))})}function te(r){J(r),s.push(r)}function se(r){const o=s.indexOf(r);o!==-1&&s.splice(o,1)}function j(r,o){const E=r;s.forEach(function(N){N[E]&&N[E](o)})}function Q(r){return ge("10.7.0","highlightBlock will be removed entirely in v12.0"),ge("10.7.0","Please use highlightElement now."),x(r)}Object.assign(e,{highlight:g,highlightAuto:S,highlightAll:$,highlightElement:x,highlightBlock:Q,configure:C,initHighlighting:v,initHighlightingOnLoad:z,registerLanguage:U,unregisterLanguage:X,listLanguages:Y,getLanguage:D,registerAliases:q,autoDetection:ne,inherit:an,addPlugin:te,removePlugin:se}),e.debugMode=function(){b=!1},e.safeMode=function(){b=!0},e.versionString=Yt,e.regex={concat:le,lookahead:bn,either:We,optional:lt,anyNumberOfTimes:ot};for(const r in Ae)typeof Ae[r]=="object"&&dn(Ae[r]);return Object.assign(e,Ae),e},be=Rn({});be.newInstance=()=>Rn({});var Vt=be;be.HighlightJS=be;be.default=be;const O=Vn(Vt),cn="[A-Za-z$_][0-9A-Za-z$_]*",qt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Jt=["true","false","null","undefined","NaN","Infinity"],Tn=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],yn=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],On=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Qt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],es=[].concat(On,Tn,yn);function Xe(e){const n=e.regex,t=(o,{after:E})=>{const N="</"+o[0].slice(1);return o.input.indexOf(N,E)!==-1},s=cn,b={begin:"<>",end:"</>"},f=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(o,E)=>{const N=o[0].length+o.index,A=o.input[N];if(A==="<"||A===","){E.ignoreMatch();return}A===">"&&(t(o,{after:N})||E.ignoreMatch());let M;const F=o.input.substring(N);if(M=F.match(/^\s*=/)){E.ignoreMatch();return}if((M=F.match(/^\s+extends\s+/))&&M.index===0){E.ignoreMatch();return}}},a={$pattern:cn,keyword:qt,literal:Jt,built_in:es,"variable.language":Qt},c="[0-9](_?[0-9])*",u=`\\.(${c})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${g})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${g})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},_={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,_],subLanguage:"xml"}},L={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,_],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,_],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,_]},z={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},k=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,S,L,x,C,{match:/\$\d+/},m];_.contains=k.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(k)});const $=[].concat(z,_.contains),I=$.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat($)}]),U={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:I},X={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,n.concat(s,"(",n.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},Y={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Tn,...yn]}},D={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},q={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[U],illegal:/%/},ne={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(o){return n.concat("(?!",o.join("|"),")")}const te={match:n.concat(/\b/,J([...On,"super","import"].map(o=>`${o}\\s*\\(`)),s,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:n.concat(/\./,n.lookahead(n.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},j={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},U]},Q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",r={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(Q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[U]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:Y},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),D,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,S,L,x,C,z,{match:/\$\d+/},m,Y,{className:"attr",begin:s+n.lookahead(":"),relevance:0},r,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[z,e.REGEXP_MODE,{className:"function",begin:Q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:b.begin,end:b.end},{match:f},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[U,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[U]},te,ne,X,j,{match:/\$[(.]/}]}}const Ce="[A-Za-z$_][0-9A-Za-z$_]*",In=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Mn=["true","false","null","undefined","NaN","Infinity"],Cn=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],wn=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ln=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],xn=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],vn=[].concat(Ln,Cn,wn);function ns(e){const n=e.regex,t=(o,{after:E})=>{const N="</"+o[0].slice(1);return o.input.indexOf(N,E)!==-1},s=Ce,b={begin:"<>",end:"</>"},f=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(o,E)=>{const N=o[0].length+o.index,A=o.input[N];if(A==="<"||A===","){E.ignoreMatch();return}A===">"&&(t(o,{after:N})||E.ignoreMatch());let M;const F=o.input.substring(N);if(M=F.match(/^\s*=/)){E.ignoreMatch();return}if((M=F.match(/^\s+extends\s+/))&&M.index===0){E.ignoreMatch();return}}},a={$pattern:Ce,keyword:In,literal:Mn,built_in:vn,"variable.language":xn},c="[0-9](_?[0-9])*",u=`\\.(${c})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${g})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${g})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},_={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},S={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,_],subLanguage:"xml"}},L={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,_],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,_],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,_]},z={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},k=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,S,L,x,C,{match:/\$\d+/},m];_.contains=k.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(k)});const $=[].concat(z,_.contains),I=$.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat($)}]),U={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:I},X={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,n.concat(s,"(",n.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},Y={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Cn,...wn]}},D={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},q={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[U],illegal:/%/},ne={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(o){return n.concat("(?!",o.join("|"),")")}const te={match:n.concat(/\b/,J([...Ln,"super","import"].map(o=>`${o}\\s*\\(`)),s,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:n.concat(/\./,n.lookahead(n.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},j={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},U]},Q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",r={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(Q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[U]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:Y},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),D,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,S,L,x,C,z,{match:/\$\d+/},m,Y,{className:"attr",begin:s+n.lookahead(":"),relevance:0},r,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[z,e.REGEXP_MODE,{className:"function",begin:Q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:b.begin,end:b.end},{match:f},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},q,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[U,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[U]},te,ne,X,j,{match:/\$[(.]/}]}}function je(e){const n=ns(e),t=Ce,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],b={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},f={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},i={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Ce,keyword:In.concat(a),literal:Mn,built_in:vn.concat(s),"variable.language":xn},u={className:"meta",begin:"@"+t},g=(S,L,x)=>{const C=S.contains.findIndex(v=>v.label===L);if(C===-1)throw new Error("can not find mode to replace");S.contains.splice(C,1,x)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(u);const m=n.contains.find(S=>S.className==="attr");n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,m]),n.contains=n.contains.concat([u,b,f]),g(n,"shebang",e.SHEBANG()),g(n,"use_strict",i);const _=n.contains.find(S=>S.label==="func.def");return _.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function ts(e){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},t={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],b={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[n,t,e.QUOTE_STRING_MODE,b,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function ss(e){const n=e.regex,t="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",s="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",i={$pattern:t,keyword:["after","alias","and","case","catch","cond","defstruct","defguard","do","else","end","fn","for","if","import","in","not","or","quote","raise","receive","require","reraise","rescue","try","unless","unquote","unquote_splicing","use","when","with|0"],literal:["false","nil","true"]},a={className:"subst",begin:/#\{/,end:/\}/,keywords:i},c={className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},g={match:/\\[\s\S]/,scope:"char.escape",relevance:0},m=`[/|([{<"']`,_=[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin:/</,end:/>/}],S=I=>({scope:"char.escape",begin:n.concat(/\\/,I),relevance:0}),L={className:"string",begin:"~[a-z](?="+m+")",contains:_.map(I=>e.inherit(I,{contains:[S(I.end),g,a]}))},x={className:"string",begin:"~[A-Z](?="+m+")",contains:_.map(I=>e.inherit(I,{contains:[S(I.end)]}))},C={className:"regex",variants:[{begin:"~r(?="+m+")",contains:_.map(I=>e.inherit(I,{end:n.concat(I.end,/[uismxfU]{0,7}/),contains:[S(I.end),g,a]}))},{begin:"~R(?="+m+")",contains:_.map(I=>e.inherit(I,{end:n.concat(I.end,/[uismxfU]{0,7}/),contains:[S(I.end)]}))}]},v={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},z={className:"function",beginKeywords:"def defp defmacro defmacrop",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},k=e.inherit(z,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),$=[v,C,x,L,e.HASH_COMMENT_MODE,k,z,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[v,{begin:s}],relevance:0},{className:"symbol",begin:t+":(?!:)",relevance:0},{className:"title.class",begin:/(\b[A-Z][a-zA-Z0-9_]+)/,relevance:0},c,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"}];return a.contains=$,{name:"Elixir",aliases:["ex","exs"],keywords:i,contains:$}}var de="[0-9](_*[0-9])*",Re=`\\.(${de})`,Te="[0-9a-fA-F](_*[0-9a-fA-F])*",on={className:"number",variants:[{begin:`(\\b(${de})((${Re})|\\.)?|(${Re}))[eE][+-]?(${de})[fFdD]?\\b`},{begin:`\\b(${de})((${Re})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Re})[fFdD]?\\b`},{begin:`\\b(${de})[fFdD]\\b`},{begin:`\\b0[xX]((${Te})\\.?|(${Te})?\\.(${Te}))[pP][+-]?(${de})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Te})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Dn(e,n,t){return t===-1?"":e.replace(n,s=>Dn(e,n,t-1))}function as(e){const n=e.regex,t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",s=t+Dn("(?:<"+t+"~~~(?:\\s*,\\s*"+t+"~~~)*>)?",/~~~/g,2),c={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+t,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:c,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,t],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[n.concat(/(?!else)/,t),/\s+/,t,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,t],className:{1:"keyword",3:"title.class"},contains:[g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+s+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:c,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,on,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},on,u]}}function Bn(e){return e?typeof e=="string"?e:e.source:null}function _e(e){return y("(?=",e,")")}function y(...e){return e.map(t=>Bn(t)).join("")}function is(e){const n=e[e.length-1];return typeof n=="object"&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function W(...e){return"("+(is(e).capture?"":"?:")+e.map(s=>Bn(s)).join("|")+")"}const Ve=e=>y(/\b/,e,/\w$/.test(e)?/\b/:/\B/),rs=["Protocol","Type"].map(Ve),ln=["init","self"].map(Ve),cs=["Any","Self"],Ke=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],un=["false","nil","true"],os=["assignment","associativity","higherThan","left","lowerThan","none","right"],ls=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],gn=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],kn=W(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),$n=W(kn,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),He=y(kn,$n,"*"),Un=W(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),we=W(Un,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),V=y(Un,we,"*"),ye=y(/[A-Z]/,we,"*"),us=["attached","autoclosure",y(/convention\(/,W("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",y(/objc\(/,V,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],gs=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function ds(e){const n={match:/\s+/,relevance:0},t=e.COMMENT("/\\*","\\*/",{contains:["self"]}),s=[e.C_LINE_COMMENT_MODE,t],b={match:[/\./,W(...rs,...ln)],className:{2:"keyword"}},f={match:y(/\./,W(...Ke)),relevance:0},i=Ke.filter(R=>typeof R=="string").concat(["_|0"]),a=Ke.filter(R=>typeof R!="string").concat(cs).map(Ve),c={variants:[{className:"keyword",match:W(...a,...ln)}]},u={$pattern:W(/\b\w+/,/#\w+/),keyword:i.concat(ls),literal:un},g=[b,f,c],m={match:y(/\./,W(...gn)),relevance:0},_={className:"built_in",match:y(/\b/,W(...gn),/(?=\()/)},S=[m,_],L={match:/->/,relevance:0},x={className:"operator",relevance:0,variants:[{match:He},{match:`\\.(\\.|${$n})+`}]},C=[L,x],v="([0-9]_*)+",z="([0-9a-fA-F]_*)+",k={className:"number",relevance:0,variants:[{match:`\\b(${v})(\\.(${v}))?([eE][+-]?(${v}))?\\b`},{match:`\\b0x(${z})(\\.(${z}))?([pP][+-]?(${v}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},$=(R="")=>({className:"subst",variants:[{match:y(/\\/,R,/[0\\tnr"']/)},{match:y(/\\/,R,/u\{[0-9a-fA-F]{1,8}\}/)}]}),I=(R="")=>({className:"subst",match:y(/\\/,R,/[\t ]*(?:[\r\n]|\r\n)/)}),U=(R="")=>({className:"subst",label:"interpol",begin:y(/\\/,R,/\(/),end:/\)/}),X=(R="")=>({begin:y(R,/"""/),end:y(/"""/,R),contains:[$(R),I(R),U(R)]}),Y=(R="")=>({begin:y(R,/"/),end:y(/"/,R),contains:[$(R),U(R)]}),D={className:"string",variants:[X(),X("#"),X("##"),X("###"),Y(),Y("#"),Y("##"),Y("###")]},q=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],ne={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:q},J=R=>{const ie=y(R,/\//),K=y(/\//,R);return{begin:ie,end:K,contains:[...q,{scope:"comment",begin:`#(?!.*${K})`,end:/$/}]}},te={scope:"regexp",variants:[J("###"),J("##"),J("#"),ne]},se={match:y(/`/,V,/`/)},j={className:"variable",match:/\$\d+/},Q={className:"variable",match:`\\$${we}+`},r=[se,j,Q],o={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:gs,contains:[...C,k,D]}]}},E={scope:"keyword",match:y(/@/,W(...us),_e(W(/\(/,/\s+/)))},N={scope:"meta",match:y(/@/,V)},A=[o,E,N],M={match:_e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:y(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,we,"+")},{className:"type",match:ye,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:y(/\s+&\s+/,_e(ye)),relevance:0}]},F={begin:/</,end:/>/,keywords:u,contains:[...s,...g,...A,L,M]};M.contains.push(F);const ue={match:y(V,/\s*:/),keywords:"_|0",relevance:0},P={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",ue,...s,te,...g,...S,...C,k,D,...r,...A,M]},Z={begin:/</,end:/>/,keywords:"repeat each",contains:[...s,M]},he={begin:W(_e(y(V,/\s*:/)),_e(y(V,/\s+/,V,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:V}]},fe={begin:/\(/,end:/\)/,keywords:u,contains:[he,...s,...g,...C,k,D,...A,M,P],endsParent:!0,illegal:/["']/},Se={match:[/(func|macro)/,/\s+/,W(se.match,V,He)],className:{1:"keyword",3:"title.function"},contains:[Z,fe,n],illegal:[/\[/,/%/]},xe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Z,fe,n],illegal:/\[|%/},ve={match:[/operator/,/\s+/,He],className:{1:"keyword",3:"title"}},De={begin:[/precedencegroup/,/\s+/,ye],className:{1:"keyword",3:"title"},contains:[M],keywords:[...os,...un],end:/}/},Be={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,V,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[Z,...g,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:ye},...g],relevance:0}]};for(const R of D.variants){const ie=R.contains.find(ke=>ke.label==="interpol");ie.keywords=u;const K=[...g,...S,...C,k,D,...r];ie.contains=[...K,{begin:/\(/,end:/\)/,contains:["self",...K]}]}return{name:"Swift",keywords:u,contains:[...s,Se,xe,Be,ve,De,{beginKeywords:"import",end:/$/,contains:[...s],relevance:0},te,...g,...S,...C,k,D,...r,...A,M,P]}}function Fn(e){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},t=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"</",contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}var Ee="[0-9](_*[0-9])*",Oe=`\\.(${Ee})`,Ie="[0-9a-fA-F](_*[0-9a-fA-F])*",Es={className:"number",variants:[{begin:`(\\b(${Ee})((${Oe})|\\.)?|(${Oe}))[eE][+-]?(${Ee})[fFdD]?\\b`},{begin:`\\b(${Ee})((${Oe})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Oe})[fFdD]?\\b`},{begin:`\\b(${Ee})[fFdD]\\b`},{begin:`\\b0[xX]((${Ie})\\.?|(${Ie})?\\.(${Ie}))[pP][+-]?(${Ee})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Ie})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Pn(e){const n={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},t={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},s={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},b={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},f={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},i={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[f,b]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,f,b]}]};b.contains.push(i);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(i,{className:"string"}),"self"]}]},u=Es,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},_=m;return _.variants[1].contains=[m],m.variants[1].contains=[_],{name:"Kotlin",aliases:["kt","kts"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,t,s,a,c,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,a,c,i,e.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,c]},i,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
3
3
  `},u]}}function Kn(e){const n=["package","import","option","optional","required","repeated","group","oneof"],t=["double","float","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","bool","string","bytes"],s={match:[/(message|enum|service)\s+/,e.IDENT_RE],scope:{1:"keyword",2:"title.class"}};return{name:"Protocol Buffers",aliases:["proto"],keywords:{keyword:n,type:t,literal:["true","false"]},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,{className:"function",beginKeywords:"rpc",end:/[{;]/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}}function Hn(e){const n=e.regex,t=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},g={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c,g,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c,g,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},_="[0-9](_?[0-9])*",S=`(\\b(${_}))?\\.(${_})|\\b(${_})\\.`,L=`\\b|${s.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b(${_})|(${S}))[eE][+-]?(${_})[jJ]?(?=${L})`},{begin:`(${S})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${L})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${L})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${L})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${L})`},{begin:`\\b(${_})[jJ](?=${L})`}]},C={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",c,x,m,e.HASH_COMMENT_MODE]}]};return u.contains=[m,x,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[c,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,C,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,t,/\s*/,/\(\s*/,t,/\s*\)/]},{match:[/\bclass/,/\s+/,t]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,v,m]}]}}function Gn(e){const n="true false yes no null",t="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/\w[\w :()\./-]*:(?=[ \t]|$)/},{begin:/"\w[\w :()\./-]*":(?=[ \t]|$)/},{begin:/'\w[\w :()\./-]*':(?=[ \t]|$)/}]},b={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},f={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,b]},i=e.inherit(f,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},_={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},S={begin:/\{/,end:/\}/,contains:[_],illegal:"\\n",relevance:0},L={begin:"\\[",end:"\\]",contains:[_],illegal:"\\n",relevance:0},x=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+t},{className:"type",begin:"!<"+t+">"},{className:"type",begin:"!"+t},{className:"type",begin:"!!"+t},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},S,L,f],C=[...x];return C.pop(),C.push(i),_.contains=C,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:x}}function zn(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Wn(e){const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Zn(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function bs(e){const n=e.regex,t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},b={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},f={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(u,{contains:[]}),_=e.inherit(g,{contains:[]});u.contains.push(_),g.contains.push(m);let S=[t,c];return[u,g,m,_].forEach(v=>{v.contains=v.contains.concat(S)}),S=S.concat(u,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:S},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:S}]}]},t,f,u,g,{className:"quote",begin:"^>\\s+",contains:S,end:"$"},b,s,c,i,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}var qe={},fs=Jn;Object.defineProperty(qe,"__esModule",{value:!0});var Yn=qe.default=void 0,_s=fs(qn()),ps=G;Yn=qe.default=(0,_s.default)((0,ps.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2zm-1 7h5.5L14 6.5z"}),"FileCopy");const Ns=Qn("div")`
4
4
  display: block;
@@ -1,4 +1,4 @@
1
- import{br as St,r as x,bD as X,bj as U,A as V,F as L,j as e,P as d,T as Ct,aQ as Je,aR as Ze,ax as Nt,h as ne,aC as wt,k as G,N as v,m as J,ej as _e,Q as Be,kJ as et,bo as Ee,aZ as De,X as Ae,ep as we,b8 as Ge,b6 as Oe,C as tt,n as re,f as st,dB as nt,aU as Le,W as Tt,aw as at,kK as it,B as ke,kL as ot,g3 as Se,gk as rt,aj as fe,ff as Rt,ay as It,G as Ye,kM as Et,kN as Dt,D as lt,kO as At,kP as Ot,kQ as Lt,kR as kt,R as Pt,bx as ct,S as Ft,U as _t,V as Qe,M as Bt,kS as zt,a5 as Wt}from"./index-B8IA5mbU.js";import{l as Mt,D as dt,g as qt}from"./index-zsz18EZU.js";import{a as ze,c as Kt}from"./actions-DNqu-9QQ.js";import{B as Ut}from"./index-DUIS5TWY.js";import{S as xe}from"./shorten-label-DEXH98Sk.js";import{I as ut}from"./index-rZ1SBrH_.js";import{T as $t}from"./index-Cy666DOY.js";import{d as Ht}from"./Refresh-BK_aBn8t.js";import{D as Vt,g as Gt}from"./traffic-CTPgH40k.js";import{u as Yt}from"./use-mobile-DxY5BxAJ.js";import"./TableRow-Cyof88VP.js";import"./useThemeProps-C3mE_-3Z.js";import"./emotion-react.browser.esm-CSjORkdU.js";import"./ViewColumn-BSxTQVZ-.js";import"./Search-DGRuo7t-.js";import"./Clear-CmPKgcDo.js";import"./Delete-CiU1bEBu.js";import"./index-DbTX57bM.js";import"./MoreVert-BZT8paNd.js";import"./TableSearch-CxutcmoF.js";import"./useLocalStorage-CRy7LFYG.js";import"./get-safe-url-COP_ZxQz.js";import"./ButtonGroup-BzAT8pGA.js";import"./getValidReactChildren-CxwCdnNW.js";import"./url-evaluation-DmRIkzYe.js";import"./permission-JEjDz9i9.js";import"./index.esm-F8b32K2k.js";import"./collapse-BhbkfN99.js";import"./blocklet-BzkaFDNW.js";import"./Switch-CG3jQlg3.js";import"./iframe-D-LcA3MK.js";import"./ChevronLeft-CDs40tmH.js";import"./ChevronRight-CFfmouwT.js";import"./index-B0UMNJnN.js";import"./base-chart-C63mtC4Z.js";import"./index-Cb3Huyfb.js";import"./AdapterDayjs-Cf6af3xk.js";import"./CSSTransition-Byi2ne4y.js";import"./refType-Dqlqmha-.js";const pt=x.createContext({}),{Provider:Qt,Consumer:pn}=pt;function Xt({children:t,blocklet:s=""}){const{api:n,inService:o,ws:{useSubscription:r}}=St(),[l,b]=x.useState([]),[u,D]=x.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>{var p;return(p=s.meta)==null?void 0:p.did},[s]),[C,N]=x.useState([]),[B,z]=x.useState({}),E=X(()=>l.length?new Set(l.map(p=>p.id)):new Set,[l]),Y=async({page:p=1,pageSize:S=20,...A}={})=>{if(!f)return[];try{const w={paging:{page:p,pageSize:S},...A,teamDid:f,dateRange:A.dateRange?[U(A.dateRange[0]).toISOString(),U(A.dateRange[1]).toISOString()]:void 0},{dids:O,..._}=w;let Z="";O&&O.includes("system")&&(Z="system");const W=O?O.filter(le=>le!=="system"):[],ae={..._,source:Z,componentDids:W},se=await n.getNotificationSendLog({input:ae});return z(ae),b(se.list),D(se.paging),se.list}catch(w){return V.error(w.message),[]}},P=async()=>{const p=await n.getNotificationComponents({input:{teamDid:f}});N(p.componentDids)},k=x.useCallback(p=>{const S=s.children.find(A=>{var w;return((w=A.meta)==null?void 0:w.did)===p});if(S)return S.ancestors=[s],S},[s]),I=async({notificationId:p,receivers:S,channels:A,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:p,receivers:S,channels:A.map(O=>O==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:O==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:O),...w}})},$=x.useCallback(async p=>(await n.getUser({input:{teamDid:f,user:{did:p}}})).user,[n,f]),Q=x.useCallback(async({page:p=1,pageSize:S=20,...A}={})=>{try{const w={paging:{page:p,pageSize:S},...A,userName:A.searchText||"",teamDid:f,dateRange:A.dateRange?[U(A.dateRange[0]).toISOString(),U(A.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[n,f]);x.useEffect(()=>{f&&P()},[f]),r(L.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,p=>{E.has(p.notificationId)&&Y(B)},[E,B]),r(L.EVENTS.NOTIFICATION_BLOCKLET_CREATE,p=>{E.has(p.id)||Y(B)},[E,B]);const te={fetch:Y,data:l,paging:u,blocklet:s,getComponent:k,resendNotification:I,getUser:$,componentDids:C,getReceivers:Q,inService:o,teamDid:f};return e.jsx(Qt,{value:{notificationRecords:te},children:t})}function We(){const{notificationRecords:t}=x.useContext(pt);return t}be.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Jt={info:"primary",success:"success",error:"error",warning:"warning"};function be({severity:t="info"}){return e.jsx(Ct,{type:Jt[t],children:t})}var Me={},Zt=Ze;Object.defineProperty(Me,"__esModule",{value:!0});var ft=Me.default=void 0,es=Zt(Je()),ts=e;ft=Me.default=(0,es.default)((0,ts.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var qe={},ss=Ze;Object.defineProperty(qe,"__esModule",{value:!0});var mt=qe.default=void 0,ns=ss(Je()),as=e;mt=qe.default=(0,ns.default)((0,as.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");const is=(t,s,n="")=>{if(!n||!s)return"";switch(n){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function ht(t,s,n={}){const{status:o,updatedAt:r,reason:l="",channel:b="wallet"}=n,u=r?t("notification.sendStatus.sentTime",{date:Nt(r,s)}):"",D=is(t,b,l);return o===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:D}:o===L.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:D,sentTime:u}}const Pe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Fe=["wallet","pushKit","email"],Xe=["info","success","error","warning"],gt=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.email)==null?void 0:o.enabled},xt=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.pushKit)==null?void 0:o.enabled},os=(t,s)=>{const n=ne(s,"extra.notifications.email",!0);return{available:gt(t),enabled:n}},rs=(t,s)=>{const n=ne(s,"extra.notifications.push",!0);return{available:xt(t),enabled:n}},ls=t=>({enabled:ne(t,"extra.notifications.wallet",!0)}),cs=t=>({enabled:ne(t,"extra.webhooks",[]).length>0}),ye=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ds=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],ve=(t=[])=>{const s=U().startOf("day");return t.filter(n=>U(n.sendAt).isSame(s,"day")).length},us=(t,s="")=>{if(s&&Fe.includes(s)){const l=`${s}SendRecord`,b=ne(t,l,[]);return ve(b)}const n=ne(t,"webhook",{}),o=Object.keys(n??{})??[];if(s&&o.includes(s)){const l=n[s]??[];return ve(l)}const r={};return Fe.forEach(l=>{const b=`${l}SendRecord`,u=ne(t,b,[]),D=ve(u);r[l]=D}),o.length>0&&o.forEach(l=>{const b=n[l]??[],u=ve(b);r[l]=u}),r},Ce=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Ne=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ps=t=>{switch(t){case L.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case L.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case L.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case L.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},bt=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function ee({config:t,enableTooltip:s=!0,showTitle:n=!1,children:o}){const{status:r,title:l="",sentTime:b="",reason:u=""}=t,D=[l,u].filter(Boolean).join(", ");return e.jsx(wt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:D}),e.jsx("span",{children:b})]}):null,arrow:!0,placement:"top",children:e.jsxs(v,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(v,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(v,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Pe[r],style:{opacity:.15}}),e.jsx(v,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Pe[r]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:n?l:o})]})})}ee.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ee.defaultProps={enableTooltip:!0,showTitle:!1,children:null};me.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};me.defaultProps={onDelete:()=>{}};function me({list:t,label:s,onDelete:n}){const{t:o,locale:r}=J();return e.jsxs(v,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[s,": "]}),t.map(l=>{const b=ht(o,r,{status:l});return e.jsx(_e,{size:"small",label:e.jsx(v,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(ee,{config:b,enableTooltip:!1,children:b.title})}),onDelete:u=>n(u,l)},l)})]})}Ke.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function Ke({filterList:t,onChange:s,index:n,column:o,filterValues:r,label:l,renderLabel:b}){return e.jsxs(Be,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Ee,{row:!0,children:r.map(u=>e.jsx(De,{control:e.jsx(Ae,{checked:t[n].indexOf(u.value??u)>-1,onChange:D=>{const f=[...t];D.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(C=>C!==(u.value??u)),s(f[n],n,o)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:b(u)})},u.value??u))})]})}function Ie(t){return e.jsx(Ke,{...t,renderLabel:s=>e.jsx(ee,{enableTooltip:!1,config:{status:s.status},children:s.label})})}pe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function pe({status:t,updatedAt:s,reason:n="",channel:o="wallet",onResend:r}){const{t:l,locale:b}=J(),u=ht(l,b,{status:t,updatedAt:s,reason:n,channel:o});return e.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(ee,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(ze,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:r,children:l("notification.resend")})]})}Ue.propTypes={value:d.array.isRequired,onChange:d.func};function Ue({value:t,onChange:s}){const{locale:n}=J(),o=U().toDate(),[r,l]=x.useState(null),b=x.useCallback(f=>{l(r?null:f.currentTarget)},[r]),u=!!r,D=x.useCallback(f=>{if(!f.startDate||!f.endDate){V.error("Please select a date range");return}if(U(f.startDate).isAfter(f.endDate)||!U(f.startDate).isValid()||!U(f.endDate).isValid()){V.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(we,{onClick:b,variant:"outlined",size:"small",color:"inherit",children:[Ge(t[0],n)," - ",Ge(t[1],n)]})}),e.jsx(Oe,{open:u,anchorEl:r,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Vt,{open:!0,maxDate:o,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:b,definedRanges:Gt(o),onChange:D})})]})}$e.propTypes={itemComponent:d.elementType.isRequired};function $e({itemComponent:t,...s}){var r;const{t:n}=J();return!((r=s==null?void 0:s.filterList)!=null&&r.filter(l=>l.length).length)?null:e.jsxs(v,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Mt.TableFilterList,{...s,ItemComponent:t})})]})}function Te({label:t,onDelete:s,canDelete:n=()=>!0,...o}){const r=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...o})),e.jsx(_e,{label:t,variant:"outlined",...r&&l?{onDelete:r}:{}})}Te.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Te.defaultProps={canDelete:()=>!0};const fs=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];He.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};He.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function He({loading:t=!1,onCancel:s,onConfirm:n}){const{t:o}=J(),[r,l]=x.useState(fs),[b,u]=x.useState(!0),D=(C,N)=>{N.checked=C.target.checked;const B=r.map(z=>({...z,checked:z.value===N.value?N.checked:z.checked}));l(B)},f=C=>{C.stopPropagation(),n({channels:r.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:b})};return e.jsxs(v,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(v,{className:"choose-channel",children:e.jsxs(Be,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Ee,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:r.map(C=>e.jsx(De,{control:e.jsx(Ae,{checked:C.checked,onChange:N=>D(N,C),name:C.value}),label:C.label},C.value))})]})}),e.jsx(v,{className:"resend-config-footer",children:e.jsx(Ee,{children:e.jsx(De,{control:e.jsx(Ae,{checked:b,onChange:C=>u(C.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(we,{onClick:C=>{C.stopPropagation(),s()},color:"inherit",children:o("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),o("common.confirm")]})]})]})}jt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function jt({notificationId:t,handleResend:s,resending:n=!1}){const{t:o,locale:r}=J(),l=st(),b=x.useMemo(()=>nt(l,bt()),[l]),{getReceivers:u,inService:D,teamDid:f,getUser:C,blocklet:N}=We(),[B,z]=x.useState(!1),[E,Y]=x.useState([]),P=Le({anchorEl:null,position:null}),k=Le({anchorEl:null,position:null}),[I,$]=x.useState(null),[Q,te]=x.useState({total:0,pageSize:10,pageCount:0,page:1}),[p,S]=x.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[U().subtract(1,"month").startOf("day").toDate(),U().endOf("day").toDate()]}),[A,w]=x.useState([]),O=[{label:o("notification.sendStatus.pending"),value:0,status:"pending"},{label:o("notification.sendStatus.success"),value:1,status:"success"},{label:o("notification.sendStatus.failed"),value:2,status:"failed"}],_=async()=>{if(!B&&t)try{z(!0);const a=await u({notificationId:t,...p}),i=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:rt(c.receiverUser.avatar,f,D)}}));Y(i),te(a.paging),z(!1)}catch(a){V.error(a.message),z(!1)}};x.useEffect(()=>{_()},[p]);const Z=a=>{a.stopPropagation();const i=a.currentTarget;k.anchorEl=i;const c=i.getBoundingClientRect();k.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},W=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(ke,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:Z,children:o("notification.resend")})}):null,ae={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Q.page-1,rowsPerPage:Q.pageSize,count:Q.total,searchText:p.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:A,onRowSelectionChange:(a,i)=>{w(i.map(c=>c.dataIndex))},customToolbarSelect:W},se=({page:a,rowsPerPage:i,searchText:c,filterList:y})=>{const[,F=[],K=[],q=[]]=y;p.pageSize!==i?S(M=>({...M,pageSize:i,page:1})):p.page!==a+1?S(M=>({...M,page:a+1})):p.searchText!==c?S(M=>({...M,searchText:c,page:1})):fe(F,p.walletSendStatus)?fe(K,p.pushKitSendStatus)?fe(q,p.emailSendStatus)||S(M=>({...M,emailSendStatus:q,page:1})):S(M=>({...M,pushKitSendStatus:K,page:1})):S(M=>({...M,walletSendStatus:F,page:1}))},le=x.useCallback(async(a,i)=>{if(!i)return!1;const c=await C(i);return c?a==="wallet"?ls(c):a==="email"?os(N,c):a==="pushKit"?rs(N,c):a==="webhook"?cs(c):!0:!1},[C,N]),je=x.useCallback(a=>ds(o,a),[o]),ce=()=>{P.anchorEl=null,P.position=null,$(null)},de=()=>{k.anchorEl=null,k.position=null},ue=async(a,i,c=!0,y="")=>{if(!(!i.length||!a.length))try{s(a,i,c,y),k.anchorEl||(await ye(.5),ce())}catch(F){console.error("handleResend error",{error:F})}},h=async({channels:a,isResendFailedOnly:i})=>{const c=A.map(y=>E[y].receiver);await ue(a,c,i),await ye(.5),de(),w([])},m=async(a,i=[],c=!0)=>{try{await ue(["webhook"],[a.receiver],c,i)}catch(y){V.error(y.response?y.response.statusText:y.message)}},g=async(a,i,c,y=[],F=!0)=>{if(a.stopPropagation(),us(i,c)>=4){V.warning(o("notification.resendLimit"));return}if(!Fe.includes(c)){await m(i,y,F);return}if(a){const q=a.currentTarget,M=q.getBoundingClientRect();P.anchorEl=q,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}$({channel:c});try{const q=await le(c,i.receiver);await ye(1),$({channel:c,result:q}),(typeof q=="boolean"&&q||Rt(q)&&Object.values(q).every(M=>!!M))&&(await s([c],[i.receiver],F),k.anchorEl||(await ye(.5),ce()))}catch(q){V.error(q.message)}},j=a=>{S(i=>({...i,dateRange:a,page:1}))},T=(a,i,c,y)=>{a.stopPropagation();const F=c.filter(K=>K!==i);S(K=>({...K,[y]:F,page:1}))},R=X(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:i,receiver:c}=E[a];return i?e.jsxs(v,{"data-cy":`member-name-${i.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(at,{src:`${i.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(xe,{children:i.fullName})]},c):e.jsx(Tt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:p.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Wallet",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[1].options.filterList,"walletSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Wallet",filterList:a,onChange:i,index:c,column:y,filterValues:O})},customBodyRenderLite:a=>{const{walletSendStatus:i,walletSendAt:c,walletSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"wallet",onResend:F=>g(F,E[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:i,pushKitSendAt:c,pushKitSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"pushkit",onResend:F=>g(F,E[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:p.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Push Kit",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[2].options.filterList,"pushKitSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Push Kit",filterList:a,onChange:i,index:c,column:y,filterValues:O})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:i,emailSendAt:c,emailSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"email",onResend:F=>g(F,E[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:p.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Email",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[3].options.filterList,"emailSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Email",filterList:a,onChange:i,index:c,column:y,filterValues:O})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:i}=E[a];if(!i)return null;const c=Object.entries(i)[0];if(!c)return null;const[y,F]=c,K=F[0];return e.jsx(v,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(v,{className:"webhook-item",fontSize:12,children:[e.jsx(xe,{maxLength:30,children:y},y),e.jsx(pe,{status:K.status,updatedAt:K.sendAt,reason:K.failedReason,channel:"webhook",onResend:q=>g(q,E[a],"webhook",[y],!1)})]},y)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:i}=E[a];return e.jsx(it,{value:i,locale:r,shouldUpdate:!0})}}}],[E,r,p,o]),H=[e.jsx(Ue,{value:p.dateRange,onChange:j},"date-picker"),e.jsx(ke,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Ht,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(v,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(hs,{children:e.jsxs(ot,{theme:b,children:[e.jsx(dt,{className:"receivers-table",locale:r,loading:B,columns:R,data:E,onChange:se,options:ae,customButtons:H,components:{TableFilterList:a=>e.jsx($e,{...a,itemComponent:i=>e.jsx(Te,{...i,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Oe,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:ce,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(gs,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(v,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:je(I==null?void 0:I.channel).map(a=>{var F,K;const{type:i,pass:c,fail:y}=a;return!(I!=null&&I.result)||(F=I==null?void 0:I.result)!=null&&F[i]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(K=I==null?void 0:I.result)!=null&&K[i]?Se.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ft,{}):e.jsx(tt,{size:12,sx:{color:Se.primary.main}}),e.jsx("span",{children:c})]},i):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:Se.error.main},children:[e.jsx(mt,{}),e.jsx("span",{children:y})]},i)})})]})}),k.anchorEl&&e.jsx(Oe,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:de,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(He,{loading:n,onCancel:de,onConfirm:h})})]})})})}const ms=x.memo(jt),hs=re.div`
1
+ import{br as St,r as x,bD as X,bj as U,A as V,F as L,j as e,P as d,T as Ct,aQ as Je,aR as Ze,ax as Nt,h as ne,aC as wt,k as G,N as v,m as J,ej as _e,Q as Be,kJ as et,bo as Ee,aZ as De,X as Ae,ep as we,b8 as Ge,b6 as Oe,C as tt,n as re,f as st,dB as nt,aU as Le,W as Tt,aw as at,kK as it,B as ke,kL as ot,g3 as Se,gk as rt,aj as fe,ff as Rt,ay as It,G as Ye,kM as Et,kN as Dt,D as lt,kO as At,kP as Ot,kQ as Lt,kR as kt,R as Pt,bx as ct,S as Ft,U as _t,V as Qe,M as Bt,kS as zt,a5 as Wt}from"./index-BsTEuRio.js";import{l as Mt,D as dt,g as qt}from"./index-Dy6Ndspk.js";import{a as ze,c as Kt}from"./actions-DMblPsrA.js";import{B as Ut}from"./index-CEwaV1Oe.js";import{S as xe}from"./shorten-label-rkbgI37z.js";import{I as ut}from"./index-DuyB74pI.js";import{T as $t}from"./index-DdKwcnDa.js";import{d as Ht}from"./Refresh-g_ze8RC-.js";import{D as Vt,g as Gt}from"./traffic-BXrg_wx7.js";import{u as Yt}from"./use-mobile-zJMHEWPE.js";import"./TableRow-CL8yhyVQ.js";import"./useThemeProps-Rte_NmVE.js";import"./emotion-react.browser.esm-CyqIkV2y.js";import"./ViewColumn-DVO6c2uh.js";import"./Search-DmfQzntI.js";import"./Clear-C1AC1AtD.js";import"./Delete-CcdfJXTL.js";import"./index-BcLnPbZ_.js";import"./MoreVert-CjjkmApl.js";import"./TableSearch-CxUE73Wm.js";import"./useLocalStorage-DdJoK4w7.js";import"./get-safe-url-Dsy-huUv.js";import"./ButtonGroup-B3J8Qdyl.js";import"./getValidReactChildren-BhCPp8PX.js";import"./url-evaluation-PNUzVXFG.js";import"./permission-syQYMJDU.js";import"./index.esm-BeKnx9US.js";import"./collapse-De1M4hZU.js";import"./blocklet-C56CLqfn.js";import"./Switch-D1aSf0Rk.js";import"./iframe-JzwQis4I.js";import"./ChevronLeft-BNmKlc1J.js";import"./ChevronRight-DRPUyxAK.js";import"./index-BR_N19sK.js";import"./base-chart-DHzZnb2L.js";import"./index-CEkzM2Hy.js";import"./AdapterDayjs-cf9EXlHB.js";import"./CSSTransition-Cz8SmnJv.js";import"./refType-Bi7lNIS6.js";const pt=x.createContext({}),{Provider:Qt,Consumer:pn}=pt;function Xt({children:t,blocklet:s=""}){const{api:n,inService:o,ws:{useSubscription:r}}=St(),[l,b]=x.useState([]),[u,D]=x.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>{var p;return(p=s.meta)==null?void 0:p.did},[s]),[C,N]=x.useState([]),[B,z]=x.useState({}),E=X(()=>l.length?new Set(l.map(p=>p.id)):new Set,[l]),Y=async({page:p=1,pageSize:S=20,...A}={})=>{if(!f)return[];try{const w={paging:{page:p,pageSize:S},...A,teamDid:f,dateRange:A.dateRange?[U(A.dateRange[0]).toISOString(),U(A.dateRange[1]).toISOString()]:void 0},{dids:O,..._}=w;let Z="";O&&O.includes("system")&&(Z="system");const W=O?O.filter(le=>le!=="system"):[],ae={..._,source:Z,componentDids:W},se=await n.getNotificationSendLog({input:ae});return z(ae),b(se.list),D(se.paging),se.list}catch(w){return V.error(w.message),[]}},P=async()=>{const p=await n.getNotificationComponents({input:{teamDid:f}});N(p.componentDids)},k=x.useCallback(p=>{const S=s.children.find(A=>{var w;return((w=A.meta)==null?void 0:w.did)===p});if(S)return S.ancestors=[s],S},[s]),I=async({notificationId:p,receivers:S,channels:A,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:p,receivers:S,channels:A.map(O=>O==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:O==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:O),...w}})},$=x.useCallback(async p=>(await n.getUser({input:{teamDid:f,user:{did:p}}})).user,[n,f]),Q=x.useCallback(async({page:p=1,pageSize:S=20,...A}={})=>{try{const w={paging:{page:p,pageSize:S},...A,userName:A.searchText||"",teamDid:f,dateRange:A.dateRange?[U(A.dateRange[0]).toISOString(),U(A.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[n,f]);x.useEffect(()=>{f&&P()},[f]),r(L.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,p=>{E.has(p.notificationId)&&Y(B)},[E,B]),r(L.EVENTS.NOTIFICATION_BLOCKLET_CREATE,p=>{E.has(p.id)||Y(B)},[E,B]);const te={fetch:Y,data:l,paging:u,blocklet:s,getComponent:k,resendNotification:I,getUser:$,componentDids:C,getReceivers:Q,inService:o,teamDid:f};return e.jsx(Qt,{value:{notificationRecords:te},children:t})}function We(){const{notificationRecords:t}=x.useContext(pt);return t}be.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Jt={info:"primary",success:"success",error:"error",warning:"warning"};function be({severity:t="info"}){return e.jsx(Ct,{type:Jt[t],children:t})}var Me={},Zt=Ze;Object.defineProperty(Me,"__esModule",{value:!0});var ft=Me.default=void 0,es=Zt(Je()),ts=e;ft=Me.default=(0,es.default)((0,ts.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline");var qe={},ss=Ze;Object.defineProperty(qe,"__esModule",{value:!0});var mt=qe.default=void 0,ns=ss(Je()),as=e;mt=qe.default=(0,ns.default)((0,as.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block");const is=(t,s,n="")=>{if(!n||!s)return"";switch(n){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function ht(t,s,n={}){const{status:o,updatedAt:r,reason:l="",channel:b="wallet"}=n,u=r?t("notification.sendStatus.sentTime",{date:Nt(r,s)}):"",D=is(t,b,l);return o===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:D}:o===L.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:D,sentTime:u}}const Pe={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},Fe=["wallet","pushKit","email"],Xe=["info","success","error","warning"],gt=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.email)==null?void 0:o.enabled},xt=t=>{var n,o;const{settings:s}=t;return(o=(n=s==null?void 0:s.notification)==null?void 0:n.pushKit)==null?void 0:o.enabled},os=(t,s)=>{const n=ne(s,"extra.notifications.email",!0);return{available:gt(t),enabled:n}},rs=(t,s)=>{const n=ne(s,"extra.notifications.push",!0);return{available:xt(t),enabled:n}},ls=t=>({enabled:ne(t,"extra.notifications.wallet",!0)}),cs=t=>({enabled:ne(t,"extra.webhooks",[]).length>0}),ye=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ds=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],ve=(t=[])=>{const s=U().startOf("day");return t.filter(n=>U(n.sendAt).isSame(s,"day")).length},us=(t,s="")=>{if(s&&Fe.includes(s)){const l=`${s}SendRecord`,b=ne(t,l,[]);return ve(b)}const n=ne(t,"webhook",{}),o=Object.keys(n??{})??[];if(s&&o.includes(s)){const l=n[s]??[];return ve(l)}const r={};return Fe.forEach(l=>{const b=`${l}SendRecord`,u=ne(t,b,[]),D=ve(u);r[l]=D}),o.length>0&&o.forEach(l=>{const b=n[l]??[],u=ve(b);r[l]=u}),r},Ce=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Ne=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ps=t=>{switch(t){case L.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case L.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case L.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case L.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},bt=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function ee({config:t,enableTooltip:s=!0,showTitle:n=!1,children:o}){const{status:r,title:l="",sentTime:b="",reason:u=""}=t,D=[l,u].filter(Boolean).join(", ");return e.jsx(wt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:D}),e.jsx("span",{children:b})]}):null,arrow:!0,placement:"top",children:e.jsxs(v,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(v,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(v,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Pe[r],style:{opacity:.15}}),e.jsx(v,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Pe[r]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:n?l:o})]})})}ee.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ee.defaultProps={enableTooltip:!0,showTitle:!1,children:null};me.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};me.defaultProps={onDelete:()=>{}};function me({list:t,label:s,onDelete:n}){const{t:o,locale:r}=J();return e.jsxs(v,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[s,": "]}),t.map(l=>{const b=ht(o,r,{status:l});return e.jsx(_e,{size:"small",label:e.jsx(v,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(ee,{config:b,enableTooltip:!1,children:b.title})}),onDelete:u=>n(u,l)},l)})]})}Ke.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function Ke({filterList:t,onChange:s,index:n,column:o,filterValues:r,label:l,renderLabel:b}){return e.jsxs(Be,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Ee,{row:!0,children:r.map(u=>e.jsx(De,{control:e.jsx(Ae,{checked:t[n].indexOf(u.value??u)>-1,onChange:D=>{const f=[...t];D.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(C=>C!==(u.value??u)),s(f[n],n,o)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:b(u)})},u.value??u))})]})}function Ie(t){return e.jsx(Ke,{...t,renderLabel:s=>e.jsx(ee,{enableTooltip:!1,config:{status:s.status},children:s.label})})}pe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function pe({status:t,updatedAt:s,reason:n="",channel:o="wallet",onResend:r}){const{t:l,locale:b}=J(),u=ht(l,b,{status:t,updatedAt:s,reason:n,channel:o});return e.jsxs(v,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(ee,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(ze,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:r,children:l("notification.resend")})]})}Ue.propTypes={value:d.array.isRequired,onChange:d.func};function Ue({value:t,onChange:s}){const{locale:n}=J(),o=U().toDate(),[r,l]=x.useState(null),b=x.useCallback(f=>{l(r?null:f.currentTarget)},[r]),u=!!r,D=x.useCallback(f=>{if(!f.startDate||!f.endDate){V.error("Please select a date range");return}if(U(f.startDate).isAfter(f.endDate)||!U(f.startDate).isValid()||!U(f.endDate).isValid()){V.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(we,{onClick:b,variant:"outlined",size:"small",color:"inherit",children:[Ge(t[0],n)," - ",Ge(t[1],n)]})}),e.jsx(Oe,{open:u,anchorEl:r,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Vt,{open:!0,maxDate:o,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:b,definedRanges:Gt(o),onChange:D})})]})}$e.propTypes={itemComponent:d.elementType.isRequired};function $e({itemComponent:t,...s}){var r;const{t:n}=J();return!((r=s==null?void 0:s.filterList)!=null&&r.filter(l=>l.length).length)?null:e.jsxs(v,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Mt.TableFilterList,{...s,ItemComponent:t})})]})}function Te({label:t,onDelete:s,canDelete:n=()=>!0,...o}){const r=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...o})),e.jsx(_e,{label:t,variant:"outlined",...r&&l?{onDelete:r}:{}})}Te.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Te.defaultProps={canDelete:()=>!0};const fs=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];He.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};He.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function He({loading:t=!1,onCancel:s,onConfirm:n}){const{t:o}=J(),[r,l]=x.useState(fs),[b,u]=x.useState(!0),D=(C,N)=>{N.checked=C.target.checked;const B=r.map(z=>({...z,checked:z.value===N.value?N.checked:z.checked}));l(B)},f=C=>{C.stopPropagation(),n({channels:r.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:b})};return e.jsxs(v,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:o("notification.config")}),e.jsx(v,{className:"choose-channel",children:e.jsxs(Be,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:o("notification.selectChannels")}),e.jsx(Ee,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:r.map(C=>e.jsx(De,{control:e.jsx(Ae,{checked:C.checked,onChange:N=>D(N,C),name:C.value}),label:C.label},C.value))})]})}),e.jsx(v,{className:"resend-config-footer",children:e.jsx(Ee,{children:e.jsx(De,{control:e.jsx(Ae,{checked:b,onChange:C=>u(C.target.checked)}),label:o("notification.resendFailedOnly")})})}),e.jsxs(v,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(we,{onClick:C=>{C.stopPropagation(),s()},color:"inherit",children:o("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),o("common.confirm")]})]})]})}jt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function jt({notificationId:t,handleResend:s,resending:n=!1}){const{t:o,locale:r}=J(),l=st(),b=x.useMemo(()=>nt(l,bt()),[l]),{getReceivers:u,inService:D,teamDid:f,getUser:C,blocklet:N}=We(),[B,z]=x.useState(!1),[E,Y]=x.useState([]),P=Le({anchorEl:null,position:null}),k=Le({anchorEl:null,position:null}),[I,$]=x.useState(null),[Q,te]=x.useState({total:0,pageSize:10,pageCount:0,page:1}),[p,S]=x.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[U().subtract(1,"month").startOf("day").toDate(),U().endOf("day").toDate()]}),[A,w]=x.useState([]),O=[{label:o("notification.sendStatus.pending"),value:0,status:"pending"},{label:o("notification.sendStatus.success"),value:1,status:"success"},{label:o("notification.sendStatus.failed"),value:2,status:"failed"}],_=async()=>{if(!B&&t)try{z(!0);const a=await u({notificationId:t,...p}),i=a.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:rt(c.receiverUser.avatar,f,D)}}));Y(i),te(a.paging),z(!1)}catch(a){V.error(a.message),z(!1)}};x.useEffect(()=>{_()},[p]);const Z=a=>{a.stopPropagation();const i=a.currentTarget;k.anchorEl=i;const c=i.getBoundingClientRect();k.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},W=a=>a.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(ke,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(ze,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:Z,children:o("notification.resend")})}):null,ae={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:o("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Q.page-1,rowsPerPage:Q.pageSize,count:Q.total,searchText:p.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:A,onRowSelectionChange:(a,i)=>{w(i.map(c=>c.dataIndex))},customToolbarSelect:W},se=({page:a,rowsPerPage:i,searchText:c,filterList:y})=>{const[,F=[],K=[],q=[]]=y;p.pageSize!==i?S(M=>({...M,pageSize:i,page:1})):p.page!==a+1?S(M=>({...M,page:a+1})):p.searchText!==c?S(M=>({...M,searchText:c,page:1})):fe(F,p.walletSendStatus)?fe(K,p.pushKitSendStatus)?fe(q,p.emailSendStatus)||S(M=>({...M,emailSendStatus:q,page:1})):S(M=>({...M,pushKitSendStatus:K,page:1})):S(M=>({...M,walletSendStatus:F,page:1}))},le=x.useCallback(async(a,i)=>{if(!i)return!1;const c=await C(i);return c?a==="wallet"?ls(c):a==="email"?os(N,c):a==="pushKit"?rs(N,c):a==="webhook"?cs(c):!0:!1},[C,N]),je=x.useCallback(a=>ds(o,a),[o]),ce=()=>{P.anchorEl=null,P.position=null,$(null)},de=()=>{k.anchorEl=null,k.position=null},ue=async(a,i,c=!0,y="")=>{if(!(!i.length||!a.length))try{s(a,i,c,y),k.anchorEl||(await ye(.5),ce())}catch(F){console.error("handleResend error",{error:F})}},h=async({channels:a,isResendFailedOnly:i})=>{const c=A.map(y=>E[y].receiver);await ue(a,c,i),await ye(.5),de(),w([])},m=async(a,i=[],c=!0)=>{try{await ue(["webhook"],[a.receiver],c,i)}catch(y){V.error(y.response?y.response.statusText:y.message)}},g=async(a,i,c,y=[],F=!0)=>{if(a.stopPropagation(),us(i,c)>=4){V.warning(o("notification.resendLimit"));return}if(!Fe.includes(c)){await m(i,y,F);return}if(a){const q=a.currentTarget,M=q.getBoundingClientRect();P.anchorEl=q,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}$({channel:c});try{const q=await le(c,i.receiver);await ye(1),$({channel:c,result:q}),(typeof q=="boolean"&&q||Rt(q)&&Object.values(q).every(M=>!!M))&&(await s([c],[i.receiver],F),k.anchorEl||(await ye(.5),ce()))}catch(q){V.error(q.message)}},j=a=>{S(i=>({...i,dateRange:a,page:1}))},T=(a,i,c,y)=>{a.stopPropagation();const F=c.filter(K=>K!==i);S(K=>({...K,[y]:F,page:1}))},R=X(()=>[{label:o("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:a=>{const{receiverUser:i,receiver:c}=E[a];return i?e.jsxs(v,{"data-cy":`member-name-${i.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(at,{src:`${i.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(xe,{children:i.fullName})]},c):e.jsx(Tt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:p.walletSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Wallet",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[1].options.filterList,"walletSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Wallet",filterList:a,onChange:i,index:c,column:y,filterValues:O})},customBodyRenderLite:a=>{const{walletSendStatus:i,walletSendAt:c,walletSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"wallet",onResend:F=>g(F,E[a],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{pushKitSendStatus:i,pushKitSendAt:c,pushKitSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"pushkit",onResend:F=>g(F,E[a],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:p.pushKitSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Push Kit",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[2].options.filterList,"pushKitSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Push Kit",filterList:a,onChange:i,index:c,column:y,filterValues:O})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{emailSendStatus:i,emailSendAt:c,emailSendFailedReason:y}=E[a];return e.jsx(pe,{status:i,updatedAt:c,reason:y,channel:"email",onResend:F=>g(F,E[a],"email",[],!1)})},filter:!0,filterType:"custom",filterList:p.emailSendStatus??[],customFilterListOptions:{render:a=>e.jsx(me,{list:a,label:"Email",onDelete:(i,c)=>{i.stopPropagation(),T(i,c,R[3].options.filterList,"emailSendStatus")}}),update:Ce},filterOptions:{names:O,fullWidth:!0,logic:Ne,display:(a,i,c,y)=>e.jsx(Ie,{label:"Email",filterList:a,onChange:i,index:c,column:y,filterValues:O})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:a=>{const{webhook:i}=E[a];if(!i)return null;const c=Object.entries(i)[0];if(!c)return null;const[y,F]=c,K=F[0];return e.jsx(v,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(v,{className:"webhook-item",fontSize:12,children:[e.jsx(xe,{maxLength:30,children:y},y),e.jsx(pe,{status:K.status,updatedAt:K.sendAt,reason:K.failedReason,channel:"webhook",onResend:q=>g(q,E[a],"webhook",[y],!1)})]},y)})}}},{label:o("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:a=>{const{createdAt:i}=E[a];return e.jsx(it,{value:i,locale:r,shouldUpdate:!0})}}}],[E,r,p,o]),H=[e.jsx(Ue,{value:p.dateRange,onChange:j},"date-picker"),e.jsx(ke,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Ht,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:o("common.refresh")},"refresh")];return e.jsx(v,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(hs,{children:e.jsxs(ot,{theme:b,children:[e.jsx(dt,{className:"receivers-table",locale:r,loading:B,columns:R,data:E,onChange:se,options:ae,customButtons:H,components:{TableFilterList:a=>e.jsx($e,{...a,itemComponent:i=>e.jsx(Te,{...i,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Oe,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:ce,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(gs,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(v,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:je(I==null?void 0:I.channel).map(a=>{var F,K;const{type:i,pass:c,fail:y}=a;return!(I!=null&&I.result)||(F=I==null?void 0:I.result)!=null&&F[i]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:(K=I==null?void 0:I.result)!=null&&K[i]?Se.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ft,{}):e.jsx(tt,{size:12,sx:{color:Se.primary.main}}),e.jsx("span",{children:c})]},i):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:Se.error.main},children:[e.jsx(mt,{}),e.jsx("span",{children:y})]},i)})})]})}),k.anchorEl&&e.jsx(Oe,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:de,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(He,{loading:n,onCancel:de,onConfirm:h})})]})})})}const ms=x.memo(jt),hs=re.div`
2
2
  td.MuiTableCell-footer {
3
3
  border: none !important;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as z,r as i,u as W,a as P,b as R,j as e,P as b,L as H,d as Q,_ as Y,e as F,f as X,W as T,g as J,T as j,h as K,i as k,k as h,G as g,n as q,p as Z,C as ee,l as L}from"./index-B8IA5mbU.js";import{f as ne}from"./index-BojVbZw0.js";import{I as D}from"./index-rZ1SBrH_.js";import{M as V}from"./metric-CB_GPXBA.js";import{C as U}from"./click-to-copy-CYaDSQoy.js";import{w as se}from"./withStyles-DWhl0Lx-.js";var te=z(function(t,d,r){return t+(r?" ":"")+d.toLowerCase()});const B=i.createContext({}),{Provider:ae,Consumer:ge}=B;function re({children:t}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,a]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||a(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});a(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(a(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),P(R.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),P(R.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(S=>S.did!==m))}),P(R.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const y={loading:c,error:u,users:s,refresh:f};return e.jsx(ae,{value:{users:y},children:t})}function oe(){const{users:t}=i.useContext(B);return t}const v={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},ie=(t,d)=>{const[r,u]=i.useState(0),l=s=>s>=v.oneDay?v.oneDay:s>=v.oneHour?v.oneHour:s>=v.oneMin?v.oneMin:v.oneSecond,[c,a]=i.useState(l(t/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(t/1e3+r+c);c!==p&&a(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),a(l(t/1e3))},[t]),d(t+r*1e3)};b.number.isRequired,b.func;const le=async t=>{const d=await t.getNodeEnv();return Object.assign({},d.info||{})};se(t=>({root:{height:20},colorPrimary:{backgroundColor:t.palette.grey[t.palette.mode==="light"?200:700]},bar:{backgroundColor:"#1a90ff"}}))(H);b.number.isRequired;b.string.isRequired,b.string.isRequired,b.string.isRequired;function ce(){const{info:t,api:d,loading:r}=W(),{data:u,externalData:l}=Q(),{users:c}=oe(),a=Y(()=>le(d)),{t:s,locale:p}=i.useContext(F),_=X(),f=ie(+new Date-t.startAt,o=>{const m={compact:!0,verbose:!0,locale:L(p)};return Z(o,m)});let y=null;if(r)y=e.jsx(ee,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(T,{did:t.did,showQrcode:!0})}];t.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(T,{did:t.nodeOwner.did,showQrcode:!0})});let m=[];t.launcher&&(m=[{name:s("common.did"),value:e.jsx(T,{did:t.launcher.did,showQrcode:!0})},{name:s("common.type"),value:t.launcher.type},{name:s("launcher.provider"),value:t.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(J,{target:"_blank",href:t.launcher.url,underline:"hover",children:t.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(U,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(U,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(U,{children:w})]})]}),S=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(a.value.ip.internalV4,a.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(a.value.ip.externalV4,a.value.ip.externalV6)}];return a.value.docker?[]:n},$=a.value?[{name:`${s("common.version")}`,value:t.version},...S(),{name:`${s("common.os")}`,value:a.value.os},a.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,a.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(K(a,"value.blockletEngines",null))&&a.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{$.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const G=c.length,I=c.filter(n=>n.approved).length;let M=G;I&&(M+=`<small><strong>${te(s("common.approved"))} ${I}</strong></small>`);let N=0,C=0;u&&(N=u.length,C=u.filter(n=>n.status==="running").length),Array.isArray(l)&&(N+=l.length,C+=l.filter(n=>n.status==="running").length);let A=N;C&&(A+=`<small>${s("common.running")} ${C}</small>`);const O=[{name:s("common.blocklets"),value:A},{name:s("common.members"),value:M},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ne(new Date(t.createdAt).getTime(),L(p))}];let E=[];a.value&&a.value.disk&&Object.values(a.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(a.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(a.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(a.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(a.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(a.value.disk.app||0).toUpperCase()}]),y=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(g,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:O.map(n=>e.jsx(g,{item:!0,xl:2,lg:3,md:4,sm:6,xs:6,children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(g,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(g,{item:!0,xl:2,lg:3,md:4,sm:6,xs:6,children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(g,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(g,{item:!0,lg:6,md:12,sm:12,xs:12,children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx(D,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx(D,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(g,{item:!0,lg:6,md:12,sm:12,xs:12,children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),$.map(n=>e.jsx(D,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(me,{children:y})}const me=q.main`
1
+ import{c as z,r as i,u as W,a as P,b as R,j as e,P as b,L as H,d as Q,_ as Y,e as F,f as X,W as T,g as J,T as j,h as K,i as k,k as h,G as g,n as q,p as Z,C as ee,l as L}from"./index-BsTEuRio.js";import{f as ne}from"./index-BojVbZw0.js";import{I as D}from"./index-DuyB74pI.js";import{M as V}from"./metric-BcRet1lX.js";import{C as U}from"./click-to-copy-CiS9u8Lz.js";import{w as se}from"./withStyles-D2YScWal.js";var te=z(function(t,d,r){return t+(r?" ":"")+d.toLowerCase()});const B=i.createContext({}),{Provider:ae,Consumer:ge}=B;function re({children:t}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,a]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||a(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});a(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(a(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),P(R.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),P(R.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(S=>S.did!==m))}),P(R.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const y={loading:c,error:u,users:s,refresh:f};return e.jsx(ae,{value:{users:y},children:t})}function oe(){const{users:t}=i.useContext(B);return t}const v={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},ie=(t,d)=>{const[r,u]=i.useState(0),l=s=>s>=v.oneDay?v.oneDay:s>=v.oneHour?v.oneHour:s>=v.oneMin?v.oneMin:v.oneSecond,[c,a]=i.useState(l(t/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(t/1e3+r+c);c!==p&&a(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),a(l(t/1e3))},[t]),d(t+r*1e3)};b.number.isRequired,b.func;const le=async t=>{const d=await t.getNodeEnv();return Object.assign({},d.info||{})};se(t=>({root:{height:20},colorPrimary:{backgroundColor:t.palette.grey[t.palette.mode==="light"?200:700]},bar:{backgroundColor:"#1a90ff"}}))(H);b.number.isRequired;b.string.isRequired,b.string.isRequired,b.string.isRequired;function ce(){const{info:t,api:d,loading:r}=W(),{data:u,externalData:l}=Q(),{users:c}=oe(),a=Y(()=>le(d)),{t:s,locale:p}=i.useContext(F),_=X(),f=ie(+new Date-t.startAt,o=>{const m={compact:!0,verbose:!0,locale:L(p)};return Z(o,m)});let y=null;if(r)y=e.jsx(ee,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(T,{did:t.did,showQrcode:!0})}];t.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(T,{did:t.nodeOwner.did,showQrcode:!0})});let m=[];t.launcher&&(m=[{name:s("common.did"),value:e.jsx(T,{did:t.launcher.did,showQrcode:!0})},{name:s("common.type"),value:t.launcher.type},{name:s("launcher.provider"),value:t.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(J,{target:"_blank",href:t.launcher.url,underline:"hover",children:t.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(U,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(U,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(U,{children:w})]})]}),S=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(a.value.ip.internalV4,a.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(a.value.ip.externalV4,a.value.ip.externalV6)}];return a.value.docker?[]:n},$=a.value?[{name:`${s("common.version")}`,value:t.version},...S(),{name:`${s("common.os")}`,value:a.value.os},a.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,a.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(K(a,"value.blockletEngines",null))&&a.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{$.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const G=c.length,I=c.filter(n=>n.approved).length;let M=G;I&&(M+=`<small><strong>${te(s("common.approved"))} ${I}</strong></small>`);let N=0,C=0;u&&(N=u.length,C=u.filter(n=>n.status==="running").length),Array.isArray(l)&&(N+=l.length,C+=l.filter(n=>n.status==="running").length);let A=N;C&&(A+=`<small>${s("common.running")} ${C}</small>`);const O=[{name:s("common.blocklets"),value:A},{name:s("common.members"),value:M},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ne(new Date(t.createdAt).getTime(),L(p))}];let E=[];a.value&&a.value.disk&&Object.values(a.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(a.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(a.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(a.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(a.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(a.value.disk.app||0).toUpperCase()}]),y=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(g,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:O.map(n=>e.jsx(g,{item:!0,xl:2,lg:3,md:4,sm:6,xs:6,children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(g,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(g,{item:!0,xl:2,lg:3,md:4,sm:6,xs:6,children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(g,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(g,{item:!0,lg:6,md:12,sm:12,xs:12,children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx(D,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx(D,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(g,{item:!0,lg:6,md:12,sm:12,xs:12,children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),$.map(n=>e.jsx(D,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(me,{children:y})}const me=q.main`
2
2
  .page-header {
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -1 +1 @@
1
- import{z as g,bq as v,u as y,j as r,Q as f,U as x,V as h}from"./index-B8IA5mbU.js";import{L as j,D as b}from"./download-mU0RETFZ.js";import{_ as L}from"./useLocalStorage-CRy7LFYG.js";import"./ButtonGroup-BzAT8pGA.js";import"./getValidReactChildren-CxwCdnNW.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(j,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(b,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
1
+ import{z as g,bq as v,u as y,j as r,Q as f,U as x,V as h}from"./index-BsTEuRio.js";import{L as j,D as b}from"./download-D2RXPhXc.js";import{_ as L}from"./useLocalStorage-DdJoK4w7.js";import"./ButtonGroup-B3J8Qdyl.js";import"./getValidReactChildren-BhCPp8PX.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(j,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(b,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
@@ -1,4 +1,4 @@
1
- import{cG as qm,bm as s2,ia as tT,bf as Km,cU as jm,bi as l2,r as u2,bg as Jm}from"./index-B8IA5mbU.js";/*! *****************************************************************************
1
+ import{cG as qm,bm as s2,ia as tT,bf as Km,cU as jm,bi as l2,r as u2,bg as Jm}from"./index-BsTEuRio.js";/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,4 +1,4 @@
1
- import{P as O,n as te,N as b,r as F,j as e,a_ as I,k as ue,ki as me,bm as fe,br as ie,m as ne,gM as se,fT as ae,aU as oe,cv as x,A as C,t as g,kj as V,kk as Q,aZ as Z,Q as y,aC as he,B as D,y as xe,x as pe,F as je,e as ge,bD as ve}from"./index-B8IA5mbU.js";import{T as ye}from"./index-Cy666DOY.js";import{u as le,C as j}from"./index.esm-F8b32K2k.js";import{A as be,a as we,d as Re,b as Te}from"./collapse-BhbkfN99.js";import{f as Se}from"./index-zsz18EZU.js";import{u as ce}from"./blocklet-BzkaFDNW.js";import{S as X}from"./Switch-CG3jQlg3.js";function p({title:u,desc:i,link:r,sectionLeftSx:f,sectionRightSx:w,children:h,...P}){const S=F.useMemo(()=>r?i?i.replace(/<b>(.*?)<\/b>/g,`<a href="${r}" target="_blank" rel="noopener noreferrer">$1</a>`):"":i,[i,r]);return e.jsx(Ee,{...P,children:e.jsxs(I,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[e.jsxs(b,{className:"section-left",sx:f,children:[e.jsx(ue,{className:"section-title",children:u}),e.jsx(b,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:S}})]}),e.jsx(I,{className:"section-content",direction:"column",sx:{width:"100%",...w},children:h})]})})}p.propTypes={title:O.string.isRequired,children:O.node.isRequired,desc:O.string,sectionLeftSx:O.object,sectionRightSx:O.object,link:O.node};p.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{},link:""};const Ee=te(b)`
1
+ import{P as O,n as te,N as b,r as F,j as e,a_ as I,k as ue,ki as me,bm as fe,br as ie,m as ne,gM as se,fT as ae,aU as oe,cv as x,A as C,t as g,kj as V,kk as Q,aZ as Z,Q as y,aC as he,B as D,y as xe,x as pe,F as je,e as ge,bD as ve}from"./index-BsTEuRio.js";import{T as ye}from"./index-DdKwcnDa.js";import{u as le,C as j}from"./index.esm-BeKnx9US.js";import{A as be,a as we,d as Re,b as Te}from"./collapse-De1M4hZU.js";import{f as Se}from"./index-Dy6Ndspk.js";import{u as ce}from"./blocklet-C56CLqfn.js";import{S as X}from"./Switch-D1aSf0Rk.js";function p({title:u,desc:i,link:r,sectionLeftSx:f,sectionRightSx:w,children:h,...P}){const S=F.useMemo(()=>r?i?i.replace(/<b>(.*?)<\/b>/g,`<a href="${r}" target="_blank" rel="noopener noreferrer">$1</a>`):"":i,[i,r]);return e.jsx(Ee,{...P,children:e.jsxs(I,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[e.jsxs(b,{className:"section-left",sx:f,children:[e.jsx(ue,{className:"section-title",children:u}),e.jsx(b,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:S}})]}),e.jsx(I,{className:"section-content",direction:"column",sx:{width:"100%",...w},children:h})]})})}p.propTypes={title:O.string.isRequired,children:O.node.isRequired,desc:O.string,sectionLeftSx:O.object,sectionRightSx:O.object,link:O.node};p.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{},link:""};const Ee=te(b)`
2
2
  display: flex;
3
3
  align-items: flex-start;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{bX as createSvgIcon,j as jsxRuntimeExports,r as reactExports,P as PropTypes,bm as getDefaultExportFromCjs,n as newStyled,H as useMediaQuery,dx as Skeleton,cS as Img,a1 as default_1$1,aC as Tooltip,ep as Button,k as Typography,C as CircularProgress,b9 as styled,am as useTheme,ff as isObject,dB as deepmerge,dT as StyledEngineProvider,dU as ThemeProvider,fH as ThemeProvider$1,fI as HeaderAddons,fJ as Hidden,$ as Center,aQ as requireCreateSvgIcon,aR as interopRequireDefaultExports,fK as Check,d8 as commonjsGlobal,cG as Buffer,bi as React,fj as noop,bC as __vitePreload,dq as styled$1}from"./index-B8IA5mbU.js";import{j as joinUrl}from"./url-join-BSWLYThb.js";import{C as CloseIcon}from"./Close-C8GsrnLa.js";const PriorityHigh=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh"),StepContext=reactExports.createContext(),{Provider}=StepContext,matchPath=(i,s,a=window.location.pathname.replace(/\/$/,"/"))=>i?s?i===a:new RegExp(i).test(a):!1;function StepProvider({children:i,steps:s,mode:a}){const[o,u]=reactExports.useState("");!o&&s.length&&u(s[0].key);const S=s.map(T=>T.children?[{key:T.key,hasChild:!0},T.children.map(O=>({parentKey:T.key,key:O.key}))]:{key:T.key}).flat(1/0),P=S.filter(T=>!T.hasChild),C=T=>{let O;const D=S.findIndex(H=>H.key===o?(O=H.parentKey,!0):!1);if(O===T)return"current";const L=S.findIndex(H=>H.key===T);if(L!==-1){if(L===D)return"current";if(L<D)return"before"}return"after"};function E(T){u(T)}function _(T){if(typeof T=="function"){const O=T(P.findIndex(D=>D.key===o));u(P[O].key)}else u(P[T].key)}const I=P.findIndex(T=>T.key===o);reactExports.useEffect(()=>{if(a==="history"){let T="";s.some(O=>O.children&&O.children.length?O.children.some(D=>matchPath(D.path,D.exact)?(T=D.key,!0):!1):matchPath(O.path,O.exact)?(T=O.key,!0):!1),T&&u(T)}return()=>{}},[s,a]);const j={steps:s,totalStepsCount:P.length,getStepStatus:C,setActiveStepByKey:E,setActiveStepByIndex:_,activeStep:I,canBackToStep:T=>a==="memory"&&I!==0&&T<I};return jsxRuntimeExports.jsx(Provider,{value:j,children:i})}function useStepContext(){return reactExports.useContext(StepContext)}StepProvider.propTypes={children:PropTypes.any.isRequired,steps:PropTypes.array.isRequired,mode:PropTypes.string};StepProvider.defaultProps={mode:"history"};var has=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;function isEmpty(i){if(i==null)return!0;if(typeof i=="boolean")return!1;if(typeof i=="number")return i===0;if(typeof i=="string"||typeof i=="function"||Array.isArray(i))return i.length===0;if(i instanceof Error)return i.message==="";if(i.toString==toString)switch(i.toString()){case"[object File]":case"[object Map]":case"[object Set]":return i.size===0;case"[object Object]":{for(var s in i)if(has.call(i,s))return!1;return!0}}return!1}var lib=isEmpty;const isEmpty$1=getDefaultExportFromCjs(lib),defaultBlockletLogo=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,translations={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},getTranslations=i=>translations[i]?translations[i]:translations.en,getLaunchingText=i=>i==="zh"?"启动":"Launching",getBlockletDisplayName=i=>(i==null?void 0:i.title)||(i==null?void 0:i.name)||"";function AppHeader({blockletMeta:i,subTitle:s,logoUrl:a,locale:o,navLogo:u,loading:S}){const P=useMediaQuery(j=>j.breakpoints.down("md")),C=P?18:48,E=reactExports.useRef(null),[_,I]=reactExports.useState("");return reactExports.useEffect(()=>{E.current&&E.current.offsetHeight>34&&(_===""?I("middle"):_==="middle"&&I("small"))},[_]),jsxRuntimeExports.jsxs(Container$2,{className:_==="small"?"center-mode":"",children:[P?jsxRuntimeExports.jsx("div",{className:"app-icon",children:u}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[S&&jsxRuntimeExports.jsx(AppIconSkeleton,{blockletSize:C,isMobile:P}),!S&&jsxRuntimeExports.jsx(AppIcon,{blockletSize:C,logoUrl:a})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[P&&s&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:s}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!P&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:s||getLaunchingText(o)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${_==="middle"||_==="small"?"middle-size":""}`,ref:E,children:jsxRuntimeExports.jsx(AppTitle,{logoUrl:a,isMobile:P,blockletMeta:i,blockletSize:C,loading:S})})]})]})]})}AppHeader.propTypes={blockletMeta:PropTypes.object,subTitle:PropTypes.any,logoUrl:PropTypes.string,locale:PropTypes.string,navLogo:PropTypes.any,loading:PropTypes.bool};AppHeader.defaultProps={subTitle:"",logoUrl:"",locale:"",navLogo:"",loading:!1,blockletMeta:{}};function AppIconSkeleton({blockletSize:i,isMobile:s}){return s?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:i,height:i})}function AppIcon({logoUrl:i,blockletSize:s}){return jsxRuntimeExports.jsx(Img,{width:s,height:s,src:i,alt:"blocklet icon",fallback:defaultBlockletLogo,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${i}`)}function AppTitle({isMobile:i,logoUrl:s,blockletMeta:a,blockletSize:o,loading:u}){const S=getBlockletDisplayName(a);return u?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):isEmpty$1(a)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):i?jsxRuntimeExports.jsxs(MobileTitleStyle,{children:[jsxRuntimeExports.jsx(AppIcon,{blockletSize:o,logoUrl:s}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:getBlockletDisplayName(a)})]}):jsxRuntimeExports.jsx(AppLink,{className:"app-link",target:"_blank",href:joinUrl((a==null?void 0:a.registryUrl)||"",`/blocklets/${a==null?void 0:a.did}`),title:S,children:S})}const MobileTitleStyle=newStyled.div`
1
+ import{bX as createSvgIcon,j as jsxRuntimeExports,r as reactExports,P as PropTypes,bm as getDefaultExportFromCjs,n as newStyled,H as useMediaQuery,dx as Skeleton,cS as Img,a1 as default_1$1,aC as Tooltip,ep as Button,k as Typography,C as CircularProgress,b9 as styled,am as useTheme,ff as isObject,dB as deepmerge,dT as StyledEngineProvider,dU as ThemeProvider,fH as ThemeProvider$1,fI as HeaderAddons,fJ as Hidden,$ as Center,aQ as requireCreateSvgIcon,aR as interopRequireDefaultExports,fK as Check,d8 as commonjsGlobal,cG as Buffer,bi as React,fj as noop,bC as __vitePreload,dq as styled$1}from"./index-BsTEuRio.js";import{j as joinUrl}from"./url-join-BT4uwgMW.js";import{C as CloseIcon}from"./Close-DRWGcKKl.js";const PriorityHigh=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh"),StepContext=reactExports.createContext(),{Provider}=StepContext,matchPath=(i,s,a=window.location.pathname.replace(/\/$/,"/"))=>i?s?i===a:new RegExp(i).test(a):!1;function StepProvider({children:i,steps:s,mode:a}){const[o,u]=reactExports.useState("");!o&&s.length&&u(s[0].key);const S=s.map(T=>T.children?[{key:T.key,hasChild:!0},T.children.map(O=>({parentKey:T.key,key:O.key}))]:{key:T.key}).flat(1/0),P=S.filter(T=>!T.hasChild),C=T=>{let O;const D=S.findIndex(H=>H.key===o?(O=H.parentKey,!0):!1);if(O===T)return"current";const L=S.findIndex(H=>H.key===T);if(L!==-1){if(L===D)return"current";if(L<D)return"before"}return"after"};function E(T){u(T)}function _(T){if(typeof T=="function"){const O=T(P.findIndex(D=>D.key===o));u(P[O].key)}else u(P[T].key)}const I=P.findIndex(T=>T.key===o);reactExports.useEffect(()=>{if(a==="history"){let T="";s.some(O=>O.children&&O.children.length?O.children.some(D=>matchPath(D.path,D.exact)?(T=D.key,!0):!1):matchPath(O.path,O.exact)?(T=O.key,!0):!1),T&&u(T)}return()=>{}},[s,a]);const j={steps:s,totalStepsCount:P.length,getStepStatus:C,setActiveStepByKey:E,setActiveStepByIndex:_,activeStep:I,canBackToStep:T=>a==="memory"&&I!==0&&T<I};return jsxRuntimeExports.jsx(Provider,{value:j,children:i})}function useStepContext(){return reactExports.useContext(StepContext)}StepProvider.propTypes={children:PropTypes.any.isRequired,steps:PropTypes.array.isRequired,mode:PropTypes.string};StepProvider.defaultProps={mode:"history"};var has=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;function isEmpty(i){if(i==null)return!0;if(typeof i=="boolean")return!1;if(typeof i=="number")return i===0;if(typeof i=="string"||typeof i=="function"||Array.isArray(i))return i.length===0;if(i instanceof Error)return i.message==="";if(i.toString==toString)switch(i.toString()){case"[object File]":case"[object Map]":case"[object Set]":return i.size===0;case"[object Object]":{for(var s in i)if(has.call(i,s))return!1;return!0}}return!1}var lib=isEmpty;const isEmpty$1=getDefaultExportFromCjs(lib),defaultBlockletLogo=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,translations={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},getTranslations=i=>translations[i]?translations[i]:translations.en,getLaunchingText=i=>i==="zh"?"启动":"Launching",getBlockletDisplayName=i=>(i==null?void 0:i.title)||(i==null?void 0:i.name)||"";function AppHeader({blockletMeta:i,subTitle:s,logoUrl:a,locale:o,navLogo:u,loading:S}){const P=useMediaQuery(j=>j.breakpoints.down("md")),C=P?18:48,E=reactExports.useRef(null),[_,I]=reactExports.useState("");return reactExports.useEffect(()=>{E.current&&E.current.offsetHeight>34&&(_===""?I("middle"):_==="middle"&&I("small"))},[_]),jsxRuntimeExports.jsxs(Container$2,{className:_==="small"?"center-mode":"",children:[P?jsxRuntimeExports.jsx("div",{className:"app-icon",children:u}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[S&&jsxRuntimeExports.jsx(AppIconSkeleton,{blockletSize:C,isMobile:P}),!S&&jsxRuntimeExports.jsx(AppIcon,{blockletSize:C,logoUrl:a})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[P&&s&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:s}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!P&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:s||getLaunchingText(o)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${_==="middle"||_==="small"?"middle-size":""}`,ref:E,children:jsxRuntimeExports.jsx(AppTitle,{logoUrl:a,isMobile:P,blockletMeta:i,blockletSize:C,loading:S})})]})]})]})}AppHeader.propTypes={blockletMeta:PropTypes.object,subTitle:PropTypes.any,logoUrl:PropTypes.string,locale:PropTypes.string,navLogo:PropTypes.any,loading:PropTypes.bool};AppHeader.defaultProps={subTitle:"",logoUrl:"",locale:"",navLogo:"",loading:!1,blockletMeta:{}};function AppIconSkeleton({blockletSize:i,isMobile:s}){return s?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:i,height:i})}function AppIcon({logoUrl:i,blockletSize:s}){return jsxRuntimeExports.jsx(Img,{width:s,height:s,src:i,alt:"blocklet icon",fallback:defaultBlockletLogo,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${i}`)}function AppTitle({isMobile:i,logoUrl:s,blockletMeta:a,blockletSize:o,loading:u}){const S=getBlockletDisplayName(a);return u?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):isEmpty$1(a)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):i?jsxRuntimeExports.jsxs(MobileTitleStyle,{children:[jsxRuntimeExports.jsx(AppIcon,{blockletSize:o,logoUrl:s}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:getBlockletDisplayName(a)})]}):jsxRuntimeExports.jsx(AppLink,{className:"app-link",target:"_blank",href:joinUrl((a==null?void 0:a.registryUrl)||"",`/blocklets/${a==null?void 0:a.did}`),title:S,children:S})}const MobileTitleStyle=newStyled.div`
2
2
  .ellipsis-title {
3
3
  flex: 1;
4
4
  position: absolute;