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})};g("1",[],function(){var a=function(b){var c=b,d=function(){return c},e=function(a){c=a},f=function(){return a(d())};return{get:d,set:e,clone:f}};return a}),h("6",tinymce.util.Tools.resolve),g("2",["6"],function(a){return a("tinymce.PluginManager")}),g("9",["6"],function(a){return a("tinymce.util.Tools")}),g("a",[],function(){function a(a){return a&&1===a.nodeType&&"false"===a.contentEditable}function b(b,c,d,e,f){function g(a,b){if(b=b||0,!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var c=a.index;if(b>0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function h(b){var c;if(3===b.nodeType)return b.data;if(o[b.nodeName]&&!n[b.nodeName])return"";if(c="",a(b))return"\n";if((n[b.nodeName]||p[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=h(b);while(b=b.nextSibling);return c}function i(b,c,d){var e,f,g,h,i=[],j=0,k=b,l=c.shift(),m=0;a:for(;;){if((n[k.nodeName]||p[k.nodeName]||a(k))&&j++,3===k.nodeType&&(!f&&k.length+j>=l[1]?(f=k,h=l[1]-j):e&&i.push(k),!e&&k.length+j>l[0]&&(e=k,g=l[0]-j),j+=k.length),e&&f){if(k=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:i,match:l[2],matchIndex:m}),j-=f.length-h,e=null,f=null,i=[],l=c.shift(),m++,!l)break}else if(o[k.nodeName]&&!n[k.nodeName]||!k.firstChild){if(k.nextSibling){k=k.nextSibling;continue}}else if(!a(k)){k=k.firstChild;continue}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===b)break a;k=k.parentNode}}}function j(a){var b;if("function"!=typeof a){var c=a.nodeType?a:m.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(m.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=m.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndex<i.length&&(d=m.createTextNode(i.data.substring(a.endNodeIndex)),e.insertBefore(d,i)),i.parentNode.removeChild(i),j}c=m.createTextNode(f.data.substring(0,a.startNodeIndex)),d=m.createTextNode(g.data.substring(a.endNodeIndex));for(var k=b(f.data.substring(a.startNodeIndex),h),l=[],n=0,o=a.innerNodes.length;n<o;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),l.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(k,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}var k,l,m,n,o,p,q=[],r=0;if(m=c.ownerDocument,n=f.getBlockElements(),o=f.getWhiteSpaceElements(),p=f.getShortEndedElements(),l=h(c)){if(b.global)for(;k=b.exec(l);)q.push(g(k,e));else k=l.match(b),q.push(g(k,e));return q.length&&(r=q.length,i(c,q,j(d))),r}}return{findAndReplaceDOMText:b}}),g("7",["9","a"],function(a,b){var c=function(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b},d=function(a,c,d){var e,f;return f=a.dom.create("span",{"data-mce-bogus":1}),f.className="mce-match-marker",e=a.getBody(),n(a,c,!1),b.findAndReplaceDOMText(d,e,f,!1,a.schema)},e=function(a){var b=a.parentNode;a.firstChild&&b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)},f=function(b,d){var e,f=[];if(e=a.toArray(b.getBody().getElementsByTagName("span")),e.length)for(var g=0;g<e.length;g++){var h=c(e[g]);null!==h&&h.length&&h===d.toString()&&f.push(e[g])}return f},g=function(a,b,c){var d=b.get(),e=a.dom;c=c!==!1,c?d++:d--,e.removeClass(f(a,b.get()),"mce-match-marker-selected");var g=f(a,d);return g.length?(e.addClass(f(a,d),"mce-match-marker-selected"),a.selection.scrollIntoView(g[0]),d):-1},h=function(a,b){var c=b.parentNode;a.remove(b),a.isEmpty(c)&&a.remove(c)},i=function(a,b,c,e,f){c=c.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),c=c.replace(/\s/g,"\\s"),c=f?"\\b"+c+"\\b":c;var h=d(a,b,new RegExp(c,e?"g":"gi"));return h&&(b.set(-1),b.set(g(a,b,!0))),h},j=function(a,b){var c=g(a,b,!0);c!==-1&&b.set(c)},k=function(a,b){var c=g(a,b,!1);c!==-1&&b.set(c)},l=function(a){var b=c(a);return null!==b&&b.length>0},m=function(b,d,f,g,i){var m,n,q,r,s,t,u=d.get();for(g=g!==!1,q=b.getBody(),n=a.grep(a.toArray(q.getElementsByTagName("span")),l),m=0;m<n.length;m++){var v=c(n[m]);if(r=s=parseInt(v,10),i||r===d.get()){for(f.length?(n[m].firstChild.nodeValue=f,e(n[m])):h(b.dom,n[m]);n[++m];){if(r=parseInt(c(n[m]),10),r!==s){m--;break}h(b.dom,n[m])}g&&u--}else s>d.get()&&n[m].setAttribute("data-mce-index",s-1)}return d.set(u),g?(t=o(b,d),j(b,d)):(t=p(b,d),k(b,d)),!i&&t},n=function(b,d,f){var g,h,i,j;for(h=a.toArray(b.getBody().getElementsByTagName("span")),g=0;g<h.length;g++){var k=c(h[g]);null!==k&&k.length&&(k===d.get().toString()&&(i||(i=h[g].firstChild),j=h[g].firstChild),e(h[g]))}if(i&&j){var l=b.dom.createRng();return l.setStart(i,0),l.setEnd(j,j.data.length),f!==!1&&b.selection.setRng(l),l}},o=function(a,b){return f(a,b.get()+1).length>0},p=function(a,b){return f(a,b.get()-1).length>0};return{done:n,find:i,next:j,prev:k,replace:m,hasNext:o,hasPrev:p}}),g("3",["7"],function(a){var b=function(b,c){var d=function(d){return a.done(b,c,d)},e=function(d,e,f){return a.find(b,c,d,e,f)},f=function(){return a.next(b,c)},g=function(){return a.prev(b,c)},h=function(d,e,f){return a.replace(b,c,d,e,f)};return{done:d,find:e,next:f,prev:g,replace:h}};return{get:b}}),g("8",["9","7"],function(a,b){var c=function(c,d){function e(){i.statusbar.find("#next").disabled(b.hasNext(c,d)===!1),i.statusbar.find("#prev").disabled(b.hasPrev(c,d)===!1)}function f(){c.windowManager.alert("Could not find the specified string.",function(){i.find("#find")[0].focus()})}var g,h={};c.undoManager.add(),g=a.trim(c.selection.getContent({format:"text"}));var i=c.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){c.focus(),b.done(c,d),c.undoManager.add()},onSubmit:function(a){var g,j,k,l;return a.preventDefault(),j=i.find("#case").checked(),l=i.find("#words").checked(),k=i.find("#find").value(),k.length?h.text===k&&h.caseState===j&&h.wholeWord===l?b.hasNext(c,d)?(b.next(c,d),void e()):void f():(g=b.find(c,d,k,j,l),g||f(),i.statusbar.items().slice(1).disabled(0===g),e(),void(h={text:k,caseState:j,wholeWord:l})):(b.done(c,d,!1),void i.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){i.submit()}},{text:"Replace",disabled:!0,onclick:function(){b.replace(c,d,i.find("#replace").value())||(i.statusbar.items().slice(1).disabled(!0),d.set(-1),h={})}},{text:"Replace all",disabled:!0,onclick:function(){b.replace(c,d,i.find("#replace").value(),!0,!0),i.statusbar.items().slice(1).disabled(!0),h={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){b.prev(c,d),e()}},{text:"Next",name:"next",disabled:!0,onclick:function(){b.next(c,d),e()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:g},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})};return{open:c}}),g("4",["8"],function(a){var b=function(b,c){b.addCommand("SearchReplace",function(){a.open(b,c)})};return{register:b}}),g("5",["8"],function(a){var b=function(b,c){return function(){a.open(b,c)}},c=function(a,c){a.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:b(a,c),separator:"before",context:"edit"}),a.addButton("searchreplace",{tooltip:"Find and replace",onclick:b(a,c)}),a.shortcuts.add("Meta+F","",b(a,c))};return{register:c}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return b.add("searchreplace",function(b){var f=a(-1);return d.register(b,f),e.register(b,f),c.get(b,f)}),function(){}}),d("0")()}();
1
+ !function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");function h(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var u={findAndReplaceDOMText:function(t,n,r,a,i){var o,d,v,f,p,g,c=[],l=0;function s(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(0<t){var r=e[t];if(!r)throw new Error("Invalid capture group");n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}if(v=n.ownerDocument,f=i.getBlockElements(),p=i.getWhiteSpaceElements(),g=i.getShortEndedElements(),d=function e(t){var n;if(3===t.nodeType)return t.data;if(p[t.nodeName]&&!f[t.nodeName])return"";if(n="",h(t))return"\n";if((f[t.nodeName]||g[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(n)){if(t.global)for(;o=t.exec(d);)c.push(s(o,a));else o=d.match(t),c.push(s(o,a));return c.length&&(l=c.length,function(e,t,n){var r,a,i,o,d=[],c=0,l=e,s=t.shift(),u=0;e:for(;;){if((f[l.nodeName]||g[l.nodeName]||h(l))&&c++,3===l.nodeType&&(!a&&l.length+c>=s[1]?(a=l,o=s[1]-c):r&&d.push(l),!r&&l.length+c>s[0]&&(r=l,i=s[0]-c),c+=l.length),r&&a){if(l=n({startNode:r,startNodeIndex:i,endNode:a,endNodeIndex:o,innerNodes:d,match:s[2],matchIndex:u}),c-=a.length-o,a=r=null,d=[],u++,!(s=t.shift()))break}else if(p[l.nodeName]&&!f[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!h(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===e)break e;l=l.parentNode}}}(n,c,function(e){var m;if("function"!=typeof e){var r=e.nodeType?e:v.createElement(e);m=function(e,t){var n=r.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(v.createTextNode(e)),n}}else m=e;return function(e){var t,n,r,a=e.startNode,i=e.endNode,o=e.matchIndex;if(a===i){var d=a;r=d.parentNode,0<e.startNodeIndex&&(t=v.createTextNode(d.data.substring(0,e.startNodeIndex)),r.insertBefore(t,d));var c=m(e.match[0],o);return r.insertBefore(c,d),e.endNodeIndex<d.length&&(n=v.createTextNode(d.data.substring(e.endNodeIndex)),r.insertBefore(n,d)),d.parentNode.removeChild(d),c}t=v.createTextNode(a.data.substring(0,e.startNodeIndex)),n=v.createTextNode(i.data.substring(e.endNodeIndex));for(var l=m(a.data.substring(e.startNodeIndex),o),s=[],u=0,f=e.innerNodes.length;u<f;++u){var p=e.innerNodes[u],g=m(p.data,o);p.parentNode.replaceChild(g,p),s.push(g)}var h=m(i.data.substring(0,e.endNodeIndex),o);return(r=a.parentNode).insertBefore(t,a),r.insertBefore(l,a),r.removeChild(a),(r=i.parentNode).insertBefore(h,i),r.insertBefore(n,i),r.removeChild(i),h}}(r))),l}}},g=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},m=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},o=function(e,t){var n,r=[];if((n=p.toArray(e.getBody().getElementsByTagName("span"))).length)for(var a=0;a<n.length;a++){var i=g(n[a]);null!==i&&i.length&&i===t.toString()&&r.push(n[a])}return r},f=function(e,t,n){var r=t.get(),a=e.dom;(n=!1!==n)?r++:r--,a.removeClass(o(e,t.get()),"mce-match-marker-selected");var i=o(e,r);return i.length?(a.addClass(o(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),r):-1},v=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},x=function(e,t){var n=f(e,t,!0);-1!==n&&t.set(n)},b=function(e,t){var n=f(e,t,!1);-1!==n&&t.set(n)},N=function(e){var t=g(e);return null!==t&&0<t.length},y=function(e,t,n){var r,a,i,o;for(a=p.toArray(e.getBody().getElementsByTagName("span")),r=0;r<a.length;r++){var d=g(a[r]);null!==d&&d.length&&(d===t.get().toString()&&(i||(i=a[r].firstChild),o=a[r].firstChild),m(a[r]))}if(i&&o){var c=e.dom.createRng();return c.setStart(i,0),c.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(c),c}},k=function(e,t){return 0<o(e,t.get()+1).length},C=function(e,t){return 0<o(e,t.get()-1).length},T={done:y,find:function(e,t,n,r,a){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"\\s"),n=a?"\\b"+n+"\\b":n;var i,o,d,c,l,s=(i=e,o=t,d=new RegExp(n,r?"g":"gi"),(l=i.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",c=i.getBody(),y(i,o,!1),u.findAndReplaceDOMText(d,c,l,!1,i.schema));return s&&(t.set(-1),t.set(f(e,t,!0))),s},next:x,prev:b,replace:function(e,t,n,r,a){var i,o,d,c,l,s,u=t.get();for(r=!1!==r,d=e.getBody(),o=p.grep(p.toArray(d.getElementsByTagName("span")),N),i=0;i<o.length;i++){var f=g(o[i]);if(c=l=parseInt(f,10),a||c===t.get()){for(n.length?(o[i].firstChild.nodeValue=n,m(o[i])):v(e.dom,o[i]);o[++i];){if((c=parseInt(g(o[i]),10))!==l){i--;break}v(e.dom,o[i])}r&&u--}else l>t.get()&&o[i].setAttribute("data-mce-index",l-1)}return t.set(u),r?(s=k(e,t),x(e,t)):(s=C(e,t),b(e,t)),!a&&s},hasNext:k,hasPrev:C},n=function(r,a){return{done:function(e){return T.done(r,a,e)},find:function(e,t,n){return T.find(r,a,e,t,n)},next:function(){return T.next(r,a)},prev:function(){return T.prev(r,a)},replace:function(e,t,n){return T.replace(r,a,e,t,n)}}},a=function(i,o){var e,d={};function c(){s.statusbar.find("#next").disabled(!1===T.hasNext(i,o)),s.statusbar.find("#prev").disabled(!1===T.hasPrev(i,o))}function l(){i.windowManager.alert("Could not find the specified string.",function(){s.find("#find")[0].focus()})}i.undoManager.add(),e=p.trim(i.selection.getContent({format:"text"}));var s=i.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){i.focus(),T.done(i,o),i.undoManager.add()},onSubmit:function(e){var t,n,r,a;return e.preventDefault(),n=s.find("#case").checked(),a=s.find("#words").checked(),(r=s.find("#find").value()).length?d.text===r&&d.caseState===n&&d.wholeWord===a?T.hasNext(i,o)?(T.next(i,o),void c()):void l():((t=T.find(i,o,r,n,a))||l(),s.statusbar.items().slice(1).disabled(0===t),c(),void(d={text:r,caseState:n,wholeWord:a})):(T.done(i,o,!1),void s.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){s.submit()}},{text:"Replace",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value())||(s.statusbar.items().slice(1).disabled(!0),o.set(-1),d={})}},{text:"Replace all",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value(),!0,!0),s.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){T.prev(i,o),c()}},{text:"Next",name:"next",disabled:!0,onclick:function(){T.next(i,o),c()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:e},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})},i=function(e,t){e.addCommand("SearchReplace",function(){a(e,t)})},d=function(e,t){return function(){a(e,t)}},c=function(e,t){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:d(e,t),separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",onclick:d(e,t)}),e.shortcuts.add("Meta+F","",d(e,t))};e.add("searchreplace",function(e){var t=r(-1);return i(e,t),c(e,t),n(e,t)})}();
@@ -1,432 +1,150 @@
1
1
  (function () {
2
+ var spellchecker = (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.spellchecker.Plugin","ephox.katamari.api.Cell","tinymce.core.PluginManager","tinymce.plugins.spellchecker.alien.DetectProPlugin","tinymce.plugins.spellchecker.api.Api","tinymce.plugins.spellchecker.api.Commands","tinymce.plugins.spellchecker.api.Settings","tinymce.plugins.spellchecker.ui.Buttons","tinymce.plugins.spellchecker.ui.SuggestionsMenu","global!tinymce.util.Tools.resolve","global!window","tinymce.plugins.spellchecker.core.Actions","tinymce.core.util.Tools","global!document","tinymce.core.dom.DOMUtils","tinymce.core.ui.Factory","tinymce.core.util.URI","tinymce.core.util.XHR","tinymce.plugins.spellchecker.api.Events","tinymce.plugins.spellchecker.core.DomTextMatcher"]
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
- defineGlobal("global!window", window);
141
- /**
142
- * DetectProPlugin.js
143
- *
144
- * Released under LGPL License.
145
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
146
- *
147
- * License: http://www.tinymce.com/license
148
- * Contributing: http://www.tinymce.com/contributing
149
- */
150
-
151
- define(
152
- 'tinymce.plugins.spellchecker.alien.DetectProPlugin',
153
- [
154
- 'global!window',
155
- 'tinymce.core.PluginManager'
156
- ],
157
- function (window, PluginManager) {
158
- var hasProPlugin = function (editor) {
159
- // draw back if power version is requested and registered
160
- if (/(^|[ ,])tinymcespellchecker([, ]|$)/.test(editor.settings.plugins) && PluginManager.get('tinymcespellchecker')) {
161
- /*eslint no-console:0 */
162
- if (typeof window.console !== "undefined" && window.console.log) {
163
- window.console.log(
164
- "Spell Checker Pro is incompatible with Spell Checker plugin! " +
165
- "Remove 'spellchecker' from the 'plugins' option."
166
- );
167
- }
168
- return true;
169
- } else {
170
- return false;
171
- }
172
- };
173
-
174
- return {
175
- hasProPlugin: hasProPlugin
176
- };
177
- }
178
- );
179
-
180
- /**
181
- * Settings.js
182
- *
183
- * Released under LGPL License.
184
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
185
- *
186
- * License: http://www.tinymce.com/license
187
- * Contributing: http://www.tinymce.com/contributing
188
- */
189
-
190
- define(
191
- 'tinymce.plugins.spellchecker.api.Settings',
192
- [
193
- ],
194
- function () {
195
- var getLanguages = function (editor) {
196
- var defaultLanguages = 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv';
197
- return editor.getParam('spellchecker_languages', defaultLanguages);
198
- };
199
-
200
- var getLanguage = function (editor) {
201
- var defaultLanguage = editor.getParam('language', 'en');
202
- return editor.getParam('spellchecker_language', defaultLanguage);
203
- };
204
-
205
- var getRpcUrl = function (editor) {
206
- return editor.getParam('spellchecker_rpc_url');
5
+ var Cell = function (initial) {
6
+ var value = initial;
7
+ var get = function () {
8
+ return value;
207
9
  };
208
-
209
- var getSpellcheckerCallback = function (editor) {
210
- return editor.getParam('spellchecker_callback');
10
+ var set = function (v) {
11
+ value = v;
211
12
  };
212
-
213
- var getSpellcheckerWordcharPattern = function (editor) {
214
- var defaultPattern = new RegExp("[^" +
215
- "\\s!\"#$%&()*+,-./:;<=>?@[\\]^_{|}`" +
216
- "\u00a7\u00a9\u00ab\u00ae\u00b1\u00b6\u00b7\u00b8\u00bb" +
217
- "\u00bc\u00bd\u00be\u00bf\u00d7\u00f7\u00a4\u201d\u201c\u201e\u00a0\u2002\u2003\u2009" +
218
- "]+", "g");
219
- return editor.getParam('spellchecker_wordchar_pattern', defaultPattern);
13
+ var clone = function () {
14
+ return Cell(get());
220
15
  };
221
-
222
16
  return {
223
- getLanguages: getLanguages,
224
- getLanguage: getLanguage,
225
- getRpcUrl: getRpcUrl,
226
- getSpellcheckerCallback: getSpellcheckerCallback,
227
- getSpellcheckerWordcharPattern: getSpellcheckerWordcharPattern
17
+ get: get,
18
+ set: set,
19
+ clone: clone
228
20
  };
229
- }
230
- );
231
- /**
232
- * ResolveGlobal.js
233
- *
234
- * Released under LGPL License.
235
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
236
- *
237
- * License: http://www.tinymce.com/license
238
- * Contributing: http://www.tinymce.com/contributing
239
- */
240
-
241
- define(
242
- 'tinymce.core.util.Tools',
243
- [
244
- 'global!tinymce.util.Tools.resolve'
245
- ],
246
- function (resolve) {
247
- return resolve('tinymce.util.Tools');
248
- }
249
- );
21
+ };
250
22
 
251
- /**
252
- * ResolveGlobal.js
253
- *
254
- * Released under LGPL License.
255
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
256
- *
257
- * License: http://www.tinymce.com/license
258
- * Contributing: http://www.tinymce.com/contributing
259
- */
23
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
260
24
 
261
- define(
262
- 'tinymce.core.util.URI',
263
- [
264
- 'global!tinymce.util.Tools.resolve'
265
- ],
266
- function (resolve) {
267
- return resolve('tinymce.util.URI');
268
- }
269
- );
25
+ var hasProPlugin = function (editor) {
26
+ if (/(^|[ ,])tinymcespellchecker([, ]|$)/.test(editor.settings.plugins) && global.get('tinymcespellchecker')) {
27
+ if (typeof window.console !== 'undefined' && window.console.log) {
28
+ window.console.log('Spell Checker Pro is incompatible with Spell Checker plugin! ' + 'Remove \'spellchecker\' from the \'plugins\' option.');
29
+ }
30
+ return true;
31
+ } else {
32
+ return false;
33
+ }
34
+ };
35
+ var $_9tnsahk7jm0ofzx4 = { hasProPlugin: hasProPlugin };
270
36
 
271
- /**
272
- * ResolveGlobal.js
273
- *
274
- * Released under LGPL License.
275
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
276
- *
277
- * License: http://www.tinymce.com/license
278
- * Contributing: http://www.tinymce.com/contributing
279
- */
37
+ var getLanguages = function (editor) {
38
+ var defaultLanguages = 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv';
39
+ return editor.getParam('spellchecker_languages', defaultLanguages);
40
+ };
41
+ var getLanguage = function (editor) {
42
+ var defaultLanguage = editor.getParam('language', 'en');
43
+ return editor.getParam('spellchecker_language', defaultLanguage);
44
+ };
45
+ var getRpcUrl = function (editor) {
46
+ return editor.getParam('spellchecker_rpc_url');
47
+ };
48
+ var getSpellcheckerCallback = function (editor) {
49
+ return editor.getParam('spellchecker_callback');
50
+ };
51
+ var getSpellcheckerWordcharPattern = function (editor) {
52
+ var defaultPattern = new RegExp('[^' + '\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`' + '\xA7\xA9\xAB\xAE\xB1\xB6\xB7\xB8\xBB' + '\xBC\xBD\xBE\xBF\xD7\xF7\xA4\u201D\u201C\u201E\xA0\u2002\u2003\u2009' + ']+', 'g');
53
+ return editor.getParam('spellchecker_wordchar_pattern', defaultPattern);
54
+ };
55
+ var $_1zygcfkajm0ofzxr = {
56
+ getLanguages: getLanguages,
57
+ getLanguage: getLanguage,
58
+ getRpcUrl: getRpcUrl,
59
+ getSpellcheckerCallback: getSpellcheckerCallback,
60
+ getSpellcheckerWordcharPattern: getSpellcheckerWordcharPattern
61
+ };
280
62
 
281
- define(
282
- 'tinymce.core.util.XHR',
283
- [
284
- 'global!tinymce.util.Tools.resolve'
285
- ],
286
- function (resolve) {
287
- return resolve('tinymce.util.XHR');
288
- }
289
- );
63
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
290
64
 
291
- /**
292
- * Events.js
293
- *
294
- * Released under LGPL License.
295
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
296
- *
297
- * License: http://www.tinymce.com/license
298
- * Contributing: http://www.tinymce.com/contributing
299
- */
65
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI');
300
66
 
301
- define(
302
- 'tinymce.plugins.spellchecker.api.Events',
303
- [
304
- ],
305
- function () {
306
- var fireSpellcheckStart = function (editor) {
307
- return editor.fire('SpellcheckStart');
308
- };
67
+ var global$3 = tinymce.util.Tools.resolve('tinymce.util.XHR');
309
68
 
310
- var fireSpellcheckEnd = function (editor) {
311
- return editor.fire('SpellcheckEnd');
312
- };
69
+ var fireSpellcheckStart = function (editor) {
70
+ return editor.fire('SpellcheckStart');
71
+ };
72
+ var fireSpellcheckEnd = function (editor) {
73
+ return editor.fire('SpellcheckEnd');
74
+ };
75
+ var $_3ve0l5kfjm0ofzxz = {
76
+ fireSpellcheckStart: fireSpellcheckStart,
77
+ fireSpellcheckEnd: fireSpellcheckEnd
78
+ };
313
79
 
314
- return {
315
- fireSpellcheckStart: fireSpellcheckStart,
316
- fireSpellcheckEnd: fireSpellcheckEnd
317
- };
80
+ function isContentEditableFalse(node) {
81
+ return node && node.nodeType === 1 && node.contentEditable === 'false';
318
82
  }
319
- );
320
- /**
321
- * DomTextMatcher.js
322
- *
323
- * Released under LGPL License.
324
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
325
- *
326
- * License: http://www.tinymce.com/license
327
- * Contributing: http://www.tinymce.com/contributing
328
- */
329
-
330
- define(
331
- 'tinymce.plugins.spellchecker.core.DomTextMatcher',
332
- [
333
- ],
334
- function () {
335
- function isContentEditableFalse(node) {
336
- return node && node.nodeType === 1 && node.contentEditable === "false";
83
+ var DomTextMatcher = function (node, editor) {
84
+ var m, matches = [], text;
85
+ var dom = editor.dom;
86
+ var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
87
+ blockElementsMap = editor.schema.getBlockElements();
88
+ hiddenTextElementsMap = editor.schema.getWhiteSpaceElements();
89
+ shortEndedElementsMap = editor.schema.getShortEndedElements();
90
+ function createMatch(m, data) {
91
+ if (!m[0]) {
92
+ throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
93
+ }
94
+ return {
95
+ start: m.index,
96
+ end: m.index + m[0].length,
97
+ text: m[0],
98
+ data: data
99
+ };
337
100
  }
338
-
339
- // Based on work developed by: James Padolsey http://james.padolsey.com
340
- // released under UNLICENSE that is compatible with LGPL
341
- // TODO: Handle contentEditable edgecase:
342
- // <p>text<span contentEditable="false">text<span contentEditable="true">text</span>text</span>text</p>
343
- return function (node, editor) {
344
- var m, matches = [], text, dom = editor.dom;
345
- var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
346
-
347
- blockElementsMap = editor.schema.getBlockElements(); // H1-H6, P, TD etc
348
- hiddenTextElementsMap = editor.schema.getWhiteSpaceElements(); // TEXTAREA, PRE, STYLE, SCRIPT
349
- shortEndedElementsMap = editor.schema.getShortEndedElements(); // BR, IMG, INPUT
350
-
351
- function createMatch(m, data) {
352
- if (!m[0]) {
353
- throw 'findAndReplaceDOMText cannot handle zero-length matches';
354
- }
355
-
356
- return {
357
- start: m.index,
358
- end: m.index + m[0].length,
359
- text: m[0],
360
- data: data
361
- };
101
+ function getText(node) {
102
+ var txt;
103
+ if (node.nodeType === 3) {
104
+ return node.data;
362
105
  }
363
-
364
- function getText(node) {
365
- var txt;
366
-
367
- if (node.nodeType === 3) {
368
- return node.data;
369
- }
370
-
371
- if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
372
- return '';
373
- }
374
-
375
- if (isContentEditableFalse(node)) {
376
- return '\n';
377
- }
378
-
379
- txt = '';
380
-
381
- if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
382
- txt += '\n';
383
- }
384
-
385
- if ((node = node.firstChild)) {
386
- do {
387
- txt += getText(node);
388
- } while ((node = node.nextSibling));
389
- }
390
-
391
- return txt;
106
+ if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
107
+ return '';
392
108
  }
393
-
394
- function stepThroughMatches(node, matches, replaceFn) {
395
- var startNode, endNode, startNodeIndex,
396
- endNodeIndex, innerNodes = [], atIndex = 0, curNode = node,
397
- matchLocation, matchIndex = 0;
398
-
399
- matches = matches.slice(0);
400
- matches.sort(function (a, b) {
401
- return a.start - b.start;
402
- });
403
-
404
- matchLocation = matches.shift();
405
-
406
- out: while (true) { //eslint-disable-line no-constant-condition
109
+ if (isContentEditableFalse(node)) {
110
+ return '\n';
111
+ }
112
+ txt = '';
113
+ if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
114
+ txt += '\n';
115
+ }
116
+ if (node = node.firstChild) {
117
+ do {
118
+ txt += getText(node);
119
+ } while (node = node.nextSibling);
120
+ }
121
+ return txt;
122
+ }
123
+ function stepThroughMatches(node, matches, replaceFn) {
124
+ var startNode, endNode, startNodeIndex, endNodeIndex, innerNodes = [], atIndex = 0, curNode = node, matchLocation, matchIndex = 0;
125
+ matches = matches.slice(0);
126
+ matches.sort(function (a, b) {
127
+ return a.start - b.start;
128
+ });
129
+ matchLocation = matches.shift();
130
+ out:
131
+ while (true) {
407
132
  if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
408
133
  atIndex++;
409
134
  }
410
-
411
135
  if (curNode.nodeType === 3) {
412
136
  if (!endNode && curNode.length + atIndex >= matchLocation.end) {
413
- // We've found the ending
414
137
  endNode = curNode;
415
138
  endNodeIndex = matchLocation.end - atIndex;
416
139
  } else if (startNode) {
417
- // Intersecting node
418
140
  innerNodes.push(curNode);
419
141
  }
420
-
421
142
  if (!startNode && curNode.length + atIndex > matchLocation.start) {
422
- // We've found the match start
423
143
  startNode = curNode;
424
144
  startNodeIndex = matchLocation.start - atIndex;
425
145
  }
426
-
427
146
  atIndex += curNode.length;
428
147
  }
429
-
430
148
  if (startNode && endNode) {
431
149
  curNode = replaceFn({
432
150
  startNode: startNode,
@@ -437,34 +155,25 @@ define(
437
155
  match: matchLocation.text,
438
156
  matchIndex: matchIndex
439
157
  });
440
-
441
- // replaceFn has to return the node that replaced the endNode
442
- // and then we step back so we can continue from the end of the
443
- // match:
444
- atIndex -= (endNode.length - endNodeIndex);
158
+ atIndex -= endNode.length - endNodeIndex;
445
159
  startNode = null;
446
160
  endNode = null;
447
161
  innerNodes = [];
448
162
  matchLocation = matches.shift();
449
163
  matchIndex++;
450
-
451
164
  if (!matchLocation) {
452
- break; // no more matches
165
+ break;
453
166
  }
454
167
  } else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
455
168
  if (!isContentEditableFalse(curNode)) {
456
- // Move down
457
169
  curNode = curNode.firstChild;
458
170
  continue;
459
171
  }
460
172
  } else if (curNode.nextSibling) {
461
- // Move forward:
462
173
  curNode = curNode.nextSibling;
463
174
  continue;
464
175
  }
465
-
466
- // Move forward or up:
467
- while (true) { //eslint-disable-line no-constant-condition
176
+ while (true) {
468
177
  if (curNode.nextSibling) {
469
178
  curNode = curNode.nextSibling;
470
179
  break;
@@ -475,945 +184,574 @@ define(
475
184
  }
476
185
  }
477
186
  }
478
- }
479
-
480
- /**
481
- * Generates the actual replaceFn which splits up text nodes
482
- * and inserts the replacement element.
483
- */
484
- function genReplacer(callback) {
485
- function makeReplacementNode(fill, matchIndex) {
486
- var match = matches[matchIndex];
487
-
488
- if (!match.stencil) {
489
- match.stencil = callback(match);
490
- }
491
-
492
- var clone = match.stencil.cloneNode(false);
493
- clone.setAttribute('data-mce-index', matchIndex);
494
-
495
- if (fill) {
496
- clone.appendChild(dom.doc.createTextNode(fill));
497
- }
498
-
499
- return clone;
187
+ }
188
+ function genReplacer(callback) {
189
+ function makeReplacementNode(fill, matchIndex) {
190
+ var match = matches[matchIndex];
191
+ if (!match.stencil) {
192
+ match.stencil = callback(match);
500
193
  }
501
-
502
- return function (range) {
503
- var before, after, parentNode, startNode = range.startNode,
504
- endNode = range.endNode, matchIndex = range.matchIndex,
505
- doc = dom.doc;
506
-
507
- if (startNode === endNode) {
508
- var node = startNode;
509
-
510
- parentNode = node.parentNode;
511
- if (range.startNodeIndex > 0) {
512
- // Add "before" text node (before the match)
513
- before = doc.createTextNode(node.data.substring(0, range.startNodeIndex));
514
- parentNode.insertBefore(before, node);
515
- }
516
-
517
- // Create the replacement node:
518
- var el = makeReplacementNode(range.match, matchIndex);
519
- parentNode.insertBefore(el, node);
520
- if (range.endNodeIndex < node.length) {
521
- // Add "after" text node (after the match)
522
- after = doc.createTextNode(node.data.substring(range.endNodeIndex));
523
- parentNode.insertBefore(after, node);
524
- }
525
-
526
- node.parentNode.removeChild(node);
527
-
528
- return el;
194
+ var clone = match.stencil.cloneNode(false);
195
+ clone.setAttribute('data-mce-index', matchIndex);
196
+ if (fill) {
197
+ clone.appendChild(dom.doc.createTextNode(fill));
198
+ }
199
+ return clone;
200
+ }
201
+ return function (range) {
202
+ var before;
203
+ var after;
204
+ var parentNode;
205
+ var startNode = range.startNode;
206
+ var endNode = range.endNode;
207
+ var matchIndex = range.matchIndex;
208
+ var doc = dom.doc;
209
+ if (startNode === endNode) {
210
+ var node_1 = startNode;
211
+ parentNode = node_1.parentNode;
212
+ if (range.startNodeIndex > 0) {
213
+ before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
214
+ parentNode.insertBefore(before, node_1);
529
215
  }
530
-
531
- // Replace startNode -> [innerNodes...] -> endNode (in that order)
532
- before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
533
- after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
534
- var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
535
- var innerEls = [];
536
-
537
- for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
538
- var innerNode = range.innerNodes[i];
539
- var innerEl = makeReplacementNode(innerNode.data, matchIndex);
540
- innerNode.parentNode.replaceChild(innerEl, innerNode);
541
- innerEls.push(innerEl);
542
- }
543
-
544
- var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
545
-
546
- parentNode = startNode.parentNode;
547
- parentNode.insertBefore(before, startNode);
548
- parentNode.insertBefore(elA, startNode);
549
- parentNode.removeChild(startNode);
550
-
551
- parentNode = endNode.parentNode;
552
- parentNode.insertBefore(elB, endNode);
553
- parentNode.insertBefore(after, endNode);
554
- parentNode.removeChild(endNode);
555
-
556
- return elB;
557
- };
558
- }
559
-
560
- function unwrapElement(element) {
561
- var parentNode = element.parentNode;
562
- parentNode.insertBefore(element.firstChild, element);
563
- element.parentNode.removeChild(element);
564
- }
565
-
566
- function hasClass(elm) {
567
- return elm.className.indexOf('mce-spellchecker-word') !== -1;
568
- }
569
-
570
- function getWrappersByIndex(index) {
571
- var elements = node.getElementsByTagName('*'), wrappers = [];
572
-
573
- index = typeof index === "number" ? "" + index : null;
574
-
575
- for (var i = 0; i < elements.length; i++) {
576
- var element = elements[i], dataIndex = element.getAttribute('data-mce-index');
577
-
578
- if (dataIndex !== null && dataIndex.length && hasClass(element)) {
579
- if (dataIndex === index || index === null) {
580
- wrappers.push(element);
581
- }
216
+ var el = makeReplacementNode(range.match, matchIndex);
217
+ parentNode.insertBefore(el, node_1);
218
+ if (range.endNodeIndex < node_1.length) {
219
+ after = doc.createTextNode(node_1.data.substring(range.endNodeIndex));
220
+ parentNode.insertBefore(after, node_1);
582
221
  }
222
+ node_1.parentNode.removeChild(node_1);
223
+ return el;
583
224
  }
584
-
585
- return wrappers;
586
- }
587
-
588
- /**
589
- * Returns the index of a specific match object or -1 if it isn't found.
590
- *
591
- * @param {Match} match Text match object.
592
- * @return {Number} Index of match or -1 if it isn't found.
593
- */
594
- function indexOf(match) {
595
- var i = matches.length;
596
- while (i--) {
597
- if (matches[i] === match) {
598
- return i;
599
- }
225
+ before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
226
+ after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
227
+ var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
228
+ var innerEls = [];
229
+ for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
230
+ var innerNode = range.innerNodes[i];
231
+ var innerEl = makeReplacementNode(innerNode.data, matchIndex);
232
+ innerNode.parentNode.replaceChild(innerEl, innerNode);
233
+ innerEls.push(innerEl);
600
234
  }
601
-
602
- return -1;
603
- }
604
-
605
- /**
606
- * Filters the matches. If the callback returns true it stays if not it gets removed.
607
- *
608
- * @param {Function} callback Callback to execute for each match.
609
- * @return {DomTextMatcher} Current DomTextMatcher instance.
610
- */
611
- function filter(callback) {
612
- var filteredMatches = [];
613
-
614
- each(function (match, i) {
615
- if (callback(match, i)) {
616
- filteredMatches.push(match);
617
- }
618
- });
619
-
620
- matches = filteredMatches;
621
-
622
- /*jshint validthis:true*/
623
- return this;
624
- }
625
-
626
- /**
627
- * Executes the specified callback for each match.
628
- *
629
- * @param {Function} callback Callback to execute for each match.
630
- * @return {DomTextMatcher} Current DomTextMatcher instance.
631
- */
632
- function each(callback) {
633
- for (var i = 0, l = matches.length; i < l; i++) {
634
- if (callback(matches[i], i) === false) {
635
- break;
235
+ var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
236
+ parentNode = startNode.parentNode;
237
+ parentNode.insertBefore(before, startNode);
238
+ parentNode.insertBefore(elA, startNode);
239
+ parentNode.removeChild(startNode);
240
+ parentNode = endNode.parentNode;
241
+ parentNode.insertBefore(elB, endNode);
242
+ parentNode.insertBefore(after, endNode);
243
+ parentNode.removeChild(endNode);
244
+ return elB;
245
+ };
246
+ }
247
+ function unwrapElement(element) {
248
+ var parentNode = element.parentNode;
249
+ parentNode.insertBefore(element.firstChild, element);
250
+ element.parentNode.removeChild(element);
251
+ }
252
+ function hasClass(elm) {
253
+ return elm.className.indexOf('mce-spellchecker-word') !== -1;
254
+ }
255
+ function getWrappersByIndex(index) {
256
+ var elements = node.getElementsByTagName('*'), wrappers = [];
257
+ index = typeof index === 'number' ? '' + index : null;
258
+ for (var i = 0; i < elements.length; i++) {
259
+ var element = elements[i], dataIndex = element.getAttribute('data-mce-index');
260
+ if (dataIndex !== null && dataIndex.length && hasClass(element)) {
261
+ if (dataIndex === index || index === null) {
262
+ wrappers.push(element);
636
263
  }
637
264
  }
638
-
639
- /*jshint validthis:true*/
640
- return this;
641
265
  }
642
-
643
- /**
644
- * Wraps the current matches with nodes created by the specified callback.
645
- * Multiple clones of these matches might occur on matches that are on multiple nodex.
646
- *
647
- * @param {Function} callback Callback to execute in order to create elements for matches.
648
- * @return {DomTextMatcher} Current DomTextMatcher instance.
649
- */
650
- function wrap(callback) {
651
- if (matches.length) {
652
- stepThroughMatches(node, matches, genReplacer(callback));
266
+ return wrappers;
267
+ }
268
+ function indexOf(match) {
269
+ var i = matches.length;
270
+ while (i--) {
271
+ if (matches[i] === match) {
272
+ return i;
653
273
  }
654
-
655
- /*jshint validthis:true*/
656
- return this;
657
274
  }
658
-
659
- /**
660
- * Finds the specified regexp and adds them to the matches collection.
661
- *
662
- * @param {RegExp} regex Global regexp to search the current node by.
663
- * @param {Object} [data] Optional custom data element for the match.
664
- * @return {DomTextMatcher} Current DomTextMatcher instance.
665
- */
666
- function find(regex, data) {
667
- if (text && regex.global) {
668
- while ((m = regex.exec(text))) {
669
- matches.push(createMatch(m, data));
670
- }
275
+ return -1;
276
+ }
277
+ function filter(callback) {
278
+ var filteredMatches = [];
279
+ each(function (match, i) {
280
+ if (callback(match, i)) {
281
+ filteredMatches.push(match);
671
282
  }
672
-
673
- return this;
674
- }
675
-
676
- /**
677
- * Unwraps the specified match object or all matches if unspecified.
678
- *
679
- * @param {Object} [match] Optional match object.
680
- * @return {DomTextMatcher} Current DomTextMatcher instance.
681
- */
682
- function unwrap(match) {
683
- var i, elements = getWrappersByIndex(match ? indexOf(match) : null);
684
-
685
- i = elements.length;
686
- while (i--) {
687
- unwrapElement(elements[i]);
283
+ });
284
+ matches = filteredMatches;
285
+ return this;
286
+ }
287
+ function each(callback) {
288
+ for (var i = 0, l = matches.length; i < l; i++) {
289
+ if (callback(matches[i], i) === false) {
290
+ break;
688
291
  }
689
-
690
- return this;
691
- }
692
-
693
- /**
694
- * Returns a match object by the specified DOM element.
695
- *
696
- * @param {DOMElement} element Element to return match object for.
697
- * @return {Object} Match object for the specified element.
698
- */
699
- function matchFromElement(element) {
700
- return matches[element.getAttribute('data-mce-index')];
701
- }
702
-
703
- /**
704
- * Returns a DOM element from the specified match element. This will be the first element if it's split
705
- * on multiple nodes.
706
- *
707
- * @param {Object} match Match element to get first element of.
708
- * @return {DOMElement} DOM element for the specified match object.
709
- */
710
- function elementFromMatch(match) {
711
- return getWrappersByIndex(indexOf(match))[0];
712
- }
713
-
714
- /**
715
- * Adds match the specified range for example a grammar line.
716
- *
717
- * @param {Number} start Start offset.
718
- * @param {Number} length Length of the text.
719
- * @param {Object} data Custom data object for match.
720
- * @return {DomTextMatcher} Current DomTextMatcher instance.
721
- */
722
- function add(start, length, data) {
723
- matches.push({
724
- start: start,
725
- end: start + length,
726
- text: text.substr(start, length),
727
- data: data
728
- });
729
-
730
- return this;
731
292
  }
732
-
733
- /**
734
- * Returns a DOM range for the specified match.
735
- *
736
- * @param {Object} match Match object to get range for.
737
- * @return {DOMRange} DOM Range for the specified match.
738
- */
739
- function rangeFromMatch(match) {
740
- var wrappers = getWrappersByIndex(indexOf(match));
741
-
742
- var rng = editor.dom.createRng();
743
- rng.setStartBefore(wrappers[0]);
744
- rng.setEndAfter(wrappers[wrappers.length - 1]);
745
-
746
- return rng;
293
+ return this;
294
+ }
295
+ function wrap(callback) {
296
+ if (matches.length) {
297
+ stepThroughMatches(node, matches, genReplacer(callback));
747
298
  }
748
-
749
- /**
750
- * Replaces the specified match with the specified text.
751
- *
752
- * @param {Object} match Match object to replace.
753
- * @param {String} text Text to replace the match with.
754
- * @return {DOMRange} DOM range produced after the replace.
755
- */
756
- function replace(match, text) {
757
- var rng = rangeFromMatch(match);
758
-
759
- rng.deleteContents();
760
-
761
- if (text.length > 0) {
762
- rng.insertNode(editor.dom.doc.createTextNode(text));
299
+ return this;
300
+ }
301
+ function find(regex, data) {
302
+ if (text && regex.global) {
303
+ while (m = regex.exec(text)) {
304
+ matches.push(createMatch(m, data));
763
305
  }
764
-
765
- return rng;
766
- }
767
-
768
- /**
769
- * Resets the DomTextMatcher instance. This will remove any wrapped nodes and remove any matches.
770
- *
771
- * @return {[type]} [description]
772
- */
773
- function reset() {
774
- matches.splice(0, matches.length);
775
- unwrap();
776
-
777
- return this;
778
306
  }
779
-
780
- text = getText(node);
781
-
782
- return {
783
- text: text,
784
- matches: matches,
785
- each: each,
786
- filter: filter,
787
- reset: reset,
788
- matchFromElement: matchFromElement,
789
- elementFromMatch: elementFromMatch,
790
- find: find,
791
- add: add,
792
- wrap: wrap,
793
- unwrap: unwrap,
794
- replace: replace,
795
- rangeFromMatch: rangeFromMatch,
796
- indexOf: indexOf
797
- };
798
- };
799
- }
800
- );
801
- /**
802
- * Actions.js
803
- *
804
- * Released under LGPL License.
805
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
806
- *
807
- * License: http://www.tinymce.com/license
808
- * Contributing: http://www.tinymce.com/contributing
809
- */
810
-
811
- define(
812
- 'tinymce.plugins.spellchecker.core.Actions',
813
- [
814
- 'tinymce.core.util.Tools',
815
- 'tinymce.core.util.URI',
816
- 'tinymce.core.util.XHR',
817
- 'tinymce.plugins.spellchecker.api.Events',
818
- 'tinymce.plugins.spellchecker.api.Settings',
819
- 'tinymce.plugins.spellchecker.core.DomTextMatcher'
820
- ],
821
- function (Tools, URI, XHR, Events, Settings, DomTextMatcher) {
822
- var getTextMatcher = function (editor, textMatcherState) {
823
- if (!textMatcherState.get()) {
824
- var textMatcher = new DomTextMatcher(editor.getBody(), editor);
825
- textMatcherState.set(textMatcher);
826
- }
827
-
828
- return textMatcherState.get();
829
- };
830
-
831
- var isEmpty = function (obj) {
832
- for (var name in obj) {
833
- return false;
307
+ return this;
308
+ }
309
+ function unwrap(match) {
310
+ var i;
311
+ var elements = getWrappersByIndex(match ? indexOf(match) : null);
312
+ i = elements.length;
313
+ while (i--) {
314
+ unwrapElement(elements[i]);
315
+ }
316
+ return this;
317
+ }
318
+ function matchFromElement(element) {
319
+ return matches[element.getAttribute('data-mce-index')];
320
+ }
321
+ function elementFromMatch(match) {
322
+ return getWrappersByIndex(indexOf(match))[0];
323
+ }
324
+ function add(start, length, data) {
325
+ matches.push({
326
+ start: start,
327
+ end: start + length,
328
+ text: text.substr(start, length),
329
+ data: data
330
+ });
331
+ return this;
332
+ }
333
+ function rangeFromMatch(match) {
334
+ var wrappers = getWrappersByIndex(indexOf(match));
335
+ var rng = editor.dom.createRng();
336
+ rng.setStartBefore(wrappers[0]);
337
+ rng.setEndAfter(wrappers[wrappers.length - 1]);
338
+ return rng;
339
+ }
340
+ function replace(match, text) {
341
+ var rng = rangeFromMatch(match);
342
+ rng.deleteContents();
343
+ if (text.length > 0) {
344
+ rng.insertNode(editor.dom.doc.createTextNode(text));
834
345
  }
835
-
836
- return true;
837
- };
838
-
839
- var defaultSpellcheckCallback = function (editor, pluginUrl, currentLanguageState) {
840
- return function (method, text, doneCallback, errorCallback) {
841
- var data = { method: method, lang: currentLanguageState.get() }, postData = '';
842
-
843
- data[method === "addToDictionary" ? "word" : "text"] = text;
844
-
845
- Tools.each(data, function (value, key) {
846
- if (postData) {
847
- postData += '&';
848
- }
849
-
850
- postData += key + '=' + encodeURIComponent(value);
851
- });
852
-
853
- XHR.send({
854
- url: new URI(pluginUrl).toAbsolute(Settings.getRpcUrl(editor)),
855
- type: "post",
856
- content_type: 'application/x-www-form-urlencoded',
857
- data: postData,
858
- success: function (result) {
859
- result = JSON.parse(result);
860
-
861
- if (!result) {
862
- var message = editor.translate("Server response wasn't proper JSON.");
863
- errorCallback(message);
864
- } else if (result.error) {
865
- errorCallback(result.error);
866
- } else {
867
- doneCallback(result);
868
- }
869
- },
870
- error: function () {
871
- var message = editor.translate("The spelling service was not found: (") +
872
- Settings.getRpcUrl(editor) +
873
- editor.translate(")");
874
- errorCallback(message);
875
- }
876
- });
877
- };
878
- };
879
-
880
- var sendRpcCall = function (editor, pluginUrl, currentLanguageState, name, data, successCallback, errorCallback) {
881
- var userSpellcheckCallback = Settings.getSpellcheckerCallback(editor);
882
- var spellCheckCallback = userSpellcheckCallback ? userSpellcheckCallback : defaultSpellcheckCallback(editor, pluginUrl, currentLanguageState);
883
- spellCheckCallback.call(editor.plugins.spellchecker, name, data, successCallback, errorCallback);
346
+ return rng;
347
+ }
348
+ function reset() {
349
+ matches.splice(0, matches.length);
350
+ unwrap();
351
+ return this;
352
+ }
353
+ text = getText(node);
354
+ return {
355
+ text: text,
356
+ matches: matches,
357
+ each: each,
358
+ filter: filter,
359
+ reset: reset,
360
+ matchFromElement: matchFromElement,
361
+ elementFromMatch: elementFromMatch,
362
+ find: find,
363
+ add: add,
364
+ wrap: wrap,
365
+ unwrap: unwrap,
366
+ replace: replace,
367
+ rangeFromMatch: rangeFromMatch,
368
+ indexOf: indexOf
884
369
  };
370
+ };
885
371
 
886
- var spellcheck = function (editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState) {
887
- if (finish(editor, startedState, textMatcherState)) {
888
- return;
889
- }
890
-
891
- var errorCallback = function (message) {
892
- editor.notificationManager.open({ text: message, type: 'error' });
893
- editor.setProgressState(false);
894
- finish(editor, startedState, textMatcherState);
895
- };
896
-
897
- var successCallback = function (data) {
898
- markErrors(editor, startedState, textMatcherState, lastSuggestionsState, data);
372
+ var getTextMatcher = function (editor, textMatcherState) {
373
+ if (!textMatcherState.get()) {
374
+ var textMatcher = DomTextMatcher(editor.getBody(), editor);
375
+ textMatcherState.set(textMatcher);
376
+ }
377
+ return textMatcherState.get();
378
+ };
379
+ var isEmpty = function (obj) {
380
+ for (var _ in obj) {
381
+ return false;
382
+ }
383
+ return true;
384
+ };
385
+ var defaultSpellcheckCallback = function (editor, pluginUrl, currentLanguageState) {
386
+ return function (method, text, doneCallback, errorCallback) {
387
+ var data = {
388
+ method: method,
389
+ lang: currentLanguageState.get()
899
390
  };
900
-
901
- editor.setProgressState(true);
902
- sendRpcCall(editor, pluginUrl, currentLanguageState, "spellcheck", getTextMatcher(editor, textMatcherState).text, successCallback, errorCallback);
903
- editor.focus();
904
- };
905
-
906
- var checkIfFinished = function (editor, startedState, textMatcherState) {
907
- if (!editor.dom.select('span.mce-spellchecker-word').length) {
908
- finish(editor, startedState, textMatcherState);
909
- }
910
- };
911
-
912
- var addToDictionary = function (editor, pluginUrl, startedState, textMatcherState, word, spans) {
913
- editor.setProgressState(true);
914
-
915
- sendRpcCall(editor, pluginUrl, 'addToDictionary', word, function () {
916
- editor.setProgressState(false);
917
- editor.dom.remove(spans, true);
918
- checkIfFinished(editor, startedState, textMatcherState);
919
- }, function (message) {
920
- editor.notificationManager.open({ text: message, type: 'error' });
921
- editor.setProgressState(false);
391
+ var postData = '';
392
+ data[method === 'addToDictionary' ? 'word' : 'text'] = text;
393
+ global$1.each(data, function (value, key) {
394
+ if (postData) {
395
+ postData += '&';
396
+ }
397
+ postData += key + '=' + encodeURIComponent(value);
922
398
  });
923
- };
924
-
925
- var ignoreWord = function (editor, startedState, textMatcherState, word, spans, all) {
926
- editor.selection.collapse();
927
-
928
- if (all) {
929
- Tools.each(editor.dom.select('span.mce-spellchecker-word'), function (span) {
930
- if (span.getAttribute('data-mce-word') === word) {
931
- editor.dom.remove(span, true);
399
+ global$3.send({
400
+ url: new global$2(pluginUrl).toAbsolute($_1zygcfkajm0ofzxr.getRpcUrl(editor)),
401
+ type: 'post',
402
+ content_type: 'application/x-www-form-urlencoded',
403
+ data: postData,
404
+ success: function (result) {
405
+ result = JSON.parse(result);
406
+ if (!result) {
407
+ var message = editor.translate('Server response wasn\'t proper JSON.');
408
+ errorCallback(message);
409
+ } else if (result.error) {
410
+ errorCallback(result.error);
411
+ } else {
412
+ doneCallback(result);
932
413
  }
933
- });
934
- } else {
935
- editor.dom.remove(spans, true);
936
- }
937
-
938
- checkIfFinished(editor, startedState, textMatcherState);
414
+ },
415
+ error: function () {
416
+ var message = editor.translate('The spelling service was not found: (') + $_1zygcfkajm0ofzxr.getRpcUrl(editor) + editor.translate(')');
417
+ errorCallback(message);
418
+ }
419
+ });
939
420
  };
940
-
941
- var finish = function (editor, startedState, textMatcherState) {
942
- getTextMatcher(editor, textMatcherState).reset();
943
- textMatcherState.set(null);
944
-
945
- if (startedState.get()) {
946
- startedState.set(false);
947
- Events.fireSpellcheckEnd(editor);
948
- return true;
949
- }
421
+ };
422
+ var sendRpcCall = function (editor, pluginUrl, currentLanguageState, name, data, successCallback, errorCallback) {
423
+ var userSpellcheckCallback = $_1zygcfkajm0ofzxr.getSpellcheckerCallback(editor);
424
+ var spellCheckCallback = userSpellcheckCallback ? userSpellcheckCallback : defaultSpellcheckCallback(editor, pluginUrl, currentLanguageState);
425
+ spellCheckCallback.call(editor.plugins.spellchecker, name, data, successCallback, errorCallback);
426
+ };
427
+ var spellcheck = function (editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState) {
428
+ if (finish(editor, startedState, textMatcherState)) {
429
+ return;
430
+ }
431
+ var errorCallback = function (message) {
432
+ editor.notificationManager.open({
433
+ text: message,
434
+ type: 'error'
435
+ });
436
+ editor.setProgressState(false);
437
+ finish(editor, startedState, textMatcherState);
950
438
  };
951
-
952
- var getElmIndex = function (elm) {
953
- var value = elm.getAttribute('data-mce-index');
954
-
955
- if (typeof value === "number") {
956
- return "" + value;
957
- }
958
-
959
- return value;
439
+ var successCallback = function (data) {
440
+ markErrors(editor, startedState, textMatcherState, lastSuggestionsState, data);
960
441
  };
961
-
962
- var findSpansByIndex = function (editor, index) {
963
- var nodes, spans = [];
964
-
965
- nodes = Tools.toArray(editor.getBody().getElementsByTagName('span'));
966
- if (nodes.length) {
967
- for (var i = 0; i < nodes.length; i++) {
968
- var nodeIndex = getElmIndex(nodes[i]);
969
-
970
- if (nodeIndex === null || !nodeIndex.length) {
971
- continue;
972
- }
973
-
974
- if (nodeIndex === index.toString()) {
975
- spans.push(nodes[i]);
976
- }
977
- }
978
- }
979
-
980
- return spans;
981
- };
982
-
983
- var markErrors = function (editor, startedState, textMatcherState, lastSuggestionsState, data) {
984
- var suggestions, hasDictionarySupport;
985
-
986
- if (data.words) {
987
- hasDictionarySupport = !!data.dictionary;
988
- suggestions = data.words;
989
- } else {
990
- // Fallback to old format
991
- suggestions = data;
992
- }
993
-
442
+ editor.setProgressState(true);
443
+ sendRpcCall(editor, pluginUrl, currentLanguageState, 'spellcheck', getTextMatcher(editor, textMatcherState).text, successCallback, errorCallback);
444
+ editor.focus();
445
+ };
446
+ var checkIfFinished = function (editor, startedState, textMatcherState) {
447
+ if (!editor.dom.select('span.mce-spellchecker-word').length) {
448
+ finish(editor, startedState, textMatcherState);
449
+ }
450
+ };
451
+ var addToDictionary = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, word, spans) {
452
+ editor.setProgressState(true);
453
+ sendRpcCall(editor, pluginUrl, currentLanguageState, 'addToDictionary', word, function () {
994
454
  editor.setProgressState(false);
995
-
996
- if (isEmpty(suggestions)) {
997
- var message = editor.translate('No misspellings found.');
998
- editor.notificationManager.open({ text: message, type: 'info' });
999
- startedState.set(false);
1000
- return;
455
+ editor.dom.remove(spans, true);
456
+ checkIfFinished(editor, startedState, textMatcherState);
457
+ }, function (message) {
458
+ editor.notificationManager.open({
459
+ text: message,
460
+ type: 'error'
461
+ });
462
+ editor.setProgressState(false);
463
+ });
464
+ };
465
+ var ignoreWord = function (editor, startedState, textMatcherState, word, spans, all) {
466
+ editor.selection.collapse();
467
+ if (all) {
468
+ global$1.each(editor.dom.select('span.mce-spellchecker-word'), function (span) {
469
+ if (span.getAttribute('data-mce-word') === word) {
470
+ editor.dom.remove(span, true);
471
+ }
472
+ });
473
+ } else {
474
+ editor.dom.remove(spans, true);
475
+ }
476
+ checkIfFinished(editor, startedState, textMatcherState);
477
+ };
478
+ var finish = function (editor, startedState, textMatcherState) {
479
+ getTextMatcher(editor, textMatcherState).reset();
480
+ textMatcherState.set(null);
481
+ if (startedState.get()) {
482
+ startedState.set(false);
483
+ $_3ve0l5kfjm0ofzxz.fireSpellcheckEnd(editor);
484
+ return true;
485
+ }
486
+ };
487
+ var getElmIndex = function (elm) {
488
+ var value = elm.getAttribute('data-mce-index');
489
+ if (typeof value === 'number') {
490
+ return '' + value;
491
+ }
492
+ return value;
493
+ };
494
+ var findSpansByIndex = function (editor, index) {
495
+ var nodes;
496
+ var spans = [];
497
+ nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
498
+ if (nodes.length) {
499
+ for (var i = 0; i < nodes.length; i++) {
500
+ var nodeIndex = getElmIndex(nodes[i]);
501
+ if (nodeIndex === null || !nodeIndex.length) {
502
+ continue;
503
+ }
504
+ if (nodeIndex === index.toString()) {
505
+ spans.push(nodes[i]);
506
+ }
1001
507
  }
1002
-
1003
- lastSuggestionsState.set({
1004
- suggestions: suggestions,
1005
- hasDictionarySupport: hasDictionarySupport
508
+ }
509
+ return spans;
510
+ };
511
+ var markErrors = function (editor, startedState, textMatcherState, lastSuggestionsState, data) {
512
+ var suggestions, hasDictionarySupport;
513
+ if (typeof data !== 'string' && data.words) {
514
+ hasDictionarySupport = !!data.dictionary;
515
+ suggestions = data.words;
516
+ } else {
517
+ suggestions = data;
518
+ }
519
+ editor.setProgressState(false);
520
+ if (isEmpty(suggestions)) {
521
+ var message = editor.translate('No misspellings found.');
522
+ editor.notificationManager.open({
523
+ text: message,
524
+ type: 'info'
1006
525
  });
1007
-
1008
- getTextMatcher(editor, textMatcherState).find(Settings.getSpellcheckerWordcharPattern(editor)).filter(function (match) {
1009
- return !!suggestions[match.text];
1010
- }).wrap(function (match) {
1011
- return editor.dom.create('span', {
1012
- "class": 'mce-spellchecker-word',
1013
- "data-mce-bogus": 1,
1014
- "data-mce-word": match.text
1015
- });
526
+ startedState.set(false);
527
+ return;
528
+ }
529
+ lastSuggestionsState.set({
530
+ suggestions: suggestions,
531
+ hasDictionarySupport: hasDictionarySupport
532
+ });
533
+ getTextMatcher(editor, textMatcherState).find($_1zygcfkajm0ofzxr.getSpellcheckerWordcharPattern(editor)).filter(function (match) {
534
+ return !!suggestions[match.text];
535
+ }).wrap(function (match) {
536
+ return editor.dom.create('span', {
537
+ 'class': 'mce-spellchecker-word',
538
+ 'data-mce-bogus': 1,
539
+ 'data-mce-word': match.text
1016
540
  });
541
+ });
542
+ startedState.set(true);
543
+ $_3ve0l5kfjm0ofzxz.fireSpellcheckStart(editor);
544
+ };
545
+ var $_92arclkbjm0ofzxt = {
546
+ spellcheck: spellcheck,
547
+ checkIfFinished: checkIfFinished,
548
+ addToDictionary: addToDictionary,
549
+ ignoreWord: ignoreWord,
550
+ findSpansByIndex: findSpansByIndex,
551
+ getElmIndex: getElmIndex,
552
+ markErrors: markErrors
553
+ };
1017
554
 
1018
- startedState.set(true);
1019
- Events.fireSpellcheckStart(editor);
1020
- };
1021
-
1022
- return {
1023
- spellcheck: spellcheck,
1024
- checkIfFinished: checkIfFinished,
1025
- addToDictionary: addToDictionary,
1026
- ignoreWord: ignoreWord,
1027
- findSpansByIndex: findSpansByIndex,
1028
- getElmIndex: getElmIndex,
1029
- markErrors: markErrors
555
+ var get = function (editor, startedState, lastSuggestionsState, textMatcherState, currentLanguageState, url) {
556
+ var getLanguage = function () {
557
+ return currentLanguageState.get();
1030
558
  };
1031
- }
1032
- );
1033
- /**
1034
- * Api.js
1035
- *
1036
- * Released under LGPL License.
1037
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1038
- *
1039
- * License: http://www.tinymce.com/license
1040
- * Contributing: http://www.tinymce.com/contributing
1041
- */
1042
-
1043
- define(
1044
- 'tinymce.plugins.spellchecker.api.Api',
1045
- [
1046
- 'tinymce.plugins.spellchecker.api.Settings',
1047
- 'tinymce.plugins.spellchecker.core.Actions'
1048
- ],
1049
- function (Settings, Actions) {
1050
- var get = function (editor, startedState, lastSuggestionsState, textMatcherState, url) {
1051
- var getLanguage = function () {
1052
- return Settings.getLanguage(editor);
1053
- };
1054
-
1055
- var getWordCharPattern = function () {
1056
- return Settings.getSpellcheckerWordcharPattern(editor);
1057
- };
1058
-
1059
- var markErrors = function (data) {
1060
- Actions.markErrors(editor, startedState, textMatcherState, lastSuggestionsState, data);
1061
- };
1062
-
1063
- var getTextMatcher = function () {
1064
- return textMatcherState.get();
1065
- };
1066
-
1067
- return {
1068
- getTextMatcher: getTextMatcher,
1069
- getWordCharPattern: getWordCharPattern,
1070
- markErrors: markErrors,
1071
- getLanguage: getLanguage
1072
- };
559
+ var getWordCharPattern = function () {
560
+ return $_1zygcfkajm0ofzxr.getSpellcheckerWordcharPattern(editor);
1073
561
  };
1074
-
1075
- return {
1076
- get: get
562
+ var markErrors = function (data) {
563
+ $_92arclkbjm0ofzxt.markErrors(editor, startedState, textMatcherState, lastSuggestionsState, data);
1077
564
  };
1078
- }
1079
- );
1080
- /**
1081
- * Commands.js
1082
- *
1083
- * Released under LGPL License.
1084
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1085
- *
1086
- * License: http://www.tinymce.com/license
1087
- * Contributing: http://www.tinymce.com/contributing
1088
- */
1089
-
1090
- define(
1091
- 'tinymce.plugins.spellchecker.api.Commands',
1092
- [
1093
- 'tinymce.plugins.spellchecker.core.Actions'
1094
- ],
1095
- function (Actions) {
1096
- var register = function (editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState) {
1097
- editor.addCommand('mceSpellCheck', function () {
1098
- Actions.spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
1099
- });
565
+ var getTextMatcher = function () {
566
+ return textMatcherState.get();
1100
567
  };
1101
-
1102
568
  return {
1103
- register: register
569
+ getTextMatcher: getTextMatcher,
570
+ getWordCharPattern: getWordCharPattern,
571
+ markErrors: markErrors,
572
+ getLanguage: getLanguage
1104
573
  };
1105
- }
1106
- );
1107
- /**
1108
- * Buttons.js
1109
- *
1110
- * Released under LGPL License.
1111
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1112
- *
1113
- * License: http://www.tinymce.com/license
1114
- * Contributing: http://www.tinymce.com/contributing
1115
- */
574
+ };
575
+ var $_683bglk9jm0ofzxp = { get: get };
1116
576
 
1117
- define(
1118
- 'tinymce.plugins.spellchecker.ui.Buttons',
1119
- [
1120
- 'tinymce.core.util.Tools',
1121
- 'tinymce.plugins.spellchecker.api.Settings',
1122
- 'tinymce.plugins.spellchecker.core.Actions'
1123
- ],
1124
- function (Tools, Settings, Actions) {
1125
- var buildMenuItems = function (listName, languageValues) {
1126
- var items = [];
577
+ var register = function (editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState) {
578
+ editor.addCommand('mceSpellCheck', function () {
579
+ $_92arclkbjm0ofzxt.spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
580
+ });
581
+ };
582
+ var $_te08fkhjm0ofzy7 = { register: register };
1127
583
 
1128
- Tools.each(languageValues, function (languageValue) {
1129
- items.push({
1130
- selectable: true,
1131
- text: languageValue.name,
1132
- data: languageValue.value
1133
- });
584
+ var buildMenuItems = function (listName, languageValues) {
585
+ var items = [];
586
+ global$1.each(languageValues, function (languageValue) {
587
+ items.push({
588
+ selectable: true,
589
+ text: languageValue.name,
590
+ data: languageValue.value
1134
591
  });
1135
-
1136
- return items;
1137
- };
1138
-
1139
- var updateSelection = function (editor) {
1140
- return function (e) {
1141
- var selectedLanguage = Settings.getLanguage(editor);
1142
-
1143
- e.control.items().each(function (ctrl) {
1144
- ctrl.active(ctrl.settings.data === selectedLanguage);
1145
- });
1146
- };
1147
- };
1148
-
1149
- var getItems = function (editor) {
1150
- return Tools.map(Settings.getLanguages(editor).split(','), function (langPair) {
1151
- langPair = langPair.split('=');
1152
-
1153
- return {
1154
- name: langPair[0],
1155
- value: langPair[1]
1156
- };
592
+ });
593
+ return items;
594
+ };
595
+ var updateSelection = function (editor, currentLanguageState) {
596
+ return function (e) {
597
+ var selectedLanguage = currentLanguageState.get();
598
+ e.control.items().each(function (ctrl) {
599
+ ctrl.active(ctrl.settings.data === selectedLanguage);
1157
600
  });
1158
601
  };
1159
-
1160
- var register = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState) {
1161
- var languageMenuItems = buildMenuItems('Language', getItems(editor));
1162
- var startSpellchecking = function () {
1163
- Actions.spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
1164
- };
1165
-
1166
- var buttonArgs = {
1167
- tooltip: 'Spellcheck',
1168
- onclick: startSpellchecking,
1169
- onPostRender: function (e) {
1170
- var ctrl = e.control;
1171
-
1172
- editor.on('SpellcheckStart SpellcheckEnd', function () {
1173
- ctrl.active(startedState.get());
1174
- });
1175
- }
602
+ };
603
+ var getItems = function (editor) {
604
+ return global$1.map($_1zygcfkajm0ofzxr.getLanguages(editor).split(','), function (langPair) {
605
+ langPair = langPair.split('=');
606
+ return {
607
+ name: langPair[0],
608
+ value: langPair[1]
1176
609
  };
1177
-
1178
- if (languageMenuItems.length > 1) {
1179
- buttonArgs.type = 'splitbutton';
1180
- buttonArgs.menu = languageMenuItems;
1181
- buttonArgs.onshow = updateSelection(editor);
1182
- buttonArgs.onselect = function (e) {
1183
- currentLanguageState.set(e.control.settings.data);
1184
- };
610
+ });
611
+ };
612
+ var register$1 = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState) {
613
+ var languageMenuItems = buildMenuItems('Language', getItems(editor));
614
+ var startSpellchecking = function () {
615
+ $_92arclkbjm0ofzxt.spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
616
+ };
617
+ var buttonArgs = {
618
+ tooltip: 'Spellcheck',
619
+ onclick: startSpellchecking,
620
+ onPostRender: function (e) {
621
+ var ctrl = e.control;
622
+ editor.on('SpellcheckStart SpellcheckEnd', function () {
623
+ ctrl.active(startedState.get());
624
+ });
1185
625
  }
1186
-
1187
- editor.addButton('spellchecker', buttonArgs);
1188
-
1189
- editor.addMenuItem('spellchecker', {
1190
- text: 'Spellcheck',
1191
- context: 'tools',
1192
- onclick: startSpellchecking,
1193
- selectable: true,
1194
- onPostRender: function () {
1195
- var self = this;
1196
-
1197
- self.active(startedState.get());
1198
-
1199
- editor.on('SpellcheckStart SpellcheckEnd', function () {
1200
- self.active(startedState.get());
1201
- });
1202
- }
1203
- });
1204
626
  };
1205
-
1206
- return {
1207
- register: register
1208
- };
1209
- }
1210
- );
1211
- defineGlobal("global!document", document);
1212
- /**
1213
- * ResolveGlobal.js
1214
- *
1215
- * Released under LGPL License.
1216
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1217
- *
1218
- * License: http://www.tinymce.com/license
1219
- * Contributing: http://www.tinymce.com/contributing
1220
- */
1221
-
1222
- define(
1223
- 'tinymce.core.dom.DOMUtils',
1224
- [
1225
- 'global!tinymce.util.Tools.resolve'
1226
- ],
1227
- function (resolve) {
1228
- return resolve('tinymce.dom.DOMUtils');
1229
- }
1230
- );
1231
-
1232
- /**
1233
- * ResolveGlobal.js
1234
- *
1235
- * Released under LGPL License.
1236
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1237
- *
1238
- * License: http://www.tinymce.com/license
1239
- * Contributing: http://www.tinymce.com/contributing
1240
- */
1241
-
1242
- define(
1243
- 'tinymce.core.ui.Factory',
1244
- [
1245
- 'global!tinymce.util.Tools.resolve'
1246
- ],
1247
- function (resolve) {
1248
- return resolve('tinymce.ui.Factory');
1249
- }
1250
- );
1251
-
1252
- /**
1253
- * SuggestionsMenu.js
1254
- *
1255
- * Released under LGPL License.
1256
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1257
- *
1258
- * License: http://www.tinymce.com/license
1259
- * Contributing: http://www.tinymce.com/contributing
1260
- */
1261
-
1262
- define(
1263
- 'tinymce.plugins.spellchecker.ui.SuggestionsMenu',
1264
- [
1265
- 'global!document',
1266
- 'tinymce.core.dom.DOMUtils',
1267
- 'tinymce.core.ui.Factory',
1268
- 'tinymce.core.util.Tools',
1269
- 'tinymce.plugins.spellchecker.api.Settings',
1270
- 'tinymce.plugins.spellchecker.core.Actions'
1271
- ],
1272
- function (document, DOMUtils, Factory, Tools, Settings, Actions) {
1273
- var suggestionsMenu;
1274
-
1275
- var showSuggestions = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, word, spans) {
1276
- var items = [], suggestions = lastSuggestionsState.get().suggestions[word];
1277
-
1278
- Tools.each(suggestions, function (suggestion) {
1279
- items.push({
1280
- text: suggestion,
1281
- onclick: function () {
1282
- editor.insertContent(editor.dom.encode(suggestion));
1283
- editor.dom.remove(spans);
1284
- Actions.checkIfFinished(editor, startedState, textMatcherState);
1285
- }
1286
- });
1287
- });
1288
-
1289
- items.push({ text: '-' });
1290
-
1291
- var hasDictionarySupport = lastSuggestionsState.get().hasDictionarySupport;
1292
- if (hasDictionarySupport) {
1293
- items.push({
1294
- text: 'Add to Dictionary', onclick: function () {
1295
- Actions.addToDictionary(editor, pluginUrl, startedState, textMatcherState, word, spans);
1296
- }
627
+ if (languageMenuItems.length > 1) {
628
+ buttonArgs.type = 'splitbutton';
629
+ buttonArgs.menu = languageMenuItems;
630
+ buttonArgs.onshow = updateSelection(editor, currentLanguageState);
631
+ buttonArgs.onselect = function (e) {
632
+ currentLanguageState.set(e.control.settings.data);
633
+ };
634
+ }
635
+ editor.addButton('spellchecker', buttonArgs);
636
+ editor.addMenuItem('spellchecker', {
637
+ text: 'Spellcheck',
638
+ context: 'tools',
639
+ onclick: startSpellchecking,
640
+ selectable: true,
641
+ onPostRender: function () {
642
+ var self = this;
643
+ self.active(startedState.get());
644
+ editor.on('SpellcheckStart SpellcheckEnd', function () {
645
+ self.active(startedState.get());
1297
646
  });
1298
647
  }
1299
-
1300
- items.push.apply(items, [
1301
- {
1302
- text: 'Ignore', onclick: function () {
1303
- Actions.ignoreWord(editor, startedState, textMatcherState, word, spans);
1304
- }
1305
- },
1306
-
1307
- {
1308
- text: 'Ignore all', onclick: function () {
1309
- Actions.ignoreWord(editor, startedState, textMatcherState, word, spans, true);
1310
- }
648
+ });
649
+ };
650
+ var $_9frydykijm0ofzy9 = { register: register$1 };
651
+
652
+ var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
653
+
654
+ var global$5 = tinymce.util.Tools.resolve('tinymce.ui.Factory');
655
+
656
+ var suggestionsMenu;
657
+ var showSuggestions = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState, word, spans) {
658
+ var items = [], suggestions = lastSuggestionsState.get().suggestions[word];
659
+ global$1.each(suggestions, function (suggestion) {
660
+ items.push({
661
+ text: suggestion,
662
+ onclick: function () {
663
+ editor.insertContent(editor.dom.encode(suggestion));
664
+ editor.dom.remove(spans);
665
+ $_92arclkbjm0ofzxt.checkIfFinished(editor, startedState, textMatcherState);
1311
666
  }
1312
- ]);
1313
-
1314
- // Render menu
1315
- suggestionsMenu = Factory.create('menu', {
1316
- items: items,
1317
- context: 'contextmenu',
1318
- onautohide: function (e) {
1319
- if (e.target.className.indexOf('spellchecker') !== -1) {
1320
- e.preventDefault();
1321
- }
1322
- },
1323
- onhide: function () {
1324
- suggestionsMenu.remove();
1325
- suggestionsMenu = null;
667
+ });
668
+ });
669
+ items.push({ text: '-' });
670
+ var hasDictionarySupport = lastSuggestionsState.get().hasDictionarySupport;
671
+ if (hasDictionarySupport) {
672
+ items.push({
673
+ text: 'Add to Dictionary',
674
+ onclick: function () {
675
+ $_92arclkbjm0ofzxt.addToDictionary(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, word, spans);
1326
676
  }
1327
677
  });
1328
-
1329
- suggestionsMenu.renderTo(document.body);
1330
-
1331
- // Position menu
1332
- var pos = DOMUtils.DOM.getPos(editor.getContentAreaContainer());
1333
- var targetPos = editor.dom.getPos(spans[0]);
1334
- var root = editor.dom.getRoot();
1335
-
1336
- // Adjust targetPos for scrolling in the editor
1337
- if (root.nodeName === 'BODY') {
1338
- targetPos.x -= root.ownerDocument.documentElement.scrollLeft || root.scrollLeft;
1339
- targetPos.y -= root.ownerDocument.documentElement.scrollTop || root.scrollTop;
1340
- } else {
1341
- targetPos.x -= root.scrollLeft;
1342
- targetPos.y -= root.scrollTop;
678
+ }
679
+ items.push.apply(items, [
680
+ {
681
+ text: 'Ignore',
682
+ onclick: function () {
683
+ $_92arclkbjm0ofzxt.ignoreWord(editor, startedState, textMatcherState, word, spans);
684
+ }
685
+ },
686
+ {
687
+ text: 'Ignore all',
688
+ onclick: function () {
689
+ $_92arclkbjm0ofzxt.ignoreWord(editor, startedState, textMatcherState, word, spans, true);
690
+ }
1343
691
  }
1344
-
1345
- pos.x += targetPos.x;
1346
- pos.y += targetPos.y;
1347
-
1348
- suggestionsMenu.moveTo(pos.x, pos.y + spans[0].offsetHeight);
1349
- };
1350
-
1351
- var setup = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState) {
1352
- editor.on('click', function (e) {
1353
- var target = e.target;
1354
-
1355
- if (target.className === "mce-spellchecker-word") {
692
+ ]);
693
+ suggestionsMenu = global$5.create('menu', {
694
+ items: items,
695
+ context: 'contextmenu',
696
+ onautohide: function (e) {
697
+ if (e.target.className.indexOf('spellchecker') !== -1) {
1356
698
  e.preventDefault();
1357
-
1358
- var spans = Actions.findSpansByIndex(editor, Actions.getElmIndex(target));
1359
-
1360
- if (spans.length > 0) {
1361
- var rng = editor.dom.createRng();
1362
- rng.setStartBefore(spans[0]);
1363
- rng.setEndAfter(spans[spans.length - 1]);
1364
- editor.selection.setRng(rng);
1365
- showSuggestions(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, target.getAttribute('data-mce-word'), spans);
1366
- }
1367
699
  }
1368
- });
1369
- };
1370
-
1371
- return {
1372
- setup: setup
1373
- };
1374
- }
1375
- );
1376
-
1377
- /**
1378
- * Plugin.js
1379
- *
1380
- * Released under LGPL License.
1381
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1382
- *
1383
- * License: http://www.tinymce.com/license
1384
- * Contributing: http://www.tinymce.com/contributing
1385
- */
1386
-
1387
- define(
1388
- 'tinymce.plugins.spellchecker.Plugin',
1389
- [
1390
- 'ephox.katamari.api.Cell',
1391
- 'tinymce.core.PluginManager',
1392
- 'tinymce.plugins.spellchecker.alien.DetectProPlugin',
1393
- 'tinymce.plugins.spellchecker.api.Api',
1394
- 'tinymce.plugins.spellchecker.api.Commands',
1395
- 'tinymce.plugins.spellchecker.api.Settings',
1396
- 'tinymce.plugins.spellchecker.ui.Buttons',
1397
- 'tinymce.plugins.spellchecker.ui.SuggestionsMenu'
1398
- ],
1399
- function (Cell, PluginManager, DetectProPlugin, Api, Commands, Settings, Buttons, SuggestionsMenu) {
1400
- PluginManager.add('spellchecker', function (editor, pluginUrl) {
1401
- if (DetectProPlugin.hasProPlugin(editor) === false) {
1402
- var startedState = Cell(false);
1403
- var currentLanguageState = Cell(Settings.getLanguage(editor));
1404
- var textMatcherState = Cell(null);
1405
- var lastSuggestionsState = Cell({});
1406
-
1407
- Buttons.register(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState);
1408
- SuggestionsMenu.setup(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState);
1409
- Commands.register(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
1410
-
1411
- return Api.get(editor, startedState, lastSuggestionsState, textMatcherState, pluginUrl);
700
+ },
701
+ onhide: function () {
702
+ suggestionsMenu.remove();
703
+ suggestionsMenu = null;
1412
704
  }
1413
705
  });
1414
-
1415
- return function () { };
706
+ suggestionsMenu.renderTo(document.body);
707
+ var pos = global$4.DOM.getPos(editor.getContentAreaContainer());
708
+ var targetPos = editor.dom.getPos(spans[0]);
709
+ var root = editor.dom.getRoot();
710
+ if (root.nodeName === 'BODY') {
711
+ targetPos.x -= root.ownerDocument.documentElement.scrollLeft || root.scrollLeft;
712
+ targetPos.y -= root.ownerDocument.documentElement.scrollTop || root.scrollTop;
713
+ } else {
714
+ targetPos.x -= root.scrollLeft;
715
+ targetPos.y -= root.scrollTop;
716
+ }
717
+ pos.x += targetPos.x;
718
+ pos.y += targetPos.y;
719
+ suggestionsMenu.moveTo(pos.x, pos.y + spans[0].offsetHeight);
720
+ };
721
+ var setup = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState) {
722
+ editor.on('click', function (e) {
723
+ var target = e.target;
724
+ if (target.className === 'mce-spellchecker-word') {
725
+ e.preventDefault();
726
+ var spans = $_92arclkbjm0ofzxt.findSpansByIndex(editor, $_92arclkbjm0ofzxt.getElmIndex(target));
727
+ if (spans.length > 0) {
728
+ var rng = editor.dom.createRng();
729
+ rng.setStartBefore(spans[0]);
730
+ rng.setEndAfter(spans[spans.length - 1]);
731
+ editor.selection.setRng(rng);
732
+ showSuggestions(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState, target.getAttribute('data-mce-word'), spans);
733
+ }
734
+ }
735
+ });
736
+ };
737
+ var $_1vacjdkjjm0ofzyb = { setup: setup };
738
+
739
+ global.add('spellchecker', function (editor, pluginUrl) {
740
+ if ($_9tnsahk7jm0ofzx4.hasProPlugin(editor) === false) {
741
+ var startedState = Cell(false);
742
+ var currentLanguageState = Cell($_1zygcfkajm0ofzxr.getLanguage(editor));
743
+ var textMatcherState = Cell(null);
744
+ var lastSuggestionsState = Cell(null);
745
+ $_9frydykijm0ofzy9.register(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState);
746
+ $_1vacjdkjjm0ofzyb.setup(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState);
747
+ $_te08fkhjm0ofzy7.register(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
748
+ return $_683bglk9jm0ofzxp.get(editor, startedState, lastSuggestionsState, textMatcherState, currentLanguageState, pluginUrl);
749
+ }
750
+ });
751
+ function Plugin () {
1416
752
  }
1417
- );
1418
- dem('tinymce.plugins.spellchecker.Plugin')();
753
+
754
+ return Plugin;
755
+
756
+ }());
1419
757
  })();