ep-lib-ts 1.0.37 → 1.0.40

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 (304) hide show
  1. package/dist/BgAudio-o-6UyPLQ.js +4 -0
  2. package/dist/DisplayBox-kNQglpGH.js +4 -0
  3. package/dist/{Ep360Image-BZpa7qLl.js → Ep360Image-Dmwx7NrY.js} +1 -1
  4. package/dist/{Ep360Video-Wy_YWl7-.js → Ep360Video-b_stvC2Z.js} +1 -1
  5. package/dist/EpAlert-DyFkfcBY.js +4 -0
  6. package/dist/EpAudio-D33uLLKW.js +4 -0
  7. package/dist/EpAvatar-VKpJzHex.js +4 -0
  8. package/dist/EpBadge-BZKe8gkM.js +4 -0
  9. package/dist/EpBarChart-DSbJgjP4.js +4 -0
  10. package/dist/{EpBranchingScenario-5sbzBXZ0.js → EpBranchingScenario-HmQ5tqNL.js} +11 -11
  11. package/dist/EpBtn-eQgJ7t7X.js +4 -0
  12. package/dist/EpCard-DmkbiqF8.js +4 -0
  13. package/dist/EpCardLink-CZktIRDZ.js +4 -0
  14. package/dist/{EpCheckbox.vue_vue_type_script_setup_true_lang-Dqi62vJ8.js → EpCheckbox-D-AiG1k1.js} +7 -7
  15. package/dist/EpChip-CvPvgb7r.js +4 -0
  16. package/dist/EpCodeblock-CWJ6fozJ.js +4 -0
  17. package/dist/EpConclusion-B5-N829f.js +4 -0
  18. package/dist/EpContentSlider-CwCS1urD.js +4 -0
  19. package/dist/{EpDarkmode-CuVlLi72.js → EpDarkmode-DgXjweO7.js} +1 -1
  20. package/dist/EpDescription-CpkftJ_t.js +4 -0
  21. package/dist/EpDivider-Cm9VAuRM.js +4 -0
  22. package/dist/EpEdu-l9pEISFf.js +4 -0
  23. package/dist/EpFlex-C5fyq8lg.js +4 -0
  24. package/dist/EpFunnelChart-CH_6LUvo.js +4 -0
  25. package/dist/EpHeader-CCvORAE4.js +4 -0
  26. package/dist/EpHover-oFN3yCY9.js +4 -0
  27. package/dist/EpHoverCard-CtASruWi.js +4 -0
  28. package/dist/EpIcon-CbmGlHE2.js +4 -0
  29. package/dist/EpIframe-Dnb7aND_.js +4 -0
  30. package/dist/EpImg-DB5ZMjSu.js +4 -0
  31. package/dist/{EpInput-BKc_tU1_.js → EpInput-CaN-TCpG.js} +42 -42
  32. package/dist/EpInstructions-CaWQD2qB.js +4 -0
  33. package/dist/EpIntroduction-CI0_D2yu.js +4 -0
  34. package/dist/EpLineChart-LJX0c0Nf.js +4 -0
  35. package/dist/EpLink-DPB7Nepc.js +4 -0
  36. package/dist/EpLinkVersion-CKWqW5AF.js +4 -0
  37. package/dist/{EpList-B2x9zHps.js → EpList-DqsIwnA9.js} +1 -1
  38. package/dist/EpModal-B97mL5T-.js +4 -0
  39. package/dist/{EpNothing-D3fg3Krb.js → EpNothing-rOIFtbf1.js} +1 -1
  40. package/dist/EpObjective-rFX5IDy3.js +4 -0
  41. package/dist/EpPieChart-BS4qEe0K.js +4 -0
  42. package/dist/EpQuestion-D1jwZMyZ.js +4 -0
  43. package/dist/EpQuote-C4fI2kxZ.js +4 -0
  44. package/dist/EpRadio-mIf2ff8X.js +4 -0
  45. package/dist/EpRadioSummative-Bx66akYL.js +4 -0
  46. package/dist/EpReading-BFoNTxDy.js +4 -0
  47. package/dist/EpResource-8CZRcYtG.js +4 -0
  48. package/dist/EpScope-DTfD4VEM.js +4 -0
  49. package/dist/EpSection-CcxIByfH.js +4 -0
  50. package/dist/EpSectionCols-t1k3weXM.js +4 -0
  51. package/dist/EpSelect-C10jbOyP.js +33 -0
  52. package/dist/EpSkeleton-BlWjhOMG.js +4 -0
  53. package/dist/EpSoftware-BENDV3kt.js +4 -0
  54. package/dist/EpSpecificObjective-ByRW9R5i.js +4 -0
  55. package/dist/EpSpinner-C6KTvwwF.js +4 -0
  56. package/dist/EpStackedList-CyBiCT2q.js +4 -0
  57. package/dist/EpSummativeTable-7eMF30pz.js +4 -0
  58. package/dist/EpSvg-gHmfbp0I.js +4 -0
  59. package/dist/EpTable-hgRLqA3o.js +4 -0
  60. package/dist/EpTerm-DQhi12a3.js +4 -0
  61. package/dist/EpText-BVr0yeDd.js +4 -0
  62. package/dist/EpTimeLine-CqfJ9LEU.js +4 -0
  63. package/dist/EpVideo-cJCwDUcG.js +4 -0
  64. package/dist/EpVideoPanopto-CslIPs2L.js +4 -0
  65. package/dist/EpWordDef-DiIZxUFD.js +4 -0
  66. package/dist/components/basics/EpAvatar.vue.d.ts +35 -4
  67. package/dist/components/basics/EpBadge.vue.d.ts +28 -3
  68. package/dist/components/basics/EpBtn.vue.d.ts +38 -13
  69. package/dist/components/basics/EpCard.vue.d.ts +51 -14
  70. package/dist/components/basics/EpChip.vue.d.ts +38 -12
  71. package/dist/components/basics/EpDivider.vue.d.ts +34 -4
  72. package/dist/components/basics/EpFlex.vue.d.ts +2 -8
  73. package/dist/components/basics/EpHover.vue.d.ts +34 -12
  74. package/dist/components/basics/EpHoverCard.vue.d.ts +54 -18
  75. package/dist/components/basics/EpIcon.vue.d.ts +26 -3
  76. package/dist/components/basics/EpImg.vue.d.ts +39 -3
  77. package/dist/components/basics/EpList.vue.d.ts +11 -0
  78. package/dist/components/basics/EpListitem.vue.d.ts +45 -0
  79. package/dist/components/basics/EpSection.vue.d.ts +31 -10
  80. package/dist/components/basics/EpSectionCols.vue.d.ts +39 -11
  81. package/dist/components/basics/EpSpinner.vue.d.ts +29 -2
  82. package/dist/components/basics/EpStackedList.vue.d.ts +49 -7
  83. package/dist/components/basics/EpTable.vue.d.ts +18 -1
  84. package/dist/components/basics/EpText.vue.d.ts +33 -2
  85. package/dist/components/charts/EpBarChart.vue.d.ts +28 -2
  86. package/dist/components/charts/EpFunnelChart.vue.d.ts +35 -3
  87. package/dist/components/charts/EpLineChart.vue.d.ts +28 -2
  88. package/dist/components/charts/EpPieChart.vue.d.ts +31 -3
  89. package/dist/components/educationals/EpBranchingScenario.vue.d.ts +25 -2
  90. package/dist/components/educationals/EpCodeblock.vue.d.ts +33 -3
  91. package/dist/components/educationals/EpConclusion.vue.d.ts +25 -10
  92. package/dist/components/educationals/EpDescription.vue.d.ts +25 -10
  93. package/dist/components/educationals/EpEdu.vue.d.ts +37 -13
  94. package/dist/components/educationals/EpInstructions.vue.d.ts +23 -2
  95. package/dist/components/educationals/EpIntroduction.vue.d.ts +25 -10
  96. package/dist/components/educationals/EpObjective.vue.d.ts +25 -10
  97. package/dist/components/educationals/EpReading.vue.d.ts +50 -4
  98. package/dist/components/educationals/EpResource.vue.d.ts +24 -2
  99. package/dist/components/educationals/EpScope.vue.d.ts +19 -1
  100. package/dist/components/educationals/EpSpecificObjective.vue.d.ts +25 -2
  101. package/dist/components/forms/EpCheckbox.vue.d.ts +36 -5
  102. package/dist/components/forms/EpInput.vue.d.ts +44 -7
  103. package/dist/components/forms/EpRadio.vue.d.ts +39 -5
  104. package/dist/components/forms/EpRadioSummative.vue.d.ts +39 -5
  105. package/dist/components/forms/EpSelect.vue.d.ts +23 -12
  106. package/dist/components/forms/EpSwitch.vue.d.ts +58 -0
  107. package/dist/components/forms/EpTextarea.vue.d.ts +50 -7
  108. package/dist/components/forms/EpToggle.vue.d.ts +48 -7
  109. package/dist/components/interactions/Ep360Image.vue.d.ts +16 -0
  110. package/dist/components/interactions/Ep360Video.vue.d.ts +16 -0
  111. package/dist/components/interactions/EpAccordeon.vue.d.ts +34 -16
  112. package/dist/components/interactions/EpContentSlider.vue.d.ts +28 -2
  113. package/dist/components/interactions/EpDarkmode.vue.d.ts +3 -3
  114. package/dist/components/interactions/EpHotsPot.vue.d.ts +47 -0
  115. package/dist/components/interactions/EpModal.vue.d.ts +38 -13
  116. package/dist/components/interactions/EpQuestion.vue.d.ts +38 -2
  117. package/dist/components/interactions/EpSummativeTable.vue.d.ts +24 -2
  118. package/dist/components/interactions/EpTabs.vue.d.ts +1 -1
  119. package/dist/components/interactions/EpTooltip.vue.d.ts +51 -0
  120. package/dist/components/medias/EpAudio.vue.d.ts +30 -4
  121. package/dist/components/medias/EpCardLink.vue.d.ts +61 -0
  122. package/dist/components/medias/EpCarousel.vue.d.ts +32 -2
  123. package/dist/components/medias/EpIframe.vue.d.ts +28 -2
  124. package/dist/components/medias/EpKatex.vue.d.ts +24 -4
  125. package/dist/components/medias/EpLink.vue.d.ts +26 -2
  126. package/dist/components/medias/EpLinkVersion.vue.d.ts +29 -2
  127. package/dist/components/medias/EpLottieSvg.vue.d.ts +38 -144
  128. package/dist/components/medias/EpSoftware.vue.d.ts +36 -2
  129. package/dist/components/medias/EpSvg.vue.d.ts +24 -2
  130. package/dist/components/medias/EpTerm.vue.d.ts +41 -10
  131. package/dist/components/medias/EpTimeLine.vue.d.ts +19 -1
  132. package/dist/components/medias/EpVideo.vue.d.ts +28 -4
  133. package/dist/components/medias/EpVideoPanopto.vue.d.ts +28 -2
  134. package/dist/components/medias/EpWordDef.vue.d.ts +33 -2
  135. package/dist/components/signages/EpAlert.vue.d.ts +31 -12
  136. package/dist/components/signages/EpBadge.vue.d.ts +59 -0
  137. package/dist/components/signages/EpHeader.vue.d.ts +62 -19
  138. package/dist/components/signages/EpNothing.vue.d.ts +1 -1
  139. package/dist/components/signages/EpQuote.vue.d.ts +31 -10
  140. package/dist/components/signages/EpSkeleton.vue.d.ts +32 -3
  141. package/dist/components/tools/BgAudio.vue.d.ts +26 -4
  142. package/dist/components/tools/DisplayBox.vue.d.ts +9 -19
  143. package/dist/components/tools/SvgFilter.vue.d.ts +1 -1
  144. package/dist/components/tools/TimelineItem.vue.d.ts +28 -4
  145. package/dist/ep-lib-ts.js +44 -41
  146. package/dist/ep-lib-ts.umd.cjs +284 -284
  147. package/dist/{index-1vY3QtSb.js → index-BIs_9STK.js} +4060 -3874
  148. package/dist/{index-BkHXngnv.js → index-mAWa7blx.js} +6072 -5855
  149. package/dist/index.d.ts +5 -1
  150. package/dist/main.d.ts +1 -0
  151. package/dist/prism-EB5WECGI.js +1182 -0
  152. package/dist/three.module-laS36oD-.js +48903 -0
  153. package/dist/types/Answer.d.ts +1 -0
  154. package/dist/types/Component.d.ts +10 -0
  155. package/dist/types/Hover.d.ts +2 -2
  156. package/dist/types/Medias.d.ts +1 -0
  157. package/dist/types/StackedList.d.ts +10 -43
  158. package/package.json +30 -31
  159. package/src/components/basics/EpCard.vue +32 -11
  160. package/src/components/basics/EpHover.vue +3 -3
  161. package/src/components/basics/EpHoverCard.vue +14 -12
  162. package/src/components/basics/EpStackedList.vue +39 -32
  163. package/src/components/charts/EpFunnelChart.vue +1 -1
  164. package/src/components/charts/EpPieChart.vue +1 -1
  165. package/src/components/educationals/EpCodeblock.vue +1 -1
  166. package/src/components/educationals/EpEdu.vue +32 -14
  167. package/src/components/educationals/EpReading.vue +4 -2
  168. package/src/components/educationals/EpResource.vue +1 -1
  169. package/src/components/forms/EpSelect.vue +8 -3
  170. package/src/components/interactions/EpQuestion.vue +1 -1
  171. package/src/components/medias/EpAudio.vue +1 -1
  172. package/src/components/medias/EpCardLink.vue +77 -0
  173. package/src/components/medias/EpIframe.vue +1 -1
  174. package/src/components/medias/EpLink.vue +1 -1
  175. package/src/components/medias/EpTimeLine.vue +2 -2
  176. package/src/components/medias/EpVideo.vue +1 -1
  177. package/src/components/medias/EpVideoPanopto.vue +1 -1
  178. package/dist/App.vue.d.ts +0 -2
  179. package/dist/BgAudio-DezFnyKB.js +0 -4
  180. package/dist/DisplayBox-DYzeHzkr.js +0 -4
  181. package/dist/EpAlert-DdtU5nno.js +0 -4
  182. package/dist/EpAudio-vt4JUOf2.js +0 -4
  183. package/dist/EpAvatar-DTfkDxUP.js +0 -4
  184. package/dist/EpAvatar.vue_vue_type_script_setup_true_lang-IeQ9W4tD.js +0 -50
  185. package/dist/EpBadge-BSMtvAqC.js +0 -4
  186. package/dist/EpBarChart-BA3EqJ-Z.js +0 -4
  187. package/dist/EpBtn-B1xGgn2Y.js +0 -4
  188. package/dist/EpCard-CEjoqwN4.js +0 -4
  189. package/dist/EpCheckbox-Da_2WoCs.js +0 -4
  190. package/dist/EpChip-d8r-FDqu.js +0 -4
  191. package/dist/EpCodeblock-Cu1MOvmi.js +0 -4
  192. package/dist/EpConclusion-Dk_FFixG.js +0 -4
  193. package/dist/EpContentSlider-dx8Hu4OS.js +0 -4
  194. package/dist/EpDescription-B00PjQg0.js +0 -4
  195. package/dist/EpDivider-CukqZw1a.js +0 -4
  196. package/dist/EpEdu-B5N7RG49.js +0 -4
  197. package/dist/EpFlex-DAtWa--7.js +0 -4
  198. package/dist/EpFunnelChart-jn5C9tAB.js +0 -4
  199. package/dist/EpHeader-Cwx5Qb6Q.js +0 -4
  200. package/dist/EpHover-Kp8XbqYO.js +0 -4
  201. package/dist/EpHover.vue_vue_type_script_setup_true_lang-BxiamS7-.js +0 -36
  202. package/dist/EpHoverCard-DRRYl4MK.js +0 -84
  203. package/dist/EpIcon-DitBbcuQ.js +0 -4
  204. package/dist/EpIframe-C5c1K8RE.js +0 -4
  205. package/dist/EpImg-YPH6mMcR.js +0 -4
  206. package/dist/EpInstructions-D8kw_rwC.js +0 -4
  207. package/dist/EpIntroduction-B2d2vChC.js +0 -4
  208. package/dist/EpLineChart-BjlCf9dW.js +0 -4
  209. package/dist/EpLink-CXIYlycG.js +0 -4
  210. package/dist/EpLinkVersion-Dn_Tid-r.js +0 -4
  211. package/dist/EpModal-CaPOVdQK.js +0 -4
  212. package/dist/EpObjective-czDKm1c4.js +0 -4
  213. package/dist/EpPieChart-DuW7EBmx.js +0 -4
  214. package/dist/EpQuestion-BuIkR2Ae.js +0 -4
  215. package/dist/EpQuote-5FQFWcfv.js +0 -4
  216. package/dist/EpRadio-BnPZeKpP.js +0 -4
  217. package/dist/EpRadioSummative-AtVwjeQ-.js +0 -4
  218. package/dist/EpReading-s2TQVAZ_.js +0 -4
  219. package/dist/EpResource-Cxx1lwrs.js +0 -4
  220. package/dist/EpScope-CG9n9QnC.js +0 -4
  221. package/dist/EpSection-cDQVtX9A.js +0 -4
  222. package/dist/EpSectionCols-DsH_iEem.js +0 -4
  223. package/dist/EpSelect-kjH_wTXb.js +0 -32
  224. package/dist/EpSkeleton-BQG8jrs6.js +0 -4
  225. package/dist/EpSoftware-DR1d7ezZ.js +0 -4
  226. package/dist/EpSpecificObjective-BS1QMNrt.js +0 -4
  227. package/dist/EpSpinner-O3kZ_dUO.js +0 -4
  228. package/dist/EpStackedList-CTU_KKMZ.js +0 -81
  229. package/dist/EpSummativeTable-iudwhrUL.js +0 -4
  230. package/dist/EpSvg-Bnj4H9sA.js +0 -4
  231. package/dist/EpTable-Byza5VY-.js +0 -4
  232. package/dist/EpTerm-BkpUPK_G.js +0 -4
  233. package/dist/EpText-J0qcEorF.js +0 -4
  234. package/dist/EpTimeLine-Czscwhgg.js +0 -4
  235. package/dist/EpVideo-0w267ZqV.js +0 -4
  236. package/dist/EpVideoPanopto-CDy_LUMi.js +0 -4
  237. package/dist/EpWordDef-qWt87mhg.js +0 -4
  238. package/dist/menu.vue.d.ts +0 -2
  239. package/dist/pages/Basics.vue.d.ts +0 -2
  240. package/dist/pages/CurrentDev.vue.d.ts +0 -2
  241. package/dist/pages/Educationals.vue.d.ts +0 -2
  242. package/dist/pages/Forms.vue.d.ts +0 -2
  243. package/dist/pages/Home.vue.d.ts +0 -2
  244. package/dist/pages/Interactions.vue.d.ts +0 -2
  245. package/dist/pages/Medias.vue.d.ts +0 -2
  246. package/dist/pages/NicDev.vue.d.ts +0 -2
  247. package/dist/pages/Signages.vue.d.ts +0 -2
  248. package/dist/pages/basics/EpBadgeView.vue.d.ts +0 -2
  249. package/dist/pages/basics/EpBtnView.vue.d.ts +0 -2
  250. package/dist/pages/basics/EpCardView.vue.d.ts +0 -2
  251. package/dist/pages/basics/EpChipView.vue.d.ts +0 -2
  252. package/dist/pages/basics/EpFlexView.vue.d.ts +0 -2
  253. package/dist/pages/basics/EpHoverCardView.vue.d.ts +0 -2
  254. package/dist/pages/basics/EpIconView.vue.d.ts +0 -2
  255. package/dist/pages/basics/EpImgView.vue.d.ts +0 -2
  256. package/dist/pages/basics/EpSectionColsView.vue.d.ts +0 -2
  257. package/dist/pages/basics/EpSectionView.vue.d.ts +0 -2
  258. package/dist/pages/basics/EpStackedListView.vue.d.ts +0 -2
  259. package/dist/pages/basics/EpTableView.vue.d.ts +0 -2
  260. package/dist/pages/basics/EpTextView.vue.d.ts +0 -2
  261. package/dist/pages/charts/EpBarChartView.vue.d.ts +0 -2
  262. package/dist/pages/charts/EpFunnelChartView.vue.d.ts +0 -2
  263. package/dist/pages/charts/EpLineChartView.vue.d.ts +0 -2
  264. package/dist/pages/charts/EpPieChartView.vue.d.ts +0 -2
  265. package/dist/pages/educationals/EpBranchingScenarioView.vue.d.ts +0 -2
  266. package/dist/pages/educationals/EpCodeBlockView.vue.d.ts +0 -2
  267. package/dist/pages/educationals/EpConclusionView.vue.d.ts +0 -2
  268. package/dist/pages/educationals/EpDescriptionView.vue.d.ts +0 -2
  269. package/dist/pages/educationals/EpEduView.vue.d.ts +0 -2
  270. package/dist/pages/educationals/EpInstructionsView.vue.d.ts +0 -2
  271. package/dist/pages/educationals/EpIntroductionView.vue.d.ts +0 -2
  272. package/dist/pages/educationals/EpObjectiveView.vue.d.ts +0 -2
  273. package/dist/pages/educationals/EpReadingView.vue.d.ts +0 -2
  274. package/dist/pages/educationals/EpResourceView.vue.d.ts +0 -2
  275. package/dist/pages/educationals/EpScopeView.vue.d.ts +0 -2
  276. package/dist/pages/educationals/EpSpecificObjectiveView.vue.d.ts +0 -2
  277. package/dist/pages/interactions/Ep360ImageView.vue.d.ts +0 -2
  278. package/dist/pages/interactions/Ep360VideoView.vue.d.ts +0 -2
  279. package/dist/pages/interactions/EpAccordeonView.vue.d.ts +0 -2
  280. package/dist/pages/interactions/EpContentSliderView.vue.d.ts +0 -2
  281. package/dist/pages/interactions/EpModalView.vue.d.ts +0 -2
  282. package/dist/pages/interactions/EpQuestionView.vue.d.ts +0 -2
  283. package/dist/pages/interactions/EpSummativeTableView.vue.d.ts +0 -2
  284. package/dist/pages/medias/EpAudioView.vue.d.ts +0 -2
  285. package/dist/pages/medias/EpCarouselView.vue.d.ts +0 -2
  286. package/dist/pages/medias/EpIframeView.vue.d.ts +0 -2
  287. package/dist/pages/medias/EpKatexView.vue.d.ts +0 -2
  288. package/dist/pages/medias/EpLinkVersionView.vue.d.ts +0 -2
  289. package/dist/pages/medias/EpLinkView.vue.d.ts +0 -2
  290. package/dist/pages/medias/EpLottieSvgView.vue.d.ts +0 -2
  291. package/dist/pages/medias/EpSoftwareView.vue.d.ts +0 -2
  292. package/dist/pages/medias/EpSvgView.vue.d.ts +0 -2
  293. package/dist/pages/medias/EpTermView.vue.d.ts +0 -2
  294. package/dist/pages/medias/EpTimeLineView.vue.d.ts +0 -2
  295. package/dist/pages/medias/EpVideoPanoptoView.vue.d.ts +0 -2
  296. package/dist/pages/medias/EpVideoView.vue.d.ts +0 -2
  297. package/dist/pages/medias/EpWordDefView.vue.d.ts +0 -2
  298. package/dist/pages/signages/EpAlertView.vue.d.ts +0 -2
  299. package/dist/pages/signages/EpHeaderView.vue.d.ts +0 -2
  300. package/dist/pages/signages/EpQuoteView.vue.d.ts +0 -2
  301. package/dist/pages/signages/EpSkeletonView.vue.d.ts +0 -2
  302. package/dist/prism-CvcYxWXz.js +0 -1184
  303. package/dist/three.core-ChKHLxK7.js +0 -48675
  304. /package/dist/{ep-lib-ts.css → style.css} +0 -0
