bedrock_sass 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (534) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -5
  3. data/assets/_vendor/ace/ace.js +21635 -0
  4. data/assets/_vendor/ace/ext-beautify.js +318 -0
  5. data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +277 -0
  6. data/assets/_vendor/ace/ext-emmet.js +1226 -0
  7. data/assets/_vendor/ace/ext-error_marker.js +10 -0
  8. data/assets/_vendor/ace/ext-keybinding_menu.js +189 -0
  9. data/assets/_vendor/ace/ext-language_tools.js +1997 -0
  10. data/assets/_vendor/ace/ext-linking.js +65 -0
  11. data/assets/_vendor/ace/ext-modelist.js +228 -0
  12. data/assets/_vendor/ace/ext-options.js +750 -0
  13. data/assets/_vendor/ace/ext-rtl.js +110 -0
  14. data/assets/_vendor/ace/ext-searchbox.js +512 -0
  15. data/assets/_vendor/ace/ext-settings_menu.js +771 -0
  16. data/assets/_vendor/ace/ext-spellcheck.js +75 -0
  17. data/assets/_vendor/ace/ext-split.js +208 -0
  18. data/assets/_vendor/ace/ext-static_highlight.js +226 -0
  19. data/assets/_vendor/ace/ext-statusbar.js +57 -0
  20. data/assets/_vendor/ace/ext-textarea.js +567 -0
  21. data/assets/_vendor/ace/ext-themelist.js +67 -0
  22. data/assets/_vendor/ace/ext-whitespace.js +210 -0
  23. data/assets/_vendor/ace/keybinding-emacs.js +1165 -0
  24. data/assets/_vendor/ace/keybinding-vim.js +5673 -0
  25. data/assets/_vendor/ace/mode-abap.js +222 -0
  26. data/assets/_vendor/ace/mode-abc.js +267 -0
  27. data/assets/_vendor/ace/mode-actionscript.js +274 -0
  28. data/assets/_vendor/ace/mode-ada.js +138 -0
  29. data/assets/_vendor/ace/mode-apache_conf.js +363 -0
  30. data/assets/_vendor/ace/mode-applescript.js +279 -0
  31. data/assets/_vendor/ace/mode-asciidoc.js +349 -0
  32. data/assets/_vendor/ace/mode-asl.js +422 -0
  33. data/assets/_vendor/ace/mode-assembly_x86.js +193 -0
  34. data/assets/_vendor/ace/mode-autohotkey.js +243 -0
  35. data/assets/_vendor/ace/mode-batchfile.js +230 -0
  36. data/assets/_vendor/ace/mode-bro.js +334 -0
  37. data/assets/_vendor/ace/mode-c9search.js +294 -0
  38. data/assets/_vendor/ace/mode-c_cpp.js +502 -0
  39. data/assets/_vendor/ace/mode-cirru.js +211 -0
  40. data/assets/_vendor/ace/mode-clojure.js +314 -0
  41. data/assets/_vendor/ace/mode-cobol.js +102 -0
  42. data/assets/_vendor/ace/mode-coffee.js +400 -0
  43. data/assets/_vendor/ace/mode-coldfusion.js +2596 -0
  44. data/assets/_vendor/ace/mode-csharp.js +502 -0
  45. data/assets/_vendor/ace/mode-csound_document.js +3749 -0
  46. data/assets/_vendor/ace/mode-csound_orchestra.js +2687 -0
  47. data/assets/_vendor/ace/mode-csound_score.js +454 -0
  48. data/assets/_vendor/ace/mode-csp.js +60 -0
  49. data/assets/_vendor/ace/mode-css.js +723 -0
  50. data/assets/_vendor/ace/mode-curly.js +2564 -0
  51. data/assets/_vendor/ace/mode-d.js +520 -0
  52. data/assets/_vendor/ace/mode-dart.js +703 -0
  53. data/assets/_vendor/ace/mode-diff.js +146 -0
  54. data/assets/_vendor/ace/mode-django.js +2594 -0
  55. data/assets/_vendor/ace/mode-dockerfile.js +498 -0
  56. data/assets/_vendor/ace/mode-dot.js +418 -0
  57. data/assets/_vendor/ace/mode-drools.js +496 -0
  58. data/assets/_vendor/ace/mode-edifact.js +165 -0
  59. data/assets/_vendor/ace/mode-eiffel.js +136 -0
  60. data/assets/_vendor/ace/mode-ejs.js +3026 -0
  61. data/assets/_vendor/ace/mode-elixir.js +501 -0
  62. data/assets/_vendor/ace/mode-elm.js +307 -0
  63. data/assets/_vendor/ace/mode-erlang.js +1009 -0
  64. data/assets/_vendor/ace/mode-forth.js +297 -0
  65. data/assets/_vendor/ace/mode-fortran.js +431 -0
  66. data/assets/_vendor/ace/mode-fsharp.js +314 -0
  67. data/assets/_vendor/ace/mode-ftl.js +1192 -0
  68. data/assets/_vendor/ace/mode-gcode.js +94 -0
  69. data/assets/_vendor/ace/mode-gherkin.js +172 -0
  70. data/assets/_vendor/ace/mode-gitignore.js +60 -0
  71. data/assets/_vendor/ace/mode-glsl.js +579 -0
  72. data/assets/_vendor/ace/mode-gobstones.js +929 -0
  73. data/assets/_vendor/ace/mode-golang.js +414 -0
  74. data/assets/_vendor/ace/mode-graphqlschema.js +214 -0
  75. data/assets/_vendor/ace/mode-groovy.js +986 -0
  76. data/assets/_vendor/ace/mode-haml.js +1555 -0
  77. data/assets/_vendor/ace/mode-handlebars.js +2622 -0
  78. data/assets/_vendor/ace/mode-haskell.js +379 -0
  79. data/assets/_vendor/ace/mode-haskell_cabal.js +142 -0
  80. data/assets/_vendor/ace/mode-haxe.js +386 -0
  81. data/assets/_vendor/ace/mode-hjson.js +353 -0
  82. data/assets/_vendor/ace/mode-html.js +2509 -0
  83. data/assets/_vendor/ace/mode-html_elixir.js +3087 -0
  84. data/assets/_vendor/ace/mode-html_ruby.js +3043 -0
  85. data/assets/_vendor/ace/mode-ini.js +163 -0
  86. data/assets/_vendor/ace/mode-io.js +253 -0
  87. data/assets/_vendor/ace/mode-jack.js +347 -0
  88. data/assets/_vendor/ace/mode-jade.js +2126 -0
  89. data/assets/_vendor/ace/mode-java.js +975 -0
  90. data/assets/_vendor/ace/mode-javascript.js +797 -0
  91. data/assets/_vendor/ace/mode-json.js +327 -0
  92. data/assets/_vendor/ace/mode-jsoniq.js +4940 -0
  93. data/assets/_vendor/ace/mode-jsp.js +1430 -0
  94. data/assets/_vendor/ace/mode-jssm.js +325 -0
  95. data/assets/_vendor/ace/mode-jsx.js +412 -0
  96. data/assets/_vendor/ace/mode-julia.js +303 -0
  97. data/assets/_vendor/ace/mode-kotlin.js +795 -0
  98. data/assets/_vendor/ace/mode-latex.js +297 -0
  99. data/assets/_vendor/ace/mode-less.js +841 -0
  100. data/assets/_vendor/ace/mode-liquid.js +1193 -0
  101. data/assets/_vendor/ace/mode-lisp.js +112 -0
  102. data/assets/_vendor/ace/mode-livescript.js +280 -0
  103. data/assets/_vendor/ace/mode-logiql.js +317 -0
  104. data/assets/_vendor/ace/mode-lsl.js +343 -0
  105. data/assets/_vendor/ace/mode-lua.js +432 -0
  106. data/assets/_vendor/ace/mode-luapage.js +3007 -0
  107. data/assets/_vendor/ace/mode-lucene.js +87 -0
  108. data/assets/_vendor/ace/mode-makefile.js +410 -0
  109. data/assets/_vendor/ace/mode-markdown.js +3189 -0
  110. data/assets/_vendor/ace/mode-mask.js +1802 -0
  111. data/assets/_vendor/ace/mode-matlab.js +264 -0
  112. data/assets/_vendor/ace/mode-maze.js +291 -0
  113. data/assets/_vendor/ace/mode-mel.js +263 -0
  114. data/assets/_vendor/ace/mode-mixal.js +123 -0
  115. data/assets/_vendor/ace/mode-mushcode.js +681 -0
  116. data/assets/_vendor/ace/mode-mysql.js +168 -0
  117. data/assets/_vendor/ace/mode-nix.js +646 -0
  118. data/assets/_vendor/ace/mode-nsis.js +312 -0
  119. data/assets/_vendor/ace/mode-objectivec.js +739 -0
  120. data/assets/_vendor/ace/mode-ocaml.js +422 -0
  121. data/assets/_vendor/ace/mode-pascal.js +205 -0
  122. data/assets/_vendor/ace/mode-perl.js +380 -0
  123. data/assets/_vendor/ace/mode-pgsql.js +1508 -0
  124. data/assets/_vendor/ace/mode-php.js +13088 -0
  125. data/assets/_vendor/ace/mode-php_laravel_blade.js +13289 -0
  126. data/assets/_vendor/ace/mode-pig.js +310 -0
  127. data/assets/_vendor/ace/mode-plain_text.js +33 -0
  128. data/assets/_vendor/ace/mode-powershell.js +418 -0
  129. data/assets/_vendor/ace/mode-praat.js +478 -0
  130. data/assets/_vendor/ace/mode-prolog.js +371 -0
  131. data/assets/_vendor/ace/mode-properties.js +81 -0
  132. data/assets/_vendor/ace/mode-protobuf.js +592 -0
  133. data/assets/_vendor/ace/mode-puppet.js +370 -0
  134. data/assets/_vendor/ace/mode-python.js +273 -0
  135. data/assets/_vendor/ace/mode-r.js +310 -0
  136. data/assets/_vendor/ace/mode-razor.js +2869 -0
  137. data/assets/_vendor/ace/mode-rdoc.js +243 -0
  138. data/assets/_vendor/ace/mode-red.js +450 -0
  139. data/assets/_vendor/ace/mode-redshift.js +361 -0
  140. data/assets/_vendor/ace/mode-rhtml.js +2806 -0
  141. data/assets/_vendor/ace/mode-rst.js +257 -0
  142. data/assets/_vendor/ace/mode-ruby.js +497 -0
  143. data/assets/_vendor/ace/mode-rust.js +279 -0
  144. data/assets/_vendor/ace/mode-sass.js +441 -0
  145. data/assets/_vendor/ace/mode-scad.js +414 -0
  146. data/assets/_vendor/ace/mode-scala.js +982 -0
  147. data/assets/_vendor/ace/mode-scheme.js +232 -0
  148. data/assets/_vendor/ace/mode-scss.js +606 -0
  149. data/assets/_vendor/ace/mode-sh.js +447 -0
  150. data/assets/_vendor/ace/mode-sjs.js +1014 -0
  151. data/assets/_vendor/ace/mode-slim.js +4736 -0
  152. data/assets/_vendor/ace/mode-smarty.js +2635 -0
  153. data/assets/_vendor/ace/mode-snippets.js +207 -0
  154. data/assets/_vendor/ace/mode-soy_template.js +2847 -0
  155. data/assets/_vendor/ace/mode-space.js +168 -0
  156. data/assets/_vendor/ace/mode-sparql.js +320 -0
  157. data/assets/_vendor/ace/mode-sql.js +111 -0
  158. data/assets/_vendor/ace/mode-sqlserver.js +444 -0
  159. data/assets/_vendor/ace/mode-stylus.js +471 -0
  160. data/assets/_vendor/ace/mode-svg.js +1581 -0
  161. data/assets/_vendor/ace/mode-swift.js +390 -0
  162. data/assets/_vendor/ace/mode-tcl.js +383 -0
  163. data/assets/_vendor/ace/mode-terraform.js +398 -0
  164. data/assets/_vendor/ace/mode-tex.js +159 -0
  165. data/assets/_vendor/ace/mode-text.js +10 -0
  166. data/assets/_vendor/ace/mode-textile.js +150 -0
  167. data/assets/_vendor/ace/mode-toml.js +154 -0
  168. data/assets/_vendor/ace/mode-tsx.js +887 -0
  169. data/assets/_vendor/ace/mode-turtle.js +296 -0
  170. data/assets/_vendor/ace/mode-twig.js +2693 -0
  171. data/assets/_vendor/ace/mode-typescript.js +868 -0
  172. data/assets/_vendor/ace/mode-vala.js +676 -0
  173. data/assets/_vendor/ace/mode-vbscript.js +207 -0
  174. data/assets/_vendor/ace/mode-velocity.js +2790 -0
  175. data/assets/_vendor/ace/mode-verilog.js +119 -0
  176. data/assets/_vendor/ace/mode-vhdl.js +118 -0
  177. data/assets/_vendor/ace/mode-wollok.js +911 -0
  178. data/assets/_vendor/ace/mode-xml.js +677 -0
  179. data/assets/_vendor/ace/mode-xquery.js +4922 -0
  180. data/assets/_vendor/ace/mode-yaml.js +300 -0
  181. data/assets/_vendor/ace/snippets/abap.js +15 -0
  182. data/assets/_vendor/ace/snippets/abc.js +46 -0
  183. data/assets/_vendor/ace/snippets/actionscript.js +172 -0
  184. data/assets/_vendor/ace/snippets/ada.js +15 -0
  185. data/assets/_vendor/ace/snippets/apache_conf.js +15 -0
  186. data/assets/_vendor/ace/snippets/applescript.js +15 -0
  187. data/assets/_vendor/ace/snippets/asciidoc.js +15 -0
  188. data/assets/_vendor/ace/snippets/asl.js +14 -0
  189. data/assets/_vendor/ace/snippets/assembly_x86.js +15 -0
  190. data/assets/_vendor/ace/snippets/autohotkey.js +15 -0
  191. data/assets/_vendor/ace/snippets/batchfile.js +15 -0
  192. data/assets/_vendor/ace/snippets/bro.js +15 -0
  193. data/assets/_vendor/ace/snippets/c9search.js +15 -0
  194. data/assets/_vendor/ace/snippets/c_cpp.js +146 -0
  195. data/assets/_vendor/ace/snippets/cirru.js +15 -0
  196. data/assets/_vendor/ace/snippets/clojure.js +105 -0
  197. data/assets/_vendor/ace/snippets/cobol.js +15 -0
  198. data/assets/_vendor/ace/snippets/coffee.js +110 -0
  199. data/assets/_vendor/ace/snippets/coldfusion.js +15 -0
  200. data/assets/_vendor/ace/snippets/csharp.js +15 -0
  201. data/assets/_vendor/ace/snippets/csound_document.js +25 -0
  202. data/assets/_vendor/ace/snippets/csound_orchestra.js +62 -0
  203. data/assets/_vendor/ace/snippets/csound_score.js +15 -0
  204. data/assets/_vendor/ace/snippets/csp.js +15 -0
  205. data/assets/_vendor/ace/snippets/css.js +982 -0
  206. data/assets/_vendor/ace/snippets/curly.js +15 -0
  207. data/assets/_vendor/ace/snippets/d.js +15 -0
  208. data/assets/_vendor/ace/snippets/dart.js +98 -0
  209. data/assets/_vendor/ace/snippets/diff.js +26 -0
  210. data/assets/_vendor/ace/snippets/django.js +123 -0
  211. data/assets/_vendor/ace/snippets/dockerfile.js +15 -0
  212. data/assets/_vendor/ace/snippets/dot.js +15 -0
  213. data/assets/_vendor/ace/snippets/drools.js +34 -0
  214. data/assets/_vendor/ace/snippets/edifact.js +255 -0
  215. data/assets/_vendor/ace/snippets/eiffel.js +15 -0
  216. data/assets/_vendor/ace/snippets/ejs.js +15 -0
  217. data/assets/_vendor/ace/snippets/elixir.js +15 -0
  218. data/assets/_vendor/ace/snippets/elm.js +15 -0
  219. data/assets/_vendor/ace/snippets/erlang.js +175 -0
  220. data/assets/_vendor/ace/snippets/forth.js +15 -0
  221. data/assets/_vendor/ace/snippets/fortran.js +15 -0
  222. data/assets/_vendor/ace/snippets/fsharp.js +15 -0
  223. data/assets/_vendor/ace/snippets/ftl.js +15 -0
  224. data/assets/_vendor/ace/snippets/gcode.js +15 -0
  225. data/assets/_vendor/ace/snippets/gherkin.js +15 -0
  226. data/assets/_vendor/ace/snippets/gitignore.js +15 -0
  227. data/assets/_vendor/ace/snippets/glsl.js +15 -0
  228. data/assets/_vendor/ace/snippets/gobstones.js +49 -0
  229. data/assets/_vendor/ace/snippets/golang.js +15 -0
  230. data/assets/_vendor/ace/snippets/graphqlschema.js +47 -0
  231. data/assets/_vendor/ace/snippets/groovy.js +15 -0
  232. data/assets/_vendor/ace/snippets/haml.js +35 -0
  233. data/assets/_vendor/ace/snippets/handlebars.js +15 -0
  234. data/assets/_vendor/ace/snippets/haskell.js +97 -0
  235. data/assets/_vendor/ace/snippets/haskell_cabal.js +15 -0
  236. data/assets/_vendor/ace/snippets/haxe.js +15 -0
  237. data/assets/_vendor/ace/snippets/hjson.js +15 -0
  238. data/assets/_vendor/ace/snippets/html.js +870 -0
  239. data/assets/_vendor/ace/snippets/html_elixir.js +15 -0
  240. data/assets/_vendor/ace/snippets/html_ruby.js +15 -0
  241. data/assets/_vendor/ace/snippets/ini.js +15 -0
  242. data/assets/_vendor/ace/snippets/io.js +77 -0
  243. data/assets/_vendor/ace/snippets/jack.js +15 -0
  244. data/assets/_vendor/ace/snippets/jade.js +15 -0
  245. data/assets/_vendor/ace/snippets/java.js +255 -0
  246. data/assets/_vendor/ace/snippets/javascript.js +210 -0
  247. data/assets/_vendor/ace/snippets/json.js +15 -0
  248. data/assets/_vendor/ace/snippets/jsoniq.js +76 -0
  249. data/assets/_vendor/ace/snippets/jsp.js +114 -0
  250. data/assets/_vendor/ace/snippets/jssm.js +15 -0
  251. data/assets/_vendor/ace/snippets/jsx.js +15 -0
  252. data/assets/_vendor/ace/snippets/julia.js +15 -0
  253. data/assets/_vendor/ace/snippets/kotlin.js +15 -0
  254. data/assets/_vendor/ace/snippets/latex.js +15 -0
  255. data/assets/_vendor/ace/snippets/less.js +15 -0
  256. data/assets/_vendor/ace/snippets/liquid.js +15 -0
  257. data/assets/_vendor/ace/snippets/lisp.js +15 -0
  258. data/assets/_vendor/ace/snippets/livescript.js +15 -0
  259. data/assets/_vendor/ace/snippets/logiql.js +15 -0
  260. data/assets/_vendor/ace/snippets/lsl.js +1247 -0
  261. data/assets/_vendor/ace/snippets/lua.js +36 -0
  262. data/assets/_vendor/ace/snippets/luapage.js +15 -0
  263. data/assets/_vendor/ace/snippets/lucene.js +15 -0
  264. data/assets/_vendor/ace/snippets/makefile.js +19 -0
  265. data/assets/_vendor/ace/snippets/markdown.js +103 -0
  266. data/assets/_vendor/ace/snippets/mask.js +15 -0
  267. data/assets/_vendor/ace/snippets/matlab.js +15 -0
  268. data/assets/_vendor/ace/snippets/maze.js +24 -0
  269. data/assets/_vendor/ace/snippets/mel.js +15 -0
  270. data/assets/_vendor/ace/snippets/mixal.js +15 -0
  271. data/assets/_vendor/ace/snippets/mushcode.js +15 -0
  272. data/assets/_vendor/ace/snippets/mysql.js +15 -0
  273. data/assets/_vendor/ace/snippets/nix.js +15 -0
  274. data/assets/_vendor/ace/snippets/nsis.js +15 -0
  275. data/assets/_vendor/ace/snippets/objectivec.js +15 -0
  276. data/assets/_vendor/ace/snippets/ocaml.js +15 -0
  277. data/assets/_vendor/ace/snippets/pascal.js +15 -0
  278. data/assets/_vendor/ace/snippets/perl.js +362 -0
  279. data/assets/_vendor/ace/snippets/pgsql.js +15 -0
  280. data/assets/_vendor/ace/snippets/php.js +398 -0
  281. data/assets/_vendor/ace/snippets/php_laravel_blade.js +15 -0
  282. data/assets/_vendor/ace/snippets/pig.js +15 -0
  283. data/assets/_vendor/ace/snippets/plain_text.js +15 -0
  284. data/assets/_vendor/ace/snippets/powershell.js +15 -0
  285. data/assets/_vendor/ace/snippets/praat.js +15 -0
  286. data/assets/_vendor/ace/snippets/prolog.js +15 -0
  287. data/assets/_vendor/ace/snippets/properties.js +15 -0
  288. data/assets/_vendor/ace/snippets/protobuf.js +15 -0
  289. data/assets/_vendor/ace/snippets/puppet.js +15 -0
  290. data/assets/_vendor/ace/snippets/python.js +173 -0
  291. data/assets/_vendor/ace/snippets/r.js +136 -0
  292. data/assets/_vendor/ace/snippets/razor.js +18 -0
  293. data/assets/_vendor/ace/snippets/rdoc.js +15 -0
  294. data/assets/_vendor/ace/snippets/red.js +15 -0
  295. data/assets/_vendor/ace/snippets/redshift.js +15 -0
  296. data/assets/_vendor/ace/snippets/rhtml.js +15 -0
  297. data/assets/_vendor/ace/snippets/rst.js +37 -0
  298. data/assets/_vendor/ace/snippets/ruby.js +943 -0
  299. data/assets/_vendor/ace/snippets/rust.js +15 -0
  300. data/assets/_vendor/ace/snippets/sass.js +15 -0
  301. data/assets/_vendor/ace/snippets/scad.js +15 -0
  302. data/assets/_vendor/ace/snippets/scala.js +15 -0
  303. data/assets/_vendor/ace/snippets/scheme.js +15 -0
  304. data/assets/_vendor/ace/snippets/scss.js +15 -0
  305. data/assets/_vendor/ace/snippets/sh.js +98 -0
  306. data/assets/_vendor/ace/snippets/sjs.js +15 -0
  307. data/assets/_vendor/ace/snippets/slim.js +15 -0
  308. data/assets/_vendor/ace/snippets/smarty.js +15 -0
  309. data/assets/_vendor/ace/snippets/snippets.js +24 -0
  310. data/assets/_vendor/ace/snippets/soy_template.js +15 -0
  311. data/assets/_vendor/ace/snippets/space.js +15 -0
  312. data/assets/_vendor/ace/snippets/sparql.js +15 -0
  313. data/assets/_vendor/ace/snippets/sql.js +41 -0
  314. data/assets/_vendor/ace/snippets/sqlserver.js +84 -0
  315. data/assets/_vendor/ace/snippets/stylus.js +15 -0
  316. data/assets/_vendor/ace/snippets/svg.js +15 -0
  317. data/assets/_vendor/ace/snippets/swift.js +15 -0
  318. data/assets/_vendor/ace/snippets/tcl.js +107 -0
  319. data/assets/_vendor/ace/snippets/terraform.js +15 -0
  320. data/assets/_vendor/ace/snippets/tex.js +205 -0
  321. data/assets/_vendor/ace/snippets/text.js +15 -0
  322. data/assets/_vendor/ace/snippets/textile.js +45 -0
  323. data/assets/_vendor/ace/snippets/toml.js +15 -0
  324. data/assets/_vendor/ace/snippets/tsx.js +15 -0
  325. data/assets/_vendor/ace/snippets/turtle.js +15 -0
  326. data/assets/_vendor/ace/snippets/twig.js +15 -0
  327. data/assets/_vendor/ace/snippets/typescript.js +15 -0
  328. data/assets/_vendor/ace/snippets/vala.js +201 -0
  329. data/assets/_vendor/ace/snippets/vbscript.js +15 -0
  330. data/assets/_vendor/ace/snippets/velocity.js +44 -0
  331. data/assets/_vendor/ace/snippets/verilog.js +15 -0
  332. data/assets/_vendor/ace/snippets/vhdl.js +15 -0
  333. data/assets/_vendor/ace/snippets/wollok.js +99 -0
  334. data/assets/_vendor/ace/snippets/xml.js +15 -0
  335. data/assets/_vendor/ace/snippets/xquery.js +76 -0
  336. data/assets/_vendor/ace/snippets/yaml.js +15 -0
  337. data/assets/_vendor/ace/theme-ambiance.js +185 -0
  338. data/assets/_vendor/ace/theme-chaos.js +164 -0
  339. data/assets/_vendor/ace/theme-chrome.js +136 -0
  340. data/assets/_vendor/ace/theme-clouds.js +103 -0
  341. data/assets/_vendor/ace/theme-clouds_midnight.js +104 -0
  342. data/assets/_vendor/ace/theme-cobalt.js +121 -0
  343. data/assets/_vendor/ace/theme-crimson_editor.js +126 -0
  344. data/assets/_vendor/ace/theme-dawn.js +116 -0
  345. data/assets/_vendor/ace/theme-dracula.js +136 -0
  346. data/assets/_vendor/ace/theme-dreamweaver.js +149 -0
  347. data/assets/_vendor/ace/theme-eclipse.js +106 -0
  348. data/assets/_vendor/ace/theme-github.js +110 -0
  349. data/assets/_vendor/ace/theme-gob.js +120 -0
  350. data/assets/_vendor/ace/theme-gruvbox.js +90 -0
  351. data/assets/_vendor/ace/theme-idle_fingers.js +104 -0
  352. data/assets/_vendor/ace/theme-iplastic.js +129 -0
  353. data/assets/_vendor/ace/theme-katzenmilch.js +129 -0
  354. data/assets/_vendor/ace/theme-kr_theme.js +112 -0
  355. data/assets/_vendor/ace/theme-kuroir.js +69 -0
  356. data/assets/_vendor/ace/theme-merbivore.js +103 -0
  357. data/assets/_vendor/ace/theme-merbivore_soft.js +104 -0
  358. data/assets/_vendor/ace/theme-mono_industrial.js +115 -0
  359. data/assets/_vendor/ace/theme-monokai.js +113 -0
  360. data/assets/_vendor/ace/theme-pastel_on_dark.js +116 -0
  361. data/assets/_vendor/ace/theme-solarized_dark.js +96 -0
  362. data/assets/_vendor/ace/theme-solarized_light.js +99 -0
  363. data/assets/_vendor/ace/theme-sqlserver.js +146 -0
  364. data/assets/_vendor/ace/theme-terminal.js +122 -0
  365. data/assets/_vendor/ace/theme-textmate.js +138 -0
  366. data/assets/_vendor/ace/theme-tomorrow.js +116 -0
  367. data/assets/_vendor/ace/theme-tomorrow_night.js +116 -0
  368. data/assets/_vendor/ace/theme-tomorrow_night_blue.js +114 -0
  369. data/assets/_vendor/ace/theme-tomorrow_night_bright.js +129 -0
  370. data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +116 -0
  371. data/assets/_vendor/ace/theme-twilight.js +117 -0
  372. data/assets/_vendor/ace/theme-vibrant_ink.js +102 -0
  373. data/assets/_vendor/ace/theme-xcode.js +96 -0
  374. data/assets/_vendor/ace/worker-coffee.js +2165 -0
  375. data/assets/_vendor/ace/worker-css.js +8764 -0
  376. data/assets/_vendor/ace/worker-html.js +11614 -0
  377. data/assets/_vendor/ace/worker-javascript.js +12491 -0
  378. data/assets/_vendor/ace/worker-json.js +2396 -0
  379. data/assets/_vendor/ace/worker-lua.js +3637 -0
  380. data/assets/_vendor/ace/worker-php.js +4313 -0
  381. data/assets/_vendor/ace/worker-xml.js +3899 -0
  382. data/assets/_vendor/ace/worker-xquery.js +70688 -0
  383. data/assets/_vendor/motion-ui/_settings.scss +1 -0
  384. data/assets/_vendor/motion-ui/effects/_fade.scss +1 -4
  385. data/assets/_vendor/motion-ui/effects/_hinge.scss +4 -3
  386. data/assets/_vendor/motion-ui/effects/_shake.scss +1 -1
  387. data/assets/_vendor/motion-ui/effects/_slide.scss +4 -3
  388. data/assets/_vendor/motion-ui/effects/_spin.scss +4 -3
  389. data/assets/_vendor/motion-ui/effects/_wiggle.scss +1 -1
  390. data/assets/_vendor/motion-ui/effects/_zoom.scss +2 -2
  391. data/assets/_vendor/motion-ui/motion-ui.scss +2 -0
  392. data/assets/_vendor/motion-ui/transitions/_fade.scss +6 -4
  393. data/assets/_vendor/motion-ui/transitions/_hinge.scss +3 -2
  394. data/assets/_vendor/motion-ui/transitions/_slide.scss +3 -2
  395. data/assets/_vendor/motion-ui/transitions/_spin.scss +2 -1
  396. data/assets/_vendor/motion-ui/transitions/_zoom.scss +6 -4
  397. data/assets/_vendor/motion-ui/util/_animation.scss +1 -1
  398. data/assets/_vendor/motion-ui/util/_args.scss +2 -2
  399. data/assets/_vendor/motion-ui/util/_function.scss +94 -0
  400. data/assets/_vendor/motion-ui/util/_keyframe.scss +5 -5
  401. data/assets/_vendor/motion-ui/util/_series.scss +20 -17
  402. data/assets/_vendor/motion-ui/util/_string.scss +36 -0
  403. data/assets/_vendor/tinymce/plugins/advlist/plugin.js +136 -404
  404. data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -1
  405. data/assets/_vendor/tinymce/plugins/anchor/plugin.js +103 -323
  406. data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -1
  407. data/assets/_vendor/tinymce/plugins/autolink/plugin.js +153 -377
  408. data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -1
  409. data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -427
  410. data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -1
  411. data/assets/_vendor/tinymce/plugins/autosave/plugin.js +197 -579
  412. data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
  413. data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +88 -251
  414. data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -1
  415. data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1243 -818
  416. data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -1
  417. data/assets/_vendor/tinymce/plugins/code/plugin.js +82 -326
  418. data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -1
  419. data/assets/_vendor/tinymce/plugins/codesample/plugin.js +829 -1444
  420. data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -1
  421. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +111 -257
  422. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -1
  423. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +141 -469
  424. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -1
  425. data/assets/_vendor/tinymce/plugins/directionality/plugin.js +57 -261
  426. data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -1
  427. data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +78 -247
  428. data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -1
  429. data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +463 -906
  430. data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -1
  431. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +149 -427
  432. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  433. data/assets/_vendor/tinymce/plugins/help/plugin.js +634 -1434
  434. data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
  435. data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -185
  436. data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -1
  437. data/assets/_vendor/tinymce/plugins/image/plugin.js +1147 -1508
  438. data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
  439. data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3319 -4079
  440. data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -2
  441. data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -543
  442. data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -1
  443. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +151 -460
  444. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
  445. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +204 -379
  446. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -1
  447. data/assets/_vendor/tinymce/plugins/link/plugin.js +644 -1162
  448. data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -1
  449. data/assets/_vendor/tinymce/plugins/lists/plugin.js +1005 -1875
  450. data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
  451. data/assets/_vendor/tinymce/plugins/media/plugin.js +1066 -1926
  452. data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -1
  453. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +70 -298
  454. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -1
  455. data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +96 -294
  456. data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -1
  457. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +92 -337
  458. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -1
  459. data/assets/_vendor/tinymce/plugins/paste/plugin.js +1363 -2801
  460. data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
  461. data/assets/_vendor/tinymce/plugins/preview/plugin.js +106 -393
  462. data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -1
  463. data/assets/_vendor/tinymce/plugins/print/plugin.js +29 -185
  464. data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -1
  465. data/assets/_vendor/tinymce/plugins/save/plugin.js +100 -350
  466. data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -1
  467. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +491 -865
  468. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  469. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +630 -1292
  470. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
  471. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +96 -391
  472. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -1
  473. data/assets/_vendor/tinymce/plugins/table/plugin.js +9537 -14920
  474. data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -5
  475. data/assets/_vendor/tinymce/plugins/template/plugin.js +309 -771
  476. data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
  477. data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +319 -592
  478. data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -1
  479. data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +326 -674
  480. data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
  481. data/assets/_vendor/tinymce/plugins/toc/plugin.js +199 -530
  482. data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -1
  483. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +112 -436
  484. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -1
  485. data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +428 -1248
  486. data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
  487. data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +307 -699
  488. data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
  489. data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -1
  490. data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -1
  491. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  492. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -1
  493. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  494. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  495. data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -1
  496. data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +1 -1
  497. data/assets/_vendor/tinymce/themes/inlite/theme.js +9693 -18245
  498. data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -5
  499. data/assets/_vendor/tinymce/themes/mobile/theme.js +12629 -22467
  500. data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -8
  501. data/assets/_vendor/tinymce/themes/modern/theme.js +9510 -17780
  502. data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -5
  503. data/assets/_vendor/tinymce/tinymce.js +25087 -42606
  504. data/assets/_vendor/yoastseo/css/_icons.scss +7 -7
  505. data/assets/_vendor/yoastseo/css/_snippet-editor.scss +1 -1
  506. data/assets/bedrock/js/bedrock.js +1 -71697
  507. data/assets/bedrock/scss/_bedrock-components.scss +20 -0
  508. data/assets/bedrock/scss/_bedrock-settings.scss +12 -4
  509. data/assets/bedrock/scss/_foundation-settings.scss +4 -2
  510. data/assets/bedrock/scss/components/ace-editor.scss +21 -0
  511. data/assets/bedrock/scss/components/attachments-grid.scss +18 -15
  512. data/assets/bedrock/scss/components/date-picker.scss +146 -0
  513. data/assets/bedrock/scss/components/dropzone-upload.scss +7 -0
  514. data/assets/bedrock/scss/components/file-input.scss +7 -0
  515. data/assets/bedrock/scss/components/file-preview.scss +36 -0
  516. data/assets/bedrock/scss/components/frame-embed.scss +23 -0
  517. data/assets/bedrock/scss/components/global.scss +27 -0
  518. data/assets/bedrock/scss/components/helper-classes.scss +1 -0
  519. data/assets/bedrock/scss/components/icon-box.scss +38 -0
  520. data/assets/bedrock/scss/components/item-list.scss +66 -0
  521. data/assets/bedrock/scss/components/lists.scss +58 -0
  522. data/assets/bedrock/scss/components/off-canvas-menu.scss +27 -15
  523. data/assets/bedrock/scss/components/place-autocomplete.scss +90 -0
  524. data/assets/bedrock/scss/components/rrule-generator.scss +102 -0
  525. data/assets/bedrock/scss/components/rrule-reveal.scss +14 -0
  526. data/assets/bedrock/scss/components/select-box.scss +1 -0
  527. data/assets/bedrock/scss/components/seo-analysis.scss +5 -0
  528. data/assets/bedrock/scss/components/textarea.scss +14 -2
  529. data/assets/bedrock/scss/components/tiny-mce-editor.scss +5 -16
  530. data/lib/bedrock_sass.rb +5 -0
  531. data/lib/bedrock_sass/version.rb +1 -1
  532. data/lib/tasks/before_assets_precompile.rake +1 -0
  533. metadata +395 -4
  534. data/CODE_OF_CONDUCT.md +0 -74
