argous 1.2.132 → 1.2.136

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 (554) hide show
  1. package/dist/api/index.d.ts +1 -0
  2. package/dist/api/index.js +18 -1
  3. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +21 -0
  4. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +331 -0
  5. package/dist/components/Compartilhar/Compartilhar.js +1 -1
  6. package/lib/actions/index.ts +57 -0
  7. package/lib/api/WebSocket.js +148 -0
  8. package/lib/api/index.js +402 -0
  9. package/lib/api/ws.js +27 -0
  10. package/lib/components/Alert/Alert.d.ts +8 -0
  11. package/lib/components/Alert/Alert.js +49 -0
  12. package/lib/components/Alert/index.d.ts +2 -0
  13. package/lib/components/Alert/index.js +1 -0
  14. package/lib/components/ArgousAction/ArgousAction.d.ts +8 -0
  15. package/lib/components/ArgousAction/ArgousAction.js +78 -0
  16. package/lib/components/ArgousAction/index.d.ts +2 -0
  17. package/lib/components/ArgousAction/index.js +1 -0
  18. package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +14 -0
  19. package/lib/components/ArgousAvatar/ArgousAvatar.js +79 -0
  20. package/lib/components/ArgousAvatar/index.d.ts +2 -0
  21. package/lib/components/ArgousAvatar/index.js +1 -0
  22. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +76 -0
  23. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +182 -0
  24. package/lib/components/ArgousComplexPagination/index.d.ts +2 -0
  25. package/lib/components/ArgousComplexPagination/index.js +1 -0
  26. package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +131 -0
  27. package/lib/components/ArgousComplexTable/ArgousComplexTable.js +360 -0
  28. package/lib/components/ArgousComplexTable/index.d.ts +2 -0
  29. package/lib/components/ArgousComplexTable/index.js +1 -0
  30. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +177 -0
  31. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +162 -0
  32. package/lib/components/ArgousComplexTableBody/index.d.ts +2 -0
  33. package/lib/components/ArgousComplexTableBody/index.js +1 -0
  34. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +73 -0
  35. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +98 -0
  36. package/lib/components/ArgousComplexTableHead/index.d.ts +2 -0
  37. package/lib/components/ArgousComplexTableHead/index.js +1 -0
  38. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +58 -0
  39. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +66 -0
  40. package/lib/components/ArgousComplexTableToolbar/index.d.ts +2 -0
  41. package/lib/components/ArgousComplexTableToolbar/index.js +1 -0
  42. package/lib/components/ArgousInput/ArgousInput.d.ts +8 -0
  43. package/lib/components/ArgousInput/ArgousInput.js +616 -0
  44. package/lib/components/ArgousInput/index.d.ts +2 -0
  45. package/lib/components/ArgousInput/index.js +1 -0
  46. package/lib/components/ArgousPagination/ArgousPagination.d.ts +8 -0
  47. package/lib/components/ArgousPagination/ArgousPagination.js +43 -0
  48. package/lib/components/ArgousPagination/index.d.ts +2 -0
  49. package/lib/components/ArgousPagination/index.js +1 -0
  50. package/lib/components/ArgousProgressBar/ArgousProgressBar.d.ts +22 -0
  51. package/lib/components/ArgousProgressBar/ArgousProgressBar.js +167 -0
  52. package/lib/components/ArgousProgressBar/index.d.ts +2 -0
  53. package/lib/components/ArgousProgressBar/index.js +1 -0
  54. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +8 -0
  55. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +241 -0
  56. package/lib/components/ArgousSimpleTable/index.d.ts +2 -0
  57. package/lib/components/ArgousSimpleTable/index.js +1 -0
  58. package/lib/components/AutoComplete/AutoComplete.d.ts +8 -0
  59. package/lib/components/AutoComplete/AutoComplete.js +189 -0
  60. package/lib/components/AutoComplete/index.d.ts +2 -0
  61. package/lib/components/AutoComplete/index.js +1 -0
  62. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +298 -0
  63. package/lib/components/BarChart/BarChart.d.ts +8 -0
  64. package/lib/components/BarChart/BarChart.js +92 -0
  65. package/lib/components/BarChart/index.d.ts +2 -0
  66. package/lib/components/BarChart/index.js +1 -0
  67. package/lib/components/BarraFerramentas/BarraFerramentas.d.ts +21 -0
  68. package/lib/components/BarraFerramentas/BarraFerramentas.js +277 -0
  69. package/lib/components/BarraFerramentas/index.d.ts +2 -0
  70. package/lib/components/BarraFerramentas/index.js +1 -0
  71. package/lib/components/Button/Button.d.ts +8 -0
  72. package/lib/components/Button/Button.js +135 -0
  73. package/lib/components/Button/index.d.ts +2 -0
  74. package/lib/components/Button/index.js +1 -0
  75. package/lib/components/Cabecalho/Cabecalho.d.ts +8 -0
  76. package/lib/components/Cabecalho/Cabecalho.js +245 -0
  77. package/lib/components/Cabecalho/index.d.ts +2 -0
  78. package/lib/components/Cabecalho/index.js +1 -0
  79. package/lib/components/Calendar/Calendar.d.ts +8 -0
  80. package/lib/components/Calendar/Calendar.js +156 -0
  81. package/lib/components/Calendar/index.d.ts +2 -0
  82. package/lib/components/Calendar/index.js +1 -0
  83. package/lib/components/CartaoUsuario/CartaoUsuario.d.ts +9 -0
  84. package/lib/components/CartaoUsuario/CartaoUsuario.js +108 -0
  85. package/lib/components/CartaoUsuario/index.d.ts +2 -0
  86. package/lib/components/CartaoUsuario/index.js +1 -0
  87. package/lib/components/Collapse/Collapse.d.ts +60 -0
  88. package/lib/components/Collapse/Collapse.js +317 -0
  89. package/lib/components/Collapse/index.d.ts +3 -0
  90. package/lib/components/Collapse/index.js +1 -0
  91. package/lib/components/Compartilhar/Compartilhar.d.ts +7 -0
  92. package/lib/components/Compartilhar/Compartilhar.js +314 -0
  93. package/lib/components/Compartilhar/index.d.ts +2 -0
  94. package/lib/components/Compartilhar/index.js +1 -0
  95. package/lib/components/ConfirmModal/BasicModal.tsx +63 -0
  96. package/lib/components/ConfirmModal/ModalProvider.tsx +81 -0
  97. package/lib/components/ConfirmModal/WrapperModal.tsx +33 -0
  98. package/lib/components/ConfirmModal/index.d.ts +20 -0
  99. package/lib/components/ConfirmModal/index.js +8 -0
  100. package/lib/components/DropArea/DropArea.d.ts +21 -0
  101. package/lib/components/DropArea/DropArea.js +90 -0
  102. package/lib/components/DropArea/Html5FileSelector.js +164 -0
  103. package/lib/components/DropArea/index.d.ts +2 -0
  104. package/lib/components/DropArea/index.js +1 -0
  105. package/lib/components/Editor/Events.ts +83 -0
  106. package/lib/components/Editor/ScriptLoader.ts +96 -0
  107. package/lib/components/Editor/TinyMCE.ts +19 -0
  108. package/lib/components/Editor/Utils.ts +95 -0
  109. package/lib/components/Editor/components/Editor.tsx +375 -0
  110. package/lib/components/Editor/components/EditorPropTypes.ts +106 -0
  111. package/lib/components/Editor/index.tsx +11 -0
  112. package/lib/components/Editor/skins/content/dark/content.css +72 -0
  113. package/lib/components/Editor/skins/content/dark/content.min.css +8 -0
  114. package/lib/components/Editor/skins/content/dark/content.min.css.map +1 -0
  115. package/lib/components/Editor/skins/content/default/content.css +67 -0
  116. package/lib/components/Editor/skins/content/default/content.min.css +8 -0
  117. package/lib/components/Editor/skins/content/default/content.min.css.map +1 -0
  118. package/lib/components/Editor/skins/content/document/content.css +72 -0
  119. package/lib/components/Editor/skins/content/document/content.min.css +8 -0
  120. package/lib/components/Editor/skins/content/document/content.min.css.map +1 -0
  121. package/lib/components/Editor/skins/content/writer/content.css +68 -0
  122. package/lib/components/Editor/skins/content/writer/content.min.css +8 -0
  123. package/lib/components/Editor/skins/content/writer/content.min.css.map +1 -0
  124. package/lib/components/Editor/skins/ui/dark/content.css +714 -0
  125. package/lib/components/Editor/skins/ui/dark/content.inline.css +726 -0
  126. package/lib/components/Editor/skins/ui/dark/content.inline.min.css +8 -0
  127. package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +1 -0
  128. package/lib/components/Editor/skins/ui/dark/content.min.css +8 -0
  129. package/lib/components/Editor/skins/ui/dark/content.min.css.map +1 -0
  130. package/lib/components/Editor/skins/ui/dark/content.mobile.css +29 -0
  131. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +8 -0
  132. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +1 -0
  133. package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
  134. package/lib/components/Editor/skins/ui/dark/skin.css +3034 -0
  135. package/lib/components/Editor/skins/ui/dark/skin.min.css +8 -0
  136. package/lib/components/Editor/skins/ui/dark/skin.min.css.map +1 -0
  137. package/lib/components/Editor/skins/ui/dark/skin.mobile.css +673 -0
  138. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +8 -0
  139. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +1 -0
  140. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.css +37 -0
  141. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +8 -0
  142. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +1 -0
  143. package/lib/components/Editor/skins/ui/default/content.css +732 -0
  144. package/lib/components/Editor/skins/ui/default/content.inline.css +726 -0
  145. package/lib/components/Editor/skins/ui/default/content.inline.min.css +8 -0
  146. package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +1 -0
  147. package/lib/components/Editor/skins/ui/default/content.min.css +8 -0
  148. package/lib/components/Editor/skins/ui/default/content.min.css.map +1 -0
  149. package/lib/components/Editor/skins/ui/default/content.mobile.css +29 -0
  150. package/lib/components/Editor/skins/ui/default/content.mobile.min.css +8 -0
  151. package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +1 -0
  152. package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
  153. package/lib/components/Editor/skins/ui/default/skin.css +3034 -0
  154. package/lib/components/Editor/skins/ui/default/skin.min.css +8 -0
  155. package/lib/components/Editor/skins/ui/default/skin.min.css.map +1 -0
  156. package/lib/components/Editor/skins/ui/default/skin.mobile.css +673 -0
  157. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +8 -0
  158. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +1 -0
  159. package/lib/components/Editor/skins/ui/default/skin.shadowdom.css +37 -0
  160. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +8 -0
  161. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +1 -0
  162. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
  163. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +1641 -0
  164. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +8 -0
  165. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +1 -0
  166. package/lib/components/Editor/tinymce/README.md +63 -0
  167. package/lib/components/Editor/tinymce/icons/default/icons.js +172 -0
  168. package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -0
  169. package/lib/components/Editor/tinymce/jquery.tinymce.min.js +92 -0
  170. package/lib/components/Editor/tinymce/langs/README.md +3 -0
  171. package/lib/components/Editor/tinymce/langs/pt_BR.js +419 -0
  172. package/lib/components/Editor/tinymce/license.txt +504 -0
  173. package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +280 -0
  174. package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +9 -0
  175. package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +216 -0
  176. package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +9 -0
  177. package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +185 -0
  178. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +9 -0
  179. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +171 -0
  180. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +9 -0
  181. package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +212 -0
  182. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +9 -0
  183. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +99 -0
  184. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +9 -0
  185. package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +1706 -0
  186. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +9 -0
  187. package/lib/components/Editor/tinymce/plugins/code/plugin.js +92 -0
  188. package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +9 -0
  189. package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2332 -0
  190. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +9 -0
  191. package/{dist/components/Editor/tinymce/plugins/textcolor → lib/components/Editor/tinymce/plugins/colorpicker}/plugin.js +8 -5
  192. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +9 -0
  193. package/{dist/components/Editor/tinymce/plugins/colorpicker → lib/components/Editor/tinymce/plugins/contextmenu}/plugin.js +8 -5
  194. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +9 -0
  195. package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +320 -0
  196. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +9 -0
  197. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +9424 -0
  198. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
  199. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +9423 -0
  200. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  201. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +605 -0
  202. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +9 -0
  203. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +544 -0
  204. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +9 -0
  205. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +979 -0
  206. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +9 -0
  207. package/lib/components/Editor/tinymce/plugins/help/plugin.js +873 -0
  208. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +9 -0
  209. package/lib/components/Editor/tinymce/plugins/hr/plugin.js +46 -0
  210. package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +9 -0
  211. package/lib/components/Editor/tinymce/plugins/image/plugin.js +1661 -0
  212. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +9 -0
  213. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +1354 -0
  214. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +9 -0
  215. package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +343 -0
  216. package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +9 -0
  217. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +177 -0
  218. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +9 -0
  219. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +199 -0
  220. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +9 -0
  221. package/lib/components/Editor/tinymce/plugins/link/plugin.js +1287 -0
  222. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +9 -0
  223. package/lib/components/Editor/tinymce/plugins/lists/plugin.js +2286 -0
  224. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +9 -0
  225. package/lib/components/Editor/tinymce/plugins/media/plugin.js +1382 -0
  226. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +9 -0
  227. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +101 -0
  228. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +9 -0
  229. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +117 -0
  230. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +9 -0
  231. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +105 -0
  232. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +9 -0
  233. package/lib/components/Editor/tinymce/plugins/paste/plugin.js +1764 -0
  234. package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +9 -0
  235. package/lib/components/Editor/tinymce/plugins/preview/plugin.js +127 -0
  236. package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +9 -0
  237. package/lib/components/Editor/tinymce/plugins/print/plugin.js +53 -0
  238. package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +9 -0
  239. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +489 -0
  240. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +9 -0
  241. package/lib/components/Editor/tinymce/plugins/save/plugin.js +119 -0
  242. package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +9 -0
  243. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +1163 -0
  244. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +9 -0
  245. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +731 -0
  246. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +9 -0
  247. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +129 -0
  248. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +9 -0
  249. package/lib/components/Editor/tinymce/plugins/table/plugin.js +10938 -0
  250. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +9 -0
  251. package/lib/components/Editor/tinymce/plugins/template/plugin.js +577 -0
  252. package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +9 -0
  253. package/{dist/components/Editor/tinymce/plugins/contextmenu → lib/components/Editor/tinymce/plugins/textcolor}/plugin.js +8 -5
  254. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +9 -0
  255. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +1394 -0
  256. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +9 -0
  257. package/lib/components/Editor/tinymce/plugins/toc/plugin.js +236 -0
  258. package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +9 -0
  259. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +104 -0
  260. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +9 -0
  261. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +541 -0
  262. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +9 -0
  263. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +416 -0
  264. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +9 -0
  265. package/lib/components/Editor/tinymce/skins/content/dark/content.css +72 -0
  266. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +8 -0
  267. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -0
  268. package/lib/components/Editor/tinymce/skins/content/default/content.css +67 -0
  269. package/lib/components/Editor/tinymce/skins/content/default/content.min.css +8 -0
  270. package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -0
  271. package/lib/components/Editor/tinymce/skins/content/document/content.css +72 -0
  272. package/lib/components/Editor/tinymce/skins/content/document/content.min.css +8 -0
  273. package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -0
  274. package/lib/components/Editor/tinymce/skins/content/writer/content.css +68 -0
  275. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +8 -0
  276. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -0
  277. package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +732 -0
  278. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +726 -0
  279. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +8 -0
  280. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -0
  281. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +8 -0
  282. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -0
  283. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +29 -0
  284. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +8 -0
  285. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +1 -0
  286. package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  287. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +3034 -0
  288. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +8 -0
  289. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -0
  290. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
  291. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +8 -0
  292. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +1 -0
  293. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
  294. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +8 -0
  295. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -0
  296. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +714 -0
  297. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
  298. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +8 -0
  299. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -0
  300. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +8 -0
  301. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -0
  302. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
  303. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +8 -0
  304. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +1 -0
  305. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  306. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +3034 -0
  307. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +8 -0
  308. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -0
  309. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
  310. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +8 -0
  311. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +1 -0
  312. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
  313. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +8 -0
  314. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -0
  315. package/lib/components/Editor/tinymce/themes/mobile/theme.js +13587 -0
  316. package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +9 -0
  317. package/lib/components/Editor/tinymce/themes/silver/theme.js +32480 -0
  318. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +9 -0
  319. package/lib/components/Editor/tinymce/tinymce.d.ts +2963 -0
  320. package/lib/components/Editor/tinymce/tinymce.js +30106 -0
  321. package/lib/components/Editor/tinymce/tinymce.min.js +30106 -0
  322. package/lib/components/FilePreparer/FilePreparer.d.ts +26 -0
  323. package/lib/components/FilePreparer/FilePreparer.js +247 -0
  324. package/lib/components/FilePreparer/index.d.ts +2 -0
  325. package/lib/components/FilePreparer/index.js +1 -0
  326. package/lib/components/FileUploader/FileUploader.d.ts +9 -0
  327. package/lib/components/FileUploader/FileUploader.js +318 -0
  328. package/lib/components/FileUploader/index.d.ts +2 -0
  329. package/lib/components/FileUploader/index.js +1 -0
  330. package/lib/components/FormVisualizer/FormVisualizer.d.ts +92 -0
  331. package/lib/components/FormVisualizer/FormVisualizer.js +289 -0
  332. package/lib/components/FormVisualizer/index.d.ts +2 -0
  333. package/lib/components/FormVisualizer/index.js +1 -0
  334. package/lib/components/Highlight/Highlight.d.ts +7 -0
  335. package/lib/components/Highlight/Highlight.js +51 -0
  336. package/lib/components/Highlight/index.d.ts +2 -0
  337. package/lib/components/Highlight/index.js +1 -0
  338. package/lib/components/ImageResize/ImageResize.d.ts +28 -0
  339. package/lib/components/ImageResize/ImageResize.js +479 -0
  340. package/lib/components/ImageResize/index.d.ts +2 -0
  341. package/lib/components/ImageResize/index.js +1 -0
  342. package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +26 -0
  343. package/lib/components/ImageResizeButton/ImageResizeButton.js +65 -0
  344. package/lib/components/ImageResizeButton/index.d.ts +2 -0
  345. package/lib/components/ImageResizeButton/index.js +1 -0
  346. package/lib/components/Input/Input.d.ts +8 -0
  347. package/lib/components/Input/Input.js +353 -0
  348. package/lib/components/Input/index.d.ts +2 -0
  349. package/lib/components/Input/index.js +1 -0
  350. package/lib/components/InputTags/InputTags.d.ts +8 -0
  351. package/lib/components/InputTags/InputTags.js +94 -0
  352. package/lib/components/InputTags/index.d.ts +2 -0
  353. package/lib/components/InputTags/index.js +1 -0
  354. package/lib/components/ListSelect/ListSelect.d.ts +8 -0
  355. package/lib/components/ListSelect/ListSelect.js +94 -0
  356. package/lib/components/ListSelect/index.d.ts +2 -0
  357. package/lib/components/ListSelect/index.js +1 -0
  358. package/lib/components/MaterialButton/MaterialButton.d.ts +13 -0
  359. package/lib/components/MaterialButton/MaterialButton.js +177 -0
  360. package/lib/components/MaterialButton/index.d.ts +2 -0
  361. package/lib/components/MaterialButton/index.js +1 -0
  362. package/lib/components/MenuBar/MenuBar.d.ts +8 -0
  363. package/lib/components/MenuBar/MenuBar.js +139 -0
  364. package/lib/components/MenuBar/index.d.ts +2 -0
  365. package/lib/components/MenuBar/index.js +1 -0
  366. package/lib/components/MonthPicker/MonthPicker.d.ts +8 -0
  367. package/lib/components/MonthPicker/MonthPicker.js +313 -0
  368. package/lib/components/MonthPicker/index.d.ts +2 -0
  369. package/lib/components/MonthPicker/index.js +1 -0
  370. package/lib/components/MultipleSelect/MultipleSelect.d.ts +8 -0
  371. package/lib/components/MultipleSelect/MultipleSelect.js +106 -0
  372. package/lib/components/MultipleSelect/index.d.ts +2 -0
  373. package/lib/components/MultipleSelect/index.js +1 -0
  374. package/lib/components/OtpInput/OtpInput.tsx +244 -0
  375. package/lib/components/OtpInput/index.d.ts +2 -0
  376. package/lib/components/OtpInput/index.js +1 -0
  377. package/lib/components/OutputText/OutputText.d.ts +8 -0
  378. package/lib/components/OutputText/OutputText.js +57 -0
  379. package/lib/components/OutputText/index.d.ts +2 -0
  380. package/lib/components/OutputText/index.js +1 -0
  381. package/lib/components/Pagination/Pagination.d.ts +8 -0
  382. package/lib/components/Pagination/Pagination.js +32 -0
  383. package/lib/components/Pagination/index.d.ts +2 -0
  384. package/lib/components/Pagination/index.js +1 -0
  385. package/lib/components/Programa/Programa.d.ts +31 -0
  386. package/lib/components/Programa/Programa.js +172 -0
  387. package/lib/components/Programa/index.d.ts +2 -0
  388. package/lib/components/Programa/index.js +1 -0
  389. package/lib/components/ProgressBar/ProgressBar.d.ts +8 -0
  390. package/lib/components/ProgressBar/ProgressBar.js +71 -0
  391. package/lib/components/ProgressBar/index.d.ts +2 -0
  392. package/lib/components/ProgressBar/index.js +1 -0
  393. package/lib/components/Select/Select.d.ts +8 -0
  394. package/lib/components/Select/Select.js +117 -0
  395. package/lib/components/Select/index.d.ts +2 -0
  396. package/lib/components/Select/index.js +1 -0
  397. package/lib/components/SimpleTable/SimpleTable.d.ts +13 -0
  398. package/lib/components/SimpleTable/SimpleTable.js +504 -0
  399. package/lib/components/SimpleTable/index.d.ts +2 -0
  400. package/lib/components/SimpleTable/index.js +2 -0
  401. package/lib/components/Stepper/Stepper.d.ts +54 -0
  402. package/lib/components/Stepper/Stepper.js +222 -0
  403. package/lib/components/Stepper/index.d.ts +2 -0
  404. package/lib/components/Stepper/index.js +1 -0
  405. package/lib/components/TablePicker/TablePicker.d.ts +8 -0
  406. package/lib/components/TablePicker/TablePicker.js +238 -0
  407. package/lib/components/TablePicker/index.d.ts +2 -0
  408. package/lib/components/TablePicker/index.js +1 -0
  409. package/lib/components/Tabs/Tabs.d.ts +8 -0
  410. package/lib/components/Tabs/Tabs.js +59 -0
  411. package/lib/components/Tabs/index.d.ts +2 -0
  412. package/lib/components/Tabs/index.js +1 -0
  413. package/lib/components/TextArea/TextArea.d.ts +8 -0
  414. package/lib/components/TextArea/TextArea.js +123 -0
  415. package/lib/components/TextArea/index.d.ts +2 -0
  416. package/lib/components/TextArea/index.js +1 -0
  417. package/lib/components/ThreadLog/ThreadLog.d.ts +8 -0
  418. package/lib/components/ThreadLog/ThreadLog.js +189 -0
  419. package/lib/components/ThreadLog/index.d.ts +2 -0
  420. package/lib/components/ThreadLog/index.js +1 -0
  421. package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +93 -0
  422. package/lib/components/UtilAutoComplete/UtilAutoComplete.js +130 -0
  423. package/lib/components/UtilAutoComplete/index.d.ts +2 -0
  424. package/lib/components/UtilAutoComplete/index.js +1 -0
  425. package/lib/components/index.d.ts +148 -0
  426. package/lib/components/index.js +146 -0
  427. package/lib/fieldsRedux/createField.d.ts +8 -0
  428. package/lib/fieldsRedux/createField.js +120 -0
  429. package/lib/fieldsRedux/fieldsRedux.d.ts +71 -0
  430. package/lib/fieldsRedux/fieldsRedux.js +391 -0
  431. package/lib/fieldsRedux/index.d.ts +4 -0
  432. package/lib/fieldsRedux/index.js +5 -0
  433. package/lib/fieldsRedux/passFields.d.ts +5 -0
  434. package/lib/fieldsRedux/passFields.js +76 -0
  435. package/lib/reducers/argous.ts +103 -0
  436. package/lib/reducers/index.ts +6 -0
  437. package/lib/types.d.ts +144 -0
  438. package/lib/utils/api.ts +153 -0
  439. package/lib/utils/config.ts +12 -0
  440. package/lib/utils/date.ts +63 -0
  441. package/lib/utils/index.ts +314 -0
  442. package/lib/utils/rippleEffect.js +211 -0
  443. package/lib/utils/store.ts +11 -0
  444. package/lib/utils/xmlToJson.js +117 -0
  445. package/package.json +1 -1
  446. package/dist/components/ArgousComplexTableBody/dnd/Container.d.ts +0 -55
  447. package/dist/components/ArgousComplexTableBody/dnd/Container.js +0 -173
  448. package/dist/components/ArgousComplexTableBody/dnd/Draggable.d.ts +0 -14
  449. package/dist/components/ArgousComplexTableBody/dnd/Draggable.js +0 -73
  450. package/dist/components/ArgousComplexTableBody/dnd/index.d.ts +0 -2
  451. package/dist/components/ArgousComplexTableBody/dnd/index.js +0 -10
  452. package/dist/components/ConfirmModal/useModal.d.ts +0 -2
  453. package/dist/components/ConfirmModal/useModal.js +0 -9
  454. package/dist/components/DropArea/worker.d.ts +0 -1
  455. package/dist/components/DropArea/worker.js +0 -55
  456. package/dist/components/Editor/tinymce/icons/default/icons.d.ts +0 -0
  457. package/dist/components/Editor/tinymce/icons/default/icons.js +0 -173
  458. package/dist/components/Editor/tinymce/plugins/advlist/plugin.d.ts +0 -0
  459. package/dist/components/Editor/tinymce/plugins/advlist/plugin.js +0 -271
  460. package/dist/components/Editor/tinymce/plugins/anchor/plugin.d.ts +0 -0
  461. package/dist/components/Editor/tinymce/plugins/anchor/plugin.js +0 -207
  462. package/dist/components/Editor/tinymce/plugins/autolink/plugin.d.ts +0 -0
  463. package/dist/components/Editor/tinymce/plugins/autolink/plugin.js +0 -187
  464. package/dist/components/Editor/tinymce/plugins/autoresize/plugin.d.ts +0 -0
  465. package/dist/components/Editor/tinymce/plugins/autoresize/plugin.js +0 -163
  466. package/dist/components/Editor/tinymce/plugins/autosave/plugin.d.ts +0 -0
  467. package/dist/components/Editor/tinymce/plugins/autosave/plugin.js +0 -199
  468. package/dist/components/Editor/tinymce/plugins/bbcode/plugin.d.ts +0 -0
  469. package/dist/components/Editor/tinymce/plugins/bbcode/plugin.js +0 -94
  470. package/dist/components/Editor/tinymce/plugins/charmap/plugin.d.ts +0 -0
  471. package/dist/components/Editor/tinymce/plugins/charmap/plugin.js +0 -1691
  472. package/dist/components/Editor/tinymce/plugins/code/plugin.d.ts +0 -0
  473. package/dist/components/Editor/tinymce/plugins/code/plugin.js +0 -85
  474. package/dist/components/Editor/tinymce/plugins/codesample/plugin.js +0 -2331
  475. package/dist/components/Editor/tinymce/plugins/colorpicker/plugin.d.ts +0 -0
  476. package/dist/components/Editor/tinymce/plugins/contextmenu/plugin.d.ts +0 -0
  477. package/dist/components/Editor/tinymce/plugins/directionality/plugin.d.ts +0 -0
  478. package/dist/components/Editor/tinymce/plugins/directionality/plugin.js +0 -300
  479. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojiimages.d.ts +0 -0
  480. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +0 -9425
  481. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojis.d.ts +0 -0
  482. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojis.js +0 -9424
  483. package/dist/components/Editor/tinymce/plugins/emoticons/plugin.d.ts +0 -0
  484. package/dist/components/Editor/tinymce/plugins/emoticons/plugin.js +0 -585
  485. package/dist/components/Editor/tinymce/plugins/fullpage/plugin.d.ts +0 -0
  486. package/dist/components/Editor/tinymce/plugins/fullpage/plugin.js +0 -539
  487. package/dist/components/Editor/tinymce/plugins/fullscreen/plugin.d.ts +0 -0
  488. package/dist/components/Editor/tinymce/plugins/fullscreen/plugin.js +0 -962
  489. package/dist/components/Editor/tinymce/plugins/help/plugin.d.ts +0 -0
  490. package/dist/components/Editor/tinymce/plugins/help/plugin.js +0 -850
  491. package/dist/components/Editor/tinymce/plugins/hr/plugin.d.ts +0 -0
  492. package/dist/components/Editor/tinymce/plugins/hr/plugin.js +0 -41
  493. package/dist/components/Editor/tinymce/plugins/image/plugin.d.ts +0 -0
  494. package/dist/components/Editor/tinymce/plugins/image/plugin.js +0 -1673
  495. package/dist/components/Editor/tinymce/plugins/imagetools/plugin.d.ts +0 -0
  496. package/dist/components/Editor/tinymce/plugins/imagetools/plugin.js +0 -1335
  497. package/dist/components/Editor/tinymce/plugins/importcss/plugin.d.ts +0 -0
  498. package/dist/components/Editor/tinymce/plugins/importcss/plugin.js +0 -346
  499. package/dist/components/Editor/tinymce/plugins/insertdatetime/plugin.d.ts +0 -0
  500. package/dist/components/Editor/tinymce/plugins/insertdatetime/plugin.js +0 -171
  501. package/dist/components/Editor/tinymce/plugins/legacyoutput/plugin.d.ts +0 -0
  502. package/dist/components/Editor/tinymce/plugins/legacyoutput/plugin.js +0 -193
  503. package/dist/components/Editor/tinymce/plugins/link/plugin.d.ts +0 -0
  504. package/dist/components/Editor/tinymce/plugins/link/plugin.js +0 -1282
  505. package/dist/components/Editor/tinymce/plugins/lists/plugin.d.ts +0 -0
  506. package/dist/components/Editor/tinymce/plugins/lists/plugin.js +0 -2256
  507. package/dist/components/Editor/tinymce/plugins/media/plugin.d.ts +0 -0
  508. package/dist/components/Editor/tinymce/plugins/media/plugin.js +0 -1374
  509. package/dist/components/Editor/tinymce/plugins/nonbreaking/plugin.d.ts +0 -0
  510. package/dist/components/Editor/tinymce/plugins/nonbreaking/plugin.js +0 -93
  511. package/dist/components/Editor/tinymce/plugins/noneditable/plugin.d.ts +0 -0
  512. package/dist/components/Editor/tinymce/plugins/noneditable/plugin.js +0 -114
  513. package/dist/components/Editor/tinymce/plugins/pagebreak/plugin.d.ts +0 -0
  514. package/dist/components/Editor/tinymce/plugins/pagebreak/plugin.js +0 -96
  515. package/dist/components/Editor/tinymce/plugins/paste/plugin.d.ts +0 -0
  516. package/dist/components/Editor/tinymce/plugins/paste/plugin.js +0 -1747
  517. package/dist/components/Editor/tinymce/plugins/preview/plugin.d.ts +0 -0
  518. package/dist/components/Editor/tinymce/plugins/preview/plugin.js +0 -119
  519. package/dist/components/Editor/tinymce/plugins/print/plugin.d.ts +0 -0
  520. package/dist/components/Editor/tinymce/plugins/print/plugin.js +0 -48
  521. package/dist/components/Editor/tinymce/plugins/quickbars/plugin.d.ts +0 -0
  522. package/dist/components/Editor/tinymce/plugins/quickbars/plugin.js +0 -475
  523. package/dist/components/Editor/tinymce/plugins/save/plugin.d.ts +0 -0
  524. package/dist/components/Editor/tinymce/plugins/save/plugin.js +0 -112
  525. package/dist/components/Editor/tinymce/plugins/searchreplace/plugin.d.ts +0 -0
  526. package/dist/components/Editor/tinymce/plugins/searchreplace/plugin.js +0 -1149
  527. package/dist/components/Editor/tinymce/plugins/spellchecker/plugin.d.ts +0 -0
  528. package/dist/components/Editor/tinymce/plugins/spellchecker/plugin.js +0 -723
  529. package/dist/components/Editor/tinymce/plugins/tabfocus/plugin.d.ts +0 -0
  530. package/dist/components/Editor/tinymce/plugins/tabfocus/plugin.js +0 -124
  531. package/dist/components/Editor/tinymce/plugins/table/plugin.d.ts +0 -0
  532. package/dist/components/Editor/tinymce/plugins/table/plugin.js +0 -10853
  533. package/dist/components/Editor/tinymce/plugins/template/plugin.d.ts +0 -0
  534. package/dist/components/Editor/tinymce/plugins/template/plugin.js +0 -561
  535. package/dist/components/Editor/tinymce/plugins/textcolor/plugin.d.ts +0 -0
  536. package/dist/components/Editor/tinymce/plugins/textpattern/plugin.d.ts +0 -0
  537. package/dist/components/Editor/tinymce/plugins/textpattern/plugin.js +0 -1393
  538. package/dist/components/Editor/tinymce/plugins/toc/plugin.d.ts +0 -0
  539. package/dist/components/Editor/tinymce/plugins/toc/plugin.js +0 -227
  540. package/dist/components/Editor/tinymce/plugins/visualblocks/plugin.d.ts +0 -0
  541. package/dist/components/Editor/tinymce/plugins/visualblocks/plugin.js +0 -94
  542. package/dist/components/Editor/tinymce/plugins/visualchars/plugin.d.ts +0 -0
  543. package/dist/components/Editor/tinymce/plugins/visualchars/plugin.js +0 -521
  544. package/dist/components/Editor/tinymce/plugins/wordcount/plugin.d.ts +0 -0
  545. package/dist/components/Editor/tinymce/plugins/wordcount/plugin.js +0 -397
  546. package/dist/components/Editor/tinymce/themes/mobile/theme.js +0 -13348
  547. package/dist/components/Editor/tinymce/themes/silver/theme.js +0 -32028
  548. package/dist/components/Editor/tinymce/tinymce.js +0 -30486
  549. package/dist/components/FilePreparer/worker.d.ts +0 -2
  550. package/dist/components/FilePreparer/worker.js +0 -31
  551. package/dist/convertReacticons.d.ts +0 -1
  552. package/dist/convertReacticons.js +0 -62
  553. package/dist/utils/Fields.d.ts +0 -0
  554. package/dist/utils/Fields.js +0 -1