@@ -1,1184 +0,0 @@
1
- import { a5 as X, a4 as ee } from "./index-BkHXngnv.js";
2
- function ae(S, P) {
3
- for (var i = 0; i < P.length; i++) {
4
- const g = P[i];
5
- if (typeof g != "string" && !Array.isArray(g)) {
6
- for (const d in g)
7
- if (d !== "default" && !(d in S)) {
8
- const v = Object.getOwnPropertyDescriptor(g, d);
9
- v && Object.defineProperty(S, d, v.get ? v : {
10
- enumerable: !0,
11
- get: () => g[d]
12
- });
13
- }
14
- }
15
- }
16
- return Object.freeze(Object.defineProperty(S, Symbol.toStringTag, { value: "Module" }));
17
- }
18
- var H = { exports: {} }, Y;
19
- function te() {
20
- return Y || (Y = 1, function(S) {
21
- var P = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
22
- /**
23
- * Prism: Lightweight, robust, elegant syntax highlighting
24
- *
25
- * @license MIT <https://opensource.org/licenses/MIT>
26
- * @author Lea Verou <https://lea.verou.me>
27
- * @namespace
28
- * @public
29
- */
30
- var i = function(g) {
31
- var d = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, v = 0, x = {}, s = {
32
- /**
33
- * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
34
- * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
35
- * additional languages or plugins yourself.
36
- *
37
- * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
38
- *
39
- * You obviously have to change this value before the automatic highlighting started. To do this, you can add an
40
- * empty Prism object into the global scope before loading the Prism script like this:
41
- *
42
- * ```js
43
- * window.Prism = window.Prism || {};
44
- * Prism.manual = true;
45
- * // add a new <script> to load Prism's script
46
- * ```
47
- *
48
- * @default false
49
- * @type {boolean}
50
- * @memberof Prism
51
- * @public
52
- */
53
- manual: g.Prism && g.Prism.manual,
54
- /**
55
- * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
56
- * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
57
- * own worker, you don't want it to do this.
58
- *
59
- * By setting this value to `true`, Prism will not add its own listeners to the worker.
60
- *
61
- * You obviously have to change this value before Prism executes. To do this, you can add an
62
- * empty Prism object into the global scope before loading the Prism script like this:
63
- *
64
- * ```js
65
- * window.Prism = window.Prism || {};
66
- * Prism.disableWorkerMessageHandler = true;
67
- * // Load Prism's script
68
- * ```
69
- *
70
- * @default false
71
- * @type {boolean}
72
- * @memberof Prism
73
- * @public
74
- */
75
- disableWorkerMessageHandler: g.Prism && g.Prism.disableWorkerMessageHandler,
76
- /**
77
- * A namespace for utility methods.
78
- *
79
- * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
80
- * change or disappear at any time.
81
- *
82
- * @namespace
83
- * @memberof Prism
84
- */
85
- util: {
86
- encode: function a(e) {
87
- return e instanceof b ? new b(e.type, a(e.content), e.alias) : Array.isArray(e) ? e.map(a) : e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
88
- },
89
- /**
90
- * Returns the name of the type of the given value.
91
- *
92
- * @param {any} o
93
- * @returns {string}
94
- * @example
95
- * type(null) === 'Null'
96
- * type(undefined) === 'Undefined'
97
- * type(123) === 'Number'
98
- * type('foo') === 'String'
99
- * type(true) === 'Boolean'
100
- * type([1, 2]) === 'Array'
101
- * type({}) === 'Object'
102
- * type(String) === 'Function'
103
- * type(/abc+/) === 'RegExp'
104
- */
105
- type: function(a) {
106
- return Object.prototype.toString.call(a).slice(8, -1);
107
- },
108
- /**
109
- * Returns a unique number for the given object. Later calls will still return the same number.
110
- *
111
- * @param {Object} obj
112
- * @returns {number}
113
- */
114
- objId: function(a) {
115
- return a.__id || Object.defineProperty(a, "__id", { value: ++v }), a.__id;
116
- },
117
- /**
118
- * Creates a deep clone of the given object.
119
- *
120
- * The main intended use of this function is to clone language definitions.
121
- *
122
- * @param {T} o
123
- * @param {Record<number, any>} [visited]
124
- * @returns {T}
125
- * @template T
126
- */
127
- clone: function a(e, t) {
128
- t = t || {};
129
- var n, r;
130
- switch (s.util.type(e)) {
131
- case "Object":
132
- if (r = s.util.objId(e), t[r])
133
- return t[r];
134
- n = /** @type {Record<string, any>} */
135
- {}, t[r] = n;
136
- for (var l in e)
137
- e.hasOwnProperty(l) && (n[l] = a(e[l], t));
138
- return (
139
- /** @type {any} */
140
- n
141
- );
142
- case "Array":
143
- return r = s.util.objId(e), t[r] ? t[r] : (n = [], t[r] = n, /** @type {Array} */
144
- /** @type {any} */
145
- e.forEach(function(o, u) {
146
- n[u] = a(o, t);
147
- }), /** @type {any} */
148
- n);
149
- default:
150
- return e;
151
- }
152
- },
153
- /**
154
- * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
155
- *
156
- * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
157
- *
158
- * @param {Element} element
159
- * @returns {string}
160
- */
161
- getLanguage: function(a) {
162
- for (; a; ) {
163
- var e = d.exec(a.className);
164
- if (e)
165
- return e[1].toLowerCase();
166
- a = a.parentElement;
167
- }
168
- return "none";
169
- },
170
- /**
171
- * Sets the Prism `language-xxxx` class of the given element.
172
- *
173
- * @param {Element} element
174
- * @param {string} language
175
- * @returns {void}
176
- */
177
- setLanguage: function(a, e) {
178
- a.className = a.className.replace(RegExp(d, "gi"), ""), a.classList.add("language-" + e);
179
- },
180
- /**
181
- * Returns the script element that is currently executing.
182
- *
183
- * This does __not__ work for line script element.
184
- *
185
- * @returns {HTMLScriptElement | null}
186
- */
187
- currentScript: function() {
188
- if (typeof document > "u")
189
- return null;
190
- if ("currentScript" in document)
191
- return (
192
- /** @type {any} */
193
- document.currentScript
194
- );
195
- try {
196
- throw new Error();
197
- } catch (n) {
198
- var a = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(n.stack) || [])[1];
199
- if (a) {
200
- var e = document.getElementsByTagName("script");
201
- for (var t in e)
202
- if (e[t].src == a)
203
- return e[t];
204
- }
205
- return null;
206
- }
207
- },
208
- /**
209
- * Returns whether a given class is active for `element`.
210
- *
211
- * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
212
- * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
213
- * given class is just the given class with a `no-` prefix.
214
- *
215
- * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
216
- * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
217
- * ancestors have the given class or the negated version of it, then the default activation will be returned.
218
- *
219
- * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
220
- * version of it, the class is considered active.
221
- *
222
- * @param {Element} element
223
- * @param {string} className
224
- * @param {boolean} [defaultActivation=false]
225
- * @returns {boolean}
226
- */
227
- isActive: function(a, e, t) {
228
- for (var n = "no-" + e; a; ) {
229
- var r = a.classList;
230
- if (r.contains(e))
231
- return !0;
232
- if (r.contains(n))
233
- return !1;
234
- a = a.parentElement;
235
- }
236
- return !!t;
237
- }
238
- },
239
- /**
240
- * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
241
- *
242
- * @namespace
243
- * @memberof Prism
244
- * @public
245
- */
246
- languages: {
247
- /**
248
- * The grammar for plain, unformatted text.
249
- */
250
- plain: x,
251
- plaintext: x,
252
- text: x,
253
- txt: x,
254
- /**
255
- * Creates a deep copy of the language with the given id and appends the given tokens.
256
- *
257
- * If a token in `redef` also appears in the copied language, then the existing token in the copied language
258
- * will be overwritten at its original position.
259
- *
260
- * ## Best practices
261
- *
262
- * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
263
- * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
264
- * understand the language definition because, normally, the order of tokens matters in Prism grammars.
265
- *
266
- * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
267
- * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
268
- *
269
- * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
270
- * @param {Grammar} redef The new tokens to append.
271
- * @returns {Grammar} The new language created.
272
- * @public
273
- * @example
274
- * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
275
- * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
276
- * // at its original position
277
- * 'comment': { ... },
278
- * // CSS doesn't have a 'color' token, so this token will be appended
279
- * 'color': /\b(?:red|green|blue)\b/
280
- * });
281
- */
282
- extend: function(a, e) {
283
- var t = s.util.clone(s.languages[a]);
284
- for (var n in e)
285
- t[n] = e[n];
286
- return t;
287
- },
288
- /**
289
- * Inserts tokens _before_ another token in a language definition or any other grammar.
290
- *
291
- * ## Usage
292
- *
293
- * This helper method makes it easy to modify existing languages. For example, the CSS language definition
294
- * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
295
- * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
296
- * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
297
- * this:
298
- *
299
- * ```js
300
- * Prism.languages.markup.style = {
301
- * // token
302
- * };
303
- * ```
304
- *
305
- * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
306
- * before existing tokens. For the CSS example above, you would use it like this:
307
- *
308
- * ```js
309
- * Prism.languages.insertBefore('markup', 'cdata', {
310
- * 'style': {
311
- * // token
312
- * }
313
- * });
314
- * ```
315
- *
316
- * ## Special cases
317
- *
318
- * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
319
- * will be ignored.
320
- *
321
- * This behavior can be used to insert tokens after `before`:
322
- *
323
- * ```js
324
- * Prism.languages.insertBefore('markup', 'comment', {
325
- * 'comment': Prism.languages.markup.comment,
326
- * // tokens after 'comment'
327
- * });
328
- * ```
329
- *
330
- * ## Limitations
331
- *
332
- * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
333
- * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
334
- * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
335
- * deleting properties which is necessary to insert at arbitrary positions.
336
- *
337
- * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
338
- * Instead, it will create a new object and replace all references to the target object with the new one. This
339
- * can be done without temporarily deleting properties, so the iteration order is well-defined.
340
- *
341
- * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
342
- * you hold the target object in a variable, then the value of the variable will not change.
343
- *
344
- * ```js
345
- * var oldMarkup = Prism.languages.markup;
346
- * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
347
- *
348
- * assert(oldMarkup !== Prism.languages.markup);
349
- * assert(newMarkup === Prism.languages.markup);
350
- * ```
351
- *
352
- * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
353
- * object to be modified.
354
- * @param {string} before The key to insert before.
355
- * @param {Grammar} insert An object containing the key-value pairs to be inserted.
356
- * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
357
- * object to be modified.
358
- *
359
- * Defaults to `Prism.languages`.
360
- * @returns {Grammar} The new grammar object.
361
- * @public
362
- */
363
- insertBefore: function(a, e, t, n) {
364
- n = n || /** @type {any} */
365
- s.languages;
366
- var r = n[a], l = {};
367
- for (var o in r)
368
- if (r.hasOwnProperty(o)) {
369
- if (o == e)
370
- for (var u in t)
371
- t.hasOwnProperty(u) && (l[u] = t[u]);
372
- t.hasOwnProperty(o) || (l[o] = r[o]);
373
- }
374
- var f = n[a];
375
- return n[a] = l, s.languages.DFS(s.languages, function(m, w) {
376
- w === f && m != a && (this[m] = l);
377
- }), l;
378
- },
379
- // Traverse a language definition with Depth First Search
380
- DFS: function a(e, t, n, r) {
381
- r = r || {};
382
- var l = s.util.objId;
383
- for (var o in e)
384
- if (e.hasOwnProperty(o)) {
385
- t.call(e, o, e[o], n || o);
386
- var u = e[o], f = s.util.type(u);
387
- f === "Object" && !r[l(u)] ? (r[l(u)] = !0, a(u, t, null, r)) : f === "Array" && !r[l(u)] && (r[l(u)] = !0, a(u, t, o, r));
388
- }
389
- }
390
- },
391
- plugins: {},
392
- /**
393
- * This is the most high-level function in Prism’s API.
394
- * It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on
395
- * each one of them.
396
- *
397
- * This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.
398
- *
399
- * @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.
400
- * @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.
401
- * @memberof Prism
402
- * @public
403
- */
404
- highlightAll: function(a, e) {
405
- s.highlightAllUnder(document, a, e);
406
- },
407
- /**
408
- * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
409
- * {@link Prism.highlightElement} on each one of them.
410
- *
411
- * The following hooks will be run:
412
- * 1. `before-highlightall`
413
- * 2. `before-all-elements-highlight`
414
- * 3. All hooks of {@link Prism.highlightElement} for each element.
415
- *
416
- * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
417
- * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
418
- * @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.
419
- * @memberof Prism
420
- * @public
421
- */
422
- highlightAllUnder: function(a, e, t) {
423
- var n = {
424
- callback: t,
425
- container: a,
426
- selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
427
- };
428
- s.hooks.run("before-highlightall", n), n.elements = Array.prototype.slice.apply(n.container.querySelectorAll(n.selector)), s.hooks.run("before-all-elements-highlight", n);
429
- for (var r = 0, l; l = n.elements[r++]; )
430
- s.highlightElement(l, e === !0, n.callback);
431
- },
432
- /**
433
- * Highlights the code inside a single element.
434
- *
435
- * The following hooks will be run:
436
- * 1. `before-sanity-check`
437
- * 2. `before-highlight`
438
- * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
439
- * 4. `before-insert`
440
- * 5. `after-highlight`
441
- * 6. `complete`
442
- *
443
- * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
444
- * the element's language.
445
- *
446
- * @param {Element} element The element containing the code.
447
- * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
448
- * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
449
- * to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is
450
- * [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).
451
- *
452
- * Note: All language definitions required to highlight the code must be included in the main `prism.js` file for
453
- * asynchronous highlighting to work. You can build your own bundle on the
454
- * [Download page](https://prismjs.com/download.html).
455
- * @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.
456
- * Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.
457
- * @memberof Prism
458
- * @public
459
- */
460
- highlightElement: function(a, e, t) {
461
- var n = s.util.getLanguage(a), r = s.languages[n];
462
- s.util.setLanguage(a, n);
463
- var l = a.parentElement;
464
- l && l.nodeName.toLowerCase() === "pre" && s.util.setLanguage(l, n);
465
- var o = a.textContent, u = {
466
- element: a,
467
- language: n,
468
- grammar: r,
469
- code: o
470
- };
471
- function f(w) {
472
- u.highlightedCode = w, s.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, s.hooks.run("after-highlight", u), s.hooks.run("complete", u), t && t.call(u.element);
473
- }
474
- if (s.hooks.run("before-sanity-check", u), l = u.element.parentElement, l && l.nodeName.toLowerCase() === "pre" && !l.hasAttribute("tabindex") && l.setAttribute("tabindex", "0"), !u.code) {
475
- s.hooks.run("complete", u), t && t.call(u.element);
476
- return;
477
- }
478
- if (s.hooks.run("before-highlight", u), !u.grammar) {
479
- f(s.util.encode(u.code));
480
- return;
481
- }
482
- if (e && g.Worker) {
483
- var m = new Worker(s.filename);
484
- m.onmessage = function(w) {
485
- f(w.data);
486
- }, m.postMessage(JSON.stringify({
487
- language: u.language,
488
- code: u.code,
489
- immediateClose: !0
490
- }));
491
- } else
492
- f(s.highlight(u.code, u.grammar, u.language));
493
- },
494
- /**
495
- * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
496
- * and the language definitions to use, and returns a string with the HTML produced.
497
- *
498
- * The following hooks will be run:
499
- * 1. `before-tokenize`
500
- * 2. `after-tokenize`
501
- * 3. `wrap`: On each {@link Token}.
502
- *
503
- * @param {string} text A string with the code to be highlighted.
504
- * @param {Grammar} grammar An object containing the tokens to use.
505
- *
506
- * Usually a language definition like `Prism.languages.markup`.
507
- * @param {string} language The name of the language definition passed to `grammar`.
508
- * @returns {string} The highlighted HTML.
509
- * @memberof Prism
510
- * @public
511
- * @example
512
- * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
513
- */
514
- highlight: function(a, e, t) {
515
- var n = {
516
- code: a,
517
- grammar: e,
518
- language: t
519
- };
520
- if (s.hooks.run("before-tokenize", n), !n.grammar)
521
- throw new Error('The language "' + n.language + '" has no grammar.');
522
- return n.tokens = s.tokenize(n.code, n.grammar), s.hooks.run("after-tokenize", n), b.stringify(s.util.encode(n.tokens), n.language);
523
- },
524
- /**
525
- * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
526
- * and the language definitions to use, and returns an array with the tokenized code.
527
- *
528
- * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
529
- *
530
- * This method could be useful in other contexts as well, as a very crude parser.
531
- *
532
- * @param {string} text A string with the code to be highlighted.
533
- * @param {Grammar} grammar An object containing the tokens to use.
534
- *
535
- * Usually a language definition like `Prism.languages.markup`.
536
- * @returns {TokenStream} An array of strings and tokens, a token stream.
537
- * @memberof Prism
538
- * @public
539
- * @example
540
- * let code = `var foo = 0;`;
541
- * let tokens = Prism.tokenize(code, Prism.languages.javascript);
542
- * tokens.forEach(token => {
543
- * if (token instanceof Prism.Token && token.type === 'number') {
544
- * console.log(`Found numeric literal: ${token.content}`);
545
- * }
546
- * });
547
- */
548
- tokenize: function(a, e) {
549
- var t = e.rest;
550
- if (t) {
551
- for (var n in t)
552
- e[n] = t[n];
553
- delete e.rest;
554
- }
555
- var r = new T();
556
- return E(r, r.head, a), L(a, r, e, r.head, 0), j(r);
557
- },
558
- /**
559
- * @namespace
560
- * @memberof Prism
561
- * @public
562
- */
563
- hooks: {
564
- all: {},
565
- /**
566
- * Adds the given callback to the list of callbacks for the given hook.
567
- *
568
- * The callback will be invoked when the hook it is registered for is run.
569
- * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
570
- *
571
- * One callback function can be registered to multiple hooks and the same hook multiple times.
572
- *
573
- * @param {string} name The name of the hook.
574
- * @param {HookCallback} callback The callback function which is given environment variables.
575
- * @public
576
- */
577
- add: function(a, e) {
578
- var t = s.hooks.all;
579
- t[a] = t[a] || [], t[a].push(e);
580
- },
581
- /**
582
- * Runs a hook invoking all registered callbacks with the given environment variables.
583
- *
584
- * Callbacks will be invoked synchronously and in the order in which they were registered.
585
- *
586
- * @param {string} name The name of the hook.
587
- * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
588
- * @public
589
- */
590
- run: function(a, e) {
591
- var t = s.hooks.all[a];
592
- if (!(!t || !t.length))
593
- for (var n = 0, r; r = t[n++]; )
594
- r(e);
595
- }
596
- },
597
- Token: b
598
- };
599
- g.Prism = s;
600
- function b(a, e, t, n) {
601
- this.type = a, this.content = e, this.alias = t, this.length = (n || "").length | 0;
602
- }
603
- b.stringify = function a(e, t) {
604
- if (typeof e == "string")
605
- return e;
606
- if (Array.isArray(e)) {
607
- var n = "";
608
- return e.forEach(function(f) {
609
- n += a(f, t);
610
- }), n;
611
- }
612
- var r = {
613
- type: e.type,
614
- content: a(e.content, t),
615
- tag: "span",
616
- classes: ["token", e.type],
617
- attributes: {},
618
- language: t
619
- }, l = e.alias;
620
- l && (Array.isArray(l) ? Array.prototype.push.apply(r.classes, l) : r.classes.push(l)), s.hooks.run("wrap", r);
621
- var o = "";
622
- for (var u in r.attributes)
623
- o += " " + u + '="' + (r.attributes[u] || "").replace(/"/g, "&quot;") + '"';
624
- return "<" + r.tag + ' class="' + r.classes.join(" ") + '"' + o + ">" + r.content + "</" + r.tag + ">";
625
- };
626
- function _(a, e, t, n) {
627
- a.lastIndex = e;
628
- var r = a.exec(t);
629
- if (r && n && r[1]) {
630
- var l = r[1].length;
631
- r.index += l, r[0] = r[0].slice(l);
632
- }
633
- return r;
634
- }
635
- function L(a, e, t, n, r, l) {
636
- for (var o in t)
637
- if (!(!t.hasOwnProperty(o) || !t[o])) {
638
- var u = t[o];
639
- u = Array.isArray(u) ? u : [u];
640
- for (var f = 0; f < u.length; ++f) {
641
- if (l && l.cause == o + "," + f)
642
- return;
643
- var m = u[f], w = m.inside, U = !!m.lookbehind, Z = !!m.greedy, N = m.alias;
644
- if (Z && !m.pattern.global) {
645
- var K = m.pattern.toString().match(/[imsuy]*$/)[0];
646
- m.pattern = RegExp(m.pattern.source, K + "g");
647
- }
648
- for (var B = m.pattern || m, y = n.next, A = r; y !== e.tail && !(l && A >= l.reach); A += y.value.length, y = y.next) {
649
- var $ = y.value;
650
- if (e.length > a.length)
651
- return;
652
- if (!($ instanceof b)) {
653
- var z = 1, F;
654
- if (Z) {
655
- if (F = _(B, A, a, U), !F || F.index >= a.length)
656
- break;
657
- var D = F.index, Q = F.index + F[0].length, k = A;
658
- for (k += y.value.length; D >= k; )
659
- y = y.next, k += y.value.length;
660
- if (k -= y.value.length, A = k, y.value instanceof b)
661
- continue;
662
- for (var C = y; C !== e.tail && (k < Q || typeof C.value == "string"); C = C.next)
663
- z++, k += C.value.length;
664
- z--, $ = a.slice(A, k), F.index -= A;
665
- } else if (F = _(B, 0, $, U), !F)
666
- continue;
667
- var D = F.index, O = F[0], R = $.slice(0, D), W = $.slice(D + O.length), q = A + $.length;
668
- l && q > l.reach && (l.reach = q);
669
- var I = y.prev;
670
- R && (I = E(e, I, R), A += R.length), M(e, I, z);
671
- var V = new b(o, w ? s.tokenize(O, w) : O, N, O);
672
- if (y = E(e, I, V), W && E(e, y, W), z > 1) {
673
- var G = {
674
- cause: o + "," + f,
675
- reach: q
676
- };
677
- L(a, e, t, y.prev, A, G), l && G.reach > l.reach && (l.reach = G.reach);
678
- }
679
- }
680
- }
681
- }
682
- }
683
- }
684
- function T() {
685
- var a = { value: null, prev: null, next: null }, e = { value: null, prev: a, next: null };
686
- a.next = e, this.head = a, this.tail = e, this.length = 0;
687
- }
688
- function E(a, e, t) {
689
- var n = e.next, r = { value: t, prev: e, next: n };
690
- return e.next = r, n.prev = r, a.length++, r;
691
- }
692
- function M(a, e, t) {
693
- for (var n = e.next, r = 0; r < t && n !== a.tail; r++)
694
- n = n.next;
695
- e.next = n, n.prev = e, a.length -= r;
696
- }
697
- function j(a) {
698
- for (var e = [], t = a.head.next; t !== a.tail; )
699
- e.push(t.value), t = t.next;
700
- return e;
701
- }
702
- if (!g.document)
703
- return g.addEventListener && (s.disableWorkerMessageHandler || g.addEventListener("message", function(a) {
704
- var e = JSON.parse(a.data), t = e.language, n = e.code, r = e.immediateClose;
705
- g.postMessage(s.highlight(n, s.languages[t], t)), r && g.close();
706
- }, !1)), s;
707
- var p = s.util.currentScript();
708
- p && (s.filename = p.src, p.hasAttribute("data-manual") && (s.manual = !0));
709
- function c() {
710
- s.manual || s.highlightAll();
711
- }
712
- if (!s.manual) {
713
- var h = document.readyState;
714
- h === "loading" || h === "interactive" && p && p.defer ? document.addEventListener("DOMContentLoaded", c) : window.requestAnimationFrame ? window.requestAnimationFrame(c) : window.setTimeout(c, 16);
715
- }
716
- return s;
717
- }(P);
718
- S.exports && (S.exports = i), typeof X < "u" && (X.Prism = i), i.languages.markup = {
719
- comment: {
720
- pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
721
- greedy: !0
722
- },
723
- prolog: {
724
- pattern: /<\?[\s\S]+?\?>/,
725
- greedy: !0
726
- },
727
- doctype: {
728
- // https://www.w3.org/TR/xml/#NT-doctypedecl
729
- pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
730
- greedy: !0,
731
- inside: {
732
- "internal-subset": {
733
- pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
734
- lookbehind: !0,
735
- greedy: !0,
736
- inside: null
737
- // see below
738
- },
739
- string: {
740
- pattern: /"[^"]*"|'[^']*'/,
741
- greedy: !0
742
- },
743
- punctuation: /^<!|>$|[[\]]/,
744
- "doctype-tag": /^DOCTYPE/i,
745
- name: /[^\s<>'"]+/
746
- }
747
- },
748
- cdata: {
749
- pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
750
- greedy: !0
751
- },
752
- tag: {
753
- pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
754
- greedy: !0,
755
- inside: {
756
- tag: {
757
- pattern: /^<\/?[^\s>\/]+/,
758
- inside: {
759
- punctuation: /^<\/?/,
760
- namespace: /^[^\s>\/:]+:/
761
- }
762
- },
763
- "special-attr": [],
764
- "attr-value": {
765
- pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
766
- inside: {
767
- punctuation: [
768
- {
769
- pattern: /^=/,
770
- alias: "attr-equals"
771
- },
772
- {
773
- pattern: /^(\s*)["']|["']$/,
774
- lookbehind: !0
775
- }
776
- ]
777
- }
778
- },
779
- punctuation: /\/?>/,
780
- "attr-name": {
781
- pattern: /[^\s>\/]+/,
782
- inside: {
783
- namespace: /^[^\s>\/:]+:/
784
- }
785
- }
786
- }
787
- },
788
- entity: [
789
- {
790
- pattern: /&[\da-z]{1,8};/i,
791
- alias: "named-entity"
792
- },
793
- /&#x?[\da-f]{1,8};/i
794
- ]
795
- }, i.languages.markup.tag.inside["attr-value"].inside.entity = i.languages.markup.entity, i.languages.markup.doctype.inside["internal-subset"].inside = i.languages.markup, i.hooks.add("wrap", function(g) {
796
- g.type === "entity" && (g.attributes.title = g.content.replace(/&amp;/, "&"));
797
- }), Object.defineProperty(i.languages.markup.tag, "addInlined", {
798
- /**
799
- * Adds an inlined language to markup.
800
- *
801
- * An example of an inlined language is CSS with `<style>` tags.
802
- *
803
- * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
804
- * case insensitive.
805
- * @param {string} lang The language key.
806
- * @example
807
- * addInlined('style', 'css');
808
- */
809
- value: function(d, v) {
810
- var x = {};
811
- x["language-" + v] = {
812
- pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
813
- lookbehind: !0,
814
- inside: i.languages[v]
815
- }, x.cdata = /^<!\[CDATA\[|\]\]>$/i;
816
- var s = {
817
- "included-cdata": {
818
- pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
819
- inside: x
820
- }
821
- };
822
- s["language-" + v] = {
823
- pattern: /[\s\S]+/,
824
- inside: i.languages[v]
825
- };
826
- var b = {};
827
- b[d] = {
828
- pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
829
- return d;
830
- }), "i"),
831
- lookbehind: !0,
832
- greedy: !0,
833
- inside: s
834
- }, i.languages.insertBefore("markup", "cdata", b);
835
- }
836
- }), Object.defineProperty(i.languages.markup.tag, "addAttribute", {
837
- /**
838
- * Adds an pattern to highlight languages embedded in HTML attributes.
839
- *
840
- * An example of an inlined language is CSS with `style` attributes.
841
- *
842
- * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
843
- * case insensitive.
844
- * @param {string} lang The language key.
845
- * @example
846
- * addAttribute('style', 'css');
847
- */
848
- value: function(g, d) {
849
- i.languages.markup.tag.inside["special-attr"].push({
850
- pattern: RegExp(
851
- /(^|["'\s])/.source + "(?:" + g + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
852
- "i"
853
- ),
854
- lookbehind: !0,
855
- inside: {
856
- "attr-name": /^[^\s=]+/,
857
- "attr-value": {
858
- pattern: /=[\s\S]+/,
859
- inside: {
860
- value: {
861
- pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
862
- lookbehind: !0,
863
- alias: [d, "language-" + d],
864
- inside: i.languages[d]
865
- },
866
- punctuation: [
867
- {
868
- pattern: /^=/,
869
- alias: "attr-equals"
870
- },
871
- /"|'/
872
- ]
873
- }
874
- }
875
- }
876
- });
877
- }
878
- }), i.languages.html = i.languages.markup, i.languages.mathml = i.languages.markup, i.languages.svg = i.languages.markup, i.languages.xml = i.languages.extend("markup", {}), i.languages.ssml = i.languages.xml, i.languages.atom = i.languages.xml, i.languages.rss = i.languages.xml, function(g) {
879
- var d = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
880
- g.languages.css = {
881
- comment: /\/\*[\s\S]*?\*\//,
882
- atrule: {
883
- pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + d.source + ")*?" + /(?:;|(?=\s*\{))/.source),
884
- inside: {
885
- rule: /^@[\w-]+/,
886
- "selector-function-argument": {
887
- pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
888
- lookbehind: !0,
889
- alias: "selector"
890
- },
891
- keyword: {
892
- pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
893
- lookbehind: !0
894
- }
895
- // See rest below
896
- }
897
- },
898
- url: {
899
- // https://drafts.csswg.org/css-values-3/#urls
900
- pattern: RegExp("\\burl\\((?:" + d.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
901
- greedy: !0,
902
- inside: {
903
- function: /^url/i,
904
- punctuation: /^\(|\)$/,
905
- string: {
906
- pattern: RegExp("^" + d.source + "$"),
907
- alias: "url"
908
- }
909
- }
910
- },
911
- selector: {
912
- pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + d.source + ")*(?=\\s*\\{)"),
913
- lookbehind: !0
914
- },
915
- string: {
916
- pattern: d,
917
- greedy: !0
918
- },
919
- property: {
920
- pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
921
- lookbehind: !0
922
- },
923
- important: /!important\b/i,
924
- function: {
925
- pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
926
- lookbehind: !0
927
- },
928
- punctuation: /[(){};:,]/
929
- }, g.languages.css.atrule.inside.rest = g.languages.css;
930
- var v = g.languages.markup;
931
- v && (v.tag.addInlined("style", "css"), v.tag.addAttribute("style", "css"));
932
- }(i), i.languages.clike = {
933
- comment: [
934
- {
935
- pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
936
- lookbehind: !0,
937
- greedy: !0
938
- },
939
- {
940
- pattern: /(^|[^\\:])\/\/.*/,
941
- lookbehind: !0,
942
- greedy: !0
943
- }
944
- ],
945
- string: {
946
- pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
947
- greedy: !0
948
- },
949
- "class-name": {
950
- pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
951
- lookbehind: !0,
952
- inside: {
953
- punctuation: /[.\\]/
954
- }
955
- },
956
- keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
957
- boolean: /\b(?:false|true)\b/,
958
- function: /\b\w+(?=\()/,
959
- number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
960
- operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
961
- punctuation: /[{}[\];(),.:]/
962
- }, i.languages.javascript = i.languages.extend("clike", {
963
- "class-name": [
964
- i.languages.clike["class-name"],
965
- {
966
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
967
- lookbehind: !0
968
- }
969
- ],
970
- keyword: [
971
- {
972
- pattern: /((?:^|\})\s*)catch\b/,
973
- lookbehind: !0
974
- },
975
- {
976
- pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
977
- lookbehind: !0
978
- }
979
- ],
980
- // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
981
- function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
982
- number: {
983
- pattern: RegExp(
984
- /(^|[^\w$])/.source + "(?:" + // constant
985
- (/NaN|Infinity/.source + "|" + // binary integer
986
- /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
987
- /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
988
- /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
989
- /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
990
- /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
991
- ),
992
- lookbehind: !0
993
- },
994
- operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
995
- }), i.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, i.languages.insertBefore("javascript", "keyword", {
996
- regex: {
997
- pattern: RegExp(
998
- // lookbehind
999
- // eslint-disable-next-line regexp/no-dupe-characters-character-class
1000
- /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
1001
- // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
1002
- // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
1003
- // with the only syntax, so we have to define 2 different regex patterns.
1004
- /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
1005
- /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
1006
- /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
1007
- ),
1008
- lookbehind: !0,
1009
- greedy: !0,
1010
- inside: {
1011
- "regex-source": {
1012
- pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
1013
- lookbehind: !0,
1014
- alias: "language-regex",
1015
- inside: i.languages.regex
1016
- },
1017
- "regex-delimiter": /^\/|\/$/,
1018
- "regex-flags": /^[a-z]+$/
1019
- }
1020
- },
1021
- // This must be declared before keyword because we use "function" inside the look-forward
1022
- "function-variable": {
1023
- pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
1024
- alias: "function"
1025
- },
1026
- parameter: [
1027
- {
1028
- pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1029
- lookbehind: !0,
1030
- inside: i.languages.javascript
1031
- },
1032
- {
1033
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1034
- lookbehind: !0,
1035
- inside: i.languages.javascript
1036
- },
1037
- {
1038
- pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1039
- lookbehind: !0,
1040
- inside: i.languages.javascript
1041
- },
1042
- {
1043
- pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
1044
- lookbehind: !0,
1045
- inside: i.languages.javascript
1046
- }
1047
- ],
1048
- constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
1049
- }), i.languages.insertBefore("javascript", "string", {
1050
- hashbang: {
1051
- pattern: /^#!.*/,
1052
- greedy: !0,
1053
- alias: "comment"
1054
- },
1055
- "template-string": {
1056
- pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
1057
- greedy: !0,
1058
- inside: {
1059
- "template-punctuation": {
1060
- pattern: /^`|`$/,
1061
- alias: "string"
1062
- },
1063
- interpolation: {
1064
- pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
1065
- lookbehind: !0,
1066
- inside: {
1067
- "interpolation-punctuation": {
1068
- pattern: /^\$\{|\}$/,
1069
- alias: "punctuation"
1070
- },
1071
- rest: i.languages.javascript
1072
- }
1073
- },
1074
- string: /[\s\S]+/
1075
- }
1076
- },
1077
- "string-property": {
1078
- pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
1079
- lookbehind: !0,
1080
- greedy: !0,
1081
- alias: "property"
1082
- }
1083
- }), i.languages.insertBefore("javascript", "operator", {
1084
- "literal-property": {
1085
- pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
1086
- lookbehind: !0,
1087
- alias: "property"
1088
- }
1089
- }), i.languages.markup && (i.languages.markup.tag.addInlined("script", "javascript"), i.languages.markup.tag.addAttribute(
1090
- /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
1091
- "javascript"
1092
- )), i.languages.js = i.languages.javascript, function() {
1093
- if (typeof i > "u" || typeof document > "u")
1094
- return;
1095
- Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
1096
- var g = "Loading…", d = function(p, c) {
1097
- return "✖ Error " + p + " while fetching file: " + c;
1098
- }, v = "✖ Error: File does not exist or is empty", x = {
1099
- js: "javascript",
1100
- py: "python",
1101
- rb: "ruby",
1102
- ps1: "powershell",
1103
- psm1: "powershell",
1104
- sh: "bash",
1105
- bat: "batch",
1106
- h: "c",
1107
- tex: "latex"
1108
- }, s = "data-src-status", b = "loading", _ = "loaded", L = "failed", T = "pre[data-src]:not([" + s + '="' + _ + '"]):not([' + s + '="' + b + '"])';
1109
- function E(p, c, h) {
1110
- var a = new XMLHttpRequest();
1111
- a.open("GET", p, !0), a.onreadystatechange = function() {
1112
- a.readyState == 4 && (a.status < 400 && a.responseText ? c(a.responseText) : a.status >= 400 ? h(d(a.status, a.statusText)) : h(v));
1113
- }, a.send(null);
1114
- }
1115
- function M(p) {
1116
- var c = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(p || "");
1117
- if (c) {
1118
- var h = Number(c[1]), a = c[2], e = c[3];
1119
- return a ? e ? [h, Number(e)] : [h, void 0] : [h, h];
1120
- }
1121
- }
1122
- i.hooks.add("before-highlightall", function(p) {
1123
- p.selector += ", " + T;
1124
- }), i.hooks.add("before-sanity-check", function(p) {
1125
- var c = (
1126
- /** @type {HTMLPreElement} */
1127
- p.element
1128
- );
1129
- if (c.matches(T)) {
1130
- p.code = "", c.setAttribute(s, b);
1131
- var h = c.appendChild(document.createElement("CODE"));
1132
- h.textContent = g;
1133
- var a = c.getAttribute("data-src"), e = p.language;
1134
- if (e === "none") {
1135
- var t = (/\.(\w+)$/.exec(a) || [, "none"])[1];
1136
- e = x[t] || t;
1137
- }
1138
- i.util.setLanguage(h, e), i.util.setLanguage(c, e);
1139
- var n = i.plugins.autoloader;
1140
- n && n.loadLanguages(e), E(
1141
- a,
1142
- function(r) {
1143
- c.setAttribute(s, _);
1144
- var l = M(c.getAttribute("data-range"));
1145
- if (l) {
1146
- var o = r.split(/\r\n?|\n/g), u = l[0], f = l[1] == null ? o.length : l[1];
1147
- u < 0 && (u += o.length), u = Math.max(0, Math.min(u - 1, o.length)), f < 0 && (f += o.length), f = Math.max(0, Math.min(f, o.length)), r = o.slice(u, f).join(`
1148
- `), c.hasAttribute("data-start") || c.setAttribute("data-start", String(u + 1));
1149
- }
1150
- h.textContent = r, i.highlightElement(h);
1151
- },
1152
- function(r) {
1153
- c.setAttribute(s, L), h.textContent = r;
1154
- }
1155
- );
1156
- }
1157
- }), i.plugins.fileHighlight = {
1158
- /**
1159
- * Executes the File Highlight plugin for all matching `pre` elements under the given container.
1160
- *
1161
- * Note: Elements which are already loaded or currently loading will not be touched by this method.
1162
- *
1163
- * @param {ParentNode} [container=document]
1164
- */
1165
- highlight: function(c) {
1166
- for (var h = (c || document).querySelectorAll(T), a = 0, e; e = h[a++]; )
1167
- i.highlightElement(e);
1168
- }
1169
- };
1170
- var j = !1;
1171
- i.fileHighlight = function() {
1172
- j || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), j = !0), i.plugins.fileHighlight.highlight.apply(this, arguments);
1173
- };
1174
- }();
1175
- }(H)), H.exports;
1176
- }
1177
- var J = te();
1178
- const ne = /* @__PURE__ */ ee(J), ie = /* @__PURE__ */ ae({
1179
- __proto__: null,
1180
- default: ne
1181
- }, [J]);
1182
- export {
1183
- ie as p
1184
- };