@@ -1 +1 @@
1
- !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){return a("tinymce.PluginManager")}),g("9",[],function(){var a=function(a,b){return a.fire("insertCustomChar",{chr:b})};return{fireInsertCustomChar:a}}),g("6",["9"],function(a){var b=function(b,c){var d=a.fireInsertCustomChar(b,c).chr;b.execCommand("mceInsertContent",!1,d)};return{insertChar:b}}),g("a",["5"],function(a){return a("tinymce.util.Tools")}),g("b",[],function(){var a=function(a){return a.settings.charmap},b=function(a){return a.settings.charmap_append};return{getCharMap:a,getCharMapAppend:b}}),g("7",["a","b"],function(a,b){var c=a.isArray,d=function(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]},e=function(b){return a.grep(b,function(a){return c(a)&&2===a.length})},f=function(a){return c(a)?[].concat(e(a)):"function"==typeof a?a():[]},g=function(a,c){var d=b.getCharMap(a);d&&(c=f(d));var e=b.getCharMapAppend(a);return e?[].concat(c).concat(f(e)):c},h=function(a){return g(a,d())};return{getCharMap:h}}),g("2",["6","7"],function(a,b){var c=function(c){var d=function(){return b.getCharMap(c)},e=function(b){a.insertChar(c,b)};return{getCharMap:d,insertChar:e}};return{get:c}}),g("c",[],function(){var a=function(a){var b,c,d,e=Math.min(a.length,25),f=Math.ceil(a.length/e);for(b='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>',d=0;d<f;d++){for(b+="<tr>",c=0;c<e;c++){var g=d*e+c;if(g<a.length){var h=a[g],i=parseInt(h[0],10),j=h?String.fromCharCode(i):"&nbsp;";b+='<td title="'+h[1]+'"><div tabindex="-1" title="'+h[1]+'" role="button" data-chr="'+i+'">'+j+"</div></td>"}else b+="<td />"}b+="</tr>"}return b+="</tbody></table>"};return{getHtml:a}}),g("8",["6","7","c"],function(a,b,c){var d=function(a){for(;a;){if("TD"===a.nodeName)return a;a=a.parentNode}},e=function(e){var f,g={type:"container",html:c.getHtml(b.getCharMap(e)),onclick:function(b){var c=b.target;if(/^(TD|DIV)$/.test(c.nodeName)){var g=d(c).firstChild;if(g&&g.hasAttribute("data-chr")){var h=g.getAttribute("data-chr"),i=parseInt(h,10);isNaN(i)||a.insertChar(e,String.fromCharCode(i)),b.ctrlKey||f.close()}}},onmouseover:function(a){var b=d(a.target);b&&b.firstChild?(f.find("#preview").text(b.firstChild.firstChild.data),f.find("#previewTitle").text(b.title)):(f.find("#preview").text(" "),f.find("#previewTitle").text(" "))}};f=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[g,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){f.close()}}]})};return{open:e}}),g("3",["8"],function(a){var b=function(b){b.addCommand("mceShowCharmap",function(){a.open(b)})};return{register:b}}),g("4",[],function(){var a=function(a){a.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};return{register:a}}),g("0",["1","2","3","4"],function(a,b,c,d){return a.add("charmap",function(a){return c.register(a),d.register(a),b.get(a)}),function(){}}),d("0")()}();
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){return e.fire("insertCustomChar",{chr:t})},l=function(e,t){var a=i(e,t).chr;e.execCommand("mceInsertContent",!1,a)},a=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.settings.charmap},n=function(e){return e.settings.charmap_append},o=a.isArray,c=function(e){return o(e)?[].concat((t=e,a.grep(t,function(e){return o(e)&&2===e.length}))):"function"==typeof e?e():[];var t},s=function(e){return function(e,t){var a=r(e);a&&(t=c(a));var i=n(e);return i?[].concat(t).concat(c(i)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]])},t=function(t){return{getCharMap:function(){return s(t)},insertChar:function(e){l(t,e)}}},u=function(e){var t,a,i,r=Math.min(e.length,25),n=Math.ceil(e.length/r);for(t='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>',i=0;i<n;i++){for(t+="<tr>",a=0;a<r;a++){var o=i*r+a;if(o<e.length){var l=e[o],c=parseInt(l[0],10),s=l?String.fromCharCode(c):"&nbsp;";t+='<td title="'+l[1]+'"><div tabindex="-1" title="'+l[1]+'" role="button" data-chr="'+c+'">'+s+"</div></td>"}else t+="<td />"}t+="</tr>"}return t+="</tbody></table>"},d=function(e){for(;e;){if("TD"===e.nodeName)return e;e=e.parentNode}},m=function(n){var o,e={type:"container",html:u(s(n)),onclick:function(e){var t=e.target;if(/^(TD|DIV)$/.test(t.nodeName)){var a=d(t).firstChild;if(a&&a.hasAttribute("data-chr")){var i=a.getAttribute("data-chr"),r=parseInt(i,10);isNaN(r)||l(n,String.fromCharCode(r)),e.ctrlKey||o.close()}}},onmouseover:function(e){var t=d(e.target);t&&t.firstChild?(o.find("#preview").text(t.firstChild.firstChild.data),o.find("#previewTitle").text(t.title)):(o.find("#preview").text(" "),o.find("#previewTitle").text(" "))}};o=n.windowManager.open({title:"Special character",spacing:10,padding:10,items:[e,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){o.close()}}]})},g=function(e){e.addCommand("mceShowCharmap",function(){m(e)})},p=function(e){e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};e.add("charmap",function(e){return g(e),p(e),t(e)})}();
@@ -1,338 +1,94 @@
1
1
  (function () {
2
+ var code = (function () {
3
+ 'use strict';
2
4
 
3
- var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
5
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
4
6
 
5
- // Used when there is no 'main' module.
6
- // The name is probably (hopefully) unique so minification removes for releases.
7
- var register_3795 = function (id) {
8
- var module = dem(id);
9
- var fragments = id.split('.');
10
- var target = Function('return this;')();
11
- for (var i = 0; i < fragments.length - 1; ++i) {
12
- if (target[fragments[i]] === undefined)
13
- target[fragments[i]] = {};
14
- target = target[fragments[i]];
15
- }
16
- target[fragments[fragments.length - 1]] = module;
17
- };
18
-
19
- var instantiate = function (id) {
20
- var actual = defs[id];
21
- var dependencies = actual.deps;
22
- var definition = actual.defn;
23
- var len = dependencies.length;
24
- var instances = new Array(len);
25
- for (var i = 0; i < len; ++i)
26
- instances[i] = dem(dependencies[i]);
27
- var defResult = definition.apply(null, instances);
28
- if (defResult === undefined)
29
- throw 'module [' + id + '] returned undefined';
30
- actual.instance = defResult;
31
- };
7
+ var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
32
8
 
33
- var def = function (id, dependencies, definition) {
34
- if (typeof id !== 'string')
35
- throw 'module id must be a string';
36
- else if (dependencies === undefined)
37
- throw 'no dependencies for ' + id;
38
- else if (definition === undefined)
39
- throw 'no definition function for ' + id;
40
- defs[id] = {
41
- deps: dependencies,
42
- defn: definition,
43
- instance: undefined
9
+ var getMinWidth = function (editor) {
10
+ return editor.getParam('code_dialog_width', 600);
11
+ };
12
+ var getMinHeight = function (editor) {
13
+ return editor.getParam('code_dialog_height', Math.min(global$1.DOM.getViewPort().h - 200, 500));
14
+ };
15
+ var $_e90paoa1jm0ofy6v = {
16
+ getMinWidth: getMinWidth,
17
+ getMinHeight: getMinHeight
44
18
  };
45
- };
46
-
47
- var dem = function (id) {
48
- var actual = defs[id];
49
- if (actual === undefined)
50
- throw 'module [' + id + '] was undefined';
51
- else if (actual.instance === undefined)
52
- instantiate(id);
53
- return actual.instance;
54
- };
55
-
56
- var req = function (ids, callback) {
57
- var len = ids.length;
58
- var instances = new Array(len);
59
- for (var i = 0; i < len; ++i)
60
- instances[i] = dem(ids[i]);
61
- callback.apply(null, instances);
62
- };
63
-
64
- var ephox = {};
65
-
66
- ephox.bolt = {
67
- module: {
68
- api: {
69
- define: def,
70
- require: req,
71
- demand: dem
72
- }
73
- }
74
- };
75
-
76
- var define = def;
77
- var require = req;
78
- var demand = dem;
79
- // this helps with minification when using a lot of global references
80
- var defineGlobal = function (id, ref) {
81
- define(id, [], function () { return ref; });
82
- };
83
- /*jsc
84
- ["tinymce.plugins.code.Plugin","tinymce.core.PluginManager","tinymce.plugins.code.api.Commands","tinymce.plugins.code.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.code.ui.Dialog","tinymce.plugins.code.api.Settings","tinymce.plugins.code.core.Content","tinymce.core.dom.DOMUtils"]
85
- jsc*/
86
- defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
87
- /**
88
- * ResolveGlobal.js
89
- *
90
- * Released under LGPL License.
91
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
92
- *
93
- * License: http://www.tinymce.com/license
94
- * Contributing: http://www.tinymce.com/contributing
95
- */
96
-
97
- define(
98
- 'tinymce.core.PluginManager',
99
- [
100
- 'global!tinymce.util.Tools.resolve'
101
- ],
102
- function (resolve) {
103
- return resolve('tinymce.PluginManager');
104
- }
105
- );
106
-
107
- /**
108
- * ResolveGlobal.js
109
- *
110
- * Released under LGPL License.
111
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
112
- *
113
- * License: http://www.tinymce.com/license
114
- * Contributing: http://www.tinymce.com/contributing
115
- */
116
-
117
- define(
118
- 'tinymce.core.dom.DOMUtils',
119
- [
120
- 'global!tinymce.util.Tools.resolve'
121
- ],
122
- function (resolve) {
123
- return resolve('tinymce.dom.DOMUtils');
124
- }
125
- );
126
-
127
- /**
128
- * Settings.js
129
- *
130
- * Released under LGPL License.
131
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
132
- *
133
- * License: http://www.tinymce.com/license
134
- * Contributing: http://www.tinymce.com/contributing
135
- */
136
-
137
- define(
138
- 'tinymce.plugins.code.api.Settings',
139
- [
140
- 'tinymce.core.dom.DOMUtils'
141
- ],
142
- function (DOMUtils) {
143
- var getMinWidth = function (editor) {
144
- return editor.getParam('code_dialog_width', 600);
145
- };
146
-
147
- var getMinHeight = function (editor) {
148
- return editor.getParam('code_dialog_height', Math.min(DOMUtils.DOM.getViewPort().h - 200, 500));
149
- };
150
-
151
- return {
152
- getMinWidth: getMinWidth,
153
- getMinHeight: getMinHeight
154
- };
155
- }
156
- );
157
- /**
158
- * Content.js
159
- *
160
- * Released under LGPL License.
161
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
162
- *
163
- * License: http://www.tinymce.com/license
164
- * Contributing: http://www.tinymce.com/contributing
165
- */
166
-
167
- define(
168
- 'tinymce.plugins.code.core.Content',
169
- [
170
- ],
171
- function () {
172
- var setContent = function (editor, html) {
173
- // We get a lovely "Wrong document" error in IE 11 if we
174
- // don't move the focus to the editor before creating an undo
175
- // transation since it tries to make a bookmark for the current selection
176
- editor.focus();
177
-
178
- editor.undoManager.transact(function () {
179
- editor.setContent(html);
180
- });
181
-
182
- editor.selection.setCursorLocation();
183
- editor.nodeChanged();
184
- };
185
-
186
- var getContent = function (editor) {
187
- return editor.getContent({ source_view: true });
188
- };
189
-
190
- return {
191
- setContent: setContent,
192
- getContent: getContent
193
- };
194
- }
195
- );
196
- /**
197
- * Dialog.js
198
- *
199
- * Released under LGPL License.
200
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
201
- *
202
- * License: http://www.tinymce.com/license
203
- * Contributing: http://www.tinymce.com/contributing
204
- */
205
-
206
- define(
207
- 'tinymce.plugins.code.ui.Dialog',
208
- [
209
- 'tinymce.plugins.code.api.Settings',
210
- 'tinymce.plugins.code.core.Content'
211
- ],
212
- function (Settings, Content) {
213
- var open = function (editor) {
214
- var minWidth = Settings.getMinWidth(editor);
215
- var minHeight = Settings.getMinHeight(editor);
216
-
217
- var win = editor.windowManager.open({
218
- title: 'Source code',
219
- body: {
220
- type: 'textbox',
221
- name: 'code',
222
- multiline: true,
223
- minWidth: minWidth,
224
- minHeight: minHeight,
225
- spellcheck: false,
226
- style: 'direction: ltr; text-align: left'
227
- },
228
- onSubmit: function (e) {
229
- Content.setContent(editor, e.data.code);
230
- }
231
- });
232
-
233
- // Gecko has a major performance issue with textarea
234
- // contents so we need to set it when all reflows are done
235
- win.find('#code').value(Content.getContent(editor));
236
- };
237
-
238
- return {
239
- open: open
240
- };
241
- }
242
- );
243
- /**
244
- * Commands.js
245
- *
246
- * Released under LGPL License.
247
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
248
- *
249
- * License: http://www.tinymce.com/license
250
- * Contributing: http://www.tinymce.com/contributing
251
- */
252
-
253
- define(
254
- 'tinymce.plugins.code.api.Commands',
255
- [
256
- 'tinymce.plugins.code.ui.Dialog'
257
- ],
258
- function (Dialog) {
259
- var register = function (editor) {
260
- editor.addCommand('mceCodeEditor', function () {
261
- Dialog.open(editor);
262
- });
263
- };
264
-
265
- return {
266
- register: register
267
- };
268
- }
269
- );
270
- /**
271
- * Buttons.js
272
- *
273
- * Released under LGPL License.
274
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
275
- *
276
- * License: http://www.tinymce.com/license
277
- * Contributing: http://www.tinymce.com/contributing
278
- */
279
19
 
280
- define(
281
- 'tinymce.plugins.code.ui.Buttons',
282
- [
283
- 'tinymce.plugins.code.ui.Dialog'
284
- ],
285
- function (Dialog) {
286
- var register = function (editor) {
287
- editor.addButton('code', {
288
- icon: 'code',
289
- tooltip: 'Source code',
290
- onclick: function () {
291
- Dialog.open(editor);
292
- }
293
- });
20
+ var setContent = function (editor, html) {
21
+ editor.focus();
22
+ editor.undoManager.transact(function () {
23
+ editor.setContent(html);
24
+ });
25
+ editor.selection.setCursorLocation();
26
+ editor.nodeChanged();
27
+ };
28
+ var getContent = function (editor) {
29
+ return editor.getContent({ source_view: true });
30
+ };
31
+ var $_6f8nd4a3jm0ofy6w = {
32
+ setContent: setContent,
33
+ getContent: getContent
34
+ };
294
35
 
295
- editor.addMenuItem('code', {
296
- icon: 'code',
297
- text: 'Source code',
298
- onclick: function () {
299
- Dialog.open(editor);
300
- }
301
- });
302
- };
36
+ var open = function (editor) {
37
+ var minWidth = $_e90paoa1jm0ofy6v.getMinWidth(editor);
38
+ var minHeight = $_e90paoa1jm0ofy6v.getMinHeight(editor);
39
+ var win = editor.windowManager.open({
40
+ title: 'Source code',
41
+ body: {
42
+ type: 'textbox',
43
+ name: 'code',
44
+ multiline: true,
45
+ minWidth: minWidth,
46
+ minHeight: minHeight,
47
+ spellcheck: false,
48
+ style: 'direction: ltr; text-align: left'
49
+ },
50
+ onSubmit: function (e) {
51
+ $_6f8nd4a3jm0ofy6w.setContent(editor, e.data.code);
52
+ }
53
+ });
54
+ win.find('#code').value($_6f8nd4a3jm0ofy6w.getContent(editor));
55
+ };
56
+ var $_6ohe8ba0jm0ofy6t = { open: open };
303
57
 
304
- return {
305
- register: register
306
- };
58
+ var register = function (editor) {
59
+ editor.addCommand('mceCodeEditor', function () {
60
+ $_6ohe8ba0jm0ofy6t.open(editor);
61
+ });
62
+ };
63
+ var $_fvwfr9zjm0ofy6s = { register: register };
64
+
65
+ var register$1 = function (editor) {
66
+ editor.addButton('code', {
67
+ icon: 'code',
68
+ tooltip: 'Source code',
69
+ onclick: function () {
70
+ $_6ohe8ba0jm0ofy6t.open(editor);
71
+ }
72
+ });
73
+ editor.addMenuItem('code', {
74
+ icon: 'code',
75
+ text: 'Source code',
76
+ onclick: function () {
77
+ $_6ohe8ba0jm0ofy6t.open(editor);
78
+ }
79
+ });
80
+ };
81
+ var $_h5j0na4jm0ofy6x = { register: register$1 };
82
+
83
+ global.add('code', function (editor) {
84
+ $_fvwfr9zjm0ofy6s.register(editor);
85
+ $_h5j0na4jm0ofy6x.register(editor);
86
+ return {};
87
+ });
88
+ function Plugin () {
307
89
  }
308
- );
309
- /**
310
- * Plugin.js
311
- *
312
- * Released under LGPL License.
313
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
314
- *
315
- * License: http://www.tinymce.com/license
316
- * Contributing: http://www.tinymce.com/contributing
317
- */
318
90
 
319
- define(
320
- 'tinymce.plugins.code.Plugin',
321
- [
322
- 'tinymce.core.PluginManager',
323
- 'tinymce.plugins.code.api.Commands',
324
- 'tinymce.plugins.code.ui.Buttons'
325
- ],
326
- function (PluginManager, Commands, Buttons) {
327
- PluginManager.add('code', function (editor) {
328
- Commands.register(editor);
329
- Buttons.register(editor);
91
+ return Plugin;
330
92
 
331
- return {};
332
- });
333
-
334
- return function () { };
335
- }
336
- );
337
- dem('tinymce.plugins.code.Plugin')();
93
+ }());
338
94
  })();
@@ -1 +1 @@
1
- !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){return a("tinymce.PluginManager")}),g("8",["4"],function(a){return a("tinymce.dom.DOMUtils")}),g("6",["8"],function(a){var b=function(a){return a.getParam("code_dialog_width",600)},c=function(b){return b.getParam("code_dialog_height",Math.min(a.DOM.getViewPort().h-200,500))};return{getMinWidth:b,getMinHeight:c}}),g("7",[],function(){var a=function(a,b){a.focus(),a.undoManager.transact(function(){a.setContent(b)}),a.selection.setCursorLocation(),a.nodeChanged()},b=function(a){return a.getContent({source_view:!0})};return{setContent:a,getContent:b}}),g("5",["6","7"],function(a,b){var c=function(c){var d=a.getMinWidth(c),e=a.getMinHeight(c),f=c.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:d,minHeight:e,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(a){b.setContent(c,a.data.code)}});f.find("#code").value(b.getContent(c))};return{open:c}}),g("2",["5"],function(a){var b=function(b){b.addCommand("mceCodeEditor",function(){a.open(b)})};return{register:b}}),g("3",["5"],function(a){var b=function(b){b.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){a.open(b)}}),b.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){a.open(b)}})};return{register:b}}),g("0",["1","2","3"],function(a,b,c){return a.add("code",function(a){return b.register(a),c.register(a),{}}),function(){}}),d("0")()}();
1
+ !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(t){return t.getParam("code_dialog_width",600)},i=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},c=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},d=function(t){return t.getContent({source_view:!0})},e=function(n){var t=o(n),e=i(n);n.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:t,minHeight:e,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){c(n,t.data.code)}}).find("#code").value(d(n))},u=function(t){t.addCommand("mceCodeEditor",function(){e(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){e(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){e(t)}})};t.add("code",function(t){return u(t),a(t),{}})}();
@@ -1,1582 +1,967 @@
1
1
  (function () {
2
+ var codesample = (function () {
3
+ 'use strict';
2
4
 
3
- var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
4
-
5
- // Used when there is no 'main' module.
6
- // The name is probably (hopefully) unique so minification removes for releases.
7
- var register_3795 = function (id) {
8
- var module = dem(id);
9
- var fragments = id.split('.');
10
- var target = Function('return this;')();
11
- for (var i = 0; i < fragments.length - 1; ++i) {
12
- if (target[fragments[i]] === undefined)
13
- target[fragments[i]] = {};
14
- target = target[fragments[i]];
15
- }
16
- target[fragments[fragments.length - 1]] = module;
17
- };
18
-
19
- var instantiate = function (id) {
20
- var actual = defs[id];
21
- var dependencies = actual.deps;
22
- var definition = actual.defn;
23
- var len = dependencies.length;
24
- var instances = new Array(len);
25
- for (var i = 0; i < len; ++i)
26
- instances[i] = dem(dependencies[i]);
27
- var defResult = definition.apply(null, instances);
28
- if (defResult === undefined)
29
- throw 'module [' + id + '] returned undefined';
30
- actual.instance = defResult;
31
- };
32
-
33
- var def = function (id, dependencies, definition) {
34
- if (typeof id !== 'string')
35
- throw 'module id must be a string';
36
- else if (dependencies === undefined)
37
- throw 'no dependencies for ' + id;
38
- else if (definition === undefined)
39
- throw 'no definition function for ' + id;
40
- defs[id] = {
41
- deps: dependencies,
42
- defn: definition,
43
- instance: undefined
44
- };
45
- };
46
-
47
- var dem = function (id) {
48
- var actual = defs[id];
49
- if (actual === undefined)
50
- throw 'module [' + id + '] was undefined';
51
- else if (actual.instance === undefined)
52
- instantiate(id);
53
- return actual.instance;
54
- };
55
-
56
- var req = function (ids, callback) {
57
- var len = ids.length;
58
- var instances = new Array(len);
59
- for (var i = 0; i < len; ++i)
60
- instances[i] = dem(ids[i]);
61
- callback.apply(null, instances);
62
- };
63
-
64
- var ephox = {};
65
-
66
- ephox.bolt = {
67
- module: {
68
- api: {
69
- define: def,
70
- require: req,
71
- demand: dem
72
- }
73
- }
74
- };
75
-
76
- var define = def;
77
- var require = req;
78
- var demand = dem;
79
- // this helps with minification when using a lot of global references
80
- var defineGlobal = function (id, ref) {
81
- define(id, [], function () { return ref; });
82
- };
83
- /*jsc
84
- ["tinymce.plugins.codesample.Plugin","ephox.katamari.api.Cell","tinymce.core.PluginManager","tinymce.plugins.codesample.api.Commands","tinymce.plugins.codesample.core.FilterContent","tinymce.plugins.codesample.core.LoadCss","tinymce.plugins.codesample.ui.Buttons","tinymce.plugins.codesample.ui.Dialog","tinymce.plugins.codesample.util.Utils","global!tinymce.util.Tools.resolve","tinymce.plugins.codesample.api.Settings","tinymce.plugins.codesample.core.CodeSample","tinymce.plugins.codesample.core.Languages","tinymce.plugins.codesample.core.Prism","tinymce.core.dom.DOMUtils"]
85
- jsc*/
86
- define(
87
- 'ephox.katamari.api.Cell',
88
-
89
- [
90
- ],
91
-
92
- function () {
93
- var Cell = function (initial) {
94
- var value = initial;
95
-
96
- var get = function () {
97
- return value;
98
- };
99
-
100
- var set = function (v) {
101
- value = v;
102
- };
103
-
104
- var clone = function () {
105
- return Cell(get());
106
- };
107
-
108
- return {
109
- get: get,
110
- set: set,
111
- clone: clone
112
- };
113
- };
114
-
115
- return Cell;
116
- }
117
- );
118
-
119
- defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
120
- /**
121
- * ResolveGlobal.js
122
- *
123
- * Released under LGPL License.
124
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
125
- *
126
- * License: http://www.tinymce.com/license
127
- * Contributing: http://www.tinymce.com/contributing
128
- */
129
-
130
- define(
131
- 'tinymce.core.PluginManager',
132
- [
133
- 'global!tinymce.util.Tools.resolve'
134
- ],
135
- function (resolve) {
136
- return resolve('tinymce.PluginManager');
137
- }
138
- );
139
-
140
- /**
141
- * ResolveGlobal.js
142
- *
143
- * Released under LGPL License.
144
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
145
- *
146
- * License: http://www.tinymce.com/license
147
- * Contributing: http://www.tinymce.com/contributing
148
- */
149
-
150
- define(
151
- 'tinymce.core.dom.DOMUtils',
152
- [
153
- 'global!tinymce.util.Tools.resolve'
154
- ],
155
- function (resolve) {
156
- return resolve('tinymce.dom.DOMUtils');
157
- }
158
- );
159
-
160
- /**
161
- * Settings.js
162
- *
163
- * Released under LGPL License.
164
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
165
- *
166
- * License: http://www.tinymce.com/license
167
- * Contributing: http://www.tinymce.com/contributing
168
- */
169
-
170
- define(
171
- 'tinymce.plugins.codesample.api.Settings',
172
- [
173
- 'tinymce.core.dom.DOMUtils'
174
- ],
175
- function (DOMUtils) {
176
- var getContentCss = function (editor) {
177
- return editor.settings.codesample_content_css;
178
- };
179
-
180
- var getLanguages = function (editor) {
181
- return editor.settings.codesample_languages;
5
+ var Cell = function (initial) {
6
+ var value = initial;
7
+ var get = function () {
8
+ return value;
182
9
  };
183
-
184
- var getDialogMinWidth = function (editor) {
185
- return Math.min(DOMUtils.DOM.getViewPort().w, editor.getParam('codesample_dialog_width', 800));
10
+ var set = function (v) {
11
+ value = v;
186
12
  };
187
-
188
- var getDialogMinHeight = function (editor) {
189
- return Math.min(DOMUtils.DOM.getViewPort().w, editor.getParam('codesample_dialog_height', 650));
13
+ var clone = function () {
14
+ return Cell(get());
190
15
  };
191
-
192
16
  return {
193
- getContentCss: getContentCss,
194
- getLanguages: getLanguages,
195
- getDialogMinWidth: getDialogMinWidth,
196
- getDialogMinHeight: getDialogMinHeight
17
+ get: get,
18
+ set: set,
19
+ clone: clone
197
20
  };
198
- }
199
- );
200
- /**
201
- * Prism.js
202
- *
203
- * Released under LGPL License.
204
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
205
- *
206
- * License: http://www.tinymce.com/license
207
- * Contributing: http://www.tinymce.com/contributing
208
- *
209
- * Import of prism. Disabled DOMContentLoaded event listener.
210
- */
211
-
212
- /*eslint-disable*/
213
-
214
- define(
215
- 'tinymce.plugins.codesample.core.Prism',
216
- [
217
- ],
218
- function () {
219
- var window = {};
220
- // ------------------ Start wrap
221
-
222
- /* http://prismjs.com/download.html?themes=prism-dark&languages=markup+css+clike+javascript+c+csharp+cpp+java+php+python+ruby */
223
- var _self = (typeof window !== 'undefined')
224
- ? window // if in browser
225
- : (
226
- (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
227
- ? self // if in worker
228
- : {} // if in node js
229
- );
230
-
231
- /**
232
- * Prism: Lightweight, robust, elegant syntax highlighting
233
- * MIT license http://www.opensource.org/licenses/mit-license.php/
234
- * @author Lea Verou http://lea.verou.me
235
- */
236
-
237
- var Prism = (function () {
238
-
239
- // Private helper vars
240
- var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i;
241
-
242
- var _ = _self.Prism = {
243
- util: {
244
- encode: function (tokens) {
245
- if (tokens instanceof Token) {
246
- return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias);
247
- } else if (_.util.type(tokens) === 'Array') {
248
- return tokens.map(_.util.encode);
249
- } else {
250
- return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
251
- }
252
- },
253
-
254
- type: function (o) {
255
- return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
256
- },
257
-
258
- // Deep clone a language definition (e.g. to extend it)
259
- clone: function (o) {
260
- var type = _.util.type(o);
261
-
262
- switch (type) {
263
- case 'Object':
264
- var clone = {};
21
+ };
265
22
 
266
- for (var key in o) {
267
- if (o.hasOwnProperty(key)) {
268
- clone[key] = _.util.clone(o[key]);
269
- }
270
- }
23
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
271
24
 
272
- return clone;
25
+ var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
273
26
 
274
- case 'Array':
275
- // Check for existence for IE8
276
- return o.map && o.map(function (v) { return _.util.clone(v); });
277
- }
27
+ var getContentCss = function (editor) {
28
+ return editor.settings.codesample_content_css;
29
+ };
30
+ var getLanguages = function (editor) {
31
+ return editor.settings.codesample_languages;
32
+ };
33
+ var getDialogMinWidth = function (editor) {
34
+ return Math.min(global$1.DOM.getViewPort().w, editor.getParam('codesample_dialog_width', 800));
35
+ };
36
+ var getDialogMinHeight = function (editor) {
37
+ return Math.min(global$1.DOM.getViewPort().w, editor.getParam('codesample_dialog_height', 650));
38
+ };
39
+ var $_6tgxjgaajm0ofy7e = {
40
+ getContentCss: getContentCss,
41
+ getLanguages: getLanguages,
42
+ getDialogMinWidth: getDialogMinWidth,
43
+ getDialogMinHeight: getDialogMinHeight
44
+ };
278
45
 
279
- return o;
46
+ var window$$1 = {};
47
+ var global$2 = window$$1;
48
+ var _self = typeof window$$1 !== 'undefined' ? window$$1 : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self : {};
49
+ var Prism = function () {
50
+ var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i;
51
+ var _ = _self.Prism = {
52
+ util: {
53
+ encode: function (tokens) {
54
+ if (tokens instanceof Token) {
55
+ return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias);
56
+ } else if (_.util.type(tokens) === 'Array') {
57
+ return tokens.map(_.util.encode);
58
+ } else {
59
+ return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
280
60
  }
281
61
  },
282
-
283
- languages: {
284
- extend: function (id, redef) {
285
- var lang = _.util.clone(_.languages[id]);
286
-
287
- for (var key in redef) {
288
- lang[key] = redef[key];
289
- }
290
-
291
- return lang;
292
- },
293
-
294
- /**
295
- * Insert a token before another token in a language literal
296
- * As this needs to recreate the object (we cannot actually insert before keys in object literals),
297
- * we cannot just provide an object, we need anobject and a key.
298
- * @param inside The key (or language id) of the parent
299
- * @param before The key to insert before. If not provided, the function appends instead.
300
- * @param insert Object with the key/value pairs to insert
301
- * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted.
302
- */
303
- insertBefore: function (inside, before, insert, root) {
304
- root = root || _.languages;
305
- var grammar = root[inside];
306
-
307
- if (arguments.length == 2) {
308
- insert = arguments[1];
309
-
310
- for (var newToken in insert) {
311
- if (insert.hasOwnProperty(newToken)) {
312
- grammar[newToken] = insert[newToken];
313
- }
62
+ type: function (o) {
63
+ return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
64
+ },
65
+ clone: function (o) {
66
+ var type = _.util.type(o);
67
+ switch (type) {
68
+ case 'Object':
69
+ var clone = {};
70
+ for (var key in o) {
71
+ if (o.hasOwnProperty(key)) {
72
+ clone[key] = _.util.clone(o[key]);
314
73
  }
315
-
316
- return grammar;
317
74
  }
318
-
319
- var ret = {};
320
-
321
- for (var token in grammar) {
322
-
323
- if (grammar.hasOwnProperty(token)) {
324
-
325
- if (token == before) {
326
-
327
- for (var newToken in insert) {
328
-
329
- if (insert.hasOwnProperty(newToken)) {
330
- ret[newToken] = insert[newToken];
331
- }
332
- }
333
- }
334
-
335
- ret[token] = grammar[token];
75
+ return clone;
76
+ case 'Array':
77
+ return o.map && o.map(function (v) {
78
+ return _.util.clone(v);
79
+ });
80
+ }
81
+ return o;
82
+ }
83
+ },
84
+ languages: {
85
+ extend: function (id, redef) {
86
+ var lang = _.util.clone(_.languages[id]);
87
+ for (var key in redef) {
88
+ lang[key] = redef[key];
89
+ }
90
+ return lang;
91
+ },
92
+ insertBefore: function (inside, before, insert, root) {
93
+ root = root || _.languages;
94
+ var grammar = root[inside];
95
+ if (arguments.length === 2) {
96
+ insert = arguments[1];
97
+ for (var newToken in insert) {
98
+ if (insert.hasOwnProperty(newToken)) {
99
+ grammar[newToken] = insert[newToken];
336
100
  }
337
101
  }
338
-
339
- // Update references in other language definitions
340
- _.languages.DFS(_.languages, function (key, value) {
341
- if (value === root[inside] && key != inside) {
342
- this[key] = ret;
343
- }
344
- });
345
-
346
- return root[inside] = ret;
347
- },
348
-
349
- // Traverse a language definition with Depth First Search
350
- DFS: function (o, callback, type) {
351
- for (var i in o) {
352
- if (o.hasOwnProperty(i)) {
353
- callback.call(o, i, o[i], type || i);
354
-
355
- if (_.util.type(o[i]) === 'Object') {
356
- _.languages.DFS(o[i], callback);
357
- }
358
- else if (_.util.type(o[i]) === 'Array') {
359
- _.languages.DFS(o[i], callback, i);
102
+ return grammar;
103
+ }
104
+ var ret = {};
105
+ for (var token in grammar) {
106
+ if (grammar.hasOwnProperty(token)) {
107
+ if (token === before) {
108
+ for (var newToken in insert) {
109
+ if (insert.hasOwnProperty(newToken)) {
110
+ ret[newToken] = insert[newToken];
111
+ }
360
112
  }
361
113
  }
114
+ ret[token] = grammar[token];
362
115
  }
363
116
  }
117
+ _.languages.DFS(_.languages, function (key, value) {
118
+ if (value === root[inside] && key !== inside) {
119
+ this[key] = ret;
120
+ }
121
+ });
122
+ return root[inside] = ret;
364
123
  },
365
- plugins: {},
366
-
367
- highlightAll: function (async, callback) {
368
- var elements = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
369
-
370
- for (var i = 0, element; element = elements[i++];) {
371
- _.highlightElement(element, async === true, callback);
372
- }
373
- },
374
-
375
- highlightElement: function (element, async, callback) {
376
- // Find language
377
- var language, grammar, parent = element;
378
-
379
- while (parent && !lang.test(parent.className)) {
380
- parent = parent.parentNode;
381
- }
382
-
383
- if (parent) {
384
- language = (parent.className.match(lang) || [, ''])[1];
385
- grammar = _.languages[language];
386
- }
387
-
388
- // Set language on the element, if not present
389
- element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
390
-
391
- // Set language on the parent, for styling
392
- parent = element.parentNode;
393
-
394
- if (/pre/i.test(parent.nodeName)) {
395
- parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
396
- }
397
-
398
- var code = element.textContent;
399
-
400
- var env = {
401
- element: element,
402
- language: language,
403
- grammar: grammar,
404
- code: code
405
- };
406
-
407
- if (!code || !grammar) {
408
- _.hooks.run('complete', env);
409
- return;
410
- }
411
-
412
- _.hooks.run('before-highlight', env);
413
-
414
- if (async && _self.Worker) {
415
- var worker = new Worker(_.filename);
416
-
417
- worker.onmessage = function (evt) {
418
- env.highlightedCode = evt.data;
419
-
420
- _.hooks.run('before-insert', env);
421
-
422
- env.element.innerHTML = env.highlightedCode;
423
-
424
- callback && callback.call(env.element);
425
- _.hooks.run('after-highlight', env);
426
- _.hooks.run('complete', env);
427
- };
428
-
429
- worker.postMessage(JSON.stringify({
430
- language: env.language,
431
- code: env.code,
432
- immediateClose: true
433
- }));
124
+ DFS: function (o, callback, type) {
125
+ for (var i in o) {
126
+ if (o.hasOwnProperty(i)) {
127
+ callback.call(o, i, o[i], type || i);
128
+ if (_.util.type(o[i]) === 'Object') {
129
+ _.languages.DFS(o[i], callback);
130
+ } else if (_.util.type(o[i]) === 'Array') {
131
+ _.languages.DFS(o[i], callback, i);
132
+ }
133
+ }
434
134
  }
435
- else {
436
- env.highlightedCode = _.highlight(env.code, env.grammar, env.language);
437
-
135
+ }
136
+ },
137
+ plugins: {},
138
+ highlightAll: function (async, callback) {
139
+ var elements = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
140
+ for (var i = 0, element = void 0; element = elements[i++];) {
141
+ _.highlightElement(element, async === true, callback);
142
+ }
143
+ },
144
+ highlightElement: function (element, async, callback) {
145
+ var language, grammar, parent$$1 = element;
146
+ while (parent$$1 && !lang.test(parent$$1.className)) {
147
+ parent$$1 = parent$$1.parentNode;
148
+ }
149
+ if (parent$$1) {
150
+ language = (parent$$1.className.match(lang) || [
151
+ ,
152
+ ''
153
+ ])[1];
154
+ grammar = _.languages[language];
155
+ }
156
+ element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
157
+ parent$$1 = element.parentNode;
158
+ if (/pre/i.test(parent$$1.nodeName)) {
159
+ parent$$1.className = parent$$1.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
160
+ }
161
+ var code = element.textContent;
162
+ var env = {
163
+ element: element,
164
+ language: language,
165
+ grammar: grammar,
166
+ code: code
167
+ };
168
+ if (!code || !grammar) {
169
+ _.hooks.run('complete', env);
170
+ return;
171
+ }
172
+ _.hooks.run('before-highlight', env);
173
+ if (async && _self.Worker) {
174
+ var worker = new Worker(_.filename);
175
+ worker.onmessage = function (evt) {
176
+ env.highlightedCode = evt.data;
438
177
  _.hooks.run('before-insert', env);
439
-
440
178
  env.element.innerHTML = env.highlightedCode;
441
-
442
- callback && callback.call(element);
443
-
179
+ if (callback) {
180
+ callback.call(env.element);
181
+ }
444
182
  _.hooks.run('after-highlight', env);
445
183
  _.hooks.run('complete', env);
184
+ };
185
+ worker.postMessage(JSON.stringify({
186
+ language: env.language,
187
+ code: env.code,
188
+ immediateClose: true
189
+ }));
190
+ } else {
191
+ env.highlightedCode = _.highlight(env.code, env.grammar, env.language);
192
+ _.hooks.run('before-insert', env);
193
+ env.element.innerHTML = env.highlightedCode;
194
+ if (callback) {
195
+ callback.call(element);
446
196
  }
447
- },
448
-
449
- highlight: function (text, grammar, language) {
450
- var tokens = _.tokenize(text, grammar);
451
- return Token.stringify(_.util.encode(tokens), language);
452
- },
453
-
454
- tokenize: function (text, grammar, language) {
455
- var Token = _.Token;
456
-
457
- var strarr = [text];
458
-
459
- var rest = grammar.rest;
460
-
461
- if (rest) {
462
- for (var token in rest) {
463
- grammar[token] = rest[token];
464
- }
465
-
466
- delete grammar.rest;
197
+ _.hooks.run('after-highlight', env);
198
+ _.hooks.run('complete', env);
199
+ }
200
+ },
201
+ highlight: function (text, grammar, language) {
202
+ var tokens = _.tokenize(text, grammar);
203
+ return Token.stringify(_.util.encode(tokens), language);
204
+ },
205
+ tokenize: function (text, grammar, language) {
206
+ var Token = _.Token;
207
+ var strarr = [text];
208
+ var rest = grammar.rest;
209
+ if (rest) {
210
+ for (var token in rest) {
211
+ grammar[token] = rest[token];
467
212
  }
468
-
469
- tokenloop: for (var token in grammar) {
213
+ delete grammar.rest;
214
+ }
215
+ tokenloop:
216
+ for (var token in grammar) {
470
217
  if (!grammar.hasOwnProperty(token) || !grammar[token]) {
471
218
  continue;
472
219
  }
473
-
474
220
  var patterns = grammar[token];
475
- patterns = (_.util.type(patterns) === "Array") ? patterns : [patterns];
476
-
221
+ patterns = _.util.type(patterns) === 'Array' ? patterns : [patterns];
477
222
  for (var j = 0; j < patterns.length; ++j) {
478
- var pattern = patterns[j],
479
- inside = pattern.inside,
480
- lookbehind = !!pattern.lookbehind,
481
- lookbehindLength = 0,
482
- alias = pattern.alias;
483
-
223
+ var pattern = patterns[j];
224
+ var inside = pattern.inside;
225
+ var lookbehind = !!pattern.lookbehind;
226
+ var lookbehindLength = 0;
227
+ var alias = pattern.alias;
484
228
  pattern = pattern.pattern || pattern;
485
-
486
- for (var i = 0; i < strarr.length; i++) { // Don’t cache length as it changes during the loop
487
-
229
+ for (var i = 0; i < strarr.length; i++) {
488
230
  var str = strarr[i];
489
-
490
231
  if (strarr.length > text.length) {
491
- // Something went terribly wrong, ABORT, ABORT!
492
232
  break tokenloop;
493
233
  }
494
-
495
234
  if (str instanceof Token) {
496
235
  continue;
497
236
  }
498
-
499
237
  pattern.lastIndex = 0;
500
-
501
238
  var match = pattern.exec(str);
502
-
503
239
  if (match) {
504
240
  if (lookbehind) {
505
241
  lookbehindLength = match[1].length;
506
242
  }
507
-
508
- var from = match.index - 1 + lookbehindLength,
509
- match = match[0].slice(lookbehindLength),
510
- len = match.length,
511
- to = from + len,
512
- before = str.slice(0, from + 1),
513
- after = str.slice(to + 1);
514
-
515
- var args = [i, 1];
516
-
243
+ var from = match.index - 1 + lookbehindLength;
244
+ match = match[0].slice(lookbehindLength);
245
+ var len = match.length, to = from + len, before = str.slice(0, from + 1), after = str.slice(to + 1);
246
+ var args = [
247
+ i,
248
+ 1
249
+ ];
517
250
  if (before) {
518
251
  args.push(before);
519
252
  }
520
-
521
253
  var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias);
522
-
523
254
  args.push(wrapped);
524
-
525
255
  if (after) {
526
256
  args.push(after);
527
257
  }
528
-
529
258
  Array.prototype.splice.apply(strarr, args);
530
259
  }
531
260
  }
532
261
  }
533
262
  }
534
-
535
- return strarr;
263
+ return strarr;
264
+ },
265
+ hooks: {
266
+ all: {},
267
+ add: function (name$$1, callback) {
268
+ var hooks = _.hooks.all;
269
+ hooks[name$$1] = hooks[name$$1] || [];
270
+ hooks[name$$1].push(callback);
536
271
  },
537
-
538
- hooks: {
539
- all: {},
540
-
541
- add: function (name, callback) {
542
- var hooks = _.hooks.all;
543
-
544
- hooks[name] = hooks[name] || [];
545
-
546
- hooks[name].push(callback);
547
- },
548
-
549
- run: function (name, env) {
550
- var callbacks = _.hooks.all[name];
551
-
552
- if (!callbacks || !callbacks.length) {
553
- return;
554
- }
555
-
556
- for (var i = 0, callback; callback = callbacks[i++];) {
557
- callback(env);
558
- }
272
+ run: function (name$$1, env) {
273
+ var callbacks = _.hooks.all[name$$1];
274
+ if (!callbacks || !callbacks.length) {
275
+ return;
276
+ }
277
+ for (var i = 0, callback = void 0; callback = callbacks[i++];) {
278
+ callback(env);
559
279
  }
560
280
  }
281
+ }
282
+ };
283
+ var Token = _.Token = function (type, content, alias) {
284
+ this.type = type;
285
+ this.content = content;
286
+ this.alias = alias;
287
+ };
288
+ Token.stringify = function (o, language, parent$$1) {
289
+ if (typeof o === 'string') {
290
+ return o;
291
+ }
292
+ if (_.util.type(o) === 'Array') {
293
+ return o.map(function (element) {
294
+ return Token.stringify(element, language, o);
295
+ }).join('');
296
+ }
297
+ var env = {
298
+ type: o.type,
299
+ content: Token.stringify(o.content, language, parent$$1),
300
+ tag: 'span',
301
+ classes: [
302
+ 'token',
303
+ o.type
304
+ ],
305
+ attributes: {},
306
+ language: language,
307
+ parent: parent$$1
561
308
  };
562
-
563
- var Token = _.Token = function (type, content, alias) {
564
- this.type = type;
565
- this.content = content;
566
- this.alias = alias;
567
- };
568
-
569
- Token.stringify = function (o, language, parent) {
570
- if (typeof o == 'string') {
571
- return o;
572
- }
573
-
574
- if (_.util.type(o) === 'Array') {
575
- return o.map(function (element) {
576
- return Token.stringify(element, language, o);
577
- }).join('');
578
- }
579
-
580
- var env = {
581
- type: o.type,
582
- content: Token.stringify(o.content, language, parent),
583
- tag: 'span',
584
- classes: ['token', o.type],
585
- attributes: {},
586
- language: language,
587
- parent: parent
588
- };
589
-
590
- if (env.type == 'comment') {
591
- env.attributes['spellcheck'] = 'true';
592
- }
593
-
594
- if (o.alias) {
595
- var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias];
596
- Array.prototype.push.apply(env.classes, aliases);
597
- }
598
-
599
- _.hooks.run('wrap', env);
600
-
601
- var attributes = '';
602
-
603
- for (var name in env.attributes) {
604
- attributes += (attributes ? ' ' : '') + name + '="' + (env.attributes[name] || '') + '"';
605
- }
606
-
607
- return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>';
608
-
609
- };
610
-
611
- if (!_self.document) {
612
- if (!_self.addEventListener) {
613
- // in Node.js
614
- return _self.Prism;
615
- }
616
- // In worker
617
- _self.addEventListener('message', function (evt) {
618
- var message = JSON.parse(evt.data),
619
- lang = message.language,
620
- code = message.code,
621
- immediateClose = message.immediateClose;
622
-
623
- _self.postMessage(_.highlight(code, _.languages[lang], lang));
624
- if (immediateClose) {
625
- _self.close();
626
- }
627
- }, false);
628
-
309
+ if (env.type === 'comment') {
310
+ env.attributes.spellcheck = 'true';
311
+ }
312
+ if (o.alias) {
313
+ var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias];
314
+ Array.prototype.push.apply(env.classes, aliases);
315
+ }
316
+ _.hooks.run('wrap', env);
317
+ var attributes = '';
318
+ for (var name$$1 in env.attributes) {
319
+ attributes += (attributes ? ' ' : '') + name$$1 + '="' + (env.attributes[name$$1] || '') + '"';
320
+ }
321
+ return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>';
322
+ };
323
+ if (!_self.document) {
324
+ if (!_self.addEventListener) {
629
325
  return _self.Prism;
630
326
  }
631
- /*
632
- // Get current script and highlight
633
- var script = document.getElementsByTagName('script');
634
-
635
- script = script[script.length - 1];
636
-
637
- if (script) {
638
- _.filename = script.src;
639
-
640
- if (document.addEventListener && !script.hasAttribute('data-manual')) {
641
- document.addEventListener('DOMContentLoaded', _.highlightAll);
327
+ _self.addEventListener('message', function (evt) {
328
+ var message = JSON.parse(evt.data), lang = message.language, code = message.code, immediateClose = message.immediateClose;
329
+ _self.postMessage(_.highlight(code, _.languages[lang], lang));
330
+ if (immediateClose) {
331
+ _self.close();
642
332
  }
643
- }
644
-
333
+ }, false);
645
334
  return _self.Prism;
646
- */
647
- })();
648
-
649
- if (typeof module !== 'undefined' && module.exports) {
650
- module.exports = Prism;
651
335
  }
652
-
653
- // hack for components to work correctly in node.js
654
- if (typeof global !== 'undefined') {
655
- global.Prism = Prism;
336
+ }();
337
+ if (typeof global$2 !== 'undefined') {
338
+ global$2.Prism = Prism;
339
+ }
340
+ Prism.languages.markup = {
341
+ comment: /<!--[\w\W]*?-->/,
342
+ prolog: /<\?[\w\W]+?\?>/,
343
+ doctype: /<!DOCTYPE[\w\W]+?>/,
344
+ cdata: /<!\[CDATA\[[\w\W]*?]]>/i,
345
+ tag: {
346
+ pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,
347
+ inside: {
348
+ 'tag': {
349
+ pattern: /^<\/?[^\s>\/]+/i,
350
+ inside: {
351
+ punctuation: /^<\/?/,
352
+ namespace: /^[^\s>\/:]+:/
353
+ }
354
+ },
355
+ 'attr-value': {
356
+ pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,
357
+ inside: { punctuation: /[=>"']/ }
358
+ },
359
+ 'punctuation': /\/?>/,
360
+ 'attr-name': {
361
+ pattern: /[^\s>\/]+/,
362
+ inside: { namespace: /^[^\s>\/:]+:/ }
363
+ }
364
+ }
365
+ },
366
+ entity: /&#?[\da-z]{1,8};/i
367
+ };
368
+ Prism.hooks.add('wrap', function (env) {
369
+ if (env.type === 'entity') {
370
+ env.attributes.title = env.content.replace(/&amp;/, '&');
656
371
  }
657
- ;
658
- Prism.languages.markup = {
659
- 'comment': /<!--[\w\W]*?-->/,
660
- 'prolog': /<\?[\w\W]+?\?>/,
661
- 'doctype': /<!DOCTYPE[\w\W]+?>/,
662
- 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i,
663
- 'tag': {
664
- pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,
372
+ });
373
+ Prism.languages.xml = Prism.languages.markup;
374
+ Prism.languages.html = Prism.languages.markup;
375
+ Prism.languages.mathml = Prism.languages.markup;
376
+ Prism.languages.svg = Prism.languages.markup;
377
+ Prism.languages.css = {
378
+ comment: /\/\*[\w\W]*?\*\//,
379
+ atrule: {
380
+ pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
381
+ inside: { rule: /@[\w-]+/ }
382
+ },
383
+ url: /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
384
+ selector: /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
385
+ string: /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,
386
+ property: /(\b|\B)[\w-]+(?=\s*:)/i,
387
+ important: /\B!important\b/i,
388
+ function: /[-a-z0-9]+(?=\()/i,
389
+ punctuation: /[(){};:]/
390
+ };
391
+ Prism.languages.css.atrule.inside.rest = Prism.util.clone(Prism.languages.css);
392
+ if (Prism.languages.markup) {
393
+ Prism.languages.insertBefore('markup', 'tag', {
394
+ style: {
395
+ pattern: /<style[\w\W]*?>[\w\W]*?<\/style>/i,
665
396
  inside: {
666
- 'tag': {
667
- pattern: /^<\/?[^\s>\/]+/i,
668
- inside: {
669
- 'punctuation': /^<\/?/,
670
- 'namespace': /^[^\s>\/:]+:/
671
- }
672
- },
673
- 'attr-value': {
674
- pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,
675
- inside: {
676
- 'punctuation': /[=>"']/
677
- }
397
+ tag: {
398
+ pattern: /<style[\w\W]*?>|<\/style>/i,
399
+ inside: Prism.languages.markup.tag.inside
678
400
  },
679
- 'punctuation': /\/?>/,
401
+ rest: Prism.languages.css
402
+ },
403
+ alias: 'language-css'
404
+ }
405
+ });
406
+ Prism.languages.insertBefore('inside', 'attr-value', {
407
+ 'style-attr': {
408
+ pattern: /\s*style=("|').*?\1/i,
409
+ inside: {
680
410
  'attr-name': {
681
- pattern: /[^\s>\/]+/,
682
- inside: {
683
- 'namespace': /^[^\s>\/:]+:/
684
- }
685
- }
686
-
687
- }
688
- },
689
- 'entity': /&#?[\da-z]{1,8};/i
690
- };
691
-
692
- // Plugin to make entity title show the real entity, idea by Roman Komarov
693
- Prism.hooks.add('wrap', function (env) {
694
-
695
- if (env.type === 'entity') {
696
- env.attributes['title'] = env.content.replace(/&amp;/, '&');
411
+ pattern: /^\s*style/i,
412
+ inside: Prism.languages.markup.tag.inside
413
+ },
414
+ 'punctuation': /^\s*=\s*['"]|['"]\s*$/,
415
+ 'attr-value': {
416
+ pattern: /.+/i,
417
+ inside: Prism.languages.css
418
+ }
419
+ },
420
+ alias: 'language-css'
697
421
  }
698
- });
699
-
700
- Prism.languages.xml = Prism.languages.markup;
701
- Prism.languages.html = Prism.languages.markup;
702
- Prism.languages.mathml = Prism.languages.markup;
703
- Prism.languages.svg = Prism.languages.markup;
704
-
705
- Prism.languages.css = {
706
- 'comment': /\/\*[\w\W]*?\*\//,
707
- 'atrule': {
708
- pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
709
- inside: {
710
- 'rule': /@[\w-]+/
711
- // See rest below
712
- }
422
+ }, Prism.languages.markup.tag);
423
+ }
424
+ Prism.languages.clike = {
425
+ 'comment': [
426
+ {
427
+ pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
428
+ lookbehind: true
713
429
  },
714
- 'url': /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
715
- 'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
716
- 'string': /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,
717
- 'property': /(\b|\B)[\w-]+(?=\s*:)/i,
718
- 'important': /\B!important\b/i,
719
- 'function': /[-a-z0-9]+(?=\()/i,
720
- 'punctuation': /[(){};:]/
721
- };
722
-
723
- Prism.languages.css['atrule'].inside.rest = Prism.util.clone(Prism.languages.css);
724
-
725
- if (Prism.languages.markup) {
726
- Prism.languages.insertBefore('markup', 'tag', {
727
- 'style': {
728
- pattern: /<style[\w\W]*?>[\w\W]*?<\/style>/i,
729
- inside: {
730
- 'tag': {
731
- pattern: /<style[\w\W]*?>|<\/style>/i,
732
- inside: Prism.languages.markup.tag.inside
733
- },
734
- rest: Prism.languages.css
735
- },
736
- alias: 'language-css'
737
- }
738
- });
739
-
740
- Prism.languages.insertBefore('inside', 'attr-value', {
741
- 'style-attr': {
742
- pattern: /\s*style=("|').*?\1/i,
430
+ {
431
+ pattern: /(^|[^\\:])\/\/.*/,
432
+ lookbehind: true
433
+ }
434
+ ],
435
+ 'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
436
+ 'class-name': {
437
+ pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
438
+ lookbehind: true,
439
+ inside: { punctuation: /(\.|\\)/ }
440
+ },
441
+ 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
442
+ 'boolean': /\b(true|false)\b/,
443
+ 'function': /[a-z0-9_]+(?=\()/i,
444
+ 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
445
+ 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
446
+ 'punctuation': /[{}[\];(),.:]/
447
+ };
448
+ Prism.languages.javascript = Prism.languages.extend('clike', {
449
+ keyword: /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|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|true|try|typeof|var|void|while|with|yield)\b/,
450
+ number: /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,
451
+ function: /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i
452
+ });
453
+ Prism.languages.insertBefore('javascript', 'keyword', {
454
+ regex: {
455
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,
456
+ lookbehind: true
457
+ }
458
+ });
459
+ Prism.languages.insertBefore('javascript', 'class-name', {
460
+ 'template-string': {
461
+ pattern: /`(?:\\`|\\?[^`])*`/,
462
+ inside: {
463
+ interpolation: {
464
+ pattern: /\$\{[^}]+\}/,
743
465
  inside: {
744
- 'attr-name': {
745
- pattern: /^\s*style/i,
746
- inside: Prism.languages.markup.tag.inside
466
+ 'interpolation-punctuation': {
467
+ pattern: /^\$\{|\}$/,
468
+ alias: 'punctuation'
747
469
  },
748
- 'punctuation': /^\s*=\s*['"]|['"]\s*$/,
749
- 'attr-value': {
750
- pattern: /.+/i,
751
- inside: Prism.languages.css
752
- }
753
- },
754
- alias: 'language-css'
755
- }
756
- }, Prism.languages.markup.tag);
757
- };
758
- Prism.languages.clike = {
759
- 'comment': [
760
- {
761
- pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
762
- lookbehind: true
470
+ 'rest': Prism.languages.javascript
471
+ }
763
472
  },
764
- {
765
- pattern: /(^|[^\\:])\/\/.*/,
766
- lookbehind: true
767
- }
768
- ],
769
- 'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
770
- 'class-name': {
771
- pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
772
- lookbehind: true,
773
- inside: {
774
- punctuation: /(\.|\\)/
775
- }
776
- },
777
- 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
778
- 'boolean': /\b(true|false)\b/,
779
- 'function': /[a-z0-9_]+(?=\()/i,
780
- 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
781
- 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
782
- 'punctuation': /[{}[\];(),.:]/
783
- };
784
-
785
- Prism.languages.javascript = Prism.languages.extend('clike', {
786
- 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|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|true|try|typeof|var|void|while|with|yield)\b/,
787
- 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,
788
- // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
789
- 'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i
790
- });
791
-
792
- Prism.languages.insertBefore('javascript', 'keyword', {
793
- 'regex': {
794
- pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,
795
- lookbehind: true
473
+ string: /[\s\S]+/
796
474
  }
797
- });
798
-
799
- Prism.languages.insertBefore('javascript', 'class-name', {
800
- 'template-string': {
801
- pattern: /`(?:\\`|\\?[^`])*`/,
475
+ }
476
+ });
477
+ if (Prism.languages.markup) {
478
+ Prism.languages.insertBefore('markup', 'tag', {
479
+ script: {
480
+ pattern: /<script[\w\W]*?>[\w\W]*?<\/script>/i,
802
481
  inside: {
803
- 'interpolation': {
804
- pattern: /\$\{[^}]+\}/,
805
- inside: {
806
- 'interpolation-punctuation': {
807
- pattern: /^\$\{|\}$/,
808
- alias: 'punctuation'
809
- },
810
- rest: Prism.languages.javascript
811
- }
482
+ tag: {
483
+ pattern: /<script[\w\W]*?>|<\/script>/i,
484
+ inside: Prism.languages.markup.tag.inside
812
485
  },
813
- 'string': /[\s\S]+/
814
- }
486
+ rest: Prism.languages.javascript
487
+ },
488
+ alias: 'language-javascript'
815
489
  }
816
490
  });
817
-
818
- if (Prism.languages.markup) {
819
- Prism.languages.insertBefore('markup', 'tag', {
820
- 'script': {
821
- pattern: /<script[\w\W]*?>[\w\W]*?<\/script>/i,
822
- inside: {
823
- 'tag': {
824
- pattern: /<script[\w\W]*?>|<\/script>/i,
825
- inside: Prism.languages.markup.tag.inside
826
- },
827
- rest: Prism.languages.javascript
828
- },
829
- alias: 'language-javascript'
830
- }
831
- });
832
- }
833
-
834
- Prism.languages.js = Prism.languages.javascript;
835
- Prism.languages.c = Prism.languages.extend('clike', {
836
- 'keyword': /\b(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/,
837
- 'operator': /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,
838
- 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i
839
- });
840
-
841
- Prism.languages.insertBefore('c', 'string', {
842
- 'macro': {
843
- // allow for multiline macro definitions
844
- // spaces after the # character compile fine with gcc
845
- pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,
846
- lookbehind: true,
847
- alias: 'property',
848
- inside: {
849
- // highlight the path of the include statement as a string
850
- 'string': {
851
- pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,
852
- lookbehind: true
853
- }
491
+ }
492
+ Prism.languages.js = Prism.languages.javascript;
493
+ Prism.languages.c = Prism.languages.extend('clike', {
494
+ keyword: /\b(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/,
495
+ operator: /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,
496
+ number: /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i
497
+ });
498
+ Prism.languages.insertBefore('c', 'string', {
499
+ macro: {
500
+ pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,
501
+ lookbehind: true,
502
+ alias: 'property',
503
+ inside: {
504
+ string: {
505
+ pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,
506
+ lookbehind: true
854
507
  }
855
508
  }
856
- });
857
-
858
- delete Prism.languages.c['class-name'];
859
- delete Prism.languages.c['boolean'];
860
-
861
- Prism.languages.csharp = Prism.languages.extend('clike', {
862
- 'keyword': /\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,
863
- 'string': [
864
- /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,
865
- /("|')(\\?.)*?\1/
866
- ],
867
- 'number': /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i
868
- });
869
-
870
- Prism.languages.insertBefore('csharp', 'keyword', {
871
- 'preprocessor': {
872
- pattern: /(^\s*)#.*/m,
873
- lookbehind: true
509
+ }
510
+ });
511
+ delete Prism.languages.c['class-name'];
512
+ delete Prism.languages.c.boolean;
513
+ Prism.languages.csharp = Prism.languages.extend('clike', {
514
+ keyword: /\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,
515
+ string: [
516
+ /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,
517
+ /("|')(\\?.)*?\1/
518
+ ],
519
+ number: /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i
520
+ });
521
+ Prism.languages.insertBefore('csharp', 'keyword', {
522
+ preprocessor: {
523
+ pattern: /(^\s*)#.*/m,
524
+ lookbehind: true
525
+ }
526
+ });
527
+ Prism.languages.cpp = Prism.languages.extend('c', {
528
+ keyword: /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|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/,
529
+ boolean: /\b(true|false)\b/,
530
+ operator: /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/
531
+ });
532
+ Prism.languages.insertBefore('cpp', 'keyword', {
533
+ 'class-name': {
534
+ pattern: /(class\s+)[a-z0-9_]+/i,
535
+ lookbehind: true
536
+ }
537
+ });
538
+ Prism.languages.java = Prism.languages.extend('clike', {
539
+ keyword: /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,
540
+ number: /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,
541
+ operator: {
542
+ pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,
543
+ lookbehind: true
544
+ }
545
+ });
546
+ Prism.languages.php = Prism.languages.extend('clike', {
547
+ keyword: /\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,
548
+ constant: /\b[A-Z0-9_]{2,}\b/,
549
+ comment: {
550
+ pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,
551
+ lookbehind: true
552
+ }
553
+ });
554
+ Prism.languages.insertBefore('php', 'class-name', {
555
+ 'shell-comment': {
556
+ pattern: /(^|[^\\])#.*/,
557
+ lookbehind: true,
558
+ alias: 'comment'
559
+ }
560
+ });
561
+ Prism.languages.insertBefore('php', 'keyword', {
562
+ delimiter: /\?>|<\?(?:php)?/i,
563
+ variable: /\$\w+\b/i,
564
+ package: {
565
+ pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
566
+ lookbehind: true,
567
+ inside: { punctuation: /\\/ }
568
+ }
569
+ });
570
+ Prism.languages.insertBefore('php', 'operator', {
571
+ property: {
572
+ pattern: /(->)[\w]+/,
573
+ lookbehind: true
574
+ }
575
+ });
576
+ if (Prism.languages.markup) {
577
+ Prism.hooks.add('before-highlight', function (env) {
578
+ if (env.language !== 'php') {
579
+ return;
874
580
  }
581
+ env.tokenStack = [];
582
+ env.backupCode = env.code;
583
+ env.code = env.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig, function (match) {
584
+ env.tokenStack.push(match);
585
+ return '{{{PHP' + env.tokenStack.length + '}}}';
586
+ });
875
587
  });
876
-
877
- Prism.languages.cpp = Prism.languages.extend('c', {
878
- 'keyword': /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|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/,
879
- 'boolean': /\b(true|false)\b/,
880
- 'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/
881
- });
882
-
883
- Prism.languages.insertBefore('cpp', 'keyword', {
884
- 'class-name': {
885
- pattern: /(class\s+)[a-z0-9_]+/i,
886
- lookbehind: true
588
+ Prism.hooks.add('before-insert', function (env) {
589
+ if (env.language === 'php') {
590
+ env.code = env.backupCode;
591
+ delete env.backupCode;
887
592
  }
888
593
  });
889
- Prism.languages.java = Prism.languages.extend('clike', {
890
- 'keyword': /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,
891
- 'number': /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,
892
- 'operator': {
893
- pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,
894
- lookbehind: true
594
+ Prism.hooks.add('after-highlight', function (env) {
595
+ if (env.language !== 'php') {
596
+ return;
895
597
  }
896
- });
897
- /**
898
- * Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/
899
- * Modified by Miles Johnson: http://milesj.me
900
- *
901
- * Supports the following:
902
- * - Extends clike syntax
903
- * - Support for PHP 5.3+ (namespaces, traits, generators, etc)
904
- * - Smarter constant and function matching
905
- *
906
- * Adds the following new token classes:
907
- * constant, delimiter, variable, function, package
908
- */
909
-
910
- Prism.languages.php = Prism.languages.extend('clike', {
911
- 'keyword': /\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,
912
- 'constant': /\b[A-Z0-9_]{2,}\b/,
913
- 'comment': {
914
- pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,
915
- lookbehind: true
598
+ for (var i = 0, t = void 0; t = env.tokenStack[i]; i++) {
599
+ env.highlightedCode = env.highlightedCode.replace('{{{PHP' + (i + 1) + '}}}', Prism.highlight(t, env.grammar, 'php').replace(/\$/g, '$$$$'));
916
600
  }
601
+ env.element.innerHTML = env.highlightedCode;
917
602
  });
918
-
919
- // Shell-like comments are matched after strings, because they are less
920
- // common than strings containing hashes...
921
- Prism.languages.insertBefore('php', 'class-name', {
922
- 'shell-comment': {
923
- pattern: /(^|[^\\])#.*/,
924
- lookbehind: true,
925
- alias: 'comment'
603
+ Prism.hooks.add('wrap', function (env) {
604
+ if (env.language === 'php' && env.type === 'markup') {
605
+ env.content = env.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g, '<span class="token php">$1</span>');
926
606
  }
927
607
  });
928
-
929
- Prism.languages.insertBefore('php', 'keyword', {
930
- 'delimiter': /\?>|<\?(?:php)?/i,
931
- 'variable': /\$\w+\b/i,
932
- 'package': {
933
- pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
934
- lookbehind: true,
935
- inside: {
936
- punctuation: /\\/
937
- }
938
- }
608
+ Prism.languages.insertBefore('php', 'comment', {
609
+ markup: {
610
+ pattern: /<[^?]\/?(.*?)>/,
611
+ inside: Prism.languages.markup
612
+ },
613
+ php: /\{\{\{PHP[0-9]+\}\}\}/
939
614
  });
940
-
941
- // Must be defined after the function pattern
942
- Prism.languages.insertBefore('php', 'operator', {
943
- 'property': {
944
- pattern: /(->)[\w]+/,
945
- lookbehind: true
946
- }
615
+ }
616
+ Prism.languages.python = {
617
+ 'comment': {
618
+ pattern: /(^|[^\\])#.*/,
619
+ lookbehind: true
620
+ },
621
+ 'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,
622
+ 'function': {
623
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,
624
+ lookbehind: true
625
+ },
626
+ 'class-name': {
627
+ pattern: /(\bclass\s+)[a-z0-9_]+/i,
628
+ lookbehind: true
629
+ },
630
+ 'keyword': /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,
631
+ 'boolean': /\b(?:True|False)\b/,
632
+ 'number': /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
633
+ 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
634
+ 'punctuation': /[{}[\];(),.:]/
635
+ };
636
+ (function (Prism) {
637
+ Prism.languages.ruby = Prism.languages.extend('clike', {
638
+ comment: /#(?!\{[^\r\n]*?\}).*/,
639
+ keyword: /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/
947
640
  });
948
-
949
- // Add HTML support of the markup language exists
950
- if (Prism.languages.markup) {
951
-
952
- // Tokenize all inline PHP blocks that are wrapped in <?php ?>
953
- // This allows for easy PHP + markup highlighting
954
- Prism.hooks.add('before-highlight', function (env) {
955
- if (env.language !== 'php') {
956
- return;
957
- }
958
-
959
- env.tokenStack = [];
960
-
961
- env.backupCode = env.code;
962
- env.code = env.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig, function (match) {
963
- env.tokenStack.push(match);
964
-
965
- return '{{{PHP' + env.tokenStack.length + '}}}';
966
- });
967
- });
968
-
969
- // Restore env.code for other plugins (e.g. line-numbers)
970
- Prism.hooks.add('before-insert', function (env) {
971
- if (env.language === 'php') {
972
- env.code = env.backupCode;
973
- delete env.backupCode;
974
- }
975
- });
976
-
977
- // Re-insert the tokens after highlighting
978
- Prism.hooks.add('after-highlight', function (env) {
979
- if (env.language !== 'php') {
980
- return;
981
- }
982
-
983
- for (var i = 0, t; t = env.tokenStack[i]; i++) {
984
- // The replace prevents $$, $&, $`, $', $n, $nn from being interpreted as special patterns
985
- env.highlightedCode = env.highlightedCode.replace('{{{PHP' + (i + 1) + '}}}', Prism.highlight(t, env.grammar, 'php').replace(/\$/g, '$$$$'));
986
- }
987
-
988
- env.element.innerHTML = env.highlightedCode;
989
- });
990
-
991
- // Wrap tokens in classes that are missing them
992
- Prism.hooks.add('wrap', function (env) {
993
- if (env.language === 'php' && env.type === 'markup') {
994
- env.content = env.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g, "<span class=\"token php\">$1</span>");
995
- }
996
- });
997
-
998
- // Add the rules before all others
999
- Prism.languages.insertBefore('php', 'comment', {
1000
- 'markup': {
1001
- pattern: /<[^?]\/?(.*?)>/,
1002
- inside: Prism.languages.markup
641
+ var interpolation = {
642
+ pattern: /#\{[^}]+\}/,
643
+ inside: {
644
+ delimiter: {
645
+ pattern: /^#\{|\}$/,
646
+ alias: 'tag'
1003
647
  },
1004
- 'php': /\{\{\{PHP[0-9]+\}\}\}/
1005
- });
1006
- }
1007
- ;
1008
- Prism.languages.python = {
1009
- 'comment': {
1010
- pattern: /(^|[^\\])#.*/,
1011
- lookbehind: true
1012
- },
1013
- 'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,
1014
- 'function': {
1015
- pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,
1016
- lookbehind: true
1017
- },
1018
- 'class-name': {
1019
- pattern: /(\bclass\s+)[a-z0-9_]+/i,
1020
- lookbehind: true
1021
- },
1022
- 'keyword': /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,
1023
- 'boolean': /\b(?:True|False)\b/,
1024
- 'number': /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
1025
- 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
1026
- 'punctuation': /[{}[\];(),.:]/
648
+ rest: Prism.util.clone(Prism.languages.ruby)
649
+ }
1027
650
  };
1028
-
1029
- /**
1030
- * Original by Samuel Flores
1031
- *
1032
- * Adds the following new token classes:
1033
- * constant, builtin, variable, symbol, regex
1034
- */
1035
- (function (Prism) {
1036
- Prism.languages.ruby = Prism.languages.extend('clike', {
1037
- 'comment': /#(?!\{[^\r\n]*?\}).*/,
1038
- 'keyword': /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/
1039
- });
1040
-
1041
- var interpolation = {
1042
- pattern: /#\{[^}]+\}/,
1043
- inside: {
1044
- 'delimiter': {
1045
- pattern: /^#\{|\}$/,
1046
- alias: 'tag'
1047
- },
1048
- rest: Prism.util.clone(Prism.languages.ruby)
1049
- }
1050
- };
1051
-
1052
- Prism.languages.insertBefore('ruby', 'keyword', {
1053
- 'regex': [
1054
- {
1055
- pattern: /%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,
1056
- inside: {
1057
- 'interpolation': interpolation
1058
- }
1059
- },
1060
- {
1061
- pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,
1062
- inside: {
1063
- 'interpolation': interpolation
1064
- }
1065
- },
1066
- {
1067
- // Here we need to specifically allow interpolation
1068
- pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,
1069
- inside: {
1070
- 'interpolation': interpolation
1071
- }
1072
- },
1073
- {
1074
- pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,
1075
- inside: {
1076
- 'interpolation': interpolation
1077
- }
1078
- },
1079
- {
1080
- pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,
1081
- inside: {
1082
- 'interpolation': interpolation
1083
- }
1084
- },
1085
- {
1086
- pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,
1087
- lookbehind: true
1088
- }
1089
- ],
1090
- 'variable': /[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,
1091
- 'symbol': /:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/
1092
- });
1093
-
1094
- Prism.languages.insertBefore('ruby', 'number', {
1095
- 'builtin': /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
1096
- 'constant': /\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/
1097
- });
1098
-
1099
- Prism.languages.ruby.string = [
651
+ Prism.languages.insertBefore('ruby', 'keyword', {
652
+ regex: [
1100
653
  {
1101
- pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,
1102
- inside: {
1103
- 'interpolation': interpolation
1104
- }
654
+ pattern: /%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,
655
+ inside: { interpolation: interpolation }
1105
656
  },
1106
657
  {
1107
- pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,
1108
- inside: {
1109
- 'interpolation': interpolation
1110
- }
658
+ pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,
659
+ inside: { interpolation: interpolation }
1111
660
  },
1112
661
  {
1113
- // Here we need to specifically allow interpolation
1114
- pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,
1115
- inside: {
1116
- 'interpolation': interpolation
1117
- }
662
+ pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,
663
+ inside: { interpolation: interpolation }
1118
664
  },
1119
665
  {
1120
- pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,
1121
- inside: {
1122
- 'interpolation': interpolation
1123
- }
666
+ pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,
667
+ inside: { interpolation: interpolation }
1124
668
  },
1125
669
  {
1126
- pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,
1127
- inside: {
1128
- 'interpolation': interpolation
1129
- }
670
+ pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,
671
+ inside: { interpolation: interpolation }
1130
672
  },
1131
673
  {
1132
- pattern: /("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,
1133
- inside: {
1134
- 'interpolation': interpolation
1135
- }
674
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,
675
+ lookbehind: true
1136
676
  }
1137
- ];
1138
- }(Prism));
677
+ ],
678
+ variable: /[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,
679
+ symbol: /:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/
680
+ });
681
+ Prism.languages.insertBefore('ruby', 'number', {
682
+ builtin: /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
683
+ constant: /\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/
684
+ });
685
+ Prism.languages.ruby.string = [
686
+ {
687
+ pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,
688
+ inside: { interpolation: interpolation }
689
+ },
690
+ {
691
+ pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,
692
+ inside: { interpolation: interpolation }
693
+ },
694
+ {
695
+ pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,
696
+ inside: { interpolation: interpolation }
697
+ },
698
+ {
699
+ pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,
700
+ inside: { interpolation: interpolation }
701
+ },
702
+ {
703
+ pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,
704
+ inside: { interpolation: interpolation }
705
+ },
706
+ {
707
+ pattern: /("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,
708
+ inside: { interpolation: interpolation }
709
+ }
710
+ ];
711
+ }(Prism));
1139
712
 
1140
- // ------------------ End wrap
1141
- return Prism;
713
+ function isCodeSample(elm) {
714
+ return elm && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1;
1142
715
  }
1143
- );
1144
-
1145
- /*eslint-enable */
1146
-
1147
- /**
1148
- * Utils.js
1149
- *
1150
- * Released under LGPL License.
1151
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1152
- *
1153
- * License: http://www.tinymce.com/license
1154
- * Contributing: http://www.tinymce.com/contributing
1155
- */
1156
-
1157
- define(
1158
- 'tinymce.plugins.codesample.util.Utils',
1159
- [
1160
- ],
1161
- function () {
1162
- function isCodeSample(elm) {
1163
- return elm && elm.nodeName === 'PRE' && elm.className.indexOf('language-') !== -1;
1164
- }
1165
-
1166
- function trimArg(predicateFn) {
1167
- return function (arg1, arg2) {
1168
- return predicateFn(arg2);
1169
- };
1170
- }
1171
-
1172
- return {
1173
- isCodeSample: isCodeSample,
1174
- trimArg: trimArg
716
+ function trimArg(predicateFn) {
717
+ return function (arg1, arg2) {
718
+ return predicateFn(arg2);
1175
719
  };
1176
720
  }
1177
- );
1178
- /**
1179
- * CodeSample.js
1180
- *
1181
- * Released under LGPL License.
1182
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1183
- *
1184
- * License: http://www.tinymce.com/license
1185
- * Contributing: http://www.tinymce.com/contributing
1186
- */
1187
-
1188
- define(
1189
- 'tinymce.plugins.codesample.core.CodeSample',
1190
- [
1191
- 'tinymce.core.dom.DOMUtils',
1192
- 'tinymce.plugins.codesample.core.Prism',
1193
- 'tinymce.plugins.codesample.util.Utils'
1194
- ],
1195
- function (DOMUtils, Prism, Utils) {
1196
- var getSelectedCodeSample = function (editor) {
1197
- var node = editor.selection.getNode();
1198
-
1199
- if (Utils.isCodeSample(node)) {
1200
- return node;
1201
- }
1202
-
1203
- return null;
1204
- };
1205
-
1206
- var insertCodeSample = function (editor, language, code) {
1207
- editor.undoManager.transact(function () {
1208
- var node = getSelectedCodeSample(editor);
1209
-
1210
- code = DOMUtils.DOM.encode(code);
1211
-
1212
- if (node) {
1213
- editor.dom.setAttrib(node, 'class', 'language-' + language);
1214
- node.innerHTML = code;
1215
- Prism.highlightElement(node);
1216
- editor.selection.select(node);
1217
- } else {
1218
- editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
1219
- editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
1220
- }
1221
- });
1222
- };
721
+ var $_agtlhafjm0ofy90 = {
722
+ isCodeSample: isCodeSample,
723
+ trimArg: trimArg
724
+ };
1223
725
 
1224
- var getCurrentCode = function (editor) {
726
+ var getSelectedCodeSample = function (editor) {
727
+ var node = editor.selection.getNode();
728
+ if ($_agtlhafjm0ofy90.isCodeSample(node)) {
729
+ return node;
730
+ }
731
+ return null;
732
+ };
733
+ var insertCodeSample = function (editor, language, code) {
734
+ editor.undoManager.transact(function () {
1225
735
  var node = getSelectedCodeSample(editor);
1226
-
736
+ code = global$1.DOM.encode(code);
1227
737
  if (node) {
1228
- return node.textContent;
738
+ editor.dom.setAttrib(node, 'class', 'language-' + language);
739
+ node.innerHTML = code;
740
+ Prism.highlightElement(node);
741
+ editor.selection.select(node);
742
+ } else {
743
+ editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
744
+ editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
1229
745
  }
746
+ });
747
+ };
748
+ var getCurrentCode = function (editor) {
749
+ var node = getSelectedCodeSample(editor);
750
+ if (node) {
751
+ return node.textContent;
752
+ }
753
+ return '';
754
+ };
755
+ var $_gsi01acjm0ofy7m = {
756
+ getSelectedCodeSample: getSelectedCodeSample,
757
+ insertCodeSample: insertCodeSample,
758
+ getCurrentCode: getCurrentCode
759
+ };
1230
760
 
1231
- return '';
1232
- };
1233
-
1234
- return {
1235
- getSelectedCodeSample: getSelectedCodeSample,
1236
- insertCodeSample: insertCodeSample,
1237
- getCurrentCode: getCurrentCode
1238
- };
1239
- }
1240
- );
1241
- /**
1242
- * Languages.js
1243
- *
1244
- * Released under LGPL License.
1245
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1246
- *
1247
- * License: http://www.tinymce.com/license
1248
- * Contributing: http://www.tinymce.com/contributing
1249
- */
1250
-
1251
- define(
1252
- 'tinymce.plugins.codesample.core.Languages',
1253
- [
1254
- 'tinymce.plugins.codesample.api.Settings',
1255
- 'tinymce.plugins.codesample.core.CodeSample'
1256
- ],
1257
- function (Settings, CodeSample) {
1258
- var getLanguages = function (editor) {
1259
- var defaultLanguages = [
1260
- { text: 'HTML/XML', value: 'markup' },
1261
- { text: 'JavaScript', value: 'javascript' },
1262
- { text: 'CSS', value: 'css' },
1263
- { text: 'PHP', value: 'php' },
1264
- { text: 'Ruby', value: 'ruby' },
1265
- { text: 'Python', value: 'python' },
1266
- { text: 'Java', value: 'java' },
1267
- { text: 'C', value: 'c' },
1268
- { text: 'C#', value: 'csharp' },
1269
- { text: 'C++', value: 'cpp' }
1270
- ];
1271
-
1272
- var customLanguages = Settings.getLanguages(editor);
1273
- return customLanguages ? customLanguages : defaultLanguages;
1274
- };
1275
-
1276
- var getCurrentLanguage = function (editor) {
1277
- var matches, node = CodeSample.getSelectedCodeSample(editor);
1278
-
1279
- if (node) {
1280
- matches = node.className.match(/language-(\w+)/);
1281
- return matches ? matches[1] : '';
761
+ var getLanguages$1 = function (editor) {
762
+ var defaultLanguages = [
763
+ {
764
+ text: 'HTML/XML',
765
+ value: 'markup'
766
+ },
767
+ {
768
+ text: 'JavaScript',
769
+ value: 'javascript'
770
+ },
771
+ {
772
+ text: 'CSS',
773
+ value: 'css'
774
+ },
775
+ {
776
+ text: 'PHP',
777
+ value: 'php'
778
+ },
779
+ {
780
+ text: 'Ruby',
781
+ value: 'ruby'
782
+ },
783
+ {
784
+ text: 'Python',
785
+ value: 'python'
786
+ },
787
+ {
788
+ text: 'Java',
789
+ value: 'java'
790
+ },
791
+ {
792
+ text: 'C',
793
+ value: 'c'
794
+ },
795
+ {
796
+ text: 'C#',
797
+ value: 'csharp'
798
+ },
799
+ {
800
+ text: 'C++',
801
+ value: 'cpp'
1282
802
  }
803
+ ];
804
+ var customLanguages = $_6tgxjgaajm0ofy7e.getLanguages(editor);
805
+ return customLanguages ? customLanguages : defaultLanguages;
806
+ };
807
+ var getCurrentLanguage = function (editor) {
808
+ var matches;
809
+ var node = $_gsi01acjm0ofy7m.getSelectedCodeSample(editor);
810
+ if (node) {
811
+ matches = node.className.match(/language-(\w+)/);
812
+ return matches ? matches[1] : '';
813
+ }
814
+ return '';
815
+ };
816
+ var $_87mfk3agjm0ofy92 = {
817
+ getLanguages: getLanguages$1,
818
+ getCurrentLanguage: getCurrentLanguage
819
+ };
1283
820
 
1284
- return '';
1285
- };
1286
-
1287
- return {
1288
- getLanguages: getLanguages,
1289
- getCurrentLanguage: getCurrentLanguage
1290
- };
1291
- }
1292
- );
1293
- /**
1294
- * Dialog.js
1295
- *
1296
- * Released under LGPL License.
1297
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1298
- *
1299
- * License: http://www.tinymce.com/license
1300
- * Contributing: http://www.tinymce.com/contributing
1301
- */
1302
-
1303
- define(
1304
- 'tinymce.plugins.codesample.ui.Dialog',
1305
- [
1306
- 'tinymce.plugins.codesample.api.Settings',
1307
- 'tinymce.plugins.codesample.core.CodeSample',
1308
- 'tinymce.plugins.codesample.core.Languages'
1309
- ],
1310
- function (Settings, CodeSample, Languages) {
1311
- return {
1312
- open: function (editor) {
1313
- var minWidth = Settings.getDialogMinWidth(editor);
1314
- var minHeight = Settings.getDialogMinHeight(editor);
1315
- var currentLanguage = Languages.getCurrentLanguage(editor);
1316
- var currentLanguages = Languages.getLanguages(editor);
1317
- var currentCode = CodeSample.getCurrentCode(editor);
1318
-
1319
- editor.windowManager.open({
1320
- title: "Insert/Edit code sample",
1321
- minWidth: minWidth,
1322
- minHeight: minHeight,
1323
- layout: 'flex',
1324
- direction: 'column',
1325
- align: 'stretch',
1326
- body: [
1327
- {
1328
- type: 'listbox',
1329
- name: 'language',
1330
- label: 'Language',
1331
- maxWidth: 200,
1332
- value: currentLanguage,
1333
- values: currentLanguages
1334
- },
1335
-
1336
- {
1337
- type: 'textbox',
1338
- name: 'code',
1339
- multiline: true,
1340
- spellcheck: false,
1341
- ariaLabel: 'Code view',
1342
- flex: 1,
1343
- style: 'direction: ltr; text-align: left',
1344
- classes: 'monospace',
1345
- value: currentCode,
1346
- autofocus: true
1347
- }
1348
- ],
1349
- onSubmit: function (e) {
1350
- CodeSample.insertCodeSample(editor, e.data.language, e.data.code);
821
+ var $_47ybdma9jm0ofy7d = {
822
+ open: function (editor) {
823
+ var minWidth = $_6tgxjgaajm0ofy7e.getDialogMinWidth(editor);
824
+ var minHeight = $_6tgxjgaajm0ofy7e.getDialogMinHeight(editor);
825
+ var currentLanguage = $_87mfk3agjm0ofy92.getCurrentLanguage(editor);
826
+ var currentLanguages = $_87mfk3agjm0ofy92.getLanguages(editor);
827
+ var currentCode = $_gsi01acjm0ofy7m.getCurrentCode(editor);
828
+ editor.windowManager.open({
829
+ title: 'Insert/Edit code sample',
830
+ minWidth: minWidth,
831
+ minHeight: minHeight,
832
+ layout: 'flex',
833
+ direction: 'column',
834
+ align: 'stretch',
835
+ body: [
836
+ {
837
+ type: 'listbox',
838
+ name: 'language',
839
+ label: 'Language',
840
+ maxWidth: 200,
841
+ value: currentLanguage,
842
+ values: currentLanguages
843
+ },
844
+ {
845
+ type: 'textbox',
846
+ name: 'code',
847
+ multiline: true,
848
+ spellcheck: false,
849
+ ariaLabel: 'Code view',
850
+ flex: 1,
851
+ style: 'direction: ltr; text-align: left',
852
+ classes: 'monospace',
853
+ value: currentCode,
854
+ autofocus: true
1351
855
  }
1352
- });
1353
- }
1354
- };
1355
- }
1356
- );
1357
- /**
1358
- * Commands.js
1359
- *
1360
- * Released under LGPL License.
1361
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1362
- *
1363
- * License: http://www.tinymce.com/license
1364
- * Contributing: http://www.tinymce.com/contributing
1365
- */
1366
-
1367
- define(
1368
- 'tinymce.plugins.codesample.api.Commands',
1369
- [
1370
- 'tinymce.plugins.codesample.ui.Dialog',
1371
- 'tinymce.plugins.codesample.util.Utils'
1372
- ],
1373
- function (Dialog, Utils) {
1374
- var register = function (editor) {
1375
- editor.addCommand('codesample', function () {
1376
- var node = editor.selection.getNode();
1377
- if (editor.selection.isCollapsed() || Utils.isCodeSample(node)) {
1378
- Dialog.open(editor);
1379
- } else {
1380
- editor.formatter.toggle('code');
856
+ ],
857
+ onSubmit: function (e) {
858
+ $_gsi01acjm0ofy7m.insertCodeSample(editor, e.data.language, e.data.code);
1381
859
  }
1382
860
  });
1383
- };
1384
-
1385
- return {
1386
- register: register
1387
- };
1388
- }
1389
- );
1390
- /**
1391
- * FilterContent.js
1392
- *
1393
- * Released under LGPL License.
1394
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1395
- *
1396
- * License: http://www.tinymce.com/license
1397
- * Contributing: http://www.tinymce.com/contributing
1398
- */
1399
-
1400
- define(
1401
- 'tinymce.plugins.codesample.core.FilterContent',
1402
- [
1403
- 'tinymce.plugins.codesample.core.Prism',
1404
- 'tinymce.plugins.codesample.util.Utils'
1405
- ],
1406
- function (Prism, Utils) {
1407
- var setup = function (editor) {
1408
- var $ = editor.$;
1409
-
1410
- editor.on('PreProcess', function (e) {
1411
- $('pre[contenteditable=false]', e.node).
1412
- filter(Utils.trimArg(Utils.isCodeSample)).
1413
- each(function (idx, elm) {
1414
- var $elm = $(elm), code = elm.textContent;
1415
-
1416
- $elm.attr('class', $.trim($elm.attr('class')));
1417
- $elm.removeAttr('contentEditable');
861
+ }
862
+ };
1418
863
 
1419
- $elm.empty().append($('<code></code>').each(function () {
1420
- // Needs to be textContent since innerText produces BR:s
1421
- this.textContent = code;
1422
- }));
1423
- });
864
+ var register = function (editor) {
865
+ editor.addCommand('codesample', function () {
866
+ var node = editor.selection.getNode();
867
+ if (editor.selection.isCollapsed() || $_agtlhafjm0ofy90.isCodeSample(node)) {
868
+ $_47ybdma9jm0ofy7d.open(editor);
869
+ } else {
870
+ editor.formatter.toggle('code');
871
+ }
872
+ });
873
+ };
874
+ var $_dve9fsa8jm0ofy7c = { register: register };
875
+
876
+ var setup = function (editor) {
877
+ var $ = editor.$;
878
+ editor.on('PreProcess', function (e) {
879
+ $('pre[contenteditable=false]', e.node).filter($_agtlhafjm0ofy90.trimArg($_agtlhafjm0ofy90.isCodeSample)).each(function (idx, elm) {
880
+ var $elm = $(elm), code = elm.textContent;
881
+ $elm.attr('class', $.trim($elm.attr('class')));
882
+ $elm.removeAttr('contentEditable');
883
+ $elm.empty().append($('<code></code>').each(function () {
884
+ this.textContent = code;
885
+ }));
1424
886
  });
1425
-
1426
- editor.on('SetContent', function () {
1427
- var unprocessedCodeSamples = $('pre').filter(Utils.trimArg(Utils.isCodeSample)).filter(function (idx, elm) {
1428
- return elm.contentEditable !== "false";
1429
- });
1430
-
1431
- if (unprocessedCodeSamples.length) {
1432
- editor.undoManager.transact(function () {
1433
- unprocessedCodeSamples.each(function (idx, elm) {
1434
- $(elm).find('br').each(function (idx, elm) {
1435
- elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm);
1436
- });
1437
-
1438
- elm.contentEditable = false;
1439
- elm.innerHTML = editor.dom.encode(elm.textContent);
1440
- Prism.highlightElement(elm);
1441
- elm.className = $.trim(elm.className);
887
+ });
888
+ editor.on('SetContent', function () {
889
+ var unprocessedCodeSamples = $('pre').filter($_agtlhafjm0ofy90.trimArg($_agtlhafjm0ofy90.isCodeSample)).filter(function (idx, elm) {
890
+ return elm.contentEditable !== 'false';
891
+ });
892
+ if (unprocessedCodeSamples.length) {
893
+ editor.undoManager.transact(function () {
894
+ unprocessedCodeSamples.each(function (idx, elm) {
895
+ $(elm).find('br').each(function (idx, elm) {
896
+ elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm);
1442
897
  });
898
+ elm.contentEditable = false;
899
+ elm.innerHTML = editor.dom.encode(elm.textContent);
900
+ Prism.highlightElement(elm);
901
+ elm.className = $.trim(elm.className);
1443
902
  });
1444
- }
1445
- });
1446
- };
1447
-
1448
- return {
1449
- setup: setup
1450
- };
1451
- }
1452
- );
1453
- /**
1454
- * LoadCss.js
1455
- *
1456
- * Released under LGPL License.
1457
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1458
- *
1459
- * License: http://www.tinymce.com/license
1460
- * Contributing: http://www.tinymce.com/contributing
1461
- */
1462
-
1463
- define(
1464
- 'tinymce.plugins.codesample.core.LoadCss',
1465
- [
1466
- 'tinymce.plugins.codesample.api.Settings'
1467
- ],
1468
- function (Settings) {
1469
- // Todo: use a proper css loader here
1470
- var loadCss = function (editor, pluginUrl, addedInlineCss, addedCss) {
1471
- var linkElm, contentCss = Settings.getContentCss(editor);
1472
-
1473
- if (editor.inline && addedInlineCss.get()) {
1474
- return;
1475
- }
1476
-
1477
- if (!editor.inline && addedCss.get()) {
1478
- return;
1479
- }
1480
-
1481
- if (editor.inline) {
1482
- addedInlineCss.set(true);
1483
- } else {
1484
- addedCss.set(true);
1485
- }
1486
-
1487
- if (contentCss !== false) {
1488
- linkElm = editor.dom.create('link', {
1489
- rel: 'stylesheet',
1490
- href: contentCss ? contentCss : pluginUrl + '/css/prism.css'
1491
903
  });
1492
-
1493
- editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
1494
904
  }
1495
- };
1496
-
1497
- return {
1498
- loadCss: loadCss
1499
- };
1500
- }
1501
- );
1502
- /**
1503
- * Buttons.js
1504
- *
1505
- * Released under LGPL License.
1506
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1507
- *
1508
- * License: http://www.tinymce.com/license
1509
- * Contributing: http://www.tinymce.com/contributing
1510
- */
1511
-
1512
- define(
1513
- 'tinymce.plugins.codesample.ui.Buttons',
1514
- [
1515
- ],
1516
- function () {
1517
- var register = function (editor) {
1518
- editor.addButton('codesample', {
1519
- cmd: 'codesample',
1520
- title: 'Insert/Edit code sample'
1521
- });
905
+ });
906
+ };
907
+ var $_7swko9ahjm0ofy94 = { setup: setup };
1522
908
 
1523
- editor.addMenuItem('codesample', {
1524
- cmd: 'codesample',
1525
- text: 'Code sample',
1526
- icon: 'codesample'
909
+ var loadCss = function (editor, pluginUrl, addedInlineCss, addedCss) {
910
+ var linkElm;
911
+ var contentCss = $_6tgxjgaajm0ofy7e.getContentCss(editor);
912
+ if (editor.inline && addedInlineCss.get()) {
913
+ return;
914
+ }
915
+ if (!editor.inline && addedCss.get()) {
916
+ return;
917
+ }
918
+ if (editor.inline) {
919
+ addedInlineCss.set(true);
920
+ } else {
921
+ addedCss.set(true);
922
+ }
923
+ if (contentCss !== false) {
924
+ linkElm = editor.dom.create('link', {
925
+ rel: 'stylesheet',
926
+ href: contentCss ? contentCss : pluginUrl + '/css/prism.css'
1527
927
  });
1528
- };
928
+ editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
929
+ }
930
+ };
931
+ var $_7f0gvpaijm0ofy96 = { loadCss: loadCss };
1529
932
 
1530
- return {
1531
- register: register
1532
- };
933
+ var register$1 = function (editor) {
934
+ editor.addButton('codesample', {
935
+ cmd: 'codesample',
936
+ title: 'Insert/Edit code sample'
937
+ });
938
+ editor.addMenuItem('codesample', {
939
+ cmd: 'codesample',
940
+ text: 'Code sample',
941
+ icon: 'codesample'
942
+ });
943
+ };
944
+ var $_3p6ti4ajjm0ofy97 = { register: register$1 };
945
+
946
+ var addedInlineCss = Cell(false);
947
+ global.add('codesample', function (editor, pluginUrl) {
948
+ var addedCss = Cell(false);
949
+ $_7swko9ahjm0ofy94.setup(editor);
950
+ $_3p6ti4ajjm0ofy97.register(editor);
951
+ $_dve9fsa8jm0ofy7c.register(editor);
952
+ editor.on('init', function () {
953
+ $_7f0gvpaijm0ofy96.loadCss(editor, pluginUrl, addedInlineCss, addedCss);
954
+ });
955
+ editor.on('dblclick', function (ev) {
956
+ if ($_agtlhafjm0ofy90.isCodeSample(ev.target)) {
957
+ $_47ybdma9jm0ofy7d.open(editor);
958
+ }
959
+ });
960
+ });
961
+ function Plugin () {
1533
962
  }
1534
- );
1535
- /**
1536
- * Plugin.js
1537
- *
1538
- * Released under LGPL License.
1539
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1540
- *
1541
- * License: http://www.tinymce.com/license
1542
- * Contributing: http://www.tinymce.com/contributing
1543
- */
1544
-
1545
- define(
1546
- 'tinymce.plugins.codesample.Plugin',
1547
- [
1548
- 'ephox.katamari.api.Cell',
1549
- 'tinymce.core.PluginManager',
1550
- 'tinymce.plugins.codesample.api.Commands',
1551
- 'tinymce.plugins.codesample.core.FilterContent',
1552
- 'tinymce.plugins.codesample.core.LoadCss',
1553
- 'tinymce.plugins.codesample.ui.Buttons',
1554
- 'tinymce.plugins.codesample.ui.Dialog',
1555
- 'tinymce.plugins.codesample.util.Utils'
1556
- ],
1557
- function (Cell, PluginManager, Commands, FilterContent, LoadCss, Buttons, Dialog, Utils) {
1558
- var addedInlineCss = Cell(false);
1559
-
1560
- PluginManager.add('codesample', function (editor, pluginUrl) {
1561
- var addedCss = Cell(false);
1562
-
1563
- FilterContent.setup(editor);
1564
- Buttons.register(editor);
1565
- Commands.register(editor);
1566
-
1567
- editor.on('init', function () {
1568
- LoadCss.loadCss(editor, pluginUrl, addedInlineCss, addedCss);
1569
- });
1570
963
 
1571
- editor.on('dblclick', function (ev) {
1572
- if (Utils.isCodeSample(ev.target)) {
1573
- Dialog.open(editor);
1574
- }
1575
- });
1576
- });
964
+ return Plugin;
1577
965
 
1578
- return function () { };
1579
- }
1580
- );
1581
- dem('tinymce.plugins.codesample.Plugin')();
966
+ }());
1582
967
  })();