@@ -0,0 +1,2332 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.9.0 (TBD)
8
+ */
9
+ (function () {
10
+ 'use strict';
11
+
12
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+ var noop = function () {
15
+ };
16
+ var constant = function (value) {
17
+ return function () {
18
+ return value;
19
+ };
20
+ };
21
+ var never = constant(false);
22
+ var always = constant(true);
23
+
24
+ var none = function () {
25
+ return NONE;
26
+ };
27
+ var NONE = function () {
28
+ var eq = function (o) {
29
+ return o.isNone();
30
+ };
31
+ var call = function (thunk) {
32
+ return thunk();
33
+ };
34
+ var id = function (n) {
35
+ return n;
36
+ };
37
+ var me = {
38
+ fold: function (n, _s) {
39
+ return n();
40
+ },
41
+ is: never,
42
+ isSome: never,
43
+ isNone: always,
44
+ getOr: id,
45
+ getOrThunk: call,
46
+ getOrDie: function (msg) {
47
+ throw new Error(msg || 'error: getOrDie called on none.');
48
+ },
49
+ getOrNull: constant(null),
50
+ getOrUndefined: constant(undefined),
51
+ or: id,
52
+ orThunk: call,
53
+ map: none,
54
+ each: noop,
55
+ bind: none,
56
+ exists: never,
57
+ forall: always,
58
+ filter: none,
59
+ equals: eq,
60
+ equals_: eq,
61
+ toArray: function () {
62
+ return [];
63
+ },
64
+ toString: constant('none()')
65
+ };
66
+ return me;
67
+ }();
68
+ var some = function (a) {
69
+ var constant_a = constant(a);
70
+ var self = function () {
71
+ return me;
72
+ };
73
+ var bind = function (f) {
74
+ return f(a);
75
+ };
76
+ var me = {
77
+ fold: function (n, s) {
78
+ return s(a);
79
+ },
80
+ is: function (v) {
81
+ return a === v;
82
+ },
83
+ isSome: always,
84
+ isNone: never,
85
+ getOr: constant_a,
86
+ getOrThunk: constant_a,
87
+ getOrDie: constant_a,
88
+ getOrNull: constant_a,
89
+ getOrUndefined: constant_a,
90
+ or: self,
91
+ orThunk: self,
92
+ map: function (f) {
93
+ return some(f(a));
94
+ },
95
+ each: function (f) {
96
+ f(a);
97
+ },
98
+ bind: bind,
99
+ exists: bind,
100
+ forall: bind,
101
+ filter: function (f) {
102
+ return f(a) ? me : NONE;
103
+ },
104
+ toArray: function () {
105
+ return [a];
106
+ },
107
+ toString: function () {
108
+ return 'some(' + a + ')';
109
+ },
110
+ equals: function (o) {
111
+ return o.is(a);
112
+ },
113
+ equals_: function (o, elementEq) {
114
+ return o.fold(never, function (b) {
115
+ return elementEq(a, b);
116
+ });
117
+ }
118
+ };
119
+ return me;
120
+ };
121
+ var from = function (value) {
122
+ return value === null || value === undefined ? NONE : some(value);
123
+ };
124
+ var Optional = {
125
+ some: some,
126
+ none: none,
127
+ from: from
128
+ };
129
+
130
+ var get = function (xs, i) {
131
+ return i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
132
+ };
133
+ var head = function (xs) {
134
+ return get(xs, 0);
135
+ };
136
+
137
+ var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
138
+
139
+ var isCodeSample = function (elm) {
140
+ return elm && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1;
141
+ };
142
+ var trimArg = function (predicateFn) {
143
+ return function (arg1, arg2) {
144
+ return predicateFn(arg2);
145
+ };
146
+ };
147
+
148
+ var Global = typeof window !== 'undefined' ? window : Function('return this;')();
149
+
150
+ var exports$1 = {}, module = { exports: exports$1 }, global$2 = {};
151
+ (function (define, exports, module, require) {
152
+ var oldprism = window.Prism;
153
+ window.Prism = { manual: true };
154
+ (function (f) {
155
+ if (typeof exports === 'object' && typeof module !== 'undefined') {
156
+ module.exports = f();
157
+ } else if (typeof define === 'function' && define.amd) {
158
+ define([], f);
159
+ } else {
160
+ var g;
161
+ if (typeof window !== 'undefined') {
162
+ g = window;
163
+ } else if (typeof global$2 !== 'undefined') {
164
+ g = global$2;
165
+ } else if (typeof self !== 'undefined') {
166
+ g = self;
167
+ } else {
168
+ g = this;
169
+ }
170
+ g.EphoxContactWrapper = f();
171
+ }
172
+ }(function () {
173
+ return function () {
174
+ function r(e, n, t) {
175
+ function o(i, f) {
176
+ if (!n[i]) {
177
+ if (!e[i]) {
178
+ var c = 'function' == typeof require && require;
179
+ if (!f && c)
180
+ return c(i, !0);
181
+ if (u)
182
+ return u(i, !0);
183
+ var a = new Error('Cannot find module \'' + i + '\'');
184
+ throw a.code = 'MODULE_NOT_FOUND', a;
185
+ }
186
+ var p = n[i] = { exports: {} };
187
+ e[i][0].call(p.exports, function (r) {
188
+ var n = e[i][1][r];
189
+ return o(n || r);
190
+ }, p, p.exports, r, e, n, t);
191
+ }
192
+ return n[i].exports;
193
+ }
194
+ for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++)
195
+ o(t[i]);
196
+ return o;
197
+ }
198
+ return r;
199
+ }()({
200
+ 1: [
201
+ function (require, module, exports) {
202
+ Prism.languages.c = Prism.languages.extend('clike', {
203
+ 'comment': {
204
+ pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
205
+ greedy: true
206
+ },
207
+ 'class-name': {
208
+ pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
209
+ lookbehind: true
210
+ },
211
+ 'keyword': /\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
212
+ 'function': /[a-z_]\w*(?=\s*\()/i,
213
+ 'number': /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
214
+ 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
215
+ });
216
+ Prism.languages.insertBefore('c', 'string', {
217
+ 'macro': {
218
+ pattern: /(^\s*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
219
+ lookbehind: true,
220
+ greedy: true,
221
+ alias: 'property',
222
+ inside: {
223
+ 'string': [
224
+ {
225
+ pattern: /^(#\s*include\s*)<[^>]+>/,
226
+ lookbehind: true
227
+ },
228
+ Prism.languages.c['string']
229
+ ],
230
+ 'comment': Prism.languages.c['comment'],
231
+ 'macro-name': [
232
+ {
233
+ pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
234
+ lookbehind: true
235
+ },
236
+ {
237
+ pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
238
+ lookbehind: true,
239
+ alias: 'function'
240
+ }
241
+ ],
242
+ 'directive': {
243
+ pattern: /^(#\s*)[a-z]+/,
244
+ lookbehind: true,
245
+ alias: 'keyword'
246
+ },
247
+ 'directive-hash': /^#/,
248
+ 'punctuation': /##|\\(?=[\r\n])/,
249
+ 'expression': {
250
+ pattern: /\S[\s\S]*/,
251
+ inside: Prism.languages.c
252
+ }
253
+ }
254
+ },
255
+ 'constant': /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/
256
+ });
257
+ delete Prism.languages.c['boolean'];
258
+ },
259
+ {}
260
+ ],
261
+ 2: [
262
+ function (require, module, exports) {
263
+ Prism.languages.clike = {
264
+ 'comment': [
265
+ {
266
+ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
267
+ lookbehind: true,
268
+ greedy: true
269
+ },
270
+ {
271
+ pattern: /(^|[^\\:])\/\/.*/,
272
+ lookbehind: true,
273
+ greedy: true
274
+ }
275
+ ],
276
+ 'string': {
277
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
278
+ greedy: true
279
+ },
280
+ 'class-name': {
281
+ pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,
282
+ lookbehind: true,
283
+ inside: { 'punctuation': /[.\\]/ }
284
+ },
285
+ 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
286
+ 'boolean': /\b(?:true|false)\b/,
287
+ 'function': /\w+(?=\()/,
288
+ 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
289
+ 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
290
+ 'punctuation': /[{}[\];(),.:]/
291
+ };
292
+ },
293
+ {}
294
+ ],
295
+ 3: [
296
+ function (require, module, exports) {
297
+ (function (global) {
298
+ (function () {
299
+ var _self = typeof window !== 'undefined' ? window : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {};
300
+ var Prism = function (_self) {
301
+ var lang = /\blang(?:uage)?-([\w-]+)\b/i;
302
+ var uniqueId = 0;
303
+ var _ = {
304
+ manual: _self.Prism && _self.Prism.manual,
305
+ disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,
306
+ util: {
307
+ encode: function encode(tokens) {
308
+ if (tokens instanceof Token) {
309
+ return new Token(tokens.type, encode(tokens.content), tokens.alias);
310
+ } else if (Array.isArray(tokens)) {
311
+ return tokens.map(encode);
312
+ } else {
313
+ return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
314
+ }
315
+ },
316
+ type: function (o) {
317
+ return Object.prototype.toString.call(o).slice(8, -1);
318
+ },
319
+ objId: function (obj) {
320
+ if (!obj['__id']) {
321
+ Object.defineProperty(obj, '__id', { value: ++uniqueId });
322
+ }
323
+ return obj['__id'];
324
+ },
325
+ clone: function deepClone(o, visited) {
326
+ visited = visited || {};
327
+ var clone, id;
328
+ switch (_.util.type(o)) {
329
+ case 'Object':
330
+ id = _.util.objId(o);
331
+ if (visited[id]) {
332
+ return visited[id];
333
+ }
334
+ clone = {};
335
+ visited[id] = clone;
336
+ for (var key in o) {
337
+ if (o.hasOwnProperty(key)) {
338
+ clone[key] = deepClone(o[key], visited);
339
+ }
340
+ }
341
+ return clone;
342
+ case 'Array':
343
+ id = _.util.objId(o);
344
+ if (visited[id]) {
345
+ return visited[id];
346
+ }
347
+ clone = [];
348
+ visited[id] = clone;
349
+ o.forEach(function (v, i) {
350
+ clone[i] = deepClone(v, visited);
351
+ });
352
+ return clone;
353
+ default:
354
+ return o;
355
+ }
356
+ },
357
+ getLanguage: function (element) {
358
+ while (element && !lang.test(element.className)) {
359
+ element = element.parentElement;
360
+ }
361
+ if (element) {
362
+ return (element.className.match(lang) || [
363
+ ,
364
+ 'none'
365
+ ])[1].toLowerCase();
366
+ }
367
+ return 'none';
368
+ },
369
+ currentScript: function () {
370
+ if (typeof document === 'undefined') {
371
+ return null;
372
+ }
373
+ if ('currentScript' in document && 1 < 2) {
374
+ return document.currentScript;
375
+ }
376
+ try {
377
+ throw new Error();
378
+ } catch (err) {
379
+ var src = (/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(err.stack) || [])[1];
380
+ if (src) {
381
+ var scripts = document.getElementsByTagName('script');
382
+ for (var i in scripts) {
383
+ if (scripts[i].src == src) {
384
+ return scripts[i];
385
+ }
386
+ }
387
+ }
388
+ return null;
389
+ }
390
+ },
391
+ isActive: function (element, className, defaultActivation) {
392
+ var no = 'no-' + className;
393
+ while (element) {
394
+ var classList = element.classList;
395
+ if (classList.contains(className)) {
396
+ return true;
397
+ }
398
+ if (classList.contains(no)) {
399
+ return false;
400
+ }
401
+ element = element.parentElement;
402
+ }
403
+ return !!defaultActivation;
404
+ }
405
+ },
406
+ languages: {
407
+ extend: function (id, redef) {
408
+ var lang = _.util.clone(_.languages[id]);
409
+ for (var key in redef) {
410
+ lang[key] = redef[key];
411
+ }
412
+ return lang;
413
+ },
414
+ insertBefore: function (inside, before, insert, root) {
415
+ root = root || _.languages;
416
+ var grammar = root[inside];
417
+ var ret = {};
418
+ for (var token in grammar) {
419
+ if (grammar.hasOwnProperty(token)) {
420
+ if (token == before) {
421
+ for (var newToken in insert) {
422
+ if (insert.hasOwnProperty(newToken)) {
423
+ ret[newToken] = insert[newToken];
424
+ }
425
+ }
426
+ }
427
+ if (!insert.hasOwnProperty(token)) {
428
+ ret[token] = grammar[token];
429
+ }
430
+ }
431
+ }
432
+ var old = root[inside];
433
+ root[inside] = ret;
434
+ _.languages.DFS(_.languages, function (key, value) {
435
+ if (value === old && key != inside) {
436
+ this[key] = ret;
437
+ }
438
+ });
439
+ return ret;
440
+ },
441
+ DFS: function DFS(o, callback, type, visited) {
442
+ visited = visited || {};
443
+ var objId = _.util.objId;
444
+ for (var i in o) {
445
+ if (o.hasOwnProperty(i)) {
446
+ callback.call(o, i, o[i], type || i);
447
+ var property = o[i], propertyType = _.util.type(property);
448
+ if (propertyType === 'Object' && !visited[objId(property)]) {
449
+ visited[objId(property)] = true;
450
+ DFS(property, callback, null, visited);
451
+ } else if (propertyType === 'Array' && !visited[objId(property)]) {
452
+ visited[objId(property)] = true;
453
+ DFS(property, callback, i, visited);
454
+ }
455
+ }
456
+ }
457
+ }
458
+ },
459
+ plugins: {},
460
+ highlightAll: function (async, callback) {
461
+ _.highlightAllUnder(document, async, callback);
462
+ },
463
+ highlightAllUnder: function (container, async, callback) {
464
+ var env = {
465
+ callback: callback,
466
+ container: container,
467
+ selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
468
+ };
469
+ _.hooks.run('before-highlightall', env);
470
+ env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector));
471
+ _.hooks.run('before-all-elements-highlight', env);
472
+ for (var i = 0, element; element = env.elements[i++];) {
473
+ _.highlightElement(element, async === true, env.callback);
474
+ }
475
+ },
476
+ highlightElement: function (element, async, callback) {
477
+ var language = _.util.getLanguage(element);
478
+ var grammar = _.languages[language];
479
+ element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
480
+ var parent = element.parentElement;
481
+ if (parent && parent.nodeName.toLowerCase() === 'pre') {
482
+ parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
483
+ }
484
+ var code = element.textContent;
485
+ var env = {
486
+ element: element,
487
+ language: language,
488
+ grammar: grammar,
489
+ code: code
490
+ };
491
+ function insertHighlightedCode(highlightedCode) {
492
+ env.highlightedCode = highlightedCode;
493
+ _.hooks.run('before-insert', env);
494
+ env.element.innerHTML = env.highlightedCode;
495
+ _.hooks.run('after-highlight', env);
496
+ _.hooks.run('complete', env);
497
+ callback && callback.call(env.element);
498
+ }
499
+ _.hooks.run('before-sanity-check', env);
500
+ if (!env.code) {
501
+ _.hooks.run('complete', env);
502
+ callback && callback.call(env.element);
503
+ return;
504
+ }
505
+ _.hooks.run('before-highlight', env);
506
+ if (!env.grammar) {
507
+ insertHighlightedCode(_.util.encode(env.code));
508
+ return;
509
+ }
510
+ if (async && _self.Worker) {
511
+ var worker = new Worker(_.filename);
512
+ worker.onmessage = function (evt) {
513
+ insertHighlightedCode(evt.data);
514
+ };
515
+ worker.postMessage(JSON.stringify({
516
+ language: env.language,
517
+ code: env.code,
518
+ immediateClose: true
519
+ }));
520
+ } else {
521
+ insertHighlightedCode(_.highlight(env.code, env.grammar, env.language));
522
+ }
523
+ },
524
+ highlight: function (text, grammar, language) {
525
+ var env = {
526
+ code: text,
527
+ grammar: grammar,
528
+ language: language
529
+ };
530
+ _.hooks.run('before-tokenize', env);
531
+ env.tokens = _.tokenize(env.code, env.grammar);
532
+ _.hooks.run('after-tokenize', env);
533
+ return Token.stringify(_.util.encode(env.tokens), env.language);
534
+ },
535
+ tokenize: function (text, grammar) {
536
+ var rest = grammar.rest;
537
+ if (rest) {
538
+ for (var token in rest) {
539
+ grammar[token] = rest[token];
540
+ }
541
+ delete grammar.rest;
542
+ }
543
+ var tokenList = new LinkedList();
544
+ addAfter(tokenList, tokenList.head, text);
545
+ matchGrammar(text, tokenList, grammar, tokenList.head, 0);
546
+ return toArray(tokenList);
547
+ },
548
+ hooks: {
549
+ all: {},
550
+ add: function (name, callback) {
551
+ var hooks = _.hooks.all;
552
+ hooks[name] = hooks[name] || [];
553
+ hooks[name].push(callback);
554
+ },
555
+ run: function (name, env) {
556
+ var callbacks = _.hooks.all[name];
557
+ if (!callbacks || !callbacks.length) {
558
+ return;
559
+ }
560
+ for (var i = 0, callback; callback = callbacks[i++];) {
561
+ callback(env);
562
+ }
563
+ }
564
+ },
565
+ Token: Token
566
+ };
567
+ _self.Prism = _;
568
+ function Token(type, content, alias, matchedStr) {
569
+ this.type = type;
570
+ this.content = content;
571
+ this.alias = alias;
572
+ this.length = (matchedStr || '').length | 0;
573
+ }
574
+ Token.stringify = function stringify(o, language) {
575
+ if (typeof o == 'string') {
576
+ return o;
577
+ }
578
+ if (Array.isArray(o)) {
579
+ var s = '';
580
+ o.forEach(function (e) {
581
+ s += stringify(e, language);
582
+ });
583
+ return s;
584
+ }
585
+ var env = {
586
+ type: o.type,
587
+ content: stringify(o.content, language),
588
+ tag: 'span',
589
+ classes: [
590
+ 'token',
591
+ o.type
592
+ ],
593
+ attributes: {},
594
+ language: language
595
+ };
596
+ var aliases = o.alias;
597
+ if (aliases) {
598
+ if (Array.isArray(aliases)) {
599
+ Array.prototype.push.apply(env.classes, aliases);
600
+ } else {
601
+ env.classes.push(aliases);
602
+ }
603
+ }
604
+ _.hooks.run('wrap', env);
605
+ var attributes = '';
606
+ for (var name in env.attributes) {
607
+ attributes += ' ' + name + '="' + (env.attributes[name] || '').replace(/"/g, '&quot;') + '"';
608
+ }
609
+ return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + '</' + env.tag + '>';
610
+ };
611
+ function matchPattern(pattern, pos, text, lookbehind) {
612
+ pattern.lastIndex = pos;
613
+ var match = pattern.exec(text);
614
+ if (match && lookbehind && match[1]) {
615
+ var lookbehindLength = match[1].length;
616
+ match.index += lookbehindLength;
617
+ match[0] = match[0].slice(lookbehindLength);
618
+ }
619
+ return match;
620
+ }
621
+ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {
622
+ for (var token in grammar) {
623
+ if (!grammar.hasOwnProperty(token) || !grammar[token]) {
624
+ continue;
625
+ }
626
+ var patterns = grammar[token];
627
+ patterns = Array.isArray(patterns) ? patterns : [patterns];
628
+ for (var j = 0; j < patterns.length; ++j) {
629
+ if (rematch && rematch.cause == token + ',' + j) {
630
+ return;
631
+ }
632
+ var patternObj = patterns[j], inside = patternObj.inside, lookbehind = !!patternObj.lookbehind, greedy = !!patternObj.greedy, alias = patternObj.alias;
633
+ if (greedy && !patternObj.pattern.global) {
634
+ var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];
635
+ patternObj.pattern = RegExp(patternObj.pattern.source, flags + 'g');
636
+ }
637
+ var pattern = patternObj.pattern || patternObj;
638
+ for (var currentNode = startNode.next, pos = startPos; currentNode !== tokenList.tail; pos += currentNode.value.length, currentNode = currentNode.next) {
639
+ if (rematch && pos >= rematch.reach) {
640
+ break;
641
+ }
642
+ var str = currentNode.value;
643
+ if (tokenList.length > text.length) {
644
+ return;
645
+ }
646
+ if (str instanceof Token) {
647
+ continue;
648
+ }
649
+ var removeCount = 1;
650
+ var match;
651
+ if (greedy) {
652
+ match = matchPattern(pattern, pos, text, lookbehind);
653
+ if (!match) {
654
+ break;
655
+ }
656
+ var from = match.index;
657
+ var to = match.index + match[0].length;
658
+ var p = pos;
659
+ p += currentNode.value.length;
660
+ while (from >= p) {
661
+ currentNode = currentNode.next;
662
+ p += currentNode.value.length;
663
+ }
664
+ p -= currentNode.value.length;
665
+ pos = p;
666
+ if (currentNode.value instanceof Token) {
667
+ continue;
668
+ }
669
+ for (var k = currentNode; k !== tokenList.tail && (p < to || typeof k.value === 'string'); k = k.next) {
670
+ removeCount++;
671
+ p += k.value.length;
672
+ }
673
+ removeCount--;
674
+ str = text.slice(pos, p);
675
+ match.index -= pos;
676
+ } else {
677
+ match = matchPattern(pattern, 0, str, lookbehind);
678
+ if (!match) {
679
+ continue;
680
+ }
681
+ }
682
+ var from = match.index, matchStr = match[0], before = str.slice(0, from), after = str.slice(from + matchStr.length);
683
+ var reach = pos + str.length;
684
+ if (rematch && reach > rematch.reach) {
685
+ rematch.reach = reach;
686
+ }
687
+ var removeFrom = currentNode.prev;
688
+ if (before) {
689
+ removeFrom = addAfter(tokenList, removeFrom, before);
690
+ pos += before.length;
691
+ }
692
+ removeRange(tokenList, removeFrom, removeCount);
693
+ var wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);
694
+ currentNode = addAfter(tokenList, removeFrom, wrapped);
695
+ if (after) {
696
+ addAfter(tokenList, currentNode, after);
697
+ }
698
+ if (removeCount > 1) {
699
+ matchGrammar(text, tokenList, grammar, currentNode.prev, pos, {
700
+ cause: token + ',' + j,
701
+ reach: reach
702
+ });
703
+ }
704
+ }
705
+ }
706
+ }
707
+ }
708
+ function LinkedList() {
709
+ var head = {
710
+ value: null,
711
+ prev: null,
712
+ next: null
713
+ };
714
+ var tail = {
715
+ value: null,
716
+ prev: head,
717
+ next: null
718
+ };
719
+ head.next = tail;
720
+ this.head = head;
721
+ this.tail = tail;
722
+ this.length = 0;
723
+ }
724
+ function addAfter(list, node, value) {
725
+ var next = node.next;
726
+ var newNode = {
727
+ value: value,
728
+ prev: node,
729
+ next: next
730
+ };
731
+ node.next = newNode;
732
+ next.prev = newNode;
733
+ list.length++;
734
+ return newNode;
735
+ }
736
+ function removeRange(list, node, count) {
737
+ var next = node.next;
738
+ for (var i = 0; i < count && next !== list.tail; i++) {
739
+ next = next.next;
740
+ }
741
+ node.next = next;
742
+ next.prev = node;
743
+ list.length -= i;
744
+ }
745
+ function toArray(list) {
746
+ var array = [];
747
+ var node = list.head.next;
748
+ while (node !== list.tail) {
749
+ array.push(node.value);
750
+ node = node.next;
751
+ }
752
+ return array;
753
+ }
754
+ if (!_self.document) {
755
+ if (!_self.addEventListener) {
756
+ return _;
757
+ }
758
+ if (!_.disableWorkerMessageHandler) {
759
+ _self.addEventListener('message', function (evt) {
760
+ var message = JSON.parse(evt.data), lang = message.language, code = message.code, immediateClose = message.immediateClose;
761
+ _self.postMessage(_.highlight(code, _.languages[lang], lang));
762
+ if (immediateClose) {
763
+ _self.close();
764
+ }
765
+ }, false);
766
+ }
767
+ return _;
768
+ }
769
+ var script = _.util.currentScript();
770
+ if (script) {
771
+ _.filename = script.src;
772
+ if (script.hasAttribute('data-manual')) {
773
+ _.manual = true;
774
+ }
775
+ }
776
+ function highlightAutomaticallyCallback() {
777
+ if (!_.manual) {
778
+ _.highlightAll();
779
+ }
780
+ }
781
+ if (!_.manual) {
782
+ var readyState = document.readyState;
783
+ if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) {
784
+ document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback);
785
+ } else {
786
+ if (window.requestAnimationFrame) {
787
+ window.requestAnimationFrame(highlightAutomaticallyCallback);
788
+ } else {
789
+ window.setTimeout(highlightAutomaticallyCallback, 16);
790
+ }
791
+ }
792
+ }
793
+ return _;
794
+ }(_self);
795
+ if (typeof module !== 'undefined' && module.exports) {
796
+ module.exports = Prism;
797
+ }
798
+ if (typeof global !== 'undefined') {
799
+ global.Prism = Prism;
800
+ }
801
+ }.call(this));
802
+ }.call(this, typeof global$2 !== 'undefined' ? global$2 : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {}));
803
+ },
804
+ {}
805
+ ],
806
+ 4: [
807
+ function (require, module, exports) {
808
+ (function (Prism) {
809
+ var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;
810
+ Prism.languages.cpp = Prism.languages.extend('c', {
811
+ 'class-name': [
812
+ {
813
+ pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function () {
814
+ return keyword.source;
815
+ })),
816
+ lookbehind: true
817
+ },
818
+ /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
819
+ /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
820
+ /\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
821
+ ],
822
+ 'keyword': keyword,
823
+ 'number': {
824
+ pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
825
+ greedy: true
826
+ },
827
+ 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
828
+ 'boolean': /\b(?:true|false)\b/
829
+ });
830
+ Prism.languages.insertBefore('cpp', 'string', {
831
+ 'raw-string': {
832
+ pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
833
+ alias: 'string',
834
+ greedy: true
835
+ }
836
+ });
837
+ Prism.languages.insertBefore('cpp', 'class-name', {
838
+ 'base-clause': {
839
+ pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
840
+ lookbehind: true,
841
+ greedy: true,
842
+ inside: Prism.languages.extend('cpp', {})
843
+ }
844
+ });
845
+ Prism.languages.insertBefore('inside', 'operator', { 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i }, Prism.languages.cpp['base-clause']);
846
+ }(Prism));
847
+ },
848
+ {}
849
+ ],
850
+ 5: [
851
+ function (require, module, exports) {
852
+ (function (Prism) {
853
+ function replace(pattern, replacements) {
854
+ return pattern.replace(/<<(\d+)>>/g, function (m, index) {
855
+ return '(?:' + replacements[+index] + ')';
856
+ });
857
+ }
858
+ function re(pattern, replacements, flags) {
859
+ return RegExp(replace(pattern, replacements), flags || '');
860
+ }
861
+ function nested(pattern, depthLog2) {
862
+ for (var i = 0; i < depthLog2; i++) {
863
+ pattern = pattern.replace(/<<self>>/g, function () {
864
+ return '(?:' + pattern + ')';
865
+ });
866
+ }
867
+ return pattern.replace(/<<self>>/g, '[^\\s\\S]');
868
+ }
869
+ var keywordKinds = {
870
+ type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
871
+ typeDeclaration: 'class enum interface struct',
872
+ contextual: 'add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where',
873
+ other: 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
874
+ };
875
+ function keywordsToPattern(words) {
876
+ return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b';
877
+ }
878
+ var typeDeclarationKeywords = keywordsToPattern(keywordKinds.typeDeclaration);
879
+ var keywords = RegExp(keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.typeDeclaration + ' ' + keywordKinds.contextual + ' ' + keywordKinds.other));
880
+ var nonTypeKeywords = keywordsToPattern(keywordKinds.typeDeclaration + ' ' + keywordKinds.contextual + ' ' + keywordKinds.other);
881
+ var nonContextualKeywords = keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.typeDeclaration + ' ' + keywordKinds.other);
882
+ var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2);
883
+ var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
884
+ var name = /@?\b[A-Za-z_]\w*\b/.source;
885
+ var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [
886
+ name,
887
+ generic
888
+ ]);
889
+ var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
890
+ nonTypeKeywords,
891
+ genericName
892
+ ]);
893
+ var array = /\[\s*(?:,\s*)*\]/.source;
894
+ var typeExpressionWithoutTuple = replace(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source, [
895
+ identifier,
896
+ array
897
+ ]);
898
+ var tupleElement = replace(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [
899
+ generic,
900
+ nestedRound,
901
+ array
902
+ ]);
903
+ var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
904
+ var typeExpression = replace(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source, [
905
+ tuple,
906
+ identifier,
907
+ array
908
+ ]);
909
+ var typeInside = {
910
+ 'keyword': keywords,
911
+ 'punctuation': /[<>()?,.:[\]]/
912
+ };
913
+ var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source;
914
+ var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
915
+ var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
916
+ Prism.languages.csharp = Prism.languages.extend('clike', {
917
+ 'string': [
918
+ {
919
+ pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
920
+ lookbehind: true,
921
+ greedy: true
922
+ },
923
+ {
924
+ pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
925
+ lookbehind: true,
926
+ greedy: true
927
+ },
928
+ {
929
+ pattern: RegExp(character),
930
+ greedy: true,
931
+ alias: 'character'
932
+ }
933
+ ],
934
+ 'class-name': [
935
+ {
936
+ pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [identifier]),
937
+ lookbehind: true,
938
+ inside: typeInside
939
+ },
940
+ {
941
+ pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
942
+ name,
943
+ typeExpression
944
+ ]),
945
+ lookbehind: true,
946
+ inside: typeInside
947
+ },
948
+ {
949
+ pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
950
+ lookbehind: true
951
+ },
952
+ {
953
+ pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
954
+ typeDeclarationKeywords,
955
+ genericName
956
+ ]),
957
+ lookbehind: true,
958
+ inside: typeInside
959
+ },
960
+ {
961
+ pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
962
+ lookbehind: true,
963
+ inside: typeInside
964
+ },
965
+ {
966
+ pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
967
+ lookbehind: true
968
+ },
969
+ {
970
+ pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [typeExpressionWithoutTuple]),
971
+ lookbehind: true,
972
+ inside: typeInside
973
+ },
974
+ {
975
+ pattern: re(/\b<<0>>(?=\s+(?!<<1>>)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source, [
976
+ typeExpression,
977
+ nonContextualKeywords,
978
+ name
979
+ ]),
980
+ inside: typeInside
981
+ }
982
+ ],
983
+ 'keyword': keywords,
984
+ 'number': /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,
985
+ 'operator': />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
986
+ 'punctuation': /\?\.?|::|[{}[\];(),.:]/
987
+ });
988
+ Prism.languages.insertBefore('csharp', 'number', {
989
+ 'range': {
990
+ pattern: /\.\./,
991
+ alias: 'operator'
992
+ }
993
+ });
994
+ Prism.languages.insertBefore('csharp', 'punctuation', {
995
+ 'named-parameter': {
996
+ pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
997
+ lookbehind: true,
998
+ alias: 'punctuation'
999
+ }
1000
+ });
1001
+ Prism.languages.insertBefore('csharp', 'class-name', {
1002
+ 'namespace': {
1003
+ pattern: re(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source, [name]),
1004
+ lookbehind: true,
1005
+ inside: { 'punctuation': /\./ }
1006
+ },
1007
+ 'type-expression': {
1008
+ pattern: re(/(\b(?:default|typeof|sizeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source, [nestedRound]),
1009
+ lookbehind: true,
1010
+ alias: 'class-name',
1011
+ inside: typeInside
1012
+ },
1013
+ 'return-type': {
1014
+ pattern: re(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source, [
1015
+ typeExpression,
1016
+ identifier
1017
+ ]),
1018
+ inside: typeInside,
1019
+ alias: 'class-name'
1020
+ },
1021
+ 'constructor-invocation': {
1022
+ pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
1023
+ lookbehind: true,
1024
+ inside: typeInside,
1025
+ alias: 'class-name'
1026
+ },
1027
+ 'generic-method': {
1028
+ pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [
1029
+ name,
1030
+ generic
1031
+ ]),
1032
+ inside: {
1033
+ 'function': re(/^<<0>>/.source, [name]),
1034
+ 'generic': {
1035
+ pattern: RegExp(generic),
1036
+ alias: 'class-name',
1037
+ inside: typeInside
1038
+ }
1039
+ }
1040
+ },
1041
+ 'type-list': {
1042
+ pattern: re(/\b((?:<<0>>\s+<<1>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>)(?:\s*,\s*(?:<<3>>|<<4>>))*(?=\s*(?:where|[{;]|=>|$))/.source, [
1043
+ typeDeclarationKeywords,
1044
+ genericName,
1045
+ name,
1046
+ typeExpression,
1047
+ keywords.source
1048
+ ]),
1049
+ lookbehind: true,
1050
+ inside: {
1051
+ 'keyword': keywords,
1052
+ 'class-name': {
1053
+ pattern: RegExp(typeExpression),
1054
+ greedy: true,
1055
+ inside: typeInside
1056
+ },
1057
+ 'punctuation': /,/
1058
+ }
1059
+ },
1060
+ 'preprocessor': {
1061
+ pattern: /(^\s*)#.*/m,
1062
+ lookbehind: true,
1063
+ alias: 'property',
1064
+ inside: {
1065
+ 'directive': {
1066
+ pattern: /(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,
1067
+ lookbehind: true,
1068
+ alias: 'keyword'
1069
+ }
1070
+ }
1071
+ }
1072
+ });
1073
+ var regularStringOrCharacter = regularString + '|' + character;
1074
+ var regularStringCharacterOrComment = replace(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source, [regularStringOrCharacter]);
1075
+ var roundExpression = nested(replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [regularStringCharacterOrComment]), 2);
1076
+ var attrTarget = /\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source;
1077
+ var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
1078
+ identifier,
1079
+ roundExpression
1080
+ ]);
1081
+ Prism.languages.insertBefore('csharp', 'class-name', {
1082
+ 'attribute': {
1083
+ pattern: re(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source, [
1084
+ attrTarget,
1085
+ attr
1086
+ ]),
1087
+ lookbehind: true,
1088
+ greedy: true,
1089
+ inside: {
1090
+ 'target': {
1091
+ pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
1092
+ alias: 'keyword'
1093
+ },
1094
+ 'attribute-arguments': {
1095
+ pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
1096
+ inside: Prism.languages.csharp
1097
+ },
1098
+ 'class-name': {
1099
+ pattern: RegExp(identifier),
1100
+ inside: { 'punctuation': /\./ }
1101
+ },
1102
+ 'punctuation': /[:,]/
1103
+ }
1104
+ }
1105
+ });
1106
+ var formatString = /:[^}\r\n]+/.source;
1107
+ var mInterpolationRound = nested(replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [regularStringCharacterOrComment]), 2);
1108
+ var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
1109
+ mInterpolationRound,
1110
+ formatString
1111
+ ]);
1112
+ var sInterpolationRound = nested(replace(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source, [regularStringOrCharacter]), 2);
1113
+ var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
1114
+ sInterpolationRound,
1115
+ formatString
1116
+ ]);
1117
+ function createInterpolationInside(interpolation, interpolationRound) {
1118
+ return {
1119
+ 'interpolation': {
1120
+ pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
1121
+ lookbehind: true,
1122
+ inside: {
1123
+ 'format-string': {
1124
+ pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
1125
+ interpolationRound,
1126
+ formatString
1127
+ ]),
1128
+ lookbehind: true,
1129
+ inside: { 'punctuation': /^:/ }
1130
+ },
1131
+ 'punctuation': /^\{|\}$/,
1132
+ 'expression': {
1133
+ pattern: /[\s\S]+/,
1134
+ alias: 'language-csharp',
1135
+ inside: Prism.languages.csharp
1136
+ }
1137
+ }
1138
+ },
1139
+ 'string': /[\s\S]+/
1140
+ };
1141
+ }
1142
+ Prism.languages.insertBefore('csharp', 'string', {
1143
+ 'interpolation-string': [
1144
+ {
1145
+ pattern: re(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source, [mInterpolation]),
1146
+ lookbehind: true,
1147
+ greedy: true,
1148
+ inside: createInterpolationInside(mInterpolation, mInterpolationRound)
1149
+ },
1150
+ {
1151
+ pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [sInterpolation]),
1152
+ lookbehind: true,
1153
+ greedy: true,
1154
+ inside: createInterpolationInside(sInterpolation, sInterpolationRound)
1155
+ }
1156
+ ]
1157
+ });
1158
+ }(Prism));
1159
+ Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
1160
+ },
1161
+ {}
1162
+ ],
1163
+ 6: [
1164
+ function (require, module, exports) {
1165
+ (function (Prism) {
1166
+ var string = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
1167
+ Prism.languages.css = {
1168
+ 'comment': /\/\*[\s\S]*?\*\//,
1169
+ 'atrule': {
1170
+ pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,
1171
+ inside: {
1172
+ 'rule': /^@[\w-]+/,
1173
+ 'selector-function-argument': {
1174
+ pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
1175
+ lookbehind: true,
1176
+ alias: 'selector'
1177
+ },
1178
+ 'keyword': {
1179
+ pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
1180
+ lookbehind: true
1181
+ }
1182
+ }
1183
+ },
1184
+ 'url': {
1185
+ pattern: RegExp('\\burl\\((?:' + string.source + '|' + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ')\\)', 'i'),
1186
+ greedy: true,
1187
+ inside: {
1188
+ 'function': /^url/i,
1189
+ 'punctuation': /^\(|\)$/,
1190
+ 'string': {
1191
+ pattern: RegExp('^' + string.source + '$'),
1192
+ alias: 'url'
1193
+ }
1194
+ }
1195
+ },
1196
+ 'selector': RegExp('[^{}\\s](?:[^{};"\'\\s]|\\s+(?![\\s{])|' + string.source + ')*(?=\\s*\\{)'),
1197
+ 'string': {
1198
+ pattern: string,
1199
+ greedy: true
1200
+ },
1201
+ 'property': /(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
1202
+ 'important': /!important\b/i,
1203
+ 'function': /[-a-z0-9]+(?=\()/i,
1204
+ 'punctuation': /[(){};:,]/
1205
+ };
1206
+ Prism.languages.css['atrule'].inside.rest = Prism.languages.css;
1207
+ var markup = Prism.languages.markup;
1208
+ if (markup) {
1209
+ markup.tag.addInlined('style', 'css');
1210
+ Prism.languages.insertBefore('inside', 'attr-value', {
1211
+ 'style-attr': {
1212
+ pattern: /(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,
1213
+ lookbehind: true,
1214
+ inside: {
1215
+ 'attr-value': {
1216
+ pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
1217
+ inside: {
1218
+ 'style': {
1219
+ pattern: /(["'])[\s\S]+(?=["']$)/,
1220
+ lookbehind: true,
1221
+ alias: 'language-css',
1222
+ inside: Prism.languages.css
1223
+ },
1224
+ 'punctuation': [
1225
+ {
1226
+ pattern: /^=/,
1227
+ alias: 'attr-equals'
1228
+ },
1229
+ /"|'/
1230
+ ]
1231
+ }
1232
+ },
1233
+ 'attr-name': /^style/i
1234
+ }
1235
+ }
1236
+ }, markup.tag);
1237
+ }
1238
+ }(Prism));
1239
+ },
1240
+ {}
1241
+ ],
1242
+ 7: [
1243
+ function (require, module, exports) {
1244
+ (function (Prism) {
1245
+ var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/;
1246
+ var classNamePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source;
1247
+ var className = {
1248
+ pattern: RegExp(classNamePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
1249
+ lookbehind: true,
1250
+ inside: {
1251
+ 'namespace': {
1252
+ pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
1253
+ inside: { 'punctuation': /\./ }
1254
+ },
1255
+ 'punctuation': /\./
1256
+ }
1257
+ };
1258
+ Prism.languages.java = Prism.languages.extend('clike', {
1259
+ 'class-name': [
1260
+ className,
1261
+ {
1262
+ pattern: RegExp(classNamePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=())])/.source),
1263
+ lookbehind: true,
1264
+ inside: className.inside
1265
+ }
1266
+ ],
1267
+ 'keyword': keywords,
1268
+ 'function': [
1269
+ Prism.languages.clike.function,
1270
+ {
1271
+ pattern: /(\:\:\s*)[a-z_]\w*/,
1272
+ lookbehind: true
1273
+ }
1274
+ ],
1275
+ 'number': /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
1276
+ 'operator': {
1277
+ pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
1278
+ lookbehind: true
1279
+ }
1280
+ });
1281
+ Prism.languages.insertBefore('java', 'string', {
1282
+ 'triple-quoted-string': {
1283
+ pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
1284
+ greedy: true,
1285
+ alias: 'string'
1286
+ }
1287
+ });
1288
+ Prism.languages.insertBefore('java', 'class-name', {
1289
+ 'annotation': {
1290
+ pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
1291
+ lookbehind: true,
1292
+ alias: 'punctuation'
1293
+ },
1294
+ 'generics': {
1295
+ pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
1296
+ inside: {
1297
+ 'class-name': className,
1298
+ 'keyword': keywords,
1299
+ 'punctuation': /[<>(),.:]/,
1300
+ 'operator': /[?&|]/
1301
+ }
1302
+ },
1303
+ 'namespace': {
1304
+ pattern: RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function () {
1305
+ return keywords.source;
1306
+ })),
1307
+ lookbehind: true,
1308
+ inside: { 'punctuation': /\./ }
1309
+ }
1310
+ });
1311
+ }(Prism));
1312
+ },
1313
+ {}
1314
+ ],
1315
+ 8: [
1316
+ function (require, module, exports) {
1317
+ Prism.languages.javascript = Prism.languages.extend('clike', {
1318
+ 'class-name': [
1319
+ Prism.languages.clike['class-name'],
1320
+ {
1321
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,
1322
+ lookbehind: true
1323
+ }
1324
+ ],
1325
+ 'keyword': [
1326
+ {
1327
+ pattern: /((?:^|})\s*)(?:catch|finally)\b/,
1328
+ lookbehind: true
1329
+ },
1330
+ {
1331
+ pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|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/,
1332
+ lookbehind: true
1333
+ }
1334
+ ],
1335
+ 'function': /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
1336
+ 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,
1337
+ 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
1338
+ });
1339
+ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;
1340
+ Prism.languages.insertBefore('javascript', 'keyword', {
1341
+ 'regex': {
1342
+ pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,
1343
+ lookbehind: true,
1344
+ greedy: true,
1345
+ inside: {
1346
+ 'regex-source': {
1347
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
1348
+ lookbehind: true,
1349
+ alias: 'language-regex',
1350
+ inside: Prism.languages.regex
1351
+ },
1352
+ 'regex-flags': /[a-z]+$/,
1353
+ 'regex-delimiter': /^\/|\/$/
1354
+ }
1355
+ },
1356
+ 'function-variable': {
1357
+ 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*=>))/,
1358
+ alias: 'function'
1359
+ },
1360
+ 'parameter': [
1361
+ {
1362
+ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1363
+ lookbehind: true,
1364
+ inside: Prism.languages.javascript
1365
+ },
1366
+ {
1367
+ pattern: /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1368
+ inside: Prism.languages.javascript
1369
+ },
1370
+ {
1371
+ pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1372
+ lookbehind: true,
1373
+ inside: Prism.languages.javascript
1374
+ },
1375
+ {
1376
+ 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*\{)/,
1377
+ lookbehind: true,
1378
+ inside: Prism.languages.javascript
1379
+ }
1380
+ ],
1381
+ 'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/
1382
+ });
1383
+ Prism.languages.insertBefore('javascript', 'string', {
1384
+ 'template-string': {
1385
+ pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,
1386
+ greedy: true,
1387
+ inside: {
1388
+ 'template-punctuation': {
1389
+ pattern: /^`|`$/,
1390
+ alias: 'string'
1391
+ },
1392
+ 'interpolation': {
1393
+ pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,
1394
+ lookbehind: true,
1395
+ inside: {
1396
+ 'interpolation-punctuation': {
1397
+ pattern: /^\${|}$/,
1398
+ alias: 'punctuation'
1399
+ },
1400
+ rest: Prism.languages.javascript
1401
+ }
1402
+ },
1403
+ 'string': /[\s\S]+/
1404
+ }
1405
+ }
1406
+ });
1407
+ if (Prism.languages.markup) {
1408
+ Prism.languages.markup.tag.addInlined('script', 'javascript');
1409
+ }
1410
+ Prism.languages.js = Prism.languages.javascript;
1411
+ },
1412
+ {}
1413
+ ],
1414
+ 9: [
1415
+ function (require, module, exports) {
1416
+ (function (Prism) {
1417
+ function getPlaceholder(language, index) {
1418
+ return '___' + language.toUpperCase() + index + '___';
1419
+ }
1420
+ Object.defineProperties(Prism.languages['markup-templating'] = {}, {
1421
+ buildPlaceholders: {
1422
+ value: function (env, language, placeholderPattern, replaceFilter) {
1423
+ if (env.language !== language) {
1424
+ return;
1425
+ }
1426
+ var tokenStack = env.tokenStack = [];
1427
+ env.code = env.code.replace(placeholderPattern, function (match) {
1428
+ if (typeof replaceFilter === 'function' && !replaceFilter(match)) {
1429
+ return match;
1430
+ }
1431
+ var i = tokenStack.length;
1432
+ var placeholder;
1433
+ while (env.code.indexOf(placeholder = getPlaceholder(language, i)) !== -1)
1434
+ ++i;
1435
+ tokenStack[i] = match;
1436
+ return placeholder;
1437
+ });
1438
+ env.grammar = Prism.languages.markup;
1439
+ }
1440
+ },
1441
+ tokenizePlaceholders: {
1442
+ value: function (env, language) {
1443
+ if (env.language !== language || !env.tokenStack) {
1444
+ return;
1445
+ }
1446
+ env.grammar = Prism.languages[language];
1447
+ var j = 0;
1448
+ var keys = Object.keys(env.tokenStack);
1449
+ function walkTokens(tokens) {
1450
+ for (var i = 0; i < tokens.length; i++) {
1451
+ if (j >= keys.length) {
1452
+ break;
1453
+ }
1454
+ var token = tokens[i];
1455
+ if (typeof token === 'string' || token.content && typeof token.content === 'string') {
1456
+ var k = keys[j];
1457
+ var t = env.tokenStack[k];
1458
+ var s = typeof token === 'string' ? token : token.content;
1459
+ var placeholder = getPlaceholder(language, k);
1460
+ var index = s.indexOf(placeholder);
1461
+ if (index > -1) {
1462
+ ++j;
1463
+ var before = s.substring(0, index);
1464
+ var middle = new Prism.Token(language, Prism.tokenize(t, env.grammar), 'language-' + language, t);
1465
+ var after = s.substring(index + placeholder.length);
1466
+ var replacement = [];
1467
+ if (before) {
1468
+ replacement.push.apply(replacement, walkTokens([before]));
1469
+ }
1470
+ replacement.push(middle);
1471
+ if (after) {
1472
+ replacement.push.apply(replacement, walkTokens([after]));
1473
+ }
1474
+ if (typeof token === 'string') {
1475
+ tokens.splice.apply(tokens, [
1476
+ i,
1477
+ 1
1478
+ ].concat(replacement));
1479
+ } else {
1480
+ token.content = replacement;
1481
+ }
1482
+ }
1483
+ } else if (token.content) {
1484
+ walkTokens(token.content);
1485
+ }
1486
+ }
1487
+ return tokens;
1488
+ }
1489
+ walkTokens(env.tokens);
1490
+ }
1491
+ }
1492
+ });
1493
+ }(Prism));
1494
+ },
1495
+ {}
1496
+ ],
1497
+ 10: [
1498
+ function (require, module, exports) {
1499
+ Prism.languages.markup = {
1500
+ 'comment': /<!--[\s\S]*?-->/,
1501
+ 'prolog': /<\?[\s\S]+?\?>/,
1502
+ 'doctype': {
1503
+ pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
1504
+ greedy: true,
1505
+ inside: {
1506
+ 'internal-subset': {
1507
+ pattern: /(\[)[\s\S]+(?=\]>$)/,
1508
+ lookbehind: true,
1509
+ greedy: true,
1510
+ inside: null
1511
+ },
1512
+ 'string': {
1513
+ pattern: /"[^"]*"|'[^']*'/,
1514
+ greedy: true
1515
+ },
1516
+ 'punctuation': /^<!|>$|[[\]]/,
1517
+ 'doctype-tag': /^DOCTYPE/,
1518
+ 'name': /[^\s<>'"]+/
1519
+ }
1520
+ },
1521
+ 'cdata': /<!\[CDATA\[[\s\S]*?]]>/i,
1522
+ 'tag': {
1523
+ pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
1524
+ greedy: true,
1525
+ inside: {
1526
+ 'tag': {
1527
+ pattern: /^<\/?[^\s>\/]+/,
1528
+ inside: {
1529
+ 'punctuation': /^<\/?/,
1530
+ 'namespace': /^[^\s>\/:]+:/
1531
+ }
1532
+ },
1533
+ 'attr-value': {
1534
+ pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
1535
+ inside: {
1536
+ 'punctuation': [
1537
+ {
1538
+ pattern: /^=/,
1539
+ alias: 'attr-equals'
1540
+ },
1541
+ /"|'/
1542
+ ]
1543
+ }
1544
+ },
1545
+ 'punctuation': /\/?>/,
1546
+ 'attr-name': {
1547
+ pattern: /[^\s>\/]+/,
1548
+ inside: { 'namespace': /^[^\s>\/:]+:/ }
1549
+ }
1550
+ }
1551
+ },
1552
+ 'entity': [
1553
+ {
1554
+ pattern: /&[\da-z]{1,8};/i,
1555
+ alias: 'named-entity'
1556
+ },
1557
+ /&#x?[\da-f]{1,8};/i
1558
+ ]
1559
+ };
1560
+ Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = Prism.languages.markup['entity'];
1561
+ Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup;
1562
+ Prism.hooks.add('wrap', function (env) {
1563
+ if (env.type === 'entity') {
1564
+ env.attributes['title'] = env.content.replace(/&amp;/, '&');
1565
+ }
1566
+ });
1567
+ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {
1568
+ value: function addInlined(tagName, lang) {
1569
+ var includedCdataInside = {};
1570
+ includedCdataInside['language-' + lang] = {
1571
+ pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
1572
+ lookbehind: true,
1573
+ inside: Prism.languages[lang]
1574
+ };
1575
+ includedCdataInside['cdata'] = /^<!\[CDATA\[|\]\]>$/i;
1576
+ var inside = {
1577
+ 'included-cdata': {
1578
+ pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1579
+ inside: includedCdataInside
1580
+ }
1581
+ };
1582
+ inside['language-' + lang] = {
1583
+ pattern: /[\s\S]+/,
1584
+ inside: Prism.languages[lang]
1585
+ };
1586
+ var def = {};
1587
+ def[tagName] = {
1588
+ pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () {
1589
+ return tagName;
1590
+ }), 'i'),
1591
+ lookbehind: true,
1592
+ greedy: true,
1593
+ inside: inside
1594
+ };
1595
+ Prism.languages.insertBefore('markup', 'cdata', def);
1596
+ }
1597
+ });
1598
+ Prism.languages.html = Prism.languages.markup;
1599
+ Prism.languages.mathml = Prism.languages.markup;
1600
+ Prism.languages.svg = Prism.languages.markup;
1601
+ Prism.languages.xml = Prism.languages.extend('markup', {});
1602
+ Prism.languages.ssml = Prism.languages.xml;
1603
+ Prism.languages.atom = Prism.languages.xml;
1604
+ Prism.languages.rss = Prism.languages.xml;
1605
+ },
1606
+ {}
1607
+ ],
1608
+ 11: [
1609
+ function (require, module, exports) {
1610
+ (function (Prism) {
1611
+ var comment = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/;
1612
+ var constant = [
1613
+ {
1614
+ pattern: /\b(?:false|true)\b/i,
1615
+ alias: 'boolean'
1616
+ },
1617
+ /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,
1618
+ /\b(?:null)\b/i
1619
+ ];
1620
+ var number = /\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+)(?:e[+-]?\d+)?/i;
1621
+ var operator = /<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/;
1622
+ var punctuation = /[{}\[\](),:;]/;
1623
+ Prism.languages.php = {
1624
+ 'delimiter': {
1625
+ pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i,
1626
+ alias: 'important'
1627
+ },
1628
+ 'comment': comment,
1629
+ 'variable': /\$+(?:\w+\b|(?={))/i,
1630
+ 'package': {
1631
+ pattern: /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
1632
+ lookbehind: true,
1633
+ inside: { 'punctuation': /\\/ }
1634
+ },
1635
+ 'keyword': [
1636
+ {
1637
+ pattern: /(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,
1638
+ alias: 'type-casting',
1639
+ greedy: true,
1640
+ lookbehind: true
1641
+ },
1642
+ {
1643
+ pattern: /([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,
1644
+ alias: 'type-hint',
1645
+ greedy: true,
1646
+ lookbehind: true
1647
+ },
1648
+ {
1649
+ pattern: /([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,
1650
+ alias: 'type-hint',
1651
+ greedy: true,
1652
+ lookbehind: true
1653
+ },
1654
+ {
1655
+ pattern: /(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,
1656
+ alias: 'return-type',
1657
+ greedy: true,
1658
+ lookbehind: true
1659
+ },
1660
+ {
1661
+ pattern: /(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,
1662
+ alias: 'return-type',
1663
+ greedy: true,
1664
+ lookbehind: true
1665
+ },
1666
+ {
1667
+ pattern: /\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,
1668
+ alias: 'type-declaration',
1669
+ greedy: true
1670
+ },
1671
+ {
1672
+ pattern: /(\|\s*)(?:null|false)\b/i,
1673
+ alias: 'type-declaration',
1674
+ greedy: true,
1675
+ lookbehind: true
1676
+ },
1677
+ {
1678
+ pattern: /\b(?:parent|self|static)(?=\s*::)/i,
1679
+ alias: 'static-context',
1680
+ greedy: true
1681
+ },
1682
+ /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i
1683
+ ],
1684
+ 'argument-name': /\b[a-z_]\w*(?=\s*:(?!:))/i,
1685
+ 'class-name': [
1686
+ {
1687
+ pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,
1688
+ greedy: true,
1689
+ lookbehind: true
1690
+ },
1691
+ {
1692
+ pattern: /(\|\s*)\b[a-z_]\w*(?!\\)\b/i,
1693
+ greedy: true,
1694
+ lookbehind: true
1695
+ },
1696
+ {
1697
+ pattern: /\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,
1698
+ greedy: true
1699
+ },
1700
+ {
1701
+ pattern: /(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,
1702
+ alias: 'class-name-fully-qualified',
1703
+ greedy: true,
1704
+ lookbehind: true,
1705
+ inside: { 'punctuation': /\\/ }
1706
+ },
1707
+ {
1708
+ pattern: /(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,
1709
+ alias: 'class-name-fully-qualified',
1710
+ greedy: true,
1711
+ inside: { 'punctuation': /\\/ }
1712
+ },
1713
+ {
1714
+ pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
1715
+ alias: 'class-name-fully-qualified',
1716
+ greedy: true,
1717
+ lookbehind: true,
1718
+ inside: { 'punctuation': /\\/ }
1719
+ },
1720
+ {
1721
+ pattern: /\b[a-z_]\w*(?=\s*\$)/i,
1722
+ alias: 'type-declaration',
1723
+ greedy: true
1724
+ },
1725
+ {
1726
+ pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,
1727
+ alias: [
1728
+ 'class-name-fully-qualified',
1729
+ 'type-declaration'
1730
+ ],
1731
+ greedy: true,
1732
+ inside: { 'punctuation': /\\/ }
1733
+ },
1734
+ {
1735
+ pattern: /\b[a-z_]\w*(?=\s*::)/i,
1736
+ alias: 'static-context',
1737
+ greedy: true
1738
+ },
1739
+ {
1740
+ pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,
1741
+ alias: [
1742
+ 'class-name-fully-qualified',
1743
+ 'static-context'
1744
+ ],
1745
+ greedy: true,
1746
+ inside: { 'punctuation': /\\/ }
1747
+ },
1748
+ {
1749
+ pattern: /([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,
1750
+ alias: 'type-hint',
1751
+ greedy: true,
1752
+ lookbehind: true
1753
+ },
1754
+ {
1755
+ pattern: /([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,
1756
+ alias: [
1757
+ 'class-name-fully-qualified',
1758
+ 'type-hint'
1759
+ ],
1760
+ greedy: true,
1761
+ lookbehind: true,
1762
+ inside: { 'punctuation': /\\/ }
1763
+ },
1764
+ {
1765
+ pattern: /(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,
1766
+ alias: 'return-type',
1767
+ greedy: true,
1768
+ lookbehind: true
1769
+ },
1770
+ {
1771
+ pattern: /(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
1772
+ alias: [
1773
+ 'class-name-fully-qualified',
1774
+ 'return-type'
1775
+ ],
1776
+ greedy: true,
1777
+ lookbehind: true,
1778
+ inside: { 'punctuation': /\\/ }
1779
+ }
1780
+ ],
1781
+ 'constant': constant,
1782
+ 'function': /\w+\s*(?=\()/,
1783
+ 'property': {
1784
+ pattern: /(->)[\w]+/,
1785
+ lookbehind: true
1786
+ },
1787
+ 'number': number,
1788
+ 'operator': operator,
1789
+ 'punctuation': punctuation
1790
+ };
1791
+ var string_interpolation = {
1792
+ pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,
1793
+ lookbehind: true,
1794
+ inside: Prism.languages.php
1795
+ };
1796
+ var string = [
1797
+ {
1798
+ pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,
1799
+ alias: 'nowdoc-string',
1800
+ greedy: true,
1801
+ inside: {
1802
+ 'delimiter': {
1803
+ pattern: /^<<<'[^']+'|[a-z_]\w*;$/i,
1804
+ alias: 'symbol',
1805
+ inside: { 'punctuation': /^<<<'?|[';]$/ }
1806
+ }
1807
+ }
1808
+ },
1809
+ {
1810
+ pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,
1811
+ alias: 'heredoc-string',
1812
+ greedy: true,
1813
+ inside: {
1814
+ 'delimiter': {
1815
+ pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,
1816
+ alias: 'symbol',
1817
+ inside: { 'punctuation': /^<<<"?|[";]$/ }
1818
+ },
1819
+ 'interpolation': string_interpolation
1820
+ }
1821
+ },
1822
+ {
1823
+ pattern: /`(?:\\[\s\S]|[^\\`])*`/,
1824
+ alias: 'backtick-quoted-string',
1825
+ greedy: true
1826
+ },
1827
+ {
1828
+ pattern: /'(?:\\[\s\S]|[^\\'])*'/,
1829
+ alias: 'single-quoted-string',
1830
+ greedy: true
1831
+ },
1832
+ {
1833
+ pattern: /"(?:\\[\s\S]|[^\\"])*"/,
1834
+ alias: 'double-quoted-string',
1835
+ greedy: true,
1836
+ inside: { 'interpolation': string_interpolation }
1837
+ }
1838
+ ];
1839
+ Prism.languages.insertBefore('php', 'variable', { 'string': string });
1840
+ Prism.languages.insertBefore('php', 'variable', {
1841
+ 'attribute': {
1842
+ pattern: /#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/mi,
1843
+ greedy: true,
1844
+ inside: {
1845
+ 'attribute-content': {
1846
+ pattern: /^(#\[)[\s\S]+(?=]$)/,
1847
+ lookbehind: true,
1848
+ inside: {
1849
+ 'comment': comment,
1850
+ 'string': string,
1851
+ 'attribute-class-name': [
1852
+ {
1853
+ pattern: /([^:]|^)\b[a-z_]\w*(?!\\)\b/i,
1854
+ alias: 'class-name',
1855
+ greedy: true,
1856
+ lookbehind: true
1857
+ },
1858
+ {
1859
+ pattern: /([^:]|^)(?:\\?\b[a-z_]\w*)+/i,
1860
+ alias: [
1861
+ 'class-name',
1862
+ 'class-name-fully-qualified'
1863
+ ],
1864
+ greedy: true,
1865
+ lookbehind: true,
1866
+ inside: { 'punctuation': /\\/ }
1867
+ }
1868
+ ],
1869
+ 'constant': constant,
1870
+ 'number': number,
1871
+ 'operator': operator,
1872
+ 'punctuation': punctuation
1873
+ }
1874
+ },
1875
+ 'delimiter': {
1876
+ pattern: /^#\[|]$/,
1877
+ alias: 'punctuation'
1878
+ }
1879
+ }
1880
+ }
1881
+ });
1882
+ Prism.hooks.add('before-tokenize', function (env) {
1883
+ if (!/<\?/.test(env.code)) {
1884
+ return;
1885
+ }
1886
+ var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/ig;
1887
+ Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern);
1888
+ });
1889
+ Prism.hooks.add('after-tokenize', function (env) {
1890
+ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php');
1891
+ });
1892
+ }(Prism));
1893
+ },
1894
+ {}
1895
+ ],
1896
+ 12: [
1897
+ function (require, module, exports) {
1898
+ Prism.languages.python = {
1899
+ 'comment': {
1900
+ pattern: /(^|[^\\])#.*/,
1901
+ lookbehind: true
1902
+ },
1903
+ 'string-interpolation': {
1904
+ pattern: /(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
1905
+ greedy: true,
1906
+ inside: {
1907
+ 'interpolation': {
1908
+ pattern: /((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,
1909
+ lookbehind: true,
1910
+ inside: {
1911
+ 'format-spec': {
1912
+ pattern: /(:)[^:(){}]+(?=}$)/,
1913
+ lookbehind: true
1914
+ },
1915
+ 'conversion-option': {
1916
+ pattern: /![sra](?=[:}]$)/,
1917
+ alias: 'punctuation'
1918
+ },
1919
+ rest: null
1920
+ }
1921
+ },
1922
+ 'string': /[\s\S]+/
1923
+ }
1924
+ },
1925
+ 'triple-quoted-string': {
1926
+ pattern: /(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,
1927
+ greedy: true,
1928
+ alias: 'string'
1929
+ },
1930
+ 'string': {
1931
+ pattern: /(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
1932
+ greedy: true
1933
+ },
1934
+ 'function': {
1935
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
1936
+ lookbehind: true
1937
+ },
1938
+ 'class-name': {
1939
+ pattern: /(\bclass\s+)\w+/i,
1940
+ lookbehind: true
1941
+ },
1942
+ 'decorator': {
1943
+ pattern: /(^\s*)@\w+(?:\.\w+)*/im,
1944
+ lookbehind: true,
1945
+ alias: [
1946
+ 'annotation',
1947
+ 'punctuation'
1948
+ ],
1949
+ inside: { 'punctuation': /\./ }
1950
+ },
1951
+ 'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
1952
+ 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
1953
+ 'boolean': /\b(?:True|False|None)\b/,
1954
+ 'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,
1955
+ 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
1956
+ 'punctuation': /[{}[\];(),.:]/
1957
+ };
1958
+ Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python;
1959
+ Prism.languages.py = Prism.languages.python;
1960
+ },
1961
+ {}
1962
+ ],
1963
+ 13: [
1964
+ function (require, module, exports) {
1965
+ (function (Prism) {
1966
+ Prism.languages.ruby = Prism.languages.extend('clike', {
1967
+ 'comment': [
1968
+ /#.*/,
1969
+ {
1970
+ pattern: /^=begin\s[\s\S]*?^=end/m,
1971
+ greedy: true
1972
+ }
1973
+ ],
1974
+ 'class-name': {
1975
+ pattern: /(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,
1976
+ lookbehind: true,
1977
+ inside: { 'punctuation': /[.\\]/ }
1978
+ },
1979
+ 'keyword': /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/
1980
+ });
1981
+ var interpolation = {
1982
+ pattern: /#\{[^}]+\}/,
1983
+ inside: {
1984
+ 'delimiter': {
1985
+ pattern: /^#\{|\}$/,
1986
+ alias: 'tag'
1987
+ },
1988
+ rest: Prism.languages.ruby
1989
+ }
1990
+ };
1991
+ delete Prism.languages.ruby.function;
1992
+ Prism.languages.insertBefore('ruby', 'keyword', {
1993
+ 'regex': [
1994
+ {
1995
+ pattern: RegExp(/%r/.source + '(?:' + [
1996
+ /([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/.source,
1997
+ /\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/.source,
1998
+ /\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/.source,
1999
+ /\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/.source,
2000
+ /<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/.source
2001
+ ].join('|') + ')'),
2002
+ greedy: true,
2003
+ inside: { 'interpolation': interpolation }
2004
+ },
2005
+ {
2006
+ pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,
2007
+ lookbehind: true,
2008
+ greedy: true
2009
+ }
2010
+ ],
2011
+ 'variable': /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
2012
+ 'symbol': {
2013
+ pattern: /(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,
2014
+ lookbehind: true
2015
+ },
2016
+ 'method-definition': {
2017
+ pattern: /(\bdef\s+)[\w.]+/,
2018
+ lookbehind: true,
2019
+ inside: {
2020
+ 'function': /\w+$/,
2021
+ rest: Prism.languages.ruby
2022
+ }
2023
+ }
2024
+ });
2025
+ Prism.languages.insertBefore('ruby', 'number', {
2026
+ 'builtin': /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
2027
+ 'constant': /\b[A-Z]\w*(?:[?!]|\b)/
2028
+ });
2029
+ Prism.languages.ruby.string = [
2030
+ {
2031
+ pattern: RegExp(/%[qQiIwWxs]?/.source + '(?:' + [
2032
+ /([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
2033
+ /\((?:[^()\\]|\\[\s\S])*\)/.source,
2034
+ /\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,
2035
+ /\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,
2036
+ /<(?:[^<>\\]|\\[\s\S])*>/.source
2037
+ ].join('|') + ')'),
2038
+ greedy: true,
2039
+ inside: { 'interpolation': interpolation }
2040
+ },
2041
+ {
2042
+ pattern: /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
2043
+ greedy: true,
2044
+ inside: { 'interpolation': interpolation }
2045
+ }
2046
+ ];
2047
+ Prism.languages.rb = Prism.languages.ruby;
2048
+ }(Prism));
2049
+ },
2050
+ {}
2051
+ ],
2052
+ 14: [
2053
+ function (require, module, exports) {
2054
+ var Prism = require('prismjs/components/prism-core');
2055
+ require('prismjs/components/prism-clike');
2056
+ require('prismjs/components/prism-markup-templating');
2057
+ require('prismjs/components/prism-c');
2058
+ require('prismjs/components/prism-cpp');
2059
+ require('prismjs/components/prism-csharp');
2060
+ require('prismjs/components/prism-css');
2061
+ require('prismjs/components/prism-java');
2062
+ require('prismjs/components/prism-javascript');
2063
+ require('prismjs/components/prism-markup');
2064
+ require('prismjs/components/prism-php');
2065
+ require('prismjs/components/prism-python');
2066
+ require('prismjs/components/prism-ruby');
2067
+ module.exports = { boltExport: Prism };
2068
+ },
2069
+ {
2070
+ 'prismjs/components/prism-c': 1,
2071
+ 'prismjs/components/prism-clike': 2,
2072
+ 'prismjs/components/prism-core': 3,
2073
+ 'prismjs/components/prism-cpp': 4,
2074
+ 'prismjs/components/prism-csharp': 5,
2075
+ 'prismjs/components/prism-css': 6,
2076
+ 'prismjs/components/prism-java': 7,
2077
+ 'prismjs/components/prism-javascript': 8,
2078
+ 'prismjs/components/prism-markup': 10,
2079
+ 'prismjs/components/prism-markup-templating': 9,
2080
+ 'prismjs/components/prism-php': 11,
2081
+ 'prismjs/components/prism-python': 12,
2082
+ 'prismjs/components/prism-ruby': 13
2083
+ }
2084
+ ]
2085
+ }, {}, [14])(14);
2086
+ }));
2087
+ var prism = window.Prism;
2088
+ window.Prism = oldprism;
2089
+ return prism;
2090
+ }(undefined, exports$1, module, undefined));
2091
+ var Prism$1 = module.exports.boltExport;
2092
+
2093
+ var getLanguages = function (editor) {
2094
+ return editor.getParam('codesample_languages');
2095
+ };
2096
+ var useGlobalPrismJS = function (editor) {
2097
+ return editor.getParam('codesample_global_prismjs', false, 'boolean');
2098
+ };
2099
+
2100
+ var get$1 = function (editor) {
2101
+ return Global.Prism && useGlobalPrismJS(editor) ? Global.Prism : Prism$1;
2102
+ };
2103
+
2104
+ var getSelectedCodeSample = function (editor) {
2105
+ var node = editor.selection ? editor.selection.getNode() : null;
2106
+ if (isCodeSample(node)) {
2107
+ return Optional.some(node);
2108
+ }
2109
+ return Optional.none();
2110
+ };
2111
+ var insertCodeSample = function (editor, language, code) {
2112
+ editor.undoManager.transact(function () {
2113
+ var node = getSelectedCodeSample(editor);
2114
+ code = global$1.DOM.encode(code);
2115
+ return node.fold(function () {
2116
+ editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
2117
+ editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
2118
+ }, function (n) {
2119
+ editor.dom.setAttrib(n, 'class', 'language-' + language);
2120
+ n.innerHTML = code;
2121
+ get$1(editor).highlightElement(n);
2122
+ editor.selection.select(n);
2123
+ });
2124
+ });
2125
+ };
2126
+ var getCurrentCode = function (editor) {
2127
+ var node = getSelectedCodeSample(editor);
2128
+ return node.fold(function () {
2129
+ return '';
2130
+ }, function (n) {
2131
+ return n.textContent;
2132
+ });
2133
+ };
2134
+
2135
+ var getLanguages$1 = function (editor) {
2136
+ var defaultLanguages = [
2137
+ {
2138
+ text: 'HTML/XML',
2139
+ value: 'markup'
2140
+ },
2141
+ {
2142
+ text: 'JavaScript',
2143
+ value: 'javascript'
2144
+ },
2145
+ {
2146
+ text: 'CSS',
2147
+ value: 'css'
2148
+ },
2149
+ {
2150
+ text: 'PHP',
2151
+ value: 'php'
2152
+ },
2153
+ {
2154
+ text: 'Ruby',
2155
+ value: 'ruby'
2156
+ },
2157
+ {
2158
+ text: 'Python',
2159
+ value: 'python'
2160
+ },
2161
+ {
2162
+ text: 'Java',
2163
+ value: 'java'
2164
+ },
2165
+ {
2166
+ text: 'C',
2167
+ value: 'c'
2168
+ },
2169
+ {
2170
+ text: 'C#',
2171
+ value: 'csharp'
2172
+ },
2173
+ {
2174
+ text: 'C++',
2175
+ value: 'cpp'
2176
+ }
2177
+ ];
2178
+ var customLanguages = getLanguages(editor);
2179
+ return customLanguages ? customLanguages : defaultLanguages;
2180
+ };
2181
+ var getCurrentLanguage = function (editor, fallback) {
2182
+ var node = getSelectedCodeSample(editor);
2183
+ return node.fold(function () {
2184
+ return fallback;
2185
+ }, function (n) {
2186
+ var matches = n.className.match(/language-(\w+)/);
2187
+ return matches ? matches[1] : fallback;
2188
+ });
2189
+ };
2190
+
2191
+ var open = function (editor) {
2192
+ var languages = getLanguages$1(editor);
2193
+ var defaultLanguage = head(languages).fold(function () {
2194
+ return '';
2195
+ }, function (l) {
2196
+ return l.value;
2197
+ });
2198
+ var currentLanguage = getCurrentLanguage(editor, defaultLanguage);
2199
+ var currentCode = getCurrentCode(editor);
2200
+ editor.windowManager.open({
2201
+ title: 'Insert/Edit Code Sample',
2202
+ size: 'large',
2203
+ body: {
2204
+ type: 'panel',
2205
+ items: [
2206
+ {
2207
+ type: 'selectbox',
2208
+ name: 'language',
2209
+ label: 'Language',
2210
+ items: languages
2211
+ },
2212
+ {
2213
+ type: 'textarea',
2214
+ name: 'code',
2215
+ label: 'Code view'
2216
+ }
2217
+ ]
2218
+ },
2219
+ buttons: [
2220
+ {
2221
+ type: 'cancel',
2222
+ name: 'cancel',
2223
+ text: 'Cancel'
2224
+ },
2225
+ {
2226
+ type: 'submit',
2227
+ name: 'save',
2228
+ text: 'Save',
2229
+ primary: true
2230
+ }
2231
+ ],
2232
+ initialData: {
2233
+ language: currentLanguage,
2234
+ code: currentCode
2235
+ },
2236
+ onSubmit: function (api) {
2237
+ var data = api.getData();
2238
+ insertCodeSample(editor, data.language, data.code);
2239
+ api.close();
2240
+ }
2241
+ });
2242
+ };
2243
+
2244
+ var register = function (editor) {
2245
+ editor.addCommand('codesample', function () {
2246
+ var node = editor.selection.getNode();
2247
+ if (editor.selection.isCollapsed() || isCodeSample(node)) {
2248
+ open(editor);
2249
+ } else {
2250
+ editor.formatter.toggle('code');
2251
+ }
2252
+ });
2253
+ };
2254
+
2255
+ var setup = function (editor) {
2256
+ var $ = editor.$;
2257
+ editor.on('PreProcess', function (e) {
2258
+ $('pre[contenteditable=false]', e.node).filter(trimArg(isCodeSample)).each(function (idx, elm) {
2259
+ var $elm = $(elm), code = elm.textContent;
2260
+ $elm.attr('class', $.trim($elm.attr('class')));
2261
+ $elm.removeAttr('contentEditable');
2262
+ $elm.empty().append($('<code></code>').each(function () {
2263
+ this.textContent = code;
2264
+ }));
2265
+ });
2266
+ });
2267
+ editor.on('SetContent', function () {
2268
+ var unprocessedCodeSamples = $('pre').filter(trimArg(isCodeSample)).filter(function (idx, elm) {
2269
+ return elm.contentEditable !== 'false';
2270
+ });
2271
+ if (unprocessedCodeSamples.length) {
2272
+ editor.undoManager.transact(function () {
2273
+ unprocessedCodeSamples.each(function (idx, elm) {
2274
+ $(elm).find('br').each(function (idx, elm) {
2275
+ elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm);
2276
+ });
2277
+ elm.contentEditable = 'false';
2278
+ elm.innerHTML = editor.dom.encode(elm.textContent);
2279
+ get$1(editor).highlightElement(elm);
2280
+ elm.className = $.trim(elm.className);
2281
+ });
2282
+ });
2283
+ }
2284
+ });
2285
+ };
2286
+
2287
+ var isCodeSampleSelection = function (editor) {
2288
+ var node = editor.selection.getStart();
2289
+ return editor.dom.is(node, 'pre[class*="language-"]');
2290
+ };
2291
+ var register$1 = function (editor) {
2292
+ editor.ui.registry.addToggleButton('codesample', {
2293
+ icon: 'code-sample',
2294
+ tooltip: 'Insert/edit code sample',
2295
+ onAction: function () {
2296
+ return open(editor);
2297
+ },
2298
+ onSetup: function (api) {
2299
+ var nodeChangeHandler = function () {
2300
+ api.setActive(isCodeSampleSelection(editor));
2301
+ };
2302
+ editor.on('NodeChange', nodeChangeHandler);
2303
+ return function () {
2304
+ return editor.off('NodeChange', nodeChangeHandler);
2305
+ };
2306
+ }
2307
+ });
2308
+ editor.ui.registry.addMenuItem('codesample', {
2309
+ text: 'Code sample...',
2310
+ icon: 'code-sample',
2311
+ onAction: function () {
2312
+ return open(editor);
2313
+ }
2314
+ });
2315
+ };
2316
+
2317
+ function Plugin () {
2318
+ global.add('codesample', function (editor) {
2319
+ setup(editor);
2320
+ register$1(editor);
2321
+ register(editor);
2322
+ editor.on('dblclick', function (ev) {
2323
+ if (isCodeSample(ev.target)) {
2324
+ open(editor);
2325
+ }
2326
+ });
2327
+ });
2328
+ }
2329
+
2330
+ Plugin();
2331
+
2332
+ }());