glebtv-ckeditor 4.7.3 → 4.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (380) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +13 -12
  3. data/README.md +358 -2
  4. data/Rakefile +17 -17
  5. data/app/assets/javascripts/ckeditor/config.js.erb +3 -3
  6. data/app/controllers/ckeditor/application_controller.rb +3 -0
  7. data/app/controllers/ckeditor/attachment_files_controller.rb +2 -0
  8. data/app/controllers/ckeditor/pictures_controller.rb +2 -0
  9. data/app/helpers/ckeditor/application_helper.rb +2 -0
  10. data/config/locales/bg.ckeditor.yml +9 -0
  11. data/config/locales/cs.ckeditor.yml +9 -0
  12. data/config/locales/da.ckeditor.yml +9 -0
  13. data/config/locales/de.ckeditor.yml +9 -0
  14. data/config/locales/el-GR.cdkeditor.yml +9 -0
  15. data/config/locales/es.ckeditor.yml +9 -0
  16. data/config/locales/fr.ckeditor.yml +9 -0
  17. data/config/locales/hu.ckeditor.yml +9 -0
  18. data/config/locales/it.ckeditor.yml +9 -0
  19. data/config/locales/ja.ckeditor.yml +9 -0
  20. data/config/locales/nb.ckeditor.yml +9 -0
  21. data/config/locales/nl.ckeditor.yml +9 -0
  22. data/config/locales/pl.ckeditor.yml +9 -0
  23. data/config/locales/pt-BR.ckeditor.yml +9 -0
  24. data/config/locales/pt-PT.ckeditor.yml +9 -0
  25. data/config/locales/pt.ckeditor.yml +9 -0
  26. data/config/locales/sq.ckeditor.yml +9 -0
  27. data/config/locales/sv-SE.ckeditor.yml +9 -0
  28. data/config/locales/tr.ckeditor.yml +9 -0
  29. data/config/locales/uk.ckeditor.yml +9 -0
  30. data/config/locales/zh-CN.ckeditor.yml +9 -0
  31. data/config/locales/zh-TW.ckeditor.yml +9 -0
  32. data/config/routes.rb +2 -0
  33. data/lib/ckeditor.rb +13 -16
  34. data/lib/ckeditor/asset_response.rb +15 -4
  35. data/lib/ckeditor/backend/active_storage.rb +68 -0
  36. data/lib/ckeditor/backend/carrierwave.rb +2 -12
  37. data/lib/ckeditor/backend/dragonfly.rb +2 -0
  38. data/lib/ckeditor/backend/paperclip.rb +2 -15
  39. data/lib/ckeditor/backend/shrine.rb +29 -0
  40. data/lib/ckeditor/helpers/controllers.rb +2 -0
  41. data/lib/ckeditor/helpers/form_builder.rb +2 -0
  42. data/lib/ckeditor/helpers/form_helper.rb +2 -0
  43. data/lib/ckeditor/helpers/view_helper.rb +2 -0
  44. data/lib/ckeditor/hooks/cancan.rb +4 -1
  45. data/lib/ckeditor/hooks/formtastic.rb +2 -0
  46. data/lib/ckeditor/hooks/pundit.rb +2 -0
  47. data/lib/ckeditor/hooks/simple_form.rb +2 -0
  48. data/lib/ckeditor/http.rb +8 -5
  49. data/lib/ckeditor/orm/active_record.rb +2 -0
  50. data/lib/ckeditor/orm/base.rb +11 -2
  51. data/lib/ckeditor/orm/mongoid.rb +2 -0
  52. data/lib/ckeditor/paginatable.rb +2 -0
  53. data/lib/ckeditor/rails.rb +2 -0
  54. data/lib/ckeditor/rails_admin/field.rb +16 -3
  55. data/lib/ckeditor/text_area.rb +2 -0
  56. data/lib/ckeditor/utils.rb +3 -16
  57. data/lib/ckeditor/utils/javascript_code.rb +1 -1
  58. data/lib/ckeditor/version.rb +4 -2
  59. data/lib/generators/ckeditor/install_generator.rb +16 -19
  60. data/lib/generators/ckeditor/pundit_policy_generator.rb +2 -0
  61. data/lib/generators/ckeditor/templates/active_record/active_storage/ckeditor/asset.rb +10 -0
  62. data/lib/generators/ckeditor/templates/active_record/{refile → active_storage}/ckeditor/attachment_file.rb +3 -1
  63. data/lib/generators/ckeditor/templates/active_record/active_storage/ckeditor/picture.rb +13 -0
  64. data/lib/generators/ckeditor/templates/active_record/{carrierwave/migration_versioned.rb → active_storage/migration.rb} +8 -5
  65. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +2 -0
  66. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +2 -0
  67. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +2 -0
  68. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +7 -5
  69. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +2 -0
  70. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +2 -0
  71. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +2 -0
  72. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +7 -5
  73. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +2 -0
  74. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +2 -0
  75. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +2 -0
  76. data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +8 -6
  77. data/lib/generators/ckeditor/templates/active_record/{refile → shrine}/ckeditor/asset.rb +3 -1
  78. data/lib/generators/ckeditor/templates/active_record/shrine/ckeditor/attachment_file.rb +21 -0
  79. data/lib/generators/ckeditor/templates/active_record/shrine/ckeditor/picture.rb +49 -0
  80. data/lib/generators/ckeditor/templates/active_record/shrine/migration.rb +22 -0
  81. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +2 -1
  82. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +2 -3
  83. data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +2 -0
  84. data/lib/generators/ckeditor/templates/base/shrine/initializer.rb +25 -0
  85. data/lib/generators/ckeditor/templates/ckeditor.rb +3 -6
  86. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +2 -0
  87. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +2 -0
  88. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +2 -0
  89. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +2 -0
  90. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +2 -0
  91. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +2 -0
  92. data/lib/generators/ckeditor/templates/mongoid/shrine/ckeditor/asset.rb +8 -0
  93. data/lib/generators/ckeditor/templates/mongoid/shrine/ckeditor/attachment_file.rb +21 -0
  94. data/lib/generators/ckeditor/templates/mongoid/shrine/ckeditor/picture.rb +47 -0
  95. data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +2 -0
  96. data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +2 -0
  97. data/lib/tasks/ckeditor.rake +2 -0
  98. data/test/controllers/attachment_files_controller_test.rb +17 -15
  99. data/test/controllers/pictures_controller_test.rb +17 -15
  100. data/test/dummy/Rakefile +2 -0
  101. data/test/dummy/app/assets/javascripts/application.js +0 -2
  102. data/test/dummy/app/controllers/application_controller.rb +2 -0
  103. data/test/dummy/app/controllers/posts_controller.rb +2 -0
  104. data/test/dummy/app/helpers/application_helper.rb +2 -0
  105. data/test/dummy/app/helpers/posts_helper.rb +2 -0
  106. data/test/dummy/app/models/post.rb +2 -0
  107. data/test/dummy/app/views/posts/index.html.erb +0 -3
  108. data/test/dummy/app/views/posts/show.html.erb +3 -0
  109. data/test/dummy/config.ru +2 -0
  110. data/test/dummy/config/application.rb +5 -1
  111. data/test/dummy/config/boot.rb +2 -0
  112. data/test/dummy/config/environment.rb +2 -0
  113. data/test/dummy/config/environments/development.rb +2 -0
  114. data/test/dummy/config/environments/production.rb +2 -0
  115. data/test/dummy/config/environments/test.rb +5 -3
  116. data/test/dummy/config/initializers/assets.rb +2 -0
  117. data/test/dummy/config/initializers/backtrace_silencers.rb +2 -0
  118. data/test/dummy/config/initializers/ckeditor.rb +2 -0
  119. data/test/dummy/config/initializers/cookies_serializer.rb +2 -0
  120. data/test/dummy/config/initializers/inflections.rb +2 -0
  121. data/test/dummy/config/initializers/mime_types.rb +2 -0
  122. data/test/dummy/config/initializers/paperclip.rb +2 -0
  123. data/test/dummy/config/initializers/session_store.rb +2 -0
  124. data/test/dummy/config/initializers/wrap_parameters.rb +2 -0
  125. data/test/dummy/config/routes.rb +2 -0
  126. data/test/dummy/config/storage.yml +3 -0
  127. data/test/dummy/db/migrate/20110623120047_create_posts.rb +5 -3
  128. data/test/dummy/db/migrate/20170806125915_create_active_storage_tables.rb +26 -0
  129. data/test/dummy/script/rails +2 -0
  130. data/test/functional/posts_controller_test.rb +18 -16
  131. data/test/generators/install_generator_test.rb +58 -56
  132. data/test/integration/navigation_test.rb +2 -0
  133. data/test/models/attachment_file_test.rb +4 -4
  134. data/test/models/ckeditor_test.rb +3 -21
  135. data/test/models/picture_test.rb +12 -10
  136. data/test/models/utils_test.rb +2 -0
  137. data/test/orm/active_record.rb +11 -1
  138. data/test/orm/mongoid.rb +2 -0
  139. data/test/support/helpers.rb +2 -0
  140. data/test/support/integration_case.rb +2 -0
  141. data/test/test_helper.rb +15 -9
  142. data/vendor/assets/javascripts/ckeditor/CHANGES.md +1404 -859
  143. data/vendor/assets/javascripts/ckeditor/LICENSE.md +8 -7
  144. data/vendor/assets/javascripts/ckeditor/README.md +5 -5
  145. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +7 -7
  146. data/vendor/assets/javascripts/ckeditor/build-config.js +12 -6
  147. data/vendor/assets/javascripts/ckeditor/ckeditor.js +1090 -907
  148. data/vendor/assets/javascripts/ckeditor/config.js +2 -2
  149. data/vendor/assets/javascripts/ckeditor/contents.css +7 -7
  150. data/vendor/assets/javascripts/ckeditor/lang/en.js +3 -3
  151. data/vendor/assets/javascripts/ckeditor/lang/ru.js +3 -3
  152. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -7
  153. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +2 -2
  154. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
  155. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +5 -5
  156. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  157. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  158. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  159. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  160. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  161. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  162. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  163. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/autocomplete.png +0 -0
  164. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/autoformat.png +0 -0
  165. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/commentselectedrange.png +0 -0
  166. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/searchcode.png +0 -0
  167. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/uncommentselectedrange.png +0 -0
  168. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -2
  169. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -2
  170. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  171. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -6
  172. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
  173. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.handlebars.min.js +1 -0
  174. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -2
  175. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  176. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -3
  177. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -1
  178. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +236 -218
  179. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +1 -1
  180. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/darcula.css +51 -0
  181. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/gruvbox-dark.css +37 -0
  182. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/idea.css +42 -0
  183. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +2 -2
  184. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lucario.css +37 -0
  185. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -0
  186. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/nord.css +42 -0
  187. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/oceanic-next.css +44 -0
  188. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +1 -1
  189. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/shadowfox.css +52 -0
  190. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +0 -1
  191. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ssms.css +16 -0
  192. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +1 -1
  193. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/yonce.css +59 -0
  194. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.css +2 -2
  195. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +12 -12
  196. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +2 -2
  197. data/vendor/assets/javascripts/ckeditor/plugins/dialog/styles/dialog.css +18 -0
  198. data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -8
  199. data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +23 -23
  200. data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +17 -17
  201. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +6 -6
  202. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +5 -5
  203. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +3 -3
  204. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +5 -5
  205. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +7 -7
  206. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +17 -16
  207. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +7 -6
  208. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +9 -9
  209. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  210. data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  211. data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +9 -8
  212. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +1271 -44
  213. data/vendor/assets/javascripts/ckeditor/plugins/image/icons/hidpi/image.png +0 -0
  214. data/vendor/assets/javascripts/ckeditor/plugins/image/icons/image.png +0 -0
  215. data/vendor/assets/javascripts/ckeditor/plugins/image/lang/en.js +25 -0
  216. data/vendor/assets/javascripts/ckeditor/plugins/image/lang/ru.js +25 -0
  217. data/vendor/assets/javascripts/ckeditor/plugins/image/plugin.js +184 -0
  218. data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  219. data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  220. data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/contents.css +35 -0
  221. data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/image2.html +339 -0
  222. data/vendor/assets/javascripts/ckeditor/plugins/image2/dialogs/image2.js +553 -0
  223. data/vendor/assets/javascripts/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  224. data/vendor/assets/javascripts/ckeditor/plugins/image2/icons/image.png +0 -0
  225. data/vendor/assets/javascripts/ckeditor/plugins/image2/lang/en.js +21 -0
  226. data/vendor/assets/javascripts/ckeditor/plugins/image2/lang/ru.js +21 -0
  227. data/vendor/assets/javascripts/ckeditor/plugins/image2/plugin.js +1783 -0
  228. data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  229. data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  230. data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/image2.html +69 -0
  231. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +1 -1
  232. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +5 -5
  233. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +27 -25
  234. data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +8 -8
  235. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/fr.js +8 -0
  236. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +2 -2
  237. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +41 -51
  238. data/vendor/assets/javascripts/ckeditor/plugins/pastetools/filter/common.js +22 -0
  239. data/vendor/assets/javascripts/ckeditor/plugins/pastetools/filter/image.js +6 -0
  240. data/vendor/assets/javascripts/ckeditor/plugins/preview/images/pagebreak.gif +0 -0
  241. data/vendor/assets/javascripts/ckeditor/plugins/preview/styles/screen.css +10 -0
  242. data/vendor/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +1 -17
  243. data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +63 -7
  244. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -33
  245. data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +2 -2
  246. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +2 -2
  247. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +2 -2
  248. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +12 -12
  249. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +10 -10
  250. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +8 -7
  251. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +20 -19
  252. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -15
  253. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +2 -2
  254. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +2 -2
  255. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
  256. data/vendor/assets/javascripts/ckeditor/plugins/widget/images/handle.png +0 -0
  257. data/vendor/assets/javascripts/ckeditor/{samples/toolbarconfigurator/lib/codemirror/LICENSE → plugins/wordcount/LICENSE.md} +21 -19
  258. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/README.md +106 -0
  259. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +1 -0
  260. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +2 -1
  261. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +475 -378
  262. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/maxParagraphs.html +26 -0
  263. data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +62 -7
  264. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  265. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +82 -82
  266. data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +15 -0
  267. data/vendor/assets/javascripts/ckeditor/plugins/youtube/README.md +156 -0
  268. data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +8 -7
  269. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor.css +1 -1
  270. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_gecko.css +1 -1
  271. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie.css +1 -1
  272. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie7.css +1 -1
  273. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie8.css +1 -1
  274. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_iequirks.css +1 -1
  275. data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons.png +0 -0
  276. data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons_hidpi.png +0 -0
  277. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog.css +3 -3
  278. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie.css +3 -3
  279. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie8.css +3 -3
  280. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_iequirks.css +3 -3
  281. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor.css +3 -3
  282. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_gecko.css +3 -3
  283. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie.css +3 -3
  284. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie8.css +3 -3
  285. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_iequirks.css +3 -3
  286. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/readme.md +3 -3
  287. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/skin.js +2 -2
  288. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +3 -3
  289. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +3 -3
  290. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +3 -3
  291. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +3 -3
  292. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +3 -3
  293. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +3 -3
  294. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +3 -3
  295. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +3 -3
  296. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +3 -3
  297. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +3 -3
  298. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +3 -3
  299. data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +5 -5
  300. data/vendor/assets/javascripts/ckeditor/skins/moono/skin.js +2 -2
  301. data/vendor/assets/javascripts/ckeditor/styles.js +4 -4
  302. data/vendor/assets/javascripts/ckeditor/vendor/promise.js +13 -0
  303. metadata +143 -138
  304. data/lib/ckeditor/backend/refile.rb +0 -39
  305. data/lib/ckeditor/utils/content_type_detector.rb +0 -38
  306. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration_versioned.rb +0 -23
  307. data/lib/generators/ckeditor/templates/active_record/paperclip/migration_versioned.rb +0 -23
  308. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +0 -11
  309. data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +0 -23
  310. data/lib/generators/ckeditor/templates/active_record/refile/migration_versioned.rb +0 -23
  311. data/test/support/raw_post.rb +0 -9
  312. data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -169
  313. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +0 -3
  314. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +0 -8
  315. data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +0 -7
  316. data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +0 -7
  317. data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +0 -929
  318. data/vendor/assets/javascripts/ckeditor/samples/css/samples.css +0 -1632
  319. data/vendor/assets/javascripts/ckeditor/samples/img/github-top.png +0 -0
  320. data/vendor/assets/javascripts/ckeditor/samples/img/header-bg.png +0 -0
  321. data/vendor/assets/javascripts/ckeditor/samples/img/header-separator.png +0 -0
  322. data/vendor/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
  323. data/vendor/assets/javascripts/ckeditor/samples/img/navigation-tip.png +0 -0
  324. data/vendor/assets/javascripts/ckeditor/samples/index.html +0 -128
  325. data/vendor/assets/javascripts/ckeditor/samples/js/sample.js +0 -53
  326. data/vendor/assets/javascripts/ckeditor/samples/js/sf.js +0 -17
  327. data/vendor/assets/javascripts/ckeditor/samples/old/ajax.html +0 -85
  328. data/vendor/assets/javascripts/ckeditor/samples/old/api.html +0 -210
  329. data/vendor/assets/javascripts/ckeditor/samples/old/appendto.html +0 -59
  330. data/vendor/assets/javascripts/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
  331. data/vendor/assets/javascripts/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +0 -204
  332. data/vendor/assets/javascripts/ckeditor/samples/old/assets/posteddata.php +0 -59
  333. data/vendor/assets/javascripts/ckeditor/samples/old/assets/sample.jpg +0 -0
  334. data/vendor/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +0 -7
  335. data/vendor/assets/javascripts/ckeditor/samples/old/datafiltering.html +0 -508
  336. data/vendor/assets/javascripts/ckeditor/samples/old/dialog/assets/my_dialog.js +0 -48
  337. data/vendor/assets/javascripts/ckeditor/samples/old/dialog/dialog.html +0 -190
  338. data/vendor/assets/javascripts/ckeditor/samples/old/divreplace.html +0 -144
  339. data/vendor/assets/javascripts/ckeditor/samples/old/enterkey/enterkey.html +0 -106
  340. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  341. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  342. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/swfobject.js +0 -19
  343. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputforflash.html +0 -283
  344. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputhtml.html +0 -224
  345. data/vendor/assets/javascripts/ckeditor/samples/old/index.html +0 -131
  346. data/vendor/assets/javascripts/ckeditor/samples/old/inlineall.html +0 -314
  347. data/vendor/assets/javascripts/ckeditor/samples/old/inlinebycode.html +0 -124
  348. data/vendor/assets/javascripts/ckeditor/samples/old/inlinetextarea.html +0 -113
  349. data/vendor/assets/javascripts/ckeditor/samples/old/jquery.html +0 -103
  350. data/vendor/assets/javascripts/ckeditor/samples/old/magicline/magicline.html +0 -209
  351. data/vendor/assets/javascripts/ckeditor/samples/old/readonly.html +0 -76
  352. data/vendor/assets/javascripts/ckeditor/samples/old/replacebyclass.html +0 -60
  353. data/vendor/assets/javascripts/ckeditor/samples/old/replacebycode.html +0 -59
  354. data/vendor/assets/javascripts/ckeditor/samples/old/sample.css +0 -357
  355. data/vendor/assets/javascripts/ckeditor/samples/old/sample.js +0 -50
  356. data/vendor/assets/javascripts/ckeditor/samples/old/sample_posteddata.php +0 -16
  357. data/vendor/assets/javascripts/ckeditor/samples/old/tabindex.html +0 -78
  358. data/vendor/assets/javascripts/ckeditor/samples/old/toolbar/toolbar.html +0 -235
  359. data/vendor/assets/javascripts/ckeditor/samples/old/uicolor.html +0 -72
  360. data/vendor/assets/javascripts/ckeditor/samples/old/uilanguages.html +0 -122
  361. data/vendor/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +0 -80
  362. data/vendor/assets/javascripts/ckeditor/samples/old/xhtmlstyle.html +0 -234
  363. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/css/fontello.css +0 -55
  364. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +0 -10
  365. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/config.json +0 -28
  366. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
  367. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.svg +0 -14
  368. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
  369. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
  370. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +0 -446
  371. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +0 -13
  372. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +0 -9
  373. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +0 -33
  374. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +0 -14
  375. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.css +0 -325
  376. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +0 -288
  377. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +0 -25
  378. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +0 -36
  379. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css +0 -38
  380. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +0 -16
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
6
6
  CKEDITOR.editorConfig = function( config ) {
@@ -1,18 +1,19 @@
1
1
  /*
2
- Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
6
6
  body
7
7
  {
8
8
  /* Font */
9
- font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
9
+ /* Emoji fonts are added to visualise them nicely in Internet Explorer. */
10
+ font-family: sans-serif, Arial, Verdana, "Trebuchet MS", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
10
11
  font-size: 12px;
11
12
 
12
13
  /* Text color */
13
14
  color: #333;
14
15
 
15
- /* Remove the background color to make it transparent */
16
+ /* Remove the background color to make it transparent. */
16
17
  background-color: #fff;
17
18
 
18
19
  margin: 20px;
@@ -60,7 +61,7 @@ ol,ul,dl
60
61
  {
61
62
  /* IE7: reset rtl list margin. (#7334) */
62
63
  *margin-right: 0px;
63
- /* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
64
+ /* Preserved spaces for list items with text direction different than the list. (#6249,#8049)*/
64
65
  padding: 0 40px;
65
66
  }
66
67
 
@@ -113,8 +114,7 @@ span[lang]
113
114
  figure
114
115
  {
115
116
  text-align: center;
116
- border: solid 1px #ccc;
117
- border-radius: 2px;
117
+ outline: solid 1px #ccc;
118
118
  background: rgba(0,0,0,0.05);
119
119
  padding: 10px;
120
120
  margin: 10px 20px;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/license
4
4
  */
5
- CKEDITOR.lang['en']={"editor":"Rich Text Editor","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Press ALT 0 for help","browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","image":"Image","flash":"Flash","form":"Form","checkbox":"Checkbox","radio":"Radio Button","textField":"Text Field","textarea":"Textarea","hiddenField":"Hidden Field","button":"Button","select":"Selection Field","imageButton":"Image Button","notSet":"","id":"Id","name":"Name","langDir":"Language Direction","langDirLtr":"Left to Right (LTR)","langDirRtl":"Right to Left (RTL)","langCode":"Language Code","longDescr":"Long Description URL","cssClass":"Stylesheet Classes","advisoryTitle":"Advisory Title","cssStyle":"Style","ok":"OK","cancel":"Cancel","close":"Close","preview":"Preview","resize":"Resize","generalTab":"General","advancedTab":"Advanced","validateNumberFailed":"This value is not a number.","confirmNewPage":"Any unsaved changes to this content will be lost. Are you sure you want to load new page?","confirmCancel":"You have changed some options. Are you sure you want to close the dialog window?","options":"Options","target":"Target","targetNew":"New Window (_blank)","targetTop":"Topmost Window (_top)","targetSelf":"Same Window (_self)","targetParent":"Parent Window (_parent)","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","styles":"Style","cssClasses":"Stylesheet Classes","width":"Width","height":"Height","align":"Alignment","alignLeft":"Left","alignRight":"Right","alignCenter":"Center","alignJustify":"Justify","alignTop":"Top","alignMiddle":"Middle","alignBottom":"Bottom","alignNone":"None","invalidValue":"Invalid value.","invalidHeight":"Height must be a number.","invalidWidth":"Width must be a number.","invalidCssLength":"Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).","invalidHtmlLength":"Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).","invalidInlineStyle":"Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1, unavailable","keyboard":{"8":"Backspace","13":"Enter","16":"Shift","17":"Ctrl","18":"Alt","32":"Space","35":"End","36":"Home","46":"Delete","224":"Command"},"keyboardShortcut":"Keyboard shortcut"},"about":{"copy":"Copyright © $1. All rights reserved.","dlgTitle":"About CKEditor","help":"Check $1 for help.","moreInfo":"For licensing information please visit our web site:","title":"About CKEditor","userGuide":"CKEditor User's Guide"},"basicstyles":{"bold":"Bold","italic":"Italic","strike":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline"},"bidi":{"ltr":"Text direction from left to right","rtl":"Text direction from right to left"},"blockquote":{"toolbar":"Block Quote"},"notification":{"closed":"Notification closed."},"button":{"selectedLabel":"%1 (Selected)"},"toolbar":{"toolbarCollapse":"Collapse Toolbar","toolbarExpand":"Expand Toolbar","toolbarGroups":{"document":"Document","clipboard":"Clipboard/Undo","editing":"Editing","forms":"Forms","basicstyles":"Basic Styles","paragraph":"Paragraph","links":"Links","insert":"Insert","styles":"Styles","colors":"Colors","tools":"Tools"},"toolbars":"Editor toolbars"},"clipboard":{"copy":"Copy","copyError":"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).","cut":"Cut","cutError":"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).","paste":"Paste","pasteNotification":"Your browser doesn't allow you to paste this way. Press %1 to paste."},"colorbutton":{"auto":"Automatic","bgColorTitle":"Background Color","colors":{"000":"Black","800000":"Maroon","8B4513":"Saddle Brown","2F4F4F":"Dark Slate Gray","008080":"Teal","000080":"Navy","4B0082":"Indigo","696969":"Dark Gray","B22222":"Fire Brick","A52A2A":"Brown","DAA520":"Golden Rod","006400":"Dark Green","40E0D0":"Turquoise","0000CD":"Medium Blue","800080":"Purple","808080":"Gray","F00":"Red","FF8C00":"Dark Orange","FFD700":"Gold","008000":"Green","0FF":"Cyan","00F":"Blue","EE82EE":"Violet","A9A9A9":"Dim Gray","FFA07A":"Light Salmon","FFA500":"Orange","FFFF00":"Yellow","00FF00":"Lime","AFEEEE":"Pale Turquoise","ADD8E6":"Light Blue","DDA0DD":"Plum","D3D3D3":"Light Grey","FFF0F5":"Lavender Blush","FAEBD7":"Antique White","FFFFE0":"Light Yellow","F0FFF0":"Honeydew","F0FFFF":"Azure","F0F8FF":"Alice Blue","E6E6FA":"Lavender","FFF":"White","1ABC9C":"Strong Cyan","2ECC71":"Emerald","3498DB":"Bright Blue","9B59B6":"Amethyst","4E5F70":"Grayish Blue","F1C40F":"Vivid Yellow","16A085":"Dark Cyan","27AE60":"Dark Emerald","2980B9":"Strong Blue","8E44AD":"Dark Violet","2C3E50":"Desaturated Blue","F39C12":"Orange","E67E22":"Carrot","E74C3C":"Pale Red","ECF0F1":"Bright Silver","95A5A6":"Light Grayish Cyan","DDD":"Light Gray","D35400":"Pumpkin","C0392B":"Strong Red","BDC3C7":"Silver","7F8C8D":"Grayish Cyan","999":"Dark Gray"},"more":"More Colors...","panelTitle":"Colors","textColorTitle":"Text Color"},"colordialog":{"clear":"Clear","highlight":"Highlight","options":"Color Options","selected":"Selected Color","title":"Select color"},"templates":{"button":"Templates","emptyListMsg":"(No templates defined)","insertOption":"Replace actual contents","options":"Template Options","selectPromptMsg":"Please select the template to open in the editor","title":"Content Templates"},"contextmenu":{"options":"Context Menu Options"},"div":{"IdInputLabel":"Id","advisoryTitleInputLabel":"Advisory Title","cssClassInputLabel":"Stylesheet Classes","edit":"Edit Div","inlineStyleInputLabel":"Inline Style","langDirLTRLabel":"Left to Right (LTR)","langDirLabel":"Language Direction","langDirRTLLabel":"Right to Left (RTL)","languageCodeInputLabel":" Language Code","remove":"Remove Div","styleSelectLabel":"Style","title":"Create Div Container","toolbar":"Create Div Container"},"elementspath":{"eleLabel":"Elements path","eleTitle":"%1 element"},"find":{"find":"Find","findOptions":"Find Options","findWhat":"Find what:","matchCase":"Match case","matchCyclic":"Match cyclic","matchWord":"Match whole word","notFoundMsg":"The specified text was not found.","replace":"Replace","replaceAll":"Replace All","replaceSuccessMsg":"%1 occurrence(s) replaced.","replaceWith":"Replace with:","title":"Find and Replace"},"fakeobjects":{"anchor":"Anchor","flash":"Flash Animation","hiddenfield":"Hidden Field","iframe":"IFrame","unknown":"Unknown Object"},"flash":{"access":"Script Access","accessAlways":"Always","accessNever":"Never","accessSameDomain":"Same domain","alignAbsBottom":"Abs Bottom","alignAbsMiddle":"Abs Middle","alignBaseline":"Baseline","alignTextTop":"Text Top","bgcolor":"Background color","chkFull":"Allow Fullscreen","chkLoop":"Loop","chkMenu":"Enable Flash Menu","chkPlay":"Auto Play","flashvars":"Variables for Flash","hSpace":"HSpace","properties":"Flash Properties","propertiesTab":"Properties","quality":"Quality","qualityAutoHigh":"Auto High","qualityAutoLow":"Auto Low","qualityBest":"Best","qualityHigh":"High","qualityLow":"Low","qualityMedium":"Medium","scale":"Scale","scaleAll":"Show all","scaleFit":"Exact Fit","scaleNoBorder":"No Border","title":"Flash Properties","vSpace":"VSpace","validateHSpace":"HSpace must be a number.","validateSrc":"URL must not be empty.","validateVSpace":"VSpace must be a number.","windowMode":"Window mode","windowModeOpaque":"Opaque","windowModeTransparent":"Transparent","windowModeWindow":"Window"},"font":{"fontSize":{"label":"Size","voiceLabel":"Font Size","panelTitle":"Font Size"},"label":"Font","panelTitle":"Font Name","voiceLabel":"Font"},"forms":{"button":{"title":"Button Properties","text":"Text (Value)","type":"Type","typeBtn":"Button","typeSbm":"Submit","typeRst":"Reset"},"checkboxAndRadio":{"checkboxTitle":"Checkbox Properties","radioTitle":"Radio Button Properties","value":"Value","selected":"Selected","required":"Required"},"form":{"title":"Form Properties","menu":"Form Properties","action":"Action","method":"Method","encoding":"Encoding"},"hidden":{"title":"Hidden Field Properties","name":"Name","value":"Value"},"select":{"title":"Selection Field Properties","selectInfo":"Select Info","opAvail":"Available Options","value":"Value","size":"Size","lines":"lines","chkMulti":"Allow multiple selections","required":"Required","opText":"Text","opValue":"Value","btnAdd":"Add","btnModify":"Modify","btnUp":"Up","btnDown":"Down","btnSetValue":"Set as selected value","btnDelete":"Delete"},"textarea":{"title":"Textarea Properties","cols":"Columns","rows":"Rows"},"textfield":{"title":"Text Field Properties","name":"Name","value":"Value","charWidth":"Character Width","maxChars":"Maximum Characters","required":"Required","type":"Type","typeText":"Text","typePass":"Password","typeEmail":"Email","typeSearch":"Search","typeTel":"Telephone Number","typeUrl":"URL"}},"format":{"label":"Format","panelTitle":"Paragraph Format","tag_address":"Address","tag_div":"Normal (DIV)","tag_h1":"Heading 1","tag_h2":"Heading 2","tag_h3":"Heading 3","tag_h4":"Heading 4","tag_h5":"Heading 5","tag_h6":"Heading 6","tag_p":"Normal","tag_pre":"Formatted"},"horizontalrule":{"toolbar":"Insert Horizontal Line"},"iframe":{"border":"Show frame border","noUrl":"Please type the iframe URL","scrolling":"Enable scrollbars","title":"IFrame Properties","toolbar":"IFrame"},"image":{"alt":"Alternative Text","border":"Border","btnUpload":"Send it to the Server","button2Img":"Do you want to transform the selected image button on a simple image?","hSpace":"HSpace","img2Button":"Do you want to transform the selected image on a image button?","infoTab":"Image Info","linkTab":"Link","lockRatio":"Lock Ratio","menu":"Image Properties","resetSize":"Reset Size","title":"Image Properties","titleButton":"Image Button Properties","upload":"Upload","urlMissing":"Image source URL is missing.","vSpace":"VSpace","validateBorder":"Border must be a whole number.","validateHSpace":"HSpace must be a whole number.","validateVSpace":"VSpace must be a whole number."},"indent":{"indent":"Increase Indent","outdent":"Decrease Indent"},"smiley":{"options":"Smiley Options","title":"Insert a Smiley","toolbar":"Smiley"},"justify":{"block":"Justify","center":"Center","left":"Align Left","right":"Align Right"},"language":{"button":"Set language","remove":"Remove language"},"link":{"acccessKey":"Access Key","advanced":"Advanced","advisoryContentType":"Advisory Content Type","advisoryTitle":"Advisory Title","anchor":{"toolbar":"Anchor","menu":"Edit Anchor","title":"Anchor Properties","name":"Anchor Name","errorName":"Please type the anchor name","remove":"Remove Anchor"},"anchorId":"By Element Id","anchorName":"By Anchor Name","charset":"Linked Resource Charset","cssClasses":"Stylesheet Classes","download":"Force Download","displayText":"Display Text","emailAddress":"E-Mail Address","emailBody":"Message Body","emailSubject":"Message Subject","id":"Id","info":"Link Info","langCode":"Language Code","langDir":"Language Direction","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","menu":"Edit Link","name":"Name","noAnchors":"(No anchors available in the document)","noEmail":"Please type the e-mail address","noUrl":"Please type the link URL","other":"","popupDependent":"Dependent (Netscape)","popupFeatures":"Popup Window Features","popupFullScreen":"Full Screen (IE)","popupLeft":"Left Position","popupLocationBar":"Location Bar","popupMenuBar":"Menu Bar","popupResizable":"Resizable","popupScrollBars":"Scroll Bars","popupStatusBar":"Status Bar","popupToolbar":"Toolbar","popupTop":"Top Position","rel":"Relationship","selectAnchor":"Select an Anchor","styles":"Style","tabIndex":"Tab Index","target":"Target","targetFrame":"","targetFrameName":"Target Frame Name","targetPopup":"","targetPopupName":"Popup Window Name","title":"Link","toAnchor":"Link to anchor in the text","toEmail":"E-mail","toUrl":"URL","toolbar":"Link","type":"Link Type","unlink":"Unlink","upload":"Upload"},"list":{"bulletedlist":"Insert/Remove Bulleted List","numberedlist":"Insert/Remove Numbered List"},"liststyle":{"armenian":"Armenian numbering","bulletedTitle":"Bulleted List Properties","circle":"Circle","decimal":"Decimal (1, 2, 3, etc.)","decimalLeadingZero":"Decimal leading zero (01, 02, 03, etc.)","disc":"Disc","georgian":"Georgian numbering (an, ban, gan, etc.)","lowerAlpha":"Lower Alpha (a, b, c, d, e, etc.)","lowerGreek":"Lower Greek (alpha, beta, gamma, etc.)","lowerRoman":"Lower Roman (i, ii, iii, iv, v, etc.)","none":"None","notset":"","numberedTitle":"Numbered List Properties","square":"Square","start":"Start","type":"Type","upperAlpha":"Upper Alpha (A, B, C, D, E, etc.)","upperRoman":"Upper Roman (I, II, III, IV, V, etc.)","validateStartNumber":"List start number must be a whole number."},"magicline":{"title":"Insert paragraph here"},"maximize":{"maximize":"Maximize","minimize":"Minimize"},"newpage":{"toolbar":"New Page"},"pagebreak":{"alt":"Page Break","toolbar":"Insert Page Break for Printing"},"pastetext":{"button":"Paste as plain text","pasteNotification":"Your browser does not allow you to paste plain text this way. Press %1 to paste."},"pastefromword":{"confirmCleanup":"The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?","error":"It was not possible to clean up the pasted data due to an internal error","title":"Paste from Word","toolbar":"Paste from Word"},"preview":{"preview":"Preview"},"print":{"toolbar":"Print"},"removeformat":{"toolbar":"Remove Format"},"save":{"toolbar":"Save"},"selectall":{"toolbar":"Select All"},"showblocks":{"toolbar":"Show Blocks"},"sourcearea":{"toolbar":"Source"},"specialchar":{"options":"Special Character Options","title":"Select Special Character","toolbar":"Insert Special Character"},"scayt":{"btn_about":"About SCAYT","btn_dictionaries":"Dictionaries","btn_disable":"Disable SCAYT","btn_enable":"Enable SCAYT","btn_langs":"Languages","btn_options":"Options","text_title":"Spell Check As You Type"},"stylescombo":{"label":"Styles","panelTitle":"Formatting Styles","panelTitle1":"Block Styles","panelTitle2":"Inline Styles","panelTitle3":"Object Styles"},"table":{"border":"Border size","caption":"Caption","cell":{"menu":"Cell","insertBefore":"Insert Cell Before","insertAfter":"Insert Cell After","deleteCell":"Delete Cells","merge":"Merge Cells","mergeRight":"Merge Right","mergeDown":"Merge Down","splitHorizontal":"Split Cell Horizontally","splitVertical":"Split Cell Vertically","title":"Cell Properties","cellType":"Cell Type","rowSpan":"Rows Span","colSpan":"Columns Span","wordWrap":"Word Wrap","hAlign":"Horizontal Alignment","vAlign":"Vertical Alignment","alignBaseline":"Baseline","bgColor":"Background Color","borderColor":"Border Color","data":"Data","header":"Header","yes":"Yes","no":"No","invalidWidth":"Cell width must be a number.","invalidHeight":"Cell height must be a number.","invalidRowSpan":"Rows span must be a whole number.","invalidColSpan":"Columns span must be a whole number.","chooseColor":"Choose"},"cellPad":"Cell padding","cellSpace":"Cell spacing","column":{"menu":"Column","insertBefore":"Insert Column Before","insertAfter":"Insert Column After","deleteColumn":"Delete Columns"},"columns":"Columns","deleteTable":"Delete Table","headers":"Headers","headersBoth":"Both","headersColumn":"First column","headersNone":"None","headersRow":"First Row","invalidBorder":"Border size must be a number.","invalidCellPadding":"Cell padding must be a positive number.","invalidCellSpacing":"Cell spacing must be a positive number.","invalidCols":"Number of columns must be a number greater than 0.","invalidHeight":"Table height must be a number.","invalidRows":"Number of rows must be a number greater than 0.","invalidWidth":"Table width must be a number.","menu":"Table Properties","row":{"menu":"Row","insertBefore":"Insert Row Before","insertAfter":"Insert Row After","deleteRow":"Delete Rows"},"rows":"Rows","summary":"Summary","title":"Table Properties","toolbar":"Table","widthPc":"percent","widthPx":"pixels","widthUnit":"width unit"},"undo":{"redo":"Redo","undo":"Undo"},"wsc":{"btnIgnore":"Ignore","btnIgnoreAll":"Ignore All","btnReplace":"Replace","btnReplaceAll":"Replace All","btnUndo":"Undo","changeTo":"Change to","errorLoading":"Error loading application service host: %s.","ieSpellDownload":"Spell checker not installed. Do you want to download it now?","manyChanges":"Spell check complete: %1 words changed","noChanges":"Spell check complete: No words changed","noMispell":"Spell check complete: No misspellings found","noSuggestions":"- No suggestions -","notAvailable":"Sorry, but service is unavailable now.","notInDic":"Not in dictionary","oneChange":"Spell check complete: One word changed","progress":"Spell check in progress...","title":"Spell Checker","toolbar":"Check Spelling"}};
5
+ CKEDITOR.lang['en']={"editor":"Rich Text Editor","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Press ALT 0 for help","browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","image":"Image","flash":"Flash","form":"Form","checkbox":"Checkbox","radio":"Radio Button","textField":"Text Field","textarea":"Textarea","hiddenField":"Hidden Field","button":"Button","select":"Selection Field","imageButton":"Image Button","notSet":"","id":"Id","name":"Name","langDir":"Language Direction","langDirLtr":"Left to Right (LTR)","langDirRtl":"Right to Left (RTL)","langCode":"Language Code","longDescr":"Long Description URL","cssClass":"Stylesheet Classes","advisoryTitle":"Advisory Title","cssStyle":"Style","ok":"OK","cancel":"Cancel","close":"Close","preview":"Preview","resize":"Resize","generalTab":"General","advancedTab":"Advanced","validateNumberFailed":"This value is not a number.","confirmNewPage":"Any unsaved changes to this content will be lost. Are you sure you want to load new page?","confirmCancel":"You have changed some options. Are you sure you want to close the dialog window?","options":"Options","target":"Target","targetNew":"New Window (_blank)","targetTop":"Topmost Window (_top)","targetSelf":"Same Window (_self)","targetParent":"Parent Window (_parent)","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","styles":"Style","cssClasses":"Stylesheet Classes","width":"Width","height":"Height","align":"Alignment","left":"Left","right":"Right","center":"Center","justify":"Justify","alignLeft":"Align Left","alignRight":"Align Right","alignCenter":"Align Center","alignTop":"Top","alignMiddle":"Middle","alignBottom":"Bottom","alignNone":"None","invalidValue":"Invalid value.","invalidHeight":"Height must be a number.","invalidWidth":"Width must be a number.","invalidLength":"Value specified for the \"%1\" field must be a positive number with or without a valid measurement unit (%2).","invalidCssLength":"Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).","invalidHtmlLength":"Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).","invalidInlineStyle":"Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1, unavailable","keyboard":{"8":"Backspace","13":"Enter","16":"Shift","17":"Ctrl","18":"Alt","32":"Space","35":"End","36":"Home","46":"Delete","112":"F1","113":"F2","114":"F3","115":"F4","116":"F5","117":"F6","118":"F7","119":"F8","120":"F9","121":"F10","122":"F11","123":"F12","124":"F13","125":"F14","126":"F15","127":"F16","128":"F17","129":"F18","130":"F19","131":"F20","132":"F21","133":"F22","134":"F23","135":"F24","224":"Command"},"keyboardShortcut":"Keyboard shortcut","optionDefault":"Default"},"about":{"copy":"Copyright © $1. All rights reserved.","dlgTitle":"About CKEditor 4","moreInfo":"For licensing information please visit our web site:"},"basicstyles":{"bold":"Bold","italic":"Italic","strike":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline"},"bidi":{"ltr":"Text direction from left to right","rtl":"Text direction from right to left"},"blockquote":{"toolbar":"Block Quote"},"notification":{"closed":"Notification closed."},"toolbar":{"toolbarCollapse":"Collapse Toolbar","toolbarExpand":"Expand Toolbar","toolbarGroups":{"document":"Document","clipboard":"Clipboard/Undo","editing":"Editing","forms":"Forms","basicstyles":"Basic Styles","paragraph":"Paragraph","links":"Links","insert":"Insert","styles":"Styles","colors":"Colors","tools":"Tools"},"toolbars":"Editor toolbars"},"clipboard":{"copy":"Copy","copyError":"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).","cut":"Cut","cutError":"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).","paste":"Paste","pasteNotification":"Press %1 to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option.","pasteArea":"Paste Area","pasteMsg":"Paste your content inside the area below and press OK."},"colorbutton":{"auto":"Automatic","bgColorTitle":"Background Color","colors":{"000":"Black","800000":"Maroon","8B4513":"Saddle Brown","2F4F4F":"Dark Slate Gray","008080":"Teal","000080":"Navy","4B0082":"Indigo","696969":"Dark Gray","B22222":"Fire Brick","A52A2A":"Brown","DAA520":"Golden Rod","006400":"Dark Green","40E0D0":"Turquoise","0000CD":"Medium Blue","800080":"Purple","808080":"Gray","F00":"Red","FF8C00":"Dark Orange","FFD700":"Gold","008000":"Green","0FF":"Cyan","00F":"Blue","EE82EE":"Violet","A9A9A9":"Dim Gray","FFA07A":"Light Salmon","FFA500":"Orange","FFFF00":"Yellow","00FF00":"Lime","AFEEEE":"Pale Turquoise","ADD8E6":"Light Blue","DDA0DD":"Plum","D3D3D3":"Light Grey","FFF0F5":"Lavender Blush","FAEBD7":"Antique White","FFFFE0":"Light Yellow","F0FFF0":"Honeydew","F0FFFF":"Azure","F0F8FF":"Alice Blue","E6E6FA":"Lavender","FFF":"White","1ABC9C":"Strong Cyan","2ECC71":"Emerald","3498DB":"Bright Blue","9B59B6":"Amethyst","4E5F70":"Grayish Blue","F1C40F":"Vivid Yellow","16A085":"Dark Cyan","27AE60":"Dark Emerald","2980B9":"Strong Blue","8E44AD":"Dark Violet","2C3E50":"Desaturated Blue","F39C12":"Orange","E67E22":"Carrot","E74C3C":"Pale Red","ECF0F1":"Bright Silver","95A5A6":"Light Grayish Cyan","DDD":"Light Gray","D35400":"Pumpkin","C0392B":"Strong Red","BDC3C7":"Silver","7F8C8D":"Grayish Cyan","999":"Dark Gray"},"more":"More Colors...","panelTitle":"Colors","textColorTitle":"Text Color"},"colordialog":{"clear":"Clear","highlight":"Highlight","options":"Color Options","selected":"Selected Color","title":"Select color"},"contextmenu":{"options":"Context Menu Options"},"div":{"IdInputLabel":"Id","advisoryTitleInputLabel":"Advisory Title","cssClassInputLabel":"Stylesheet Classes","edit":"Edit Div","inlineStyleInputLabel":"Inline Style","langDirLTRLabel":"Left to Right (LTR)","langDirLabel":"Language Direction","langDirRTLLabel":"Right to Left (RTL)","languageCodeInputLabel":" Language Code","remove":"Remove Div","styleSelectLabel":"Style","title":"Create Div Container","toolbar":"Create Div Container"},"elementspath":{"eleLabel":"Elements path","eleTitle":"%1 element"},"filetools":{"loadError":"Error occurred during file read.","networkError":"Network error occurred during file upload.","httpError404":"HTTP error occurred during file upload (404: File not found).","httpError403":"HTTP error occurred during file upload (403: Forbidden).","httpError":"HTTP error occurred during file upload (error status: %1).","noUrlError":"Upload URL is not defined.","responseError":"Incorrect server response."},"find":{"find":"Find","findOptions":"Find Options","findWhat":"Find what:","matchCase":"Match case","matchCyclic":"Match cyclic","matchWord":"Match whole word","notFoundMsg":"The specified text was not found.","replace":"Replace","replaceAll":"Replace All","replaceSuccessMsg":"%1 occurrence(s) replaced.","replaceWith":"Replace with:","title":"Find and Replace"},"fakeobjects":{"anchor":"Anchor","flash":"Flash Animation","hiddenfield":"Hidden Field","iframe":"IFrame","unknown":"Unknown Object"},"flash":{"access":"Script Access","accessAlways":"Always","accessNever":"Never","accessSameDomain":"Same domain","alignAbsBottom":"Abs Bottom","alignAbsMiddle":"Abs Middle","alignBaseline":"Baseline","alignTextTop":"Text Top","bgcolor":"Background color","chkFull":"Allow Fullscreen","chkLoop":"Loop","chkMenu":"Enable Flash Menu","chkPlay":"Auto Play","flashvars":"Variables for Flash","hSpace":"HSpace","properties":"Flash Properties","propertiesTab":"Properties","quality":"Quality","qualityAutoHigh":"Auto High","qualityAutoLow":"Auto Low","qualityBest":"Best","qualityHigh":"High","qualityLow":"Low","qualityMedium":"Medium","scale":"Scale","scaleAll":"Show all","scaleFit":"Exact Fit","scaleNoBorder":"No Border","title":"Flash Properties","vSpace":"VSpace","validateHSpace":"HSpace must be a number.","validateSrc":"URL must not be empty.","validateVSpace":"VSpace must be a number.","windowMode":"Window mode","windowModeOpaque":"Opaque","windowModeTransparent":"Transparent","windowModeWindow":"Window"},"font":{"fontSize":{"label":"Size","voiceLabel":"Font Size","panelTitle":"Font Size"},"label":"Font","panelTitle":"Font Name","voiceLabel":"Font"},"format":{"label":"Format","panelTitle":"Paragraph Format","tag_address":"Address","tag_div":"Normal (DIV)","tag_h1":"Heading 1","tag_h2":"Heading 2","tag_h3":"Heading 3","tag_h4":"Heading 4","tag_h5":"Heading 5","tag_h6":"Heading 6","tag_p":"Normal","tag_pre":"Formatted"},"forms":{"button":{"title":"Button Properties","text":"Text (Value)","type":"Type","typeBtn":"Button","typeSbm":"Submit","typeRst":"Reset"},"checkboxAndRadio":{"checkboxTitle":"Checkbox Properties","radioTitle":"Radio Button Properties","value":"Value","selected":"Selected","required":"Required"},"form":{"title":"Form Properties","menu":"Form Properties","action":"Action","method":"Method","encoding":"Encoding"},"hidden":{"title":"Hidden Field Properties","name":"Name","value":"Value"},"select":{"title":"Selection Field Properties","selectInfo":"Select Info","opAvail":"Available Options","value":"Value","size":"Size","lines":"lines","chkMulti":"Allow multiple selections","required":"Required","opText":"Text","opValue":"Value","btnAdd":"Add","btnModify":"Modify","btnUp":"Up","btnDown":"Down","btnSetValue":"Set as selected value","btnDelete":"Delete"},"textarea":{"title":"Textarea Properties","cols":"Columns","rows":"Rows"},"textfield":{"title":"Text Field Properties","name":"Name","value":"Value","charWidth":"Character Width","maxChars":"Maximum Characters","required":"Required","type":"Type","typeText":"Text","typePass":"Password","typeEmail":"Email","typeSearch":"Search","typeTel":"Telephone Number","typeUrl":"URL"}},"horizontalrule":{"toolbar":"Insert Horizontal Line"},"iframe":{"border":"Show frame border","noUrl":"Please type the iframe URL","scrolling":"Enable scrollbars","title":"IFrame Properties","toolbar":"IFrame"},"indent":{"indent":"Increase Indent","outdent":"Decrease Indent"},"language":{"button":"Set language","remove":"Remove language"},"link":{"acccessKey":"Access Key","advanced":"Advanced","advisoryContentType":"Advisory Content Type","advisoryTitle":"Advisory Title","anchor":{"toolbar":"Anchor","menu":"Edit Anchor","title":"Anchor Properties","name":"Anchor Name","errorName":"Please type the anchor name","remove":"Remove Anchor"},"anchorId":"By Element Id","anchorName":"By Anchor Name","charset":"Linked Resource Charset","cssClasses":"Stylesheet Classes","download":"Force Download","displayText":"Display Text","emailAddress":"E-Mail Address","emailBody":"Message Body","emailSubject":"Message Subject","id":"Id","info":"Link Info","langCode":"Language Code","langDir":"Language Direction","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","menu":"Edit Link","name":"Name","noAnchors":"(No anchors available in the document)","noEmail":"Please type the e-mail address","noUrl":"Please type the link URL","noTel":"Please type the phone number","other":"","phoneNumber":"Phone number","popupDependent":"Dependent (Netscape)","popupFeatures":"Popup Window Features","popupFullScreen":"Full Screen (IE)","popupLeft":"Left Position","popupLocationBar":"Location Bar","popupMenuBar":"Menu Bar","popupResizable":"Resizable","popupScrollBars":"Scroll Bars","popupStatusBar":"Status Bar","popupToolbar":"Toolbar","popupTop":"Top Position","rel":"Relationship","selectAnchor":"Select an Anchor","styles":"Style","tabIndex":"Tab Index","target":"Target","targetFrame":"","targetFrameName":"Target Frame Name","targetPopup":"","targetPopupName":"Popup Window Name","title":"Link","toAnchor":"Link to anchor in the text","toEmail":"E-mail","toUrl":"URL","toPhone":"Phone","toolbar":"Link","type":"Link Type","unlink":"Unlink","upload":"Upload"},"list":{"bulletedlist":"Insert/Remove Bulleted List","numberedlist":"Insert/Remove Numbered List"},"liststyle":{"bulletedTitle":"Bulleted List Properties","circle":"Circle","decimal":"Decimal (1, 2, 3, etc.)","disc":"Disc","lowerAlpha":"Lower Alpha (a, b, c, d, e, etc.)","lowerRoman":"Lower Roman (i, ii, iii, iv, v, etc.)","none":"None","notset":"","numberedTitle":"Numbered List Properties","square":"Square","start":"Start","type":"Type","upperAlpha":"Upper Alpha (A, B, C, D, E, etc.)","upperRoman":"Upper Roman (I, II, III, IV, V, etc.)","validateStartNumber":"List start number must be a whole number."},"magicline":{"title":"Insert paragraph here"},"maximize":{"maximize":"Maximize","minimize":"Minimize"},"newpage":{"toolbar":"New Page"},"pagebreak":{"alt":"Page Break","toolbar":"Insert Page Break for Printing"},"pastefromword":{"confirmCleanup":"The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?","error":"It was not possible to clean up the pasted data due to an internal error","title":"Paste from Word","toolbar":"Paste from Word"},"pastetext":{"button":"Paste as plain text","pasteNotification":"Press %1 to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option.","title":"Paste as Plain Text"},"preview":{"preview":"Preview"},"print":{"toolbar":"Print"},"removeformat":{"toolbar":"Remove Format"},"save":{"toolbar":"Save"},"scayt":{"btn_about":"About SCAYT","btn_dictionaries":"Dictionaries","btn_disable":"Disable SCAYT","btn_enable":"Enable SCAYT","btn_langs":"Languages","btn_options":"Options","text_title":"Spell Check As You Type"},"selectall":{"toolbar":"Select All"},"showblocks":{"toolbar":"Show Blocks"},"smiley":{"options":"Smiley Options","title":"Insert a Smiley","toolbar":"Smiley"},"sourcearea":{"toolbar":"Source"},"specialchar":{"options":"Special Character Options","title":"Select Special Character","toolbar":"Insert Special Character"},"stylescombo":{"label":"Styles","panelTitle":"Formatting Styles","panelTitle1":"Block Styles","panelTitle2":"Inline Styles","panelTitle3":"Object Styles"},"table":{"border":"Border size","caption":"Caption","cell":{"menu":"Cell","insertBefore":"Insert Cell Before","insertAfter":"Insert Cell After","deleteCell":"Delete Cells","merge":"Merge Cells","mergeRight":"Merge Right","mergeDown":"Merge Down","splitHorizontal":"Split Cell Horizontally","splitVertical":"Split Cell Vertically","title":"Cell Properties","cellType":"Cell Type","rowSpan":"Rows Span","colSpan":"Columns Span","wordWrap":"Word Wrap","hAlign":"Horizontal Alignment","vAlign":"Vertical Alignment","alignBaseline":"Baseline","bgColor":"Background Color","borderColor":"Border Color","data":"Data","header":"Header","yes":"Yes","no":"No","invalidWidth":"Cell width must be a number.","invalidHeight":"Cell height must be a number.","invalidRowSpan":"Rows span must be a whole number.","invalidColSpan":"Columns span must be a whole number.","chooseColor":"Choose"},"cellPad":"Cell padding","cellSpace":"Cell spacing","column":{"menu":"Column","insertBefore":"Insert Column Before","insertAfter":"Insert Column After","deleteColumn":"Delete Columns"},"columns":"Columns","deleteTable":"Delete Table","headers":"Headers","headersBoth":"Both","headersColumn":"First column","headersNone":"None","headersRow":"First Row","heightUnit":"height unit","invalidBorder":"Border size must be a number.","invalidCellPadding":"Cell padding must be a positive number.","invalidCellSpacing":"Cell spacing must be a positive number.","invalidCols":"Number of columns must be a number greater than 0.","invalidHeight":"Table height must be a number.","invalidRows":"Number of rows must be a number greater than 0.","invalidWidth":"Table width must be a number.","menu":"Table Properties","row":{"menu":"Row","insertBefore":"Insert Row Before","insertAfter":"Insert Row After","deleteRow":"Delete Rows"},"rows":"Rows","summary":"Summary","title":"Table Properties","toolbar":"Table","widthPc":"percent","widthPx":"pixels","widthUnit":"width unit"},"templates":{"button":"Templates","emptyListMsg":"(No templates defined)","insertOption":"Replace actual contents","options":"Template Options","selectPromptMsg":"Please select the template to open in the editor","title":"Content Templates"},"undo":{"redo":"Redo","undo":"Undo"},"widget":{"move":"Click and drag to move","label":"%1 widget"},"uploadwidget":{"abort":"Upload aborted by the user.","doneOne":"File successfully uploaded.","doneMany":"Successfully uploaded %1 files.","uploadOne":"Uploading file ({percentage}%)...","uploadMany":"Uploading files, {current} of {max} done ({percentage}%)..."},"wsc":{"btnIgnore":"Ignore","btnIgnoreAll":"Ignore All","btnReplace":"Replace","btnReplaceAll":"Replace All","btnUndo":"Undo","changeTo":"Change to","errorLoading":"Error loading application service host: %s.","ieSpellDownload":"Spell checker not installed. Do you want to download it now?","manyChanges":"Spell check complete: %1 words changed","noChanges":"Spell check complete: No words changed","noMispell":"Spell check complete: No misspellings found","noSuggestions":"- No suggestions -","notAvailable":"Sorry, but service is unavailable now.","notInDic":"Not in dictionary","oneChange":"Spell check complete: One word changed","progress":"Spell check in progress...","title":"Spell Checker","toolbar":"Check Spelling"}};
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/license
4
4
  */
5
- CKEDITOR.lang['ru']={"editor":"Визуальный текстовый редактор","editorPanel":"Визуальный редактор текста","common":{"editorHelp":"Нажмите ALT-0 для открытия справки","browseServer":"Выбор на сервере","url":"Ссылка","protocol":"Протокол","upload":"Загрузка файла","uploadSubmit":"Загрузить на сервер","image":"Изображение","flash":"Flash","form":"Форма","checkbox":"Чекбокс","radio":"Радиокнопка","textField":"Текстовое поле","textarea":"Многострочное текстовое поле","hiddenField":"Скрытое поле","button":"Кнопка","select":"Выпадающий список","imageButton":"Кнопка-изображение","notSet":"<не указано>","id":"Идентификатор","name":"Имя","langDir":"Направление текста","langDirLtr":"Слева направо (LTR)","langDirRtl":"Справа налево (RTL)","langCode":"Код языка","longDescr":"Длинное описание ссылки","cssClass":"Класс CSS","advisoryTitle":"Заголовок","cssStyle":"Стиль","ok":"ОК","cancel":"Отмена","close":"Закрыть","preview":"Предпросмотр","resize":"Перетащите для изменения размера","generalTab":"Основное","advancedTab":"Дополнительно","validateNumberFailed":"Это значение не является числом.","confirmNewPage":"Несохранённые изменения будут потеряны! Вы действительно желаете перейти на другую страницу?","confirmCancel":"Некоторые параметры были изменены. Вы уверены, что желаете закрыть без сохранения?","options":"Параметры","target":"Цель","targetNew":"Новое окно (_blank)","targetTop":"Главное окно (_top)","targetSelf":"Текущее окно (_self)","targetParent":"Родительское окно (_parent)","langDirLTR":"Слева направо (LTR)","langDirRTL":"Справа налево (RTL)","styles":"Стиль","cssClasses":"CSS классы","width":"Ширина","height":"Высота","align":"Выравнивание","alignLeft":"По левому краю","alignRight":"По правому краю","alignCenter":"По центру","alignJustify":"По ширине","alignTop":"Поверху","alignMiddle":"Посередине","alignBottom":"Понизу","alignNone":"Нет","invalidValue":"Недопустимое значение.","invalidHeight":"Высота задается числом.","invalidWidth":"Ширина задается числом.","invalidCssLength":"Значение, указанное в поле \"%1\", должно быть положительным целым числом. Допускается указание единиц меры CSS (px, %, in, cm, mm, em, ex, pt или pc).","invalidHtmlLength":"Значение, указанное в поле \"%1\", должно быть положительным целым числом. Допускается указание единиц меры HTML (px или %).","invalidInlineStyle":"Значение, указанное для стиля элемента, должно состоять из одной или нескольких пар данных в формате \"параметр : значение\", разделённых точкой с запятой.","cssLengthTooltip":"Введите значение в пикселях, либо число с корректной единицей меры CSS (px, %, in, cm, mm, em, ex, pt или pc).","unavailable":"%1, недоступно","keyboard":{"8":"Backspace","13":"Enter","16":"Shift","17":"Ctrl","18":"Alt","32":"Пробел","35":"End","36":"Home","46":"Delete","224":"Command"},"keyboardShortcut":"Комбинация клавиш"},"about":{"copy":"Copyright © $1. Все права защищены.","dlgTitle":"О CKEditor","help":"$1 содержит подробную справку по использованию.","moreInfo":"Для получения информации о лицензии, пожалуйста, перейдите на наш сайт:","title":"О CKEditor","userGuide":"Руководство пользователя CKEditor"},"basicstyles":{"bold":"Полужирный","italic":"Курсив","strike":"Зачеркнутый","subscript":"Подстрочный индекс","superscript":"Надстрочный индекс","underline":"Подчеркнутый"},"bidi":{"ltr":"Направление текста слева направо","rtl":"Направление текста справа налево"},"blockquote":{"toolbar":"Цитата"},"notification":{"closed":"Уведомление закрыто"},"button":{"selectedLabel":"%1 (Выбрано)"},"toolbar":{"toolbarCollapse":"Свернуть панель инструментов","toolbarExpand":"Развернуть панель инструментов","toolbarGroups":{"document":"Документ","clipboard":"Буфер обмена / Отмена действий","editing":"Корректировка","forms":"Формы","basicstyles":"Простые стили","paragraph":"Абзац","links":"Ссылки","insert":"Вставка","styles":"Стили","colors":"Цвета","tools":"Инструменты"},"toolbars":"Панели инструментов редактора"},"clipboard":{"copy":"Копировать","copyError":"Настройки безопасности вашего браузера не разрешают редактору выполнять операции по копированию текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+C).","cut":"Вырезать","cutError":"Настройки безопасности вашего браузера не разрешают редактору выполнять операции по вырезке текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+X).","paste":"Вставить","pasteNotification":"Ваш браузер не поддерживает данный метод вставки. Для вставки нажмите %1"},"colorbutton":{"auto":"Автоматически","bgColorTitle":"Цвет фона","colors":{"000":"Чёрный","800000":"Бордовый","8B4513":"Кожано-коричневый","2F4F4F":"Темный синевато-серый","008080":"Сине-зелёный","000080":"Тёмно-синий","4B0082":"Индиго","696969":"Тёмно-серый","B22222":"Кирпичный","A52A2A":"Коричневый","DAA520":"Золотисто-берёзовый","006400":"Темно-зелёный","40E0D0":"Бирюзовый","0000CD":"Умеренно синий","800080":"Пурпурный","808080":"Серый","F00":"Красный","FF8C00":"Темно-оранжевый","FFD700":"Золотистый","008000":"Зелёный","0FF":"Васильковый","00F":"Синий","EE82EE":"Фиолетовый","A9A9A9":"Тускло-серый","FFA07A":"Светло-лососевый","FFA500":"Оранжевый","FFFF00":"Жёлтый","00FF00":"Лайма","AFEEEE":"Бледно-синий","ADD8E6":"Свелто-голубой","DDA0DD":"Сливовый","D3D3D3":"Светло-серый","FFF0F5":"Розово-лавандовый","FAEBD7":"Античный белый","FFFFE0":"Светло-жёлтый","F0FFF0":"Медвяной росы","F0FFFF":"Лазурный","F0F8FF":"Бледно-голубой","E6E6FA":"Лавандовый","FFF":"Белый","1ABC9C":"Strong Cyan","2ECC71":"Изумрудный","3498DB":"Bright Blue","9B59B6":"Amethyst","4E5F70":"Grayish Blue","F1C40F":"Ярко-желтый","16A085":"Dark Cyan","27AE60":"Тёмно-изумрудный","2980B9":"Strong Blue","8E44AD":"Тёмно-фиолетовый","2C3E50":"Desaturated Blue","F39C12":"Оранжевый","E67E22":"Морковный","E74C3C":"Pale Red","ECF0F1":"Bright Silver","95A5A6":"Light Grayish Cyan","DDD":"Светло-серый","D35400":"Pumpkin","C0392B":"Strong Red","BDC3C7":"Silver","7F8C8D":"Grayish Cyan","999":"Тёмно-серый"},"more":"Ещё цвета...","panelTitle":"Цвета","textColorTitle":"Цвет текста"},"colordialog":{"clear":"Очистить","highlight":"Под курсором","options":"Настройки цвета","selected":"Выбранный цвет","title":"Выберите цвет"},"templates":{"button":"Шаблоны","emptyListMsg":"(не определено ни одного шаблона)","insertOption":"Заменить текущее содержимое","options":"Параметры шаблона","selectPromptMsg":"Пожалуйста, выберите, какой шаблон следует открыть в редакторе","title":"Шаблоны содержимого"},"contextmenu":{"options":"Параметры контекстного меню"},"div":{"IdInputLabel":"Идентификатор","advisoryTitleInputLabel":"Заголовок","cssClassInputLabel":"Классы CSS","edit":"Редактировать контейнер","inlineStyleInputLabel":"Стиль элемента","langDirLTRLabel":"Слева направо (LTR)","langDirLabel":"Направление текста","langDirRTLLabel":"Справа налево (RTL)","languageCodeInputLabel":"Код языка","remove":"Удалить контейнер","styleSelectLabel":"Стиль","title":"Создать Div-контейнер","toolbar":"Создать Div-контейнер"},"elementspath":{"eleLabel":"Путь элементов","eleTitle":"Элемент %1"},"find":{"find":"Найти","findOptions":"Опции поиска","findWhat":"Найти:","matchCase":"Учитывать регистр","matchCyclic":"По всему тексту","matchWord":"Только слово целиком","notFoundMsg":"Искомый текст не найден.","replace":"Заменить","replaceAll":"Заменить всё","replaceSuccessMsg":"Успешно заменено %1 раз(а).","replaceWith":"Заменить на:","title":"Поиск и замена"},"fakeobjects":{"anchor":"Якорь","flash":"Flash анимация","hiddenfield":"Скрытое поле","iframe":"iFrame","unknown":"Неизвестный объект"},"flash":{"access":"Доступ к скриптам","accessAlways":"Всегда","accessNever":"Никогда","accessSameDomain":"В том же домене","alignAbsBottom":"По низу текста","alignAbsMiddle":"По середине текста","alignBaseline":"По базовой линии","alignTextTop":"По верху текста","bgcolor":"Цвет фона","chkFull":"Разрешить полноэкранный режим","chkLoop":"Повторять","chkMenu":"Включить меню Flash","chkPlay":"Автоматическое воспроизведение","flashvars":"Переменные для Flash","hSpace":"Гориз. отступ","properties":"Свойства Flash","propertiesTab":"Свойства","quality":"Качество","qualityAutoHigh":"Запуск на высоком","qualityAutoLow":"Запуск на низком","qualityBest":"Лучшее","qualityHigh":"Высокое","qualityLow":"Низкое","qualityMedium":"Среднее","scale":"Масштабировать","scaleAll":"Пропорционально","scaleFit":"Заполнять","scaleNoBorder":"Заходить за границы","title":"Свойства Flash","vSpace":"Вертик. отступ","validateHSpace":"Горизонтальный отступ задается числом.","validateSrc":"Вы должны ввести ссылку","validateVSpace":"Вертикальный отступ задается числом.","windowMode":"Взаимодействие с окном","windowModeOpaque":"Непрозрачный","windowModeTransparent":"Прозрачный","windowModeWindow":"Обычный"},"font":{"fontSize":{"label":"Размер","voiceLabel":"Размер шрифта","panelTitle":"Размер шрифта"},"label":"Шрифт","panelTitle":"Шрифт","voiceLabel":"Шрифт"},"forms":{"button":{"title":"Свойства кнопки","text":"Текст (Значение)","type":"Тип","typeBtn":"Кнопка","typeSbm":"Отправка","typeRst":"Сброс"},"checkboxAndRadio":{"checkboxTitle":"Свойства флаговой кнопки","radioTitle":"Свойства кнопки выбора","value":"Значение","selected":"Выбрано","required":"Обязательное поле"},"form":{"title":"Свойства формы","menu":"Свойства формы","action":"Действие","method":"Метод","encoding":"Кодировка"},"hidden":{"title":"Свойства скрытого поля","name":"Имя","value":"Значение"},"select":{"title":"Свойства списка выбора","selectInfo":"Информация о списке выбора","opAvail":"Доступные варианты","value":"Значение","size":"Размер","lines":"строк(и)","chkMulti":"Разрешить выбор нескольких вариантов","required":"Обязательное поле","opText":"Текст","opValue":"Значение","btnAdd":"Добавить","btnModify":"Изменить","btnUp":"Поднять","btnDown":"Опустить","btnSetValue":"Пометить как выбранное","btnDelete":"Удалить"},"textarea":{"title":"Свойства многострочного текстового поля","cols":"Колонок","rows":"Строк"},"textfield":{"title":"Свойства текстового поля","name":"Имя","value":"Значение","charWidth":"Ширина поля (в символах)","maxChars":"Макс. количество символов","required":"Обязательное поле","type":"Тип содержимого","typeText":"Текст","typePass":"Пароль","typeEmail":"Email","typeSearch":"Поиск","typeTel":"Номер телефона","typeUrl":"Ссылка"}},"format":{"label":"Форматирование","panelTitle":"Форматирование","tag_address":"Адрес","tag_div":"Обычное (div)","tag_h1":"Заголовок 1","tag_h2":"Заголовок 2","tag_h3":"Заголовок 3","tag_h4":"Заголовок 4","tag_h5":"Заголовок 5","tag_h6":"Заголовок 6","tag_p":"Обычное","tag_pre":"Моноширинное"},"horizontalrule":{"toolbar":"Вставить горизонтальную линию"},"iframe":{"border":"Показать границы фрейма","noUrl":"Пожалуйста, введите ссылку фрейма","scrolling":"Отображать полосы прокрутки","title":"Свойства iFrame","toolbar":"iFrame"},"image":{"alt":"Альтернативный текст","border":"Граница","btnUpload":"Загрузить на сервер","button2Img":"Вы желаете преобразовать это изображение-кнопку в обычное изображение?","hSpace":"Гориз. отступ","img2Button":"Вы желаете преобразовать это обычное изображение в изображение-кнопку?","infoTab":"Данные об изображении","linkTab":"Ссылка","lockRatio":"Сохранять пропорции","menu":"Свойства изображения","resetSize":"Вернуть обычные размеры","title":"Свойства изображения","titleButton":"Свойства изображения-кнопки","upload":"Загрузить","urlMissing":"Не указана ссылка на изображение.","vSpace":"Вертик. отступ","validateBorder":"Размер границ должен быть задан числом.","validateHSpace":"Горизонтальный отступ должен быть задан числом.","validateVSpace":"Вертикальный отступ должен быть задан числом."},"indent":{"indent":"Увеличить отступ","outdent":"Уменьшить отступ"},"smiley":{"options":"Выбор смайла","title":"Вставить смайл","toolbar":"Смайлы"},"justify":{"block":"По ширине","center":"По центру","left":"По левому краю","right":"По правому краю"},"language":{"button":"Установка языка","remove":"Удалить язык"},"link":{"acccessKey":"Клавиша доступа","advanced":"Дополнительно","advisoryContentType":"Тип содержимого","advisoryTitle":"Заголовок","anchor":{"toolbar":"Вставить / редактировать якорь","menu":"Изменить якорь","title":"Свойства якоря","name":"Имя якоря","errorName":"Пожалуйста, введите имя якоря","remove":"Удалить якорь"},"anchorId":"По идентификатору","anchorName":"По имени","charset":"Кодировка ресурса","cssClasses":"Классы CSS","download":"Скачать как файл","displayText":"Отображаемый текст","emailAddress":"Email адрес","emailBody":"Текст сообщения","emailSubject":"Тема сообщения","id":"Идентификатор","info":"Информация о ссылке","langCode":"Код языка","langDir":"Направление текста","langDirLTR":"Слева направо (LTR)","langDirRTL":"Справа налево (RTL)","menu":"Редактировать ссылку","name":"Имя","noAnchors":"(В документе нет ни одного якоря)","noEmail":"Пожалуйста, введите email адрес","noUrl":"Пожалуйста, введите ссылку","other":"<другой>","popupDependent":"Зависимое (Netscape)","popupFeatures":"Параметры всплывающего окна","popupFullScreen":"Полноэкранное (IE)","popupLeft":"Отступ слева","popupLocationBar":"Панель адреса","popupMenuBar":"Панель меню","popupResizable":"Изменяемый размер","popupScrollBars":"Полосы прокрутки","popupStatusBar":"Строка состояния","popupToolbar":"Панель инструментов","popupTop":"Отступ сверху","rel":"Отношение","selectAnchor":"Выберите якорь","styles":"Стиль","tabIndex":"Последовательность перехода","target":"Цель","targetFrame":"<фрейм>","targetFrameName":"Имя целевого фрейма","targetPopup":"<всплывающее окно>","targetPopupName":"Имя всплывающего окна","title":"Ссылка","toAnchor":"Ссылка на якорь в тексте","toEmail":"Email","toUrl":"Ссылка","toolbar":"Вставить/Редактировать ссылку","type":"Тип ссылки","unlink":"Убрать ссылку","upload":"Загрузка"},"list":{"bulletedlist":"Вставить / удалить маркированный список","numberedlist":"Вставить / удалить нумерованный список"},"liststyle":{"armenian":"Армянская нумерация","bulletedTitle":"Свойства маркированного списка","circle":"Круг","decimal":"Десятичные (1, 2, 3, и т.д.)","decimalLeadingZero":"Десятичные с ведущим нулём (01, 02, 03, и т.д.)","disc":"Окружность","georgian":"Грузинская нумерация (ани, бани, гани, и т.д.)","lowerAlpha":"Строчные латинские (a, b, c, d, e, и т.д.)","lowerGreek":"Строчные греческие (альфа, бета, гамма, и т.д.)","lowerRoman":"Строчные римские (i, ii, iii, iv, v, и т.д.)","none":"Нет","notset":"<не указано>","numberedTitle":"Свойства нумерованного списка","square":"Квадрат","start":"Начиная с","type":"Тип","upperAlpha":"Заглавные латинские (A, B, C, D, E, и т.д.)","upperRoman":"Заглавные римские (I, II, III, IV, V, и т.д.)","validateStartNumber":"Первый номер списка должен быть задан обычным целым числом."},"magicline":{"title":"Вставить здесь параграф"},"maximize":{"maximize":"Развернуть","minimize":"Свернуть"},"newpage":{"toolbar":"Новая страница"},"pagebreak":{"alt":"Разрыв страницы","toolbar":"Вставить разрыв страницы для печати"},"pastetext":{"button":"Вставить только текст","pasteNotification":"Ваш браузер не поддерживает данный метод вставки. Для вставки нажмите %1"},"pastefromword":{"confirmCleanup":"Текст, который вы желаете вставить, по всей видимости, был скопирован из Word. Следует ли очистить его перед вставкой?","error":"Невозможно очистить вставленные данные из-за внутренней ошибки","title":"Вставить из Word","toolbar":"Вставить из Word"},"preview":{"preview":"Предварительный просмотр"},"print":{"toolbar":"Печать"},"removeformat":{"toolbar":"Убрать форматирование"},"save":{"toolbar":"Сохранить"},"selectall":{"toolbar":"Выделить все"},"showblocks":{"toolbar":"Отображать блоки"},"sourcearea":{"toolbar":"Источник"},"specialchar":{"options":"Выбор специального символа","title":"Выберите специальный символ","toolbar":"Вставить специальный символ"},"scayt":{"btn_about":"О SCAYT","btn_dictionaries":"Словари","btn_disable":"Отключить SCAYT","btn_enable":"Включить SCAYT","btn_langs":"Языки","btn_options":"Настройки","text_title":"Проверка орфографии по мере ввода (SCAYT)"},"stylescombo":{"label":"Стили","panelTitle":"Стили форматирования","panelTitle1":"Стили блока","panelTitle2":"Стили элемента","panelTitle3":"Стили объекта"},"table":{"border":"Размер границ","caption":"Заголовок","cell":{"menu":"Ячейка","insertBefore":"Вставить ячейку слева","insertAfter":"Вставить ячейку справа","deleteCell":"Удалить ячейки","merge":"Объединить ячейки","mergeRight":"Объединить с правой","mergeDown":"Объединить с нижней","splitHorizontal":"Разделить ячейку по вертикали","splitVertical":"Разделить ячейку по горизонтали","title":"Свойства ячейки","cellType":"Тип ячейки","rowSpan":"Объединяет строк","colSpan":"Объединяет колонок","wordWrap":"Перенос по словам","hAlign":"Горизонтальное выравнивание","vAlign":"Вертикальное выравнивание","alignBaseline":"По базовой линии","bgColor":"Цвет фона","borderColor":"Цвет границ","data":"Данные","header":"Заголовок","yes":"Да","no":"Нет","invalidWidth":"Ширина ячейки должна быть числом.","invalidHeight":"Высота ячейки должна быть числом.","invalidRowSpan":"Количество объединяемых строк должно быть задано числом.","invalidColSpan":"Количество объединяемых колонок должно быть задано числом.","chooseColor":"Выберите"},"cellPad":"Внутренний отступ ячеек","cellSpace":"Внешний отступ ячеек","column":{"menu":"Колонка","insertBefore":"Вставить колонку слева","insertAfter":"Вставить колонку справа","deleteColumn":"Удалить колонки"},"columns":"Колонки","deleteTable":"Удалить таблицу","headers":"Заголовки","headersBoth":"Сверху и слева","headersColumn":"Левая колонка","headersNone":"Без заголовков","headersRow":"Верхняя строка","invalidBorder":"Размер границ должен быть числом.","invalidCellPadding":"Внутренний отступ ячеек (cellpadding) должен быть числом.","invalidCellSpacing":"Внешний отступ ячеек (cellspacing) должен быть числом.","invalidCols":"Количество столбцов должно быть больше 0.","invalidHeight":"Высота таблицы должна быть числом.","invalidRows":"Количество строк должно быть больше 0.","invalidWidth":"Ширина таблицы должна быть числом.","menu":"Свойства таблицы","row":{"menu":"Строка","insertBefore":"Вставить строку сверху","insertAfter":"Вставить строку снизу","deleteRow":"Удалить строки"},"rows":"Строки","summary":"Итоги","title":"Свойства таблицы","toolbar":"Таблица","widthPc":"процентов","widthPx":"пикселей","widthUnit":"единица измерения"},"undo":{"redo":"Повторить","undo":"Отменить"},"wsc":{"btnIgnore":"Пропустить","btnIgnoreAll":"Пропустить всё","btnReplace":"Заменить","btnReplaceAll":"Заменить всё","btnUndo":"Отменить","changeTo":"Изменить на","errorLoading":"Произошла ошибка при подключении к серверу проверки орфографии: %s.","ieSpellDownload":"Модуль проверки орфографии не установлен. Хотите скачать его?","manyChanges":"Проверка орфографии завершена. Изменено слов: %1","noChanges":"Проверка орфографии завершена. Не изменено ни одного слова","noMispell":"Проверка орфографии завершена. Ошибок не найдено","noSuggestions":"- Варианты отсутствуют -","notAvailable":"Извините, но в данный момент сервис недоступен.","notInDic":"Отсутствует в словаре","oneChange":"Проверка орфографии завершена. Изменено одно слово","progress":"Орфография проверяется...","title":"Проверка орфографии","toolbar":"Проверить орфографию"}};
5
+ CKEDITOR.lang['ru']={"editor":"Визуальный текстовый редактор","editorPanel":"Визуальный редактор текста","common":{"editorHelp":"Нажмите ALT-0 для открытия справки","browseServer":"Выбор на сервере","url":"Ссылка","protocol":"Протокол","upload":"Загрузка файла","uploadSubmit":"Загрузить на сервер","image":"Изображение","flash":"Flash","form":"Форма","checkbox":"Чекбокс","radio":"Радиокнопка","textField":"Текстовое поле","textarea":"Многострочное текстовое поле","hiddenField":"Скрытое поле","button":"Кнопка","select":"Выпадающий список","imageButton":"Кнопка-изображение","notSet":"<не указано>","id":"Идентификатор","name":"Имя","langDir":"Направление текста","langDirLtr":"Слева направо (LTR)","langDirRtl":"Справа налево (RTL)","langCode":"Код языка","longDescr":"Длинное описание ссылки","cssClass":"Класс CSS","advisoryTitle":"Заголовок","cssStyle":"Стиль","ok":"ОК","cancel":"Отмена","close":"Закрыть","preview":"Предпросмотр","resize":"Перетащите для изменения размера","generalTab":"Основное","advancedTab":"Дополнительно","validateNumberFailed":"Это значение не является числом.","confirmNewPage":"Несохранённые изменения будут потеряны! Вы действительно желаете перейти на другую страницу?","confirmCancel":"Некоторые параметры были изменены. Вы уверены, что желаете закрыть без сохранения?","options":"Параметры","target":"Цель","targetNew":"Новое окно (_blank)","targetTop":"Главное окно (_top)","targetSelf":"Текущее окно (_self)","targetParent":"Родительское окно (_parent)","langDirLTR":"Слева направо (LTR)","langDirRTL":"Справа налево (RTL)","styles":"Стиль","cssClasses":"CSS классы","width":"Ширина","height":"Высота","align":"Выравнивание","left":"По левому краю","right":"По правому краю","center":"По центру","justify":"По ширине","alignLeft":"По левому краю","alignRight":"По правому краю","alignCenter":"По центру","alignTop":"Поверху","alignMiddle":"Посередине","alignBottom":"Понизу","alignNone":"Нет","invalidValue":"Недопустимое значение.","invalidHeight":"Высота задается числом.","invalidWidth":"Ширина задается числом.","invalidLength":"Указанное значение для поля \"%1\" должно быть положительным числом без или с корректным символом единицы измерения (%2)","invalidCssLength":"Значение, указанное в поле \"%1\", должно быть положительным целым числом. Допускается указание единиц меры CSS (px, %, in, cm, mm, em, ex, pt или pc).","invalidHtmlLength":"Значение, указанное в поле \"%1\", должно быть положительным целым числом. Допускается указание единиц меры HTML (px или %).","invalidInlineStyle":"Значение, указанное для стиля элемента, должно состоять из одной или нескольких пар данных в формате \"параметр : значение\", разделённых точкой с запятой.","cssLengthTooltip":"Введите значение в пикселях, либо число с корректной единицей меры CSS (px, %, in, cm, mm, em, ex, pt или pc).","unavailable":"%1, недоступно","keyboard":{"8":"Backspace","13":"Ввод","16":"Shift","17":"Ctrl","18":"Alt","32":"Пробел","35":"End","36":"Home","46":"Delete","112":"F1","113":"F2","114":"F3","115":"F4","116":"F5","117":"F6","118":"F7","119":"F8","120":"F9","121":"F10","122":"F11","123":"F12","124":"F13","125":"F14","126":"F15","127":"F16","128":"F17","129":"F18","130":"F19","131":"F20","132":"F21","133":"F22","134":"F23","135":"F24","224":"Command"},"keyboardShortcut":"Комбинация клавиш","optionDefault":"По умолчанию"},"about":{"copy":"Copyright © $1. Все права защищены.","dlgTitle":"О CKEditor 4","moreInfo":"Для получения информации о лицензии, пожалуйста, перейдите на наш сайт:"},"basicstyles":{"bold":"Полужирный","italic":"Курсив","strike":"Зачеркнутый","subscript":"Подстрочный индекс","superscript":"Надстрочный индекс","underline":"Подчеркнутый"},"bidi":{"ltr":"Направление текста слева направо","rtl":"Направление текста справа налево"},"blockquote":{"toolbar":"Цитата"},"notification":{"closed":"Уведомление закрыто"},"toolbar":{"toolbarCollapse":"Свернуть панель инструментов","toolbarExpand":"Развернуть панель инструментов","toolbarGroups":{"document":"Документ","clipboard":"Буфер обмена / Отмена действий","editing":"Корректировка","forms":"Формы","basicstyles":"Простые стили","paragraph":"Абзац","links":"Ссылки","insert":"Вставка","styles":"Стили","colors":"Цвета","tools":"Инструменты"},"toolbars":"Панели инструментов редактора"},"clipboard":{"copy":"Копировать","copyError":"Настройки безопасности вашего браузера не разрешают редактору выполнять операции по копированию текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+C).","cut":"Вырезать","cutError":"Настройки безопасности вашего браузера не разрешают редактору выполнять операции по вырезке текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+X).","paste":"Вставить","pasteNotification":"Для вставки нажмите %1. Ваш браузер не поддерживает возможность вставки через панель инструментов или контекстное меню","pasteArea":"Область вставки","pasteMsg":"Вставьте контент в эту область и нажмите OK"},"colorbutton":{"auto":"Автоматически","bgColorTitle":"Цвет фона","colors":{"000":"Чёрный","800000":"Бордовый","8B4513":"Кожано-коричневый","2F4F4F":"Темный синевато-серый","008080":"Сине-зелёный","000080":"Тёмно-синий","4B0082":"Индиго","696969":"Тёмно-серый","B22222":"Кирпичный","A52A2A":"Коричневый","DAA520":"Золотисто-берёзовый","006400":"Темно-зелёный","40E0D0":"Бирюзовый","0000CD":"Умеренно синий","800080":"Пурпурный","808080":"Серый","F00":"Красный","FF8C00":"Темно-оранжевый","FFD700":"Золотистый","008000":"Зелёный","0FF":"Васильковый","00F":"Синий","EE82EE":"Фиолетовый","A9A9A9":"Тускло-серый","FFA07A":"Светло-лососевый","FFA500":"Оранжевый","FFFF00":"Жёлтый","00FF00":"Лайма","AFEEEE":"Бледно-синий","ADD8E6":"Свелто-голубой","DDA0DD":"Сливовый","D3D3D3":"Светло-серый","FFF0F5":"Розово-лавандовый","FAEBD7":"Античный белый","FFFFE0":"Светло-жёлтый","F0FFF0":"Медвяной росы","F0FFFF":"Лазурный","F0F8FF":"Бледно-голубой","E6E6FA":"Лавандовый","FFF":"Белый","1ABC9C":"Насыщенный голубой","2ECC71":"Изумрудный","3498DB":"Светло-синий","9B59B6":"Аметист","4E5F70":"Сине-серый","F1C40F":"Ярко-желтый","16A085":"Тёмно-голубой","27AE60":"Тёмно-изумрудный","2980B9":"Насыщенный синий","8E44AD":"Тёмно-фиолетовый","2C3E50":"Ненасыщенный синий","F39C12":"Оранжевый","E67E22":"Морковный","E74C3C":"Бледно-красный","ECF0F1":"Яркий серебристый","95A5A6":"Светлый серо-голубой","DDD":"Светло-серый","D35400":"Цвет тыквы","C0392B":"Насыщенный красный","BDC3C7":"Серебристый","7F8C8D":"Серо-голубой","999":"Тёмно-серый"},"more":"Ещё цвета...","panelTitle":"Цвета","textColorTitle":"Цвет текста"},"colordialog":{"clear":"Очистить","highlight":"Под курсором","options":"Настройки цвета","selected":"Выбранный цвет","title":"Выберите цвет"},"contextmenu":{"options":"Параметры контекстного меню"},"div":{"IdInputLabel":"Идентификатор","advisoryTitleInputLabel":"Заголовок","cssClassInputLabel":"Классы CSS","edit":"Редактировать контейнер","inlineStyleInputLabel":"Стиль элемента","langDirLTRLabel":"Слева направо (LTR)","langDirLabel":"Направление текста","langDirRTLLabel":"Справа налево (RTL)","languageCodeInputLabel":"Код языка","remove":"Удалить контейнер","styleSelectLabel":"Стиль","title":"Создать Div-контейнер","toolbar":"Создать Div-контейнер"},"elementspath":{"eleLabel":"Путь элементов","eleTitle":"Элемент %1"},"filetools":{"loadError":"Ошибка при чтении файла","networkError":"Сетевая ошибка при загрузке файла","httpError404":"HTTP ошибка при загрузке файла (404: Файл не найден)","httpError403":"HTTP ошибка при загрузке файла (403: Запрещено)","httpError":"HTTP ошибка при загрузке файла (%1)","noUrlError":"Не определен URL для загрузки файлов","responseError":"Некорректный ответ сервера"},"find":{"find":"Найти","findOptions":"Опции поиска","findWhat":"Найти:","matchCase":"Учитывать регистр","matchCyclic":"По всему тексту","matchWord":"Только слово целиком","notFoundMsg":"Искомый текст не найден.","replace":"Заменить","replaceAll":"Заменить всё","replaceSuccessMsg":"Успешно заменено %1 раз(а).","replaceWith":"Заменить на:","title":"Поиск и замена"},"fakeobjects":{"anchor":"Якорь","flash":"Flash анимация","hiddenfield":"Скрытое поле","iframe":"iFrame","unknown":"Неизвестный объект"},"flash":{"access":"Доступ к скриптам","accessAlways":"Всегда","accessNever":"Никогда","accessSameDomain":"В том же домене","alignAbsBottom":"По низу текста","alignAbsMiddle":"По середине текста","alignBaseline":"По базовой линии","alignTextTop":"По верху текста","bgcolor":"Цвет фона","chkFull":"Разрешить полноэкранный режим","chkLoop":"Повторять","chkMenu":"Включить меню Flash","chkPlay":"Автоматическое воспроизведение","flashvars":"Переменные для Flash","hSpace":"Гориз. отступ","properties":"Свойства Flash","propertiesTab":"Свойства","quality":"Качество","qualityAutoHigh":"Запуск на высоком","qualityAutoLow":"Запуск на низком","qualityBest":"Лучшее","qualityHigh":"Высокое","qualityLow":"Низкое","qualityMedium":"Среднее","scale":"Масштабировать","scaleAll":"Пропорционально","scaleFit":"Заполнять","scaleNoBorder":"Заходить за границы","title":"Свойства Flash","vSpace":"Вертик. отступ","validateHSpace":"Горизонтальный отступ задается числом.","validateSrc":"Вы должны ввести ссылку","validateVSpace":"Вертикальный отступ задается числом.","windowMode":"Взаимодействие с окном","windowModeOpaque":"Непрозрачный","windowModeTransparent":"Прозрачный","windowModeWindow":"Обычный"},"font":{"fontSize":{"label":"Размер","voiceLabel":"Размер шрифта","panelTitle":"Размер шрифта"},"label":"Шрифт","panelTitle":"Шрифт","voiceLabel":"Шрифт"},"format":{"label":"Форматирование","panelTitle":"Форматирование","tag_address":"Адрес","tag_div":"Обычное (div)","tag_h1":"Заголовок 1","tag_h2":"Заголовок 2","tag_h3":"Заголовок 3","tag_h4":"Заголовок 4","tag_h5":"Заголовок 5","tag_h6":"Заголовок 6","tag_p":"Обычное","tag_pre":"Моноширинное"},"forms":{"button":{"title":"Свойства кнопки","text":"Текст (Значение)","type":"Тип","typeBtn":"Кнопка","typeSbm":"Отправка","typeRst":"Сброс"},"checkboxAndRadio":{"checkboxTitle":"Свойства флаговой кнопки","radioTitle":"Свойства кнопки выбора","value":"Значение","selected":"Выбрано","required":"Обязательное поле"},"form":{"title":"Свойства формы","menu":"Свойства формы","action":"Действие","method":"Метод","encoding":"Кодировка"},"hidden":{"title":"Свойства скрытого поля","name":"Имя","value":"Значение"},"select":{"title":"Свойства списка выбора","selectInfo":"Информация о списке выбора","opAvail":"Доступные варианты","value":"Значение","size":"Размер","lines":"строк(и)","chkMulti":"Разрешить выбор нескольких вариантов","required":"Обязательное поле","opText":"Текст","opValue":"Значение","btnAdd":"Добавить","btnModify":"Изменить","btnUp":"Поднять","btnDown":"Опустить","btnSetValue":"Пометить как выбранное","btnDelete":"Удалить"},"textarea":{"title":"Свойства многострочного текстового поля","cols":"Колонок","rows":"Строк"},"textfield":{"title":"Свойства текстового поля","name":"Имя","value":"Значение","charWidth":"Ширина поля (в символах)","maxChars":"Макс. количество символов","required":"Обязательное поле","type":"Тип содержимого","typeText":"Текст","typePass":"Пароль","typeEmail":"Email","typeSearch":"Поиск","typeTel":"Номер телефона","typeUrl":"Ссылка"}},"horizontalrule":{"toolbar":"Вставить горизонтальную линию"},"iframe":{"border":"Показать границы фрейма","noUrl":"Пожалуйста, введите ссылку фрейма","scrolling":"Отображать полосы прокрутки","title":"Свойства iFrame","toolbar":"iFrame"},"indent":{"indent":"Увеличить отступ","outdent":"Уменьшить отступ"},"language":{"button":"Установка языка","remove":"Удалить язык"},"link":{"acccessKey":"Клавиша доступа","advanced":"Дополнительно","advisoryContentType":"Тип содержимого","advisoryTitle":"Заголовок","anchor":{"toolbar":"Вставить / редактировать якорь","menu":"Изменить якорь","title":"Свойства якоря","name":"Имя якоря","errorName":"Пожалуйста, введите имя якоря","remove":"Удалить якорь"},"anchorId":"По идентификатору","anchorName":"По имени","charset":"Кодировка ресурса","cssClasses":"Классы CSS","download":"Скачать как файл","displayText":"Отображаемый текст","emailAddress":"Email адрес","emailBody":"Текст сообщения","emailSubject":"Тема сообщения","id":"Идентификатор","info":"Информация о ссылке","langCode":"Код языка","langDir":"Направление текста","langDirLTR":"Слева направо (LTR)","langDirRTL":"Справа налево (RTL)","menu":"Редактировать ссылку","name":"Имя","noAnchors":"(В документе нет ни одного якоря)","noEmail":"Пожалуйста, введите email адрес","noUrl":"Пожалуйста, введите ссылку","noTel":"Please type the phone number","other":"<другой>","phoneNumber":"Phone number","popupDependent":"Зависимое (Netscape)","popupFeatures":"Параметры всплывающего окна","popupFullScreen":"Полноэкранное (IE)","popupLeft":"Отступ слева","popupLocationBar":"Панель адреса","popupMenuBar":"Панель меню","popupResizable":"Изменяемый размер","popupScrollBars":"Полосы прокрутки","popupStatusBar":"Строка состояния","popupToolbar":"Панель инструментов","popupTop":"Отступ сверху","rel":"Отношение","selectAnchor":"Выберите якорь","styles":"Стиль","tabIndex":"Последовательность перехода","target":"Цель","targetFrame":"<фрейм>","targetFrameName":"Имя целевого фрейма","targetPopup":"<всплывающее окно>","targetPopupName":"Имя всплывающего окна","title":"Ссылка","toAnchor":"Ссылка на якорь в тексте","toEmail":"Email","toUrl":"Ссылка","toPhone":"Phone","toolbar":"Вставить/Редактировать ссылку","type":"Тип ссылки","unlink":"Убрать ссылку","upload":"Загрузка"},"list":{"bulletedlist":"Вставить / удалить маркированный список","numberedlist":"Вставить / удалить нумерованный список"},"liststyle":{"bulletedTitle":"Свойства маркированного списка","circle":"Окружность","decimal":"Десятичные (1, 2, 3, и т.д.)","disc":"Круг","lowerAlpha":"Строчные латинские (a, b, c, d, e, и т.д.)","lowerRoman":"Строчные римские (i, ii, iii, iv, v, и т.д.)","none":"Нет","notset":"<не указано>","numberedTitle":"Свойства нумерованного списка","square":"Квадрат","start":"Начиная с","type":"Тип","upperAlpha":"Заглавные латинские (A, B, C, D, E, и т.д.)","upperRoman":"Заглавные римские (I, II, III, IV, V, и т.д.)","validateStartNumber":"Первый номер списка должен быть задан обычным целым числом."},"magicline":{"title":"Вставить здесь параграф"},"maximize":{"maximize":"Развернуть","minimize":"Свернуть"},"newpage":{"toolbar":"Новая страница"},"pagebreak":{"alt":"Разрыв страницы","toolbar":"Вставить разрыв страницы для печати"},"pastefromword":{"confirmCleanup":"Текст, который вы желаете вставить, по всей видимости, был скопирован из Word. Следует ли очистить его перед вставкой?","error":"Невозможно очистить вставленные данные из-за внутренней ошибки","title":"Вставить из Word","toolbar":"Вставить из Word"},"pastetext":{"button":"Вставить только текст","pasteNotification":"Press %1 to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option.","title":"Вставить только текст"},"preview":{"preview":"Предварительный просмотр"},"print":{"toolbar":"Печать"},"removeformat":{"toolbar":"Убрать форматирование"},"save":{"toolbar":"Сохранить"},"scayt":{"btn_about":"О SCAYT","btn_dictionaries":"Словари","btn_disable":"Отключить SCAYT","btn_enable":"Включить SCAYT","btn_langs":"Языки","btn_options":"Настройки","text_title":"Проверка орфографии по мере ввода (SCAYT)"},"selectall":{"toolbar":"Выделить все"},"showblocks":{"toolbar":"Отображать блоки"},"smiley":{"options":"Выбор смайла","title":"Вставить смайл","toolbar":"Смайлы"},"sourcearea":{"toolbar":"Источник"},"specialchar":{"options":"Выбор специального символа","title":"Выберите специальный символ","toolbar":"Вставить специальный символ"},"stylescombo":{"label":"Стили","panelTitle":"Стили форматирования","panelTitle1":"Стили блока","panelTitle2":"Стили элемента","panelTitle3":"Стили объекта"},"table":{"border":"Размер границ","caption":"Заголовок","cell":{"menu":"Ячейка","insertBefore":"Вставить ячейку слева","insertAfter":"Вставить ячейку справа","deleteCell":"Удалить ячейки","merge":"Объединить ячейки","mergeRight":"Объединить с правой","mergeDown":"Объединить с нижней","splitHorizontal":"Разделить ячейку по вертикали","splitVertical":"Разделить ячейку по горизонтали","title":"Свойства ячейки","cellType":"Тип ячейки","rowSpan":"Объединяет строк","colSpan":"Объединяет колонок","wordWrap":"Перенос по словам","hAlign":"Горизонтальное выравнивание","vAlign":"Вертикальное выравнивание","alignBaseline":"По базовой линии","bgColor":"Цвет фона","borderColor":"Цвет границ","data":"Данные","header":"Заголовок","yes":"Да","no":"Нет","invalidWidth":"Ширина ячейки должна быть числом.","invalidHeight":"Высота ячейки должна быть числом.","invalidRowSpan":"Количество объединяемых строк должно быть задано числом.","invalidColSpan":"Количество объединяемых колонок должно быть задано числом.","chooseColor":"Выберите"},"cellPad":"Внутренний отступ ячеек","cellSpace":"Внешний отступ ячеек","column":{"menu":"Колонка","insertBefore":"Вставить колонку слева","insertAfter":"Вставить колонку справа","deleteColumn":"Удалить колонки"},"columns":"Колонки","deleteTable":"Удалить таблицу","headers":"Заголовки","headersBoth":"Сверху и слева","headersColumn":"Левая колонка","headersNone":"Без заголовков","headersRow":"Верхняя строка","heightUnit":"height unit","invalidBorder":"Размер границ должен быть числом.","invalidCellPadding":"Внутренний отступ ячеек (cellpadding) должен быть числом.","invalidCellSpacing":"Внешний отступ ячеек (cellspacing) должен быть числом.","invalidCols":"Количество столбцов должно быть больше 0.","invalidHeight":"Высота таблицы должна быть числом.","invalidRows":"Количество строк должно быть больше 0.","invalidWidth":"Ширина таблицы должна быть числом.","menu":"Свойства таблицы","row":{"menu":"Строка","insertBefore":"Вставить строку сверху","insertAfter":"Вставить строку снизу","deleteRow":"Удалить строки"},"rows":"Строки","summary":"Итоги","title":"Свойства таблицы","toolbar":"Таблица","widthPc":"процентов","widthPx":"пикселей","widthUnit":"единица измерения"},"templates":{"button":"Шаблоны","emptyListMsg":"(не определено ни одного шаблона)","insertOption":"Заменить текущее содержимое","options":"Параметры шаблона","selectPromptMsg":"Пожалуйста, выберите, какой шаблон следует открыть в редакторе","title":"Шаблоны содержимого"},"undo":{"redo":"Повторить","undo":"Отменить"},"widget":{"move":"Нажмите и перетащите, чтобы переместить","label":"%1 виджет"},"uploadwidget":{"abort":"Загрузка отменена пользователем","doneOne":"Файл успешно загружен","doneMany":"Успешно загружено файлов: %1","uploadOne":"Загрузка файла ({percentage}%)","uploadMany":"Загрузка файлов, {current} из {max} загружено ({percentage}%)..."},"wsc":{"btnIgnore":"Пропустить","btnIgnoreAll":"Пропустить всё","btnReplace":"Заменить","btnReplaceAll":"Заменить всё","btnUndo":"Отменить","changeTo":"Изменить на","errorLoading":"Произошла ошибка при подключении к серверу проверки орфографии: %s.","ieSpellDownload":"Модуль проверки орфографии не установлен. Хотите скачать его?","manyChanges":"Проверка орфографии завершена. Изменено слов: %1","noChanges":"Проверка орфографии завершена. Не изменено ни одного слова","noMispell":"Проверка орфографии завершена. Ошибок не найдено","noSuggestions":"- Варианты отсутствуют -","notAvailable":"Извините, но в данный момент сервис недоступен.","notInDic":"Отсутствует в словаре","oneChange":"Проверка орфографии завершена. Изменено одно слово","progress":"Орфография проверяется...","title":"Проверка орфографии","toolbar":"Проверить орфографию"}};
@@ -1,10 +1,10 @@
1
1
  /*
2
- Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- CKEDITOR.dialog.add("a11yHelp",function(e){var a=e.lang.a11yhelp,b=e.lang.common.keyboard,q=CKEDITOR.tools.getNextId(),d={8:b[8],9:a.tab,13:b[13],16:b[16],17:b[17],18:b[18],19:a.pause,20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:b[35],36:b[36],37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:b[46],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8,
6
- 105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};d[CKEDITOR.ALT]=b[18];d[CKEDITOR.SHIFT]=b[16];d[CKEDITOR.CTRL]=CKEDITOR.env.mac?b[224]:b[17];var k=
7
- [CKEDITOR.ALT,CKEDITOR.SHIFT,CKEDITOR.CTRL],r=/\$\{(.*?)\}/g,t=function(a,b){var c=e.getCommandKeystroke(b);if(c){for(var l,f,h=[],g=0;g<k.length;g++)f=k[g],l=c/k[g],1<l&&2>=l&&(c-=f,h.push(d[f]));h.push(d[c]||String.fromCharCode(c));c=h.join("+")}else c=a;return c};return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:e.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()},html:function(){for(var b=
8
- '\x3cdiv class\x3d"cke_accessibility_legend" role\x3d"document" aria-labelledby\x3d"'+q+'_arialbl" tabIndex\x3d"-1"\x3e%1\x3c/div\x3e\x3cspan id\x3d"'+q+'_arialbl" class\x3d"cke_voice_label"\x3e'+a.contents+" \x3c/span\x3e",d=[],c=a.legend,l=c.length,f=0;f<l;f++){for(var h=c[f],g=[],e=h.items,k=e.length,p=0;p<k;p++){var m=e[p],n=CKEDITOR.env.edge&&m.legendEdge?m.legendEdge:m.legend,n=n.replace(r,t);n.match(r)||g.push("\x3cdt\x3e%1\x3c/dt\x3e\x3cdd\x3e%2\x3c/dd\x3e".replace("%1",m.name).replace("%2",
9
- n))}d.push("\x3ch1\x3e%1\x3c/h1\x3e\x3cdl\x3e%2\x3c/dl\x3e".replace("%1",h.name).replace("%2",g.join("")))}return b.replace("%1",d.join(""))}()+'\x3cstyle type\x3d"text/css"\x3e.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}\x3c/style\x3e'}]}],
5
+ CKEDITOR.dialog.add("a11yHelp",function(f){function m(a){for(var b,c,h=[],d=0;d<g.length;d++)c=g[d],b=a/g[d],1<b&&2>=b&&(a-=c,h.push(e[c]));h.push(e[a]||String.fromCharCode(a));return h.join("+")}function t(a,b){var c=f.getCommandKeystroke(b,!0);return c.length?CKEDITOR.tools.array.map(c,m).join(" / "):a}var a=f.lang.a11yhelp,b=f.lang.common.keyboard,p=CKEDITOR.tools.getNextId(),q=/\$\{(.*?)\}/g,g=[CKEDITOR.ALT,CKEDITOR.SHIFT,CKEDITOR.CTRL],e={8:b[8],9:a.tab,13:b[13],16:b[16],17:b[17],18:b[18],19:a.pause,
6
+ 20:a.capslock,27:a.escape,33:a.pageUp,34:a.pageDown,35:b[35],36:b[36],37:a.leftArrow,38:a.upArrow,39:a.rightArrow,40:a.downArrow,45:a.insert,46:b[46],91:a.leftWindowKey,92:a.rightWindowKey,93:a.selectKey,96:a.numpad0,97:a.numpad1,98:a.numpad2,99:a.numpad3,100:a.numpad4,101:a.numpad5,102:a.numpad6,103:a.numpad7,104:a.numpad8,105:a.numpad9,106:a.multiply,107:a.add,109:a.subtract,110:a.decimalPoint,111:a.divide,112:a.f1,113:a.f2,114:a.f3,115:a.f4,116:a.f5,117:a.f6,118:a.f7,119:a.f8,120:a.f9,121:a.f10,
7
+ 122:a.f11,123:a.f12,144:a.numLock,145:a.scrollLock,186:a.semiColon,187:a.equalSign,188:a.comma,189:a.dash,190:a.period,191:a.forwardSlash,192:a.graveAccent,219:a.openBracket,220:a.backSlash,221:a.closeBracket,222:a.singleQuote};e[CKEDITOR.ALT]=b[18];e[CKEDITOR.SHIFT]=b[16];e[CKEDITOR.CTRL]=CKEDITOR.env.mac?b[224]:b[17];return{title:a.title,minWidth:600,minHeight:400,contents:[{id:"info",label:f.lang.common.generalTab,expand:!0,elements:[{type:"html",id:"legends",style:"white-space:normal;",focus:function(){this.getElement().focus()},
8
+ html:function(){for(var b='\x3cdiv class\x3d"cke_accessibility_legend" role\x3d"document" aria-labelledby\x3d"'+p+'_arialbl" tabIndex\x3d"-1"\x3e%1\x3c/div\x3e\x3cspan id\x3d"'+p+'_arialbl" class\x3d"cke_voice_label"\x3e'+a.contents+" \x3c/span\x3e",e=[],c=a.legend,h=c.length,d=0;d<h;d++){for(var f=c[d],g=[],r=f.items,m=r.length,n=0;n<m;n++){var k=r[n],l=CKEDITOR.env.edge&&k.legendEdge?k.legendEdge:k.legend,l=l.replace(q,t);l.match(q)||g.push("\x3cdt\x3e%1\x3c/dt\x3e\x3cdd\x3e%2\x3c/dd\x3e".replace("%1",
9
+ k.name).replace("%2",l))}e.push("\x3ch1\x3e%1\x3c/h1\x3e\x3cdl\x3e%2\x3c/dl\x3e".replace("%1",f.name).replace("%2",g.join("")))}return b.replace("%1",e.join(""))}()+'\x3cstyle type\x3d"text/css"\x3e.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}\x3c/style\x3e'}]}],
10
10
  buttons:[CKEDITOR.dialog.cancelButton]}});
@@ -1,6 +1,6 @@
1
1
  /*
2
- Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  CKEDITOR.plugins.setLang("a11yhelp","en",{title:"Accessibility Instructions",contents:"Help Contents. To close this dialog press ESC.",legend:[{name:"General",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT+TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."},{name:"Editor Dialog",legend:"Inside a dialog, press TAB to navigate to the next dialog element, press SHIFT+TAB to move to the previous dialog element, press ENTER to submit the dialog, press ESC to cancel the dialog. When a dialog has multiple tabs, the tab list can be reached either with ALT+F10 or with TAB as part of the dialog tabbing order. With tab list focused, move to the next and previous tab with RIGHT and LEFT ARROW, respectively."},
6
6
  {name:"Editor Context Menu",legend:"Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."},{name:"Editor List Box",legend:"Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."},
@@ -1,11 +1,11 @@
1
1
  /*
2
- Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  CKEDITOR.plugins.setLang("a11yhelp","ru",{title:"Горячие клавиши",contents:"Помощь. Для закрытия этого окна нажмите ESC.",legend:[{name:"Основное",items:[{name:"Панель инструментов",legend:"Нажмите ${toolbarFocus} для перехода к панели инструментов. Для перемещения между группами панели инструментов используйте TAB и SHIFT+TAB. Для перемещения между кнопками панели иструментов используйте кнопки ВПРАВО или ВЛЕВО. Нажмите ПРОБЕЛ или ENTER для запуска кнопки панели инструментов."},{name:"Диалоги",legend:'Внутри диалога, нажмите TAB чтобы перейти к следующему элементу диалога, нажмите SHIFT+TAB чтобы перейти к предыдущему элементу диалога, нажмите ENTER чтобы отправить диалог, нажмите ESC чтобы отменить диалог. Когда диалоговое окно имеет несколько вкладок, получить доступ к панели вкладок как части диалога можно нажатием или сочетания ALT+F10 или TAB, при этом активные элементы диалога будут перебираться с учетом порядка табуляции. При активной панели вкладок, переход к следующей или предыдущей вкладке осуществляется нажатием стрелки "ВПРАВО" или стрелки "ВЛЕВО" соответственно.'},
6
6
  {name:"Контекстное меню",legend:'Нажмите ${contextMenu} или клавишу APPLICATION, чтобы открыть контекстное меню. Затем перейдите к следующему пункту меню с помощью TAB или стрелкой "ВНИЗ". Переход к предыдущей опции - SHIFT+TAB или стрелкой "ВВЕРХ". Нажмите SPACE, или ENTER, чтобы задействовать опцию меню. Открыть подменю текущей опции - SPACE или ENTER или стрелкой "ВПРАВО". Возврат к родительскому пункту меню - ESC или стрелкой "ВЛЕВО". Закрытие контекстного меню - ESC.'},{name:"Редактор списка",
7
7
  legend:'Внутри окна списка, переход к следующему пункту списка - TAB или стрелкой "ВНИЗ". Переход к предыдущему пункту списка - SHIFT+TAB или стрелкой "ВВЕРХ". Нажмите SPACE, или ENTER, чтобы задействовать опцию списка. Нажмите ESC, чтобы закрыть окно списка.'},{name:"Путь к элементу",legend:'Нажмите ${elementsPathFocus}, чтобы перейти к панели пути элементов. Переход к следующей кнопке элемента - TAB или стрелкой "ВПРАВО". Переход к предыдущей кнопку - SHIFT+TAB или стрелкой "ВЛЕВО". Нажмите SPACE, или ENTER, чтобы выбрать элемент в редакторе.'}]},
8
8
  {name:"Команды",items:[{name:"Отменить",legend:"Нажмите ${undo}"},{name:"Повторить",legend:"Нажмите ${redo}"},{name:"Полужирный",legend:"Нажмите ${bold}"},{name:"Курсив",legend:"Нажмите ${italic}"},{name:"Подчеркнутый",legend:"Нажмите ${underline}"},{name:"Гиперссылка",legend:"Нажмите ${link}"},{name:"Свернуть панель инструментов",legend:"Нажмите ${toolbarCollapse}"},{name:"Команды доступа к предыдущему фокусному пространству",legend:'Нажмите ${accessPreviousSpace}, чтобы обратиться к ближайшему недостижимому фокусному пространству перед символом "^", например: два смежных HR элемента. Повторите комбинацию клавиш, чтобы достичь отдаленных фокусных пространств.'},
9
- {name:"Команды доступа к следующему фокусному пространству",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:"Справка по горячим клавишам",legend:"Нажмите ${a11yHelp}"},{name:"Вставить только текст",legend:"Нажмите ${pastetext}",legendEdge:"Press ${pastetext}, followed by ${paste}"}]}],tab:"Tab",pause:"Pause",capslock:"Caps Lock",escape:"Esc",pageUp:"Page Up",
9
+ {name:"Команды доступа к следующему фокусному пространству",legend:"Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:"Справка по горячим клавишам",legend:"Нажмите ${a11yHelp}"},{name:"Вставить только текст",legend:"Нажмите ${pastetext}",legendEdge:"Нажмите ${pastetext} и затем ${paste}"}]}],tab:"Tab",pause:"Pause",capslock:"Caps Lock",escape:"Esc",pageUp:"Page Up",
10
10
  pageDown:"Page Down",leftArrow:"Стрелка влево",upArrow:"Стрелка вверх",rightArrow:"Стрелка вправо",downArrow:"Стрелка вниз",insert:"Insert",leftWindowKey:"Левая клавиша Windows",rightWindowKey:"Правая клавиша Windows",selectKey:"Выбрать",numpad0:"Цифра 0",numpad1:"Цифра 1",numpad2:"Цифра 2",numpad3:"Цифра 3",numpad4:"Цифра 4",numpad5:"Цифра 5",numpad6:"Цифра 6",numpad7:"Цифра 7",numpad8:"Цифра 8",numpad9:"Цифра 9",multiply:"Умножить",add:"Плюс",subtract:"Вычесть",decimalPoint:"Десятичная точка",divide:"Делить",
11
11
  f1:"F1",f2:"F2",f3:"F3",f4:"F4",f5:"F5",f6:"F6",f7:"F7",f8:"F8",f9:"F9",f10:"F10",f11:"F11",f12:"F12",numLock:"Num Lock",scrollLock:"Scroll Lock",semiColon:"Точка с запятой",equalSign:"Равно",comma:"Запятая",dash:"Тире",period:"Точка",forwardSlash:"Наклонная черта",graveAccent:"Апостроф",openBracket:"Открыть скобку",backSlash:"Обратная наклонная черта",closeBracket:"Закрыть скобку",singleQuote:"Одинарная кавычка"});
@@ -1,8 +1,8 @@
1
1
  /*
2
- Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
2
+ Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- CKEDITOR.dialog.add("about",function(a){a=a.lang.about;var b=CKEDITOR.getUrl(CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png");return{title:CKEDITOR.env.ie?a.dlgTitle:a.title,minWidth:390,minHeight:230,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'\x3cstyle type\x3d"text/css"\x3e.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url('+
6
- b+");"+(CKEDITOR.env.hidpi?"background-size:163px 58px;":"")+'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}\x3c/style\x3e\x3cdiv class\x3d"cke_about_container"\x3e\x3cdiv class\x3d"cke_about_logo"\x3e\x3c/div\x3e\x3cp\x3eCKEditor '+CKEDITOR.version+" (revision "+CKEDITOR.revision+')\x3cbr\x3e\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"http://ckeditor.com/"\x3ehttp://ckeditor.com\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+
7
- a.help.replace("$1",'\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"http://docs.ckeditor.com/user"\x3e'+a.userGuide+"\x3c/a\x3e")+"\x3c/p\x3e\x3cp\x3e"+a.moreInfo+'\x3cbr\x3e\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"http://ckeditor.com/about/license"\x3ehttp://ckeditor.com/about/license\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+a.copy.replace("$1",'\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"http://cksource.com/"\x3eCKSource\x3c/a\x3e - Frederico Knabben')+
5
+ CKEDITOR.dialog.add("about",function(a){a=a.lang.about;var b=CKEDITOR.getUrl(CKEDITOR.plugins.get("about").path+"dialogs/"+(CKEDITOR.env.hidpi?"hidpi/":"")+"logo_ckeditor.png");return{title:a.dlgTitle,minWidth:390,minHeight:210,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[{type:"html",html:'\x3cstyle type\x3d"text/css"\x3e.cke_about_container{color:#000 !important;padding:10px 10px 0;margin-top:5px}.cke_about_container p{margin: 0 0 10px;}.cke_about_container .cke_about_logo{height:81px;background-color:#fff;background-image:url('+
6
+ b+");"+(CKEDITOR.env.hidpi?"background-size:194px 58px;":"")+'background-position:center; background-repeat:no-repeat;margin-bottom:10px;}.cke_about_container a{cursor:pointer !important;color:#00B2CE !important;text-decoration:underline !important;}.cke_about_container \x3e p,.cke_rtl .cke_about_container \x3e p{text-align:center;}\x3c/style\x3e\x3cdiv class\x3d"cke_about_container"\x3e\x3cdiv class\x3d"cke_about_logo"\x3e\x3c/div\x3e\x3cp\x3eCKEditor '+CKEDITOR.version+" (revision "+CKEDITOR.revision+
7
+ ')\x3cbr\x3e\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://ckeditor.com/"\x3ehttps://ckeditor.com\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+a.moreInfo+'\x3cbr\x3e\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://ckeditor.com/legal/ckeditor-oss-license/"\x3ehttps://ckeditor.com/legal/ckeditor-oss-license/\x3c/a\x3e\x3c/p\x3e\x3cp\x3e'+a.copy.replace("$1",'\x3ca target\x3d"_blank" rel\x3d"noopener noreferrer" href\x3d"https://cksource.com/"\x3eCKSource\x3c/a\x3e - Frederico Knabben')+
8
8
  "\x3c/p\x3e\x3c/div\x3e"}]}],buttons:[CKEDITOR.dialog.cancelButton]}});
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ CKEDITOR.dialog.add("paste",function(c){function k(a){var b=new CKEDITOR.dom.document(a.document),g=b.getBody(),d=b.getById("cke_actscrpt");d&&d.remove();g.setAttribute("contenteditable",!0);g.on(e.mainPasteEvent,function(a){a=e.initPasteDataTransfer(a);f?a!=f&&(f=e.initPasteDataTransfer()):f=a});if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){a=a.data;var b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+
6
+ 9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement));b.getWindow().getFrame().removeCustomData("pendingFocus")&&g.focus()}var h=c.lang.clipboard,e=CKEDITOR.plugins.clipboard,f;c.on("pasteDialogCommit",function(a){a.data&&c.fire("paste",{type:"auto",dataValue:a.data.dataValue,method:"paste",dataTransfer:a.data.dataTransfer||e.initPasteDataTransfer()})},null,null,1E3);return{title:h.paste,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:
7
+ 350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent();this._.committed=!1},onLoad:function(){(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&"rtl"==c.lang.dir&&this.parts.contents.setStyle("overflow","hidden")},onOk:function(){this.commitContent()},contents:[{id:"general",label:c.lang.common.generalTab,elements:[{type:"html",id:"pasteMsg",html:'\x3cdiv style\x3d"white-space:normal;width:340px"\x3e'+h.pasteMsg+"\x3c/div\x3e"},{type:"html",
8
+ id:"editing_area",style:"width:100%;height:100%",html:"",focus:function(){var a=this.getInputElement(),b=a.getFrameDocument().getBody();!b||b.isReadOnly()?a.setCustomData("pendingFocus",1):b.focus()},setup:function(){var a=this.getDialog(),b='\x3chtml dir\x3d"'+c.config.contentsLangDirection+'" lang\x3d"'+(c.config.contentsLanguage||c.langCode)+'"\x3e\x3chead\x3e\x3cstyle\x3ebody{margin:3px;height:95%;word-break:break-all;}\x3c/style\x3e\x3c/head\x3e\x3cbody\x3e\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"\x3ewindow.parent.CKEDITOR.tools.callFunction('+
9
+ CKEDITOR.tools.addFunction(k,a)+",this);\x3c/script\x3e\x3c/body\x3e\x3c/html\x3e",g=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+'})())"':"",d=CKEDITOR.dom.element.createFromHtml('\x3ciframe class\x3d"cke_pasteframe" frameborder\x3d"0" allowTransparency\x3d"true" src\x3d"'+g+'" aria-label\x3d"'+h.pasteArea+'" aria-describedby\x3d"'+a.getContentElement("general",
10
+ "pasteMsg").domId+'"\x3e\x3c/iframe\x3e');f=null;d.on("load",function(a){a.removeListener();a=d.getFrameDocument();a.write(b);c.focusManager.add(a.getBody());CKEDITOR.env.air&&k.call(this,a.getWindow().$)},a);d.setCustomData("dialog",a);a=this.getElement();a.setHtml("");a.append(d);if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){var e=CKEDITOR.dom.element.createFromHtml('\x3cspan tabindex\x3d"-1" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3c/span\x3e');e.on("focus",function(){setTimeout(function(){d.$.contentWindow.focus()})});
11
+ a.append(e);this.focus=function(){e.focus();this.fire("focus")}}this.getInputElement=function(){return d};CKEDITOR.env.ie&&(a.setStyle("display","block"),a.setStyle("height",d.$.offsetHeight+2+"px"))},commit:function(){var a=this.getDialog().getParentEditor(),b=this.getInputElement().getFrameDocument().getBody(),c=b.getBogus();c&&c.remove();b=b.getHtml();this.getDialog()._.committed=!0;a.fire("pasteDialogCommit",{dataValue:b,dataTransfer:f||e.initPasteDataTransfer()})}}]}]}});
@@ -1 +1 @@
1
- .CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:0;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;-ms-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;-webkit-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:#ff9600;background:rgba(255,150,0,0.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../icons/searchcode.png") no-repeat}.autoFormat span{background:url("../icons/autoformat.png") no-repeat}.CommentSelectedRange span{background:url("../icons/commentselectedrange.png") no-repeat}.UncommentSelectedRange span{background:url("../icons/uncommentselectedrange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-the-matrix .CodeMirror-selected{background:#494949!important}.cm-s-mbo .CodeMirror-selected{background:#716c62!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline,.cm-s-pastel-on-dark .activeline{background:#757575}.cm-s-pastel-on-dark .activeline{background:#404040}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px #000;-ms-box-shadow:2px 3px 5px #000;box-shadow:2px 3px 5px #000;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:black;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:white}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:0;outline:0;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"}
1
+ .CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:0;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:blue;-ms-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;-webkit-text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-matchingtag{background:#ff9600;background:rgba(255,150,0,0.3)}.searchCodeButton span,.autoFormat span,.CommentSelectedRange span,.UncommentSelectedRange span{width:16px;height:16px;margin-left:6px}.searchCodeButton span{background:url("../images/searchcode.png") no-repeat}.autoFormat span{background:url("../images/autoformat.png") no-repeat}.CommentSelectedRange span{background:url("../images/commentselectedrange.png") no-repeat}.UncommentSelectedRange span{background:url("../images/uncommentselectedrange.png") no-repeat}.cke_reset_all .CodeMirror-scroll *{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.cke_reset_all .cm-s-cobalt *,.cke_reset_all .cm-s-erlang-dark *,.cke_reset_all .cm-s-lesser-dark *,.cke_reset_all .cm-s-monokai *,.cke_reset_all .cm-s-night *,.cke_reset_all .cm-s-rubyblue *,.cke_reset_all .cm-s-twilight *,.cke_reset_all .cm-s-xq-dark *,.cke_reset_all .cm-s-base16-dark *,.cke_reset_all .cm-s-3024-night *,.cke_reset_all .cm-s-the-matrix *,.cke_reset_all .cm-s-paraiso-dark *,.cke_reset_all .cm-s-paraiso-light *{color:inherit;font:inherit}.cm-s-cobalt .CodeMirror-selected{background:#b36539!important}.cm-s-erlang-dark .CodeMirror-selected{background:#b36539!important}.cm-s-lesser-dark .CodeMirror-selected{background:#45443b!important}.cm-s-monokai .CodeMirror-selected{background:#49483e!important}.cm-s-night .CodeMirror-selected{background:#447!important}.cm-s-rubyblue .CodeMirror-selected{background:#38566f!important}.cm-s-twilight .CodeMirror-selected{background:#323232!important}.cm-s-xq-dark .CodeMirror-selected{background:#a8f!important}.cm-s-the-matrix .CodeMirror-selected{background:#494949!important}.cm-s-mbo .CodeMirror-selected{background:#716c62!important}.cm-s-blackboard .activeline,.cm-s-cobalt .activeline,.cm-s-erlang-dark .activeline,.cm-s-lesser-dark .activeline,.cm-s-monokai .activeline,.cm-s-night .activeline,.cm-s-rubyblue .activeline,.cm-s-vibrant-ink .activeline,.cm-s-xq-dark .activeline,.cm-s-base16-dark .activeline,.cm-s-3024-night .activeline,.cm-s-paraiso-light .activeline,.cm-s-paraiso-dark .activeline,.cm-s-pastel-on-dark .activeline{background:#757575}.cm-s-pastel-on-dark .activeline{background:#404040}.cm-s-mbo .activeline{background:#716c62}.cm-s-twilight .activeline{background:#494949}.cm-s-the-matrix .activeline{background:#060}.CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px #000;-ms-box-shadow:2px 3px 5px #000;box-shadow:2px 3px 5px #000;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;max-width:19em;overflow:hidden;white-space:pre;color:black;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:white}.cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:0;outline:0;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:black;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:white}.CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-open,.CodeMirror-foldgutter-folded{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\25BE"}.CodeMirror-foldgutter-folded:after{content:"\25B8"}
@@ -1,2 +1,2 @@
1
- !function(){function t(t,e){for(var n=0;nn&&(n=t.line_indent_level)),{mode:e,parent:t,last_text:t?t.last_text:"",last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:t?t.line_indent_level:n,start_line_index:z.get_line_number(),ternary_depth:0}}function h(t){var e=t.newlines;if(et.keep_array_indentation&&x(q.mode))for(n=0;n0);else if(et.max_preserve_newlines&&e>et.max_preserve_newlines&&(e=et.max_preserve_newlines),et.preserve_newlines&&t.newlines>1){p();for(var n=1;n=et.wrap_line_length&&p(!1,!0)}}function p(t,e){if(!e&&";"!==q.last_text&&","!==q.last_text&&"="!==q.last_text&&"TK_OPERATOR"!==$)for(;q.mode===l.Statement&&!q.if_block&&!q.do_block;)K();z.add_new_line(t)&&(q.multiline_frame=!0)}function f(){z.just_added_newline()&&(et.keep_array_indentation&&x(q.mode)&&F.wanted_newline?(z.current_line.push(F.whitespace_before),z.space_before_token=!1):z.set_indent(q.indentation_level)&&(q.line_indent_level=q.indentation_level))}function d(t){if(z.raw)return void z.add_raw_token(F);et.comma_first&&"TK_COMMA"===$&&z.just_added_newline()&&","===z.previous_line.last()&&(z.previous_line.pop(),f(),z.add_token(","),z.space_before_token=!0),t=t||F.text,f(),z.add_token(t)}function T(){q.indentation_level+=1}function E(){q.indentation_level>0&&(!q.parent||q.indentation_level>q.parent.indentation_level)&&(q.indentation_level-=1)}function g(t){q?(Z.push(q),H=q):H=s(null,t),q=s(H,t)}function x(t){return t===l.ArrayLiteral}function b(e){return t(e,[l.Expression,l.ForInitializer,l.Conditional])}function K(){Z.length>0&&(H=q,q=Z.pop(),H.mode===l.Statement&&z.remove_redundant_indentation(H))}function w(){return q.parent.mode===l.ObjectLiteral&&q.mode===l.Statement&&(":"===q.last_text&&0===q.ternary_depth||"TK_RESERVED"===$&&t(q.last_text,["get","set"]))}function R(){return!!("TK_RESERVED"===$&&t(q.last_text,["var","let","const"])&&"TK_WORD"===F.type||"TK_RESERVED"===$&&"do"===q.last_text||"TK_RESERVED"===$&&"return"===q.last_text&&!F.wanted_newline||"TK_RESERVED"===$&&"else"===q.last_text&&("TK_RESERVED"!==F.type||"if"!==F.text)||"TK_END_EXPR"===$&&(H.mode===l.ForInitializer||H.mode===l.Conditional)||"TK_WORD"===$&&q.mode===l.BlockStatement&&!q.in_case&&"--"!==F.text&&"++"!==F.text&&"function"!==Q&&"TK_WORD"!==F.type&&"TK_RESERVED"!==F.type||q.mode===l.ObjectLiteral&&(":"===q.last_text&&0===q.ternary_depth||"TK_RESERVED"===$&&t(q.last_text,["get","set"])))&&(g(l.Statement),T(),"TK_RESERVED"===$&&t(q.last_text,["var","let","const"])&&"TK_WORD"===F.type&&(q.declaration_statement=!0),w()||u("TK_RESERVED"===F.type&&t(F.text,["do","for","if","while"])),!0)}function m(t,n){for(var i=0;i=nt.length?null:nt[e]}function k(){R();var e=l.Expression;if("["===F.text){if("TK_WORD"===$||")"===q.last_text)return"TK_RESERVED"===$&&t(q.last_text,X.line_starters)&&(z.space_before_token=!0),g(e),d(),T(),void(et.space_in_paren&&(z.space_before_token=!0));e=l.ArrayLiteral,x(q.mode)&&("["!==q.last_text&&(","!==q.last_text||"]"!==Q&&"}"!==Q)||et.keep_array_indentation||p())}else"TK_RESERVED"===$&&"for"===q.last_text?e=l.ForInitializer:"TK_RESERVED"===$&&t(q.last_text,["if","while"])&&(e=l.Conditional);";"===q.last_text||"TK_START_BLOCK"===$?p():"TK_END_EXPR"===$||"TK_START_EXPR"===$||"TK_END_BLOCK"===$||"."===q.last_text?u(F.wanted_newline):"TK_RESERVED"===$&&"("===F.text||"TK_WORD"===$||"TK_OPERATOR"===$?"TK_RESERVED"===$&&("function"===q.last_word||"typeof"===q.last_word)||"*"===q.last_text&&"function"===Q?et.space_after_anon_function&&(z.space_before_token=!0):"TK_RESERVED"!==$||!t(q.last_text,X.line_starters)&&"catch"!==q.last_text||et.space_before_conditional&&(z.space_before_token=!0):z.space_before_token=!0,"("===F.text&&"TK_RESERVED"===$&&"await"===q.last_word&&(z.space_before_token=!0),"("===F.text&&("TK_EQUALS"!==$&&"TK_OPERATOR"!==$||w()||u()),g(e),d(),et.space_in_paren&&(z.space_before_token=!0),T()}function S(){for(;q.mode===l.Statement;)K();q.multiline_frame&&u("]"===F.text&&x(q.mode)&&!et.keep_array_indentation),et.space_in_paren&&("TK_START_EXPR"!==$||et.space_in_empty_paren?z.space_before_token=!0:(z.trim(),z.space_before_token=!1)),"]"===F.text&&et.keep_array_indentation?(d(),K()):(K(),d()),z.remove_redundant_indentation(H),q.do_while&&H.mode===l.Conditional&&(H.mode=l.Expression,q.do_block=!1,q.do_while=!1)}function O(){var e=A(1),n=A(2);g(n&&(":"===n.text&&t(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||t(e.text,["get","set"])&&t(n.type,["TK_WORD","TK_RESERVED"]))?t(Q,["class","interface"])?l.BlockStatement:l.ObjectLiteral:l.BlockStatement);var i=!e.comments_before.length&&"}"===e.text,r=i&&"function"===q.last_word&&"TK_END_EXPR"===$;"expand"===et.brace_style||"none"===et.brace_style&&F.wanted_newline?"TK_OPERATOR"!==$&&(r||"TK_EQUALS"===$||"TK_RESERVED"===$&&v(q.last_text)&&"else"!==q.last_text)?z.space_before_token=!0:p(!1,!0):"TK_OPERATOR"!==$&&"TK_START_EXPR"!==$?"TK_START_BLOCK"===$?p():z.space_before_token=!0:x(H.mode)&&","===q.last_text&&("}"===Q?z.space_before_token=!0:p()),d(),T()}function N(){for(;q.mode===l.Statement;)K();var t="TK_START_BLOCK"===$;"expand"===et.brace_style?t||p():t||(x(q.mode)&&et.keep_array_indentation?(et.keep_array_indentation=!1,p(),et.keep_array_indentation=!0):p()),K(),d()}function D(){if("TK_RESERVED"===F.type&&q.mode!==l.ObjectLiteral&&t(F.text,["set","get"])&&(F.type="TK_WORD"),"TK_RESERVED"===F.type&&q.mode===l.ObjectLiteral){":"==A(1).text&&(F.type="TK_WORD")}if(R()||!F.wanted_newline||b(q.mode)||"TK_OPERATOR"===$&&"--"!==q.last_text&&"++"!==q.last_text||"TK_EQUALS"===$||!et.preserve_newlines&&"TK_RESERVED"===$&&t(q.last_text,["var","let","const","set","get"])||p(),q.do_block&&!q.do_while){if("TK_RESERVED"===F.type&&"while"===F.text)return z.space_before_token=!0,d(),z.space_before_token=!0,void(q.do_while=!0);p(),q.do_block=!1}if(q.if_block)if(q.else_block||"TK_RESERVED"!==F.type||"else"!==F.text){for(;q.mode===l.Statement;)K();q.if_block=!1,q.else_block=!1}else q.else_block=!0;if("TK_RESERVED"===F.type&&("case"===F.text||"default"===F.text&&q.in_case_statement))return p(),(q.case_body||et.jslint_happy)&&(E(),q.case_body=!1),d(),q.in_case=!0,void(q.in_case_statement=!0);if("TK_RESERVED"===F.type&&"function"===F.text&&((t(q.last_text,["}",";"])||z.just_added_newline()&&!t(q.last_text,["[","{",":","=",","]))&&(z.just_added_blankline()||F.comments_before.length||(p(),p(!0))),"TK_RESERVED"===$||"TK_WORD"===$?"TK_RESERVED"===$&&t(q.last_text,["get","set","new","return","export","async"])?z.space_before_token=!0:"TK_RESERVED"===$&&"default"===q.last_text&&"export"===Q?z.space_before_token=!0:p():"TK_OPERATOR"===$||"="===q.last_text?z.space_before_token=!0:(q.multiline_frame||!b(q.mode)&&!x(q.mode))&&p()),"TK_COMMA"!==$&&"TK_START_EXPR"!==$&&"TK_EQUALS"!==$&&"TK_OPERATOR"!==$||w()||u(),"TK_RESERVED"===F.type&&t(F.text,["function","get","set"]))return d(),void(q.last_word=F.text);if(J="NONE","TK_END_BLOCK"===$?"TK_RESERVED"===F.type&&t(F.text,["else","catch","finally"])?"expand"===et.brace_style||"end-expand"===et.brace_style||"none"===et.brace_style&&F.wanted_newline?J="NEWLINE":(J="SPACE",z.space_before_token=!0):J="NEWLINE":"TK_SEMICOLON"===$&&q.mode===l.BlockStatement?J="NEWLINE":"TK_SEMICOLON"===$&&b(q.mode)?J="SPACE":"TK_STRING"===$?J="NEWLINE":"TK_RESERVED"===$||"TK_WORD"===$||"*"===q.last_text&&"function"===Q?J="SPACE":"TK_START_BLOCK"===$?J="NEWLINE":"TK_END_EXPR"===$&&(z.space_before_token=!0,J="NEWLINE"),"TK_RESERVED"===F.type&&t(F.text,X.line_starters)&&")"!==q.last_text&&(J="else"===q.last_text||"export"===q.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===F.type&&t(F.text,["else","catch","finally"]))if("TK_END_BLOCK"!==$||"expand"===et.brace_style||"end-expand"===et.brace_style||"none"===et.brace_style&&F.wanted_newline)p();else{z.trim(!0);var e=z.current_line;"}"!==e.last()&&p(),z.space_before_token=!0}else"NEWLINE"===J?"TK_RESERVED"===$&&v(q.last_text)?z.space_before_token=!0:"TK_END_EXPR"!==$?"TK_START_EXPR"===$&&"TK_RESERVED"===F.type&&t(F.text,["var","let","const"])||":"===q.last_text||("TK_RESERVED"===F.type&&"if"===F.text&&"else"===q.last_text?z.space_before_token=!0:p()):"TK_RESERVED"===F.type&&t(F.text,X.line_starters)&&")"!==q.last_text&&p():q.multiline_frame&&x(q.mode)&&","===q.last_text&&"}"===Q?p():"SPACE"===J&&(z.space_before_token=!0);d(),q.last_word=F.text,"TK_RESERVED"===F.type&&"do"===F.text&&(q.do_block=!0),"TK_RESERVED"===F.type&&"if"===F.text&&(q.if_block=!0)}function C(){for(R()&&(z.space_before_token=!1);q.mode===l.Statement&&!q.if_block&&!q.do_block;)K();d()}function L(){R()?z.space_before_token=!0:"TK_RESERVED"===$||"TK_WORD"===$?z.space_before_token=!0:"TK_COMMA"===$||"TK_START_EXPR"===$||"TK_EQUALS"===$||"TK_OPERATOR"===$?w()||u():p(),d()}function I(){R(),q.declaration_statement&&(q.declaration_assignment=!0),z.space_before_token=!0,d(),z.space_before_token=!0}function j(){if(q.declaration_statement)return b(q.parent.mode)&&(q.declaration_assignment=!1),d(),void(q.declaration_assignment?(q.declaration_assignment=!1,p(!1,!0)):(z.space_before_token=!0,et.comma_first&&u()));d(),q.mode===l.ObjectLiteral||q.mode===l.Statement&&q.parent.mode===l.ObjectLiteral?(q.mode===l.Statement&&K(),p()):(z.space_before_token=!0,et.comma_first&&u())}function V(){if(R(),"TK_RESERVED"===$&&v(q.last_text))return z.space_before_token=!0,void d();if("*"===F.text&&"TK_DOT"===$)return void d();if(":"===F.text&&q.in_case)return q.case_body=!0,T(),d(),p(),void(q.in_case=!1);if("::"===F.text)return void d();"TK_OPERATOR"===$&&u();var e=!0,n=!0;t(F.text,["--","++","!","~"])||t(F.text,["-","+"])&&(t($,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||t(q.last_text,X.line_starters)||","===q.last_text)?(e=!1,n=!1,!F.wanted_newline||"--"!==F.text&&"++"!==F.text||p(!1,!0),";"===q.last_text&&b(q.mode)&&(e=!0),"TK_RESERVED"===$?e=!0:"TK_END_EXPR"===$?e=!("]"===q.last_text&&("--"===F.text||"++"===F.text)):"TK_OPERATOR"===$&&(e=t(F.text,["--","-","++","+"])&&t(q.last_text,["--","-","++","+"]),t(F.text,["+","-"])&&t(q.last_text,["--","++"])&&(n=!0)),q.mode!==l.BlockStatement&&q.mode!==l.Statement||"{"!==q.last_text&&";"!==q.last_text||p()):":"===F.text?0===q.ternary_depth?e=!1:q.ternary_depth-=1:"?"===F.text?q.ternary_depth+=1:"*"===F.text&&"TK_RESERVED"===$&&"function"===q.last_text&&(e=!1,n=!1),z.space_before_token=z.space_before_token||e,d(),z.space_before_token=n}function P(){if(z.raw)return z.add_raw_token(F),void(F.directives&&"end"===F.directives.preserve&&(et.test_output_raw||(z.raw=!1)));if(F.directives)return p(!1,!0),d(),"start"===F.directives.preserve&&(z.raw=!0),void p(!1,!0);if(!o.newline.test(F.text)&&!F.wanted_newline)return z.space_before_token=!0,d(),void(z.space_before_token=!0);var t,e=c(F.text),i=!1,r=!1,s=F.whitespace_before,_=s.length;for(p(!1,!0),e.length>1&&(m(e.slice(1),"*")?i=!0:y(e.slice(1),s)&&(r=!0)),d(e[0]),t=1;t_?d(e[t].substring(_)):z.add_token(e[t]);p(!1,!0)}function M(){F.wanted_newline?p(!1,!0):z.trim(!0),z.space_before_token=!0,d(),p(!1,!0)}function B(){R(),"TK_RESERVED"===$&&v(q.last_text)?z.space_before_token=!0:u(")"===q.last_text&&et.break_chained_methods),d()}function U(){d(),"\n"===F.text[F.text.length-1]&&p()}function W(){for(;q.mode===l.Statement;)K()}var z,G,X,F,$,Q,Y,q,H,Z,J,tt,et,nt=[],it="";for(tt={TK_START_EXPR:k,TK_END_EXPR:S,TK_START_BLOCK:O,TK_END_BLOCK:N,TK_WORD:D,TK_RESERVED:D,TK_SEMICOLON:C,TK_STRING:L,TK_EQUALS:I,TK_OPERATOR:V,TK_COMMA:j,TK_BLOCK_COMMENT:P,TK_COMMENT:M,TK_DOT:B,TK_UNKNOWN:U,TK_EOF:W},r=r||{},et={},void 0!==r.braces_on_own_line&&(et.brace_style=r.braces_on_own_line?"expand":"collapse"),et.brace_style=r.brace_style?r.brace_style:et.brace_style?et.brace_style:"collapse","expand-strict"===et.brace_style&&(et.brace_style="expand"),et.indent_size=r.indent_size?parseInt(r.indent_size,10):4,et.indent_char=r.indent_char?r.indent_char:" ",et.eol=r.eol?r.eol:"\n",et.preserve_newlines=void 0===r.preserve_newlines||r.preserve_newlines,et.break_chained_methods=void 0!==r.break_chained_methods&&r.break_chained_methods,et.max_preserve_newlines=void 0===r.max_preserve_newlines?0:parseInt(r.max_preserve_newlines,10),et.space_in_paren=void 0!==r.space_in_paren&&r.space_in_paren,et.space_in_empty_paren=void 0!==r.space_in_empty_paren&&r.space_in_empty_paren,et.jslint_happy=void 0!==r.jslint_happy&&r.jslint_happy,et.space_after_anon_function=void 0!==r.space_after_anon_function&&r.space_after_anon_function,et.keep_array_indentation=void 0!==r.keep_array_indentation&&r.keep_array_indentation,et.space_before_conditional=void 0===r.space_before_conditional||r.space_before_conditional,et.unescape_strings=void 0!==r.unescape_strings&&r.unescape_strings,et.wrap_line_length=void 0===r.wrap_line_length?0:parseInt(r.wrap_line_length,10),et.e4x=void 0!==r.e4x&&r.e4x,et.end_with_newline=void 0!==r.end_with_newline&&r.end_with_newline,et.comma_first=void 0!==r.comma_first&&r.comma_first,et.test_output_raw=void 0!==r.test_output_raw&&r.test_output_raw,et.jslint_happy&&(et.space_after_anon_function=!0),r.indent_with_tabs&&(et.indent_char="\t",et.indent_size=1),et.eol=et.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),Y="";et.indent_size>0;)Y+=et.indent_char,et.indent_size-=1;var rt=0;if(i&&i.length){for(;" "===i.charAt(rt)||"\t"===i.charAt(rt);)it+=i.charAt(rt),rt+=1;i=i.substring(rt)}$="TK_START_BLOCK",Q="",z=new _(Y,it),z.raw=et.test_output_raw,Z=[],g(l.BlockStatement),this.beautify=function(){var t,e;for(X=new a(i,et,Y),nt=X.tokenize(),G=0;t=A();){for(var n=0;n0&&(n-=1,e-=t.indent_length)},this.trim=function(){for(;" "===this.last();){i.pop();e-=1}r=0===i.length},this.toString=function(){var e="";return this._empty||(n>=0&&(e=t.indent_cache[n]),e+=i.join("")),e}}function _(t,e){e=e||"",this.indent_cache=[e],this.baseIndentLength=e.length,this.indent_length=t.length,this.raw=!1;var n=[];this.baseIndentString=e,this.indent_string=t,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new s(this),n.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return n.length},this.add_new_line=function(t){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!t&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(){return n.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(t){if(n.length>1){for(;t>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(t),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(t){for(var e=0;e1&&this.current_line.is_empty();)n.pop(),this.current_line=n[n.length-1],this.current_line.trim();this.previous_line=n.length>1?n[n.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){if(this.just_added_newline()){if(1===n.length)return!0;return n[n.length-2].is_empty()}return!1}}function a(n,i,r){function s(t){if(!t.match(R))return null;var e={};m.lastIndex=0;for(var n=m.exec(t);n;)e[n[1]]=n[2],n=m.exec(t);return e}function _(){var r,_=[];if(f=0,d="",g>=x)return["","TK_EOF"];var R;R=E.length?E[E.length-1]:new h("TK_START_BLOCK","{");var m=n.charAt(g);for(g+=1;t(m,l);){if(o.newline.test(m)?"\n"===m&&"\r"===n.charAt(g-2)||(f+=1,_=[]):_.push(m),g>=x)return["","TK_EOF"];m=n.charAt(g),g+=1}if(_.length&&(d=_.join("")),c.test(m)){var A=!0,k=!0,S=c;for("0"===m&&g/))&&("TK_RESERVED"===R.type&&t(R.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===R.type&&")"===R.text&&R.parent&&"TK_RESERVED"===R.parent.type&&t(R.parent.text,["if","while","for"])||t(R.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var C=m,L=!1,I=!1;if(r=m,"/"===C)for(var j=!1;g/g,P=n.slice(g-1),M=V.exec(P);if(M&&0===M.index){for(var B=M[2],U=0;M;){var W=!!M[1],z=M[2],G=!!M[M.length-1]||"![CDATA["===z.slice(0,8);if(z!==B||G||(W?--U:++U),U<=0)break;M=V.exec(P)}var X=M?M.index+M[0].length:P.length;return P=P.slice(0,X),g+=X-1,P=P.replace(o.lineBreak,"\n"),[P,"TK_STRING"]}}else for(;g=x)););return","===m?[m,"TK_COMMA"]:"="===m?[m,"TK_EQUALS"]:[m,"TK_OPERATOR"]}return[m,"TK_UNKNOWN"]}function a(t){for(var e,n=!1,i="",r=0,s="",_=0;n||r=0&&_<32){i+="x"===e?"\\x"+s:"\\u"+s;continue}if(34===_||39===_||92===_)i+="\\"+String.fromCharCode(_);else{if("x"===e&&_>126&&_<=255)return t;i+=String.fromCharCode(_)}}else"\\"===e?n=!0:i+=e;return i}var l="\n\r\t ".split(""),c=/[0-9]/,u=/[0123456789abcdefABCDEF]/,p="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: => <%= <% %> ".split(" ");this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var f,d,T,E,g,x,b=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),K=/([\s\S]*?)((?:\*\/)|$)/g,w=/([^\n\r\u2028\u2029]*)/g,R=/\/\* beautify( \w+[:]\w+)+ \*\//g,m=/ (\w+)[:](\w+)/g,y=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,v=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;this.tokenize=function(){x=n.length,g=0,T=!1,E=[];for(var t,e,i,r=null,s=[],a=[];!e||"TK_EOF"!==e.type;){for(i=_(),t=new h(i[1],i[0],f,d);"TK_COMMENT"===t.type||"TK_BLOCK_COMMENT"===t.type||"TK_UNKNOWN"===t.type;)"TK_BLOCK_COMMENT"===t.type&&(t.directives=i[2]),a.push(t),i=_(),t=new h(i[1],i[0],f,d);a.length&&(t.comments_before=a,a=[]),"TK_START_BLOCK"===t.type||"TK_START_EXPR"===t.type?(t.parent=e,s.push(r),r=t):("TK_END_BLOCK"===t.type||"TK_END_EXPR"===t.type)&&r&&("]"===t.text&&"["===r.text||")"===t.text&&"("===r.text||"}"===t.text&&"{"===r.text)&&(t.parent=r.parent,r=s.pop()),E.push(t),e=t}return E}}var o={};!function(t){var e="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",n=new RegExp("["+e+"]"),i=new RegExp("["+e+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=/\r\n|[\n\r\u2028\u2029]/g,t.isIdentifierStart=function(t){return t<65?36===t:t<91||(t<97?95===t:t<123||t>=170&&n.test(String.fromCharCode(t)))},t.isIdentifierChar=function(t){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||t>=170&&i.test(String.fromCharCode(t))))}}(o);var l={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"},h=function(t,e,n,i,r,s){this.type=t,this.text=e,this.comments_before=[],this.newlines=n||0,this.wanted_newline=n>0,this.whitespace_before=i||"",this.parent=null,this.directives=null};"function"==typeof define&&define.amd?define("beautify.js",[],function(){return{js_beautify:i}}):"undefined"!=typeof exports?exports.js_beautify=i:"undefined"!=typeof window?window.js_beautify=i:"undefined"!=typeof global&&(global.js_beautify=i)}(),function(){function t(t){return t.replace(/^\s+/g,"")}function e(t){return t.replace(/\s+$/g,"")}function n(n,i,r,s){function _(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=o,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:b,in_array:function(t,e){for(var n=0;n=this.wrap_line_length?(this.print_newline(!1,t),this.print_indentation(t)):(this.line_char_count++,t.push(" "))},this.get_content=function(){for(var t="",e=[];"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return e.length?e.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(e);else{if(T){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}t=this.input.charAt(this.pos),this.pos++,this.line_char_count++,e.push(t)}}return e.length?e.join(""):""},this.get_contents_to=function(t){if(this.pos===this.input.length)return["","TK_EOF"];var e="",n=new RegExp("","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos=this.input.length)return t&&(this.pos=o,this.line_char_count=l),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))_=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),_=!0),"="===i&&(_=!1),r.length&&"="!==r[r.length-1]&&">"!==i&&_){if(this.space_or_wrap(r),_=!1,!a&&"force"===E&&"/"!==i){this.print_newline(!0,r),this.print_indentation(r);for(var c=0;c=2&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(e="#"===i||"/"===i||"!"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,r.push(i),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(e)];break}if(T&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(e)];break}if(T&&"{"===n&&r.length>2&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!==i);var f,d,x=r.join("");f=-1!==x.indexOf(" ")?x.indexOf(" "):"{"===x.charAt(0)?x.indexOf("}"):x.indexOf(">"),d="<"!==x.charAt(0)&&T?"#"===x.charAt(2)?3:2:1;var b=x.substring(d,f).toLowerCase();return"/"===x.charAt(x.length-2)||this.Utils.in_array(b,this.Utils.single_token)?t||(this.tag_type="SINGLE"):T&&"{"===x.charAt(0)&&"else"===b?t||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(b,p)?(s=this.get_unformatted("",x),r.push(s),this.pos-1,this.tag_type="SINGLE"):"script"===b&&(-1===x.search("type")||x.search("type")>-1&&x.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/)>-1)?t||(this.record_tag(b),this.tag_type="SCRIPT"):"style"===b&&(-1===x.search("type")||x.search("type")>-1&&x.search("text/css")>-1)?t||(this.record_tag(b),this.tag_type="STYLE"):"!"===b.charAt(0)?t||(this.tag_type="SINGLE",this.traverse_whitespace()):t||("/"===b.charAt(0)?(this.retrieve_tag(b.substring(1)),this.tag_type="END"):(this.record_tag(b),"html"!==b.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(b,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),t&&(this.pos=o,this.line_char_count=l),r.join("")},this.get_comment=function(t){var e="",n=">",i=!1;for(this.pos=t,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length&&(e+=input_char,e.charAt(e.length-1)!==n.charAt(n.length-1)||-1===e.indexOf(n));)!i&&e.length<10&&(0===e.indexOf("",i=!0):0===e.indexOf("",i=!0):0===e.indexOf("",i=!0):0===e.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===e.indexOf("{{!")?(n="}}",i=!0):0===e.indexOf("",i=!0):0===e.indexOf("<%")&&(n="%>",i=!0)),input_char=this.input.charAt(this.pos),this.pos++;return e},this.get_unformatted=function(t,e){
2
- if(e&&-1!==e.toLowerCase().indexOf(t))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,T&&"{"===n&&i.length&&"{"===i.charAt(i.length-2)&&(i+=this.get_unformatted("}}"),r=i.length)}while(-1===i.toLowerCase().indexOf(t,r));return i},this.get_token=function(){var t;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var e=this.last_token.substr(7);return t=this.get_contents_to(e),"string"!=typeof t?t:[t,"TK_"+e]}if("CONTENT"===this.current_mode)return t=this.get_content(),"string"!=typeof t?t:[t,"TK_CONTENT"];if("TAG"===this.current_mode){if("string"!=typeof(t=this.get_tag()))return t;return[t,"TK_TAG_"+this.tag_type]}},this.get_full_indent=function(t){return t=this.indent_level+t||0,t<1?"":Array(t+1).join(this.indent_string)},this.is_unformatted=function(t,e){if(!this.Utils.in_array(t,e))return!1;if("a"!==t.toLowerCase()||!this.Utils.in_array("a",e))return!0;var n=this.get_tag(!0),i=(n||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(i&&!this.Utils.in_array(i,e))},this.printer=function(n,i,r,s,_){this.input=n||"",this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n"),this.output=[],this.indent_character=i,this.indent_string="",this.indent_size=r,this.brace_style=_,this.indent_level=0,this.wrap_line_length=s,this.line_char_count=0;for(var a=0;a0&&(t=e(t)),t&&""!==t&&(t.length>1&&"\n"===t.charAt(t.length-1)?(this.output.push(t.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(t));for(var n=0;n0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var a,o,l,h,c,u,p,f,d,T,E,g,x,b,K;for(i=i||{},void 0!==i.wrap_line_length&&0!==parseInt(i.wrap_line_length,10)||void 0===i.max_char||0===parseInt(i.max_char,10)||(i.wrap_line_length=i.max_char),o=void 0!==i.indent_inner_html&&i.indent_inner_html,l=void 0===i.indent_size?4:parseInt(i.indent_size,10),h=void 0===i.indent_char?" ":i.indent_char,u=void 0===i.brace_style?"collapse":i.brace_style,c=0===parseInt(i.wrap_line_length,10)?32786:parseInt(i.wrap_line_length||250,10),p=i.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],f=void 0===i.preserve_newlines||i.preserve_newlines,d=f?isNaN(parseInt(i.max_preserve_newlines,10))?32786:parseInt(i.max_preserve_newlines,10):0,T=void 0!==i.indent_handlebars&&i.indent_handlebars,E=void 0===i.wrap_attributes?"auto":i.wrap_attributes,g=void 0===i.wrap_attributes_indent_size?l:parseInt(i.wrap_attributes_indent_size,10)||l,x=void 0!==i.end_with_newline&&i.end_with_newline,b="object"==typeof i.extra_liners&&i.extra_liners?i.extra_liners.concat():"string"==typeof i.extra_liners?i.extra_liners.split(","):"head,body,/html".split(","),K=i.eol?i.eol:"\n",i.indent_with_tabs&&(h="\t",l=1),K=K.replace(/\\r/,"\r").replace(/\\n/,"\n"),a=new _,a.printer(n,h,l,c,u);;){var w=a.get_token();if(a.token_text=w[0],a.token_type=w[1],"TK_EOF"===a.token_type)break;switch(a.token_type){case"TK_TAG_START":a.print_newline(!1,a.output),a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===a.last_token&&""===a.last_text){var R=a.token_text.match(/\w+/)[0],m=null;a.output.length&&(m=a.output[a.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),(null===m||m[1]!==R&&!a.Utils.in_array(m[1],p))&&a.print_newline(!1,a.output)}a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var y=a.token_text.match(/^\s*<([a-z-]+)/i);y&&a.Utils.in_array(y[1],p)||a.print_newline(!1,a.output),a.print_token(a.token_text),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":a.print_token(a.token_text),a.indent_content&&(a.indent(),a.indent_content=!1),a.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":a.print_token(a.token_text),a.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==a.token_text){a.print_newline(!1,a.output);var v,A=a.token_text,k=1;"TK_SCRIPT"===a.token_type?v="function"==typeof r&&r:"TK_STYLE"===a.token_type&&(v="function"==typeof s&&s),"keep"===i.indent_scripts?k=0:"separate"===i.indent_scripts&&(k=-a.indent_level);var S=a.get_full_indent(k);if(v){var O=function(){this.eol="\n"};O.prototype=i;var N=new O;A=v(A.replace(/^\s*/,S),N)}else{var D=A.match(/^\s*/)[0],C=D.match(/[^\n\r]*$/)[0].split(a.indent_string).length-1,L=a.get_full_indent(k-C);A=A.replace(/^\s*/,S).replace(/\r\n|\r|\n/g,"\n"+L).replace(/\s+$/,"")}A&&(a.print_token_raw(A),a.print_newline(!0,a.output))}a.current_mode="TAG";break;default:""!==a.token_text&&a.print_token(a.token_text)}a.last_token=a.token_type,a.last_text=a.token_text}var I=a.output.join("").replace(/[\r\n\t ]+$/,"");return x&&(I+="\n"),"\n"!=K&&(I=I.replace(/[\n]/g,K)),I}if("function"==typeof define&&define.amd)define("beautify-html.js",["require","./beautify","./beautify-css"],function(t){var e=t("./beautify"),i=t("./beautify-css");return{html_beautify:function(t,r){return n(t,r,e.js_beautify,i.css_beautify)}}});else if("undefined"!=typeof exports){var i=require("./beautify.js"),r=require("./beautify-css.js");exports.html_beautify=function(t,e){return n(t,e,i.js_beautify,r.css_beautify)}}else"undefined"!=typeof window?window.html_beautify=function(t,e){return n(t,e,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(t,e){return n(t,e,global.js_beautify,global.css_beautify)})}(),function(t){"function"==typeof t.define&&(t.define("beautify",["beautify.js"],function(t){return t}),t.define("beautify-css",[],function(){return{css_beautify:void 0}}),t.define("beautifyModule",["beautify","beautify-html.js"],function(e,n){t.js_beautify=e.js_beautify,t.html_beautify=n.html_beautify}))}(this);
1
+ !function(){var e=function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t){var n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i=new RegExp("["+n+"]"),r=new RegExp("["+n+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g"),t.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||e>=170&&i.test(String.fromCharCode(e)))},t.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&r.test(String.fromCharCode(e))))}},function(e,t,n){function i(e,t){if(!t.multiline_frame&&t.mode!==T.ForInitializer&&t.mode!==T.Conditional){var n=t.start_line_index;e.remove_indent(n)}}function r(e,t){for(var n=0;nn&&(n=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:e?e.line_indent_level:n,start_line_index:Q.get_line_number(),ternary_depth:0}}function o(e,t){for(var n=e.newlines,i=ae.keep_array_indentation&&K(te.mode),r=q,s=0;s0,t);else if(ae.max_preserve_newlines&&n>ae.max_preserve_newlines&&(n=ae.max_preserve_newlines),ae.preserve_newlines&&e.newlines>1){x(!1,t);for(var _=1;_=ae.wrap_line_length&&x(!1,!0)}}}function x(e,t){if(!t&&";"!==te.last_text&&","!==te.last_text&&"="!==te.last_text&&"TK_OPERATOR"!==H)for(var n=N(1);!(te.mode!==T.Statement||te.if_block&&n&&"TK_RESERVED"===n.type&&"else"===n.text||te.do_block);)k();Q.add_new_line(e)&&(te.multiline_frame=!0)}function m(){Q.just_added_newline()&&(ae.keep_array_indentation&&K(te.mode)&&q.wanted_newline?(Q.current_line.push(q.whitespace_before),Q.space_before_token=!1):Q.set_indent(te.indentation_level)&&(te.line_indent_level=te.indentation_level))}function g(e){if(Q.raw)return void Q.add_raw_token(q);if(ae.comma_first&&"TK_COMMA"===H&&Q.just_added_newline()&&","===Q.previous_line.last()){var t=Q.previous_line.pop();Q.previous_line.is_empty()&&(Q.previous_line.push(t),Q.trim(!0),Q.current_line.pop(),Q.trim()),m(),Q.add_token(","),Q.space_before_token=!0}e=e||q.text,m(),Q.add_token(e)}function b(){te.indentation_level+=1}function v(){te.indentation_level>0&&(!te.parent||te.indentation_level>te.parent.indentation_level)&&(te.indentation_level-=1)}function w(e){te?(ie.push(te),ne=te):ne=n(null,e),te=n(ne,e)}function K(e){return e===T.ArrayLiteral}function R(e){return r(e,[T.Expression,T.ForInitializer,T.Conditional])}function k(){ie.length>0&&(ne=te,te=ie.pop(),ne.mode!==T.Statement||ae.unindent_chained_methods||i(Q,ne))}function y(){return te.parent.mode===T.ObjectLiteral&&te.mode===T.Statement&&(":"===te.last_text&&0===te.ternary_depth||"TK_RESERVED"===H&&r(te.last_text,["get","set"]))}function O(){return!!("TK_RESERVED"===H&&r(te.last_text,["var","let","const"])&&"TK_WORD"===q.type||"TK_RESERVED"===H&&"do"===te.last_text||"TK_RESERVED"===H&&r(te.last_text,ue)&&!q.wanted_newline||"TK_RESERVED"===H&&"else"===te.last_text&&("TK_RESERVED"!==q.type||"if"!==q.text||q.comments_before.length)||"TK_END_EXPR"===H&&(ne.mode===T.ForInitializer||ne.mode===T.Conditional)||"TK_WORD"===H&&te.mode===T.BlockStatement&&!te.in_case&&"--"!==q.text&&"++"!==q.text&&"function"!==J&&"TK_WORD"!==q.type&&"TK_RESERVED"!==q.type||te.mode===T.ObjectLiteral&&(":"===te.last_text&&0===te.ternary_depth||"TK_RESERVED"===H&&r(te.last_text,["get","set"])))&&(w(T.Statement),ae.unindent_chained_methods||b(),o(q,!0),y()||E("TK_RESERVED"===q.type&&r(q.text,["do","for","if","while"])),!0)}function S(e,t){for(var n=0;n=_e.length?null:_e[t]}function D(){O()||o(q);var e=T.Expression;if("["===q.text){if("TK_WORD"===H||")"===te.last_text)return"TK_RESERVED"===H&&r(te.last_text,Y.line_starters)&&(Q.space_before_token=!0),w(e),g(),b(),void(ae.space_in_paren&&(Q.space_before_token=!0));e=T.ArrayLiteral,K(te.mode)&&("["!==te.last_text&&(","!==te.last_text||"]"!==J&&"}"!==J)||ae.keep_array_indentation||x())}else"TK_RESERVED"===H&&"for"===te.last_text?e=T.ForInitializer:"TK_RESERVED"===H&&r(te.last_text,["if","while"])&&(e=T.Conditional);";"===te.last_text||"TK_START_BLOCK"===H?x():"TK_END_EXPR"===H||"TK_START_EXPR"===H||"TK_END_BLOCK"===H||"."===te.last_text?E(q.wanted_newline):"TK_RESERVED"===H&&"("===q.text||"TK_WORD"===H||"TK_OPERATOR"===H?"TK_RESERVED"===H&&("function"===te.last_word||"typeof"===te.last_word)||"*"===te.last_text&&(r(J,["function","yield"])||te.mode===T.ObjectLiteral&&r(J,["{",","]))?ae.space_after_anon_function&&(Q.space_before_token=!0):"TK_RESERVED"!==H||!r(te.last_text,Y.line_starters)&&"catch"!==te.last_text||ae.space_before_conditional&&(Q.space_before_token=!0):Q.space_before_token=!0,"("===q.text&&"TK_RESERVED"===H&&r(te.last_word,["await","async"])&&(Q.space_before_token=!0),"("===q.text&&("TK_EQUALS"!==H&&"TK_OPERATOR"!==H||y()||E()),"("===q.text&&"TK_WORD"!==H&&"TK_RESERVED"!==H&&E(),w(e),g(),ae.space_in_paren&&(Q.space_before_token=!0),b()}function L(){for(;te.mode===T.Statement;)k();o(q),te.multiline_frame&&E("]"===q.text&&K(te.mode)&&!ae.keep_array_indentation),ae.space_in_paren&&("TK_START_EXPR"!==H||ae.space_in_empty_paren?Q.space_before_token=!0:(Q.trim(),Q.space_before_token=!1)),"]"===q.text&&ae.keep_array_indentation?(g(),k()):(k(),g()),i(Q,ne),te.do_while&&ne.mode===T.Conditional&&(ne.mode=T.Expression,te.do_block=!1,te.do_while=!1)}function j(){o(q);var e=N(1),t=N(2);w(t&&(r(t.text,[":",","])&&r(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||r(e.text,["get","set","..."])&&r(t.type,["TK_WORD","TK_RESERVED"]))?r(J,["class","interface"])?T.BlockStatement:T.ObjectLiteral:"TK_OPERATOR"===H&&"=>"===te.last_text?T.BlockStatement:r(H,["TK_EQUALS","TK_START_EXPR","TK_COMMA","TK_OPERATOR"])||"TK_RESERVED"===H&&r(te.last_text,["return","throw","import","default"])?T.ObjectLiteral:T.BlockStatement);var n=!e.comments_before.length&&"}"===e.text,i=n&&"function"===te.last_word&&"TK_END_EXPR"===H;if(ae.brace_preserve_inline){var s=0,a=null;te.inline_frame=!0;do{if(s+=1,a=N(s),a.wanted_newline){te.inline_frame=!1;break}}while("TK_EOF"!==a.type&&("TK_END_BLOCK"!==a.type||a.opened!==q))}("expand"===ae.brace_style||"none"===ae.brace_style&&q.wanted_newline)&&!te.inline_frame?"TK_OPERATOR"!==H&&(i||"TK_EQUALS"===H||"TK_RESERVED"===H&&C(te.last_text)&&"else"!==te.last_text)?Q.space_before_token=!0:x(!1,!0):(!K(ne.mode)||"TK_START_EXPR"!==H&&"TK_COMMA"!==H||(("TK_COMMA"===H||ae.space_in_paren)&&(Q.space_before_token=!0),("TK_COMMA"===H||"TK_START_EXPR"===H&&te.inline_frame)&&(E(),ne.multiline_frame=ne.multiline_frame||te.multiline_frame,te.multiline_frame=!1)),"TK_OPERATOR"!==H&&"TK_START_EXPR"!==H&&("TK_START_BLOCK"!==H||te.inline_frame?Q.space_before_token=!0:x())),g(),b()}function I(){for(o(q);te.mode===T.Statement;)k();var e="TK_START_BLOCK"===H;te.inline_frame&&!e?Q.space_before_token=!0:"expand"===ae.brace_style?e||x():e||(K(te.mode)&&ae.keep_array_indentation?(ae.keep_array_indentation=!1,x(),ae.keep_array_indentation=!0):x()),k(),g()}function B(){if("TK_RESERVED"===q.type)if(r(q.text,["set","get"])&&te.mode!==T.ObjectLiteral)q.type="TK_WORD";else if(r(q.text,["as","from"])&&!te.import_block)q.type="TK_WORD";else if(te.mode===T.ObjectLiteral){var e=N(1);":"===e.text&&(q.type="TK_WORD")}if(O()?"TK_RESERVED"===H&&r(te.last_text,["var","let","const"])&&"TK_WORD"===q.type&&(te.declaration_statement=!0):!q.wanted_newline||R(te.mode)||"TK_OPERATOR"===H&&"--"!==te.last_text&&"++"!==te.last_text||"TK_EQUALS"===H||!ae.preserve_newlines&&"TK_RESERVED"===H&&r(te.last_text,["var","let","const","set","get"])?o(q):(o(q),x()),te.do_block&&!te.do_while){if("TK_RESERVED"===q.type&&"while"===q.text)return Q.space_before_token=!0,g(),Q.space_before_token=!0,void(te.do_while=!0);x(),te.do_block=!1}if(te.if_block)if(te.else_block||"TK_RESERVED"!==q.type||"else"!==q.text){for(;te.mode===T.Statement;)k();te.if_block=!1,te.else_block=!1}else te.else_block=!0;if("TK_RESERVED"===q.type&&("case"===q.text||"default"===q.text&&te.in_case_statement))return x(),(te.case_body||ae.jslint_happy)&&(v(),te.case_body=!1),g(),te.in_case=!0,void(te.in_case_statement=!0);if("TK_COMMA"!==H&&"TK_START_EXPR"!==H&&"TK_EQUALS"!==H&&"TK_OPERATOR"!==H||y()||E(),"TK_RESERVED"===q.type&&"function"===q.text)return(r(te.last_text,["}",";"])||Q.just_added_newline()&&!r(te.last_text,["(","[","{",":","=",","])&&"TK_OPERATOR"!==H)&&(Q.just_added_blankline()||q.comments_before.length||(x(),x(!0))),"TK_RESERVED"===H||"TK_WORD"===H?"TK_RESERVED"===H&&(r(te.last_text,["get","set","new","export","async"])||r(te.last_text,ue))?Q.space_before_token=!0:"TK_RESERVED"===H&&"default"===te.last_text&&"export"===J?Q.space_before_token=!0:x():"TK_OPERATOR"===H||"="===te.last_text?Q.space_before_token=!0:(te.multiline_frame||!R(te.mode)&&!K(te.mode))&&x(),g(),void(te.last_word=q.text);if(re="NONE","TK_END_BLOCK"===H?ne.inline_frame?re="SPACE":"TK_RESERVED"===q.type&&r(q.text,["else","catch","finally","from"])?"expand"===ae.brace_style||"end-expand"===ae.brace_style||"none"===ae.brace_style&&q.wanted_newline?re="NEWLINE":(re="SPACE",Q.space_before_token=!0):re="NEWLINE":"TK_SEMICOLON"===H&&te.mode===T.BlockStatement?re="NEWLINE":"TK_SEMICOLON"===H&&R(te.mode)?re="SPACE":"TK_STRING"===H?re="NEWLINE":"TK_RESERVED"===H||"TK_WORD"===H||"*"===te.last_text&&(r(J,["function","yield"])||te.mode===T.ObjectLiteral&&r(J,["{",","]))?re="SPACE":"TK_START_BLOCK"===H?re=te.inline_frame?"SPACE":"NEWLINE":"TK_END_EXPR"===H&&(Q.space_before_token=!0,re="NEWLINE"),"TK_RESERVED"===q.type&&r(q.text,Y.line_starters)&&")"!==te.last_text&&(re=te.inline_frame||"else"===te.last_text||"export"===te.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===q.type&&r(q.text,["else","catch","finally"]))if(("TK_END_BLOCK"!==H||ne.mode!==T.BlockStatement||"expand"===ae.brace_style||"end-expand"===ae.brace_style||"none"===ae.brace_style&&q.wanted_newline)&&!te.inline_frame)x();else{Q.trim(!0);var t=Q.current_line;"}"!==t.last()&&x(),Q.space_before_token=!0}else"NEWLINE"===re?"TK_RESERVED"===H&&C(te.last_text)?Q.space_before_token=!0:"TK_END_EXPR"!==H?"TK_START_EXPR"===H&&"TK_RESERVED"===q.type&&r(q.text,["var","let","const"])||":"===te.last_text||("TK_RESERVED"===q.type&&"if"===q.text&&"else"===te.last_text?Q.space_before_token=!0:x()):"TK_RESERVED"===q.type&&r(q.text,Y.line_starters)&&")"!==te.last_text&&x():te.multiline_frame&&K(te.mode)&&","===te.last_text&&"}"===J?x():"SPACE"===re&&(Q.space_before_token=!0);g(),te.last_word=q.text,"TK_RESERVED"===q.type&&("do"===q.text?te.do_block=!0:"if"===q.text?te.if_block=!0:"import"===q.text?te.import_block=!0:te.import_block&&"TK_RESERVED"===q.type&&"from"===q.text&&(te.import_block=!1))}function P(){O()?Q.space_before_token=!1:o(q);for(var e=N(1);!(te.mode!==T.Statement||te.if_block&&e&&"TK_RESERVED"===e.type&&"else"===e.text||te.do_block);)k();te.import_block&&(te.import_block=!1),g()}function M(){O()?Q.space_before_token=!0:(o(q),"TK_RESERVED"===H||"TK_WORD"===H||te.inline_frame?Q.space_before_token=!0:"TK_COMMA"===H||"TK_START_EXPR"===H||"TK_EQUALS"===H||"TK_OPERATOR"===H?y()||E():x()),g()}function V(){O()||o(q),te.declaration_statement&&(te.declaration_assignment=!0),Q.space_before_token=!0,g(),Q.space_before_token=!0}function U(){o(q,!0),g(),Q.space_before_token=!0,te.declaration_statement?(R(te.parent.mode)&&(te.declaration_assignment=!1),te.declaration_assignment?(te.declaration_assignment=!1,x(!1,!0)):ae.comma_first&&E()):te.mode===T.ObjectLiteral||te.mode===T.Statement&&te.parent.mode===T.ObjectLiteral?(te.mode===T.Statement&&k(),te.inline_frame||x()):ae.comma_first&&E()}function W(){var e="*"===q.text&&("TK_RESERVED"===H&&r(te.last_text,["function","yield"])||r(H,["TK_START_BLOCK","TK_COMMA","TK_END_BLOCK","TK_SEMICOLON"])),t=r(q.text,["-","+"])&&(r(H,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||r(te.last_text,Y.line_starters)||","===te.last_text);if(O());else{o(q,!e)}if("TK_RESERVED"===H&&C(te.last_text))return Q.space_before_token=!0,void g();if("*"===q.text&&"TK_DOT"===H)return void g();if("::"===q.text)return void g();if("TK_OPERATOR"===H&&r(ae.operator_position,d)&&E(),":"===q.text&&te.in_case)return te.case_body=!0,b(),g(),x(),void(te.in_case=!1);var n=!0,i=!0,s=!1;if(":"===q.text?0===te.ternary_depth?n=!1:(te.ternary_depth-=1,s=!0):"?"===q.text&&(te.ternary_depth+=1),!t&&!e&&ae.preserve_newlines&&r(q.text,Y.positionable_operators)){var a=":"===q.text,_=a&&s,l=a&&!s;switch(ae.operator_position){case f.before_newline:return Q.space_before_token=!l,g(),a&&!_||E(),void(Q.space_before_token=!0);case f.after_newline:return Q.space_before_token=!0,!a||_?N(1).wanted_newline?x(!1,!0):E():Q.space_before_token=!1,g(),void(Q.space_before_token=!0);case f.preserve_newline:return l||E(),n=!(Q.just_added_newline()||l),Q.space_before_token=n,g(),void(Q.space_before_token=!0)}}if(e){E(),n=!1;var c=N(1);i=c&&r(c.type,["TK_WORD","TK_RESERVED"])}else"..."===q.text?(E(),n="TK_START_BLOCK"===H,i=!1):(r(q.text,["--","++","!","~"])||t)&&(n=!1,i=!1,!q.wanted_newline||"--"!==q.text&&"++"!==q.text||x(!1,!0),";"===te.last_text&&R(te.mode)&&(n=!0),"TK_RESERVED"===H?n=!0:"TK_END_EXPR"===H?n=!("]"===te.last_text&&("--"===q.text||"++"===q.text)):"TK_OPERATOR"===H&&(n=r(q.text,["--","-","++","+"])&&r(te.last_text,["--","-","++","+"]),r(q.text,["+","-"])&&r(te.last_text,["--","++"])&&(i=!0)),(te.mode!==T.BlockStatement||te.inline_frame)&&te.mode!==T.Statement||"{"!==te.last_text&&";"!==te.last_text||x());Q.space_before_token=Q.space_before_token||n,g(),Q.space_before_token=i}function z(e){if(Q.raw)return Q.add_raw_token(q),void(q.directives&&"end"===q.directives.preserve&&(Q.raw=ae.test_output_raw));if(q.directives)return x(!1,e),g(),"start"===q.directives.preserve&&(Q.raw=!0),void x(!1,!0);if(!c.newline.test(q.text)&&!q.wanted_newline)return Q.space_before_token=!0,g(),void(Q.space_before_token=!0);var t,n=p(q.text),i=!1,r=!1,s=q.whitespace_before,_=s.length;for(x(!1,e),n.length>1&&(i=S(n.slice(1),"*"),r=A(n.slice(1),s)),g(n[0]),t=1;t_?g(n[t].substring(_)):Q.add_token(n[t]);x(!1,e)}function X(e){q.wanted_newline?x(!1,e):Q.trim(!0),Q.space_before_token=!0,g(),x(!1,e)}function G(){O()||o(q,!0),"TK_RESERVED"===H&&C(te.last_text)?Q.space_before_token=!0:E(")"===te.last_text&&ae.break_chained_methods),g()}function F(e){g(),"\n"===q.text[q.text.length-1]&&x(!1,e)}function $(){for(;te.mode===T.Statement;)k();o(q)}var Q,Z,Y,q,H,J,ee,te,ne,ie,re,se,ae,_e=[],oe="";se={TK_START_EXPR:D,TK_END_EXPR:L,TK_START_BLOCK:j,TK_END_BLOCK:I,TK_WORD:B,TK_RESERVED:B,TK_SEMICOLON:P,TK_STRING:M,TK_EQUALS:V,TK_OPERATOR:W,TK_COMMA:U,TK_BLOCK_COMMENT:z,TK_COMMENT:X,TK_DOT:G,TK_UNKNOWN:F,TK_EOF:$},t=t||{},t=l(t,"js"),ae={},"expand-strict"===t.brace_style?t.brace_style="expand":"collapse-preserve-inline"===t.brace_style?t.brace_style="collapse,preserve-inline":void 0!==t.braces_on_own_line?t.brace_style=t.braces_on_own_line?"expand":"collapse":t.brace_style||(t.brace_style="collapse");var le=t.brace_style.split(/[^a-zA-Z0-9_\-]+/);ae.brace_preserve_inline=!1,ae.brace_style="collapse";for(var ce=0;ce0;)ee+=ae.indent_char,ae.indent_size-=1;var he=0;if(e&&e.length){for(;" "===e.charAt(he)||"\t"===e.charAt(he);)he+=1;oe=e.substring(0,he),e=e.substring(he)}H="TK_START_BLOCK",J="",Q=new h(ee,oe),Q.raw=ae.test_output_raw,ie=[],w(T.BlockStatement),this.beautify=function(){for(Y=new u(e,ae,ee),_e=Y.tokenize(),Z=0,q=N();q;)se[q.type](),J=te.last_text,H=q.type,te.last_text=q.text,Z+=1,q=N();return Q.get_code(ae.end_with_newline,ae.eol)};var ue=["break","continue","return","throw","yield"]}var l=n(3).mergeOpts,c=n(0),h=n(4).Output,u=n(7).Tokenizer,p=["before-newline","after-newline","preserve-newline"],f=function(e){for(var t={},n=0;n=0&&e=0&&e0&&(n-=1,t-=e.indent_length)},this.trim=function(){for(;" "===this.last();)i.pop(),t-=1;r=0===i.length},this.toString=function(){var t="";return this._empty||(n>=0&&(t=e.indent_cache[n]),t+=i.join("")),t}}function i(e,t){t=t||"",this.indent_cache=[t],this.baseIndentLength=t.length,this.indent_length=e.length,this.raw=!1;var i=[];this.baseIndentString=t,this.indent_string=e,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new n(this),i.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return i.length},this.add_new_line=function(e){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!e&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(e,t){var n=i.join("\n").replace(/[\r\n\t ]+$/,"");return e&&(n+="\n"),"\n"!==t&&(n=n.replace(/[\n]/g,t)),n},this.set_indent=function(e){if(i.length>1){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)i.pop(),this.current_line=i[i.length-1],this.current_line.trim();this.previous_line=i.length>1?i[i.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){if(this.just_added_newline()){if(1===i.length)return!0;return i[i.length-2].is_empty()}return!1}}e.exports.Output=i},function(e,t){function n(e,t,n,i,r){this.type=e,this.text=t,this.comments_before=[],this.comments_after=[],this.newlines=n||0,this.wanted_newline=n>0,this.whitespace_before=i||"",this.parent=r||null,this.opened=null,this.directives=null}e.exports.Token=n},function(e,t,n){function i(e,t){return new r(e,t).beautify()}var r=n(1).Beautifier;e.exports=i},function(e,t,n){function i(e){return e.replace(/^\s+|\s+$/g,"")}function r(e,t){for(var n=0;n/g;if("`"===a||"'"===a||'"'===a||("/"===a||t.e4x&&"<"===a&&g.test(D,-1))&&("TK_RESERVED"===K.type&&r(K.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===K.type&&")"===K.text&&K.parent&&"TK_RESERVED"===K.parent.type&&r(K.parent.text,["if","while","for"])||r(K.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var L=a,j=!1,I=!1;if(e=a,"/"===L)for(var B=!1;g.hasNext()&&(j||B||g.peek()!==L)&&!g.testChar(o.newline);)e+=g.peek(),j?j=!1:(j="\\"===g.peek(),"["===g.peek()?B=!0:"]"===g.peek()&&(B=!1)),g.next();else if(t.e4x&&"<"===L){var P=/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;g.back();var M="",V=g.match(D);if(V){for(var U=V[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=0===U.indexOf("{"),z=0;V;){var X=!!V[1],G=V[2],F=!!V[V.length-1]||"![CDATA["===G.slice(0,8);if(!F&&(G===U||W&&G.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(X?--z:++z),M+=V[0],z<=0)break;V=g.match(P)}return V||(M+=g.match(/[\s\S]*/g)[0]),M=M.replace(o.allLineBreaks,"\n"),[M,"TK_STRING"]}}else{var $=function(t,n,i){for(var r;g.hasNext()&&(r=g.peek(),j||r!==t&&(n||!o.newline.test(r)));)(j||n)&&o.newline.test(r)?("\r"===r&&"\n"===g.peek(1)&&(g.next(),r=g.peek()),e+="\n"):e+=r,j?("x"!==r&&"u"!==r||(I=!0),j=!1):j="\\"===r,g.next(),i&&-1!==e.indexOf(i,e.length-i.length)&&("`"===t?$("}",n,"`"):$("`",n,"${"),g.hasNext()&&(e+=g.next()))};"`"===L?$("`",!0,"${"):$(L)}if(I&&t.unescape_strings&&(e=l(e)),g.peek()===L&&(e+=L,g.next(),"/"===L))for(;g.hasNext()&&o.isIdentifierStart(g.peekCharCode());)e+=g.next();return[e,"TK_STRING"]}if("#"===a){if(0===m.length&&"!"===g.peek()){for(e=a;g.hasNext()&&"\n"!==a;)a=g.next(),e+=a;return[i(e)+"\n","TK_UNKNOWN"]}var Q="#";if(g.hasNext()&&g.testChar(h)){do{a=g.next(),Q+=a}while(g.hasNext()&&"#"!==a&&"="!==a);return"#"===a||("["===g.peek()&&"]"===g.peek(1)?(Q+="[]",g.next(),g.next()):"{"===g.peek()&&"}"===g.peek(1)&&(Q+="{}",g.next(),g.next())),[Q,"TK_WORD"]}}if("<"===a&&("?"===g.peek()||"%"===g.peek())){g.back();var Z=g.match(y);if(Z)return a=Z[0],a=a.replace(o.allLineBreaks,"\n"),[a,"TK_STRING"]}if("<"===a&&g.match(/\!--/g)){for(a="\x3c!--";g.hasNext()&&!g.testChar(o.newline);)a+=g.next();return x=!0,[a,"TK_COMMENT"]}if("-"===a&&x&&g.match(/->/g))return x=!1,["--\x3e","TK_COMMENT"];if("."===a)return"."===g.peek()&&"."===g.peek(1)?(a+=g.next()+g.next(),[a,"TK_OPERATOR"]):[a,"TK_DOT"];if(r(a,d)){for(;g.hasNext()&&r(a+g.peek(),d)&&(a+=g.next(),g.hasNext()););return","===a?[a,"TK_COMMA"]:"="===a?[a,"TK_EQUALS"]:[a,"TK_OPERATOR"]}return[a,"TK_UNKNOWN"]}function l(e){for(var t="",n=0,i=new a(e),r=null;i.hasNext();)if(r=i.match(/([\s]|[^\\]|\\\\)+/g),r&&(t+=r[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())r=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){t+="\\",i.hasNext()&&(t+=i.next());continue}r=i.match(/u([0-9A-Fa-f]{4})/g)}if(!r)return e;if((n=parseInt(r[1],16))>126&&n<=255&&0===r[0].indexOf("x"))return e;if(n>=0&&n<32){t+="\\"+r[0];continue}t+=34===n||39===n||92===n?"\\"+String.fromCharCode(n):String.fromCharCode(n)}return t}var c="\n\r\t ".split(""),h=/[0-9]/,u=/[01]/,p=/[01234567]/,f=/[0123456789abcdefABCDEF]/;this.positionable_operators="!= !== % & && * ** + - / : < << <= == === > >= >> >>> ? ^ | ||".split(" ");var d=this.positionable_operators.concat("! %= &= *= **= ++ += , -- -= /= :: <<= = => >>= >>>= ^= |= ~ ...".split(" "));this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var T,E,x,m,g,b=this.line_starters.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),v=/([\s\S]*?)((?:\*\/)|$)/g,w=/([^\n\r\u2028\u2029]*)/g,K=/\/\* beautify( \w+[:]\w+)+ \*\//g,R=/ (\w+)[:](\w+)/g,k=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,y=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;this.tokenize=function(){g=new a(e),x=!1,m=[];for(var t,n,i,r=null,o=[],l=[];!n||"TK_EOF"!==n.type;){for(i=s(),t=new _(i[1],i[0],T,E);"TK_COMMENT"===t.type||"TK_BLOCK_COMMENT"===t.type||"TK_UNKNOWN"===t.type;)"TK_BLOCK_COMMENT"===t.type&&(t.directives=i[2]),l.push(t),i=s(),t=new _(i[1],i[0],T,E);l.length&&(t.comments_before=l,l=[]),"TK_START_BLOCK"===t.type||"TK_START_EXPR"===t.type?(t.parent=n,o.push(r),r=t):("TK_END_BLOCK"===t.type||"TK_END_EXPR"===t.type)&&r&&("]"===t.text&&"["===r.text||")"===t.text&&"("===r.text||"}"===t.text&&"{"===r.text)&&(t.parent=r.parent,t.opened=r,r=o.pop()),m.push(t),n=t}return m}}var a=n(2).InputScanner,_=n(5).Token,o=n(0);e.exports.Tokenizer=s}]),t=e;"function"==typeof define&&define.amd?define("beautify.js",[],function(){return{js_beautify:t}}):"undefined"!=typeof exports?exports.js_beautify=t:"undefined"!=typeof window?window.js_beautify=t:"undefined"!=typeof global&&(global.js_beautify=t)}(),function(){var e=function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},
2
+ t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){function i(e){return e.replace(/^\s+/g,"")}function r(e){return e.replace(/\s+$/g,"")}function s(e,t,n,s){function _(){function e(e){var t="";return{add:function(n){var i=t+n.toLowerCase();t=i.length<=e.length?i:i.substr(i.length-e.length,e.length)},doesNotMatch:function(){return-1===t.indexOf(e)}}}return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=h,this.indent_body_inner_html=u,this.indent_head_inner_html=p,this.Utils={whitespace:"\n\r\t ".split(""),single_token:t.void_elements||["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","?php","basefont","isindex"],extra_liners:S,in_array:function(e,t){for(var n=0;n=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e),!0):(this.line_char_count++,e.push(" "),!1)},this.get_content=function(){for(var e="",t=[],n=0;"<"!==this.input.charAt(this.pos)||2===n;){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(n<2&&this.traverse_whitespace())this.space_or_wrap(t);else{if(e=this.input.charAt(this.pos),v){if("{"===e?n+=1:n<2&&(n=0),"}"===e&&n>0&&0==n--)break;var i=this.input.substr(this.pos,3);if("{{#"===i||"{{/"===i)break;if("{{!"===i)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",n=new RegExp("","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos=this.input.length)return e&&(this.pos=c,this.line_char_count=h),s.length?s.join(""):["","TK_EOF"];if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace))_=!0;else{if("'"!==r&&'"'!==r||(r+=this.get_unformatted(r),_=!0),"="===r&&(_=!1),i=this.input.substr(this.pos-1),!k||!l||u||">"!==r&&"/"!==r||i.match(/^\/?\s*>/)&&(_=!1,u=!0,this.print_newline(!1,s),this.print_indentation(s)),s.length&&"="!==s[s.length-1]&&">"!==r&&_){var p=this.space_or_wrap(s),f=p&&"/"!==r&&!R;if(_=!1,R&&"/"!==r){var d=!1;if(k&&o){d=!(null!==i.match(/^\S*(="([^"]|\\")*")?\s*\/?\s*>/))}o&&!d||(this.print_newline(!1,s),this.print_indentation(s),f=!0)}if(f){l=!0;var T=K;y&&(T=s.indexOf(" ")+1);for(var E=0;E=2&&"{"===s[s.length-1]&&"{"===s[s.length-2]&&(t="#"===r||"/"===r||"!"===r?this.pos-3:this.pos-2,n="{"),this.line_char_count++,s.push(r),s[1]&&("!"===s[1]||"?"===s[1]||"%"===s[1])){s=[this.get_comment(t)];break}if(v&&s[1]&&"{"===s[1]&&s[2]&&"!"===s[2]){s=[this.get_comment(t)];break}if(v&&"{"===n&&s.length>2&&"}"===s[s.length-2]&&"}"===s[s.length-1])break}}while(">"!==r);var b,w,O=s.join("");b=-1!==O.indexOf(" ")?O.indexOf(" "):-1!==O.indexOf("\n")?O.indexOf("\n"):"{"===O.charAt(0)?O.indexOf("}"):O.indexOf(">"),w="<"!==O.charAt(0)&&v?"#"===O.charAt(2)?3:2:1;var S=O.substring(w,b).toLowerCase();return"/"===O.charAt(O.length-2)||this.Utils.in_array(S,this.Utils.single_token)?e||(this.tag_type="SINGLE"):v&&"{"===O.charAt(0)&&"else"===S?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(S,x)||this.is_unformatted(S,m)?(a=this.get_unformatted("",O),s.push(a),this.pos-1,this.tag_type="SINGLE"):"script"===S&&(-1===O.search("type")||O.search("type")>-1&&O.search(/\b(text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect)/)>-1)?e||(this.record_tag(S),this.tag_type="SCRIPT"):"style"===S&&(-1===O.search("type")||O.search("type")>-1&&O.search("text/css")>-1)?e||(this.record_tag(S),this.tag_type="STYLE"):"!"===S.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===S.charAt(0)?(this.retrieve_tag(S.substring(1)),this.tag_type="END"):(this.record_tag(S),"html"!==S.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(s),this.Utils.in_array(S,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=c,this.line_char_count=h),s.join("")},this.get_comment=function(e){var t="",n=">",i=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&(t+=r,t.charAt(t.length-1)!==n.charAt(n.length-1)||-1===t.indexOf(n));)!i&&t.length<10&&(0===t.indexOf("",i=!0):0===t.indexOf("",i=!0):0===t.indexOf("",i=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===t.indexOf("{{!--")?(n="--}}",i=!0):0===t.indexOf("{{!")?5===t.length&&-1===t.indexOf("{{!--")&&(n="}}",i=!0):0===t.indexOf("",i=!0):0===t.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(t,n){if(n&&-1!==n.toLowerCase().indexOf(t))return"";var i="",r="",s=!0,a=e(t);do{if(this.pos>=this.input.length)return r;if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===i||"\r"===i){r+="\n",this.line_char_count=0;continue}}r+=i,a.add(i),this.line_char_count++,s=!0,v&&"{"===i&&r.length&&"{"===r.charAt(r.length-2)&&(r+=this.get_unformatted("}}"))}while(a.doesNotMatch());return r},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if("string"!=typeof(e=this.get_tag()))return e;return[e,"TK_TAG_"+this.tag_type]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,e<1?"":Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!==e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var n=this.get_tag(!0),i=(n||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(i&&!this.Utils.in_array(i[1],t))},this.printer=function(e,t,n,s,a){this.input=e||"",this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n"),this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=a,this.indent_level=0,this.wrap_line_length=s,this.line_char_count=0;for(var _=0;_0&&(e=r(e)),e&&""!==e&&(e.length>1&&"\n"===e.charAt(e.length-1)?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}e=e||"";var c,h,u,p,f,d,T,E,x,m,g,b,v,w,K,R,k,y,O,S,A;t=t||{},t=a(t,"html"),void 0!==t.wrap_line_length&&0!==parseInt(t.wrap_line_length,10)||void 0===t.max_char||0===parseInt(t.max_char,10)||(t.wrap_line_length=t.max_char),h=void 0!==t.indent_inner_html&&t.indent_inner_html,u=void 0===t.indent_body_inner_html||t.indent_body_inner_html,p=void 0===t.indent_head_inner_html||t.indent_head_inner_html,f=void 0===t.indent_size?4:parseInt(t.indent_size,10),d=void 0===t.indent_char?" ":t.indent_char,E=void 0===t.brace_style?"collapse":t.brace_style,T=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),x=t.unformatted||["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","address","big","dt","ins","strike","tt"],m=t.content_unformatted||["pre"],g=void 0===t.preserve_newlines||t.preserve_newlines,b=g?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,v=void 0!==t.indent_handlebars&&t.indent_handlebars,w=void 0===t.wrap_attributes?"auto":t.wrap_attributes,K=isNaN(parseInt(t.wrap_attributes_indent_size,10))?f:parseInt(t.wrap_attributes_indent_size,10),R="force"===w.substr(0,"force".length),k="force-expand-multiline"===w,y="force-aligned"===w,O=void 0!==t.end_with_newline&&t.end_with_newline,S="object"==typeof t.extra_liners&&t.extra_liners?t.extra_liners.concat():"string"==typeof t.extra_liners?t.extra_liners.split(","):"head,body,/html".split(","),A=t.eol?t.eol:"auto",t.indent_with_tabs&&(d="\t",f=1),"auto"===A&&(A="\n",e&&o.test(e||"")&&(A=e.match(o)[0])),A=A.replace(/\\r/,"\r").replace(/\\n/,"\n"),e=e.replace(l,"\n"),this.beautify=function(){for(c=new _,c.printer(e,d,f,T,E);;){var i=c.get_token();if(c.token_text=i[0],c.token_type=i[1],"TK_EOF"===c.token_type)break;switch(c.token_type){case"TK_TAG_START":c.print_newline(!1,c.output),c.print_token(c.token_text),c.indent_content&&(!c.indent_body_inner_html&&c.token_text.match(//)||!c.indent_head_inner_html&&c.token_text.match(//)||c.indent(),c.indent_content=!1),c.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":c.print_newline(!1,c.output),c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===c.last_token&&""===c.last_text){var r=(c.token_text.match(/\w+/)||[])[0],a=null;c.output.length&&(a=c.output[c.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),(null===a||a[1]!==r&&!c.Utils.in_array(a[1],x))&&c.print_newline(!1,c.output)}c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var o=c.token_text.match(/^\s*<([a-z-]+)/i);o&&c.Utils.in_array(o[1],x)||c.print_newline(!1,c.output),c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":for(var l=!1,h=c.output.length-1;h>=0&&"\n"!==c.output[h];h--)if(c.output[h].match(/{{#if/)){l=!0;break}l||c.print_newline(!1,c.output),c.print_token(c.token_text),c.indent_content&&(c.indent(),c.indent_content=!1),c.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":c.print_token(c.token_text),c.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==c.token_text){c.print_newline(!1,c.output);var u,p=c.token_text,m=1;"TK_SCRIPT"===c.token_type?u="function"==typeof n&&n:"TK_STYLE"===c.token_type&&(u="function"==typeof s&&s),"keep"===t.indent_scripts?m=0:"separate"===t.indent_scripts&&(m=-c.indent_level);var g=c.get_full_indent(m);if(u){var b=function(){this.eol="\n"};b.prototype=t;var v=new b;p=u(p.replace(/^\s*/,g),v)}else{var w=p.match(/^\s*/)[0],K=w.match(/[^\n\r]*$/)[0].split(c.indent_string).length-1,R=c.get_full_indent(m-K);p=p.replace(/^\s*/,g).replace(/\r\n|\r|\n/g,"\n"+R).replace(/\s+$/,"")}p&&(c.print_token_raw(p),c.print_newline(!0,c.output))}c.current_mode="TAG";break;default:""!==c.token_text&&c.print_token(c.token_text)}c.last_token=c.token_type,c.last_text=c.token_text}var k=c.output.join("").replace(/[\r\n\t ]+$/,"");return O&&(k+="\n"),"\n"!==A&&(k=k.replace(/[\n]/g,A)),k}}var a=n(2).mergeOpts,_=n(1),o=_.lineBreak,l=_.allLineBreaks;e.exports.Beautifier=s},function(e,t){var n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i=new RegExp("["+n+"]"),r=new RegExp("["+n+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g"),t.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||e>=170&&i.test(String.fromCharCode(e)))},t.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&r.test(String.fromCharCode(e))))}},function(e,t){function n(e,t){var n,i={};for(n in e)n!==t&&(i[n]=e[n]);if(t in e)for(n in e[t])i[n]=e[t][n];return i}e.exports.mergeOpts=n},function(e,t,n){function i(e,t,n,i){return new r(e,t,n,i).beautify()}var r=n(0).Beautifier;e.exports=i}]),t=e;if("function"==typeof define&&define.amd)define("beautify-html.js",["require","./beautify","./beautify-css"],function(e){var n=e("./beautify"),i=e("./beautify-css");return{html_beautify:function(e,r){return t(e,r,n.js_beautify,i.css_beautify)}}});else if("undefined"!=typeof exports){var n=require("./beautify.js"),i=require("./beautify-css.js");exports.html_beautify=function(e,r){return t(e,r,n.js_beautify,i.css_beautify)}}else"undefined"!=typeof window?window.html_beautify=function(e,n){return t(e,n,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(e,n){return t(e,n,global.js_beautify,global.css_beautify)})}(),function(e){"function"==typeof e.define&&(e.define("beautify",["beautify.js"],function(e){return e}),e.define("beautify-css",[],function(){return{css_beautify:void 0}}),e.define("beautifyModule",["beautify","beautify-html.js"],function(t,n){e.js_beautify=t.js_beautify,e.html_beautify=n.html_beautify}))}(this);
@@ -1,2 +1,2 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/comment/continuecomment.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var i,r=t.listSelections(),o=[],a=0;a-1&&f>d){if(c=u.slice(0,f),/\S/.test(c)){c="";for(var h=0;h-1&&!/\S/.test(u.slice(0,f))&&(c=u.slice(0,f));null!=c&&(c+=i.blockCommentContinue)}if(null==c&&i.lineComment&&n(t)){var u=t.getLine(l.line),f=u.indexOf(i.lineComment);f>-1&&(c=u.slice(0,f),/\S/.test(c)?c=null:c+=i.lineComment+u.slice(f+i.lineComment.length).match(/^\s*/)[0])}if(null==c)return e.Pass;o[a]="\n"+c}t.operation(function(){for(var e=r.length-1;e>=0;e--)t.replaceRange(o[e],r[e].from(),r[e].to(),"+insert")})}function n(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,function(n,i,r){if(r&&r!=e.Init&&n.removeKeyMap("continueComment"),i){var o="Enter";"string"==typeof i?o=i:"object"==typeof i&&i.key&&(o=i.key);var a={name:"continueComment"};a[o]=t,n.addKeyMap(a)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/closebrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:h[t]}function n(e){for(var t=0;t=0;l--){var c=a[l].head;n.replaceRange("",m(c.line,c.ch-1),m(c.line,c.ch+1),"+delete")}}function a(n){var i=r(n),o=i&&t(i,"explode");if(!o||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),l=0;l0;return{anchor:new m(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new m(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var o=r(n);if(!o||n.getOption("disableInput"))return e.Pass;var a=t(o,"pairs"),s=a.indexOf(i);if(-1==s)return e.Pass;for(var f,h=t(o,"triples"),g=a.charAt(s+1)==i,p=n.listSelections(),v=s%2==0,b=0;b1&&h.indexOf(i)>=0&&n.getRange(m(C.line,C.ch-2),C)==i+i&&(C.ch<=2||n.getRange(m(C.line,C.ch-3),m(C.line,C.ch-2))!=i))x="addFour";else if(g){if(e.isWordChar(k)||!u(n,C,i))return e.Pass;x="both"}else{if(!v||n.getLine(C.line).length!=C.ch&&!c(k,a)&&!/\s/.test(k))return e.Pass;x="both"}else x=g&&d(n,C)?"both":h.indexOf(i)>=0&&n.getRange(C,m(C.line,C.ch+3))==i+i+i?"skipThree":"skip";if(f){if(f!=x)return e.Pass}else f=x}var L=s%2?a.charAt(s-1):i,S=s%2?i:a.charAt(s+1);n.operation(function(){if("skip"==f)n.execCommand("goCharRight");else if("skipThree"==f)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==f){for(var t=n.getSelections(),e=0;e-1&&n%2==1}function f(e,t){var n=e.getRange(m(t.line,t.ch-1),m(t.line,t.ch+1));return 2==n.length?n:null}function u(t,n,i){var r=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type)||d(t,n))return!1;var a=new e.StringStream(r.slice(0,n.ch)+i+r.slice(n.ch),4);for(a.pos=a.start=o.start;;){var l=t.getMode().token(a,o.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(l);a.start=a.pos}}function d(e,t){var n=e.getTokenAt(m(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch}var h={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},m=e.Pos;e.defineOption("autoCloseBrackets",!1,function(i,r,o){o&&o!=e.Init&&(i.removeKeyMap(g),i.state.closeBrackets=null),r&&(n(t(r,"pairs")),i.state.closeBrackets=r,i.addKeyMap(g))});var g={Backspace:o,Enter:a};n(h.pairs+"`")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/xml-fold",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(d(e.line,t));return n&&/\btag\b/.test(n)}function r(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(r(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(i(e,t+1)){m.lastIndex=t,e.ch=t;var n=m.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function s(e){for(;;){m.lastIndex=e.ch;var t=m.exec(e.text);if(!t){if(r(e))continue;return}{if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}}function f(e,t){for(var n=[];;){var i,r=s(e),o=e.line,l=e.ch-(r?r[0].length:0);if(!r||!(i=a(e)))return;if("selfClose"!=i)if(r[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==r[2]){n.length=c;break}if(c<0&&(!t||t==r[2]))return{tag:r[2],from:d(o,l),to:d(e.line,e.ch)}}else n.push(r[2])}}function u(e,t){for(var n=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var r=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])n.push(a[2]);else{for(var s=n.length-1;s>=0;--s)if(n[s]==a[2]){n.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:d(e.line,e.ch),to:d(r,o)}}}else l(e)}}var d=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",m=new RegExp("<(/?)(["+h+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,t){for(var i=new n(e,t.line,0);;){var r,o=s(i);if(!o||i.line!=t.line||!(r=a(i)))return;if(!o[1]&&"selfClose"!=r){var l=d(i.line,i.ch),c=f(i,o[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,i,r){var o=new n(e,i.line,i.ch,r);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=a(o),c=s&&d(o.line,o.ch),h=s&&l(o);if(s&&h&&!(t(o,i)>0)){var m={from:d(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:m,close:null,at:"open"}:h[1]?{open:u(o,h[2]),close:m,at:"close"}:(o=new n(e,c.line,c.ch,r),{open:m,close:f(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,i,r){for(var o=new n(e,t.line,t.ch,i);;){var a=u(o,r);if(!a)break;var l=new n(e,t.line,t.ch,i),s=f(l,a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,i,r){return f(new n(e,t.line,t.ch,r?{from:0,to:r}:null),i)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/closetag.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),i=[],s=0;sc.ch&&(v=v.slice(0,v.length-f.end+c.ch));var b=v.toLowerCase();if(!v||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&"closeTag"==d.type||f.string.indexOf("/")==f.string.length-1||g&&r(g,b)>-1||o(t,v,c,d,!0))return e.Pass;var x=p&&r(p,b)>-1;i[s]={indent:x,text:">"+(x?"\n\n":"")+"",newPos:x?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var s=n.length-1;s>=0;s--){var y=i[s];t.replaceRange(y.text,n[s].head,n[s].anchor,"+insert");var C=t.listSelections().slice(0);C[s]={head:y.newPos,anchor:y.newPos},t.setSelections(C),y.indent&&(t.indentLine(y.newPos.line,null,!0),t.indentLine(y.newPos.line+1,null,!0))}}function n(t,n){for(var i=t.listSelections(),r=[],a=n?"/":""!=t.getLine(s.line).charAt(c.end)&&(d+=">"),r[l]=d}t.replaceSelections(r),i=t.listSelections();for(var l=0;l'"]=function(e){return t(e)}),n.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/matchbrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i){var r=e.getLineHandle(t.line),o=t.ch-1,s=i&&i.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=!s&&o>=0&&l[r.text.charAt(o)]||l[r.text.charAt(++o)];if(!c)return null;var f=">"==c.charAt(1)?1:-1;if(i&&i.strict&&f>0!=(o==t.ch))return null;var u=e.getTokenTypeAt(a(t.line,o+1)),d=n(e,a(t.line,o+(f>0?1:0)),f,u||null,i);return null==d?null:{from:a(t.line,o),to:d&&d.pos,match:d&&d.ch==c.charAt(0),forward:f>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,s=r&&r.maxScanLines||1e3,c=[],f=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,u=n>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),d=t.line;d!=u;d+=n){var h=e.getLine(d);if(h){var m=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>o))for(d==t.line&&(m=t.ch-(n<0?1:0));m!=g;m+=n){var p=h.charAt(m);if(f.test(p)&&(void 0===i||e.getTokenTypeAt(a(d,m+1))==i)){var v=l[p];if(">"==v.charAt(1)==n>0)c.push(p);else{if(!c.length)return{pos:a(d,m),ch:p};c.pop()}}}}}return d-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),c=0;c",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),s&&(s(),s=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return(i||"boolean"==typeof n)&&(i?(i.strict=n,n=i):n=n?{strict:!0}:null),t(this,e,n)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/matchtags.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var i=n.getCursor(),r=n.getViewport();r.from=Math.min(r.from,i.line),r.to=Math.max(i.line+1,r.to);var o=e.findMatchingTag(n,i,r);if(o){if(n.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?n.state.tagOther=n.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(r,o,a){a&&a!=e.Init&&(r.off("cursorActivity",n),r.off("viewportChange",i),t(r)),o&&(r.state.matchBothTags="object"==typeof o&&o.bothTags,r.on("cursorActivity",n),r.on("viewportChange",i),n(r))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var i="close"==n.at?n.open:n.close;i&&t.extendSelection(i.to,i.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/trailingspace.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineOption("showTrailingSpace",!1,function(t,n,i){i==e.Init&&(i=!1),i&&!n?t.removeOverlay("trailingspace"):!i&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/foldcode",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,r,o,a){function l(e){var n=s(t,r);if(!n||n.to.line-n.from.linet.firstLine();)r=e.Pos(r.line-1,0),f=l(!1);if(f&&!f.cleared&&"unfold"!==a){var u=n(t,o);e.on(u,"mousedown",function(t){d.clear(),e.e_preventDefault(t)});var d=t.markText(f.from,f.to,{replacedWith:u,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)}),e.signal(t,"fold",t,f.from,f.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var r=document.createTextNode(n);n=document.createElement("span"),n.appendChild(r),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.newFoldFunction=function(e,n){return function(i,r){t(i,r,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n=l&&(n=r(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n),++a})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){o(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var r=e.state.foldGutter;if(r){var o=r.options;if(n==o.gutter){var a=i(e,t);a?a.clear():e.foldCode(u(t,0),o.rangeFinder)}}}function s(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?a(e):e.operation(function(){n.fromt.to&&(o(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&it.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));if(/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"keyword"!=i.type||"import"!=i.string)return null;for(var r=n,o=Math.min(t.lastLine(),n+10);r<=o;++r){var a=t.getLine(r),l=a.indexOf(";");if(-1!=l)return{startCh:i.end,end:e.Pos(r,l)}}}var r,o=n.line,a=i(o);if(!a||i(o-1)||(r=i(o-2))&&r.end.line==o-1)return null;for(var l=a.end;;){var s=i(l.line+1);if(null==s)break;l=s.end}return{from:t.clipPos(e.Pos(o,a.startCh+1)),to:l}}),e.registerHelper("fold","include",function(t,n){function i(n){if(nt.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));return/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var r=n.line,o=i(r);if(null==o||null!=i(r-1))return null;for(var a=r;;){if(null==i(a+1))break;++a}return{from:e.Pos(r,o+1),to:t.clipPos(e.Pos(a))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/comment-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var i=t.getModeAt(n),r=i.blockCommentStart,o=i.blockCommentEnd;if(r&&o){for(var a,l=n.line,s=t.getLine(l),c=n.ch,f=0;;){var u=c<=0?-1:s.lastIndexOf(r,c-1);if(-1!=u){if(1==f&&ur))break;o=a}}return o?{from:e.Pos(i.line,n.getLine(i.line).length),to:e.Pos(o,n.getLine(o).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/autoFormatAll.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineExtension("autoFormatAll",function(t,n){function i(){c+="\n",u=!0,++f}for(var r=this,o=r.getMode(),a=r.getRange(t,n).split("\n"),l=e.copyState(o,r.getTokenAt(t).state),s=r.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;dn&&(o+=i(e.substring(n,r[a].start)),n=r[a].start),r[a].start<=n&&r[a].end>=n&&(o+=e.substring(n,r[a].end),n=r[a].end);n")&&"open"==this.tagType){this.tagType="";var c=this.isXML?"[^<]*?":"";return RegExp("^"+c+"","i").test(n)?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(a=this.noBreak,this.noBreak=!1,!a)}if(0==t.indexOf("")&&"close"==this.tagType)return this.tagType="",0==n.indexOf("<")&&(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+o+"|").indexOf("|"+s+"|"))?(this.noBreak=!1,!0):(a=this.noBreak,this.noBreak=!1,!a)}return 0==n.indexOf("<")&&(this.noBreak=!1,this.isXML&&""!=this.tagName?(this.tagName="",!1):(l=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),s=null!=l?l[1].toLowerCase():"",-1==("|"+o+"|").indexOf("|"+s+"|")))}}),e.defineExtension("commentRange",function(t,n,i){var r=this,o=e.innerMode(r.getMode(),r.getTokenAt(n).state).mode;r.operation(function(){if(t)r.replaceRange(o.commentEnd,i),r.replaceRange(o.commentStart,n),r.setSelection(n,{line:i.line,ch:i.ch+o.commentStart.length+o.commentEnd.length}),n.line==i.line&&n.ch==i.ch&&r.setCursor(n.line,n.ch+o.commentStart.length);else{var e=r.getRange(n,i),a=e.indexOf(o.commentStart),l=e.lastIndexOf(o.commentEnd);a>-1&&l>-1&&l>a&&(e=e.substr(0,a)+e.substring(a+o.commentStart.length,l)+e.substr(l+o.commentEnd.length)),r.replaceRange(e,n,i),r.setSelection(n,{line:i.line,ch:i.ch-o.commentStart.length-o.commentEnd.length})}})}),e.defineExtension("autoIndentRange",function(e,t){var n=this;this.operation(function(){for(var i=e.line;i<=t.line;i++)n.indentLine(i,"smart")})}),e.defineExtension("autoFormatRange",function(t,n){function i(){c+="\n",u=!0,++f}for(var r=this,o=r.getMode(),a=r.getRange(t,n).split("\n"),l=e.copyState(o,r.getTokenAt(t).state),s=r.getOption("tabSize"),c="",f=0,u=0==t.ch,d=0;d
2
- ;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function n(e){return e.global?e:new RegExp(e.source,t(e)+"g")}function i(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function r(e,t,i){t=n(t);for(var r=i.line,o=i.ch,a=e.lastLine();r<=a;r++,o=0){t.lastIndex=o;var l=e.getLine(r),s=t.exec(l);if(s)return{from:g(r,s.index),to:g(r,s.index+s[0].length),match:s}}}function o(e,t,o){if(!i(t))return r(e,t,o);t=n(t);for(var a,l=1,s=o.line,c=e.lastLine();s<=c;){for(var f=0;f=l;r--,o=-1){var s=e.getLine(r);o>-1&&(s=s.slice(0,o));var c=a(s,t);if(c)return{from:g(r,c.index),to:g(r,c.index+c[0].length),match:c}}}function s(e,t,i){t=n(t);for(var r,o=1,l=i.line,s=e.firstLine();l>=s;){for(var c=0;c>1,l=i(e.slice(0,a)).length;if(l==n)return a;l>n?o=a:r=a+1}}function f(e,t,n,i){if(!t.length)return null;var r=i?h:m,o=r(t).split(/\r|\n\r?/);e:for(var a=n.line,l=n.ch,s=e.lastLine()+1-o.length;a<=s;a++,l=0){var f=e.getLine(a).slice(l),u=r(f);if(1==o.length){var d=u.indexOf(o[0]);if(-1==d)continue e;var n=c(f,u,d,r)+l;return{from:g(a,c(f,u,d,r)+l),to:g(a,c(f,u,d+o[0].length,r)+l)}}var p=u.length-o[0].length;if(u.slice(p)==o[0]){for(var v=1;v=s;a--,l=-1){var f=e.getLine(a);l>-1&&(f=f.slice(0,l));var u=r(f);if(1==o.length){var d=u.lastIndexOf(o[0]);if(-1==d)continue e;return{from:g(a,c(f,u,d,r)),to:g(a,c(f,u,d+o[0].length,r))}}var p=o[o.length-1];if(u.slice(0,p.length)==p){for(var v=1,n=a-o.length+1;v0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(i,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/scroll/annotatescrollbar",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){function n(e){clearTimeout(i.doRedraw),i.doRedraw=setTimeout(function(){i.redraw()},e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var i=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(i.doUpdate),i.doUpdate=setTimeout(function(){i.computeScale()&&n(20)},100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("change",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)}),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){function t(e,t){return s!=e.line&&(s=e.line,c=n.getLineHandle(s)),c.widgets&&c.widgets.length||a&&c.height>l?n.charCoords(e,"local")[t?"top":"bottom"]:n.heightAtLine(c,"local")+(t?0:c.height)}!1!==e&&this.computeScale();var n=this.cm,i=this.hScale,r=document.createDocumentFragment(),o=this.annotations,a=n.getOption("lineWrapping"),l=a&&1.5*n.defaultTextHeight(),s=null,c=null,f=n.lastLine();if(n.display.barWidth)for(var u,d=0;df)){for(var m=u||t(h.from,!0)*i,g=t(h.to,!1)*i;df)&&!((u=t(o[d+1].from,!0)*i)>g+.9);)h=o[++d],g=t(h.to,!1)*i;if(g!=m){var p=Math.max(g-m,3),v=r.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(n.display.barWidth-1,2)+"px; top: "+(m+this.buttonHeight)+"px; height: "+p+"px",v.className=this.options.className,h.id&&v.setAttribute("annotation-id",h.id)}}}this.div.textContent="",this.div.appendChild(r)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define("addon/search/matchesonscrollbar",["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,i){this.cm=e,this.options=i;var r={listenForChanges:!1};for(var o in i)r[o]=i[o];r.className||(r.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(r),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}function n(e,t,n){return e<=t?e:Math.max(t,e+n)}e.defineExtension("showMatchesOnScrollbar",function(e,n,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new t(this,e,n,i)});t.prototype.findMatches=function(){if(this.gap){for(var t=0;t=this.gap.to)break;n.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var i=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),this.caseFold),r=this.options&&this.options.maxMatches||1e3;i.findNext();){var n={from:i.from(),to:i.to()};if(n.from.line>=this.gap.to)break;if(this.matches.splice(t++,0,n),this.matches.length>r)break}this.gap=null}},t.prototype.onChange=function(t){var i=t.from.line,r=e.changeEnd(t).line,o=r-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,i,o),t.from.line),this.gap.to=Math.max(n(this.gap.to,i,o),t.from.line)):this.gap={from:t.from.line,to:r+1},o)for(var a=0;a=t.options.minChars&&o(e,d,!1,t.options.style)}})}function s(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var i={line:t.line,ch:t.ch-1},r=e.getRange(i,t);if(null===r.match(/\W/))return!1}if(n.ch-1?r+t.length:r}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(r,o){if(o.innerActive){var a=o.innerActive,l=r.string;if(!a.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var s=a.close?n(l,a.close,r.pos,a.parseDelimiters):-1;if(s==r.pos&&!a.parseDelimiters)return r.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(r.string=l.slice(0,s));var c=a.mode.token(r,o.inner);return s>-1&&(r.string=l),s==r.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var f=1/0,l=r.string,u=0;u
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/comment/continuecomment.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var i,o=t.listSelections(),r=[],s=0;s-1&&f>h){if(c=u.slice(0,f),/\S/.test(c)){c="";for(var d=0;d-1&&!/\S/.test(u.slice(0,f))&&(c=u.slice(0,f));null!=c&&(c+=i.blockCommentContinue)}if(null==c&&i.lineComment&&n(t)){var u=t.getLine(a.line),f=u.indexOf(i.lineComment);f>-1&&(c=u.slice(0,f),/\S/.test(c)?c=null:c+=i.lineComment+u.slice(f+i.lineComment.length).match(/^\s*/)[0])}if(null==c)return e.Pass;r[s]="\n"+c}t.operation(function(){for(var e=o.length-1;e>=0;e--)t.replaceRange(r[e],o[e].from(),o[e].to(),"+insert")})}function n(e){var t=e.getOption("continueComments");return!t||"object"!=typeof t||!1!==t.continueLineComment}e.defineOption("continueComments",null,function(n,i,o){if(o&&o!=e.Init&&n.removeKeyMap("continueComment"),i){var r="Enter";"string"==typeof i?r=i:"object"==typeof i&&i.key&&(r=i.key);var s={name:"continueComment"};s[r]=t,n.addKeyMap(s)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/closebrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:u[t]}function n(e){for(var t=0;t=0;a--){var f=s[a].head;n.replaceRange("",h(f.line,f.ch-1),h(f.line,f.ch+1),"+delete")}}function s(n){var i=o(n),r=i&&t(i,"explode");if(!r||n.getOption("disableInput"))return e.Pass;for(var s=n.listSelections(),a=0;a0;return{anchor:new h(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new h(t.head.line,t.head.ch+(n?1:-1))}}function l(n,i){var r=o(n);if(!r||n.getOption("disableInput"))return e.Pass;var s=t(r,"pairs"),l=s.indexOf(i);if(-1==l)return e.Pass;for(var c,u=t(r,"closeBefore"),d=t(r,"triples"),g=s.charAt(l+1)==i,m=n.listSelections(),p=l%2==0,v=0;v1&&d.indexOf(i)>=0&&n.getRange(h(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(n.getTokenTypeAt(h(x.line,x.ch-2))))return e.Pass;y="addFour"}else if(g){var k=0==x.ch?" ":n.getRange(h(x.line,x.ch-1),x);if(e.isWordChar(C)||k==i||e.isWordChar(k))return e.Pass;y="both"}else{if(!p||!(0===C.length||/\s/.test(C)||u.indexOf(C)>-1))return e.Pass;y="both"}else y=g&&f(n,x)?"both":d.indexOf(i)>=0&&n.getRange(x,h(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var w=l%2?s.charAt(l-1):i,S=l%2?i:s.charAt(l+1);n.operation(function(){if("skip"==c)n.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==c){for(var t=n.getSelections(),e=0;e",triples:"",explode:"[]{}"},h=e.Pos;e.defineOption("autoCloseBrackets",!1,function(i,o,r){r&&r!=e.Init&&(i.removeKeyMap(d),i.state.closeBrackets=null),o&&(n(t(o,"pairs")),i.state.closeBrackets=o,i.addKeyMap(d))});var d={Backspace:r,Enter:s};n(u.pairs+"`")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/xml-fold",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(h(e.line,t));return n&&/\btag\b/.test(n)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function r(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(o(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(r(e))continue;return}if(i(e,t+1)){g.lastIndex=t,e.ch=t;var n=g.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(o(e))continue;return}{if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(r(e))continue;return}{if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t}}}function f(e,t){for(var n=[];;){var i,o=l(e),r=e.line,a=e.ch-(o?o[0].length:0);if(!o||!(i=s(e)))return;if("selfClose"!=i)if(o[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==o[2]){n.length=c;break}if(c<0&&(!t||t==o[2]))return{tag:o[2],from:h(r,a),to:h(e.line,e.ch)}}else n.push(o[2])}}function u(e,t){for(var n=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var o=e.line,r=e.ch,s=a(e);if(!s)return;if(s[1])n.push(s[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==s[2]){n.length=l;break}if(l<0&&(!t||t==s[2]))return{tag:s[2],from:h(e.line,e.ch),to:h(o,r)}}}else a(e)}}var h=e.Pos,d="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",g=new RegExp("<(/?)(["+d+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,i){for(var o=new n(e,i.line,0);;){var r=l(o);if(!r||o.line!=i.line)return;var a=s(o);if(!a)return;if(!r[1]&&"selfClose"!=a){var c=h(o.line,o.ch),u=f(o,r[2]);return u&&t(u.from,c)>0?{from:c,to:u.from}:null}}}),e.findMatchingTag=function(e,i,o){var r=new n(e,i.line,i.ch,o);if(-1!=r.text.indexOf(">")||-1!=r.text.indexOf("<")){var l=s(r),c=l&&h(r.line,r.ch),d=l&&a(r);if(l&&d&&!(t(r,i)>0)){var g={from:h(r.line,r.ch),to:c,tag:d[2]};return"selfClose"==l?{open:g,close:null,at:"open"}:d[1]?{open:u(r,d[2]),close:g,at:"close"}:(r=new n(e,c.line,c.ch,o),{open:g,close:f(r,d[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,i,o){for(var r=new n(e,t.line,t.ch,i);;){var s=u(r,o);if(!s)break;var a=new n(e,t.line,t.ch,i),l=f(a,s.tag);if(l)return{open:s,close:l}}},e.scanForClosingTag=function(e,t,i,o){return f(new n(e,t.line,t.ch,o?{from:0,to:o}:null),i)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/closetag.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),i=[],l=t.getOption("autoCloseTags"),c=0;cf.ch&&(v=v.slice(0,v.length-u.end+f.ch));var y=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=f.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==d.type||u.string.indexOf("/")==u.string.length-1||m&&o(m,y)>-1||r(t,v,f,d,!0))return e.Pass;var b="object"==typeof l&&l.emptyTags;if(b&&o(b,v)>-1)i[c]={text:"/>",newPos:e.Pos(f.line,f.ch+2)};else{var x=p&&o(p,y)>-1;i[c]={indent:x,text:">"+(x?"\n\n":"")+"",newPos:x?e.Pos(f.line+1,0):e.Pos(f.line,f.ch+1)}}}for(var C="object"==typeof l&&l.dontIndentOnAutoClose,c=n.length-1;c>=0;c--){var k=i[c];t.replaceRange(k.text,n[c].head,n[c].anchor,"+insert");var w=t.listSelections().slice(0);w[c]={head:k.newPos,anchor:k.newPos},t.setSelections(w),!C&&k.indent&&(t.indentLine(k.newPos.line,null,!0),t.indentLine(k.newPos.line+1,null,!0))}}function n(t,n){for(var i=t.listSelections(),o=[],s=n?"/":""!=t.getLine(f.line).charAt(u.end)&&(g+=">"),o[c]=g}if(t.replaceSelections(o),i=t.listSelections(),!l)for(var c=0;c'"]=function(e){return t(e)}),n.addKeyMap(s)}});var s=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],a=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/matchbrackets.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e){return e&&e.bracketRegex||/[(){}[\]]/}function n(e,n,o){var r=e.getLineHandle(n.line),s=n.ch-1,c=o&&o.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var f=t(o),u=!c&&s>=0&&f.test(r.text.charAt(s))&&l[r.text.charAt(s)]||f.test(r.text.charAt(s+1))&&l[r.text.charAt(++s)];if(!u)return null;var h=">"==u.charAt(1)?1:-1;if(o&&o.strict&&h>0!=(s==n.ch))return null;var d=e.getTokenTypeAt(a(n.line,s+1)),g=i(e,a(n.line,s+(h>0?1:0)),h,d||null,o);return null==g?null:{from:a(n.line,s),to:g&&g.pos,match:g&&g.ch==u.charAt(0),forward:h>0}}function i(e,n,i,o,r){for(var s=r&&r.maxScanLineLength||1e4,c=r&&r.maxScanLines||1e3,f=[],u=t(r),h=i>0?Math.min(n.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,n.line-c),d=n.line;d!=h;d+=i){var g=e.getLine(d);if(g){var m=i>0?0:g.length-1,p=i>0?g.length:-1;if(!(g.length>s))for(d==n.line&&(m=n.ch-(i<0?1:0));m!=p;m+=i){var v=g.charAt(m);if(u.test(v)&&(void 0===o||e.getTokenTypeAt(a(d,m+1))==o)){var y=l[v];if(y&&">"==y.charAt(1)==i>0)f.push(v);else{if(!f.length)return{pos:a(d,m),ch:v};f.pop()}}}}}return d-i!=(i>0?e.lastLine():e.firstLine())&&null}function o(e,t,i){for(var o=e.state.matchBrackets.maxHighlightLineLength||1e3,r=[],l=e.listSelections(),c=0;c",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){o(this,!0)}),e.defineExtension("findMatchingBracket",function(e,t,i){return(i||"boolean"==typeof t)&&(i?(i.strict=t,t=i):t=t?{strict:!0}:null),n(this,e,t)}),e.defineExtension("scanForBracket",function(e,t,n,o){return i(this,e,t,n,o)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define("addon/edit/matchtags.js",["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(n){n.state.failedTagMatch=!1,n.operation(function(){if(t(n),!n.somethingSelected()){var i=n.getCursor(),o=n.getViewport();o.from=Math.min(o.from,i.line),o.to=Math.max(i.line+1,o.to);var r=e.findMatchingTag(n,i,o);if(r){if(n.state.matchBothTags){var s="open"==r.at?r.open:r.close;s&&(n.state.tagHit=n.markText(s.from,s.to,{className:"CodeMirror-matchingtag"}))}var a="close"==r.at?r.open:r.close;a?n.state.tagOther=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}):n.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}e.defineOption("matchTags",!1,function(o,r,s){s&&s!=e.Init&&(o.off("cursorActivity",n),o.off("viewportChange",i),t(o)),r&&(o.state.matchBothTags="object"==typeof r&&r.bothTags,o.on("cursorActivity",n),o.on("viewportChange",i),n(o))}),e.commands.toMatchingTag=function(t){var n=e.findMatchingTag(t,t.getCursor());if(n){var i="close"==n.at?n.open:n.close;i&&t.extendSelection(i.to,i.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/edit/trailingspace.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineOption("showTrailingSpace",!1,function(t,n,i){i==e.Init&&(i=!1),i&&!n?t.removeOverlay("trailingspace"):!i&&n&&t.addOverlay({token:function(e){for(var t=e.string.length,n=t;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=t,"trailingspace")},name:"trailingspace"})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/foldcode",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,o,r,s){function a(e){var n=l(t,o);if(!n||n.to.line-n.from.linet.firstLine();)o=e.Pos(o.line-1,0),f=a(!1);if(f&&!f.cleared&&"unfold"!==s){var u=n(t,r);e.on(u,"mousedown",function(t){h.clear(),e.e_preventDefault(t)});var h=t.markText(f.from,f.to,{replacedWith:u,clearOnEnter:i(t,r,"clearOnEnter"),__isFold:!0});h.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)}),e.signal(t,"fold",t,f.from,f.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var o=document.createTextNode(n);n=document.createElement("span"),n.appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:o[n]}e.newFoldFunction=function(e,n){return function(i,o){t(i,o,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n=a&&(n=o(r.indicatorOpen))}e.setGutterMarker(t,r.gutter,n),++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){r(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function a(e,t,n){var o=e.state.foldGutter;if(o){var r=o.options;if(n==r.gutter){var s=i(e,t);s?s.clear():e.foldCode(u(t,0),r.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation(function(){n.fromt.to&&(r(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&it.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));if(/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"keyword"!=i.type||"import"!=i.string)return null;for(var o=n,r=Math.min(t.lastLine(),n+10);o<=r;++o){var s=t.getLine(o),a=s.indexOf(";");if(-1!=a)return{startCh:i.end,end:e.Pos(o,a)}}}var o,r=n.line,s=i(r);if(!s||i(r-1)||(o=i(r-2))&&o.end.line==r-1)return null;for(var a=s.end;;){var l=i(a.line+1);if(null==l)break;a=l.end}return{from:t.clipPos(e.Pos(r,s.startCh+1)),to:a}}),e.registerHelper("fold","include",function(t,n){function i(n){if(nt.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));return/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1))),"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var o=n.line,r=i(o);if(null==r||null!=i(o-1))return null;for(var s=o;;){if(null==i(s+1))break;++s}return{from:e.Pos(o,r+1),to:t.clipPos(e.Pos(s))}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/comment-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var i=t.getModeAt(n),o=i.blockCommentStart,r=i.blockCommentEnd;if(o&&r){for(var s,a=n.line,l=t.getLine(a),c=n.ch,f=0;;){var u=c<=0?-1:l.lastIndexOf(o,c-1);if(-1!=u){if(1==f&&uo))break;r=s}}return r?{from:e.Pos(i.line,n.getLine(i.line).length),to:e.Pos(r,n.getLine(r).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/hint/show-hint.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}function n(e,t,n){var i=e.options.hintOptions,o={};for(var r in g)o[r]=g[r];if(i)for(var r in i)void 0!==i[r]&&(o[r]=i[r]);if(n)for(var r in n)void 0!==n[r]&&(o[r]=n[r]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}function i(e){return"string"==typeof e?e:e.text}function o(e,t){function n(e,n){var o;o="string"!=typeof n?function(e){return n(e,t)}:i.hasOwnProperty(n)?i[n]:n,r[e]=o}var i={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(i["Ctrl-P"]=function(){t.moveFocus(-1)},i["Ctrl-N"]=function(){t.moveFocus(1)});var o=e.options.customKeys,r=o?{}:i;if(o)for(var s in o)o.hasOwnProperty(s)&&n(s,o[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&n(s,a[s]);return r}function r(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function s(t,n){this.completion=t,this.data=n,this.picked=!1;var s=this,a=t.cm,l=a.getInputField().ownerDocument,c=l.defaultView||l.parentWindow,h=this.hints=l.createElement("ul"),d=t.cm.options.theme;h.className="CodeMirror-hints "+d,this.selectedHint=n.selectedHint||0;for(var g=n.list,m=0;mh.clientHeight+1,M=a.getScrollInfo();if(A>0){var T=O.bottom-O.top;if(b.top-(b.bottom-O.top)-T>0)h.style.top=(C=b.top-T)+"px",k=!1;else if(T>S){h.style.height=S-5+"px",h.style.top=(C=b.bottom-O.top)+"px";var j=a.getCursor();n.from.ch!=j.ch&&(b=a.cursorCoords(j),h.style.left=(x=b.left)+"px",O=h.getBoundingClientRect())}}var F=O.right-w;if(F>0&&(O.right-O.left>w&&(h.style.width=w-5+"px",F-=O.right-O.left-w),h.style.left=(x=b.left-F)+"px"),L)for(var P=h.firstChild;P;P=P.nextSibling)P.style.paddingRight=a.display.nativeBarWidth+"px";if(a.addKeyMap(this.keyMap=o(t,{moveFocus:function(e,t){s.changeActive(s.selectedHint+e,t)},setFocus:function(e){s.changeActive(e)},menuSize:function(){return s.screenAmount()},length:g.length,close:function(){t.close()},pick:function(){s.pick()},data:n})),t.options.closeOnUnfocus){var H;a.on("blur",this.onBlur=function(){H=setTimeout(function(){t.close()},100)}),a.on("focus",this.onFocus=function(){clearTimeout(H)})}return a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),n=a.getWrapperElement().getBoundingClientRect(),i=C+M.top-e.top,o=i-(c.pageYOffset||(l.documentElement||l.body).scrollTop);if(k||(o+=h.offsetHeight),o<=n.top||o>=n.bottom)return t.close();h.style.top=i+"px",h.style.left=x+M.left-e.left+"px"}),e.on(h,"dblclick",function(e){var t=r(h,e.target||e.srcElement);t&&null!=t.hintId&&(s.changeActive(t.hintId),s.pick())}),e.on(h,"click",function(e){var n=r(h,e.target||e.srcElement);n&&null!=n.hintId&&(s.changeActive(n.hintId),t.options.completeOnSingleClick&&s.pick())}),e.on(h,"mousedown",function(){setTimeout(function(){a.focus()},20)}),e.signal(n,"select",g[this.selectedHint],h.childNodes[this.selectedHint]),!0}function a(e,t){if(!e.somethingSelected())return t;for(var n=[],i=0;i0?t(e):i(o+1)})}var r=a(e,o);i(0)};return r.async=!0,r.supportsSelection=!0,r}return(i=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:i})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}var f="CodeMirror-hint",u="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var i={hint:t};if(n)for(var o in n)i[o]=n[o];return e.showHint(i)},e.defineExtension("showHint",function(i){i=n(this,this.getCursor("start"),i);var o=this.listSelections();if(!(o.length>1)){if(this.somethingSelected()){if(!i.hint.supportsSelection)return;for(var r=0;r
2
+ ;if(e.line!=this.startPos.line||t.length-e.ch!=this.startLen-this.startPos.ch||e.ch=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+u,"")),i=this.hints.childNodes[this.selectedHint=t],i.className+=" "+u,i.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:c}),e.registerHelper("hint","fromList",function(t,n){var i,o=t.getCursor(),r=t.getTokenAt(o),s=e.Pos(o.line,r.start),a=o;r.start,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/hint/javascript-hint.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){for(var n=0,i=e.length;nr.ch&&(s.end=r.ch,s.string=s.string.slice(0,r.ch-s.start)):s={start:r.ch,end:r.ch,string:"",state:s.state,type:"."==s.string?"property":null};for(var f=s;"property"==f.type;){if(f=i(t,c(r.line,f.start)),"."!=f.string)return;if(f=i(t,c(r.line,f.start)),!u)var u=[];u.push(f)}return{list:l(s,u,n,o),from:c(r.line,s.start),to:c(r.line,s.end)}}}}function o(e,t){return i(e,d,function(e,t){return e.getTokenAt(t)},t)}function r(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function s(e,t){return i(e,g,r,t)}function a(e,t){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var n=e;n;n=Object.getPrototypeOf(n))Object.getOwnPropertyNames(n).forEach(t);else for(var i in e)t(i)}function l(e,i,o,r){function s(e){0!=e.lastIndexOf(d,0)||n(c,e)||c.push(e)}function l(e){"string"==typeof e?t(f,s):e instanceof Array?t(u,s):e instanceof Function&&t(h,s),a(e,s)}var c=[],d=e.string,g=r&&r.globalScope||window;if(i&&i.length){var m,p=i.pop();for(p.type&&0===p.type.indexOf("variable")?(r&&r.additionalContext&&(m=r.additionalContext[p.string]),r&&!1===r.useGlobalScope||(m=m||g[p.string])):"string"==p.type?m="":"atom"==p.type?m=1:"function"==p.type&&(null==g.jQuery||"$"!=p.string&&"jQuery"!=p.string||"function"!=typeof g.jQuery?null!=g._&&"_"==p.string&&"function"==typeof g._&&(m=g._()):m=g.jQuery());null!=m&&i.length;)m=m[i.pop().string];null!=m&&l(m)}else{for(var v=e.state.localVars;v;v=v.next)s(v.name);for(var v=e.state.globalVars;v;v=v.next)s(v.name);r&&!1===r.useGlobalScope||l(g),t(o,s)}return c}var c=e.Pos;e.registerHelper("hint","javascript",o),e.registerHelper("hint","coffeescript",s);var f="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),u="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),h="prototype apply call bind".split(" "),d="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),g="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/autoFormatAll.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){e.defineExtension("autoFormatAll",function(t,n){function i(){c+="\n",u=!0,++f}for(var o=this,r=o.getMode(),s=o.getRange(t,n).split("\n"),a=e.copyState(r,o.getTokenAt(t).state),l=o.getOption("tabSize"),c="",f=0,u=0==t.ch,h=0;hn&&(r+=i(e.substring(n,o[s].start)),n=o[s].start),o[s].start<=n&&o[s].end>=n&&(r+=e.substring(n,o[s].end),n=o[s].end);n")&&"open"==this.tagType){this.tagType="";var c=this.isXML?"[^<]*?":"";return RegExp("^"+c+"","i").test(n)?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(s=this.noBreak,this.noBreak=!1,!s)}if(0==t.indexOf("")&&"close"==this.tagType)return this.tagType="",0==n.indexOf("<")&&(a=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),l=null!=a?a[1].toLowerCase():"",-1==("|"+r+"|").indexOf("|"+l+"|"))?(this.noBreak=!1,!0):(s=this.noBreak,this.noBreak=!1,!s)}return 0==n.indexOf("<")&&(this.noBreak=!1,this.isXML&&""!=this.tagName?(this.tagName="",!1):(a=n.match(/^<\/?\s*?([\w]+?)(\s|>)/i),l=null!=a?a[1].toLowerCase():"",-1==("|"+r+"|").indexOf("|"+l+"|")))}}),e.defineExtension("commentRange",function(t,n,i){var o=this,r=e.innerMode(o.getMode(),o.getTokenAt(n).state).mode;o.operation(function(){if(t)o.replaceRange(r.commentEnd,i),o.replaceRange(r.commentStart,n),o.setSelection(n,{line:i.line,ch:i.ch+r.commentStart.length+r.commentEnd.length}),n.line==i.line&&n.ch==i.ch&&o.setCursor(n.line,n.ch+r.commentStart.length);else{var e=o.getRange(n,i),s=e.indexOf(r.commentStart),a=e.lastIndexOf(r.commentEnd);s>-1&&a>-1&&a>s&&(e=e.substr(0,s)+e.substring(s+r.commentStart.length,a)+e.substr(a+r.commentEnd.length)),o.replaceRange(e,n,i),o.setSelection(n,{line:i.line,ch:i.ch-r.commentStart.length-r.commentEnd.length})}})}),e.defineExtension("autoIndentRange",function(e,t){var n=this;this.operation(function(){for(var i=e.line;i<=t.line;i++)n.indentLine(i,"smart")})}),e.defineExtension("autoFormatRange",function(t,n){function i(){c+="\n",u=!0,++f}for(var o=this,r=o.getMode(),s=o.getRange(t,n).split("\n"),a=e.copyState(r,o.getTokenAt(t).state),l=o.getOption("tabSize"),c="",f=0,u=0==t.ch,h=0;hc);f++){var u=e.getLine(l++);s=null==s?u:s+"\n"+u}a*=2,t.lastIndex=r.ch;var h=t.exec(s);if(h){var d=s.slice(0,h.index).split("\n"),g=h[0].split("\n"),p=r.line+d.length-1,v=d[d.length-1].length;return{from:m(p,v),to:m(p+g.length-1,1==g.length?v+g[0].length:g[g.length-1].length),match:h}}}}function s(e,t){for(var n,i=0;;){t.lastIndex=i;var o=t.exec(e);if(!o)return n;if(n=o,(i=n.index+(n[0].length||1))==e.length)return n}}function a(e,t,i){t=n(t,"g");for(var o=i.line,r=i.ch,a=e.firstLine();o>=a;o--,r=-1){var l=e.getLine(o);r>-1&&(l=l.slice(0,r));var c=s(l,t);if(c)return{from:m(o,c.index),to:m(o,c.index+c[0].length),match:c}}}function l(e,t,i){t=n(t,"gm");for(var o,r=1,a=i.line,l=e.firstLine();a>=l;){for(var c=0;c>1,a=i(e.slice(0,s)).length;if(a==n)return s;a>n?r=s:o=s+1}}function f(e,t,n,i){if(!t.length)return null;var o=i?d:g,r=o(t).split(/\r|\n\r?/);e:for(var s=n.line,a=n.ch,l=e.lastLine()+1-r.length;s<=l;s++,a=0){var f=e.getLine(s).slice(a),u=o(f);if(1==r.length){var h=u.indexOf(r[0]);if(-1==h)continue e;var n=c(f,u,h,o)+a;return{from:m(s,c(f,u,h,o)+a),to:m(s,c(f,u,h+r[0].length,o)+a)}}var p=u.length-r[0].length;if(u.slice(p)==r[0]){for(var v=1;v=l;s--,a=-1){var f=e.getLine(s);a>-1&&(f=f.slice(0,a));var u=o(f);if(1==r.length){var h=u.lastIndexOf(r[0]);if(-1==h)continue e;return{from:m(s,c(f,u,h,o)),to:m(s,c(f,u,h+r[0].length,o))}}var p=r[r.length-1];if(u.slice(0,p.length)==p){for(var v=1,n=s-r.length+1;v0);)i.push({anchor:o.from(),head:o.to()});i.length&&this.setSelections(i,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/scroll/annotatescrollbar",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){function n(e){clearTimeout(i.doRedraw),i.doRedraw=setTimeout(function(){i.redraw()},e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var i=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(i.doUpdate),i.doUpdate=setTimeout(function(){i.computeScale()&&n(20)},100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("change",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)}),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){function t(e,t){return l!=e.line&&(l=e.line,c=n.getLineHandle(l)),c.widgets&&c.widgets.length||s&&c.height>a?n.charCoords(e,"local")[t?"top":"bottom"]:n.heightAtLine(c,"local")+(t?0:c.height)}!1!==e&&this.computeScale();var n=this.cm,i=this.hScale,o=document.createDocumentFragment(),r=this.annotations,s=n.getOption("lineWrapping"),a=s&&1.5*n.defaultTextHeight(),l=null,c=null,f=n.lastLine();if(n.display.barWidth)for(var u,h=0;hf)){for(var g=u||t(d.from,!0)*i,m=t(d.to,!1)*i;hf)&&!((u=t(r[h+1].from,!0)*i)>m+.9);)d=r[++h],m=t(d.to,!1)*i;if(m!=g){var p=Math.max(m-g,3),v=o.appendChild(document.createElement("div"));v.style.cssText="position: absolute; right: 0px; width: "+Math.max(n.display.barWidth-1,2)+"px; top: "+(g+this.buttonHeight)+"px; height: "+p+"px",v.className=this.options.className,d.id&&v.setAttribute("annotation-id",d.id)}}}this.div.textContent="",this.div.appendChild(o)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("change",this.changeHandler),this.div.parentNode.removeChild(this.div)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define("addon/search/matchesonscrollbar",["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,i){this.cm=e,this.options=i;var o={listenForChanges:!1};for(var r in i)o[r]=i[r];o.className||(o.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(o),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var s=this;e.on("change",this.changeHandler=function(e,t){s.onChange(t)})}function n(e,t,n){return e<=t?e:Math.max(t,e+n)}e.defineExtension("showMatchesOnScrollbar",function(e,n,i){return"string"==typeof i&&(i={className:i}),i||(i={}),new t(this,e,n,i)});t.prototype.findMatches=function(){if(this.gap){for(var t=0;t=this.gap.to)break;n.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var i=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),o=this.options&&this.options.maxMatches||1e3;i.findNext();){var n={from:i.from(),to:i.to()};if(n.from.line>=this.gap.to)break;if(this.matches.splice(t++,0,n),this.matches.length>o)break}this.gap=null}},t.prototype.onChange=function(t){var i=t.from.line,o=e.changeEnd(t).line,r=o-t.to.line;if(this.gap?(this.gap.from=Math.min(n(this.gap.from,i,r),t.from.line),this.gap.to=Math.max(n(this.gap.to,i,r),t.from.line)):this.gap={from:t.from.line,to:o+1},r)for(var s=0;s=t.options.minChars&&r(e,h,!1,t.options.style)}})}function l(e,t,n){if(null!==e.getRange(t,n).match(/^\w+$/)){if(t.ch>0){var i={line:t.line,ch:t.ch-1},o=e.getRange(i,t);if(null===o.match(/\W/))return!1}if(n.ch-1?o+t.length:o}var r=t.exec(n?e.slice(n):e);return r?r.index+n+(i?r[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(o,r){if(r.innerActive){var s=r.innerActive,a=o.string;if(!s.close&&o.sol())return r.innerActive=r.inner=null,this.token(o,r);var l=s.close?n(a,s.close,o.pos,s.parseDelimiters):-1;if(l==o.pos&&!s.parseDelimiters)return o.match(s.close),r.innerActive=r.inner=null,s.delimStyle&&s.delimStyle+" "+s.delimStyle+"-close";l>-1&&(o.string=a.slice(0,l));var c=s.mode.token(o,r.inner);return l>-1&&(o.string=a),l==o.pos&&s.parseDelimiters&&(r.innerActive=r.inner=null),s.innerStyle&&(c=c?c+" "+s.innerStyle:s.innerStyle),c}for(var f=1/0,a=o.string,u=0;u
@@ -1 +1 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/search/searchcursor",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e){var n=e.flags;return null!=n?n:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function t(e){return e.global?e:new RegExp(e.source,n(e)+"g")}function o(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function r(e,n,o){n=t(n);for(var r=o.line,i=o.ch,s=e.lastLine();r<=s;r++,i=0){n.lastIndex=i;var c=e.getLine(r),l=n.exec(c);if(l)return{from:g(r,l.index),to:g(r,l.index+l[0].length),match:l}}}function i(e,n,i){if(!o(n))return r(e,n,i);n=t(n);for(var s,c=1,l=i.line,a=e.lastLine();l<=a;){for(var u=0;u=c;r--,i=-1){var l=e.getLine(r);i>-1&&(l=l.slice(0,i));var a=s(l,n);if(a)return{from:g(r,a.index),to:g(r,a.index+a[0].length),match:a}}}function l(e,n,o){n=t(n);for(var r,i=1,c=o.line,l=e.firstLine();c>=l;){for(var a=0;a>1,c=o(e.slice(0,s)).length;if(c==t)return s;c>t?i=s:r=s+1}}function u(e,n,t,o){if(!n.length)return null;var r=o?d:p,i=r(n).split(/\r|\n\r?/);e:for(var s=t.line,c=t.ch,l=e.lastLine()+1-i.length;s<=l;s++,c=0){var u=e.getLine(s).slice(c),f=r(u);if(1==i.length){var h=f.indexOf(i[0]);if(-1==h)continue e;var t=a(u,f,h,r)+c;return{from:g(s,a(u,f,h,r)+c),to:g(s,a(u,f,h+i[0].length,r)+c)}}var m=f.length-i[0].length;if(f.slice(m)==i[0]){for(var v=1;v=l;s--,c=-1){var u=e.getLine(s);c>-1&&(u=u.slice(0,c));var f=r(u);if(1==i.length){var h=f.lastIndexOf(i[0]);if(-1==h)continue e;return{from:g(s,a(u,f,h,r)),to:g(s,a(u,f,h+i[0].length,r))}}var m=i[i.length-1];if(f.slice(0,m.length)==m){for(var v=1,t=s-i.length+1;v0);)o.push({anchor:r.from(),head:r.to()});o.length&&this.setSelections(o,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/dialog/dialog",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function n(e,n,t){var o,r=e.getWrapperElement();return o=r.appendChild(document.createElement("div")),o.className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?o.innerHTML=n:o.appendChild(n),o}function t(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",function(o,r,i){function s(e){if("string"==typeof e)f.value=e;else{if(a)return;a=!0,l.parentNode.removeChild(l),u.focus(),i.onClose&&i.onClose(l)}}i||(i={}),t(this,null);var c,l=n(this,o,i.bottom),a=!1,u=this,f=l.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",function(e){i.onInput(e,f.value,s)}),i.onKeyUp&&e.on(f,"keyup",function(e){i.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(n){i&&i.onKeyDown&&i.onKeyDown(n,f.value,s)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),s()),13==n.keyCode&&r(f.value,n))}),!1!==i.closeOnBlur&&e.on(f,"blur",s)):(c=l.getElementsByTagName("button")[0])&&(e.on(c,"click",function(){s(),u.focus()}),!1!==i.closeOnBlur&&e.on(c,"blur",s),c.focus()),s}),e.defineExtension("openConfirm",function(o,r,i){function s(){a||(a=!0,c.parentNode.removeChild(c),u.focus())}t(this,null);var c=n(this,o,i&&i.bottom),l=c.getElementsByTagName("button"),a=!1,u=this,f=1;l[0].focus();for(var h=0;hn.cursorCoords(t,"window").top&&((u=o).style.opacity=.4)}))};s(n,v,a,h,function(t,r){var i=e.keyName(t),s=n.getOption("extraKeys"),c=s&&s[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==c||"findPrev"==c||"findPersistentNext"==c||"findPersistentPrev"==c?(e.e_stop(t),f(n,o(n),r),n.execCommand(c)):"find"!=c&&"findPersistent"!=c||(e.e_stop(t),h(r,t))}),i&&a&&(f(n,l,a),d(n,t))}else c(n,v,"Search for:",a,function(e){e&&!l.query&&n.operation(function(){f(n,l,e),l.posFrom=l.posTo=n.getCursor(),d(n,t)})})}function d(n,t,r){n.operation(function(){var s=o(n),c=i(n,s.query,t?s.posFrom:s.posTo);(c.find(t)||(c=i(n,s.query,t?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0)),c.find(t)))&&(n.setSelection(c.from(),c.to()),n.scrollIntoView({from:c.from(),to:c.to()},20),s.posFrom=c.from(),s.posTo=c.to(),r&&r(c.from(),c.to()))})}function p(e){e.operation(function(){var n=o(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function g(e,n,t){e.operation(function(){for(var o=i(e,n);o.findNext();)if("string"!=typeof n){var r=e.getRange(o.from(),o.to()).match(n);o.replace(t.replace(/\$(\d)/g,function(e,n){return r[n]}))}else o.replace(t)})}function m(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||o(e).lastQuery,r=''+(n?"Replace all:":"Replace:")+"";c(e,r+y,r,t,function(t){t&&(t=u(t),c(e,x,"Replace with:","",function(o){if(o=a(o),n)g(e,t,o);else{p(e);var r=i(e,t,e.getCursor("from")),s=function(){var n,a=r.from();!(n=r.findNext())&&(r=i(e,t),!(n=r.findNext())||a&&r.from().line==a.line&&r.from().ch==a.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),l(e,C,"Replace?",[function(){c(n)},s,function(){g(e,t,o)}]))},c=function(e){r.replace("string"==typeof t?o:o.replace(/\$(\d)/g,function(n,t){return e[t]})),s()};s()}}))})}}var v='Search: (Use /re/ syntax for regexp search)',y=' (Use /re/ syntax for regexp search)',x='With: ',C='Replace? ';e.commands.find=function(e){p(e),h(e)},e.commands.findPersistent=function(e){p(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=p,e.commands.replace=m,e.commands.replaceAll=function(e){m(e,!0)}}),function(e){"function"==typeof e.define&&e.define("addonSearch",["addon/search/search.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/search/searchcursor",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e){var n=e.flags;return null!=n?n:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function t(e,t){for(var o=n(e),r=o,i=0;ic);u++){var f=e.getLine(l++);s=null==s?f:s+"\n"+f}a*=2,n.lastIndex=i.ch;var h=n.exec(s);if(h){var p=s.slice(0,h.index).split("\n"),d=h[0].split("\n"),m=i.line+p.length-1,v=p[p.length-1].length;return{from:g(m,v),to:g(m+d.length-1,1==d.length?v+d[0].length:d[d.length-1].length),match:h}}}}function s(e,n){for(var t,o=0;;){n.lastIndex=o;var r=n.exec(e);if(!r)return t;if(t=r,(o=t.index+(t[0].length||1))==e.length)return t}}function a(e,n,o){n=t(n,"g");for(var r=o.line,i=o.ch,a=e.firstLine();r>=a;r--,i=-1){var l=e.getLine(r);i>-1&&(l=l.slice(0,i));var c=s(l,n);if(c)return{from:g(r,c.index),to:g(r,c.index+c[0].length),match:c}}}function l(e,n,o){n=t(n,"gm");for(var r,i=1,a=o.line,l=e.firstLine();a>=l;){for(var c=0;c>1,a=o(e.slice(0,s)).length;if(a==t)return s;a>t?i=s:r=s+1}}function u(e,n,t,o){if(!n.length)return null;var r=o?p:d,i=r(n).split(/\r|\n\r?/);e:for(var s=t.line,a=t.ch,l=e.lastLine()+1-i.length;s<=l;s++,a=0){var u=e.getLine(s).slice(a),f=r(u);if(1==i.length){var h=f.indexOf(i[0]);if(-1==h)continue e;var t=c(u,f,h,r)+a;return{from:g(s,c(u,f,h,r)+a),to:g(s,c(u,f,h+i[0].length,r)+a)}}var m=f.length-i[0].length;if(f.slice(m)==i[0]){for(var v=1;v=l;s--,a=-1){var u=e.getLine(s);a>-1&&(u=u.slice(0,a));var f=r(u);if(1==i.length){var h=f.lastIndexOf(i[0]);if(-1==h)continue e;return{from:g(s,c(u,f,h,r)),to:g(s,c(u,f,h+i[0].length,r))}}var m=i[i.length-1];if(f.slice(0,m.length)==m){for(var v=1,t=s-i.length+1;v0);)o.push({anchor:r.from(),head:r.to()});o.length&&this.setSelections(o,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/dialog/dialog",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function n(n,t,o){var r,i=n.getWrapperElement();return r=i.appendChild(document.createElement("div")),r.className=o?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),e.addClass(i,"dialog-opened"),r}function t(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",function(o,r,i){function s(n){if("string"==typeof n)f.value=n;else{if(c)return;c=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),u.focus(),i.onClose&&i.onClose(l)}}i||(i={}),t(this,null);var a,l=n(this,o,i.bottom),c=!1,u=this,f=l.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",function(e){i.onInput(e,f.value,s)}),i.onKeyUp&&e.on(f,"keyup",function(e){i.onKeyUp(e,f.value,s)}),e.on(f,"keydown",function(n){i&&i.onKeyDown&&i.onKeyDown(n,f.value,s)||((27==n.keyCode||!1!==i.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),s()),13==n.keyCode&&r(f.value,n))}),!1!==i.closeOnBlur&&e.on(f,"blur",s)):(a=l.getElementsByTagName("button")[0])&&(e.on(a,"click",function(){s(),u.focus()}),!1!==i.closeOnBlur&&e.on(a,"blur",s),a.focus()),s}),e.defineExtension("openConfirm",function(o,r,i){function s(){c||(c=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),u.focus())}t(this,null);var a=n(this,o,i&&i.bottom),l=a.getElementsByTagName("button"),c=!1,u=this,f=1;l[0].focus();for(var h=0;hn.cursorCoords(t,"window").top&&((u=o).style.opacity=.4)}))};s(n,g(n),c,h,function(t,r){var i=e.keyName(t),s=n.getOption("extraKeys"),a=s&&s[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==a||"findPrev"==a||"findPersistentNext"==a||"findPersistentPrev"==a?(e.e_stop(t),f(n,o(n),r),n.execCommand(a)):"find"!=a&&"findPersistent"!=a||(e.e_stop(t),h(r,t))}),i&&c&&(f(n,l,c),p(n,t))}else a(n,g(n),"Search for:",c,function(e){e&&!l.query&&n.operation(function(){f(n,l,e),l.posFrom=l.posTo=n.getCursor(),p(n,t)})})}function p(n,t,r){n.operation(function(){var s=o(n),a=i(n,s.query,t?s.posFrom:s.posTo);(a.find(t)||(a=i(n,s.query,t?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0)),a.find(t)))&&(n.setSelection(a.from(),a.to()),n.scrollIntoView({from:a.from(),to:a.to()},20),s.posFrom=a.from(),s.posTo=a.to(),r&&r(a.from(),a.to()))})}function d(e){e.operation(function(){var n=o(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function g(e){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function m(e){return' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function v(e){return''+e.phrase("With:")+' '}function y(e){return''+e.phrase("Replace?")+" "}function x(e,n,t){e.operation(function(){for(var o=i(e,n);o.findNext();)if("string"!=typeof n){var r=e.getRange(o.from(),o.to()).match(n);o.replace(t.replace(/\$(\d)/g,function(e,n){return r[n]}))}else o.replace(t)})}function C(e,n){if(!e.getOption("readOnly")){var t=e.getSelection()||o(e).lastQuery,r=''+(n?e.phrase("Replace all:"):e.phrase("Replace:"))+"";a(e,r+m(e),r,t,function(t){t&&(t=u(t),a(e,v(e),e.phrase("Replace with:"),"",function(o){if(o=c(o),n)x(e,t,o);else{d(e);var r=i(e,t,e.getCursor("from")),s=function(){var n,c=r.from();!(n=r.findNext())&&(r=i(e,t),!(n=r.findNext())||c&&r.from().line==c.line&&r.from().ch==c.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),l(e,y(e),e.phrase("Replace?"),[function(){a(n)},s,function(){x(e,t,o)}]))},a=function(e){r.replace("string"==typeof t?o:o.replace(/\$(\d)/g,function(n,t){return e[t]})),s()};s()}}))})}}e.commands.find=function(e){d(e),h(e)},e.commands.findPersistent=function(e){d(e),h(e,!1,!0)},e.commands.findPersistentNext=function(e){h(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){h(e,!0,!0,!0)},e.commands.findNext=h,e.commands.findPrev=function(e){h(e,!0)},e.commands.clearSearch=d,e.commands.replace=C,e.commands.replaceAll=function(e){C(e,!0)}}),function(e){"function"==typeof e.define&&e.define("addonSearch",["addon/search/search.js"],function(){})}(this);
@@ -1,6 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("codemirror.js",t):e.CodeMirror=t()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}function h(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;Xl.length<=e;)Xl.push(g(Xl)+" ");return Xl[e]}function g(e){return e[e.length-1]}function v(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||Yl.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function C(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function S(e){return e.charCodeAt(0)>=768&&_l.test(e)}function L(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function T(e,t,r){var o=this;this.input=r,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var l=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[l],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+Gl+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),ml&&yl<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),bl||dl&&Nl||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,r.init(o)}function M(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?P(r,M(e,r).text.length):V(t,M(e,t.line).text.length)}function V(e,t){var r=e.ch;return null==r||r>t?P(e.line,t):r<0?P(e.line,0):e}function K(e,t){for(var r=[],n=0;n=t:o.to>t);(n||(n=[])).push(new Y(l,o.from,a?null:o.to))}}return n}function Q(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var x=0;x0)){var c=[a,1],f=E(u.from,s.from),d=E(u.to,s.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}function re(e){var t=e.markedSpans;if(t){for(var r=0;r=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?E(u.to,r)>=0:E(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?E(u.from,n)<=0:E(u.from,n)<0)))return!0}}}function fe(e){for(var t;t=ae(e);)e=t.find(-1,!0).line;return e}function he(e){for(var t;t=ue(e);)e=t.find(1,!0).line;return e}function de(e){for(var t,r;t=ue(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function pe(e,t){var r=M(e,t),n=fe(r);return r==n?t:W(n)}function ge(e,t){if(t>e.lastLine())return t;var r,n=M(e,t);if(!ve(e,n))return t;for(;r=ue(n);)n=r.find(1,!0).line;return W(n)+1}function ve(e,t){var r=ql&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function xe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}function Ce(e,t,r){var n;Zl=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Zl=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Zl=i)}return null!=n?n:Zl}function Se(e,t){var r=e.order;return null==r&&(r=e.order=Ql(e.text,t)),r}function Le(e,t){return e._handlers&&e._handlers[t]||Jl}function ke(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=h(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Te(e,t){var r=Le(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function Ae(e){e.prototype.on=function(e,t){es(this,e,t)},e.prototype.off=function(e,t){ke(this,e,t)}}function We(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function He(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fe(e){We(e),De(e)}function Pe(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ol&&e.ctrlKey&&1==t&&(t=3),t}function ze(e){if(null==Rl){var t=n("span","​");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Rl=t.offsetWidth<=1&&t.offsetHeight>2&&!(ml&&yl<8))}var i=Rl?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ie(e){if(null!=Bl)return Bl;var n=r(e,document.createTextNode("AخA")),i=Hl(n,0,1).getBoundingClientRect(),o=Hl(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Bl=o.right-i.right<3)}function Re(e){if(null!=os)return os;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=Hl(t,0,1).getBoundingClientRect();return os=Math.abs(i.left-o.left)>1}function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ls[e]=t}function Ge(e,t){ss[e]=t}function Ue(e){if("string"==typeof e&&ss.hasOwnProperty(e))e=ss[e];else if(e&&"string"==typeof e.name&&ss.hasOwnProperty(e.name)){var t=ss[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=Ue(t);var r=ls[t.name];if(!r)return Ve(e,"text/plain");var n=r(e,t);if(as.hasOwnProperty(t.name)){var i=as[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}function Ke(e,t){c(t,as.hasOwnProperty(e)?as[e]:as[e]={})}function je(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Xe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ye(e,t,r){return!e.startState||e.startState(t,r)}function _e(e,t,r,n){var i=[e.state.modeGen],o={};rt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=0;se&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&je(e.doc.mode,n.state),o=_e(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function qe(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new fs(n,!0,t);var o=nt(e,t,r),l=o>n.first&&M(n,o-1).stateAfter,s=l?fs.fromSaved(n,l,o):new fs(n,Ye(n.mode),o);return n.iter(o,t,function(r){Ze(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function et(e,t,r,n){var i,o=e.doc,l=o.mode;t=U(o,t);var s,a=M(o,t.line),u=qe(e,t.line,r),c=new us(a.text,e.options.tabSize,u);for(n&&(s=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&&Ze(e,t,n,f.pos),f.pos=t.length,a=null):a=tt(Je(r,f,n.state,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;ul;--s){if(s<=o.first)return o.first;var a=M(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof cs?u.lookAhead:0)<=o.modeFrontier))return s;var c=f(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}function it(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=M(e,n).stateAfter;if(i&&(!(i instanceof cs)||n+i.lookAhead1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u));h++);if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function dt(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function pt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,f,h,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=f=s="",h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||le(h.marker,C)<0)&&(h=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!h){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",f,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=st(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Vt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Kt(e,t){t=fe(t);var n=W(t),i=e.display.externalMeasured=new gt(e.doc,t,n);i.lineN=n;var o=i.built=at(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function jt(e,t,r,n){return _t(e,Yt(e,t),r,n)}function Xt(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(o=a-s,i=o-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function Zt(e,t,r,n){
2
- var i,o=$t(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&S(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a<o.coverEnd&&S(t.line.text.charAt(o.coverStart+a));)++a;if(i=ml&&yl<9&&0==s&&a==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():qt(Hl(l,s,a).getClientRects(),n),i.left||i.right||0==s)break;a=s,s-=1,u="right"}ml&&yl<11&&(i=Qt(e.display.measure,i))}else{s>0&&(u=n="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(ml&&yl<9&&!s&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+br(e.display),top:h.top,bottom:h.bottom}:bs}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,m=0;m<v.length-1&&!(g<v[m]);m++);var y=m?v[m-1]:0,b=v[m],w={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=d,w.rbottom=p),w}function Qt(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Re(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Jt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function er(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)Jt(e.display.view[r])}function tr(e){er(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function rr(){return xl&&Ml?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function nr(){return xl&&Ml?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ir(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Ft(e.widgets[r]));return t}function or(e,t,r,n,i){if(!i){var o=ir(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=ye(t);if("local"==n?l+=Et(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:nr());var a=s.left+("window"==n?0:rr());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function lr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=rr(),i-=nr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function sr(e,t,r,n,i){return n||(n=M(e.doc,t.line)),or(e,n,jt(e,n,t.ch,i),r)}function ar(e,t,r,n,i,o){function l(t,l){var s=_t(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,or(e,n,s,r)}function s(e,t,r){var n=a[t],i=1==n.level;return l(r?e-1:e,i!=r)}n=n||M(e.doc,t.line),i||(i=Yt(e,n));var a=Se(n,e.doc.direction),u=t.ch,c=t.sticky;if(u>=n.text.length?(u=n.text.length,c="before"):u<=0&&(u=0,c="after"),!a)return l("before"==c?u-1:u,"before"==c);var f=Ce(a,u,c),h=Zl,d=s(u,f,"before"==c);return null!=h&&(d.other=s(u,h,"before"!=c)),d}function ur(e,t){var r=0;t=U(e.doc,t),e.options.lineWrapping||(r=br(e.display)*t.ch);var n=M(e.doc,t.line),i=ye(n)+Et(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function cr(e,t,r,n,i){var o=P(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function fr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return cr(n.first,0,null,!0,-1);var i=D(n,r),o=n.first+n.size-1;if(i>o)return cr(n.first+n.size-1,M(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=M(n,i);;){var s=gr(e,l,i,t,r),a=ue(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=W(l=u.to.line)}}function hr(e,t,r,n){n-=ir(t);var i=t.text.length,o=k(function(t){return _t(e,r,t-1).bottom<=n},i,0);return i=k(function(t){return _t(e,r,t).top>n},o,i),{begin:o,end:i}}function dr(e,t,r,n){return r||(r=Yt(e,t)),hr(e,t,r,or(e,t,_t(e,r,n),"line").top)}function pr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function gr(e,t,r,n,i){i-=ye(t);var o=Yt(e,t),l=ir(t),s=0,a=t.text.length,u=!0,c=Se(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?mr:vr)(e,t,r,o,c,n,i);u=1!=f.level,s=u?f.from:f.to-1,a=u?f.to:f.from-1}var h,d,p=null,g=null,v=k(function(t){var r=_t(e,o,t);return r.top+=l,r.bottom+=l,!!pr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left<g.right-n,b=y==u;v=p+(b?0:1),d=b?"after":"before",h=y?g.left:g.right}else{u||v!=a&&v!=s||v++,d=0==v?"after":v==t.text.length?"before":_t(e,o,v-(u?1:0)).bottom+l<=i==u?"after":"before";var w=ar(e,P(r,v,d),"line",t,o);h=w.left,m=i<w.top||i>=w.bottom}return v=L(t.text,v,1),cr(r,v,d,m,n-h)}function vr(e,t,r,n,i,o,l){var s=k(function(s){var a=i[s],u=1!=a.level;return pr(ar(e,P(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=ar(e,P(r,u?a.from:a.to,u?"after":"before"),"line",t,n);pr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a}function mr(e,t,r,n,i,o,l){var s=hr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,h=0;h<i.length;h++){var d=i[h];if(!(d.from>=u||d.to<=a)){var p=1!=d.level,g=_t(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=g<o?o-g+1e9:g-o;(!c||f>v)&&(c=d,f=v)}}return c||(c=i[i.length-1]),c.from<a&&(c={from:a,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function yr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ps){ps=n("pre");for(var i=0;i<49;++i)ps.appendChild(document.createTextNode("x")),ps.appendChild(n("br"));ps.appendChild(document.createTextNode("x"))}r(e.measure,ps);var o=ps.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function br(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function wr(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:xr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cr(e){var t=yr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/br(e.display)-3);return function(i){if(ve(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Sr(e){var t=e.doc,r=Cr(e);t.iter(function(e){var t=r(e);t!=e.height&&A(e,t)})}function Lr(e,t,r,n){var i=e.display;if(!r&&"true"==Pe(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var a,u=fr(e,o,l);if(n&&1==u.xRel&&(a=M(e.doc,u.line).text).length==u.ch){var c=f(a,a.length,e.options.tabSize)-a.length;u=P(u.line,Math.max(0,Math.round((o-It(e.display).left)/br(e.display))-c))}return u}function kr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Tr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Mr(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&Nr(e,s.head,i),a||Ar(e,s,o)}}return n}function Nr(e,t,r){var i=ar(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var l=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=i.other.left+"px",l.style.top=i.other.top+"px",l.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Or(e,t){return e.top-t.top||e.left-t.left}function Ar(e,t,r){function i(e,t,r,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),a.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?f-e:r)+"px;\n height: "+(i-t)+"px"))}function o(t,r,n){function o(r,n){return sr(e,P(t,r),"div",d,n)}function l(t,r,n){var i=dr(e,d,null,t),l="ltr"==r==("after"==n)?"left":"right";return o("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),l)[l]}var a,u,d=M(s,t),p=d.text.length,g=Se(d,s.direction);return xe(g,r||0,null==n?p:n,function(e,t,s,d){var v="ltr"==s,m=o(e,v?"left":"right"),y=o(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==p,x=0==d,C=!g||d==g.length-1;if(y.top-m.top<=3){var S=(h?b:w)&&x,L=(h?w:b)&&C,k=S?c:(v?m:y).left,T=L?f:(v?y:m).right;i(k,m.top,T-k,m.bottom)}else{var M,N,O,A;v?(M=h&&b&&x?c:m.left,N=h?f:l(e,s,"before"),O=h?c:l(t,s,"after"),A=h&&w&&C?f:y.right):(M=h?l(e,s,"before"):c,N=!h&&b&&x?f:m.right,O=!h&&w&&C?c:y.left,A=h?l(t,s,"after"):f),i(M,m.top,N-M,m.bottom),m.bottom<y.top&&i(c,m.bottom,null,y.top),i(O,y.top,A-O,y.bottom)}(!a||Or(m,a)<0)&&(a=m),Or(y,a)<0&&(a=y),(!u||Or(m,u)<0)&&(u=m),Or(y,u)<0&&(u=y)}),{start:a,end:u}}var l=e.display,s=e.doc,a=document.createDocumentFragment(),u=It(e.display),c=u.left,f=Math.max(l.sizerWidth,Bt(e)-l.sizer.offsetLeft)-u.right,h="ltr"==s.direction,d=t.from(),p=t.to();if(d.line==p.line)o(d.line,d.ch,p.ch);else{var g=M(s,d.line),v=M(s,p.line),m=fe(g)==fe(v),y=o(d.line,d.ch,m?g.text.length+1:null).end,b=o(p.line,m?0:null,p.ch).start;m&&(y.top<b.top-2?(i(y.right,y.top,null,y.bottom),i(c,b.top,b.left,b.bottom)):i(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&i(c,y.bottom,null,b.top)}r.appendChild(a)}function Wr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Dr(e){e.state.focused||(e.display.input.focus(),Fr(e))}function Hr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Pr(e))},100)}function Fr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Te(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),bl&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wr(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Te(e,"blur",e,t),e.state.focused=!1,El(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Er(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(ml&&yl<8){var l=i.node.offsetTop+i.node.offsetHeight;o=l-r,r=l}else{var s=i.node.getBoundingClientRect();o=s.bottom-s.top}var a=i.line.height-o;if(o<2&&(o=yr(t)),(a>.005||a<-.005)&&(A(i.line,o),zr(i.line),i.rest))for(var u=0;u<i.rest.length;u++)zr(i.rest[u])}}}function zr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function Ir(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Et(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=D(t,n),l=D(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=D(t,ye(M(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=D(t,ye(M(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Rr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=xr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Br(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=F(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),l=o.firstChild.offsetWidth,s=o.offsetWidth-l;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(l,i.lineGutter.offsetWidth-s)+1,i.lineNumWidth=i.lineNumInnerWidth+s,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Dn(e),!0}return!1}function Gr(e,t){if(!Me(e,"scrollCursorIntoView")){var r=e.display,i=r.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!kl){var l=n("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Et(e.display))+"px;\n height: "+(t.bottom-t.top+Rt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(o),e.display.lineSpace.removeChild(l)}}}function Ur(e,t,r,n){null==n&&(n=0);var i;e.options.lineWrapping||t!=r||(t=t.ch?P(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,r="before"==t.sticky?P(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=ar(e,t),a=r&&r!=t?ar(e,r):s;i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n};var u=Kr(e,i),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Zr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Jr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function Vr(e,t){var r=Kr(e,t);null!=r.scrollTop&&Zr(e,r.scrollTop),null!=r.scrollLeft&&Jr(e,r.scrollLeft)}function Kr(e,t){var r=e.display,n=yr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Gt(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+zt(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,h=Bt(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>h;return d&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.left<f?l.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>h+f-3&&(l.scrollLeft=t.right+(d?0:10)-h),l}function jr(e,t){null!=t&&($r(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Xr(e){$r(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yr(e,t,r){null==t&&null==r||$r(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function _r(e,t){$r(e),e.curOp.scrollToPos=t}function $r(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;qr(e,ur(e,t.from),ur(e,t.to),t.margin)}}function qr(e,t,r,n){var i=Kr(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yr(e,i.scrollLeft,i.scrollTop)}function Zr(e,t){Math.abs(e.doc.scrollTop-t)<2||(dl||An(e,{top:t}),Qr(e,t,!0),dl&&An(e),Sn(e,100))}function Qr(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Jr(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Rr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function en(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+zt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Rt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function tn(e,t){t||(t=en(e));var r=e.display.barWidth,n=e.display.barHeight;rn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Er(e),rn(e,en(e)),r=e.display.barWidth,n=e.display.barHeight}function rn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function nn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&El(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Cs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),es(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Jr(e,t):Zr(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function on(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ss},mt(e.curOp)}function ln(e){bt(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;sn(e)})}function sn(e){for(var t=e.ops,r=0;r<t.length;r++)an(t[r]);for(var n=0;n<t.length;n++)un(t[n]);for(var i=0;i<t.length;i++)cn(t[i]);for(var o=0;o<t.length;o++)fn(t[o]);for(var l=0;l<t.length;l++)hn(t[l])}function an(e){var t=e.cm,r=t.display;kn(t),e.updateMaxLine&&we(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ls(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function un(e){e.updatedDisplay=e.mustUpdate&&Nn(e.cm,e.update)}function cn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Er(t),e.barMeasure=en(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=jt(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Rt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Bt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function fn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Jr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==l();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&tn(t,e.barMeasure),e.updatedDisplay&&Hn(t,e.barMeasure),e.selectionChanged&&Wr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Dr(e.cm)}function hn(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&On(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Qr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Jr(t,e.scrollLeft,!0,!0),e.scrollToPos){Gr(t,Ur(t,U(n,e.scrollToPos.from),U(n,e.scrollToPos.to),e.scrollToPos.margin))}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||Te(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&Te(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Te(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function dn(e,t){if(e.curOp)return t();on(e);try{return t()}finally{ln(e)}}function pn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);on(e);try{return t.apply(e,arguments)}finally{ln(e)}}}function gn(e){return function(){if(this.curOp)return e.apply(this,arguments);on(this);try{return e.apply(this,arguments)}finally{ln(this)}}}function vn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);on(t);try{return e.apply(this,arguments)}finally{ln(t)}}}function mn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)ql&&pe(e.doc,t)<i.viewTo&&bn(e);else if(r<=i.viewFrom)ql&&ge(e.doc,r+n)>i.viewFrom?bn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)bn(e);else if(t<=i.viewFrom){var o=wn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):bn(e)}else if(r>=i.viewTo){var l=wn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):bn(e)}else{var s=wn(e,t,t,-1),a=wn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(vt(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):bn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function yn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[kr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==h(l,r)&&l.push(r)}}}function bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function wn(e,t,r,n){var i,o=kr(e,t),l=e.display.view;if(!ql||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;pe(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function xn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=vt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=vt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(kr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(vt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,kr(e,r)))),n.viewTo=r}function Cn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Sn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,u(Ln,e))}function Ln(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=qe(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?je(t.mode,n.state):null,a=_e(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&h<l.length;++h)f=l[h]!=o.styles[h];f&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Ze(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Sn(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&dn(e,function(){for(var t=0;t<i.length;t++)yn(e,i[t],"text")})}}function kn(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Rt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Rt(e)+"px",t.scrollbarsClipped=!0)}function Tn(e){if(e.hasFocus())return null;var t=l();if(!t||!o(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&o(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Mn(e){if(e&&e.activeElt&&e.activeElt!=l()&&(e.activeElt.focus(),e.anchorNode&&o(document.body,e.anchorNode)&&o(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Nn(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return bn(e),!1;if(!r.force&&r.visible.from>=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Cn(e))return!1;Br(e)&&(bn(e),r.dims=wr(e));var o=i.first+i.size,l=Math.max(r.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFrom<l&&l-n.viewFrom<20&&(l=Math.max(i.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(o,n.viewTo)),ql&&(l=pe(e.doc,l),s=ge(e.doc,s));var a=l!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;xn(e,l,s),n.viewOffset=ye(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Cn(e);if(!a&&0==u&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Tn(e);return u>4&&(n.lineDiv.style.display="none"),Wn(e,n.updateLineNumbers,r.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Mn(c),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,Sn(e,400)),n.updateLineNumbers=null,!0}function On(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Bt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+zt(e.display)-Gt(e),r.top)}),t.visible=Ir(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Nn(e,t);n=!1){Er(e);var i=en(e);Tr(e),tn(e,i),Hn(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function An(e,t){var r=new Ls(e,t);if(Nn(e,r)){Er(e),On(e,r);var n=en(e);Tr(e),tn(e,n),Hn(e,n),r.finish()}}function Wn(e,r,n){function i(t){var r=t.nextSibling;return bl&&Ol&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,l=e.options.lineNumbers,s=o.lineDiv,a=s.firstChild,u=o.view,c=o.viewFrom,f=0;f<u.length;f++){var d=u[f];if(d.hidden);else if(d.node&&d.node.parentNode==s){for(;a!=d.node;)a=i(a);var p=l&&null!=r&&r<=c&&d.lineNumber;d.changes&&(h(d.changes,"gutter")>-1&&(p=!1),Ct(e,d,c,n)),p&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(F(e.options,c)))),a=d.node.nextSibling}else{var g=At(e,d,c,n);s.insertBefore(g,a)}c+=d.size}for(;a;)a=i(a)}function Dn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Hn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Rt(e)+"px"}function Fn(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o<i.length;++o){var l=i[o],s=r.appendChild(n("div",null,"CodeMirror-gutter "+l));"CodeMirror-linenumbers"==l&&(e.display.lineGutter=s,s.style.width=(e.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",Dn(e)}function Pn(e){var t=h(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function En(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function zn(e){var t=En(e);return t.x*=Ts,t.y*=Ts,t}function In(e,t){var r=En(t),n=r.x,i=r.y,o=e.display,l=o.scroller,s=l.scrollWidth>l.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&Ol&&bl)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){e.display.currentWheelTarget=u;break e}if(n&&!dl&&!Cl&&null!=Ts)return i&&a&&Zr(e,Math.max(0,l.scrollTop+i*Ts)),Jr(e,Math.max(0,l.scrollLeft+n*Ts)),(!i||i&&a)&&We(t),void(o.wheelStartX=null);if(i&&null!=Ts){var h=i*Ts,d=e.doc.scrollTop,p=d+o.wrapper.clientHeight;h<0?d=Math.max(0,d+h-50):p=Math.min(e.doc.height,p+h+50),An(e,{top:d,bottom:p})}ks<20&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=l.scrollLeft-o.wheelStartX,t=l.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(Ts=(Ts*ks+r)/(ks+1),++ks)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Rn(e,t){var r=e[t];e.sort(function(e,t){return E(e.from(),t.from())}),t=h(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(E(o.to(),i.from())>=0){var l=B(o.from(),i.from()),s=R(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new Ns(a?s:l,a?l:s))}}return new Ms(e,t)}function Bn(e,t){return new Ms([new Ns(e,t||e)],0)}function Gn(e){return e.text?P(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Un(e,t){if(E(e,t.from)<0)return e;if(E(e,t.to)<=0)return Gn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Gn(t).ch-t.to.ch),P(r,n)}function Vn(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new Ns(Un(i.anchor,t),Un(i.head,t)))}return Rn(r,e.sel.primIndex)}function Kn(e,t,r){return e.line==t.line?P(r.line,e.ch-t.ch+r.ch):P(r.line+(e.line-t.line),e.ch)}function jn(e,t,r){for(var n=[],i=P(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Kn(s.from,i,o),u=Kn(Gn(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],f=E(c.head,c.anchor)<0;n[l]=new Ns(f?u:a,f?a:u)}else n[l]=new Ns(a,a)}return new Ms(n,e.sel.primIndex)}function Xn(e){e.doc.mode=Ve(e.options,e.doc.modeOption),Yn(e)}function Yn(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),
3
- e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Sn(e,100),e.state.modeGen++,e.curOp&&mn(e)}function _n(e,t){return 0==t.from.ch&&0==t.to.ch&&""==g(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function $n(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){ot(e,r,i,n),wt(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new ds(u[o],i(o),n));return r}var s=t.from,a=t.to,u=t.text,c=M(e,s.line),f=M(e,a.line),h=g(u),d=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(_n(e,t)){var v=l(0,u.length-1);o(f,f.text,d),p&&e.remove(s.line,p),v.length&&e.insert(s.line,v)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+h+c.text.slice(a.ch),d);else{var m=l(1,u.length-1);m.push(new ds(h+c.text.slice(a.ch),d,n)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,m)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,h+f.text.slice(a.ch),d);var y=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,y)}wt(e,"change",e,t)}function qn(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l<e.linked.length;++l){var s=e.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;r&&!a||(t(s.doc,a),n(s.doc,e,a))}}}n(e,null,!0)}function Zn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Sr(e),Xn(e),Qn(e),e.options.lineWrapping||we(e),e.options.mode=t.modeOption,mn(e)}function Qn(e){("rtl"==e.doc.direction?s:El)(e.display.lineDiv,"CodeMirror-rtl")}function Jn(e){dn(e,function(){Qn(e),mn(e)})}function ei(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ti(e,t){var r={from:I(t.from),to:Gn(t),text:N(e,t.from,t.to)};return ai(e,r,t.from.line,t.to.line+1),qn(e,function(e){return ai(e,r,t.from.line,t.to.line+1)},!0),r}function ri(e){for(;e.length;){if(!g(e).ranges)break;e.pop()}}function ni(e,t){return t?(ri(e.done),g(e.done)):e.done.length&&!g(e.done).ranges?g(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function ii(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ni(i,i.lastOp==n)))l=g(o.changes),0==E(t.from,t.to)&&0==E(t.from,l.to)?l.to=Gn(t):o.changes.push(ti(e,t));else{var a=g(i.done);for(a&&a.ranges||si(e.sel,i.done),o={changes:[ti(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Te(e,"historyAdded")}function oi(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function li(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||oi(e,o,g(i.done),t))?i.done[i.done.length-1]=t:si(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&ri(i.undone)}function si(e,t){var r=g(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ai(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ui(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function ci(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ui(r[i]));return n}function fi(e,t){var r=ci(e,t),n=J(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function hi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?Ms.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&h(t,Number(c[1]))>-1&&(g(s)[f]=u[f],delete u[f])}}}return n}function di(e,t,r,n){if(n){var i=e.anchor;if(r){var o=E(t,i)<0;o!=E(r,i)<0?(i=t,t=r):o!=E(t,r)<0&&(t=r)}return new Ns(i,t)}return new Ns(r||t,t)}function pi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),wi(e,new Ms([di(e.sel.primary(),t,r,i)],0),n)}function gi(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=di(e.sel.ranges[o],t[o],null,i);wi(e,Rn(n,e.sel.primIndex),r)}function vi(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,wi(e,Rn(i,e.sel.primIndex),n)}function mi(e,t,r,n){wi(e,Bn(t,r),n)}function yi(e,t,r){var n={ranges:t.ranges,update:function(t){var r=this;this.ranges=[];for(var n=0;n<t.length;n++)r.ranges[n]=new Ns(U(e,t[n].anchor),U(e,t[n].head))},origin:r&&r.origin};return Te(e,"beforeSelectionChange",e,n),e.cm&&Te(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Rn(n.ranges,n.ranges.length-1):t}function bi(e,t,r){var n=e.history.done,i=g(n);i&&i.ranges?(n[n.length-1]=t,xi(e,t,r)):wi(e,t,r)}function wi(e,t,r){xi(e,t,r),li(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function xi(e,t,r){(Oe(e,"beforeSelectionChange")||e.cm&&Oe(e.cm,"beforeSelectionChange"))&&(t=yi(e,t,r)),Ci(e,Li(e,t,r&&r.bias||(E(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||Xr(e.cm)}function Ci(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Ne(e.cm)),wt(e,"cursorActivity",e))}function Si(e){Ci(e,Li(e,e.sel,null,!1))}function Li(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=Ti(e,l.anchor,s&&s.anchor,r,n),u=Ti(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Ns(a,u))}return i?Rn(i,t.primIndex):t}function ki(e,t,r,n,i){var o=M(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker;if((null==s.from||(a.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(a.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(Te(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=Mi(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=E(u,r))&&(n<0?c<0:c>0))return ki(e,u,t,n,i)}var f=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(f=Mi(e,f,n,f.line==t.line?o:null)),f?ki(e,f,t,n,i):null}}return t}function Ti(e,t,r,n,i){var o=n||1,l=ki(e,t,r,o,i)||!i&&ki(e,t,r,o,!0)||ki(e,t,r,-o,i)||!i&&ki(e,t,r,-o,!0);return l||(e.cantEdit=!0,P(e.first,0))}function Mi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?U(e,P(t.line-1)):null:r>0&&t.ch==(n||M(e,t.line)).text.length?t.line<e.first+e.size-1?P(t.line+1,0):null:new P(t.line,t.ch+r)}function Ni(e){e.setSelection(P(e.firstLine(),0),P(e.lastLine()),Vl)}function Oi(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=U(e,t)),r&&(n.to=U(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),Te(e,"beforeChange",e,n),e.cm&&Te(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ai(e,t,r){if(e.cm){if(!e.cm.curOp)return pn(e.cm,Ai)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"))||(t=Oi(e,t,!0))){var n=$l&&!r&&te(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Wi(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Wi(e,t)}}function Wi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=E(t.from,t.to)){var r=Vn(e,t);ii(e,t,r,e.cm?e.cm.curOp.id:NaN),Fi(e,t,r,J(e,t));var n=[];qn(e,function(e,r){r||-1!=h(n,e.history)||(Ri(e.history,t),n.push(e.history)),Fi(e,t,null,J(e,t))})}}function Di(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a<l.length&&(n=l[a],r?!n.ranges||n.equals(e.sel):n.ranges);a++);if(a!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;n=l.pop(),n.ranges;){if(si(n,s),r&&!n.equals(e.sel))return void wi(e,n,{clearRedo:!1});o=n}var u=[];si(o,s),s.push({changes:u,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var c=Oe(e,"beforeChange")||e.cm&&Oe(e.cm,"beforeChange"),f=n.changes.length-1;f>=0;--f){var d=function(r){var i=n.changes[r];if(i.origin=t,c&&!Oi(e,i,!1))return l.length=0,{};u.push(ti(e,i));var o=r?Vn(e,i):g(l);Fi(e,i,o,fi(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Gn(i)});var s=[];qn(e,function(e,t){t||-1!=h(s,e.history)||(Ri(e.history,i),s.push(e.history)),Fi(e,i,null,fi(e,i))})}(f);if(d)return d.v}}}}function Hi(e,t){if(0!=t&&(e.first+=t,e.sel=new Ms(v(e.sel.ranges,function(e){return new Ns(P(e.anchor.line+t,e.anchor.ch),P(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){mn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)yn(e.cm,n,"gutter")}}function Fi(e,t,r,n){if(e.cm&&!e.cm.curOp)return pn(e.cm,Fi)(e,t,r,n);if(t.to.line<e.first)return void Hi(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Hi(e,i),t={from:P(e.first,0),to:P(t.to.line+i,t.to.ch),text:[g(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:P(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=N(e,t.from,t.to),r||(r=Vn(e,t)),e.cm?Pi(e.cm,t,n):$n(e,t,n),xi(e,r,Vl)}}function Pi(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=W(fe(M(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ne(e),$n(n,t,r,Cr(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),it(n,o.line),Sn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?mn(e):o.line!=l.line||1!=t.text.length||_n(e.doc,t)?mn(e,o.line,l.line+1,u):yn(e,o.line,"text");var c=Oe(e,"changes"),f=Oe(e,"change");if(f||c){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&wt(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Ei(e,t,r,n,i){if(n||(n=r),E(n,r)<0){var o;o=[n,r],r=o[0],n=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Ai(e,{from:r,to:n,text:t,origin:i})}function zi(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Ii(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)zi(o.ranges[s].anchor,t,r,n),zi(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=P(u.from.line+n,u.from.ch),u.to=P(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function Ri(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Ii(e.done,r,n,i),Ii(e.undone,r,n,i)}function Bi(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=M(e,G(e,t)):i=W(t),null==i?null:(n(o,i)&&e.cm&&yn(e.cm,i,r),o)}function Gi(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n<e.length;++n)e[n].parent=t,r+=e[n].height;this.height=r}function Ui(e){var t=this;this.children=e;for(var r=0,n=0,i=0;i<e.length;++i){var o=e[i];r+=o.chunkSize(),n+=o.height,o.parent=t}this.size=r,this.height=n,this.parent=null}function Vi(e,t,r){ye(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&jr(e,r)}function Ki(e,t,r,n){var i=new Os(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Bi(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!ve(e,t)){var n=ye(t)<e.scrollTop;A(t,t.height+Ft(i)),n&&jr(o,i.height),o.curOp.forceUpdate=!0}return!0}),wt(o,"lineWidgetAdded",o,i,"number"==typeof t?t:W(t)),i}function ji(e,t,r,n,o){if(n&&n.shared)return Xi(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return pn(e.cm,ji)(e,t,r,n,o);var l=new Ws(e,o),s=E(t,r);if(n&&c(n,l,!1),s>0||0==s&&!1!==l.clearWhenEmpty)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=i("span",[l.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(ce(e,t.line,t,r,l)||t.line!=r.line&&ce(e,r.line,t,r,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");X()}l.addToHistory&&ii(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,u=t.line,f=e.cm;if(e.iter(u,r.line+1,function(e){f&&l.collapsed&&!f.options.lineWrapping&&fe(e)==f.display.maxLine&&(a=!0),l.collapsed&&u!=t.line&&A(e,0),q(e,new Y(l,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),l.collapsed&&e.iter(t.line,r.line+1,function(t){ve(e,t)&&A(t,0)}),l.clearOnEnter&&es(l,"beforeCursorEnter",function(){return l.clear()}),l.readOnly&&(j(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++As,l.atomic=!0),f){if(a&&(f.curOp.updateMaxLine=!0),l.collapsed)mn(f,t.line,r.line+1);else if(l.className||l.title||l.startStyle||l.endStyle||l.css)for(var h=t.line;h<=r.line;h++)yn(f,h,"text");l.atomic&&Si(f.doc),wt(f,"markerAdded",f,l)}return l}function Xi(e,t,r,n,i){n=c(n),n.shared=!1;var o=[ji(e,t,r,n,i)],l=o[0],s=n.widgetNode;return qn(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(ji(e,U(e,t),U(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=g(o)}),new Ds(o,l)}function Yi(e){return e.findMarks(P(e.first,0),e.clipPos(P(e.lastLine())),function(e){return e.parent})}function _i(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(E(o,l)){var s=ji(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function $i(e){for(var t=0;t<e.length;t++)!function(t){var r=e[t],n=[r.primary.doc];qn(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==h(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}}(t)}function qi(e){var t=this;if(Ji(t),!Me(t,e)&&!Pt(t.display,e)){We(e),ml&&(Ps=+new Date);var r=Lr(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),l=0,s=0;s<i;++s)!function(e,n){if(!t.options.allowDropFileTypes||-1!=h(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=pn(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++l==i){r=U(t.doc,r);var a={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Ai(t.doc,a),bi(t.doc,Bn(r,Gn(a)))}}),s.readAsText(e)}}(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var a=e.dataTransfer.getData("Text");if(a){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),xi(t.doc,Bn(r,r)),u)for(var c=0;c<u.length;++c)Ei(t.doc,"",u[c].anchor,u[c].head,"drag");t.replaceSelection(a,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Zi(e,t){if(ml&&(!e.state.draggingText||+new Date-Ps<100))return void Fe(t);if(!Me(e,t)&&!Pt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Sl)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Cl&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),Cl&&r.parentNode.removeChild(r)}}function Qi(e,t){var i=Lr(e,t);if(i){var o=document.createDocumentFragment();Nr(e,i,o),e.display.dragCursor||(e.display.dragCursor=n("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),r(e.display.dragCursor,o)}}function Ji(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function eo(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function to(){Es||(ro(),Es=!0)}function ro(){var e;es(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,eo(no)},100))}),es(window,"blur",function(){return eo(Pr)})}function no(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function io(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,l=0;l<t.length-1;l++){var s=t[l];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function oo(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=v(r.split(" "),io),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function lo(e,t,r,n){t=co(t);var i=t.call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return lo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=lo(e,t.fallthrough[o],r,n);if(l)return l}}}function so(e){var t="string"==typeof e?e:zs[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function ao(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(Fl?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(Fl?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function uo(e,t){if(Cl&&34==e.keyCode&&e.char)return!1;var r=zs[e.keyCode];return null!=r&&!e.altGraphKey&&ao(r,e,t)}function co(e){return"string"==typeof e?Gs[e]:e}function fo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&E(o.from,g(n).to)<=0;){var l=n.pop();if(E(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}dn(e,function(){for(var t=n.length-1;t>=0;t--)Ei(e.doc,"",n[t].from,n[t].to,"+delete");Xr(e)})}function ho(e,t,r){var n=L(e.text,t+r,r);return n<0||n>e.text.length?null:n}function po(e,t,r){var n=ho(e,t.ch,r);return null==n?null:new P(t.line,n,r<0?"after":"before")}function go(e,t,r,n,i){if(e){var o=Se(r,t.doc.direction);if(o){var l,s=i<0?g(o):o[0],a=i<0==(1==s.level),u=a?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Yt(t,r);l=i<0?r.text.length-1:0;var f=_t(t,c,l).top;l=k(function(e){return _t(t,c,e).top==f},i<0==(1==s.level)?s.from:s.to-1,l),"before"==u&&(l=ho(r,l,1))}else l=i<0?s.to:s.from;return new P(n,l,u)}}return new P(n,i<0?r.text.length:0,i<0?"before":"after")}function vo(e,t,r,n){var i=Se(t,e.doc.direction);if(!i)return po(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return po(t,r,n);var s,a=function(e,r){return ho(t,e instanceof P?e.ch:e,r)},u=function(r){return e.options.lineWrapping?(s=s||Yt(e,t),dr(e,t,s,r)):{begin:0,end:t.text.length}},c=u("before"==r.sticky?a(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var f=1==l.level==n<0,h=a(r,f?1:-1);if(null!=h&&(f?h<=l.to&&h<=c.end:h>=l.from&&h>=c.begin)){var d=f?"before":"after";return new P(r.line,h,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new P(r.line,a(e,1),"before"):new P(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u<l.to)return o(u,s);if(u=s?l.from:a(l.to,-1),n.begin<=u&&u<n.end)return o(u,s)}},g=p(o+n,n,c);if(g)return g;var v=n>0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}function mo(e,t){var r=M(e.doc,t),n=fe(r);return n!=r&&(t=W(n)),go(!0,e,n,t,1)}function yo(e,t){var r=M(e.doc,t),n=he(r);return n!=r&&(t=W(n)),go(!0,e,r,t,-1)}function bo(e,t){var r=mo(e,t.line),n=M(e.doc,r.line),i=Se(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return P(r.line,l?0:o,r.sticky)}return r}function wo(e,t,r){if("string"==typeof t&&!(t=Us[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Ul}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function xo(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=lo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&lo(t,e.options.extraKeys,r,e)||lo(t,e.options.keyMap,r,e)}function Co(e,t,r,n){var i=e.state.keySeq;if(i){if(so(t))return"handled";Vs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=xo(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&wt(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(We(r),Wr(e)),i&&!o&&/\'$/.test(t)?(We(r),!0):!!o}function So(e,t){var r=uo(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+r,t,function(t){return wo(e,t,!0)})||Co(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return wo(e,t)}):Co(e,r,t,function(t){return wo(e,t)}))}function Lo(e,t,r){return Co(e,"'"+r+"'",t,function(t){return wo(e,t,!0)})}function ko(e){var t=this;if(t.curOp.focus=l(),!Me(t,e)){ml&&yl<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=So(t,e);Cl&&(Ks=n?r:null,!n&&88==r&&!is&&(Ol?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||To(t)}}function To(e){function t(e){18!=e.keyCode&&e.altKey||(El(r,"CodeMirror-crosshair"),ke(document,"keyup",t),ke(document,"mouseover",t))}var r=e.display.lineDiv;s(r,"CodeMirror-crosshair"),es(document,"keyup",t),es(document,"mouseover",t)}function Mo(e){16==e.keyCode&&(this.doc.sel.shift=!1),Me(this,e)}function No(e){var t=this;if(!(Pt(t.display,e)||Me(t,e)||e.ctrlKey&&!e.altKey||Ol&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(Cl&&r==Ks)return Ks=null,void We(e);if(!Cl||e.which&&!(e.which<10)||!So(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(Lo(t,e,i)||t.display.input.onKeyPress(e))}}}function Oo(e,t){var r=+new Date;return Ys&&Ys.compare(r,e,t)?(Xs=Ys=null,"triple"):Xs&&Xs.compare(r,e,t)?(Ys=new js(r,e,t),Xs=null,"double"):(Xs=new js(r,e,t),Ys=null,"single")}function Ao(e){var t=this,r=t.display;if(!(Me(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,Pt(r,e))return void(bl||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!Ro(t,e)){var n=Lr(t,e),i=Ee(e),o=n?Oo(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&Wo(t,i,n,o,e)||(1==i?n?Ho(t,n,o,e):Pe(e)==r.scroller&&We(e):2==i?(n&&pi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(Pl?Bo(t,e):Hr(t)))}}}function Wo(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),o=(1==t?"Left":2==t?"Middle":"Right")+o,Co(e,ao(o,i),i,function(t){if("string"==typeof t&&(t=Us[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=Ul}finally{e.state.suppressEdits=!1}return n})}function Do(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=Al?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=Ol?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(Ol?r.altKey:r.ctrlKey)),i}function Ho(e,t,r,n){ml?setTimeout(u(Dr,e),0):e.curOp.focus=l();var i,o=Do(e,r,n),s=e.doc.sel;e.options.dragDrop&&ts&&!e.isReadOnly()&&"single"==r&&(i=s.contains(t))>-1&&(E((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(E(i.to(),t)>0||t.xRel<0)?Fo(e,n,t,o):Eo(e,n,t,o)}function Fo(e,t,r,n){var i=e.display,o=!1,l=pn(e,function(t){bl&&(i.scroller.draggable=!1),e.state.draggingText=!1,ke(document,"mouseup",l),ke(document,"mousemove",s),ke(i.scroller,"dragstart",a),ke(i.scroller,"drop",l),o||(We(t),n.addNew||pi(e.doc,r,null,null,n.extend),bl||ml&&9==yl?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},a=function(){return o=!0};bl&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),es(document,"mouseup",l),es(document,"mousemove",s),es(i.scroller,"dragstart",a),es(i.scroller,"drop",l),Hr(e),setTimeout(function(){return i.input.focus()},20)}function Po(e,t,r){if("char"==r)return new Ns(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new Ns(P(t.line,0),U(e.doc,P(t.line+1,0)));var n=r(e,t);return new Ns(n.from,n.to)}function Eo(e,t,r,n){function i(t){if(0!=E(m,t))if(m=t,"rectangle"==n.unit){for(var i=[],o=e.options.tabSize,l=f(M(u,r.line).text,r.ch,o),s=f(M(u,t.line).text,t.ch,o),a=Math.min(l,s),g=Math.max(l,s),v=Math.min(r.line,t.line),y=Math.min(e.lastLine(),Math.max(r.line,t.line));v<=y;v++){var b=M(u,v).text,w=d(b,a,o);a==g?i.push(new Ns(P(v,w),P(v,w))):b.length>w&&i.push(new Ns(P(v,w),P(v,d(b,g,o))))}i.length||i.push(new Ns(r,r)),wi(u,Rn(p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,C=c,S=Po(e,t,n.unit),L=C.anchor;E(S.anchor,L)>0?(x=S.head,L=B(C.from(),S.anchor)):(x=S.anchor,L=R(C.to(),S.head));var k=p.ranges.slice(0);k[h]=zo(e,new Ns(U(u,L),x)),wi(u,Rn(k,h),Kl)}}function o(t){var r=++b,s=Lr(e,t,!0,"rectangle"==n.unit);if(s)if(0!=E(s,m)){e.curOp.focus=l(),i(s);var c=Ir(a,u);(s.line>=c.to||s.line<c.from)&&setTimeout(pn(e,function(){b==r&&o(t)}),150)}else{var f=t.clientY<y.top?-20:t.clientY>y.bottom?20:0;f&&setTimeout(pn(e,function(){b==r&&(a.scroller.scrollTop+=f,o(t))}),50)}}function s(t){e.state.selectingText=!1,b=1/0,We(t),a.input.focus(),ke(document,"mousemove",w),ke(document,"mouseup",x),u.history.lastSelOrigin=null}var a=e.display,u=e.doc;We(t);var c,h,p=u.sel,g=p.ranges;if(n.addNew&&!n.extend?(h=u.sel.contains(r),c=h>-1?g[h]:new Ns(r,r)):(c=u.sel.primary(),h=u.sel.primIndex),"rectangle"==n.unit)n.addNew||(c=new Ns(r,r)),r=Lr(e,t,!0,!0),h=-1;else{var v=Po(e,r,n.unit);c=n.extend?di(c,v.anchor,v.head,n.extend):v}n.addNew?-1==h?(h=g.length,wi(u,Rn(g.concat([c]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"char"==n.unit&&!n.extend?(wi(u,Rn(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):vi(u,h,c,Kl):(h=0,wi(u,new Ms([c],0),Kl),p=u.sel);var m=r,y=a.wrapper.getBoundingClientRect(),b=0,w=pn(e,function(e){Ee(e)?o(e):s(e)}),x=pn(e,s);e.state.selectingText=x,es(document,"mousemove",w),es(document,"mouseup",x)}function zo(e,t){var r=t.anchor,n=t.head,i=M(e.doc,r.line);if(0==E(r,n)&&r.sticky==n.sticky)return t;var o=Se(i);if(!o)return t;var l=Ce(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==a||a==o.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=Ce(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==s.level?-1:1);u=c==a-1||c==a?f<0:f>0}var h=o[a+(u?-1:0)],d=u==(1==h.level),p=d?h.from:h.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new Ns(new P(r.line,p,g),n)}function Io(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&We(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!Oe(e,r))return He(t);o-=s.top-l.viewOffset;for(var a=0;a<e.options.gutters.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i){return Te(e,r,e,D(e.doc,o),e.options.gutters[a],t),He(t)}}}function Ro(e,t){return Io(e,t,"gutterClick",!0)}function Bo(e,t){Pt(e.display,t)||Go(e,t)||Me(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Go(e,t){return!!Oe(e,"gutterContextMenu")&&Io(e,t,"gutterContextMenu",!1)}function Uo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tr(e)}function Vo(e){Fn(e),mn(e),Rr(e)}function Ko(e,t,r){if(!t!=!(r&&r!=_s)){var n=e.display.dragFunctions,i=t?es:ke;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function jo(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(El(e.display.wrapper,"CodeMirror-wrap"),we(e)),Sr(e),mn(e),tr(e),setTimeout(function(){return tn(e)},100)}function Xo(e,t){var r=this;if(!(this instanceof Xo))return new Xo(e,t);this.options=t=t?c(t):{},c($s,t,!1),Pn(t);var n=t.value;"string"==typeof n&&(n=new Fs(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Xo.inputStyles[t.inputStyle](this),o=this.display=new T(e,n,i);o.wrapper.CodeMirror=this,Fn(this),Uo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Il,keySeq:null,specialChars:null},t.autofocus&&!Nl&&o.input.focus(),ml&&yl<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Yo(this),to(),on(this),this.curOp.forceUpdate=!0,Zn(this,n),t.autofocus&&!Nl||this.hasFocus()?setTimeout(u(Fr,this),20):Pr(this);for(var l in qs)qs.hasOwnProperty(l)&&qs[l](r,t[l],_s);Br(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Zs.length;++s)Zs[s](r);ln(this),bl&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Yo(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),l=i.activeTouch,l.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var i=e.display;es(i.scroller,"mousedown",pn(e,Ao)),ml&&yl<11?es(i.scroller,"dblclick",pn(e,function(t){if(!Me(e,t)){var r=Lr(e,t);if(r&&!Ro(e,t)&&!Pt(e.display,t)){We(t);var n=e.findWordAt(r);pi(e.doc,n.anchor,n.head)}}})):es(i.scroller,"dblclick",function(t){return Me(e,t)||We(t)}),Pl||es(i.scroller,"contextmenu",function(t){return Bo(e,t)});var o,l={end:0};es(i.scroller,"touchstart",function(t){if(!Me(e,t)&&!r(t)&&!Ro(e,t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),es(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),
4
- es(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Pt(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new Ns(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new Ns(P(s.line,0),U(e.doc,P(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),We(r)}t()}),es(i.scroller,"touchcancel",t),es(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Zr(e,i.scroller.scrollTop),Jr(e,i.scroller.scrollLeft,!0),Te(e,"scroll",e))}),es(i.scroller,"mousewheel",function(t){return In(e,t)}),es(i.scroller,"DOMMouseScroll",function(t){return In(e,t)}),es(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Me(e,t)||Fe(t)},over:function(t){Me(e,t)||(Qi(e,t),Fe(t))},start:function(t){return Zi(e,t)},drop:pn(e,qi),leave:function(t){Me(e,t)||Ji(e)}};var s=i.input.getField();es(s,"keyup",function(t){return Mo.call(e,t)}),es(s,"keydown",pn(e,ko)),es(s,"keypress",pn(e,No)),es(s,"focus",function(t){return Fr(e,t)}),es(s,"blur",function(t){return Pr(e,t)})}function _o(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=qe(e,t).state:r="prev");var l=e.options.tabSize,s=M(o,t),a=f(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==Ul||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?f(M(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",d=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/l);g;--g)d+=l,h+="\t";if(d<u&&(h+=p(u-d)),h!=c)return Ei(o,h,P(t,0),P(t,c.length),"+input"),s.stateAfter=null,!0;for(var v=0;v<o.sel.ranges.length;v++){var m=o.sel.ranges[v];if(m.head.line==t&&m.head.ch<c.length){var y=P(t,c.length);vi(o,v,new Ns(y,y));break}}}function $o(e){Qs=e}function qo(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l=e.state.pasteIncoming||"paste"==i,s=rs(t),a=null;if(l&&n.ranges.length>1)if(Qs&&Qs.text.join("\n")==t){if(n.ranges.length%Qs.text.length==0){a=[];for(var u=0;u<Qs.text.length;u++)a.push(o.splitLines(Qs.text[u]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(a=v(s,function(e){return[e]}));for(var c,f=n.ranges.length-1;f>=0;f--){var h=n.ranges[f],d=h.from(),p=h.to();h.empty()&&(r&&r>0?d=P(d.line,d.ch-r):e.state.overwrite&&!l?p=P(p.line,Math.min(M(o,p.line).text.length,p.ch+g(s).length)):Qs&&Qs.lineWise&&Qs.text.join("\n")==t&&(d=p=P(d.line,0))),c=e.curOp.updateInput;var m={from:d,to:p,text:a?a[f%a.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};Ai(e.doc,m),wt(e,"inputRead",e,m)}t&&!l&&Qo(e,t),Xr(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Zo(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||dn(t,function(){return qo(t,r,0,null,"paste")}),!0}function Qo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=_o(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=_o(e,i.head.line,"smart"));l&&wt(e,"electricInput",e,i.head.line)}}}function Jo(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:P(i,0),head:P(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function el(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function tl(){var e=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=n("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return bl?e.style.width="1000px":e.setAttribute("wrap","off"),Tl&&(e.style.border="1px solid black"),el(e),t}function rl(e,t,r,n,i){function o(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new P(n,t.ch,t.sticky),u=M(e,n))}function l(n){var l;if(null==(l=i?vo(e.cm,u,t,r):po(u,t,r))){if(n||!o())return!1;t=go(i,e.cm,u,t.line,r)}else t=l;return!0}var s=t,a=r,u=M(e,t.line);if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||l(!d);d=!1){var p=u.text.charAt(t.ch)||"\n",g=x(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||g||(g="s"),c&&c!=g){r<0&&(r=1,l(),t.sticky="after");break}if(g&&(c=g),r>0&&!l(!d))break}var v=Ti(e,t,s,a,!0);return z(s,v)&&(v.hitSide=!0),v}function nl(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),a=Math.max(s-.5*yr(e.display),3);i=(r>0?t.bottom:t.top)+r*a}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var u;u=fr(e,l,i),u.outside;){if(r<0?i<=0:i>=o.height){u.hitSide=!0;break}i+=5*r}return u}function il(e,t){var r=Xt(e,t.line);if(!r||r.hidden)return null;var n=M(e.doc,t.line),i=Vt(r,n,t.line),o=Se(n,e.doc.direction),l="left";if(o){l=Ce(o,t.ch)%2?"right":"left"}var s=$t(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function ol(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ll(e,t){return t&&(e.bad=!0),e}function sl(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function l(){c&&(u+=f,c=!1)}function s(e){e&&(l(),u+=e)}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void s(r||t.textContent.replace(/\u200b/g,""));var u,h=t.getAttribute("cm-marker");if(h){var d=e.findMarks(P(n,0),P(i+1,0),o(+h));return void(d.length&&(u=d[0].find(0))&&s(N(e.doc,u.from,u.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&l();for(var g=0;g<t.childNodes.length;g++)a(t.childNodes[g]);p&&(c=!0)}else 3==t.nodeType&&s(t.nodeValue)}for(var u="",c=!1,f=e.doc.lineSeparator();a(t),t!=r;)t=t.nextSibling;return u}function al(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return ll(e.clipPos(P(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return ul(o,t,r)}}function ul(e,t,r){function n(t,r,n){for(var i=-1;i<(f?f.length:0);i++)for(var o=i<0?c.map:f[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var a=W(i<0?e.line:e.rest[i]),u=o[l]+n;return(n<0||s!=t)&&(u=o[l+(n?1:0)]),P(a,u)}}}var i=e.text.firstChild,l=!1;if(!t||!o(i,t))return ll(P(W(e.line),0),!0);if(t==i&&(l=!0,t=i.childNodes[r],r=0,!t)){var s=e.rest?g(e.rest):e.line;return ll(P(W(s),s.text.length),l)}var a=3==t.nodeType?t:null,u=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));u.parentNode!=i;)u=u.parentNode;var c=e.measure,f=c.maps,h=n(a,u,r);if(h)return ll(h,l);for(var d=u.nextSibling,p=a?a.nodeValue.length-r:0;d;d=d.nextSibling){if(h=n(d,d.firstChild,0))return ll(P(h.line,h.ch-p),l);p+=d.textContent.length}for(var v=u.previousSibling,m=r;v;v=v.previousSibling){if(h=n(v,v.firstChild,-1))return ll(P(h.line,h.ch+m),l);m+=v.textContent.length}}function cl(e,t){function r(){e.value=a.getValue()}if(t=t?c(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=l();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}var i;if(e.form&&(es(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var s=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=s}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(ke(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var a=Xo(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}var fl=navigator.userAgent,hl=navigator.platform,dl=/gecko\/\d/i.test(fl),pl=/MSIE \d/.test(fl),gl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fl),vl=/Edge\/(\d+)/.exec(fl),ml=pl||gl||vl,yl=ml&&(pl?document.documentMode||6:+(vl||gl)[1]),bl=!vl&&/WebKit\//.test(fl),wl=bl&&/Qt\/\d+\.\d+/.test(fl),xl=!vl&&/Chrome\//.test(fl),Cl=/Opera\//.test(fl),Sl=/Apple Computer/.test(navigator.vendor),Ll=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(fl),kl=/PhantomJS/.test(fl),Tl=!vl&&/AppleWebKit/.test(fl)&&/Mobile\/\w+/.test(fl),Ml=/Android/.test(fl),Nl=Tl||Ml||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(fl),Ol=Tl||/Mac/.test(hl),Al=/\bCrOS\b/.test(fl),Wl=/win/i.test(hl),Dl=Cl&&fl.match(/Version\/(\d*\.\d*)/);Dl&&(Dl=Number(Dl[1])),Dl&&Dl>=15&&(Cl=!1,bl=!0);var Hl,Fl=Ol&&(wl||Cl&&(null==Dl||Dl<12.11)),Pl=dl||ml&&yl>=9,El=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};Hl=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var zl=function(e){e.select()};Tl?zl=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ml&&(zl=function(e){try{e.select()}catch(e){}});var Il=function(){this.id=null};Il.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Rl,Bl,Gl=30,Ul={toString:function(){return"CodeMirror.Pass"}},Vl={scroll:!1},Kl={origin:"*mouse"},jl={origin:"+move"},Xl=[""],Yl=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,_l=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,$l=!1,ql=!1,Zl=null,Ql=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;return function(r,n){var u="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var c=r.length,f=[],h=0;h<c;++h)f.push(e(r.charCodeAt(h)));for(var d=0,p=u;d<c;++d){var v=f[d];"m"==v?f[d]=p:p=v}for(var m=0,y=u;m<c;++m){var b=f[m];"1"==b&&"r"==y?f[m]="n":l.test(b)&&(y=b,"r"==b&&(f[m]="R"))}for(var w=1,x=f[0];w<c-1;++w){var C=f[w];"+"==C&&"1"==x&&"1"==f[w+1]?f[w]="1":","!=C||x!=f[w+1]||"1"!=x&&"n"!=x||(f[w]=x),x=C}for(var S=0;S<c;++S){var L=f[S];if(","==L)f[S]="N";else if("%"==L){var k=void 0;for(k=S+1;k<c&&"%"==f[k];++k);for(var T=S&&"!"==f[S-1]||k<c&&"1"==f[k]?"1":"N",M=S;M<k;++M)f[M]=T;S=k-1}}for(var N=0,O=u;N<c;++N){var A=f[N];"L"==O&&"1"==A?f[N]="L":l.test(A)&&(O=A)}for(var W=0;W<c;++W)if(o.test(f[W])){var D=void 0;for(D=W+1;D<c&&o.test(f[D]);++D);for(var H="L"==(W?f[W-1]:u),F="L"==(D<c?f[D]:u),P=H==F?H?"L":"R":u,E=W;E<D;++E)f[E]=P;W=D-1}for(var z,I=[],R=0;R<c;)if(s.test(f[R])){var B=R;for(++R;R<c&&s.test(f[R]);++R);I.push(new t(0,B,R))}else{var G=R,U=I.length;for(++R;R<c&&"L"!=f[R];++R);for(var V=G;V<R;)if(a.test(f[V])){G<V&&I.splice(U,0,new t(1,G,V));var K=V;for(++V;V<R&&a.test(f[V]);++V);I.splice(U,0,new t(2,K,V)),G=V}else++V;G<R&&I.splice(U,0,new t(1,G,R))}return"ltr"==n&&(1==I[0].level&&(z=r.match(/^\s+/))&&(I[0].from=z[0].length,I.unshift(new t(0,0,z[0].length))),1==g(I).level&&(z=r.match(/\s+$/))&&(g(I).to-=z[0].length,I.push(new t(0,c-z[0].length,c)))),"rtl"==n?I.reverse():I}}(),Jl=[],es=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Jl).concat(r)}},ts=function(){if(ml&&yl<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),rs=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},ns=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},is=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),os=null,ls={},ss={},as={},us=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};us.prototype.eol=function(){return this.pos>=this.string.length},us.prototype.sol=function(){return this.pos==this.lineStart},us.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},us.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},us.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},us.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},us.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},us.prototype.skipToEnd=function(){this.pos=this.string.length},us.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},us.prototype.backUp=function(e){this.pos-=e},us.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=f(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},us.prototype.indentation=function(){return f(this.string,null,this.tabSize)-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},us.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},us.prototype.current=function(){return this.string.slice(this.start,this.pos)},us.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},us.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},us.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var cs=function(e,t){this.state=e,this.lookAhead=t},fs=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};fs.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},fs.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},fs.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fs.fromSaved=function(e,t,r){return t instanceof cs?new fs(e,je(e.mode,t.state),r,t.lookAhead):new fs(e,je(e.mode,t),r)},fs.prototype.save=function(e){var t=!1!==e?je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new cs(t,this.maxLookAhead):t};var hs=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r},ds=function(e,t,r){this.text=e,ne(this,t),this.height=r?r(this):1};ds.prototype.lineNo=function(){return W(this)},Ae(ds);var ps,gs={},vs={},ms=null,ys=null,bs={left:0,right:0,top:0,bottom:0},ws=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),es(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),es(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ml&&yl<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ws.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},ws.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ws.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ws.prototype.zeroWidthHack=function(){var e=Ol&&!Ll?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Il,this.disableVert=new Il},ws.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},ws.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xs=function(){};xs.prototype.update=function(){return{bottom:0,right:0}},xs.prototype.setScrollLeft=function(){},xs.prototype.setScrollTop=function(){},xs.prototype.clear=function(){};var Cs={native:ws,null:xs},Ss=0,Ls=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ir(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Bt(e),this.force=r,this.dims=wr(e),this.events=[]};Ls.prototype.signal=function(e,t){Oe(e,t)&&this.events.push(arguments)},Ls.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Te.apply(null,e.events[t])};var ks=0,Ts=null;ml?Ts=-.53:dl?Ts=15:xl?Ts=-.7:Sl&&(Ts=-1/3);var Ms=function(e,t){this.ranges=e,this.primIndex=t};Ms.prototype.primary=function(){return this.ranges[this.primIndex]},Ms.prototype.equals=function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var n=t.ranges[r],i=e.ranges[r];if(!z(n.anchor,i.anchor)||!z(n.head,i.head))return!1}return!0},Ms.prototype.deepCopy=function(){for(var e=this,t=[],r=0;r<this.ranges.length;r++)t[r]=new Ns(I(e.ranges[r].anchor),I(e.ranges[r].head));return new Ms(t,this.primIndex)},Ms.prototype.somethingSelected=function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},Ms.prototype.contains=function(e,t){var r=this;t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=r.ranges[n];if(E(t,i.from())>=0&&E(e,i.to())<=0)return n}return-1};var Ns=function(e,t){this.anchor=e,this.head=t};Ns.prototype.from=function(){return B(this.anchor,this.head)},Ns.prototype.to=function(){return R(this.anchor,this.head)},Ns.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Gi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n<i;++n){var o=r.lines[n];r.height-=o.height,lt(o),wt(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){var n=this;this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=n},iterN:function(e,t,r){for(var n=this,i=e+t;e<i;++e)if(r(n.lines[e]))return!0}},Ui.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var r=this;this.size-=t;for(var n=0;n<this.children.length;++n){var i=r.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e),s=i.height;if(i.removeInner(e,l),r.height-=s-i.height,o==l&&(r.children.splice(n--,1),i.parent=null),0==(t-=l))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Gi))){var a=[];this.collapse(a),this.children=[new Gi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r<this.children.length;++r)t.children[r].collapse(e)},insertInner:function(e,t,r){var n=this;this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var o=n.children[i],l=o.chunkSize();if(e<=l){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var s=o.lines.length%25+25,a=s;a<o.lines.length;){var u=new Gi(o.lines.slice(a,a+=25));o.height-=u.height,n.children.splice(++i,0,u),u.parent=n}o.lines=o.lines.slice(0,s),n.maybeSpill()}break}e-=l}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new Ui(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=h(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new Ui(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;i<this.children.length;++i){var o=n.children[i],l=o.chunkSize();if(e<l){var s=Math.min(t,l-e);if(o.iterN(e,s,r))return!0;if(0==(t-=s))break;e=0}else e-=l}}};var Os=function(e,t,r){var n=this;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);this.doc=e,this.node=t};Os.prototype.clear=function(){var e=this,t=this.doc.cm,r=this.line.widgets,n=this.line,i=W(n);if(null!=i&&r){for(var o=0;o<r.length;++o)r[o]==e&&r.splice(o--,1);r.length||(n.widgets=null);var l=Ft(this);A(n,Math.max(0,n.height-l)),t&&(dn(t,function(){Vi(t,n,-l),yn(t,i,"widget")}),wt(t,"lineWidgetCleared",t,this,i))}},Os.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Ft(this)-t;i&&(A(n,n.height+i),r&&dn(r,function(){r.curOp.forceUpdate=!0,Vi(r,n,i),wt(r,"lineWidgetChanged",r,e,W(n))}))},Ae(Os);var As=0,Ws=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++As};Ws.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&on(t),Oe(this,"clear")){var n=this.find();n&&wt(this,"clear",n.from,n.to)}for(var i=null,o=null,l=0;l<this.lines.length;++l){var s=e.lines[l],a=_(s.markedSpans,e);t&&!e.collapsed?yn(t,W(s),"text"):t&&(null!=a.to&&(o=W(s)),null!=a.from&&(i=W(s))),s.markedSpans=$(s.markedSpans,a),null==a.from&&e.collapsed&&!ve(e.doc,s)&&t&&A(s,yr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=fe(e.lines[u]),f=be(c);f>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&mn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Si(t.doc)),t&&wt(t,"markerCleared",t,this,i,o),r&&ln(t),this.parent&&this.parent.clear()}},Ws.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o<this.lines.length;++o){var l=r.lines[o],s=_(l.markedSpans,r);if(null!=s.from&&(n=P(t?l:W(l),s.from),-1==e))return n;if(null!=s.to&&(i=P(t?l:W(l),s.to),1==e))return i}return n&&{from:n,to:i}},Ws.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&dn(n,function(){var i=t.line,o=W(t.line),l=Xt(n,o);if(l&&(Jt(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!ve(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var a=Ft(r)-s;a&&A(i,i.height+a)}wt(n,"markerChanged",n,e)})},Ws.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=h(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ws.prototype.detachLine=function(e){if(this.lines.splice(h(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ae(Ws);var Ds=function(e,t){var r=this;this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=r};Ds.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();wt(this,"clear")}},Ds.prototype.find=function(e,t){return this.primary.find(e,t)},Ae(Ds);var Hs=0,Fs=function(e,t,r,n,i){if(!(this instanceof Fs))return new Fs(e,t,r,n,i);null==r&&(r=0),Ui.call(this,[new Gi([new ds("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=P(r,0);this.sel=Bn(o),this.history=new ei(null),this.id=++Hs,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),$n(this,{from:o,to:o,text:e}),wi(this,Bn(o),Vl)};Fs.prototype=b(Ui.prototype,{constructor:Fs,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=O(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:vn(function(e){var t=P(this.first,0),r=this.first+this.size-1;Ai(this,{from:t,to:P(r,M(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yr(this.cm,0,0),wi(this,Bn(t),Vl)}),replaceRange:function(e,t,r,n){t=U(this,t),r=r?U(this,r):t,Ei(this,e,t,r,n)},getRange:function(e,t,r){var n=N(this,U(this,e),U(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(H(this,e))return M(this,e)},getLineNumber:function(e){return W(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=M(this,e)),fe(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return U(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:vn(function(e,t,r){mi(this,U(this,"number"==typeof e?P(e,t||0):e),null,r)}),setSelection:vn(function(e,t,r){mi(this,U(this,e),U(this,t||e),r)}),extendSelection:vn(function(e,t,r){pi(this,U(this,e),t&&U(this,t),r)}),extendSelections:vn(function(e,t){gi(this,K(this,e),t)}),extendSelectionsBy:vn(function(e,t){gi(this,K(this,v(this.sel.ranges,e)),t)}),setSelections:vn(function(e,t,r){var n=this;if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new Ns(U(n,e[o].anchor),U(n,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),wi(this,Rn(i,t),r)}}),addSelection:vn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Ns(U(this,e),U(this,t||e))),wi(this,Rn(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this,n=this.sel.ranges,i=0;i<n.length;i++){var o=N(r,n[i].from(),n[i].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,r=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=N(t,n[i].from(),n[i].to());!1!==e&&(o=o.join(e||t.lineSeparator())),r[i]=o}return r},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:vn(function(e,t,r){for(var n=this,i=[],o=this.sel,l=0;l<o.ranges.length;l++){var s=o.ranges[l];i[l]={from:s.from(),to:s.to(),text:n.splitLines(e[l]),origin:r}}for(var a=t&&"end"!=t&&jn(this,i,t),u=i.length-1;u>=0;u--)Ai(n,i[u]);a?bi(this,a):this.cm&&Xr(this.cm)}),undo:vn(function(){Di(this,"undo")}),redo:vn(function(){Di(this,"redo")}),undoSelection:vn(function(){Di(this,"undo",!0)}),redoSelection:vn(function(){Di(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new ei(this.history.maxGeneration)},
5
- markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:hi(this.history.done),undone:hi(this.history.undone)}},setHistory:function(e){var t=this.history=new ei(this.history.maxGeneration);t.done=hi(e.done.slice(0),null,!0),t.undone=hi(e.undone.slice(0),null,!0)},setGutterMarker:vn(function(e,t,r){return Bi(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&C(n)&&(e.gutterMarkers=null),!0})}),clearGutter:vn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&Bi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,C(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!H(this,e))return null;if(t=e,!(e=M(this,e)))return null}else if(null==(t=W(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:vn(function(t,r,n){return Bi(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[i]){if(e(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:vn(function(t,r,n){return Bi(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==n)t[i]=null;else{var l=o.match(e(n));if(!l)return!1;var s=l.index+l[0].length;t[i]=o.slice(0,l.index)+(l.index&&s!=o.length?" ":"")+o.slice(s)||null}return!0})}),addLineWidget:vn(function(e,t,r){return Ki(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ji(this,U(this,e),U(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=U(this,e),ji(this,e,e,r,"bookmark")},findMarksAt:function(e){e=U(this,e);var t=[],r=M(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=U(this,e),t=U(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),U(this,P(r,t))},indexFromPos:function(e){e=U(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new Fs(O(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Fs(O(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],_i(n,Yi(this)),n},unlinkDoc:function(e){var t=this;if(e instanceof Xo&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=t.linked[r];if(n.doc==e){t.linked.splice(r,1),e.unlinkDoc(t),$i(Yi(t));break}}if(e.history==this.history){var i=[e.id];qn(e,function(e){return i.push(e.id)},!0),e.history=new ei(null),e.history.done=hi(this.history.done,i),e.history.undone=hi(this.history.undone,i)}},iterLinkedDocs:function(e){qn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):rs(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:vn(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Jn(this.cm))})}),Fs.prototype.eachLine=Fs.prototype.iter;for(var Ps=0,Es=!1,zs={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Is=0;Is<10;Is++)zs[Is+48]=zs[Is+96]=String(Is);for(var Rs=65;Rs<=90;Rs++)zs[Rs]=String.fromCharCode(Rs);for(var Bs=1;Bs<=12;Bs++)zs[Bs+111]=zs[Bs+63235]="F"+Bs;var Gs={};Gs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Gs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Gs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Gs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Gs.default=Ol?Gs.macDefault:Gs.pcDefault;var Us={selectAll:Ni,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Vl)},killLine:function(e){return fo(e,function(t){if(t.empty()){var r=M(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:P(t.head.line+1,0)}:{from:t.head,to:P(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return fo(e,function(t){return{from:P(t.from().line,0),to:U(e.doc,P(t.to().line+1,0))}})},delLineLeft:function(e){return fo(e,function(e){return{from:P(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return fo(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return fo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(P(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(P(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return mo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return bo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return yo(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},jl)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},jl)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?bo(e,t.head):n},jl)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=f(e.getLine(o.line),o.ch,n);t.push(p(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return dn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=M(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new P(i.line,i.ch-1)),i.ch>0)i=new P(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),P(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=M(e.doc,i.line-1).text;l&&(i=new P(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),P(i.line-1,l.length-1),i,"+transpose"))}r.push(new Ns(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return dn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Xr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},Vs=new Il,Ks=null,js=function(e,t,r){this.time=e,this.pos=t,this.button=r};js.prototype.compare=function(e,t,r){return this.time+400>e&&0==E(t,this.pos)&&r==this.button};var Xs,Ys,_s={toString:function(){return"CodeMirror.Init"}},$s={},qs={};Xo.defaults=$s,Xo.optionHandlers=qs;var Zs=[];Xo.defineInitHook=function(e){return Zs.push(e)};var Qs=null,Js=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Il,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Js.prototype.init=function(e){function t(e){if(!Me(i,e)){if(i.somethingSelected())$o({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Jo(i);$o({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Vl),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Qs.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var l=tl(),s=l.firstChild;i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Qs.text.join("\n");var a=document.activeElement;zl(s),setTimeout(function(){i.display.lineSpace.removeChild(l),a.focus(),a==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=e.lineDiv;el(o,i.options.spellcheck),es(o,"paste",function(e){Me(i,e)||Zo(e,i)||yl<=11&&setTimeout(pn(i,function(){return r.updateFromDOM()}),20)}),es(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),es(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),es(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),es(o,"touchstart",function(){return n.forceCompositionEnd()}),es(o,"input",function(){r.composing||r.readFromDOMSoon()}),es(o,"copy",t),es(o,"cut",t)},Js.prototype.prepareSelection=function(){var e=Mr(this.cm,!1);return e.focus=this.cm.state.focused,e},Js.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Js.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)return void e.removeAllRanges();var o=al(t,e.anchorNode,e.anchorOffset),l=al(t,e.focusNode,e.focusOffset);if(!o||o.bad||!l||l.bad||0!=E(B(o,l),n)||0!=E(R(o,l),i)){var s=t.display.view,a=n.line>=t.display.viewFrom&&il(t,n)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&il(t,i);if(!u){var c=s[s.length-1].measure,f=c.maps?c.maps[c.maps.length-1]:c.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!a||!u)return void e.removeAllRanges();var h,d=e.rangeCount&&e.getRangeAt(0);try{h=Hl(a.node,a.offset,u.offset,u.node)}catch(e){}h&&(!dl&&t.state.focused?(e.collapse(a.node,a.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),d&&null==e.anchorNode?e.addRange(d):dl&&this.startGracePeriod()),this.rememberSelection()}},Js.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Js.prototype.showMultipleSelections=function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},Js.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Js.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},Js.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Js.prototype.blur=function(){this.div.blur()},Js.prototype.getField=function(){return this.div},Js.prototype.supportsTouch=function(){return!0},Js.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():dn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},Js.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Js.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(Ml&&xl&&this.cm.options.gutters.length&&ol(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=al(t,e.anchorNode,e.anchorOffset),n=al(t,e.focusNode,e.focusOffset);r&&n&&dn(t,function(){wi(t.doc,Bn(r,n),Vl),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Js.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(0==n.ch&&n.line>e.firstLine()&&(n=P(n.line-1,M(e.doc,n.line-1).length)),i.ch==M(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=P(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,l,s;n.line==t.viewFrom||0==(o=kr(e,n.line))?(l=W(t.view[0].line),s=t.view[0].node):(l=W(t.view[o].line),s=t.view[o-1].node.nextSibling);var a,u,c=kr(e,i.line);if(c==t.view.length-1?(a=t.viewTo-1,u=t.lineDiv.lastChild):(a=W(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(sl(e,s,u,l,a)),h=N(e.doc,P(l,0),P(a,M(e.doc,a).text.length));f.length>1&&h.length>1;)if(g(f)==g(h))f.pop(),h.pop(),a--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),l++}for(var d=0,p=0,v=f[0],m=h[0],y=Math.min(v.length,m.length);d<y&&v.charCodeAt(d)==m.charCodeAt(d);)++d;for(var b=g(f),w=g(h),x=Math.min(b.length-(1==f.length?d:0),w.length-(1==h.length?d:0));p<x&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)++p;if(1==f.length&&1==h.length&&l==n.line)for(;d&&d>n.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var C=P(l,d),S=P(a,h.length?g(h).length-p:0);return f.length>1||f[0]||E(C,S)?(Ei(e.doc,f,C,S,"+input"),!0):void 0},Js.prototype.ensurePolled=function(){this.forceCompositionEnd()},Js.prototype.reset=function(){this.forceCompositionEnd()},Js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Js.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Js.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||dn(this.cm,function(){return mn(e.cm)})},Js.prototype.setUneditable=function(e){e.contentEditable="false"},Js.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||pn(this.cm,qo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Js.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Js.prototype.onContextMenu=function(){},Js.prototype.resetPosition=function(){},Js.prototype.needsContentAttribute=!0;var ea=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Il,this.hasSelection=!1,this.composing=null};ea.prototype.init=function(e){function t(e){if(!Me(i,e)){if(i.somethingSelected())$o({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Jo(i);$o({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Vl):(n.prevInput="",l.value=t.text.join("\n"),zl(l))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=tl(),l=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Tl&&(l.style.width="0px"),es(l,"input",function(){ml&&yl>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),es(l,"paste",function(e){Me(i,e)||Zo(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),es(l,"cut",t),es(l,"copy",t),es(e.scroller,"paste",function(t){Pt(e,t)||Me(i,t)||(i.state.pasteIncoming=!0,n.focus())}),es(e.lineSpace,"selectstart",function(t){Pt(e,t)||We(t)}),es(l,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),es(l,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},ea.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Mr(e);if(e.options.moveInputWithCursor){var i=ar(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},ea.prototype.showSelection=function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ea.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&zl(this.textarea),ml&&yl>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",ml&&yl>=9&&(this.hasSelection=null))}},ea.prototype.getField=function(){return this.textarea},ea.prototype.supportsTouch=function(){return!1},ea.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Nl||l()!=this.textarea))try{this.textarea.focus()}catch(e){}},ea.prototype.blur=function(){this.textarea.blur()},ea.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ea.prototype.receivedFocus=function(){this.slowPoll()},ea.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ea.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},ea.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ns(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(ml&&yl>=9&&this.hasSelection===i||Ol&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l<s&&n.charCodeAt(l)==i.charCodeAt(l);)++l;return dn(t,function(){qo(t,i.slice(l),n.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ea.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ea.prototype.onKeyPress=function(){ml&&yl>=9&&(this.hasSelection=null),this.fastPoll()},ea.prototype.onContextMenu=function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=c,l.style.cssText=u,ml&&yl<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!ml||ml&&yl<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?pn(i,Ni)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=Lr(i,e),a=o.scroller.scrollTop;if(s&&!Cl){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&pn(i,wi)(i.doc,Bn(s),Vl);var u=l.style.cssText,c=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(ml?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(bl&&(h=window.scrollY),o.input.focus(),bl&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ml&&yl>=9&&t(),Pl){Fe(e);var d=function(){ke(window,"mouseup",d),setTimeout(r,20)};es(window,"mouseup",d)}else setTimeout(r,50)}},ea.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},ea.prototype.setUneditable=function(){},ea.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=_s&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=_s,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Xn(e)},!0),t("indentUnit",2,Xn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Yn(e),tr(e),mn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(P(n,o))}n++});for(var i=r.length-1;i>=0;i--)Ei(e.doc,t,r[i],P(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=_s&&e.refresh()}),t("specialCharPlaceholder",ut,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Nl?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Wl),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Uo(e),Vo(e)},!0),t("keyMap","default",function(e,t,r){var n=co(t),i=r!=_s&&co(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,jo,!0),t("gutters",[],function(e){Pn(e.options),Vo(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return tn(e)},!0),t("scrollbarStyle","native",function(e){nn(e),tn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Pn(e.options),Vo(e)},!0),t("firstLineNumber",1,Vo,!0),t("lineNumberFormatter",function(e){return e},Vo,!0),t("showCursorWhenSelecting",!1,Tr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Pr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Ko),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tr,!0),t("singleCursorHeightPerLine",!0,Tr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Yn,!0),t("addModeClass",!1,Yn,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Yn,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Xo),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&pn(this,t[e])(this,r,i),Te(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](co(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:gn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");m(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,mn(this)}),removeOverlay:gn(function(e){for(var t=this,r=this.state.overlays,n=0;n<r.length;++n){var i=r[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return r.splice(n,1),t.state.modeGen++,void mn(t)}}),indentLine:gn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),H(this.doc,e)&&_o(this,e,t,r)}),indentSelection:gn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(_o(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Xr(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u<n;++u)_o(t,u,e);var c=t.doc.sel.ranges;0==l.ch&&r.length==c.length&&c[i].from().ch>0&&vi(t.doc,i,new Ns(l,c[i].to()),Vl)}}}),getTokenAt:function(e,t){return et(this,e,t)},getLineTokens:function(e,t){return et(this,P(e),t,!0)},getTokenTypeAt:function(e){e=U(this.doc,e);var t,r=$e(this,M(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=this,i=[];if(!r.hasOwnProperty(t))return i;var o=r[t],l=this.getModeAt(e);if("string"==typeof l[t])o[l[t]]&&i.push(o[l[t]]);else if(l[t])for(var s=0;s<l[t].length;s++){var a=o[l[t][s]];a&&i.push(a)}else l.helperType&&o[l.helperType]?i.push(o[l.helperType]):o[l.name]&&i.push(o[l.name]);for(var u=0;u<o._global.length;u++){var c=o._global[u];c.pred(l,n)&&-1==h(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(e,t){var r=this.doc;return e=G(r,null==e?r.first+r.size-1:e),qe(this,e+1,t).state},cursorCoords:function(e,t){var r,n=this.doc.sel.primary()
6
- ;return r=null==e?n.head:"object"==typeof e?U(this.doc,e):e?n.from():n.to(),ar(this,r,t||"page")},charCoords:function(e,t){return sr(this,U(this.doc,e),t||"page")},coordsChar:function(e,t){return e=lr(this,e,t||"page"),fr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=lr(this,{top:e,left:0},t||"page").top,D(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=M(this.doc,e)}else n=e;return or(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ye(n):0)},defaultTextHeight:function(){return yr(this.display)},defaultCharWidth:function(){return br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=ar(this,U(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&Vr(this,{left:s,top:l,right:s+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:gn(ko),triggerOnKeyPress:gn(No),triggerOnKeyUp:Mo,triggerOnMouseDown:gn(Ao),execCommand:function(e){if(Us.hasOwnProperty(e))return Us[e].call(null,this)},triggerElectric:gn(function(e){Qo(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var l=U(this.doc,e),s=0;s<t&&(l=rl(i.doc,l,o,r,n),!l.hitSide);++s);return l},moveH:gn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?rl(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},jl)}),deleteH:gn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):fo(this,function(r){var i=rl(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=this,o=1,l=n;t<0&&(o=-1,t=-t);for(var s=U(this.doc,e),a=0;a<t;++a){var u=ar(i,s,"div");if(null==l?l=u.left:u.left=l,s=nl(i,u,o,r),s.hitSide)break}return s},moveV:gn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var s=ar(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=nl(r,s,e,t);return"page"==t&&l==n.sel.primary()&&jr(r,sr(r,a,"div").top-s.top),a},jl),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=this.doc,r=M(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=r.length||!n?++i:--n;for(var l=r.charAt(n),s=x(l,o)?function(e){return x(e,o)}:/\s/.test(l)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!x(e)};n>0&&s(r.charAt(n-1));)--n;for(;i<r.length&&s(r.charAt(i));)++i}return new Ns(P(e.line,n),P(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?s(this.display.cursorDiv,"CodeMirror-overwrite"):El(this.display.cursorDiv,"CodeMirror-overwrite"),Te(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==l()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:gn(function(e,t){Yr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Rt(this)-this.display.barHeight,width:e.scrollWidth-Rt(this)-this.display.barWidth,clientHeight:Gt(this),clientWidth:Bt(this)}},scrollIntoView:gn(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:P(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?_r(this,e):qr(this,e.from,e.to,e.margin)}),setSize:gn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&er(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){yn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Te(this,"refresh",this)}),operation:function(e){return dn(this,e)},startOperation:function(){return on(this)},endOperation:function(){return ln(this)},refresh:gn(function(){var e=this.display.cachedTextHeight;mn(this),this.curOp.forceUpdate=!0,tr(this),Yr(this,this.doc.scrollLeft,this.doc.scrollTop),Dn(this),(null==e||Math.abs(e-yr(this.display))>.5)&&Sr(this),Te(this,"refresh",this)}),swapDoc:gn(function(e){var t=this.doc;return t.cm=null,Zn(this,e),tr(this),this.display.input.reset(),Yr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wt(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ae(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Xo);var ta="iter insert remove copy getEditor constructor".split(" ");for(var ra in Fs.prototype)Fs.prototype.hasOwnProperty(ra)&&h(ta,ra)<0&&(Xo.prototype[ra]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fs.prototype[ra]));return Ae(Fs),Xo.inputStyles={textarea:ea,contenteditable:Js},Xo.defineMode=function(e){Xo.defaults.mode||"null"==e||(Xo.defaults.mode=e),Be.apply(this,arguments)},Xo.defineMIME=Ge,Xo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Xo.defineMIME("text/plain","null"),Xo.defineExtension=function(e,t){Xo.prototype[e]=t},Xo.defineDocExtension=function(e,t){Fs.prototype[e]=t},Xo.fromTextArea=cl,function(e){e.off=ke,e.on=es,e.wheelEventPixels=zn,e.Doc=Fs,e.splitLines=rs,e.countColumn=f,e.findColumn=d,e.isWordChar=w,e.Pass=Ul,e.signal=Te,e.Line=ds,e.changeEnd=Gn,e.scrollbarModel=Cs,e.Pos=P,e.cmpPos=E,e.modes=ls,e.mimeModes=ss,e.resolveMode=Ue,e.getMode=Ve,e.modeExtensions=as,e.extendMode=Ke,e.copyState=je,e.startState=Ye,e.innerMode=Xe,e.commands=Us,e.keyMap=Gs,e.keyName=uo,e.isModifierKey=so,e.lookupKey=lo,e.normalizeKeyMap=oo,e.StringStream=us,e.SharedTextMarker=Ds,e.TextMarker=Ws,e.LineWidget=Os,e.e_preventDefault=We,e.e_stopPropagation=De,e.e_stop=Fe,e.addClass=s,e.contains=o,e.rmClass=El,e.keyNames=zs}(Xo),Xo.version="5.31.0",Xo}),function(e){"function"==typeof e.define&&e.define("core",["codemirror.js"],function(t){e.CodeMirror=t})}(this);
1
+ (function(b,a){typeof exports==="object"&&typeof module!=="undefined"?module.exports=a():typeof define==="function"&&define.amd?define("codemirror.js",a):(b.CodeMirror=a())}(this,(function(){var ez=navigator.userAgent;var eK=navigator.platform;var cP=/gecko\/\d/i.test(ez);var fs=/MSIE \d/.test(ez);var b3=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ez);var c3=/Edge\/(\d+)/.exec(ez);var ef=fs||b3||c3;var n=ef&&(fs?document.documentMode||6:+(c3||b3)[1]);var dt=!c3&&/WebKit\//.test(ez);var ei=dt&&/Qt\/\d+\.\d+/.test(ez);var dJ=!c3&&/Chrome\//.test(ez);var eB=/Opera\//.test(ez);var aM=/Apple Computer/.test(navigator.vendor);var dB=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ez);var ge=/PhantomJS/.test(ez);var fM=!c3&&/AppleWebKit/.test(ez)&&/Mobile\/\w+/.test(ez);var aX=/Android/.test(ez);var eQ=fM||aX||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ez);var ct=fM||/Mac/.test(eK);var gx=/\bCrOS\b/.test(ez);var a0=/win/i.test(eK);var ba=eB&&ez.match(/Version\/(\d*\.\d*)/);if(ba){ba=Number(ba[1])}if(ba&&ba>=15){eB=false;dt=true}var cb=ct&&(ei||eB&&(ba==null||ba<12.11));var g9=cP||(ef&&n>=9);function X(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var h=function(hl,i){var hm=hl.className;var hk=X(i).exec(hm);if(hk){var hn=hm.slice(hk.index+hk[0].length);hl.className=hm.slice(0,hk.index)+(hn?hk[1]+hn:"")}};function eA(hk){for(var i=hk.childNodes.length;i>0;--i){hk.removeChild(hk.firstChild)}return hk}function cd(i,hk){return eA(i).appendChild(hk)}function g0(hk,ho,hn,hm){var hp=document.createElement(hk);if(hn){hp.className=hn}if(hm){hp.style.cssText=hm}if(typeof ho=="string"){hp.appendChild(document.createTextNode(ho))}else{if(ho){for(var hl=0;hl=hl){return hr+(hl-ho)}hr+=hk-ho;hr+=hp-(hr%hp);ho=hk+1}}var hj=function(){this.id=null};hj.prototype.set=function(i,hk){clearTimeout(this.id);this.id=setTimeout(hk,i)};function dP(hm,hk){for(var hl=0;hl=hm){return hp+Math.min(i,hm-hl)}hl+=hk-hp;hl+=ho-(hl%ho);hp=hk+1;if(hl>=hm){return hp}}}var bb=[""];function cQ(i){while(bb.length<=i){bb.push(gt(bb)+" ")}return bb[i]}function gt(i){return i[i.length-1]}function ce(hn,hm){var hk=[];for(var hl=0;hl"\x80"&&(i.toUpperCase()!=i.toLowerCase()||bo.test(i))}function c1(i,hk){if(!hk){return gq(i)}if(hk.source.indexOf("\\w")>-1&&gq(i)){return true}return hk.test(i)}function fE(i){for(var hk in i){if(i.hasOwnProperty(hk)&&i[hk]){return false}}return true}var fr=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function f9(i){return i.charCodeAt(0)>=768&&fr.test(i)}function eU(hk,hl,i){while((i<0?hl>0:hlhn?-1:1;for(;;){if(ho==hn){return ho}var hm=(ho+hn)/2,hk=hl<0?Math.ceil(hm):Math.floor(hm);if(hk==ho){return i(hk)?ho:hn}if(i(hk)){hn=hk}else{ho=hk+hl}}}function eE(hk,hq,hp,ho){if(!hk){return ho(hq,hp,"ltr",0)}var hn=false;for(var hm=0;hmhq||hq==hp&&hl.to==hq){ho(Math.max(hl.from,hq),Math.min(hl.to,hp),hl.level==1?"rtl":"ltr",hm);hn=true}}if(!hn){ho(hq,hp,"ltr")}}var fO=null;function aR(hk,hm,ho){var hn;fO=null;for(var hl=0;hlhm){return hl}if(hp.to==hm){if(hp.from!=hp.to&&ho=="before"){hn=hl}else{fO=hl}}if(hp.from==hm){if(hp.from!=hp.to&&ho!="before"){hn=hl}else{fO=hl}}}return hn!=null?hn:fO}var bu=(function(){var hp="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var hn="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function hm(hs){if(hs<=247){return hp.charAt(hs)}else{if(1424<=hs&&hs<=1524){return"R"}else{if(1536<=hs&&hs<=1785){return hn.charAt(hs-1536)}else{if(1774<=hs&&hs<=2220){return"r"}else{if(8192<=hs&&hs<=8203){return"w"}else{if(hs==8204){return"b"}else{return"L"}}}}}}}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var hr=/[stwN]/,hl=/[LRr]/,hk=/[Lb1n]/,ho=/[1n]/;function hq(hu,ht,hs){this.level=hu;this.from=ht;this.to=hs}return function(hP,hv){var hE=hv=="ltr"?"L":"R";if(hP.length==0||hv=="ltr"&&!i.test(hP)){return false}var hy=hP.length,hY=[];for(var h1=0;h1-1){hm[hl]=i.slice(0,hk).concat(i.slice(hk+1))}}}}}function aN(ho,hn){var hk=eW(ho,hn);if(!hk.length){return}var hl=Array.prototype.slice.call(arguments,2);for(var hm=0;hm0}function bS(i){i.prototype.on=function(hk,hl){ci(this,hk,hl)};i.prototype.off=function(hk,hl){eP(this,hk,hl)}}function c7(i){if(i.preventDefault){i.preventDefault()}else{i.returnValue=false}}function dX(i){if(i.stopPropagation){i.stopPropagation()}else{i.cancelBubble=true}}function b5(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==false}function e3(i){c7(i);dX(i)}function Q(i){return i.target||i.srcElement}function gE(hk){var i=hk.which;if(i==null){if(hk.button&1){i=1}else{if(hk.button&2){i=3}else{if(hk.button&4){i=2}}}}if(ct&&hk.ctrlKey&&i==1){i=3}return i}var ft=function(){if(ef&&n<9){return false}var i=g0("div");return"draggable" in i||"dragDrop" in i}();var gC;function bE(i){if(gC==null){var hl=g0("span","\u200b");cd(i,g0("span",[hl,document.createTextNode("x")]));if(i.firstChild.offsetHeight!=0){gC=hl.offsetWidth<=1&&hl.offsetHeight>2&&!(ef&&n<8)}}var hk=gC?g0("span","\u200b"):g0("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");hk.setAttribute("cm-text","");return hk}var gD;function b8(hm){if(gD!=null){return gD}var i=cd(hm,document.createTextNode("A\u062eA"));var hl=cM(i,0,1).getBoundingClientRect();var hk=cM(i,1,2).getBoundingClientRect();eA(hm);if(!hl||hl.left==hl.right){return false}return gD=(hk.right-hl.right<3)}var gJ="\n\nb".split(/\n/).length!=3?function(ho){var hp=0,i=[],hn=ho.length;while(hp<=hn){var hm=ho.indexOf("\n",hp);if(hm==-1){hm=ho.length}var hl=ho.slice(hp,ho.charAt(hm-1)=="\r"?hm-1:hm);var hk=hl.indexOf("\r");if(hk!=-1){i.push(hl.slice(0,hk));hp+=hk+1}else{i.push(hl);hp=hm+1}}return i}:function(i){return i.split(/\r\n?|\n/)};var bK=window.getSelection?function(hk){try{return hk.selectionStart!=hk.selectionEnd}catch(i){return false}}:function(hl){var hk;try{hk=hl.ownerDocument.selection.createRange()}catch(i){}if(!hk||hk.parentElement()!=hl){return false}return hk.compareEndPoints("StartToEnd",hk)!=0};var dG=(function(){var i=g0("div");if("oncopy" in i){return true}i.setAttribute("oncopy","return;");return typeof i.oncopy=="function"})();var fS=null;function aV(hk){if(fS!=null){return fS}var hl=cd(hk,g0("span","x"));var hm=hl.getBoundingClientRect();var i=cM(hl,0,1).getBoundingClientRect();return fS=Math.abs(hm.left-i.left)>1}var dZ={},a3={};function e6(i,hk){if(arguments.length>2){hk.dependencies=Array.prototype.slice.call(arguments,2)}dZ[i]=hk}function bD(hk,i){a3[hk]=i}function hb(i){if(typeof i=="string"&&a3.hasOwnProperty(i)){i=a3[i]}else{if(i&&typeof i.name=="string"&&a3.hasOwnProperty(i.name)){var hk=a3[i.name];if(typeof hk=="string"){hk={name:hk}}i=cK(hk,i);i.name=hk.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i)){return hb("application/xml")}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i)){return hb("application/json")}}}}if(typeof i=="string"){return{name:i}}else{return i||{name:"null"}}}function gm(hl,hk){hk=hb(hk);var hn=dZ[hk.name];if(!hn){return gm(hl,"text/plain")}var ho=hn(hl,hk);if(dW.hasOwnProperty(hk.name)){var hm=dW[hk.name];for(var hp in hm){if(!hm.hasOwnProperty(hp)){continue}if(ho.hasOwnProperty(hp)){ho["_"+hp]=ho[hp]}ho[hp]=hm[hp]}}ho.name=hk.name;if(hk.helperType){ho.helperType=hk.helperType}if(hk.modeProps){for(var i in hk.modeProps){ho[i]=hk.modeProps[i]}}return ho}var dW={};function fj(hl,hk){var i=dW.hasOwnProperty(hl)?dW[hl]:(dW[hl]={});aY(hk,i)}function cp(hm,i){if(i===true){return i}if(hm.copyState){return hm.copyState(i)}var hl={};for(var hn in i){var hk=i[hn];if(hk instanceof Array){hk=hk.concat([])}hl[hn]=hk}return hl}function g7(hl,i){var hk;while(hl.innerMode){hk=hl.innerMode(i);if(!hk||hk.mode==hl){break}i=hk.state;hl=hk.mode}return hk||{mode:hl,state:i}}function cm(hl,hk,i){return hl.startState?hl.startState(hk,i):true}var fD=function(i,hl,hk){this.pos=this.start=0;this.string=i;this.tabSize=hl||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0;this.lineOracle=hk};fD.prototype.eol=function(){return this.pos>=this.string.length};fD.prototype.sol=function(){return this.pos==this.lineStart};fD.prototype.peek=function(){return this.string.charAt(this.pos)||undefined};fD.prototype.next=function(){if(this.poshk};fD.prototype.eatSpace=function(){var hk=this;var i=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++hk.pos}return this.pos>i};fD.prototype.skipToEnd=function(){this.pos=this.string.length};fD.prototype.skipTo=function(i){var hk=this.string.indexOf(i,this.pos);if(hk>-1){this.pos=hk;return true}};fD.prototype.backUp=function(i){this.pos-=i};fD.prototype.column=function(){if(this.lastColumnPos0){return null}if(hl&&hk!==false){this.pos+=hl[0].length}return hl}};fD.prototype.current=function(){return this.string.slice(this.start,this.pos)};fD.prototype.hideFirstChars=function(hk,i){this.lineStart+=hk;try{return i()}finally{this.lineStart-=hk}};fD.prototype.lookAhead=function(hk){var i=this.lineOracle;return i&&i.lookAhead(hk)};fD.prototype.baseToken=function(){var i=this.lineOracle;return i&&i.baseToken(this.pos)};function f0(hn,hp){hp-=hn.first;if(hp<0||hp>=hn.size){throw new Error("There is no line "+(hp+hn.first)+" in the document.")}var hk=hn;while(!hk.lines){for(var hl=0;;++hl){var ho=hk.children[hl],hm=ho.chunkSize();if(hp=hk.first&&ii){return ab(i,f0(hk,i).text.length)}return gc(hl,f0(hk,hl.line).text.length)}function gc(hl,hk){var i=hl.ch;if(i==null||i>hk){return ab(hl.line,hk)}else{if(i<0){return ab(hl.line,0)}else{return hl}}}function ey(hm,hn){var hk=[];for(var hl=0;hlthis.maxLookAhead){this.maxLookAhead=hk}return i};af.prototype.baseToken=function(hl){var hk=this;if(!this.baseTokens){return null}while(this.baseTokens[this.baseTokenPos]<=hl){hk.baseTokenPos+=2}var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-hl}};af.prototype.nextLine=function(){this.line++;if(this.maxLookAhead>0){this.maxLookAhead--}};af.fromSaved=function(hl,hk,i){if(hk instanceof aP){return new af(hl,cp(hl.mode,hk.state),i,hk.lookAhead)}else{return new af(hl,cp(hl.mode,hk),i)}};af.prototype.save=function(hk){var i=hk!==false?cp(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new aP(i,this.maxLookAhead):i};function gk(hp,hr,hk,hn){var hq=[hp.state.modeGen],hm={};y(hp,hr.text,hp.doc.mode,hk,function(hs,ht){return hq.push(hs,ht)},hm,hn);var i=hk.state;var ho=function(hv){hk.baseTokens=hq;var ht=hp.state.overlays[hv],hu=1,hs=0;hk.state=true;y(hp,hr.text,ht.mode,hk,function(hw,hy){var hA=hu;while(hshw){hq.splice(hu,1,hw,hq[hu+1],hx)}hu+=2;hs=Math.min(hw,hx)}if(!hy){return}if(ht.opaque){hq.splice(hA,hu-hA,hw,"overlay "+hy);hu=hA+2}else{for(;hAhk.options.maxHighlightLength&&cp(hk.doc.mode,hn.state);var i=gk(hk,hm,hn);if(hl){hn.state=hl}hm.stateAfter=hn.save(!hl);hm.styles=i.styles;if(i.classes){hm.styleClasses=i.classes}else{if(hm.styleClasses){hm.styleClasses=null}}if(ho===hk.doc.highlightFrontier){hk.doc.modeFrontier=Math.max(hk.doc.modeFrontier,++hk.doc.highlightFrontier)}}return hm.styles}function fH(i,hq,hk){var ho=i.doc,hn=i.display;if(!ho.mode.startState){return new af(ho,true,hq)}var hp=cZ(i,hq,hk);var hm=hp>ho.first&&f0(ho,hp-1).stateAfter;var hl=hm?af.fromSaved(ho,hm,hp):new af(ho,cm(ho.mode),hp);ho.iter(hp,hq,function(hr){d3(i,hr.text,hl);var hs=hl.line;hr.stateAfter=hs==hq-1||hs%5==0||hs>=hn.viewFrom&&hsho.start){return hm}}throw new Error("Mode "+hp.name+" failed to advance stream.")}var dF=function(hl,i,hk){this.start=hl.start;this.end=hl.pos;this.string=hl.current();this.type=i||null;this.state=hk};function cR(hr,hp,hm,hl){var hq=hr.doc,hn=hq.mode,i;hp=gy(hq,hp);var ht=f0(hq,hp.line),hk=fH(hr,hp.line,hm);var hs=new fD(ht.text,hr.options.tabSize,hk),ho;if(hl){ho=[]}while((hl||hs.posht.options.maxHighlightLength){hk=false;if(hn){d3(ht,hv,hl,hu.pos)}hu.pos=hv.length;i=null}else{i=dQ(fh(ho,hu,hl.state,hx),hm)}if(hx){var hw=hx[0].name;if(hw){i="m-"+(i?hw+" "+i:hw)}}if(!hk||hq!=i){while(hrhm;--ht){if(ht<=hp.first){return hp.first}var hs=f0(hp,ht-1),i=hs.stateAfter;if(i&&(!hn||ht+(i instanceof aP?i.lookAhead:0)<=hp.modeFrontier)){return ht}var hr=cc(hs.text,null,hq.options.tabSize);if(ho==null||hl>hr){ho=ht-1;hl=hr}}return ho}function hd(hl,hn){hl.modeFrontier=Math.min(hl.modeFrontier,hn);if(hl.highlightFrontierhm;i--){var hk=f0(hl,i).stateAfter;if(hk&&(!(hk instanceof aP)||i+hk.lookAhead=hm:hs.to>hm);(hr||(hr=[])).push(new eT(hp,hs.from,hn?null:hs.to))}}}return hr}function aK(hl,hn,hq){var hr;if(hl){for(var ho=0;ho=hn:hs.to>hn);if(hm||hs.from==hn&&hp.type=="bookmark"&&(!hq||hs.marker.insertLeft)){var hk=hs.from==null||(hp.inclusiveLeft?hs.from<=hn:hs.from0&&hr){for(var ho=0;ho0){continue}var ht=[hn,1],hk=cD(hl.from,hm.from),hs=cD(hl.to,hm.to);if(hk<0||!hr.inclusiveLeft&&!hk){ht.push({from:hl.from,to:hm.from})}if(hs>0||!hr.inclusiveRight&&!hs){ht.push({from:hm.to,to:hl.to})}hp.splice.apply(hp,ht);hn+=ht.length-3}}return hp}function g8(hk){var hm=hk.markedSpans;if(!hm){return}for(var hl=0;hlhn)&&(!hp||en(hp,ho.marker)<0)){hp=ho.marker}}}return hp}function B(hs,hk,hq,hr,ho){var hv=f0(hs,hk);var hl=bj&&hv.markedSpans;if(hl){for(var hn=0;hn=0&&hp<=0||ht<=0&&hp>=0){continue}if(ht<=0&&(hm.marker.inclusiveRight&&ho.inclusiveLeft?cD(hu.to,hq)>=0:cD(hu.to,hq)>0)||ht>=0&&(hm.marker.inclusiveRight&&ho.inclusiveLeft?cD(hu.from,hr)<=0:cD(hu.from,hr)<0)){return true}}}}function A(hk){var i;while(i=fy(hk)){hk=i.find(-1,true).line}return hk}function cJ(hk){var i;while(i=e9(hk)){hk=i.find(1,true).line}return hk}function g(hl){var i,hk;while(i=e9(hl)){hl=i.find(1,true).line;(hk||(hk=[])).push(hl)}return hk}function a7(hm,hk){var i=f0(hm,hk),hl=A(i);if(i==hl){return hk}return b7(hl)}function eC(hm,hl){if(hl>hm.lastLine()){return hl}var hk=f0(hm,hl),i;if(!gg(hm,hk)){return hl}while(i=e9(hk)){hk=i.find(1,true).line}return b7(hk)+1}function gg(ho,hl){var hk=bj&&hl.markedSpans;if(hk){for(var hn=(void 0),hm=0;hmhl.maxLineLength){hl.maxLineLength=hm;hl.maxLine=hn}})}var g4=function(hl,hk,i){this.text=hl;dw(this,hk);this.height=i?i(this):1};g4.prototype.lineNo=function(){return b7(this)};bS(g4);function eZ(hk,hn,hl,i){hk.text=hn;if(hk.stateAfter){hk.stateAfter=null}if(hk.styles){hk.styles=null}if(hk.order!=null){hk.order=null}g8(hk);dw(hk,hl);var hm=i?i(hk):1;if(hm!=hk.height){g5(hk,hm)}}function bU(i){i.parent=null;g8(i)}var et={},co={};function fG(hl,hk){if(!hl||/^\s*$/.test(hl)){return null}var i=hk.addModeClass?co:et;return i[hl]||(i[hl]=hl.replace(/\S+/g,"cm-$&"))}function fB(hq,hp){var ho=g6("span",null,null,dt?"padding-right: .1px":null);var hn={pre:g6("pre",[ho],"CodeMirror-line"),content:ho,col:0,pos:0,cm:hq,trailingSpace:false,splitSpaces:hq.getOption("lineWrapping")};hp.measure={};for(var hm=0;hm<=(hp.rest?hp.rest.length:0);hm++){var hs=hm?hp.rest[hm-1]:hp.line,hl=(void 0);hn.pos=0;hn.addToken=v;if(b8(hq.display.measure)&&(hl=a(hs,hq.doc.direction))){hn.addToken=Z(hn.addToken,hl)}hn.map=[];var hk=hp!=hq.display.externalMeasured&&b7(hs);bF(hs,hn,dC(hq,hs,hk));if(hs.styleClasses){if(hs.styleClasses.bgClass){hn.bgClass=gN(hs.styleClasses.bgClass,hn.bgClass||"")}if(hs.styleClasses.textClass){hn.textClass=gN(hs.styleClasses.textClass,hn.textClass||"")}}if(hn.map.length==0){hn.map.push(0,0,hn.content.appendChild(bE(hq.display.measure)))}if(hm==0){hp.measure.map=hn.map;hp.measure.cache={}}else{(hp.measure.maps||(hp.measure.maps=[])).push(hn.map);(hp.measure.caches||(hp.measure.caches=[])).push({})}}if(dt){var hr=hn.content.lastChild;if(/\bcm-tab\b/.test(hr.className)||(hr.querySelector&&hr.querySelector(".cm-tab"))){hn.content.className="cm-tab-wrap-hack"}}aN(hq,"renderLine",hq,hp.line,hn.pre);if(hn.pre.className){hn.textClass=gN(hn.pre.className,hn.textClass||"")}return hn}function fZ(hk){var i=g0("span","\u2022","cm-invalidchar");i.title="\\u"+hk.charCodeAt(0).toString(16);i.setAttribute("aria-label",i.title);return i}function v(hw,hq,hB,hy,ht,hp,ho){if(!hq){return}var hA=hw.splitSpaces?c6(hq,hw.trailingSpace):hq;var i=hw.cm.state.specialChars,hk=false;var hz;if(!i.test(hq)){hw.col+=hq.length;hz=document.createTextNode(hA);hw.map.push(hw.pos,hw.pos+hq.length,hz);if(ef&&n<9){hk=true}hw.pos+=hq.length}else{hz=document.createDocumentFragment();var hm=0;while(true){i.lastIndex=hm;var hx=i.exec(hq);var hD=hx?hx.index-hm:hq.length-hm;if(hD){var hs=document.createTextNode(hA.slice(hm,hm+hD));if(ef&&n<9){hz.appendChild(g0("span",[hs]))}else{hz.appendChild(hs)}hw.map.push(hw.pos,hw.pos+hD,hs);hw.col+=hD;hw.pos+=hD}if(!hx){break}hm+=hD+1;var hC=(void 0);if(hx[0]=="\t"){var hu=hw.cm.options.tabSize,hr=hu-hw.col%hu;hC=hz.appendChild(g0("span",cQ(hr),"cm-tab"));hC.setAttribute("role","presentation");hC.setAttribute("cm-text","\t");hw.col+=hr}else{if(hx[0]=="\r"||hx[0]=="\n"){hC=hz.appendChild(g0("span",hx[0]=="\r"?"\u240d":"\u2424","cm-invalidchar"));hC.setAttribute("cm-text",hx[0]);hw.col+=1}else{hC=hw.cm.options.specialCharPlaceholder(hx[0]);hC.setAttribute("cm-text",hx[0]);if(ef&&n<9){hz.appendChild(g0("span",[hC]))}else{hz.appendChild(hC)}hw.col+=1}}hw.map.push(hw.pos,hw.pos+1,hC);hw.pos++}}hw.trailingSpace=hA.charCodeAt(hq.length-1)==32;if(hB||hy||ht||hk||hp){var hl=hB||"";if(hy){hl+=hy}if(ht){hl+=ht}var hn=g0("span",[hz],hl,hp);if(ho){for(var hv in ho){if(ho.hasOwnProperty(hv)&&hv!="style"&&hv!="class"){hn.setAttribute(hv,ho[hv])}}}return hw.content.appendChild(hn)}hw.content.appendChild(hz)}function c6(hp,ho){if(hp.length>1&&!/ /.test(hp)){return hp}var hl=ho,hk="";for(var hm=0;hmhm&&hn.from<=hm){break}}if(hn.to>=ho){return hk(ht,hu,hl,hq,hv,hs,hp)}hk(ht,hu.slice(0,hn.to-hm),hl,hq,null,hs,hp);hq=null;hu=hu.slice(hn.to-hm);hm=hn.to}}}function ak(hk,hm,i,hl){var hn=!hl&&i.widgetNode;if(hn){hk.map.push(hk.pos,hk.pos+hm,hn)}if(!hl&&hk.cm.display.input.needsContentAttribute){if(!hn){hn=hk.content.appendChild(document.createElement("span"))}hn.setAttribute("cm-marker",i.id)}if(hn){hk.cm.display.input.setUneditable(hn);hk.content.appendChild(hn)}hk.pos+=hm;hk.trailingSpace=false}function bF(hw,hE,hv){var hp=hw.markedSpans,ht=hw.text,hB=0;if(!hp){for(var hq=1;hqho||hD.collapsed&&hG.to==ho&&hG.from==ho)){if(hG.to!=null&&hG.to!=ho&&hN>hG.to){hN=hG.to;hM=""}if(hD.className){hk+=" "+hD.className}if(hD.css){hx=(hx?hx+";":"")+hD.css}if(hD.startStyle&&hG.from==ho){hA+=" "+hD.startStyle}if(hD.endStyle&&hG.to==hN){(hu||(hu=[])).push(hD.endStyle,hG.to)}if(hD.title){(hs||(hs={})).title=hD.title}if(hD.attributes){for(var hC in hD.attributes){(hs||(hs={}))[hC]=hD.attributes[hC]}}if(hD.collapsed&&(!hm||en(hm.marker,hD)<0)){hm=hG}}else{if(hG.from>ho&&hN>hG.from){hN=hG.from}}}}if(hu){for(var hL=0;hL=hI){break}var hy=Math.min(hI,hN);while(true){if(hz){var hl=ho+hz.length;if(!hm){var hn=hl>hy?hz.slice(0,hy-ho):hz;hE.addToken(hE,hn,hJ?hJ+hk:hk,hA,ho+hn.length==hN?hM:"",hx,hs)}if(hl>=hy){hz=hz.slice(hy-ho);ho=hy;break}ho=hl;hA=""}hz=ht.slice(hB,hB=hv[hH++]);hJ=fG(hv[hH++],hE.cm.options)}}}function bN(hl,i,hk){this.line=i;this.rest=g(i);this.size=this.rest?b7(gt(this.rest))-hk+1:1;this.node=this.text=null;this.hidden=gg(hl,i)}function fF(i,hp,ho){var hn=[],hl;for(var hm=hp;hm2){hp.push((hs.bottom+hl.top)/2-hq.top)}}}hp.push(hq.bottom-hq.top)}}function cU(hm,hk,hn){if(hm.line==hk){return{map:hm.measure.map,cache:hm.measure.cache}}for(var hl=0;hlhn){return{map:hm.measure.maps[ho],cache:hm.measure.caches[ho],before:true}}}}function dv(i,hl){hl=A(hl);var hn=b7(hl);var hk=i.display.externalMeasured=new bN(i.doc,hl,hn);hk.lineN=hn;var hm=hk.built=fB(i,hk);hk.text=hm.pre;cd(i.display.lineMeasure,hm.pre);return hk}function eR(i,hk,hm,hl){return G(i,bh(i,hk),hm,hl)}function fX(i,hl){if(hl>=i.display.viewFrom&&hl=hk.lineN&&hlhk){ho=hs-hn;hl=ho-1;if(hk>=hs){hr="right"}}}}if(hl!=null){hm=ht[hp+2];if(hn==hs&&hq==(hm.insertLeft?"left":"right")){hr=hq}if(hq=="left"&&hl==0){while(hp&&ht[hp-2]==ht[hp-3]&&ht[hp-1].insertLeft){hm=ht[(hp-=3)+2];hr="left"}}if(hq=="right"&&hl==hs-hn){while(hp=0;ho--){if((hn=hl[ho]).left!=hn.right){break}}}return hn}function l(hs,hC,hv,hp){var ht=aU(hC.map,hv,hp);var hA=ht.node,ho=ht.start,hn=ht.end,hk=ht.collapse;var hl;if(hA.nodeType==3){for(var hq=0;hq<4;hq++){while(ho&&f9(hC.line.text.charAt(ht.coverStart+ho))){--ho}while(ht.coverStart+hn0){hk=hp="right"}var hm;if(hs.options.lineWrapping&&(hm=hA.getClientRects()).length>1){hl=hm[hp=="right"?hm.length-1:0]}else{hl=hA.getBoundingClientRect()}}if(ef&&n<9&&!ho&&(!hl||!hl.left&&!hl.right)){var hr=hA.parentNode.getClientRects()[0];if(hr){hl={left:hr.left,right:hr.left+d7(hs.display),top:hr.top,bottom:hr.bottom}}else{hl=fg}}var hy=hl.top-hC.rect.top,hw=hl.bottom-hC.rect.top;var hE=(hy+hw)/2;var hD=hC.view.measure.heights;var hB=0;for(;hB=hp.text.length){i=hp.text.length;ht="before"}else{if(i<=0){i=0;ht="after"}}if(!ho){return hn(ht=="before"?i-1:i,ht=="before")}function hv(hA,hx,hB){var hy=ho[hx],hz=hy.level==1;return hn(hB?hA-1:hA,hz!=hB)}var hk=aR(ho,i,ht);var hr=fO;var hm=hv(i,hk,ht=="before");if(hr!=null){hm.other=hv(i,hr,ht!="before")}return hm}function eb(i,hn){var hm=0;hn=gy(i.doc,hn);if(!i.options.lineWrapping){hm=d7(i.display)*hn.ch}var hk=f0(i.doc,hn.line);var hl=b6(hk)+fU(i.display);return{left:hm,right:hm,top:hl,bottom:hl+hk.height}}function gY(i,hk,hm,hl,ho){var hn=ab(i,hk,hm);hn.xRel=ho;if(hl){hn.outside=true}return hn}function gG(hq,ho,hn){var hp=hq.doc;hn+=hq.display.viewOffset;if(hn<0){return gY(hp.first,0,null,true,-1)}var hm=b0(hp,hn),hr=hp.first+hp.size-1;if(hm>hr){return gY(hp.first+hp.size-1,f0(hp,hr).text.length,null,true,1)}if(ho<0){ho=0}var hl=f0(hp,hm);for(;;){var hs=ds(hq,hl,hm,ho,hn);var hk=cC(hl,hs.ch+(hs.xRel>0?1:0));if(!hk){return hs}var i=hk.find(1);if(i.line==hm){return i}hl=f0(hp,hm=i.line)}}function bC(i,hl,hn,ho){ho-=ee(hl);var hk=hl.text.length;var hm=cN(function(hp){return G(i,hn,hp-1).bottom<=ho},hk,0);hk=cN(function(hp){return G(i,hn,hp).top>ho},hm,hk);return{begin:hm,end:hk}}function bA(i,hk,hm,hn){if(!hm){hm=bh(i,hk)}var hl=fz(i,hk,G(i,hm,hn),"line").top;return bC(i,hk,hm,hl)}function az(hk,i,hm,hl){return hk.bottom<=hm?false:hk.top>hm?true:(hl?hk.left:hk.right)>i}function ds(hm,hk,hB,hp,ho){ho-=b6(hk);var ht=bh(hm,hk);var hD=ee(hk);var hA=0,hl=hk.text.length,hx=true;var hv=a(hk,hm.doc.direction);if(hv){var hu=(hm.options.lineWrapping?gV:gA)(hm,hk,hB,ht,hv,hp,ho);hx=hu.level!=1;hA=hx?hu.from:hu.to-1;hl=hx?hu.to:hu.from-1}var hn=null,hr=null;var hs=cN(function(hE){var hF=G(hm,ht,hE);hF.top+=hD;hF.bottom+=hD;if(!az(hF,hp,ho,false)){return false}if(hF.top<=ho&&hF.left<=hp){hn=hE;hr=hF}return true},hA,hl);var i,hC,hz=false;if(hr){var hy=hp-hr.left=hw.bottom}hs=eU(hk.text,hs,1);return gY(hB,hs,hC,hz,hp-i)}function gA(hs,ho,i,ht,hn,hr,hq){var hp=cN(function(hw){var hu=hn[hw],hv=hu.level!=1;return az(er(hs,ab(i,hv?hu.to:hu.from,hv?"before":"after"),"line",ho,ht),hr,hq,true)},0,hn.length-1);var hm=hn[hp];if(hp>0){var hl=hm.level!=1;var hk=er(hs,ab(i,hl?hm.from:hm.to,hl?"after":"before"),"line",ho,ht);if(az(hk,hr,hq,true)&&hk.top>hq){hm=hn[hp-1]}}return hm}function gV(hx,hs,hv,hA,hp,hw,hu){var ho=bC(hx,hs,hA,hu);var hn=ho.begin;var hq=ho.end;if(/\s/.test(hs.text.charAt(hq-1))){hq--}var hm=null,hy=null;for(var hr=0;hr=hq||hk.to<=hn){continue}var hl=hk.level!=1;var hz=G(hx,hA,hl?Math.min(hq,hk.to)-1:Math.max(hn,hk.from)).right;var ht=hzht){hm=hk;hy=ht}}if(!hm){hm=hp[hp.length-1]}if(hm.fromhq){hm={from:hm.from,to:hq,level:hm.level}}return hm}var aQ;function a9(hm){if(hm.cachedTextHeight!=null){return hm.cachedTextHeight}if(aQ==null){aQ=g0("pre");for(var hl=0;hl<49;++hl){aQ.appendChild(document.createTextNode("x"));aQ.appendChild(g0("br"))}aQ.appendChild(document.createTextNode("x"))}cd(hm.measure,aQ);var hk=aQ.offsetHeight/50;if(hk>3){hm.cachedTextHeight=hk}eA(hm.measure);return hk||1}function d7(hn){if(hn.cachedCharWidth!=null){return hn.cachedCharWidth}var i=g0("span","xxxxxxxxxx");var hm=g0("pre",[i]);cd(hn.measure,hm);var hl=i.getBoundingClientRect(),hk=(hl.right-hl.left)/10;if(hk>2){hn.cachedCharWidth=hk}return hk||10}function fY(hk){var hp=hk.display,hn={},hm={};var ho=hp.gutters.clientLeft;for(var hr=hp.gutters.firstChild,hl=0;hr;hr=hr.nextSibling,++hl){var hq=hk.display.gutterSpecs[hl].className;hn[hq]=hr.offsetLeft+hr.clientLeft+ho;hm[hq]=hr.clientWidth}return{fixedPos:ev(hp),gutterTotalWidth:hp.gutters.offsetWidth,gutterLeft:hn,gutterWidth:hm,wrapperWidth:hp.wrapper.clientWidth}}function ev(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function bq(i){var hl=a9(i.display),hk=i.options.lineWrapping;var hm=hk&&Math.max(5,i.display.scroller.clientWidth/d7(i.display)-3);return function(ho){if(gg(i.doc,ho)){return 0}var hn=0;if(ho.widgets){for(var hp=0;hp=hk.display.viewTo){return null}hn-=hk.display.viewFrom;if(hn<0){return null}var hl=hk.display.view;for(var hm=0;hmhp)){hm.updateLineNumbers=hp}hr.curOp.viewChanged=true;if(hp>=hm.viewTo){if(bj&&a7(hr.doc,hp)hm.viewFrom){fa(hr)}else{hm.viewFrom+=hs;hm.viewTo+=hs}}else{if(hp<=hm.viewFrom&&hq>=hm.viewTo){fa(hr)}else{if(hp<=hm.viewFrom){var ho=dL(hr,hq,hq+hs,1);if(ho){hm.view=hm.view.slice(ho.index);hm.viewFrom=ho.lineN;hm.viewTo+=hs}else{fa(hr)}}else{if(hq>=hm.viewTo){var hk=dL(hr,hp,hp,-1);if(hk){hm.view=hm.view.slice(0,hk.index);hm.viewTo=hk.lineN}else{fa(hr)}}else{var hn=dL(hr,hp,hp,-1);var hl=dL(hr,hq,hq+hs,1);if(hn&&hl){hm.view=hm.view.slice(0,hn.index).concat(fF(hr,hn.lineN,hl.lineN)).concat(hm.view.slice(hl.index));hm.viewTo+=hs}else{fa(hr)}}}}}}var i=hm.externalMeasured;if(i){if(hq=hn.lineN&&hl=hp.viewTo){return}var hm=hp.view[dY(hk,hl)];if(hm.node==null){return}var i=hm.changes||(hm.changes=[]);if(dP(i,ho)==-1){i.push(ho)}}function fa(i){i.display.viewFrom=i.display.viewTo=i.doc.first;i.display.view=[];i.display.viewOffset=0}function dL(hs,hm,ho,hl){var hp=dY(hs,hm),hr,hq=hs.display.view;if(!bj||ho==hs.doc.first+hs.doc.size){return{index:hp,lineN:ho}}var hk=hs.display.viewFrom;for(var hn=0;hn0){if(hp==hq.length-1){return null}hr=(hk+hq[hp].size)-hm;hp++}else{hr=hk-hm}hm+=hr;ho+=hr}while(a7(hs.doc,ho)!=ho){if(hp==(hl<0?0:hq.length-1)){return null}ho+=hl*hq[hp-(hl<0?1:0)].size;hp+=hl}return{index:hp,lineN:ho}}function dk(i,hn,hm){var hl=i.display,hk=hl.view;if(hk.length==0||hn>=hl.viewTo||hm<=hl.viewFrom){hl.view=fF(i,hn,hm);hl.viewFrom=hn}else{if(hl.viewFrom>hn){hl.view=fF(i,hn,hl.viewFrom).concat(hl.view)}else{if(hl.viewFromhm){hl.view=hl.view.slice(0,dY(i,hm))}}}hl.viewTo=hm}function dI(hk){var hl=hk.display.view,ho=0;for(var hn=0;hn=hq.display.viewTo||hr.to().line0){hl.blinker=setInterval(function(){return hl.cursorDiv.style.visibility=(hk=!hk)?"":"hidden"},i.options.cursorBlinkRate)}else{if(i.options.cursorBlinkRate<0){hl.cursorDiv.style.visibility="hidden"}}}function u(i){if(!i.state.focused){i.display.input.focus();c2(i)}}function ar(i){i.state.delayingBlurEvent=true;setTimeout(function(){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false;a6(i)}},100)}function c2(i,hk){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false}if(i.options.readOnly=="nocursor"){return}if(!i.state.focused){aN(i,"focus",i,hk);i.state.focused=true;gn(i.display.wrapper,"CodeMirror-focused");if(!i.curOp&&i.display.selForContextMenu!=i.doc.sel){i.display.input.reset();if(dt){setTimeout(function(){return i.display.input.reset(true)},20)}}i.display.input.receivedFocus()}r(i)}function a6(i,hk){if(i.state.delayingBlurEvent){return}if(i.state.focused){aN(i,"blur",i,hk);i.state.focused=false;h(i.display.wrapper,"CodeMirror-focused")}clearInterval(i.display.blinker);setTimeout(function(){if(!i.state.focused){i.display.shift=false}},150)}function bl(hu){var hs=hu.display;var hm=hs.lineDiv.offsetTop;for(var hn=0;hn0.005||ht<-0.005){g5(hv.line,hw);cx(hv.line);if(hv.rest){for(var hl=0;hlhu.display.sizerWidth){var hq=Math.ceil(hk/d7(hu.display));if(hq>hu.display.maxLineLength){hu.display.maxLineLength=hq;hu.display.maxLine=hv.line;hu.display.maxLineChanged=true}}}}function cx(hl){if(hl.widgets){for(var hm=0;hm=hp){ho=b0(hq,b6(f0(hq,hr))-hm.wrapper.clientHeight);hp=hr}}}return{from:ho,to:Math.max(hp,ho+1)}}function eF(hk,hm){if(a2(hk,"scrollCursorIntoView")){return}var ho=hk.display,hl=ho.sizer.getBoundingClientRect(),i=null;if(hm.top+hl.top<0){i=true}else{if(hm.bottom+hl.top>(window.innerHeight||document.documentElement.clientHeight)){i=false}}if(i!=null&&!ge){var hn=g0("div","\u200b",null,("position: absolute;\n top: "+(hm.top-ho.viewOffset-fU(hk.display))+"px;\n height: "+(hm.bottom-hm.top+dl(hk)+ho.barHeight)+"px;\n left: "+(hm.left)+"px; width: "+(Math.max(2,hm.right-hm.left))+"px;"));hk.display.lineSpace.appendChild(hn);hn.scrollIntoView(i);hk.display.lineSpace.removeChild(hn)}}function H(hu,hr,hn,hm){if(hm==null){hm=0}var hs;if(!hu.options.lineWrapping&&hr==hn){hr=hr.ch?ab(hr.line,hr.sticky=="before"?hr.ch-1:hr.ch,"after"):hr;hn=hr.sticky=="before"?ab(hr.line,hr.ch+1,"before"):hr}for(var ho=0;ho<5;ho++){var hp=false;var ht=er(hu,hr);var i=!hn||hn==hr?ht:er(hu,hn);hs={left:Math.min(ht.left,i.left),top:Math.min(ht.top,i.top)-hm,right:Math.max(ht.left,i.left),bottom:Math.max(ht.bottom,i.bottom)+hm};var hl=M(hu,hs);var hq=hu.doc.scrollTop,hk=hu.doc.scrollLeft;if(hl.scrollTop!=null){C(hu,hl.scrollTop);if(Math.abs(hu.doc.scrollTop-hq)>1){hp=true}}if(hl.scrollLeft!=null){bX(hu,hl.scrollLeft);if(Math.abs(hu.doc.scrollLeft-hk)>1){hp=true}}if(!hp){break}}return hs}function I(i,hk){var hl=M(i,hk);if(hl.scrollTop!=null){C(i,hl.scrollTop)}if(hl.scrollLeft!=null){bX(i,hl.scrollLeft)}}function M(hs,hr){var hp=hs.display,hn=a9(hs.display);if(hr.top<0){hr.top=0}var hl=hs.curOp&&hs.curOp.scrollTop!=null?hs.curOp.scrollTop:hp.scroller.scrollTop;var hu=dn(hs),hw={};if(hr.bottom-hr.top>hu){hr.bottom=hr.top+hu}var hk=hs.doc.height+b1(hp);var i=hr.tophk-hn;if(hr.tophl+hu){var hq=Math.min(hr.top,(ho?hk:hr.bottom)-hu);if(hq!=hl){hw.scrollTop=hq}}}var hv=hs.curOp&&hs.curOp.scrollLeft!=null?hs.curOp.scrollLeft:hp.scroller.scrollLeft;var ht=dS(hs)-(hs.options.fixedGutter?hp.gutters.offsetWidth:0);var hm=hr.right-hr.left>ht;if(hm){hr.right=hr.left+ht}if(hr.left<10){hw.scrollLeft=0}else{if(hr.leftht+hv-3){hw.scrollLeft=hr.right+(hm?0:10)-ht}}}return hw}function c9(i,hk){if(hk==null){return}gp(i);i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+hk}function gs(i){gp(i);var hk=i.getCursor();i.curOp.scrollToPos={from:hk,to:hk,margin:i.options.cursorScrollMargin}}function fu(hk,i,hl){if(i!=null||hl!=null){gp(hk)}if(i!=null){hk.curOp.scrollLeft=i}if(hl!=null){hk.curOp.scrollTop=hl}}function cA(i,hk){gp(i);i.curOp.scrollToPos=hk}function gp(i){var hk=i.curOp.scrollToPos;if(hk){i.curOp.scrollToPos=null;var hm=eb(i,hk.from),hl=eb(i,hk.to);ca(i,hm,hl,hk.margin)}}function ca(i,hn,hm,hl){var hk=M(i,{left:Math.min(hn.left,hm.left),top:Math.min(hn.top,hm.top)-hl,right:Math.max(hn.right,hm.right),bottom:Math.max(hn.bottom,hm.bottom)+hl});fu(i,hk.scrollLeft,hk.scrollTop)}function C(i,hk){if(Math.abs(i.doc.scrollTop-hk)<2){return}if(!cP){eq(i,{top:hk})}T(i,hk,true);if(cP){eq(i)}eO(i,100)}function T(i,hl,hk){hl=Math.min(i.display.scroller.scrollHeight-i.display.scroller.clientHeight,hl);if(i.display.scroller.scrollTop==hl&&!hk){return}i.doc.scrollTop=hl;i.display.scrollbars.setScrollTop(hl);if(i.display.scroller.scrollTop!=hl){i.display.scroller.scrollTop=hl}}function bX(i,hm,hl,hk){hm=Math.min(hm,i.display.scroller.scrollWidth-i.display.scroller.clientWidth);if((hl?hm==i.doc.scrollLeft:Math.abs(i.doc.scrollLeft-hm)<2)&&!hk){return}i.doc.scrollLeft=hm;fk(i);if(i.display.scroller.scrollLeft!=hm){i.display.scroller.scrollLeft=hm}i.display.scrollbars.setScrollLeft(hm)}function d5(i){var hm=i.display,hl=hm.gutters.offsetWidth;var hk=Math.round(i.doc.height+b1(i.display));return{clientHeight:hm.scroller.clientHeight,viewHeight:hm.wrapper.clientHeight,scrollWidth:hm.scroller.scrollWidth,clientWidth:hm.scroller.clientWidth,viewWidth:hm.wrapper.clientWidth,barLeft:i.options.fixedGutter?hl:0,docHeight:hk,scrollHeight:hk+dl(i)+hm.barHeight,nativeBarWidth:hm.nativeBarWidth,gutterWidth:hl}}var dR=function(hl,hk,i){this.cm=i;var hm=this.vert=g0("div",[g0("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var hn=this.horiz=g0("div",[g0("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");hm.tabIndex=hn.tabIndex=-1;hl(hm);hl(hn);ci(hm,"scroll",function(){if(hm.clientHeight){hk(hm.scrollTop,"vertical")}});ci(hn,"scroll",function(){if(hn.clientWidth){hk(hn.scrollLeft,"horizontal")}});this.checkedZeroWidth=false;if(ef&&n<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}};dR.prototype.update=function(hm){var hn=hm.scrollWidth>hm.clientWidth+1;var hl=hm.scrollHeight>hm.clientHeight+1;var ho=hm.nativeBarWidth;if(hl){this.vert.style.display="block";this.vert.style.bottom=hn?ho+"px":"0";var hk=hm.viewHeight-(hn?ho:0);this.vert.firstChild.style.height=Math.max(0,hm.scrollHeight-hm.clientHeight+hk)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(hn){this.horiz.style.display="block";this.horiz.style.right=hl?ho+"px":"0";this.horiz.style.left=hm.barLeft+"px";var i=hm.viewWidth-hm.barLeft-(hl?ho:0);this.horiz.firstChild.style.width=Math.max(0,hm.scrollWidth-hm.clientWidth+i)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&&hm.clientHeight>0){if(ho==0){this.zeroWidthHack()}this.checkedZeroWidth=true}return{right:hl?ho:0,bottom:hn?ho:0}};dR.prototype.setScrollLeft=function(i){if(this.horiz.scrollLeft!=i){this.horiz.scrollLeft=i}if(this.disableHoriz){this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")}};dR.prototype.setScrollTop=function(i){if(this.vert.scrollTop!=i){this.vert.scrollTop=i}if(this.disableVert){this.enableZeroWidthBar(this.vert,this.disableVert,"vert")}};dR.prototype.zeroWidthHack=function(){var i=ct&&!dB?"12px":"18px";this.horiz.style.height=this.vert.style.width=i;this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new hj;this.disableVert=new hj};dR.prototype.enableZeroWidthBar=function(hl,i,hk){hl.style.pointerEvents="auto";function hm(){var ho=hl.getBoundingClientRect();var hn=hk=="vert"?document.elementFromPoint(ho.right-1,(ho.top+ho.bottom)/2):document.elementFromPoint((ho.right+ho.left)/2,ho.bottom-1);if(hn!=hl){hl.style.pointerEvents="none"}else{i.set(1000,hm)}}i.set(1000,hm)};dR.prototype.clear=function(){var i=this.horiz.parentNode;i.removeChild(this.horiz);i.removeChild(this.vert)};var fP=function(){};fP.prototype.update=function(){return{bottom:0,right:0}};fP.prototype.setScrollLeft=function(){};fP.prototype.setScrollTop=function(){};fP.prototype.clear=function(){};function fJ(hm,ho){if(!ho){ho=d5(hm)}var hl=hm.display.barWidth,hk=hm.display.barHeight;a5(hm,ho);for(var hn=0;hn<4&&hl!=hm.display.barWidth||hk!=hm.display.barHeight;hn++){if(hl!=hm.display.barWidth&&hm.options.lineWrapping){bl(hm)}a5(hm,d5(hm));hl=hm.display.barWidth;hk=hm.display.barHeight}}function a5(i,hk){var hm=i.display;var hl=hm.scrollbars.update(hk);hm.sizer.style.paddingRight=(hm.barWidth=hl.right)+"px";hm.sizer.style.paddingBottom=(hm.barHeight=hl.bottom)+"px";hm.heightForcer.style.borderBottom=hl.bottom+"px solid transparent";if(hl.right&&hl.bottom){hm.scrollbarFiller.style.display="block";hm.scrollbarFiller.style.height=hl.bottom+"px";hm.scrollbarFiller.style.width=hl.right+"px"}else{hm.scrollbarFiller.style.display=""}if(hl.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter){hm.gutterFiller.style.display="block";hm.gutterFiller.style.height=hl.bottom+"px";hm.gutterFiller.style.width=hk.gutterWidth+"px"}else{hm.gutterFiller.style.display=""}}var bz={"native":dR,"null":fP};function aL(i){if(i.display.scrollbars){i.display.scrollbars.clear();if(i.display.scrollbars.addClass){h(i.display.wrapper,i.display.scrollbars.addClass)}}i.display.scrollbars=new bz[i.options.scrollbarStyle](function(hk){i.display.wrapper.insertBefore(hk,i.display.scrollbarFiller);ci(hk,"mousedown",function(){if(i.state.focused){setTimeout(function(){return i.display.input.focus()},0)}});hk.setAttribute("cm-not-content","true")},function(hl,hk){if(hk=="horizontal"){bX(i,hl)}else{C(i,hl)}},i);if(i.display.scrollbars.addClass){gn(i.display.wrapper,i.display.scrollbars.addClass)}}var eJ=0;function db(i){i.curOp={cm:i,viewChanged:false,startHeight:i.doc.height,forceUpdate:false,updateInput:0,typing:false,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:false,id:++eJ};fc(i.curOp)}function av(i){var hk=i.curOp;if(hk){cj(hk,function(hm){for(var hl=0;hl=hk.viewTo)||hk.maxLineChanged&&i.options.lineWrapping;hl.update=hl.mustUpdate&&new aT(i,hl.mustUpdate&&{top:hl.scrollTop,ensure:hl.scrollToPos},hl.forceUpdate)}function ay(i){i.updatedDisplay=i.mustUpdate&&F(i.cm,i.update)}function cn(hl){var i=hl.cm,hk=i.display;if(hl.updatedDisplay){bl(i)}hl.barMeasure=d5(i);if(hk.maxLineChanged&&!i.options.lineWrapping){hl.adjustWidthTo=eR(i,hk.maxLine,hk.maxLine.text.length).left+3;i.display.sizerWidth=hl.adjustWidthTo;hl.barMeasure.scrollWidth=Math.max(hk.scroller.clientWidth,hk.sizer.offsetLeft+hl.adjustWidthTo+dl(i)+i.display.barWidth);hl.maxScrollLeft=Math.max(0,hk.sizer.offsetLeft+hl.adjustWidthTo-dS(i))}if(hl.updatedDisplay||hl.selectionChanged){hl.preparedSelection=hk.input.prepareSelection()}}function ax(hl){var i=hl.cm;if(hl.adjustWidthTo!=null){i.display.sizer.style.minWidth=hl.adjustWidthTo+"px";if(hl.maxScrollLeft=i.display.viewTo){return}var hl=+new Date+i.options.workTime;var hm=fH(i,hn.highlightFrontier);var hk=[];hn.iter(hm.line,Math.min(hn.first+hn.size,i.display.viewTo+500),function(hp){if(hm.line>=i.display.viewFrom){var hs=hp.styles;var ho=hp.text.length>i.options.maxHighlightLength?cp(hn.mode,hm.state):null;var hu=gk(i,hp,hm,true);if(ho){hm.state=ho}hp.styles=hu.styles;var hr=hp.styleClasses,ht=hu.classes;if(ht){hp.styleClasses=ht}else{if(hr){hp.styleClasses=null}}var hv=!hs||hs.length!=hp.styles.length||hr!=ht&&(!hr||!ht||hr.bgClass!=ht.bgClass||hr.textClass!=ht.textClass);for(var hq=0;!hv&&hqhl){eO(i,i.options.workDelay);return true}});hn.highlightFrontier=hm.line;hn.modeFrontier=Math.max(hn.modeFrontier,hm.line);if(hk.length){df(i,function(){for(var ho=0;ho=hn.viewFrom&&hm.visible.to<=hn.viewTo&&(hn.updateLineNumbers==null||hn.updateLineNumbers>=hn.viewTo)&&hn.renderedView==hn.view&&dI(hs)==0){return false}if(eD(hs)){fa(hs);hm.dims=fY(hs)}var hl=hr.first+hr.size;var hp=Math.max(hm.visible.from-hs.options.viewportMargin,hr.first);var hq=Math.min(hl,hm.visible.to+hs.options.viewportMargin);if(hn.viewFromhq&&hn.viewTo-hq<20){hq=Math.min(hl,hn.viewTo)}if(bj){hp=a7(hs.doc,hp);hq=eC(hs.doc,hq)}var hk=hp!=hn.viewFrom||hq!=hn.viewTo||hn.lastWrapHeight!=hm.wrapperHeight||hn.lastWrapWidth!=hm.wrapperWidth;dk(hs,hp,hq);hn.viewOffset=b6(f0(hs.doc,hn.viewFrom));hs.display.mover.style.top=hn.viewOffset+"px";var i=dI(hs);if(!hk&&i==0&&!hm.force&&hn.renderedView==hn.view&&(hn.updateLineNumbers==null||hn.updateLineNumbers>=hn.viewTo)){return false}var ho=bB(hs);if(i>4){hn.lineDiv.style.display="none"}cL(hs,hn.updateLineNumbers,hm.dims);if(i>4){hn.lineDiv.style.display=""}hn.renderedView=hn.view;j(ho);eA(hn.cursorDiv);eA(hn.selectionDiv);hn.gutters.style.height=hn.sizer.style.minHeight=0;if(hk){hn.lastWrapHeight=hm.wrapperHeight;hn.lastWrapWidth=hm.wrapperWidth;eO(hs,400)}hn.updateLineNumbers=null;return true}function cI(hk,hn){var i=hn.viewport;for(var hm=true;;hm=false){if(!hm||!hk.options.lineWrapping||hn.oldDisplayWidth==dS(hk)){if(i&&i.top!=null){i={top:Math.min(hk.doc.height+b1(hk.display)-dn(hk),i.top)}}hn.visible=cs(hk.display,hk.doc,i);if(hn.visible.from>=hk.display.viewFrom&&hn.visible.to<=hk.display.viewTo){break}}if(!F(hk,hn)){break}bl(hk);var hl=d5(hk);bV(hk);fJ(hk,hl);d4(hk,hl);hn.force=false}hn.signal(hk,"update",hk);if(hk.display.viewFrom!=hk.display.reportedViewFrom||hk.display.viewTo!=hk.display.reportedViewTo){hn.signal(hk,"viewportChange",hk,hk.display.viewFrom,hk.display.viewTo);hk.display.reportedViewFrom=hk.display.viewFrom;hk.display.reportedViewTo=hk.display.viewTo}}function eq(hk,i){var hm=new aT(hk,i);if(F(hk,hm)){bl(hk);cI(hk,hm);var hl=d5(hk);bV(hk);fJ(hk,hl);d4(hk,hl);hm.finish()}}function cL(hv,hm,hu){var hr=hv.display,hx=hv.options.lineNumbers;var hk=hr.lineDiv,hw=hk.firstChild;function hq(hy){var i=hy.nextSibling;if(dt&&ct&&hv.display.currentWheelTarget==hy){hy.style.display="none"}else{hy.parentNode.removeChild(hy)}return i}var hs=hr.view,hp=hr.viewFrom;for(var hn=0;hn-1){ht=false}ai(hv,ho,hp,hu)}if(ht){eA(ho.lineNumber);ho.lineNumber.appendChild(document.createTextNode(e5(hv.options,hp)))}hw=ho.node.nextSibling}}hp+=ho.size}while(hw){hw=hq(hw)}}function dx(hk){var i=hk.gutters.offsetWidth;hk.sizer.style.marginLeft=i+"px"}function d4(i,hk){i.display.sizer.style.minHeight=hk.docHeight+"px";i.display.heightForcer.style.top=hk.docHeight+"px";i.display.gutters.style.height=(hk.docHeight+i.display.barHeight+dl(i))+"px"}function fk(hs){var hq=hs.display,hr=hq.view;if(!hq.alignWidgets&&(!hq.gutters.firstChild||!hs.options.fixedGutter)){return}var ho=ev(hq)-hq.scroller.scrollLeft+hs.doc.scrollLeft;var hk=hq.gutters.offsetWidth,hl=ho+"px";for(var hn=0;hnht.clientWidth;var hm=ht.scrollHeight>ht.clientHeight;if(!(hy&&hn||hx&&hm)){return}if(hx&&ct&&dt){outer:for(var hv=ho.target,hs=hq.view;hv!=ht;hv=hv.parentNode){for(var hl=0;hl=0&&cD(ho,hl.to())<=0){return hm}}return -1};var eu=function(i,hk){this.anchor=i;this.head=hk};eu.prototype.from=function(){return aA(this.anchor,this.head)};eu.prototype.to=function(){return bQ(this.anchor,this.head)};eu.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cX(hu,hk,ht){var hp=hu&&hu.options.selectionsMayTouch;var hm=hk[ht];hk.sort(function(hw,i){return cD(hw.from(),i.from())});ht=dP(hk,hm);for(var ho=1;ho0:hs>=0){var hr=aA(hl.from(),hv.from()),hq=bQ(hl.to(),hv.to());var hn=hl.empty()?hv.from()==hv.head:hl.from()==hl.head;if(ho<=ht){--ht}hk.splice(--ho,2,new eu(hn?hq:hr,hn?hr:hq))}}return new gZ(hk,ht)}function fA(i,hk){return new gZ([new eu(i,hk||i)],0)}function dq(i){if(!i.text){return i.to}return ab(i.from.line+i.text.length-1,gt(i.text).length+(i.text.length==1?i.from.ch:0))}function cl(hm,hl){if(cD(hm,hl.from)<0){return hm}if(cD(hm,hl.to)<=0){return dq(hl)}var i=hm.line+hl.text.length-(hl.to.line-hl.from.line)-1,hk=hm.ch;if(hm.line==hl.to.line){hk+=dq(hl).ch-hl.to.ch}return ab(i,hk)}function f4(hn,ho){var hl=[];for(var hm=0;hm1){hA.remove(hy.line+1,hw-1)}hA.insert(hy.line+1,ho)}}}}al(hA,"change",hA,ht)}function eG(hm,hl,hk){function i(hs,hq,ho){if(hs.linked){for(var hp=0;hp1&&!hk.done[hk.done.length-2].ranges){hk.done.pop();return gt(hk.done)}}}}function gB(hp,hn,i,hm){var hl=hp.history;hl.undone.length=0;var hk=+new Date,hq;var hr;if((hl.lastOp==hm||hl.lastOrigin==hn.origin&&hn.origin&&((hn.origin.charAt(0)=="+"&&hl.lastModTime>hk-(hp.cm?hp.cm.options.historyEventDelay:500))||hn.origin.charAt(0)=="*"))&&(hq=fv(hl,hl.lastOp==hm))){hr=gt(hq.changes);if(cD(hn.from,hn.to)==0&&cD(hn.from,hr.to)==0){hr.to=dq(hn)}else{hq.changes.push(d2(hp,hn))}}else{var ho=gt(hl.done);if(!ho||!ho.ranges){dh(hp.sel,hl.done)}hq={changes:[d2(hp,hn)],generation:hl.generation};hl.done.push(hq);while(hl.done.length>hl.undoDepth){hl.done.shift();if(!hl.done[0].ranges){hl.done.shift()}}}hl.done.push(i);hl.generation=++hl.maxGeneration;hl.lastModTime=hl.lastSelTime=hk;hl.lastOp=hl.lastSelOp=hm;hl.lastOrigin=hl.lastSelOrigin=hn.origin;if(!hr){aN(hp,"historyAdded")}}function bT(hn,i,hl,hm){var hk=i.charAt(0);return hk=="*"||hk=="+"&&hl.ranges.length==hm.ranges.length&&hl.somethingSelected()==hm.somethingSelected()&&new Date-hn.history.lastSelTime<=(hn.cm?hn.cm.options.historyEventDelay:500)}function hc(ho,hm,i,hl){var hn=ho.history,hk=hl&&hl.origin;if(i==hn.lastSelOp||(hk&&hn.lastSelOrigin==hk&&(hn.lastModTime==hn.lastSelTime&&hn.lastOrigin==hk||bT(ho,hk,gt(hn.done),hm)))){hn.done[hn.done.length-1]=hm}else{dh(hm,hn.done)}hn.lastSelTime=+new Date;hn.lastSelOrigin=hk;hn.lastSelOp=i;if(hl&&hl.clearRedo!==false){go(hn.undone)}}function dh(hk,i){var hl=gt(i);if(!(hl&&hl.ranges&&hl.equals(hk))){i.push(hk)}}function ck(hk,ho,hn,hm){var i=ho["spans_"+hk.id],hl=0;hk.iter(Math.max(hk.first,hn),Math.min(hk.first+hk.size,hm),function(hp){if(hp.markedSpans){(i||(i=ho["spans_"+hk.id]={}))[hl]=hp.markedSpans}++hl})}function bx(hm){if(!hm){return null}var hk;for(var hl=0;hl-1){gt(ht)[hk]=hr[hk];delete hr[hk]}}}}}}return hl}function gf(hk,hn,i,ho){if(ho){var hm=hk.anchor;if(i){var hl=cD(hn,hm)<0;if(hl!=(cD(i,hm)<0)){hm=hn;hn=i}else{if(hl!=(cD(hn,i)<0)){hn=i}}}return new eu(hm,hn)}else{return new eu(i||hn,hn)}}function gS(hm,hl,i,hk,hn){if(hn==null){hn=hm.cm&&(hm.cm.display.shift||hm.extend)}cf(hm,new gZ([gf(hm.sel.primary(),hl,i,hn)],0),hk)}function aE(hp,ho,hm){var hl=[];var hq=hp.cm&&(hp.cm.display.shift||hp.extend);for(var hn=0;hn=hs.ch:hk.to>hs.ch))){if(hq){aN(hl,"beforeCursorEnter");if(hl.explicitlyCleared){if(!hv.markedSpans){break}else{--ho;continue}}}if(!hl.atomic){continue}if(hn){var hr=hl.find(hm<0?1:-1),ht=(void 0);if(hm<0?hl.inclusiveRight:hl.inclusiveLeft){hr=hg(hu,hr,-hm,hr&&hr.line==hs.line?hv:null)}if(hr&&hr.line==hs.line&&(ht=cD(hr,hn))&&(hm<0?ht<0:ht>0)){return fq(hu,hr,hs,hm,hq)}}var hp=hl.find(hm<0?-1:1);if(hm<0?hl.inclusiveLeft:hl.inclusiveRight){hp=hg(hu,hp,hm,hp.line==hs.line?hv:null)}return hp?fq(hu,hp,hs,hm,hq):null}}}return hs}function cg(ho,hp,hm,hk,i){var hl=hk||1;var hn=fq(ho,hp,hm,hl,i)||(!i&&fq(ho,hp,hm,hl,true))||fq(ho,hp,hm,-hl,i)||(!i&&fq(ho,hp,hm,-hl,true));if(!hn){ho.cantEdit=true;return ab(ho.first,0)}return hn}function hg(hl,hm,hk,i){if(hk<0&&hm.ch==0){if(hm.line>hl.first){return gy(hl,ab(hm.line-1))}else{return null}}else{if(hk>0&&hm.ch==(i||f0(hl,hm.line)).text.length){if(hm.line=0;--hk){P(hn,{from:hl[hk].from,to:hl[hk].to,text:hk?[""]:ho.text,origin:ho.origin})}}else{P(hn,ho)}}function P(hl,hm){if(hm.text.length==1&&hm.text[0]==""&&cD(hm.from,hm.to)==0){return}var hk=f4(hl,hm);gB(hl,hm,hk,hl.cm?hl.cm.curOp.id:NaN);eN(hl,hm,hk,eV(hl,hm));var i=[];eG(hl,function(ho,hn){if(!hn&&dP(i,ho.history)==-1){d8(ho.history,hm);i.push(ho.history)}eN(ho,hm,null,eV(ho,hm))})}function cu(hx,hu,hy){var hv=hx.cm&&hx.cm.state.suppressEdits;if(hv&&!hy){return}var ht=hx.history,hl,hn=hx.sel;var hk=hu=="undo"?ht.done:ht.undone,hw=hu=="undo"?ht.undone:ht.done;var hq=0;for(;hq=0;--ho){var hp=hr(ho);if(hp){return hp.v}}}function f8(hk,hm){if(hm==0){return}hk.first+=hm;hk.sel=new gZ(ce(hk.sel.ranges,function(hn){return new eu(ab(hn.anchor.line+hm,hn.anchor.ch),ab(hn.head.line+hm,hn.head.ch))}),hk.sel.primIndex);if(hk.cm){ao(hk.cm,hk.first,hk.first-hm,hm);for(var hl=hk.cm.display,i=hl.viewFrom;ihn.lastLine()){return}if(ho.from.linehl){ho={from:ho.from,to:ab(hl,f0(hn,hl).text.length),text:[ho.text[0]],origin:ho.origin}}ho.removed=g2(hn,ho.from,ho.to);if(!hm){hm=f4(hn,ho)}if(hn.cm){aS(hn.cm,ho,hk)}else{gj(hn,ho,hk)}e1(hn,hm,ag)}function aS(hu,hq,ho){var ht=hu.doc,hp=hu.display,hr=hq.from,hs=hq.to;var i=false,hn=hr.line;if(!hu.options.lineWrapping){hn=b7(A(f0(ht,hr.line)));ht.iter(hn,hs.line+1,function(hw){if(hw==hp.maxLine){i=true;return true}})}if(ht.sel.contains(hq.from,hq.to)>-1){aa(hu)}gj(ht,hq,ho,bq(hu));if(!hu.options.lineWrapping){ht.iter(hn,hr.line+hq.text.length,function(hx){var hw=eY(hx);if(hw>hp.maxLineLength){hp.maxLine=hx;hp.maxLineLength=hw;hp.maxLineChanged=true;i=false}});if(i){hu.curOp.updateMaxLine=true}}hd(ht,hr.line);eO(hu,400);var hv=hq.text.length-(hs.line-hr.line)-1;if(hq.full){ao(hu)}else{if(hr.line==hs.line&&hq.text.length==1&&!eo(hu.doc,hq)){W(hu,hr.line,"text")}else{ao(hu,hr.line,hs.line+1,hv)}}var hl=f5(hu,"changes"),hm=f5(hu,"change");if(hm||hl){var hk={from:hr,to:hs,text:hq.text,removed:hq.removed,origin:hq.origin};if(hm){al(hu,"change",hu,hk)}if(hl){(hu.curOp.changeObjs||(hu.curOp.changeObjs=[])).push(hk)}}hu.display.selForContextMenu=null}function bc(hm,hl,ho,hn,hk){var i;if(!hn){hn=ho}if(cD(hn,ho)<0){(i=[hn,ho],ho=i[0],hn=i[1])}if(typeof hl=="string"){hl=hm.splitLines(hl)}bs(hm,{from:ho,to:hn,text:hl,origin:hk})}function N(hm,hl,hk,i){if(hk1||!(this.children[0] instanceof fK))){var hs=[];this.collapse(hs);this.children=[new fK(hs)];this.children[0].parent=this}},collapse:function(hk){var hm=this;for(var hl=0;hl50){var hm=hk.lines.length%25+25;for(var hr=hm;hr10);hm.parent.maybeSpill()},iterN:function(hk,hr,hq){var hp=this;for(var hl=0;hlht.display.maxLineLength){ht.display.maxLine=hk;ht.display.maxLineLength=hq;ht.display.maxLineChanged=true}}}if(hn!=null&&ht&&this.collapsed){ao(ht,hn,hr+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(ht){fb(ht.doc)}}if(ht){al(ht,"markerCleared",ht,this,hn,hr)}if(hm){av(ht)}if(this.parent){this.parent.clear()}};V.prototype.find=function(hn,hl){var hr=this;if(hn==null&&this.type=="bookmark"){hn=1}var hq,hp;for(var hm=0;hm0||ht==0&&hn.clearWhenEmpty!==false){return hn}if(hn.replacedWith){hn.collapsed=true;hn.widgetNode=g6("span",[hn.replacedWith],"CodeMirror-widget");if(!hu.handleMouseEvents){hn.widgetNode.setAttribute("cm-ignore-events","true")}if(hu.insertLeft){hn.widgetNode.insertLeft=true}}if(hn.collapsed){if(B(hs,hq.line,hq,hr,hn)||hq.line!=hr.line&&B(hs,hr.line,hq,hr,hn)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}bP()}if(hn.addToHistory){gB(hs,{from:hq,to:hr,origin:"markText"},hs.sel,NaN)}var hl=hq.line,hp=hs.cm,hk;hs.iter(hl,hr.line+1,function(i){if(hp&&hn.collapsed&&!hp.options.lineWrapping&&A(i)==hp.display.maxLine){hk=true}if(hn.collapsed&&hl!=hq.line){g5(i,0)}cB(i,new eT(hn,hl==hq.line?hq.ch:null,hl==hr.line?hr.ch:null));++hl});if(hn.collapsed){hs.iter(hq.line,hr.line+1,function(i){if(gg(hs,i)){g5(i,0)}})}if(hn.clearOnEnter){ci(hn,"beforeCursorEnter",function(){return hn.clear()})}if(hn.readOnly){gl();if(hs.history.done.length||hs.history.undone.length){hs.clearHistory()}}if(hn.collapsed){hn.id=++bg;hn.atomic=true}if(hp){if(hk){hp.curOp.updateMaxLine=true}if(hn.collapsed){ao(hp,hq.line,hr.line+1)}else{if(hn.className||hn.startStyle||hn.endStyle||hn.css||hn.attributes||hn.title){for(var hm=hq.line;hm<=hr.line;hm++){W(hp,hm,"text")}}}if(hn.atomic){fb(hp.doc)}al(hp,"markerAdded",hp,hn)}return hn}var z=function(hm,hl){var hn=this;this.markers=hm;this.primary=hl;for(var hk=0;hk=0;hm--){bs(hp,hr[hm])}if(hk){fT(this,hk)}else{if(this.cm){gs(this.cm)}}}),undo:c5(function(){cu(this,"undo")}),redo:c5(function(){cu(this,"redo")}),undoSelection:c5(function(){cu(this,"undo",true)}),redoSelection:c5(function(){cu(this,"redo",true)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){var hn=this.history,hk=0,hm=0;for(var hl=0;hl=ho.ch)){hn.push(hm.marker.parent||hm.marker)}}}return hn},findMarks:function(hn,hm,hk){hn=gy(this,hn);hm=gy(this,hm);var hl=[],i=hn.line;this.iter(hn.line,hm.line+1,function(ho){var hq=ho.markedSpans;if(hq){for(var hp=0;hp=hr.to||hr.from==null&&i!=hn.line||hr.from!=null&&i==hm.line&&hr.from>=hm.ch)&&(!hk||hk(hr.marker))){hl.push(hr.marker.parent||hr.marker)}}}++i});return hl},getAllMarks:function(){var i=[];this.iter(function(hl){var hk=hl.markedSpans;if(hk){for(var hm=0;hmhm){hk=hm;return true}hm-=ho;++i});return gy(this,ab(i,hk))},indexFromPos:function(hl){hl=gy(this,hl);var i=hl.ch;if(hl.linehm){hm=i.from}if(i.to!=null&&i.to-1){hu.state.draggingText(hs);setTimeout(function(){return hu.display.input.focus()},20);return}try{var hk=hs.dataTransfer.getData("Text");if(hk){var hp;if(hu.state.draggingText&&!hu.state.draggingText.copy){hp=hu.listSelections()}e1(hu.doc,fA(ht,ht));if(hp){for(var hn=0;hn=0;hr--){bc(hk.doc,"",ho[hr].from,ho[hr].to,"+delete")}gs(hk)})}function bG(i,hl,hk){var hm=eU(i.text,hl+hk,hk);return hm<0||hm>i.text.length?null:hm}function ap(i,hm,hk){var hl=bG(i,hm.ch,hk);return hl==null?null:new ab(hm.line,hl,hk<0?"after":"before")}function fd(hk,hs,hp,ho,hm){if(hk){var hn=a(hp,hs.doc.direction);if(hn){var hl=hm<0?gt(hn):hn[0];var hu=(hm<0)==(hl.level==1);var hr=hu?"after":"before";var i;if(hl.level>0||hs.doc.direction=="rtl"){var hq=bh(hs,hp);i=hm<0?hp.text.length-1:0;var ht=G(hs,hq,i).top;i=cN(function(hv){return G(hs,hq,hv).top==ht},(hm<0)==(hl.level==1)?hl.from:hl.to-1,i);if(hr=="before"){i=bG(hp,i,1)}}else{i=hm<0?hl.to:hl.from}return new ab(ho,i,hr)}}return new ab(ho,hm<0?hp.text.length:0,hm<0?"before":"after")}function w(hu,hz,hn,hq){var hw=a(hz,hu.doc.direction);if(!hw){return ap(hz,hn,hq)}if(hn.ch>=hz.text.length){hn.ch=hz.text.length;hn.sticky="before"}else{if(hn.ch<=0){hn.ch=0;hn.sticky="after"}}var hm=aR(hw,hn.ch,hn.sticky),ho=hw[hm];if(hu.doc.direction=="ltr"&&ho.level%2==0&&(hq>0?ho.to>hn.ch:ho.from=ho.from&&hk>=hp.begin:hk<=ho.to&&hk<=hp.end)){var ht=hy?"before":"after";return new ab(hn.line,hk,ht)}}var hl=function(hA,hD,hG){var hC=function(hI,hH){return hH?new ab(hn.line,hx(hI,1),"before"):new ab(hn.line,hI,"after")};for(;hA>=0&&hA0)==(hB.level!=1);var hF=hE?hG.begin:hx(hG.end,-1);if(hB.from<=hF&&hF0?hp.end:hx(hp.begin,-1);if(i!=null&&!(hq>0&&i==hz.text.length)){hs=hl(hq>0?0:hw.length-1,hq,hv(i));if(hs){return hs}}return null}var fi={selectAll:au,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),ag)},killLine:function(i){return fI(i,function(hl){if(hl.empty()){var hk=f0(i.doc,hl.head.line).text.length;if(hl.head.ch==hk&&hl.head.line0){hp=new ab(hp.line,hp.ch+1);i.replaceRange(hk.charAt(hp.ch-1)+hk.charAt(hp.ch-2),ab(hp.line,hp.ch-2),hp,"+transpose")}else{if(hp.line>i.doc.first){var ho=f0(i.doc,hp.line-1).text;if(ho){hp=new ab(hp.line,1);i.replaceRange(hk.charAt(0)+i.doc.lineSeparator()+ho.charAt(ho.length-1),ab(hp.line-1,ho.length-1),hp,"+transpose")}}}}hl.push(new eu(hp,hp))}i.setSelections(hl)})},newlineAndIndent:function(i){return df(i,function(){var hk=i.listSelections();for(var hl=hk.length-1;hl>=0;hl--){i.replaceRange(i.doc.lineSeparator(),hk[hl].anchor,hk[hl].head,"+input")}hk=i.listSelections();for(var hm=0;hmhk&&cD(hl,this.pos)==0&&i==this.button};var dU,dK;function J(hl,hk){var i=+new Date;if(dK&&dK.compare(i,hl,hk)){dU=dK=null;return"triple"}else{if(dU&&dU.compare(i,hl,hk)){dK=new dT(i,hl,hk);dU=null;return"double"}else{dU=new dT(i,hl,hk);dK=null;return"single"}}}function e7(hn){var i=this,hm=i.display;if(a2(i,hn)||hm.activeTouch&&hm.input.supportsTouch()){return}hm.input.ensurePolled();hm.shift=hn.shiftKey;if(bn(hm,hn)){if(!dt){hm.scroller.draggable=false;setTimeout(function(){return hm.scroller.draggable=true},100)}return}if(o(i,hn)){return}var ho=cO(i,hn),hk=gE(hn),hl=ho?J(ho,hk):"single";window.focus();if(hk==1&&i.state.selectingText){i.state.selectingText(hn)}if(ho&&dd(i,hk,ho,hl,hn)){return}if(hk==1){if(ho){aF(i,ho,hl,hn)}else{if(Q(hn)==hm.scroller){c7(hn)}}}else{if(hk==2){if(ho){gS(i.doc,ho)}setTimeout(function(){return hm.input.focus()},20)}else{if(hk==3){if(g9){i.display.input.onContextMenu(hn)}else{ar(i)}}}}}function dd(i,hl,ho,hn,hm){var hk="Click";if(hn=="double"){hk="Double"+hk}else{if(hn=="triple"){hk="Triple"+hk}}hk=(hl==1?"Left":hl==2?"Middle":"Right")+hk;return bp(i,gU(hk,hm),hm,function(hq){if(typeof hq=="string"){hq=fi[hq]}if(!hq){return false}var hp=false;try{if(i.isReadOnly()){i.state.suppressEdits=true}hp=hq(i,ho)!=cy}finally{i.state.suppressEdits=false}return hp})}function b2(i,ho,hm){var hk=i.getOption("configureMouse");var hn=hk?hk(i,ho,hm):{};if(hn.unit==null){var hl=gx?hm.shiftKey&&hm.metaKey:hm.altKey;hn.unit=hl?"rectangle":ho=="single"?"char":ho=="double"?"word":"line"}if(hn.extend==null||i.doc.extend){hn.extend=i.doc.extend||hm.shiftKey}if(hn.addNew==null){hn.addNew=ct?hm.metaKey:hm.ctrlKey}if(hn.moveOnDrag==null){hn.moveOnDrag=!(ct?hm.altKey:hm.ctrlKey)}return hn}function aF(i,hp,ho,hm){if(ef){setTimeout(cW(u,i),0)}else{i.curOp.focus=ej()}var hl=b2(i,ho,hm);var hn=i.doc.sel,hk;if(i.options.dragDrop&&ft&&!i.isReadOnly()&&ho=="single"&&(hk=hn.contains(hp))>-1&&(cD((hk=hn.ranges[hk]).from(),hp)<0||hp.xRel>0)&&(cD(hk.to(),hp)>0||hp.xRel<0)){bf(i,hm,hp,hl)}else{p(i,hm,hp,hl)}}function bf(hq,i,hn,hk){var hm=hq.display,ho=false;var hl=du(hq,function(hs){if(dt){hm.scroller.draggable=false}hq.state.draggingText=false;eP(hm.wrapper.ownerDocument,"mouseup",hl);eP(hm.wrapper.ownerDocument,"mousemove",hr);eP(hm.scroller,"dragstart",hp);eP(hm.scroller,"drop",hl);if(!ho){c7(hs);if(!hk.addNew){gS(hq.doc,hn,null,null,hk.extend)}if(dt||ef&&n==9){setTimeout(function(){hm.wrapper.ownerDocument.body.focus();hm.input.focus()},20)}else{hm.input.focus()}}});var hr=function(hs){ho=ho||Math.abs(i.clientX-hs.clientX)+Math.abs(i.clientY-hs.clientY)>=10};var hp=function(){return ho=true};if(dt){hm.scroller.draggable=true}hq.state.draggingText=hl;hl.copy=!hk.moveOnDrag;if(hm.scroller.dragDrop){hm.scroller.dragDrop()}ci(hm.wrapper.ownerDocument,"mouseup",hl);ci(hm.wrapper.ownerDocument,"mousemove",hr);ci(hm.scroller,"dragstart",hp);ci(hm.scroller,"drop",hl);ar(hq);setTimeout(function(){return hm.input.focus()},20)}function ep(hk,hm,hl){if(hl=="char"){return new eu(hm,hm)}if(hl=="word"){return hk.findWordAt(hm)}if(hl=="line"){return new eu(ab(hm.line,0),gy(hk.doc,ab(hm.line+1,0)))}var i=hl(hk,hm);return new eu(i.from,i.to)}function p(hn,hy,hl,hr){var hx=hn.display,hB=hn.doc;c7(hy);var hk,hA,ho=hB.sel,i=ho.ranges;if(hr.addNew&&!hr.extend){hA=hB.sel.contains(hl);if(hA>-1){hk=i[hA]}else{hk=new eu(hl,hl)}}else{hk=hB.sel.primary();hA=hB.sel.primIndex}if(hr.unit=="rectangle"){if(!hr.addNew){hk=new eu(hl,hl)}hl=cO(hn,hy,true,true);hA=-1}else{var hm=ep(hn,hl,hr.unit);if(hr.extend){hk=gf(hk,hm.anchor,hm.head,hr.extend)}else{hk=hm}}if(!hr.addNew){hA=0;cf(hB,new gZ([hk],0),R);ho=hB.sel}else{if(hA==-1){hA=i.length;cf(hB,cX(hn,i.concat([hk]),hA),{scroll:false,origin:"*mouse"})}else{if(i.length>1&&i[hA].empty()&&hr.unit=="char"&&!hr.extend){cf(hB,cX(hn,i.slice(0,hA).concat(i.slice(hA+1)),0),{scroll:false,origin:"*mouse"});ho=hB.sel}else{e(hB,hA,hk,R)}}}var hw=hl;function hv(hM){if(cD(hw,hM)==0){return}hw=hM;if(hr.unit=="rectangle"){var hE=[],hJ=hn.options.tabSize;var hD=cc(f0(hB,hl.line).text,hl.ch,hJ);var hQ=cc(f0(hB,hM.line).text,hM.ch,hJ);var hF=Math.min(hD,hQ),hO=Math.max(hD,hQ);for(var hR=Math.min(hl.line,hM.line),hH=Math.min(hn.lastLine(),Math.max(hl.line,hM.line));hR<=hH;hR++){var hP=f0(hB,hR).text,hG=e2(hP,hF,hJ);if(hF==hO){hE.push(new eu(ab(hR,hG),ab(hR,hG)))}else{if(hP.length>hG){hE.push(new eu(ab(hR,hG),ab(hR,e2(hP,hO,hJ))))}}}if(!hE.length){hE.push(new eu(hl,hl))}cf(hB,cX(hn,ho.ranges.slice(0,hA).concat(hE),hA),{origin:"*mouse",scroll:false});hn.scrollIntoView(hM)}else{var hK=hk;var hN=ep(hn,hM,hr.unit);var hI=hK.anchor,hL;if(cD(hN.anchor,hI)>0){hL=hN.head;hI=aA(hK.from(),hN.anchor)}else{hL=hN.anchor;hI=bQ(hK.to(),hN.head)}var hC=ho.ranges.slice(0);hC[hA]=at(hn,new eu(gy(hB,hI),hL));cf(hB,cX(hn,hC,hA),R)}}var ht=hx.wrapper.getBoundingClientRect();var hp=0;function hz(hE){var hC=++hp;var hG=cO(hn,hE,true,hr.unit=="rectangle");if(!hG){return}if(cD(hG,hw)!=0){hn.curOp.focus=ej();hv(hG);var hF=cs(hx,hB);if(hG.line>=hF.to||hG.lineht.bottom?20:0;if(hD){setTimeout(du(hn,function(){if(hp!=hC){return}hx.scroller.scrollTop+=hD;hz(hE)}),50)}}}function hs(hC){hn.state.selectingText=false;hp=Infinity;if(hC){c7(hC);hx.input.focus()}eP(hx.wrapper.ownerDocument,"mousemove",hu);eP(hx.wrapper.ownerDocument,"mouseup",hq);hB.history.lastSelOrigin=null}var hu=du(hn,function(hC){if(hC.buttons===0||!gE(hC)){hs(hC)}else{hz(hC)}});var hq=du(hn,hs);hn.state.selectingText=hq;ci(hx.wrapper.ownerDocument,"mousemove",hu);ci(hx.wrapper.ownerDocument,"mouseup",hq)}function at(hx,hy){var hq=hy.anchor;var hu=hy.head;var ht=f0(hx.doc,hq.line);if(cD(hq,hu)==0&&hq.sticky==hu.sticky){return hy}var hn=a(ht);if(!hn){return hy}var hs=aR(hn,hq.ch,hq.sticky),hl=hn[hs];if(hl.from!=hq.ch&&hl.to!=hq.ch){return hy}var hk=hs+((hl.from==hq.ch)==(hl.level!=1)?0:1);if(hk==0||hk==hn.length){return hy}var hr;if(hu.line!=hq.line){hr=(hu.line-hq.line)*(hx.doc.direction=="ltr"?1:-1)>0}else{var hp=aR(hn,hu.ch,hu.sticky);var hm=hp-hs||(hu.ch-hq.ch)*(hl.level==1?-1:1);if(hp==hk-1||hp==hk){hr=hm<0}else{hr=hm>0}}var ho=hn[hk+(hr?-1:0)];var hw=hr==(ho.level==1);var i=hw?ho.from:ho.to,hv=hw?"after":"before";return hq.ch==i&&hq.sticky==hv?hy:new eu(new ab(hq.line,i,hv),hu)}function hi(hu,hq,hs,ht){var hl,hk;if(hq.touches){hl=hq.touches[0].clientX;hk=hq.touches[0].clientY}else{try{hl=hq.clientX;hk=hq.clientY}catch(hq){return false}}if(hl>=Math.floor(hu.display.gutters.getBoundingClientRect().right)){return false}if(ht){c7(hq)}var hr=hu.display;var hp=hr.lineDiv.getBoundingClientRect();if(hk>hp.bottom||!f5(hu,hs)){return b5(hq)}hk-=hp.top-hr.viewOffset;for(var hn=0;hn=hl){var hv=b0(hu.doc,hk);var hm=hu.display.gutterSpecs[hn];aN(hu,hs,hu,hv,hm.className,hq);return b5(hq)}}}function o(i,hk){return hi(i,hk,"gutterClick",true)}function aG(i,hk){if(bn(i.display,hk)||dN(i,hk)){return}if(a2(i,hk,"contextmenu")){return}if(!g9){i.display.input.onContextMenu(hk)}}function dN(i,hk){if(!f5(i,"gutterContextMenu")){return false}return hi(i,hk,"gutterContextMenu",false)}function dg(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-");aq(i)}var cz={toString:function(){return"CodeMirror.Init"}};var fN={};var br={};function fn(i){var hl=i.optionHandlers;function hk(hm,hp,ho,hn){i.defaults[hm]=hp;if(ho){hl[hm]=hn?function(hq,hs,hr){if(hr!=cz){ho(hq,hs,hr)}}:ho}}i.defineOption=hk;i.Init=cz;hk("value","",function(hm,hn){return hm.setValue(hn)},true);hk("mode",null,function(hm,hn){hm.doc.modeOption=hn;bJ(hm)},true);hk("indentUnit",2,bJ,true);hk("indentWithTabs",false);hk("smartIndent",true);hk("tabSize",4,function(hm){eX(hm);aq(hm);ao(hm)},true);hk("lineSeparator",null,function(hm,hp){hm.doc.lineSep=hp;if(!hp){return}var ho=[],hq=hm.doc.first;hm.doc.iter(function(hr){for(var ht=0;;){var hs=hr.text.indexOf(hp,ht);if(hs==-1){break}ht=hs+hp.length;ho.push(ab(hq,hs))}hq++});for(var hn=ho.length-1;hn>=0;hn--){bc(hm.doc,hp,ho[hn],ab(ho[hn].line,ho[hn].ch+hp.length))}});hk("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(hm,ho,hn){hm.state.specialChars=new RegExp(ho.source+(ho.test("\t")?"":"|\t"),"g");if(hn!=cz){hm.refresh()}});hk("specialCharPlaceholder",fZ,function(hm){return hm.refresh()},true);hk("electricChars",true);hk("inputStyle",eQ?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},true);hk("spellcheck",false,function(hm,hn){return hm.getInputField().spellcheck=hn},true);hk("autocorrect",false,function(hm,hn){return hm.getInputField().autocorrect=hn},true);hk("autocapitalize",false,function(hm,hn){return hm.getInputField().autocapitalize=hn},true);hk("rtlMoveVisually",!a0);hk("wholeLineUpdateBefore",true);hk("theme","default",function(hm){dg(hm);eM(hm)},true);hk("keyMap","default",function(hm,hq,hn){var ho=gR(hq);var hp=hn!=cz&&gR(hn);if(hp&&hp.detach){hp.detach(hm,ho)}if(ho.attach){ho.attach(hm,hp||null)}});hk("extraKeys",null);hk("configureMouse",null);hk("lineWrapping",false,fm,true);hk("gutters",[],function(hm,hn){hm.display.gutterSpecs=bd(hn,hm.options.lineNumbers);eM(hm)},true);hk("fixedGutter",true,function(hm,hn){hm.display.gutters.style.left=hn?ev(hm.display)+"px":"0";hm.refresh()},true);hk("coverGutterNextToScrollbar",false,function(hm){return fJ(hm)},true);hk("scrollbarStyle","native",function(hm){aL(hm);fJ(hm);hm.display.scrollbars.setScrollTop(hm.doc.scrollTop);hm.display.scrollbars.setScrollLeft(hm.doc.scrollLeft)},true);hk("lineNumbers",false,function(hm,hn){hm.display.gutterSpecs=bd(hm.options.gutters,hn);eM(hm)},true);hk("firstLineNumber",1,eM,true);hk("lineNumberFormatter",function(hm){return hm},eM,true);hk("showCursorWhenSelecting",false,bV,true);hk("resetSelectionOnContextMenu",true);hk("lineWiseCopyCut",true);hk("pasteLinesPerSelection",true);hk("selectionsMayTouch",false);hk("readOnly",false,function(hm,hn){if(hn=="nocursor"){a6(hm);hm.display.input.blur()}hm.display.input.readOnlyChanged(hn)});hk("disableInput",false,function(hm,hn){if(!hn){hm.display.input.reset()}},true);hk("dragDrop",true,gX);hk("allowDropFileTypes",null);hk("cursorBlinkRate",530);hk("cursorScrollMargin",0);hk("cursorHeight",1,bV,true);hk("singleCursorHeightPerLine",true,bV,true);hk("workTime",100);hk("workDelay",100);hk("flattenSpans",true,eX,true);hk("addModeClass",false,eX,true);hk("pollInterval",100);hk("undoDepth",200,function(hm,hn){return hm.doc.history.undoDepth=hn});hk("historyEventDelay",1250);hk("viewportMargin",10,function(hm){return hm.refresh()},true);hk("maxHighlightLength",10000,eX,true);hk("moveInputWithCursor",true,function(hm,hn){if(!hn){hm.display.input.resetPosition()}});hk("tabindex",null,function(hm,hn){return hm.display.input.getField().tabIndex=hn||""});hk("autofocus",null);hk("direction","ltr",function(hm,hn){return hm.doc.setDirection(hn)},true);hk("phrases",null)}function gX(hk,hn,hl){var ho=hl&&hl!=cz;if(!hn!=!ho){var hm=hk.display.dragFunctions;var i=hn?ci:eP;i(hk.display.scroller,"dragstart",hm.start);i(hk.display.scroller,"dragenter",hm.enter);i(hk.display.scroller,"dragover",hm.over);i(hk.display.scroller,"dragleave",hm.leave);i(hk.display.scroller,"drop",hm.drop)}}function fm(i){if(i.options.lineWrapping){gn(i.display.wrapper,"CodeMirror-wrap");i.display.sizer.style.minWidth="";i.display.sizerWidth=null}else{h(i.display.wrapper,"CodeMirror-wrap");f(i)}ae(i);ao(i);aq(i);setTimeout(function(){return fJ(i)},100)}function L(hk,hm){var hr=this;if(!(this instanceof L)){return new L(hk,hm)}this.options=hm=hm?aY(hm):{};aY(fN,hm,false);var hq=hm.value;if(typeof hq=="string"){hq=new aC(hq,hm.mode,null,hm.lineSeparator,hm.direction)}else{if(hm.mode){hq.modeOption=hm.mode}}this.doc=hq;var hl=new L.inputStyles[hm.inputStyle](this);var hp=this.display=new fo(hk,hq,hl,hm);hp.wrapper.CodeMirror=this;dg(this);if(hm.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}aL(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,delayingBlurEvent:false,focused:false,suppressEdits:false,pasteIncoming:-1,cutIncoming:-1,selectingText:false,draggingText:false,highlight:new hj(),keySeq:null,specialChars:null};if(hm.autofocus&&!eQ){hp.input.focus()}if(ef&&n<11){setTimeout(function(){return hr.display.input.reset(true)},20)}gH(this);bv();db(this);this.curOp.forceUpdate=true;eL(this,hq);if((hm.autofocus&&!eQ)||this.hasFocus()){setTimeout(cW(c2,this),20)}else{a6(this)}for(var ho in br){if(br.hasOwnProperty(ho)){br[ho](hr,hm[ho],cz)}}eD(this);if(hm.finishInit){hm.finishInit(this)}for(var hn=0;hn20*20}ci(ho.scroller,"touchstart",function(hs){if(!a2(hk,hs)&&!hm(hs)&&!o(hk,hs)){ho.input.ensurePolled();clearTimeout(hq);var hr=+new Date;ho.activeTouch={start:hr,moved:false,prev:hr-i.end<=300?i:null};if(hs.touches.length==1){ho.activeTouch.left=hs.touches[0].pageX;ho.activeTouch.top=hs.touches[0].pageY}}});ci(ho.scroller,"touchmove",function(){if(ho.activeTouch){ho.activeTouch.moved=true}});ci(ho.scroller,"touchend",function(hs){var hu=ho.activeTouch;if(hu&&!bn(ho,hs)&&hu.left!=null&&!hu.moved&&new Date-hu.start<300){var ht=hk.coordsChar(ho.activeTouch,"page"),hr;if(!hu.prev||hl(hu,hu.prev)){hr=new eu(ht,ht)}else{if(!hu.prev.prev||hl(hu,hu.prev.prev)){hr=hk.findWordAt(ht)}else{hr=new eu(ab(ht.line,0),gy(hk.doc,ab(ht.line+1,0)))}}hk.setSelection(hr.anchor,hr.head);hk.focus();c7(hs)}hp()});ci(ho.scroller,"touchcancel",hp);ci(ho.scroller,"scroll",function(){if(ho.scroller.clientHeight){C(hk,ho.scroller.scrollTop);bX(hk,ho.scroller.scrollLeft,true);aN(hk,"scroll",hk)}});ci(ho.scroller,"mousewheel",function(hr){return c(hk,hr)});ci(ho.scroller,"DOMMouseScroll",function(hr){return c(hk,hr)});ci(ho.wrapper,"scroll",function(){return ho.wrapper.scrollTop=ho.wrapper.scrollLeft=0});ho.dragFunctions={enter:function(hr){if(!a2(hk,hr)){e3(hr)}},over:function(hr){if(!a2(hk,hr)){hh(hk,hr);e3(hr)}},start:function(hr){return U(hk,hr)},drop:du(hk,bw),leave:function(hr){if(!a2(hk,hr)){dH(hk)}}};var hn=ho.input.getField();ci(hn,"keyup",function(hr){return bt.call(hk,hr)});ci(hn,"keydown",du(hk,s));ci(hn,"keypress",du(hk,cY));ci(hn,"focus",function(hr){return c2(hk,hr)});ci(hn,"blur",function(hr){return a6(hk,hr)})}var bk=[];L.defineInitHook=function(i){return bk.push(i)};function aj(hz,ho,hy,hm){var hx=hz.doc,hl;if(hy==null){hy="add"}if(hy=="smart"){if(!hx.mode.indent){hy="prev"}else{hl=fH(hz,ho).state}}var hs=hz.options.tabSize;var hA=f0(hx,ho),hr=cc(hA.text,null,hs);if(hA.stateAfter){hA.stateAfter=null}var hk=hA.text.match(/^\s*/)[0],hv;if(!hm&&!/\S/.test(hA.text)){hv=0;hy="not"}else{if(hy=="smart"){hv=hx.mode.indent(hl,hA.text.slice(hk.length),hA.text);if(hv==cy||hv>150){if(!hm){return}hy="prev"}}}if(hy=="prev"){if(ho>hx.first){hv=cc(f0(hx,ho-1).text,null,hs)}else{hv=0}}else{if(hy=="add"){hv=hr+hz.options.indentUnit}else{if(hy=="subtract"){hv=hr-hz.options.indentUnit}else{if(typeof hy=="number"){hv=hr+hy}}}}hv=Math.max(0,hv);var hw="",hu=0;if(hz.options.indentWithTabs){for(var hp=Math.floor(hv/hs);hp;--hp){hu+=hs;hw+="\t"}}if(huhA;var hr=gJ(hp),hk=null;if(ho&&hm.ranges.length>1){if(by&&by.text.join("\n")==hp){if(hm.ranges.length%by.text.length==0){hk=[];for(var hq=0;hq=0;hl--){var hz=hm.ranges[hl];var hv=hz.from(),hu=hz.to();if(hz.empty()){if(hn&&hn>0){hv=ab(hv.line,hv.ch-hn)}else{if(hy.state.overwrite&&!ho){hu=ab(hu.line,Math.min(f0(hw,hu.line).text.length,hu.ch+gt(hr).length))}else{if(ho&&by&&by.lineWise&&by.text.join("\n")==hp){hv=hu=ab(hv.line,0)}}}}var ht={from:hv,to:hu,text:hk?hk[hl%hk.length]:hr,origin:hx||(ho?"paste":hy.state.cutIncoming>hA?"cut":"+input")};bs(hy.doc,ht);al(hy,"inputRead",hy,ht)}if(hp&&!ho){gP(hy,hp)}gs(hy);if(hy.curOp.updateInput<2){hy.curOp.updateInput=hs}hy.curOp.typing=true;hy.state.pasteIncoming=hy.state.cutIncoming=-1}function bm(hl,i){var hk=hl.clipboardData&&hl.clipboardData.getData("Text");if(hk){hl.preventDefault();if(!i.isReadOnly()&&!i.options.disableInput){df(i,function(){return gT(i,hk,0,null,"paste")})}return true}}function gP(hk,hn){if(!hk.options.electricChars||!hk.options.smartIndent){return}var ho=hk.doc.sel;for(var hm=ho.ranges.length-1;hm>=0;hm--){var hq=ho.ranges[hm];if(hq.head.ch>100||(hm&&ho.ranges[hm-1].head.line==hq.head.line)){continue}var hp=hk.getModeAt(hq.head);var hr=false;if(hp.electricChars){for(var hl=0;hl-1){hr=aj(hk,hq.head.line,"smart");break}}}else{if(hp.electricInput){if(hp.electricInput.test(f0(hk.doc,hq.head.line).text.slice(0,hq.head.ch))){hr=aj(hk,hq.head.line,"smart")}}}if(hr){al(hk,"electricInput",hk,hq.head.line)}}}function dO(hk){var hp=[],hm=[];for(var hn=0;hn0){e(hs.doc,hr,new eu(ht,ho[hr].to()),ag)}}else{if(hw.head.line>hp){aj(hs,hw.head.line,hv,true);hp=hw.head.line;if(hr==hs.doc.sel.primIndex){gs(hs)}}}}}),getTokenAt:function(hn,hm){return cR(this,hn,hm)},getLineTokens:function(hn,hm){return cR(this,ab(hn),hm,true)},getTokenTypeAt:function(ht){ht=gy(this.doc,ht);var hp=dC(this,f0(this.doc,ht.line));var hr=0,hs=(hp.length-1)/2,ho=ht.ch;var hn;if(ho==0){hn=hp[2]}else{for(;;){var hm=(hr+hs)>>1;if((hm?hp[hm*2-1]:0)>=ho){hs=hm}else{if(hp[hm*2+1]hp){hn=hp;hm=true}}ho=f0(this.doc,hn)}else{ho=hn}return fz(this,ho,{top:0,left:0},hr||"page",hq||hm).top+(hm?this.doc.height-b6(ho):0)},defaultTextHeight:function(){return a9(this.display)},defaultCharWidth:function(){return d7(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(hr,ho,ht,hp,hv){var hq=this.display;hr=er(this,gy(this.doc,hr));var hs=hr.bottom,hn=hr.left;ho.style.position="absolute";ho.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(ho);hq.sizer.appendChild(ho);if(hp=="over"){hs=hr.top}else{if(hp=="above"||hp=="near"){var hm=Math.max(hq.wrapper.clientHeight,this.doc.height),hu=Math.max(hq.sizer.clientWidth,hq.lineSpace.clientWidth);if((hp=="above"||hr.bottom+ho.offsetHeight>hm)&&hr.top>ho.offsetHeight){hs=hr.top-ho.offsetHeight}else{if(hr.bottom+ho.offsetHeight<=hm){hs=hr.bottom}}if(hn+ho.offsetWidth>hu){hn=hu-ho.offsetWidth}}}ho.style.top=hs+"px";ho.style.left=ho.style.right="";if(hv=="right"){hn=hq.sizer.clientWidth-ho.offsetWidth;ho.style.right="0px"}else{if(hv=="left"){hn=0}else{if(hv=="middle"){hn=(hq.sizer.clientWidth-ho.offsetWidth)/2}}ho.style.left=hn+"px"}if(ht){I(this,{left:hn,top:hs,right:hn+ho.offsetWidth,bottom:hs+ho.offsetHeight})}},triggerOnKeyDown:dE(s),triggerOnKeyPress:dE(cY),triggerOnKeyUp:bt,triggerOnMouseDown:dE(e7),execCommand:function(hm){if(fi.hasOwnProperty(hm)){return fi[hm].call(null,this)}},triggerElectric:dE(function(hm){gP(this,hm)}),findPosH:function(ht,hp,hq,hn){var hs=this;var hm=1;if(hp<0){hm=-1;hp=-hp}var hr=gy(this.doc,ht);for(var ho=0;ho0&&hm(hp.charAt(hs-1))){--hs}while(ho0.5){ae(this)}aN(this,"refresh",this)}),swapDoc:dE(function(hn){var hm=this.doc;hm.cm=null;if(this.state.selectingText){this.state.selectingText()}eL(this,hn);aq(this);this.display.input.reset();fu(this,hn.scrollLeft,hn.scrollTop);this.curOp.forceScroll=true;al(this,"swapDoc",this,hm);return hm}),phrase:function(hn){var hm=this.options.phrases;return hm&&Object.prototype.hasOwnProperty.call(hm,hn)?hm[hn]:hn},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};bS(i);i.registerHelper=function(hn,hm,ho){if(!hl.hasOwnProperty(hn)){hl[hn]=i[hn]={_global:[]}}hl[hn][hm]=ho};i.registerGlobalHelper=function(ho,hn,hm,hp){i.registerHelper(ho,hn,hp);hl[ho]._global.push({pred:hm,val:hp})}}function bO(hv,hu,hm,hw,hk){var hn=hu;var hr=hm;var hq=f0(hv,hu.line);function i(){var hA=hu.line+hm;if(hA=hv.first+hv.size){return false}hu=new ab(hA,hu.ch,hu.sticky);return hq=f0(hv,hA)}function ho(hB){var hA;if(hk){hA=w(hv.cm,hq,hu,hm)}else{hA=ap(hq,hu,hm)}if(hA==null){if(!hB&&i()){hu=fd(hk,hv.cm,hq,hu.line,hm)}else{return false}}else{hu=hA}return true}if(hw=="char"){ho()}else{if(hw=="column"){ho(true)}else{if(hw=="word"||hw=="group"){var ht=null,hy=hw=="group";var hl=hv.cm&&hv.cm.getHelper(hu,"wordChars");for(var hp=true;;hp=false){if(hm<0&&!ho(!hp)){break}var hx=hq.text.charAt(hu.ch)||"\n";var hs=c1(hx,hl)?"w":hy&&hx=="\n"?"n":!hy||/\s/.test(hx)?null:"p";if(hy&&!hp&&!hs){hs="s"}if(ht&&ht!=hs){if(hm<0){hm=1;ho();hu.sticky="after"}break}if(hs){ht=hs}if(hm>0&&!ho(!hp)){break}}}}}var hz=cg(hv,hu,hn,hr,true);if(ac(hn,hz)){hz.hitSide=true}return hz}function bI(hs,hn,hk,hr){var hq=hs.doc,hp=hn.left,ho;if(hr=="page"){var hm=Math.min(hs.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);var i=Math.max(hm-0.5*a9(hs.display),3);ho=(hk>0?hn.bottom:hn.top)+hk*i}else{if(hr=="line"){ho=hk>0?hn.bottom+3:hn.top-3}}var hl;for(;;){hl=gG(hs,hp,ho);if(!hl.outside){break}if(hk<0?ho<=0:ho>=hq.height){hl.hitSide=true;break}ho+=hk*5}return hl}var d1=function(i){this.cm=i;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new hj();this.composing=null;this.gracePeriod=false;this.readDOMTimeout=null};d1.prototype.init=function(hm){var ho=this;var hl=this,i=hl.cm;var hn=hl.div=hm.lineDiv;gF(hn,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize);ci(hn,"paste",function(hp){if(a2(i,hp)||bm(hp,i)){return}if(n<=11){setTimeout(du(i,function(){return ho.updateFromDOM()}),20)}});ci(hn,"compositionstart",function(hp){ho.composing={data:hp.data,done:false}});ci(hn,"compositionupdate",function(hp){if(!ho.composing){ho.composing={data:hp.data,done:false}}});ci(hn,"compositionend",function(hp){if(ho.composing){if(hp.data!=ho.composing.data){ho.readFromDOMSoon()}ho.composing.done=true}});ci(hn,"touchstart",function(){return hl.forceCompositionEnd()});ci(hn,"input",function(){if(!ho.composing){ho.readFromDOMSoon()}});function hk(ht){if(a2(i,ht)){return}if(i.somethingSelected()){dA({lineWise:false,text:i.getSelections()});if(ht.type=="cut"){i.replaceSelection("",null,"cut")}}else{if(!i.options.lineWiseCopyCut){return}else{var hq=dO(i);dA({lineWise:true,text:hq.text});if(ht.type=="cut"){i.operation(function(){i.setSelections(hq.ranges,0,ag);i.replaceSelection("",null,"cut")})}}}if(ht.clipboardData){ht.clipboardData.clearData();var hs=by.text.join("\n");ht.clipboardData.setData("Text",hs);if(ht.clipboardData.getData("Text")==hs){ht.preventDefault();return}}var hr=a8(),hu=hr.firstChild;i.display.lineSpace.insertBefore(hr,i.display.lineSpace.firstChild);hu.value=by.text.join("\n");var hp=document.activeElement;eg(hu);setTimeout(function(){i.display.lineSpace.removeChild(hr);hp.focus();if(hp==hn){hl.showPrimarySelection()}},50)}ci(hn,"copy",hk);ci(hn,"cut",hk)};d1.prototype.prepareSelection=function(){var i=gw(this.cm,false);i.focus=this.cm.state.focused;return i};d1.prototype.showSelection=function(hk,i){if(!hk||!this.cm.display.view.length){return}if(hk.focus||i){this.showPrimarySelection()}this.showMultipleSelections(hk)};d1.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()};d1.prototype.showPrimarySelection=function(){var hm=this.getSelection(),hw=this.cm,hp=hw.doc.sel.primary();var hu=hp.from(),hv=hp.to();if(hw.display.viewTo==hw.display.viewFrom||hu.line>=hw.display.viewTo||hv.line=hw.display.viewFrom&&c0(hw,hu))||{node:ht[0].measure.map[2],offset:0};var hq=hv.lineht.firstLine()){hC=ab(hC.line-1,f0(ht.doc,hC.line-1).length)}if(hn.ch==f0(ht.doc,hn.line).text.length&&hn.linehD.viewTo-1){return false}var hq,ho,hs;if(hC.line==hD.viewFrom||(hq=dY(ht,hC.line))==0){ho=b7(hD.view[0].line);hs=hD.view[0].node}else{ho=b7(hD.view[hq].line);hs=hD.view[hq-1].node.nextSibling}var hA=dY(ht,hn.line);var hv,hy;if(hA==hD.view.length-1){hv=hD.viewTo-1;hy=hD.lineDiv.lastChild}else{hv=b7(hD.view[hA+1].line)-1;hy=hD.view[hA+1].node.previousSibling}if(!hs){return false}var hE=ht.doc.splitLines(gW(ht,hs,hy,ho,hv));var hx=g2(ht.doc,ab(ho,0),ab(hv,f0(ht.doc,hv).text.length));while(hE.length>1&&hx.length>1){if(gt(hE)==gt(hx)){hE.pop();hx.pop();hv--}else{if(hE[0]==hx[0]){hE.shift();hx.shift();ho++}else{break}}}var hz=0,hl=0;var hu=hE[0],hk=hx[0],i=Math.min(hu.length,hk.length);while(hzhC.ch&&hr.charCodeAt(hr.length-hl-1)==hF.charCodeAt(hF.length-hl-1)){hz--;hl++}}hE[hE.length-1]=hr.slice(0,hr.length-hl).replace(/^\u200b+/,"");hE[0]=hE[0].slice(hz).replace(/\u200b+$/,"");var hp=ab(ho,hz);var hw=ab(hv,hx.length?gt(hx).length-hl:0);if(hE.length>1||hE[0]||cD(hp,hw)){bc(ht.doc,hE,hp,hw,"+input");return true}};d1.prototype.ensurePolled=function(){this.forceCompositionEnd()};d1.prototype.reset=function(){this.forceCompositionEnd()};d1.prototype.forceCompositionEnd=function(){if(!this.composing){return}clearTimeout(this.readDOMTimeout);this.composing=null;this.updateFromDOM();this.div.blur();this.div.focus()};d1.prototype.readFromDOMSoon=function(){var i=this;if(this.readDOMTimeout!=null){return}this.readDOMTimeout=setTimeout(function(){i.readDOMTimeout=null;if(i.composing){if(i.composing.done){i.composing=null}else{return}}i.updateFromDOM()},80)};d1.prototype.updateFromDOM=function(){var i=this;if(this.cm.isReadOnly()||!this.pollContent()){df(this.cm,function(){return ao(i.cm)})}};d1.prototype.setUneditable=function(i){i.contentEditable="false"};d1.prototype.onKeyPress=function(i){if(i.charCode==0||this.composing){return}i.preventDefault();if(!this.cm.isReadOnly()){du(this.cm,gT)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0)}};d1.prototype.readOnlyChanged=function(i){this.div.contentEditable=String(i!="nocursor")};d1.prototype.onContextMenu=function(){};d1.prototype.resetPosition=function(){};d1.prototype.needsContentAttribute=true;function c0(hp,hn){var ho=fX(hp,hn.line);if(!ho||ho.hidden){return null}var hr=f0(hp.doc,hn.line);var hk=cU(ho,hr,hn.line);var hl=a(hr,hp.doc.direction),hm="left";if(hl){var i=aR(hl,hn.ch);hm=i%2?"right":"left"}var hq=aU(hk.map,hn.ch,hm);hq.offset=hq.collapse=="right"?hq.end:hq.start;return hq}function g1(hk){for(var i=hk;i;i=i.parentNode){if(/CodeMirror-gutter-wrapper/.test(i.className)){return true}}return false}function e4(hk,i){if(i){hk.bad=true}return hk}function gW(hs,hq,hr,hm,hk){var hu="",hl=false,i=hs.doc.lineSeparator(),hn=false;function ho(hw){return function(hx){return hx.id==hw}}function hv(){if(hl){hu+=i;if(hn){hu+=i}hl=hn=false}}function ht(hw){if(hw){hv();hu+=hw}}function hp(hA){if(hA.nodeType==1){var hx=hA.getAttribute("cm-text");if(hx){ht(hx);return}var hz=hA.getAttribute("cm-marker"),hC;if(hz){var hB=hs.findMarks(ab(hm,0),ab(hk+1,0),ho(+hz));if(hB.length&&(hC=hB[0].find(0))){ht(g2(hs.doc,hC.from,hC.to).join(i))}return}if(hA.getAttribute("contenteditable")=="false"){return}var hw=/^(pre|div|p|li|table|br)$/i.test(hA.nodeName);if(!/^br$/i.test(hA.nodeName)&&hA.textContent.length==0){return}if(hw){hv()}for(var hy=0;hy=9&&ho.hasSelection){ho.hasSelection=null}hk.poll()});ci(hm,"paste",function(hp){if(a2(i,hp)||bm(hp,i)){return}i.state.pasteIncoming=+new Date;hk.fastPoll()});function hn(hq){if(a2(i,hq)){return}if(i.somethingSelected()){dA({lineWise:false,text:i.getSelections()})}else{if(!i.options.lineWiseCopyCut){return}else{var hp=dO(i);dA({lineWise:true,text:hp.text});if(hq.type=="cut"){i.setSelections(hp.ranges,null,ag)}else{hk.prevInput="";hm.value=hp.text.join("\n");eg(hm)}}}if(hq.type=="cut"){i.state.cutIncoming=+new Date}}ci(hm,"cut",hn);ci(hm,"copy",hn);ci(hl.scroller,"paste",function(hq){if(bn(hl,hq)||a2(i,hq)){return}if(!hm.dispatchEvent){i.state.pasteIncoming=+new Date;hk.focus();return}var hp=new Event("paste");hp.clipboardData=hq.clipboardData;hm.dispatchEvent(hp)});ci(hl.lineSpace,"selectstart",function(hp){if(!bn(hl,hp)){c7(hp)}});ci(hm,"compositionstart",function(){var hp=i.getCursor("from");if(hk.composing){hk.composing.range.clear()}hk.composing={start:hp,range:i.markText(hp,i.getCursor("to"),{className:"CodeMirror-composing"})}});ci(hm,"compositionend",function(){if(hk.composing){hk.poll();hk.composing.range.clear();hk.composing=null}})};ad.prototype.createField=function(i){this.wrapper=a8();this.textarea=this.wrapper.firstChild};ad.prototype.prepareSelection=function(){var hk=this.cm,ho=hk.display,hn=hk.doc;var i=gw(hk);if(hk.options.moveInputWithCursor){var hp=er(hk,hn.sel.primary().head,"div");var hl=ho.wrapper.getBoundingClientRect(),hm=ho.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(ho.wrapper.clientHeight-10,hp.top+hm.top-hl.top));i.teLeft=Math.max(0,Math.min(ho.wrapper.clientWidth-10,hp.left+hm.left-hl.left))}return i};ad.prototype.showSelection=function(hl){var i=this.cm,hk=i.display;cd(hk.cursorDiv,hl.cursors);cd(hk.selectionDiv,hl.selection);if(hl.teTop!=null){this.wrapper.style.top=hl.teTop+"px";this.wrapper.style.left=hl.teLeft+"px"}};ad.prototype.reset=function(hk){if(this.contextMenuPending||this.composing){return}var i=this.cm;if(i.somethingSelected()){this.prevInput="";var hl=i.getSelection();this.textarea.value=hl;if(i.state.focused){eg(this.textarea)}if(ef&&n>=9){this.hasSelection=hl}}else{if(!hk){this.prevInput=this.textarea.value="";if(ef&&n>=9){this.hasSelection=null}}}};ad.prototype.getField=function(){return this.textarea};ad.prototype.supportsTouch=function(){return false};ad.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!eQ||ej()!=this.textarea)){try{this.textarea.focus()}catch(i){}}};ad.prototype.blur=function(){this.textarea.blur()};ad.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0};ad.prototype.receivedFocus=function(){this.slowPoll()};ad.prototype.slowPoll=function(){var i=this;if(this.pollingFast){return}this.polling.set(this.cm.options.pollInterval,function(){i.poll();if(i.cm.state.focused){i.slowPoll()}})};ad.prototype.fastPoll=function(){var hk=false,i=this;i.pollingFast=true;function hl(){var hm=i.poll();if(!hm&&!hk){hk=true;i.polling.set(60,hl)}else{i.pollingFast=false;i.slowPoll()}}i.polling.set(20,hl)};ad.prototype.poll=function(){var hq=this;var i=this.cm,hl=this.textarea,hm=this.prevInput;if(this.contextMenuPending||!i.state.focused||(bK(hl)&&!hm&&!this.composing)||i.isReadOnly()||i.options.disableInput||i.state.keySeq){return false}var ho=hl.value;if(ho==hm&&!i.somethingSelected()){return false}if(ef&&n>=9&&this.hasSelection===ho||ct&&/[\uf700-\uf7ff]/.test(ho)){i.display.input.reset();return false}if(i.doc.sel==i.display.selForContextMenu){var hn=ho.charCodeAt(0);if(hn==8203&&!hm){hm="\u200b"}if(hn==8666){this.reset();return this.cm.execCommand("undo")}}var hp=0,hk=Math.min(hm.length,ho.length);while(hp1000||ho.indexOf("\n")>-1){hl.value=hq.prevInput=""}else{hq.prevInput=ho}if(hq.composing){hq.composing.range.clear();hq.composing.range=i.markText(hq.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"})}});return true};ad.prototype.ensurePolled=function(){if(this.pollingFast&&this.poll()){this.pollingFast=false}};ad.prototype.onKeyPress=function(){if(ef&&n>=9){this.hasSelection=null}this.fastPoll()};ad.prototype.onContextMenu=function(ho){var ht=this,hu=ht.cm,hq=hu.display,hk=ht.textarea;if(ht.contextMenuPending){ht.contextMenuPending()}var hs=cO(hu,ho),i=hq.scroller.scrollTop;if(!hs||eB){return}var hn=hu.options.resetSelectionOnContextMenu;if(hn&&hu.doc.sel.contains(hs)==-1){du(hu,cf)(hu.doc,fA(hs),ag)}var hp=hk.style.cssText,hx=ht.wrapper.style.cssText;var hw=ht.wrapper.offsetParent.getBoundingClientRect();ht.wrapper.style.cssText="position: static";hk.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(ho.clientY-hw.top-5)+"px; left: "+(ho.clientX-hw.left-5)+"px;\n z-index: 1000; background: "+(ef?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var hv;if(dt){hv=window.scrollY}hq.input.focus();if(dt){window.scrollTo(null,hv)}hq.input.reset();if(!hu.somethingSelected()){hk.value=ht.prevInput=" "}ht.contextMenuPending=hr;hq.selForContextMenu=hu.doc.sel;clearTimeout(hq.detectingSelectAll);function hm(){if(hk.selectionStart!=null){var hy=hu.somethingSelected();var hz="\u200b"+(hy?hk.value:"");hk.value="\u21da";hk.value=hz;ht.prevInput=hy?"":"\u200b";hk.selectionStart=1;hk.selectionEnd=hz.length;hq.selForContextMenu=hu.doc.sel}}function hr(){if(ht.contextMenuPending!=hr){return}ht.contextMenuPending=false;ht.wrapper.style.cssText=hx;hk.style.cssText=hp;if(ef&&n<9){hq.scrollbars.setScrollTop(hq.scroller.scrollTop=i)}if(hk.selectionStart!=null){if(!ef||(ef&&n<9)){hm()}var hy=0,hz=function(){if(hq.selForContextMenu==hu.doc.sel&&hk.selectionStart==0&&hk.selectionEnd>0&&ht.prevInput=="\u200b"){du(hu,au)(hu)}else{if(hy++<10){hq.detectingSelectAll=setTimeout(hz,500)}else{hq.selForContextMenu=null;hq.input.reset()}}};hq.detectingSelectAll=setTimeout(hz,200)}}if(ef&&n>=9){hm()}if(g9){e3(ho);var hl=function(){eP(window,"mouseup",hl);setTimeout(hr,20)};ci(window,"mouseup",hl)}else{setTimeout(hr,50)}};ad.prototype.readOnlyChanged=function(i){if(!i){this.reset()}this.textarea.disabled=i=="nocursor"};ad.prototype.setUneditable=function(){};ad.prototype.needsContentAttribute=false;function gu(hq,hr){hr=hr?aY(hr):{};hr.value=hq.value;if(!hr.tabindex&&hq.tabIndex){hr.tabindex=hq.tabIndex}if(!hr.placeholder&&hq.placeholder){hr.placeholder=hq.placeholder}if(hr.autofocus==null){var i=ej();hr.autofocus=i==hq||hq.getAttribute("autofocus")!=null&&i==document.body}function hn(){hq.value=hp.getValue()}var ho;if(hq.form){ci(hq.form,"submit",hn);if(!hr.leaveSubmitMethodAlone){var hk=hq.form;ho=hk.submit;try{var hm=hk.submit=function(){hn();hk.submit=ho;hk.submit();hk.submit=hm}}catch(hl){}}}hr.finishInit=function(hs){hs.save=hn;hs.getTextArea=function(){return hq};hs.toTextArea=function(){hs.toTextArea=isNaN;hn();hq.parentNode.removeChild(hs.getWrapperElement());hq.style.display="";if(hq.form){eP(hq.form,"submit",hn);if(typeof hq.form.submit=="function"){hq.form.submit=ho}}}};hq.style.display="none";var hp=L(function(hs){return hq.parentNode.insertBefore(hs,hq.nextSibling)},hr);return hp}function gz(i){i.off=eP;i.on=ci;i.wheelEventPixels=aI;i.Doc=aC;i.splitLines=gJ;i.countColumn=cc;i.findColumn=e2;i.isWordChar=gq;i.Pass=cy;i.signal=aN;i.Line=g4;i.changeEnd=dq;i.scrollbarModel=bz;i.Pos=ab;i.cmpPos=cD;i.modes=dZ;i.mimeModes=a3;i.resolveMode=hb;i.getMode=gm;i.modeExtensions=dW;i.extendMode=fj;i.copyState=cp;i.startState=cm;i.innerMode=g7;i.commands=fi;i.keyMap=fW;i.keyName=gb;i.isModifierKey=ff;i.lookupKey=k;i.normalizeKeyMap=c8;i.StringStream=fD;i.SharedTextMarker=z;i.TextMarker=V;i.LineWidget=d6;i.e_preventDefault=c7;i.e_stopPropagation=dX;i.e_stop=e3;i.addClass=gn;i.contains=ha;i.rmClass=h;i.keyNames=f1}fn(L);ek(L);var d="iter insert remove copy getEditor constructor".split(" ");for(var b4 in aC.prototype){if(aC.prototype.hasOwnProperty(b4)&&dP(d,b4)<0){L.prototype[b4]=(function(i){return function(){return i.apply(this.doc,arguments)}})(aC.prototype[b4])}}bS(aC);L.inputStyles={textarea:ad,contenteditable:d1};L.defineMode=function(i){if(!L.defaults.mode&&i!="null"){L.defaults.mode=i}e6.apply(this,arguments)};L.defineMIME=bD;L.defineMode("null",function(){return({token:function(i){return i.skipToEnd()}})});L.defineMIME("text/plain","null");L.defineExtension=function(i,hk){L.prototype[i]=hk};L.defineDocExtension=function(i,hk){aC.prototype[i]=hk};L.fromTextArea=gu;gz(L);L.version="5.46.0";return L})));(function(a){"function"==typeof a.define&&a.define("core",["codemirror.js"],function(b){a.CodeMirror=b})})(this);
@@ -1 +1 @@
1
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{h="error";return d}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{h="error";return B}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/$/,blockCommentStart:"",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(ag,ar){var n=ag.indentUnit;var D=ar.statementIndent;var aH=ar.jsonld;var C=ar.json||aH;var g=ar.typescript;var aC=ar.wordCharacters||/[\w$\xa1-\uffff]/;var aA=function(){function a0(a2){return{type:a2,style:"keyword"}}var aV=a0("keyword a"),aT=a0("keyword b"),aS=a0("keyword c"),aR=a0("keyword d");var aU=a0("operator"),aY={type:"atom",style:"atom"};var aW={"if":a0("if"),"while":aV,"with":aV,"else":aT,"do":aT,"try":aT,"finally":aT,"return":aR,"break":aR,"continue":aR,"new":a0("new"),"delete":aS,"void":aS,"throw":aS,"debugger":a0("debugger"),"var":a0("var"),"const":a0("var"),let:a0("var"),"function":a0("function"),"catch":a0("catch"),"for":a0("for"),"switch":a0("switch"),"case":a0("case"),"default":a0("default"),"in":aU,"typeof":aU,"instanceof":aU,"true":aY,"false":aY,"null":aY,"undefined":aY,"NaN":aY,"Infinity":aY,"this":a0("this"),"class":a0("class"),"super":a0("atom"),yield:aS,"export":a0("export"),"import":a0("import"),"extends":aS,await:aS};if(g){var a1={type:"variable",style:"type"};var aX={"interface":a0("class"),"implements":aS,namespace:aS,module:a0("module"),"enum":a0("module"),"public":a0("modifier"),"private":a0("modifier"),"protected":a0("modifier"),"abstract":a0("modifier"),readonly:a0("modifier"),string:a1,number:a1,"boolean":a1,any:a1};for(var aZ in aX){aW[aZ]=aX[aZ]}}return aW}();var U=/[+\-*&%=<>!?|~^@]/;var az=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function I(aU){var aS=false,aR,aT=false;while((aR=aU.next())!=null){if(!aS){if(aR=="/"&&!aT){return}if(aR=="["){aT=true}else{if(aT&&aR=="]"){aT=false}}}aS=!aS&&aR=="\\"}}var Y,J;function Q(aT,aS,aR){Y=aT;J=aR;return aS}function aa(aV,aT){var aR=aV.next();if(aR=='"'||aR=="'"){aT.tokenize=X(aR);return aT.tokenize(aV,aT)}else{if(aR=="."&&aV.match(/^\d+(?:[eE][+\-]?\d+)?/)){return Q("number","number")}else{if(aR=="."&&aV.match("..")){return Q("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aR)){return Q(aR)}else{if(aR=="="&&aV.eat(">")){return Q("=>","operator")}else{if(aR=="0"&&aV.eat(/x/i)){aV.eatWhile(/[\da-f]/i);return Q("number","number")}else{if(aR=="0"&&aV.eat(/o/i)){aV.eatWhile(/[0-7]/i);return Q("number","number")}else{if(aR=="0"&&aV.eat(/b/i)){aV.eatWhile(/[01]/i);return Q("number","number")}else{if(/\d/.test(aR)){aV.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return Q("number","number")}else{if(aR=="/"){if(aV.eat("*")){aT.tokenize=aG;return aG(aV,aT)}else{if(aV.eat("/")){aV.skipToEnd();return Q("comment","comment")}else{if(aO(aV,aT,1)){I(aV);aV.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return Q("regexp","string-2")}else{aV.eat("=");return Q("operator","operator",aV.current())}}}}else{if(aR=="`"){aT.tokenize=aI;return aI(aV,aT)}else{if(aR=="#"){aV.skipToEnd();return Q("error","error")}else{if(U.test(aR)){if(aR!=">"||!aT.lexical||aT.lexical.type!=">"){if(aV.eat("=")){if(aR=="!"||aR=="="){aV.eat("=")}}else{if(/[<>*+\-]/.test(aR)){aV.eat(aR);if(aR==">"){aV.eat(aR)}}}}return Q("operator","operator",aV.current())}else{if(aC.test(aR)){aV.eatWhile(aC);var aU=aV.current();if(aT.lastType!="."){if(aA.propertyIsEnumerable(aU)){var aS=aA[aU];return Q(aS.type,aS.style,aU)}if(aU=="async"&&aV.match(/^\s*[\(\w]/,false)){return Q("async","keyword",aU)}}return Q("variable","variable",aU)}}}}}}}}}}}}}}}function X(aR){return function(aV,aT){var aU=false,aS;if(aH&&aV.peek()=="@"&&aV.match(az)){aT.tokenize=aa;return Q("jsonld-keyword","meta")}while((aS=aV.next())!=null){if(aS==aR&&!aU){break}aU=!aU&&aS=="\\"}if(!aU){aT.tokenize=aa}return Q("string","string")}}function aG(aU,aT){var aR=false,aS;while(aS=aU.next()){if(aS=="/"&&aR){aT.tokenize=aa;break}aR=(aS=="*")}return Q("comment","comment")}function aI(aU,aS){var aT=false,aR;while((aR=aU.next())!=null){if(!aT&&(aR=="`"||aR=="$"&&aU.eat("{"))){aS.tokenize=aa;break}aT=!aT&&aR=="\\"}return Q("quasi","string-2",aU.current())}var o="([{}])";function aE(aZ,aT){if(aT.fatArrowAt){aT.fatArrowAt=null}var aY=aZ.string.indexOf("=>",aZ.start);if(aY<0){return}if(g){var aV=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(aZ.string.slice(aZ.start,aY));if(aV){aY=aV.index}}var aW=0,aU=false;for(var aX=aY-1;aX>=0;--aX){var aR=aZ.string.charAt(aX);var aS=o.indexOf(aR);if(aS>=0&&aS<3){if(!aW){++aX;break}if(--aW==0){if(aR=="("){aU=true}break}}else{if(aS>=3&&aS<6){++aW}else{if(aC.test(aR)){aU=true}else{if(/["'\/]/.test(aR)){return}else{if(aU&&!aW){++aX;break}}}}}}if(aU&&!aW){aT.fatArrowAt=aX}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function O(aW,aS,aR,aV,aT,aU){this.indented=aW;this.column=aS;this.type=aR;this.prev=aT;this.info=aU;if(aV!=null){this.align=aV}}function v(aU,aT){for(var aS=aU.localVars;aS;aS=aS.next){if(aS.name==aT){return true}}for(var aR=aU.context;aR;aR=aR.prev){for(var aS=aR.vars;aS;aS=aS.next){if(aS.name==aT){return true}}}}function f(aV,aS,aR,aU,aW){var aX=aV.cc;H.state=aV;H.stream=aW;H.marked=null,H.cc=aX;H.style=aS;if(!aV.lexical.hasOwnProperty("align")){aV.lexical.align=true}while(true){var aT=aX.length?aX.pop():C?av:aN;if(aT(aR,aU)){while(aX.length&&aX[aX.length-1].lex){aX.pop()()}if(H.marked){return H.marked}if(aR=="variable"&&v(aV,aU)){return"variable-2"}return aS}}}var H={state:null,column:null,marked:null,cc:null};function ah(){for(var aR=arguments.length-1;aR>=0;aR--){H.cc.push(arguments[aR])}}function am(){ah.apply(null,arguments);return true}function aD(aS){function aR(aV){for(var aU=aV;aU;aU=aU.next){if(aU.name==aS){return true}}return false}var aT=H.state;H.marked="def";if(aT.context){if(aR(aT.localVars)){return}aT.localVars={name:aS,next:aT.localVars}}else{if(aR(aT.globalVars)){return}if(ar.globalVars){aT.globalVars={name:aS,next:aT.globalVars}}}}var t={name:"this",next:{name:"arguments"}};function z(){H.state.context={prev:H.state.context,vars:H.state.localVars};H.state.localVars=t}function A(){H.state.localVars=H.state.context.vars;H.state.context=H.state.context.prev}function aL(aS,aT){var aR=function(){var aW=H.state,aU=aW.indented;if(aW.lexical.type=="stat"){aU=aW.lexical.indented}else{for(var aV=aW.lexical;aV&&aV.type==")"&&aV.align;aV=aV.prev){aU=aV.indented}}aW.lexical=new O(aU,H.stream.column(),aS,null,aW.lexical,aT)};aR.lex=true;return aR}function h(){var aR=H.state;if(aR.lexical.prev){if(aR.lexical.type==")"){aR.indented=aR.lexical.indented}aR.lexical=aR.lexical.prev}}h.lex=true;function u(aR){function aS(aT){if(aT==aR){return am()}else{if(aR==";"){return ah()}else{return am(aS)}}}return aS}function aN(aR,aS){if(aR=="var"){return am(aL("vardef",aS.length),c,u(";"),h)}if(aR=="keyword a"){return am(aL("form"),aw,aN,h)}if(aR=="keyword b"){return am(aL("form"),aN,h)}if(aR=="keyword d"){return H.stream.match(/^\s*$/,false)?am():am(aL("stat"),aq,u(";"),h)}if(aR=="debugger"){return am(u(";"))}if(aR=="{"){return am(aL("}"),B,h)}if(aR==";"){return am()}if(aR=="if"){if(H.state.lexical.info=="else"&&H.state.cc[H.state.cc.length-1]==h){H.state.cc.pop()()}return am(aL("form"),aw,aN,h,d)}if(aR=="function"){return am(R)}if(aR=="for"){return am(aL("form"),x,aN,h)}if(aR=="variable"){if(g&&aS=="type"){H.marked="keyword";return am(j,u("operator"),j,u(";"))}if(g&&aS=="declare"){H.marked="keyword";return am(aN)}else{return am(aL("stat"),aP)}}if(aR=="switch"){return am(aL("form"),aw,u("{"),aL("}","switch"),B,h,h)}if(aR=="case"){return am(av,u(":"))}if(aR=="default"){return am(u(":"))}if(aR=="catch"){return am(aL("form"),z,u("("),al,u(")"),aN,h,A)}if(aR=="class"){return am(aL("form"),ac,h)}if(aR=="export"){return am(aL("stat"),aM,h)}if(aR=="import"){return am(aL("stat"),an,h)}if(aR=="module"){return am(aL("form"),i,u("{"),aL("}"),B,h,h)}if(aR=="async"){return am(aN)}if(aS=="@"){return am(av,aN)}return ah(aL("stat"),av,u(";"),h)}function av(aR){return af(aR,false)}function aK(aR){return af(aR,true)}function aw(aR){if(aR!="("){return ah()}return am(aL(")"),av,u(")"),h)}function af(aS,aU){if(H.state.fatArrowAt==H.stream.start){var aR=aU?S:ad;if(aS=="("){return am(z,aL(")"),aB(al,")"),h,u("=>"),aR,A)}else{if(aS=="variable"){return ah(z,i,u("=>"),aR,A)}}}var aT=aU?k:ai;if(b.hasOwnProperty(aS)){return am(aT)}if(aS=="function"){return am(R,aT)}if(aS=="class"){return am(aL("form"),M,h)}if(aS=="keyword c"||aS=="async"){return am(aU?aK:av)}if(aS=="("){return am(aL(")"),aq,u(")"),h,aT)}if(aS=="operator"||aS=="spread"){return am(aU?aK:av)}if(aS=="["){return am(aL("]"),p,h,aT)}if(aS=="{"){return aF(w,"}",null,aT)}if(aS=="quasi"){return ah(V,aT)}if(aS=="new"){return am(L(aU))}return am()}function aq(aR){if(aR.match(/[;\}\)\],]/)){return ah()}return ah(av)}function ai(aR,aS){if(aR==","){return am(av)}return k(aR,aS,false)}function k(aR,aT,aV){var aS=aV==false?ai:k;var aU=aV==false?av:aK;if(aR=="=>"){return am(z,aV?S:ad,A)}if(aR=="operator"){if(/\+\+|--/.test(aT)||g&&aT=="!"){return am(aS)}if(aT=="?"){return am(av,u(":"),aU)}return am(aU)}if(aR=="quasi"){return ah(V,aS)}if(aR==";"){return}if(aR=="("){return aF(aK,")","call",aS)}if(aR=="."){return am(at,aS)}if(aR=="["){return am(aL("]"),aq,u("]"),h,aS)}if(g&&aT=="as"){H.marked="keyword";return am(j,aS)}if(aR=="regexp"){H.state.lastType=H.marked="operator";H.stream.backUp(H.stream.pos-H.stream.start-1);return am(aU)}}function V(aR,aS){if(aR!="quasi"){return ah()}if(aS.slice(aS.length-2)!="${"){return am(V)}return am(av,s)}function s(aR){if(aR=="}"){H.marked="string-2";H.state.tokenize=aI;return am(V)}}function ad(aR){aE(H.stream,H.state);return ah(aR=="{"?aN:av)}function S(aR){aE(H.stream,H.state);return ah(aR=="{"?aN:aK)}function L(aR){return function(aS){if(aS=="."){return am(aR?q:ab)}else{if(aS=="variable"&&g){return am(e,aR?k:ai)}else{return ah(aR?aK:av)}}}}function ab(aR,aS){if(aS=="target"){H.marked="keyword";return am(ai)}}function q(aR,aS){if(aS=="target"){H.marked="keyword";return am(k)}}function aP(aR){if(aR==":"){return am(h,aN)}return ah(ai,u(";"),h)}function at(aR){if(aR=="variable"){H.marked="property";return am()}}function w(aS,aT){if(aS=="async"){H.marked="property";return am(w)}else{if(aS=="variable"||H.style=="keyword"){H.marked="property";if(aT=="get"||aT=="set"){return am(N)}var aR;if(g&&H.state.fatArrowAt==H.stream.start&&(aR=H.stream.match(/^\s*:\s*/,false))){H.state.fatArrowAt=H.stream.pos+aR[0].length}return am(P)}else{if(aS=="number"||aS=="string"){H.marked=aH?"property":(H.style+" property");return am(P)}else{if(aS=="jsonld-keyword"){return am(P)}else{if(aS=="modifier"){return am(w)}else{if(aS=="["){return am(av,u("]"),P)}else{if(aS=="spread"){return am(aK,P)}else{if(aT=="*"){H.marked="keyword";return am(w)}else{if(aS==":"){return ah(P)}}}}}}}}}}function N(aR){if(aR!="variable"){return ah(P)}H.marked="property";return am(R)}function P(aR){if(aR==":"){return am(aK)}if(aR=="("){return ah(R)}}function aB(aU,aR,aS){function aT(aW,aX){if(aS?aS.indexOf(aW)>-1:aW==","){var aV=H.state.lexical;if(aV.info=="call"){aV.pos=(aV.pos||0)+1}return am(function(aY,aZ){if(aY==aR||aZ==aR){return ah()}return ah(aU)},aT)}if(aW==aR||aX==aR){return am()}return am(u(aR))}return function(aV,aW){if(aV==aR||aW==aR){return am()}return ah(aU,aT)}}function aF(aU,aR,aT){for(var aS=3;aS"){return am(j)}}function au(aR,aS){if(aR=="variable"||H.style=="keyword"){H.marked="property";return am(au)}else{if(aS=="?"){return am(au)}else{if(aR==":"){return am(j)}else{if(aR=="["){return am(av,Z,u("]"),au)}}}}}function aj(aR){if(aR=="variable"){return am(aj)}else{if(aR==":"){return am(j)}}}function K(aR,aS){if(aS=="<"){return am(aL(">"),aB(j,">"),h,K)}if(aS=="|"||aR=="."){return am(j)}if(aR=="["){return am(u("]"),K)}if(aS=="extends"){return am(j)}}function e(aR,aS){if(aS=="<"){return am(aL(">"),aB(j,">"),h,K)}}function c(){return ah(i,Z,ak,ae)}function i(aR,aS){if(aR=="modifier"){return am(i)}if(aR=="variable"){aD(aS);return am()}if(aR=="spread"){return am(i)}if(aR=="["){return aF(i,"]")}if(aR=="{"){return aF(aJ,"}")}}function aJ(aR,aS){if(aR=="variable"&&!H.stream.match(/^\s*:/,false)){aD(aS);return am(ak)}if(aR=="variable"){H.marked="property"}if(aR=="spread"){return am(i)}if(aR=="}"){return ah()}return am(u(":"),i,ak)}function ak(aR,aS){if(aS=="="){return am(aK)}}function ae(aR){if(aR==","){return am(c)}}function d(aR,aS){if(aR=="keyword b"&&aS=="else"){return am(aL("form","else"),aN,h)}}function x(aR){if(aR=="("){return am(aL(")"),G,u(")"),h)}}function G(aR){if(aR=="var"){return am(c,u(";"),F)}if(aR==";"){return am(F)}if(aR=="variable"){return am(y)}return ah(av,u(";"),F)}function y(aR,aS){if(aS=="in"||aS=="of"){H.marked="keyword";return am(av)}return am(ai,F)}function F(aR,aS){if(aR==";"){return am(E)}if(aS=="in"||aS=="of"){H.marked="keyword";return am(av)}return ah(av,u(";"),E)}function E(aR){if(aR!=")"){am(av)}}function R(aR,aS){if(aS=="*"){H.marked="keyword";return am(R)}if(aR=="variable"){aD(aS);return am(R)}if(aR=="("){return am(z,aL(")"),aB(al,")"),h,Z,aN,A)}if(g&&aS=="<"){return am(aL(">"),aB(j,">"),h,R)}}function al(aR,aS){if(aS=="@"){am(av,al)}if(aR=="spread"||aR=="modifier"){return am(al)}return ah(i,Z,ak)}function M(aR,aS){if(aR=="variable"){return ac(aR,aS)}return T(aR,aS)}function ac(aR,aS){if(aR=="variable"){aD(aS);return am(T)}}function T(aR,aS){if(aS=="<"){return am(aL(">"),aB(j,">"),h,T)}if(aS=="extends"||aS=="implements"||(g&&aR==",")){return am(g?j:av,T)}if(aR=="{"){return am(aL("}"),r,h)}}function r(aR,aS){if(aR=="modifier"||aR=="async"||(aR=="variable"&&(aS=="static"||aS=="get"||aS=="set")&&H.stream.match(/^\s+[\w$\xa1-\uffff]/,false))){H.marked="keyword";return am(r)}if(aR=="variable"||H.style=="keyword"){H.marked="property";return am(g?aQ:R,r)}if(aR=="["){return am(av,u("]"),g?aQ:R,r)}if(aS=="*"){H.marked="keyword";return am(r)}if(aR==";"){return am(r)}if(aR=="}"){return am()}if(aS=="@"){return am(av,r)}}function aQ(aR,aS){if(aS=="?"){return am(aQ)}if(aR==":"){return am(j,ak)}if(aS=="="){return am(aK)}return ah(R)}function aM(aR,aS){if(aS=="*"){H.marked="keyword";return am(ap,u(";"))}if(aS=="default"){H.marked="keyword";return am(av,u(";"))}if(aR=="{"){return am(aB(ao,"}"),ap,u(";"))}return ah(aN)}function ao(aR,aS){if(aS=="as"){H.marked="keyword";return am(u("variable"))}if(aR=="variable"){return ah(aK,ao)}}function an(aR){if(aR=="string"){return am()}return ah(ay,m,ap)}function ay(aR,aS){if(aR=="{"){return aF(ay,"}")}if(aR=="variable"){aD(aS)}if(aS=="*"){H.marked="keyword"}return am(l)}function m(aR){if(aR==","){return am(ay,m)}}function l(aR,aS){if(aS=="as"){H.marked="keyword";return am(ay)}}function ap(aR,aS){if(aS=="from"){H.marked="keyword";return am(av)}}function p(aR){if(aR=="]"){return am()}return ah(aB(aK,"]"))}function ax(aS,aR){return aS.lastType=="operator"||aS.lastType==","||U.test(aR.charAt(0))||/[,.]/.test(aR.charAt(0))}function aO(aT,aS,aR){return aS.tokenize==aa&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(aS.lastType)||(aS.lastType=="quasi"&&/\{\s*$/.test(aT.string.slice(0,aT.pos-(aR||0))))}return{startState:function(aS){var aR={tokenize:aa,lastType:"sof",cc:[],lexical:new O((aS||0)-n,0,"block",false),localVars:ar.localVars,context:ar.localVars&&{vars:ar.localVars},indented:aS||0};if(ar.globalVars&&typeof ar.globalVars=="object"){aR.globalVars=ar.globalVars}return aR},token:function(aT,aS){if(aT.sol()){if(!aS.lexical.hasOwnProperty("align")){aS.lexical.align=false}aS.indented=aT.indentation();aE(aT,aS)}if(aS.tokenize!=aG&&aT.eatSpace()){return null}var aR=aS.tokenize(aT,aS);if(Y=="comment"){return aR}aS.lastType=Y=="operator"&&(J=="++"||J=="--")?"incdec":Y;return f(aS,aR,Y,J,aT)},indent:function(aR,aU){if(aR.tokenize==aG){return a.Pass}if(aR.tokenize!=aa){return 0}var aY=aU&&aU.charAt(0),aZ=aR.lexical,aX;if(!/^\s*else\b/.test(aU)){for(var aT=aR.cc.length-1;aT>=0;--aT){var aV=aR.cc[aT];if(aV==h){aZ=aZ.prev}else{if(aV!=d){break}}}}while((aZ.type=="stat"||aZ.type=="form")&&(aY=="}"||((aX=aR.cc[aR.cc.length-1])&&(aX==ai||aX==k)&&!/^[,\.=+\-*:?[\(]/.test(aU)))){aZ=aZ.prev}if(D&&aZ.type==")"&&aZ.prev.type=="stat"){aZ=aZ.prev}var aW=aZ.type,aS=aY==aW;if(aW=="vardef"){return aZ.indented+(aR.lastType=="operator"||aR.lastType==","?aZ.info+1:0)}else{if(aW=="form"&&aY=="{"){return aZ.indented}else{if(aW=="form"){return aZ.indented+n}else{if(aW=="stat"){return aZ.indented+(ax(aR,aU)?D||n:0)}else{if(aZ.info=="switch"&&!aS&&ar.doubleIndentSwitch!=false){return aZ.indented+(/^(?:case|default)\b/.test(aU)?n:2*n)}else{if(aZ.align){return aZ.column+(aS?0:1)}else{return aZ.indented+(aS?0:n)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:C?null:"/*",blockCommentEnd:C?null:"*/",blockCommentContinue:C?null:" * ",lineComment:C?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:C?"json":"javascript",jsonldMode:aH,jsonMode:C,expressionAllowed:aO,skipExpression:function(aR){var aS=aR.cc[aR.cc.length-1];if(aS==av||aS==aK){aR.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Z,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Z.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},Y=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},X=J.counterDescriptors||{},O=J.colorKeywords||{},T=J.valueKeywords||{},M=J.allowNested,S=J.lineComment,V=J.supportsAtComponent===true;var C,N;function aa(ad,ae){C=ae;return ad}function ac(ag,af){var ae=ag.next();if(A[ae]){var ad=A[ae](ag,af);if(ad!==false){return ad}}if(ae=="@"){ag.eatWhile(/[\w\\\-]/);return aa("def",ag.current())}else{if(ae=="="||(ae=="~"||ae=="|")&&ag.eat("=")){return aa(null,"compare")}else{if(ae=='"'||ae=="'"){af.tokenize=K(ae);return af.tokenize(ag,af)}else{if(ae=="#"){ag.eatWhile(/[\w\\\-]/);return aa("atom","hash")}else{if(ae=="!"){ag.match(/^\s*\w*/);return aa("keyword","important")}else{if(/\d/.test(ae)||ae=="."&&ag.eat(/\d/)){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ae==="-"){if(/[\d.]/.test(ag.peek())){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ag.match(/^-[\w\\\-]+/)){ag.eatWhile(/[\w\\\-]/);if(ag.match(/^\s*:/,false)){return aa("variable-2","variable-definition")}return aa("variable-2","variable")}else{if(ag.match(/^\w+-/)){return aa("meta","meta")}}}}else{if(/[,+>*\/]/.test(ae)){return aa(null,"select-op")}else{if(ae=="."&&ag.match(/^-?[_a-z][_a-z0-9-]*/i)){return aa("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ae)){return aa(null,ae)}else{if((ae=="u"&&ag.match(/rl(-prefix)?\(/))||(ae=="d"&&ag.match("omain("))||(ae=="r"&&ag.match("egexp("))){ag.backUp(1);af.tokenize=ab;return aa("property","word")}else{if(/[\w\\\-]/.test(ae)){ag.eatWhile(/[\w\\\-]/);return aa("property","word")}else{return aa(null,null)}}}}}}}}}}}}}function K(ad){return function(ah,af){var ag=false,ae;while((ae=ah.next())!=null){if(ae==ad&&!ag){if(ad==")"){ah.backUp(1)}break}ag=!ag&&ae=="\\"}if(ae==ad||!ag&&ad!=")"){af.tokenize=null}return aa("string","string")}}function ab(ae,ad){ae.next();if(!ae.match(/\s*[\"\')]/,false)){ad.tokenize=K(")")}else{ad.tokenize=null}return aa(null,"(")}function R(ae,ad,af){this.type=ae;this.indent=ad;this.prev=af}function G(af,ag,ae,ad){af.context=new R(ae,ag.indentation()+(ad===false?0:Q),af.context);return ae}function U(ad){if(ad.context.prev){ad.context=ad.context.prev}return ad.context.type}function z(ad,af,ae){return F[ae.context.type](ad,af,ae)}function W(ae,ag,af,ah){for(var ad=ah||1;ad>0;ad--){af.context=af.context.prev}return z(ae,ag,af)}function H(ae){var ad=ae.current().toLowerCase();if(T.hasOwnProperty(ad)){N="atom"}else{if(O.hasOwnProperty(ad)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ad,af,ae){if(ad=="{"){return G(ae,af,"block")}else{if(ad=="}"&&ae.context.prev){return U(ae)}else{if(V&&/@component/.test(ad)){return G(ae,af,"atComponentBlock")}else{if(/^@(-moz-)?document$/.test(ad)){return G(ae,af,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/.test(ad)){return G(ae,af,"atBlock")}else{if(/^@(font-face|counter-style)/.test(ad)){ae.stateArg=ad;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(ad)){return"keyframes"}else{if(ad&&ad.charAt(0)=="@"){return G(ae,af,"at")}else{if(ad=="hash"){N="builtin"}else{if(ad=="word"){N="tag"}else{if(ad=="variable-definition"){return"maybeprop"}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}else{if(ad==":"){return"pseudo"}else{if(M&&ad=="("){return G(ae,af,"parens")}}}}}}}}}}}}}}return ae.context.type};F.block=function(ad,ag,ae){if(ad=="word"){var af=ag.current().toLowerCase();if(I.hasOwnProperty(af)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(af)){N="string-2";return"maybeprop"}else{if(M){N=ag.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ad=="meta"){return"block"}else{if(!M&&(ad=="hash"||ad=="qualifier")){N="error";return"block"}else{return F.top(ad,ag,ae)}}}};F.maybeprop=function(ad,af,ae){if(ad==":"){return G(ae,af,"prop")}return z(ad,af,ae)};F.prop=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"&&M){return G(ae,af,"propBlock")}if(ad=="}"||ad=="{"){return W(ad,af,ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(af.current())){N+=" error"}else{if(ad=="word"){H(af)}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}}}return"prop"};F.propBlock=function(ae,ad,af){if(ae=="}"){return U(af)}if(ae=="word"){N="property";return"maybeprop"}return af.context.type};F.parens=function(ad,af,ae){if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad==")"){return U(ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="interpolation"){return G(ae,af,"interpolation")}if(ad=="word"){H(af)}return"parens"};F.pseudo=function(ad,af,ae){if(ad=="meta"){return"pseudo"}if(ad=="word"){N="variable-3";return ae.context.type}return z(ad,af,ae)};F.documentTypes=function(ad,af,ae){if(ad=="word"&&y.hasOwnProperty(af.current())){N="tag";return ae.context.type}else{return F.atBlock(ad,af,ae)}};F.atBlock=function(ad,ag,ae){if(ad=="("){return G(ae,ag,"atBlock_parens")}if(ad=="}"||ad==";"){return W(ad,ag,ae)}if(ad=="{"){return U(ae)&&G(ae,ag,M?"block":"top")}if(ad=="interpolation"){return G(ae,ag,"interpolation")}if(ad=="word"){var af=ag.current().toLowerCase();if(af=="only"||af=="not"||af=="and"||af=="or"){N="keyword"}else{if(Y.hasOwnProperty(af)){N="attribute"}else{if(L.hasOwnProperty(af)){N="property"}else{if(P.hasOwnProperty(af)){N="keyword"}else{if(I.hasOwnProperty(af)){N="property"}else{if(B.hasOwnProperty(af)){N="string-2"}else{if(T.hasOwnProperty(af)){N="atom"}else{if(O.hasOwnProperty(af)){N="keyword"}else{N="error"}}}}}}}}}return ae.context.type};F.atComponentBlock=function(ad,af,ae){if(ad=="}"){return W(ad,af,ae)}if(ad=="{"){return U(ae)&&G(ae,af,M?"block":"top",false)}if(ad=="word"){N="error"}return ae.context.type};F.atBlock_parens=function(ad,af,ae){if(ad==")"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae,2)}return F.atBlock(ad,af,ae)};F.restricted_atBlock_before=function(ad,af,ae){if(ad=="{"){return G(ae,af,"restricted_atBlock")}if(ad=="word"&&ae.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ad,af,ae)};F.restricted_atBlock=function(ad,af,ae){if(ad=="}"){ae.stateArg=null;return U(ae)}if(ad=="word"){if((ae.stateArg=="@font-face"&&!E.hasOwnProperty(af.current().toLowerCase()))||(ae.stateArg=="@counter-style"&&!X.hasOwnProperty(af.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ad,af,ae){if(ad=="word"){N="variable";return"keyframes"}if(ad=="{"){return G(ae,af,"top")}return z(ad,af,ae)};F.at=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad=="word"){N="tag"}else{if(ad=="hash"){N="builtin"}}return"at"};F.interpolation=function(ad,af,ae){if(ad=="}"){return U(ae)}if(ad=="{"||ad==";"){return W(ad,af,ae)}if(ad=="word"){N="variable"}else{if(ad!="variable"&&ad!="("&&ad!=")"){N="error"}}return"interpolation"};return{startState:function(ad){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ad||0,null)}},token:function(af,ae){if(!ae.tokenize&&af.eatSpace()){return null}var ad=(ae.tokenize||ac)(af,ae);if(ad&&typeof ad=="object"){C=ad[1];ad=ad[0]}N=ad;if(C!="comment"){ae.state=F[ae.state](C,af,ae)}return N},indent:function(ah,af){var ae=ah.context,ag=af&&af.charAt(0);var ad=ae.indent;if(ae.type=="prop"&&(ag=="}"||ag==")")){ae=ae.prev}if(ae.prev){if(ag=="}"&&(ae.type=="block"||ae.type=="top"||ae.type=="interpolation"||ae.type=="restricted_atBlock")){ae=ae.prev;ad=ae.indent}else{if(ag==")"&&(ae.type=="parens"||ae.type=="atBlock_parens")||ag=="{"&&(ae.type=="at"||ae.type=="atBlock")){ad=Math.max(0,ae.indent-Q)}}}return ad},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:S,fold:"brace"}});function g(A){var z={};for(var y=0;y-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(t,s,r){if(!t.localMode||/^\s*<\//.test(s)){return q.indent(t.htmlState,s)}else{if(t.localMode.indent){return t.localMode.indent(t.localState,s,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});CodeMirror.defineMode("bbcodemixed",function(c){var f,e,g,d,h=CodeMirror.getMode(c,"htmlmixed"),b=CodeMirror.getMode(c,"bbcode"),f={bbCodeLiteral:"literal"};if(c.hasOwnProperty("bbCodeLiteral")){f.bbCodeLiteral=c.bbCodeLiteral}function a(i){return i.replace(/([\[\]\.\-\+\<\>\?\:\(\)\{\}])/g,"\\$1")}e={hasLeftDelimeter:/.*\[/,htmlHasLeftDelimeter:/[^\<\>]*\[/,literalOpen:new RegExp(a("["+f.bbCodeLiteral+"]")),literalClose:new RegExp(a("[/"+f.bbCodeLiteral+"]"))};g={chain:function(j,i,k){i.tokenize=k;return k(j,i)},cleanChain:function(j,i,k){i.tokenize=null;i.localState=null;i.localMode=null;return(typeof k=="string")?(k?k:null):k(j,i)},maybeBackup:function(o,j,k){j=a(j);var n=o.current();var l=n.search(j),i;if(l>-1){o.backUp(n.length-l)}else{if(i=n.match(/<\/?$/)){o.backUp(n.length);if(!o.match(j,false)){o.match(n[0])}}}return k}};d={html:function(j,i){if(!i.inLiteral&&j.match(e.htmlHasLeftDelimeter,false)&&i.htmlMixedState.htmlState.tagName===null){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}else{if(!i.inLiteral&&j.match("[",false)){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}}return h.token(j,i.htmlMixedState)},bbcode:function(j,i){if(j.match("]",false)){j.eat("]");i.tokenize=d.html;i.localMode=h;i.localState=i.htmlMixedState;return"tag"}return g.maybeBackup(j,"]",b.token(j,i.localState))},inBlock:function(j,i){return function(l,k){while(!l.eol()){if(l.match(i)){g.cleanChain(l,k,"");break}l.next()}return j}}};return{startState:function(){var i=h.startState();return{token:d.html,localMode:null,localState:null,htmlMixedState:i,tokenize:null,inLiteral:false}},copyState:function(k){var j=null,i=(k.tokenize||k.token);if(k.localState){j=CodeMirror.copyState((i!=d.html?b:h),k.localState)}return{token:k.token,tokenize:k.tokenize,localMode:k.localMode,localState:j,htmlMixedState:CodeMirror.copyState(h,k.htmlMixedState),inLiteral:k.inLiteral}},token:function(k,j){if(k.match("[",false)){if(!j.inLiteral&&k.match(e.literalOpen,true)){j.inLiteral=true;return"keyword"}else{if(j.inLiteral&&k.match(e.literalClose,true)){j.inLiteral=false;return"keyword"}}}if(j.inLiteral&&j.localState!=j.htmlMixedState){j.tokenize=d.html;j.localMode=h;j.localState=j.htmlMixedState}var i=(j.tokenize||j.token)(k,j);return i},indent:function(j,i){if(j.localMode==b||(j.inLiteral&&!j.localMode)||e.hasLeftDelimeter.test(i)){return CodeMirror.Pass}return h.indent(j.htmlMixedState,i)},innerMode:function(i){return{state:i.localState||i.htmlMixedState,mode:i.localMode||h}}}},"xml","javascript","css");CodeMirror.defineMIME("text/x-bbcode","bbcodemixed");
1
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,allowMissingTagName:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{if(z.allowMissingTagName&&C=="endTag"){h="tag bracket";return e(C,E,D)}else{h="error";return d}}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{if(z.allowMissingTagName&&D=="endTag"){h="tag bracket";return u(D,F,E)}else{h="error";return B}}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/$/,blockCommentStart:"",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(an,aA){var p=an.indentUnit;var F=aA.statementIndent;var aT=aA.jsonld;var D=aA.json||aT;var h=aA.typescript;var aL=aA.wordCharacters||/[\w$\xa1-\uffff]/;var aJ=function(){function a8(bc){return{type:bc,style:"keyword"}}var a5=a8("keyword a"),bb=a8("keyword b"),ba=a8("keyword c"),a9=a8("keyword d");var a6=a8("operator"),a7={type:"atom",style:"atom"};return{"if":a8("if"),"while":a5,"with":a5,"else":bb,"do":bb,"try":bb,"finally":bb,"return":a9,"break":a9,"continue":a9,"new":a8("new"),"delete":ba,"void":ba,"throw":ba,"debugger":a8("debugger"),"var":a8("var"),"const":a8("var"),let:a8("var"),"function":a8("function"),"catch":a8("catch"),"for":a8("for"),"switch":a8("switch"),"case":a8("case"),"default":a8("default"),"in":a6,"typeof":a6,"instanceof":a6,"true":a7,"false":a7,"null":a7,"undefined":a7,"NaN":a7,"Infinity":a7,"this":a8("this"),"class":a8("class"),"super":a8("atom"),yield:ba,"export":a8("export"),"import":a8("import"),"extends":ba,await:ba}}();var Y=/[+\-*&%=<>!?|~^@]/;var aI=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function J(a8){var a6=false,a5,a7=false;while((a5=a8.next())!=null){if(!a6){if(a5=="/"&&!a7){return}if(a5=="["){a7=true}else{if(a7&&a5=="]"){a7=false}}}a6=!a6&&a5=="\\"}}var ad,K;function S(a7,a6,a5){ad=a7;K=a5;return a6}function af(a9,a7){var a5=a9.next();if(a5=='"'||a5=="'"){a7.tokenize=ac(a5);return a7.tokenize(a9,a7)}else{if(a5=="."&&a9.match(/^\d+(?:[eE][+\-]?\d+)?/)){return S("number","number")}else{if(a5=="."&&a9.match("..")){return S("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(a5)){return S(a5)}else{if(a5=="="&&a9.eat(">")){return S("=>","operator")}else{if(a5=="0"&&a9.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)){return S("number","number")}else{if(/\d/.test(a5)){a9.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);return S("number","number")}else{if(a5=="/"){if(a9.eat("*")){a7.tokenize=aS;return aS(a9,a7)}else{if(a9.eat("/")){a9.skipToEnd();return S("comment","comment")}else{if(a1(a9,a7,1)){J(a9);a9.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);return S("regexp","string-2")}else{a9.eat("=");return S("operator","operator",a9.current())}}}}else{if(a5=="`"){a7.tokenize=aV;return aV(a9,a7)}else{if(a5=="#"){a9.skipToEnd();return S("error","error")}else{if(Y.test(a5)){if(a5!=">"||!a7.lexical||a7.lexical.type!=">"){if(a9.eat("=")){if(a5=="!"||a5=="="){a9.eat("=")}}else{if(/[<>*+\-]/.test(a5)){a9.eat(a5);if(a5==">"){a9.eat(a5)}}}}return S("operator","operator",a9.current())}else{if(aL.test(a5)){a9.eatWhile(aL);var a8=a9.current();if(a7.lastType!="."){if(aJ.propertyIsEnumerable(a8)){var a6=aJ[a8];return S(a6.type,a6.style,a8)}if(a8=="async"&&a9.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,false)){return S("async","keyword",a8)}}return S("variable","variable",a8)}}}}}}}}}}}}}function ac(a5){return function(a9,a7){var a8=false,a6;if(aT&&a9.peek()=="@"&&a9.match(aI)){a7.tokenize=af;return S("jsonld-keyword","meta")}while((a6=a9.next())!=null){if(a6==a5&&!a8){break}a8=!a8&&a6=="\\"}if(!a8){a7.tokenize=af}return S("string","string")}}function aS(a8,a7){var a5=false,a6;while(a6=a8.next()){if(a6=="/"&&a5){a7.tokenize=af;break}a5=(a6=="*")}return S("comment","comment")}function aV(a8,a6){var a7=false,a5;while((a5=a8.next())!=null){if(!a7&&(a5=="`"||a5=="$"&&a8.eat("{"))){a6.tokenize=af;break}a7=!a7&&a5=="\\"}return S("quasi","string-2",a8.current())}var q="([{}])";function aP(bd,a7){if(a7.fatArrowAt){a7.fatArrowAt=null}var bc=bd.string.indexOf("=>",bd.start);if(bc<0){return}if(h){var a9=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(bd.string.slice(bd.start,bc));if(a9){bc=a9.index}}var ba=0,a8=false;for(var bb=bc-1;bb>=0;--bb){var a5=bd.string.charAt(bb);var a6=q.indexOf(a5);if(a6>=0&&a6<3){if(!ba){++bb;break}if(--ba==0){if(a5=="("){a8=true}break}}else{if(a6>=3&&a6<6){++ba}else{if(aL.test(a5)){a8=true}else{if(/["'\/]/.test(a5)){return}else{if(a8&&!ba){++bb;break}}}}}}if(a8&&!ba){a7.fatArrowAt=bb}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function Q(ba,a6,a5,a9,a7,a8){this.indented=ba;this.column=a6;this.type=a5;this.prev=a7;this.info=a8;if(a9!=null){this.align=a9}}function x(a8,a7){for(var a6=a8.localVars;a6;a6=a6.next){if(a6.name==a7){return true}}for(var a5=a8.context;a5;a5=a5.prev){for(var a6=a5.vars;a6;a6=a6.next){if(a6.name==a7){return true}}}}function g(a9,a6,a5,a8,ba){var bb=a9.cc;I.state=a9;I.stream=ba;I.marked=null,I.cc=bb;I.style=a6;if(!a9.lexical.hasOwnProperty("align")){a9.lexical.align=true}while(true){var a7=bb.length?bb.pop():D?aE:aZ;if(a7(a5,a8)){while(bb.length&&bb[bb.length-1].lex){bb.pop()()}if(I.marked){return I.marked}if(a5=="variable"&&x(a9,a8)){return"variable-2"}return a6}}}var I={state:null,column:null,marked:null,cc:null};function ap(){for(var a5=arguments.length-1;a5>=0;a5--){I.cc.push(arguments[a5])}}function av(){ap.apply(null,arguments);return true}function f(a6,a7){for(var a5=a7;a5;a5=a5.next){if(a5.name==a6){return true}}return false}function aO(a5){var a6=I.state;I.marked="def";if(a6.context){if(a6.lexical.info=="var"&&a6.context&&a6.context.block){var a7=aN(a5,a6.context);if(a7!=null){a6.context=a7;return}}else{if(!f(a5,a6.localVars)){a6.localVars=new a0(a5,a6.localVars);return}}}if(aA.globalVars&&!f(a5,a6.globalVars)){a6.globalVars=new a0(a5,a6.globalVars)}}function aN(a6,a7){if(!a7){return null}else{if(a7.block){var a5=aN(a6,a7.prev);if(!a5){return null}if(a5==a7.prev){return a7}return new P(a5,a7.vars,true)}else{if(f(a6,a7.vars)){return a7}else{return new P(a7.prev,new a0(a6,a7.vars),false)}}}}function aB(a5){return a5=="public"||a5=="private"||a5=="protected"||a5=="abstract"||a5=="readonly"}function P(a5,a6,a7){this.prev=a5;this.vars=a6;this.block=a7}function a0(a5,a6){this.name=a5;this.next=a6}var v=new a0("this",new a0("arguments",null));function A(){I.state.context=new P(I.state.context,I.state.localVars,false);I.state.localVars=v}function al(){I.state.context=new P(I.state.context,I.state.localVars,true);I.state.localVars=null}function B(){I.state.localVars=I.state.context.vars;I.state.context=I.state.context.prev}B.lex=true;function aX(a6,a7){var a5=function(){var ba=I.state,a8=ba.indented;if(ba.lexical.type=="stat"){a8=ba.lexical.indented}else{for(var a9=ba.lexical;a9&&a9.type==")"&&a9.align;a9=a9.prev){a8=a9.indented}}ba.lexical=new Q(a8,I.stream.column(),a6,null,ba.lexical,a7)};a5.lex=true;return a5}function i(){var a5=I.state;if(a5.lexical.prev){if(a5.lexical.type==")"){a5.indented=a5.lexical.indented}a5.lexical=a5.lexical.prev}}i.lex=true;function w(a5){function a6(a7){if(a7==a5){return av()}else{if(a5==";"||a7=="}"||a7==")"||a7=="]"){return ap()}else{return av(a6)}}}return a6}function aZ(a5,a6){if(a5=="var"){return av(aX("vardef",a6),c,w(";"),i)}if(a5=="keyword a"){return av(aX("form"),aF,aZ,i)}if(a5=="keyword b"){return av(aX("form"),aZ,i)}if(a5=="keyword d"){return I.stream.match(/^\s*$/,false)?av():av(aX("stat"),az,w(";"),i)}if(a5=="debugger"){return av(w(";"))}if(a5=="{"){return av(aX("}"),al,C,i,B)}if(a5==";"){return av()}if(a5=="if"){if(I.state.lexical.info=="else"&&I.state.cc[I.state.cc.length-1]==i){I.state.cc.pop()()}return av(aX("form"),aF,aZ,i,d)}if(a5=="function"){return av(T)}if(a5=="for"){return av(aX("form"),z,aZ,i)}if(a5=="class"||(h&&a6=="interface")){I.marked="keyword";return av(aX("form",a5=="class"?a5:a6),ai,i)}if(a5=="variable"){if(h&&a6=="declare"){I.marked="keyword";return av(aZ)}else{if(h&&(a6=="module"||a6=="enum"||a6=="type")&&I.stream.match(/^\s*\w/,false)){I.marked="keyword";if(a6=="enum"){return av(aM)}else{if(a6=="type"){return av(ao,w("operator"),k,w(";"))}else{return av(aX("form"),j,w("{"),aX("}"),C,i,i)}}}else{if(h&&a6=="namespace"){I.marked="keyword";return av(aX("form"),aE,aZ,i)}else{if(h&&a6=="abstract"){I.marked="keyword";return av(aZ)}else{return av(aX("stat"),a2)}}}}}if(a5=="switch"){return av(aX("form"),aF,w("{"),aX("}","switch"),al,C,i,i,B)}if(a5=="case"){return av(aE,w(":"))}if(a5=="default"){return av(w(":"))}if(a5=="catch"){return av(aX("form"),A,W,aZ,i,B)}if(a5=="export"){return av(aX("stat"),aY,i)}if(a5=="import"){return av(aX("stat"),aw,i)}if(a5=="async"){return av(aZ)}if(a6=="@"){return av(aE,aZ)}return ap(aX("stat"),aE,w(";"),i)}function W(a5){if(a5=="("){return av(au,w(")"))}}function aE(a5,a6){return am(a5,a6,false)}function aW(a5,a6){return am(a5,a6,true)}function aF(a5){if(a5!="("){return ap()}return av(aX(")"),aE,w(")"),i)}function am(a6,a7,a9){if(I.state.fatArrowAt==I.stream.start){var a5=a9?U:aj;if(a6=="("){return av(A,aX(")"),aK(au,")"),i,w("=>"),a5,B)}else{if(a6=="variable"){return ap(A,j,w("=>"),a5,B)}}}var a8=a9?l:ar;if(b.hasOwnProperty(a6)){return av(a8)}if(a6=="function"){return av(T,a8)}if(a6=="class"||(h&&a7=="interface")){I.marked="keyword";return av(aX("form"),N,i)}if(a6=="keyword c"||a6=="async"){return av(a9?aW:aE)}if(a6=="("){return av(aX(")"),az,w(")"),i,a8)}if(a6=="operator"||a6=="spread"){return av(a9?aW:aE)}if(a6=="["){return av(aX("]"),r,i,a8)}if(a6=="{"){return aQ(y,"}",null,a8)}if(a6=="quasi"){return ap(Z,a8)}if(a6=="new"){return av(M(a9))}if(a6=="import"){return av(aE)}return av()}function az(a5){if(a5.match(/[;\}\)\],]/)){return ap()}return ap(aE)}function ar(a5,a6){if(a5==","){return av(aE)}return l(a5,a6,false)}function l(a5,a7,a9){var a6=a9==false?ar:l;var a8=a9==false?aE:aW;if(a5=="=>"){return av(A,a9?U:aj,B)}if(a5=="operator"){if(/\+\+|--/.test(a7)||h&&a7=="!"){return av(a6)}if(h&&a7=="<"&&I.stream.match(/^([^>]|<.*?>)*>\s*\(/,false)){return av(aX(">"),aK(k,">"),i,a6)}if(a7=="?"){return av(aE,w(":"),a8)}return av(a8)}if(a5=="quasi"){return ap(Z,a6)}if(a5==";"){return}if(a5=="("){return aQ(aW,")","call",a6)}if(a5=="."){return av(aC,a6)}if(a5=="["){return av(aX("]"),az,w("]"),i,a6)}if(h&&a7=="as"){I.marked="keyword";return av(k,a6)}if(a5=="regexp"){I.state.lastType=I.marked="operator";I.stream.backUp(I.stream.pos-I.stream.start-1);return av(a8)}}function Z(a5,a6){if(a5!="quasi"){return ap()}if(a6.slice(a6.length-2)!="${"){return av(Z)}return av(aE,u)}function u(a5){if(a5=="}"){I.marked="string-2";I.state.tokenize=aV;return av(Z)}}function aj(a5){aP(I.stream,I.state);return ap(a5=="{"?aZ:aE)}function U(a5){aP(I.stream,I.state);return ap(a5=="{"?aZ:aW)}function M(a5){return function(a6){if(a6=="."){return av(a5?s:ah)}else{if(a6=="variable"&&h){return av(e,a5?l:ar)}else{return ap(a5?aW:aE)}}}}function ah(a5,a6){if(a6=="target"){I.marked="keyword";return av(ar)}}function s(a5,a6){if(a6=="target"){I.marked="keyword";return av(l)}}function a2(a5){if(a5==":"){return av(i,aZ)}return ap(ar,w(";"),i)}function aC(a5){if(a5=="variable"){I.marked="property";return av()}}function y(a6,a7){if(a6=="async"){I.marked="property";return av(y)}else{if(a6=="variable"||I.style=="keyword"){I.marked="property";if(a7=="get"||a7=="set"){return av(O)}var a5;if(h&&I.state.fatArrowAt==I.stream.start&&(a5=I.stream.match(/^\s*:\s*/,false))){I.state.fatArrowAt=I.stream.pos+a5[0].length}return av(R)}else{if(a6=="number"||a6=="string"){I.marked=aT?"property":(I.style+" property");return av(R)}else{if(a6=="jsonld-keyword"){return av(R)}else{if(h&&aB(a7)){I.marked="keyword";return av(y)}else{if(a6=="["){return av(aE,ae,w("]"),R)}else{if(a6=="spread"){return av(aW,R)}else{if(a7=="*"){I.marked="keyword";return av(y)}else{if(a6==":"){return ap(R)}}}}}}}}}}function O(a5){if(a5!="variable"){return ap(R)}I.marked="property";return av(T)}function R(a5){if(a5==":"){return av(aW)}if(a5=="("){return ap(T)}}function aK(a8,a5,a6){function a7(ba,bb){if(a6?a6.indexOf(ba)>-1:ba==","){var a9=I.state.lexical;if(a9.info=="call"){a9.pos=(a9.pos||0)+1}return av(function(bc,bd){if(bc==a5||bd==a5){return ap()}return ap(a8)},a7)}if(ba==a5||bb==a5){return av()}if(a6&&a6.indexOf(";")>-1){return ap(a8)}return av(w(a5))}return function(a9,ba){if(a9==a5||ba==a5){return av()}return ap(a8,a7)}}function aQ(a8,a5,a7){for(var a6=3;a6"),k)}}function ab(a5){if(a5=="=>"){return av(k)}}function aD(a5,a6){if(a5=="variable"||I.style=="keyword"){I.marked="property";return av(aD)}else{if(a6=="?"||a5=="number"||a5=="string"){return av(aD)}else{if(a5==":"){return av(k)}else{if(a5=="["){return av(w("variable"),ae,w("]"),aD)}else{if(a5=="("){return ap(a4,aD)}}}}}}function aq(a5,a6){if(a5=="variable"&&I.stream.match(/^\s*[?:]/,false)||a6=="?"){return av(aq)}if(a5==":"){return av(k)}if(a5=="spread"){return av(aq)}return ap(k)}function L(a5,a6){if(a6=="<"){return av(aX(">"),aK(k,">"),i,L)}if(a6=="|"||a5=="."||a6=="&"){return av(k)}if(a5=="["){return av(k,w("]"),L)}if(a6=="extends"||a6=="implements"){I.marked="keyword";return av(k)}if(a6=="?"){return av(k,w(":"),k)}}function e(a5,a6){if(a6=="<"){return av(aX(">"),aK(k,">"),i,L)}}function o(){return ap(k,ag)}function ag(a5,a6){if(a6=="="){return av(k)}}function c(a5,a6){if(a6=="enum"){I.marked="keyword";return av(aM)}return ap(j,ae,at,ak)}function j(a5,a6){if(h&&aB(a6)){I.marked="keyword";return av(j)}if(a5=="variable"){aO(a6);return av()}if(a5=="spread"){return av(j)}if(a5=="["){return aQ(E,"]")}if(a5=="{"){return aQ(aU,"}")}}function aU(a5,a6){if(a5=="variable"&&!I.stream.match(/^\s*:/,false)){aO(a6);return av(at)}if(a5=="variable"){I.marked="property"}if(a5=="spread"){return av(j)}if(a5=="}"){return ap()}if(a5=="["){return av(aE,w("]"),w(":"),aU)}return av(w(":"),j,at)}function E(){return ap(j,at)}function at(a5,a6){if(a6=="="){return av(aW)}}function ak(a5){if(a5==","){return av(c)}}function d(a5,a6){if(a5=="keyword b"&&a6=="else"){return av(aX("form","else"),aZ,i)}}function z(a5,a6){if(a6=="await"){return av(z)}if(a5=="("){return av(aX(")"),H,i)}}function H(a5){if(a5=="var"){return av(c,G)}if(a5=="variable"){return av(G)}return ap(G)}function G(a5,a6){if(a5==")"){return av()}if(a5==";"){return av(G)}if(a6=="in"||a6=="of"){I.marked="keyword";return av(aE,G)}return ap(aE,G)}function T(a5,a6){if(a6=="*"){I.marked="keyword";return av(T)}if(a5=="variable"){aO(a6);return av(T)}if(a5=="("){return av(A,aX(")"),aK(au,")"),i,V,aZ,B)}if(h&&a6=="<"){return av(aX(">"),aK(o,">"),i,T)}}function a4(a5,a6){if(a6=="*"){I.marked="keyword";return av(a4)}if(a5=="variable"){aO(a6);return av(a4)}if(a5=="("){return av(A,aX(")"),aK(au,")"),i,V,B)}if(h&&a6=="<"){return av(aX(">"),aK(o,">"),i,a4)}}function ao(a5,a6){if(a5=="keyword"||a5=="variable"){I.marked="type";return av(ao)}else{if(a6=="<"){return av(aX(">"),aK(o,">"),i)}}}function au(a5,a6){if(a6=="@"){av(aE,au)}if(a5=="spread"){return av(au)}if(h&&aB(a6)){I.marked="keyword";return av(au)}if(h&&a5=="this"){return av(ae,at)}return ap(j,ae,at)}function N(a5,a6){if(a5=="variable"){return ai(a5,a6)}return X(a5,a6)}function ai(a5,a6){if(a5=="variable"){aO(a6);return av(X)}}function X(a5,a6){if(a6=="<"){return av(aX(">"),aK(o,">"),i,X)}if(a6=="extends"||a6=="implements"||(h&&a5==",")){if(a6=="implements"){I.marked="keyword"}return av(h?k:aE,X)}if(a5=="{"){return av(aX("}"),t,i)}}function t(a5,a6){if(a5=="async"||(a5=="variable"&&(a6=="static"||a6=="get"||a6=="set"||(h&&aB(a6)))&&I.stream.match(/^\s+[\w$\xa1-\uffff]/,false))){I.marked="keyword";return av(t)}if(a5=="variable"||I.style=="keyword"){I.marked="property";return av(h?a3:T,t)}if(a5=="number"||a5=="string"){return av(h?a3:T,t)}if(a5=="["){return av(aE,ae,w("]"),h?a3:T,t)}if(a6=="*"){I.marked="keyword";return av(t)}if(h&&a5=="("){return ap(a4,t)}if(a5==";"||a5==","){return av(t)}if(a5=="}"){return av()}if(a6=="@"){return av(aE,t)}}function a3(a6,a8){if(a8=="?"){return av(a3)}if(a6==":"){return av(k,at)}if(a8=="="){return av(aW)}var a5=I.state.lexical.prev,a7=a5&&a5.info=="interface";return ap(a7?a4:T)}function aY(a5,a6){if(a6=="*"){I.marked="keyword";return av(ay,w(";"))}if(a6=="default"){I.marked="keyword";return av(aE,w(";"))}if(a5=="{"){return av(aK(ax,"}"),ay,w(";"))}return ap(aZ)}function ax(a5,a6){if(a6=="as"){I.marked="keyword";return av(w("variable"))}if(a5=="variable"){return ap(aW,ax)}}function aw(a5){if(a5=="string"){return av()}if(a5=="("){return ap(aE)}return ap(aH,n,ay)}function aH(a5,a6){if(a5=="{"){return aQ(aH,"}")}if(a5=="variable"){aO(a6)}if(a6=="*"){I.marked="keyword"}return av(m)}function n(a5){if(a5==","){return av(aH,n)}}function m(a5,a6){if(a6=="as"){I.marked="keyword";return av(aH)}}function ay(a5,a6){if(a6=="from"){I.marked="keyword";return av(aE)}}function r(a5){if(a5=="]"){return av()}return ap(aK(aW,"]"))}function aM(){return ap(aX("form"),j,w("{"),aX("}"),aK(aR,"}"),i,i)}function aR(){return ap(j,at)}function aG(a6,a5){return a6.lastType=="operator"||a6.lastType==","||Y.test(a5.charAt(0))||/[,.]/.test(a5.charAt(0))}function a1(a7,a6,a5){return a6.tokenize==af&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(a6.lastType)||(a6.lastType=="quasi"&&/\{\s*$/.test(a7.string.slice(0,a7.pos-(a5||0))))}return{startState:function(a6){var a5={tokenize:af,lastType:"sof",cc:[],lexical:new Q((a6||0)-p,0,"block",false),localVars:aA.localVars,context:aA.localVars&&new P(null,null,false),indented:a6||0};if(aA.globalVars&&typeof aA.globalVars=="object"){a5.globalVars=aA.globalVars}return a5},token:function(a7,a6){if(a7.sol()){if(!a6.lexical.hasOwnProperty("align")){a6.lexical.align=false}a6.indented=a7.indentation();aP(a7,a6)}if(a6.tokenize!=aS&&a7.eatSpace()){return null}var a5=a6.tokenize(a7,a6);if(ad=="comment"){return a5}a6.lastType=ad=="operator"&&(K=="++"||K=="--")?"incdec":ad;return g(a6,a5,ad,K,a7)},indent:function(a5,a8){if(a5.tokenize==aS){return a.Pass}if(a5.tokenize!=af){return 0}var bc=a8&&a8.charAt(0),bd=a5.lexical,bb;if(!/^\s*else\b/.test(a8)){for(var a7=a5.cc.length-1;a7>=0;--a7){var a9=a5.cc[a7];if(a9==i){bd=bd.prev}else{if(a9!=d){break}}}}while((bd.type=="stat"||bd.type=="form")&&(bc=="}"||((bb=a5.cc[a5.cc.length-1])&&(bb==ar||bb==l)&&!/^[,\.=+\-*:?[\(]/.test(a8)))){bd=bd.prev}if(F&&bd.type==")"&&bd.prev.type=="stat"){bd=bd.prev}var ba=bd.type,a6=bc==ba;if(ba=="vardef"){return bd.indented+(a5.lastType=="operator"||a5.lastType==","?bd.info.length+1:0)}else{if(ba=="form"&&bc=="{"){return bd.indented}else{if(ba=="form"){return bd.indented+p}else{if(ba=="stat"){return bd.indented+(aG(a5,a8)?F||p:0)}else{if(bd.info=="switch"&&!a6&&aA.doubleIndentSwitch!=false){return bd.indented+(/^(?:case|default)\b/.test(a8)?p:2*p)}else{if(bd.align){return bd.column+(a6?0:1)}else{return bd.indented+(a6?0:p)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:D?null:"/*",blockCommentEnd:D?null:"*/",blockCommentContinue:D?null:" * ",lineComment:D?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:D?"json":"javascript",jsonldMode:aT,jsonMode:D,expressionAllowed:a1,skipExpression:function(a5){var a6=a5.cc[a5.cc.length-1];if(a6==aE||a6==aW){a5.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Z,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Z.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},Y=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},X=J.counterDescriptors||{},O=J.colorKeywords||{},T=J.valueKeywords||{},M=J.allowNested,S=J.lineComment,V=J.supportsAtComponent===true;var C,N;function aa(ad,ae){C=ae;return ad}function ac(ag,af){var ae=ag.next();if(A[ae]){var ad=A[ae](ag,af);if(ad!==false){return ad}}if(ae=="@"){ag.eatWhile(/[\w\\\-]/);return aa("def",ag.current())}else{if(ae=="="||(ae=="~"||ae=="|")&&ag.eat("=")){return aa(null,"compare")}else{if(ae=='"'||ae=="'"){af.tokenize=K(ae);return af.tokenize(ag,af)}else{if(ae=="#"){ag.eatWhile(/[\w\\\-]/);return aa("atom","hash")}else{if(ae=="!"){ag.match(/^\s*\w*/);return aa("keyword","important")}else{if(/\d/.test(ae)||ae=="."&&ag.eat(/\d/)){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ae==="-"){if(/[\d.]/.test(ag.peek())){ag.eatWhile(/[\w.%]/);return aa("number","unit")}else{if(ag.match(/^-[\w\\\-]*/)){ag.eatWhile(/[\w\\\-]/);if(ag.match(/^\s*:/,false)){return aa("variable-2","variable-definition")}return aa("variable-2","variable")}else{if(ag.match(/^\w+-/)){return aa("meta","meta")}}}}else{if(/[,+>*\/]/.test(ae)){return aa(null,"select-op")}else{if(ae=="."&&ag.match(/^-?[_a-z][_a-z0-9-]*/i)){return aa("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ae)){return aa(null,ae)}else{if(ag.match(/[\w-.]+(?=\()/)){if(/^(url(-prefix)?|domain|regexp)$/.test(ag.current().toLowerCase())){af.tokenize=ab}return aa("variable callee","variable")}else{if(/[\w\\\-]/.test(ae)){ag.eatWhile(/[\w\\\-]/);return aa("property","word")}else{return aa(null,null)}}}}}}}}}}}}}function K(ad){return function(ah,af){var ag=false,ae;while((ae=ah.next())!=null){if(ae==ad&&!ag){if(ad==")"){ah.backUp(1)}break}ag=!ag&&ae=="\\"}if(ae==ad||!ag&&ad!=")"){af.tokenize=null}return aa("string","string")}}function ab(ae,ad){ae.next();if(!ae.match(/\s*[\"\')]/,false)){ad.tokenize=K(")")}else{ad.tokenize=null}return aa(null,"(")}function R(ae,ad,af){this.type=ae;this.indent=ad;this.prev=af}function G(af,ag,ae,ad){af.context=new R(ae,ag.indentation()+(ad===false?0:Q),af.context);return ae}function U(ad){if(ad.context.prev){ad.context=ad.context.prev}return ad.context.type}function z(ad,af,ae){return F[ae.context.type](ad,af,ae)}function W(ae,ag,af,ah){for(var ad=ah||1;ad>0;ad--){af.context=af.context.prev}return z(ae,ag,af)}function H(ae){var ad=ae.current().toLowerCase();if(T.hasOwnProperty(ad)){N="atom"}else{if(O.hasOwnProperty(ad)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ad,af,ae){if(ad=="{"){return G(ae,af,"block")}else{if(ad=="}"&&ae.context.prev){return U(ae)}else{if(V&&/@component/i.test(ad)){return G(ae,af,"atComponentBlock")}else{if(/^@(-moz-)?document$/i.test(ad)){return G(ae,af,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/i.test(ad)){return G(ae,af,"atBlock")}else{if(/^@(font-face|counter-style)/i.test(ad)){ae.stateArg=ad;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(ad)){return"keyframes"}else{if(ad&&ad.charAt(0)=="@"){return G(ae,af,"at")}else{if(ad=="hash"){N="builtin"}else{if(ad=="word"){N="tag"}else{if(ad=="variable-definition"){return"maybeprop"}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}else{if(ad==":"){return"pseudo"}else{if(M&&ad=="("){return G(ae,af,"parens")}}}}}}}}}}}}}}return ae.context.type};F.block=function(ad,ag,ae){if(ad=="word"){var af=ag.current().toLowerCase();if(I.hasOwnProperty(af)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(af)){N="string-2";return"maybeprop"}else{if(M){N=ag.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ad=="meta"){return"block"}else{if(!M&&(ad=="hash"||ad=="qualifier")){N="error";return"block"}else{return F.top(ad,ag,ae)}}}};F.maybeprop=function(ad,af,ae){if(ad==":"){return G(ae,af,"prop")}return z(ad,af,ae)};F.prop=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"&&M){return G(ae,af,"propBlock")}if(ad=="}"||ad=="{"){return W(ad,af,ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(af.current())){N+=" error"}else{if(ad=="word"){H(af)}else{if(ad=="interpolation"){return G(ae,af,"interpolation")}}}return"prop"};F.propBlock=function(ae,ad,af){if(ae=="}"){return U(af)}if(ae=="word"){N="property";return"maybeprop"}return af.context.type};F.parens=function(ad,af,ae){if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad==")"){return U(ae)}if(ad=="("){return G(ae,af,"parens")}if(ad=="interpolation"){return G(ae,af,"interpolation")}if(ad=="word"){H(af)}return"parens"};F.pseudo=function(ad,af,ae){if(ad=="meta"){return"pseudo"}if(ad=="word"){N="variable-3";return ae.context.type}return z(ad,af,ae)};F.documentTypes=function(ad,af,ae){if(ad=="word"&&y.hasOwnProperty(af.current())){N="tag";return ae.context.type}else{return F.atBlock(ad,af,ae)}};F.atBlock=function(ad,ag,ae){if(ad=="("){return G(ae,ag,"atBlock_parens")}if(ad=="}"||ad==";"){return W(ad,ag,ae)}if(ad=="{"){return U(ae)&&G(ae,ag,M?"block":"top")}if(ad=="interpolation"){return G(ae,ag,"interpolation")}if(ad=="word"){var af=ag.current().toLowerCase();if(af=="only"||af=="not"||af=="and"||af=="or"){N="keyword"}else{if(Y.hasOwnProperty(af)){N="attribute"}else{if(L.hasOwnProperty(af)){N="property"}else{if(P.hasOwnProperty(af)){N="keyword"}else{if(I.hasOwnProperty(af)){N="property"}else{if(B.hasOwnProperty(af)){N="string-2"}else{if(T.hasOwnProperty(af)){N="atom"}else{if(O.hasOwnProperty(af)){N="keyword"}else{N="error"}}}}}}}}}return ae.context.type};F.atComponentBlock=function(ad,af,ae){if(ad=="}"){return W(ad,af,ae)}if(ad=="{"){return U(ae)&&G(ae,af,M?"block":"top",false)}if(ad=="word"){N="error"}return ae.context.type};F.atBlock_parens=function(ad,af,ae){if(ad==")"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae,2)}return F.atBlock(ad,af,ae)};F.restricted_atBlock_before=function(ad,af,ae){if(ad=="{"){return G(ae,af,"restricted_atBlock")}if(ad=="word"&&ae.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ad,af,ae)};F.restricted_atBlock=function(ad,af,ae){if(ad=="}"){ae.stateArg=null;return U(ae)}if(ad=="word"){if((ae.stateArg=="@font-face"&&!E.hasOwnProperty(af.current().toLowerCase()))||(ae.stateArg=="@counter-style"&&!X.hasOwnProperty(af.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ad,af,ae){if(ad=="word"){N="variable";return"keyframes"}if(ad=="{"){return G(ae,af,"top")}return z(ad,af,ae)};F.at=function(ad,af,ae){if(ad==";"){return U(ae)}if(ad=="{"||ad=="}"){return W(ad,af,ae)}if(ad=="word"){N="tag"}else{if(ad=="hash"){N="builtin"}}return"at"};F.interpolation=function(ad,af,ae){if(ad=="}"){return U(ae)}if(ad=="{"||ad==";"){return W(ad,af,ae)}if(ad=="word"){N="variable"}else{if(ad!="variable"&&ad!="("&&ad!=")"){N="error"}}return"interpolation"};return{startState:function(ad){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ad||0,null)}},token:function(af,ae){if(!ae.tokenize&&af.eatSpace()){return null}var ad=(ae.tokenize||ac)(af,ae);if(ad&&typeof ad=="object"){C=ad[1];ad=ad[0]}N=ad;if(C!="comment"){ae.state=F[ae.state](C,af,ae)}return N},indent:function(ah,af){var ae=ah.context,ag=af&&af.charAt(0);var ad=ae.indent;if(ae.type=="prop"&&(ag=="}"||ag==")")){ae=ae.prev}if(ae.prev){if(ag=="}"&&(ae.type=="block"||ae.type=="top"||ae.type=="interpolation"||ae.type=="restricted_atBlock")){ae=ae.prev;ad=ae.indent}else{if(ag==")"&&(ae.type=="parens"||ae.type=="atBlock_parens")||ag=="{"&&(ae.type=="at"||ae.type=="atBlock")){ad=Math.max(0,ae.indent-Q)}}}return ad},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:S,fold:"brace"}});function g(A){var z={};for(var y=0;y-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,"",""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(t,s,r){if(!t.localMode||/^\s*<\//.test(s)){return q.indent(t.htmlState,s,r)}else{if(t.localMode.indent){return t.localMode.indent(t.localState,s,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});CodeMirror.defineMode("bbcodemixed",function(c){var f,e,g,d,h=CodeMirror.getMode(c,"htmlmixed"),b=CodeMirror.getMode(c,"bbcode"),f={bbCodeLiteral:"literal"};if(c.hasOwnProperty("bbCodeLiteral")){f.bbCodeLiteral=c.bbCodeLiteral}function a(i){return i.replace(/([\[\]\.\-\+\<\>\?\:\(\)\{\}])/g,"\\$1")}e={hasLeftDelimeter:/.*\[/,htmlHasLeftDelimeter:/[^\<\>]*\[/,literalOpen:new RegExp(a("["+f.bbCodeLiteral+"]")),literalClose:new RegExp(a("[/"+f.bbCodeLiteral+"]"))};g={chain:function(j,i,k){i.tokenize=k;return k(j,i)},cleanChain:function(j,i,k){i.tokenize=null;i.localState=null;i.localMode=null;return(typeof k=="string")?(k?k:null):k(j,i)},maybeBackup:function(o,j,k){j=a(j);var n=o.current();var l=n.search(j),i;if(l>-1){o.backUp(n.length-l)}else{if(i=n.match(/<\/?$/)){o.backUp(n.length);if(!o.match(j,false)){o.match(n[0])}}}return k}};d={html:function(j,i){if(!i.inLiteral&&j.match(e.htmlHasLeftDelimeter,false)&&i.htmlMixedState.htmlState.tagName===null){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}else{if(!i.inLiteral&&j.match("[",false)){i.tokenize=d.bbcode;i.localMode=b;i.localState=b.startState(h.indent(i.htmlMixedState,""));return g.maybeBackup(j,"[",b.token(j,i.localState))}}return h.token(j,i.htmlMixedState)},bbcode:function(j,i){if(j.match("]",false)){j.eat("]");i.tokenize=d.html;i.localMode=h;i.localState=i.htmlMixedState;return"tag"}return g.maybeBackup(j,"]",b.token(j,i.localState))},inBlock:function(j,i){return function(l,k){while(!l.eol()){if(l.match(i)){g.cleanChain(l,k,"");break}l.next()}return j}}};return{startState:function(){var i=h.startState();return{token:d.html,localMode:null,localState:null,htmlMixedState:i,tokenize:null,inLiteral:false}},copyState:function(k){var j=null,i=(k.tokenize||k.token);if(k.localState){j=CodeMirror.copyState((i!=d.html?b:h),k.localState)}return{token:k.token,tokenize:k.tokenize,localMode:k.localMode,localState:j,htmlMixedState:CodeMirror.copyState(h,k.htmlMixedState),inLiteral:k.inLiteral}},token:function(k,j){if(k.match("[",false)){if(!j.inLiteral&&k.match(e.literalOpen,true)){j.inLiteral=true;return"keyword"}else{if(j.inLiteral&&k.match(e.literalClose,true)){j.inLiteral=false;return"keyword"}}}if(j.inLiteral&&j.localState!=j.htmlMixedState){j.tokenize=d.html;j.localMode=h;j.localState=j.htmlMixedState}var i=(j.tokenize||j.token)(k,j);return i},indent:function(j,i){if(j.localMode==b||(j.inLiteral&&!j.localMode)||e.hasLeftDelimeter.test(i)){return CodeMirror.Pass}return h.indent(j.htmlMixedState,i)},innerMode:function(i){return{state:i.localState||i.htmlMixedState,mode:i.localMode||h}}}},"xml","javascript","css");CodeMirror.defineMIME("text/x-bbcode","bbcodemixed");
@@ -0,0 +1 @@
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/simple.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function r(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g," "));return t}function o(e,o){(e.next||e.push)&&t(o,e.next||e.push),this.regex=n(e.regex),this.token=r(e.token),this.data=e}function i(e,t){return function(n,r){if(r.pending){var o=r.pending.shift();return 0==r.pending.length&&(r.pending=null),n.pos+=o.text.length,o.token}if(r.local){if(r.local.end&&n.match(r.local.end)){var i=r.local.endToken||null;return r.local=r.localState=null,i}var a,i=r.local.mode.token(n,r.localState);return r.local.endScan&&(a=r.local.endScan.exec(n.current()))&&(n.pos=n.start+a.index),i}for(var d=e[r.state],s=0;s<d.length;s++){var c=d[s],u=(!c.data.sol||n.sol())&&n.match(c.regex);if(u){c.data.next?r.state=c.data.next:c.data.push?((r.stack||(r.stack=[])).push(r.state),r.state=c.data.push):c.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),c.data.mode&&l(t,r,c.data.mode,c.token),c.data.indent&&r.indent.push(n.indentation()+t.indentUnit),c.data.dedent&&r.indent.pop();var f=c.token;if(f&&f.apply&&(f=f(u)),u.length>2&&c.token&&"string"!=typeof c.token){r.pending=[];for(var m=2;m<u.length;m++)u[m]&&r.pending.push({text:u[m],token:c.token[m-1]});return n.backUp(u[0].length-(u[1]?u[1].length:0)),f[0]}return f&&f.join?f[0]:f}}return n.next(),null}}function a(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!a(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return 0==n}function l(t,r,o,i){var l;if(o.persistent)for(var d=r.persistentStates;d&&!l;d=d.next)(o.spec?a(o.spec,d.spec):o.mode==d.mode)&&(l=d);var s=l?l.mode:o.mode||e.getMode(t,o.spec),c=l?l.state:e.startState(s);o.persistent&&!l&&(r.persistentStates={mode:s,spec:o.spec,state:c,next:r.persistentStates}),r.localState=c,r.local={mode:s,end:o.end&&n(o.end),endScan:o.end&&!1!==o.forceEnd&&n(o.end,!1),endToken:i&&i.join?i[i.length-1]:i}}function d(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}function s(t,n){return function(r,o,i){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,o,i);if(null==r.indent||r.local||n.dontIndentStates&&d(r.state,n.dontIndentStates)>-1)return e.Pass;var a=r.indent.length-1,l=t[r.state];e:for(;;){for(var s=0;s<l.length;s++){var c=l[s];if(c.data.dedent&&!1!==c.data.dedentIfLineStart){var u=c.regex.exec(o);if(u&&u[0]){a--,(c.next||c.push)&&(l=t[c.next||c.push]),o=o.slice(u[0].length);continue e}}}break}return a<0?0:r.indent[a]}}e.defineSimpleMode=function(t,n){e.defineMode(t,function(t){return e.simpleMode(t,n)})},e.simpleMode=function(n,r){t(r,"start");var a={},l=r.meta||{},d=!1;for(var c in r)if(c!=l&&r.hasOwnProperty(c))for(var u=a[c]=[],f=r[c],m=0;m<f.length;m++){var p=f[m];u.push(new o(p,r)),(p.indent||p.dedent)&&(d=!0)}var g={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:d?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:i(a,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:s(a,l)};if(l)for(var h in l)l.hasOwnProperty(h)&&(g[h]=l[h]);return g}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function n(e,t,n,r){if("string"==typeof t){var o=e.indexOf(t,n);return r&&o>-1?o+t.length:o}var i=t.exec(n?e.slice(n):e);return i?i.index+n+(r?i[0].length:0):-1}var r=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(o,i){if(i.innerActive){var a=i.innerActive,l=o.string;if(!a.close&&o.sol())return i.innerActive=i.inner=null,this.token(o,i);var d=a.close?n(l,a.close,o.pos,a.parseDelimiters):-1;if(d==o.pos&&!a.parseDelimiters)return o.match(a.close),i.innerActive=i.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";d>-1&&(o.string=l.slice(0,d));var s=a.mode.token(o,i.inner);return d>-1&&(o.string=l),d==o.pos&&a.parseDelimiters&&(i.innerActive=i.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var c=1/0,l=o.string,u=0;u<r.length;++u){var f=r[u],d=n(l,f.open,o.pos);if(d==o.pos){f.parseDelimiters||o.match(f.open),i.innerActive=f;var m=0;if(t.indent){var p=t.indent(i.outer,"","");p!==e.Pass&&(m=p)}return i.inner=e.startState(f.mode,m),f.delimStyle&&f.delimStyle+" "+f.delimStyle+"-open"}-1!=d&&d<c&&(c=d)}c!=1/0&&(o.string=l.slice(0,c));var g=t.token(o,i.outer);return c!=1/0&&(o.string=l),g},indent:function(n,r,o){var i=n.innerActive?n.innerActive.mode:t;return i.indent?i.indent(n.innerActive?n.inner:n.outer,r,o):e.Pass},blankLine:function(n){var o=n.innerActive?n.innerActive.mode:t;if(o.blankLine&&o.blankLine(n.innerActive?n.inner:n.outer),n.innerActive)"\n"===n.innerActive.close&&(n.innerActive=n.inner=null);else for(var i=0;i<r.length;++i){var a=r[i];"\n"===a.open&&(n.innerActive=a,n.inner=e.startState(a.mode,o.indent?o.indent(n.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/handlebars/handlebars.js",["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),e.defineMode("handlebars",function(t,n){var r=e.getMode(t,"handlebars-tags");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:"{{",close:"}}",mode:r,parseDelimiters:!0}):r}),e.defineMIME("text/x-handlebars-template","handlebars")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(r,o){function i(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(d("atom","]]>")):null:e.match("--")?n(d("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(s(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=i,T=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return T="equals",null;if("<"==n){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function d(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=i;break}n.next()}return e}}function s(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=s(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=i;break}return n.tokenize=s(e-1),n.tokenize(t,n)}}return"meta"}}function c(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(w.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!w.contextGrabbers.hasOwnProperty(n)||!w.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function m(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?g:m}function p(e,t,n){return"word"==e?(n.tagName=t.current(),C="tag",v):w.allowMissingTagName&&"endTag"==e?(C="tag bracket",v(e,t,n)):(C="error",p)}function g(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&w.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n),n.context&&n.context.tagName==r||!1===w.matchClosing?(C="tag",h):(C="tag error",x)}return w.allowMissingTagName&&"endTag"==e?(C="tag bracket",h(e,t,n)):(C="error",x)}function h(e,t,n){return"endTag"!=e?(C="error",h):(u(n),m)}function x(e,t,n){return C="error",h(e,t,n)}function v(e,t,n){if("word"==e)return C="attribute",k;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||w.autoSelfClosers.hasOwnProperty(r)?f(n,r):(f(n,r),n.context=new c(n,r,o==n.indented)),m}return C="error",v}function k(e,t,n){return"equals"==e?b:(w.allowMissing||(C="error"),v(e,t,n))}function b(e,t,n){return"string"==e?S:"word"==e&&w.allowUnquoted?(C="string",v):(C="error",v(e,t,n))}function S(e,t,n){return"string"==e?S:v(e,t,n)}var y=r.indentUnit,w={},M=o.htmlMode?t:n;for(var A in M)w[A]=M[A];for(var A in o)w[A]=o[A];var T,C;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var n=t.tokenize(e,t);return(n||T)&&"comment"!=n&&(C=null,t.state=t.state(T||n,e,t),C&&(n="error"==C?n+" error":C)),n},indent:function(t,n,r){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+y;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=i)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==w.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+y*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var l=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(l&&l[1])for(;o;){if(o.tagName==l[2]){o=o.prev;break}if(!w.implicitlyClosed.hasOwnProperty(o.tagName))break;o=o.prev}else if(l)for(;o;){var d=w.contextGrabbers[o.tagName];if(!d||!d.hasOwnProperty(l[2]))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+y:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(e){e.state==b&&(e.state=v)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"function"==typeof e.define&&e.define("modeHandlebars",["mode/handlebars/handlebars.js"],function(){})}(this);
@@ -1,2 +1,2 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,o){function i(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(S=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=i,S=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return S="equals",null;if("<"==r){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=i;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=i;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function d(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(z.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!z.contextGrabbers.hasOwnProperty(r)||!z.contextGrabbers[r].hasOwnProperty(t))return;u(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),T="tag",y):(T="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&z.implicitlyClosed.hasOwnProperty(r.context.tagName)&&u(r),r.context&&r.context.tagName==n||!1===z.matchClosing?(T="tag",g):(T="tag error",b)}return T="error",b}function g(e,t,r){return"endTag"!=e?(T="error",g):(u(r),m)}function b(e,t,r){return T="error",g(e,t,r)}function y(e,t,r){if("word"==e)return T="attribute",v;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||z.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new d(r,n,o==r.indented)),m}return T="error",y}function v(e,t,r){return"equals"==e?k:(z.allowMissing||(T="error"),y(e,t,r))}function k(e,t,r){return"string"==e?w:"word"==e&&z.allowUnquoted?(T="string",y):(T="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var x=n.indentUnit,z={},M=o.htmlMode?t:r;for(var j in M)z[j]=M[j];for(var j in o)z[j]=o[j];var S,T;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;S=null;var r=t.tokenize(e,t);return(r||S)&&"comment"!=r&&(T=null,t.state=t.state(S||r,e,t),T&&(r="error"==T?r+" error":T)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=i)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==z.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+x*(z.multilineTagIndentFactor||1);if(z.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return je=e,Se=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=a(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):Me(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eat("="),o("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),o("error","error");if(Oe.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),o("operator","operator",e.current());if(Ie.test(r)){e.eatWhile(Ie);var i=e.current();if("."!=t.lastType){if(Ee.propertyIsEnumerable(i)){var c=Ee[i];return o(c.type,c.style,i)}if("async"==i&&e.match(/^\s*[\(\w]/,!1))return o("async","keyword",i)}return o("variable","variable",i)}}function a(e){return function(t,r){var n,a=!1;if(Ce&&"@"==t.peek()&&t.match(Ne))return r.tokenize=i,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;return a||(r.tokenize=i),o("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return o("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Pe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,i=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=Ke.indexOf(l);if(s>=0&&s<3){if(!o){++a;break}if(0==--o){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++o;else if(Ie.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!o){++a;break}}}i&&!o&&(t.fatArrowAt=a)}}function d(e,t,r,n,o,i){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=i,null!=n&&(this.align=n)}function u(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,o){var i=e.cc;for(Ve.state=e,Ve.stream=o,Ve.marked=null,Ve.cc=i,Ve.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():qe?x:w)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ve.marked?Ve.marked:"variable"==r&&u(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Ve.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function h(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=Ve.state;if(Ve.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function g(){Ve.state.context={prev:Ve.state.context,vars:Ve.state.localVars},Ve.state.localVars=Be}function b(){Ve.state.localVars=Ve.state.context.vars,Ve.state.context=Ve.state.context.prev}function y(e,t){var r=function(){var r=Ve.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new d(n,Ve.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function v(){var e=Ve.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function k(e){function t(r){return r==e?f():";"==e?m():f(t)}return t}function w(e,t){return"var"==e?f(y("vardef",t.length),Z,k(";"),v):"keyword a"==e?f(y("form"),M,w,v):"keyword b"==e?f(y("form"),w,v):"keyword d"==e?Ve.stream.match(/^\s*$/,!1)?f():f(y("stat"),S,k(";"),v):"debugger"==e?f(k(";")):"{"==e?f(y("}"),F,v):";"==e?f():"if"==e?("else"==Ve.state.lexical.info&&Ve.state.cc[Ve.state.cc.length-1]==v&&Ve.state.cc.pop()(),f(y("form"),M,w,v,re)):"function"==e?f(se):"for"==e?f(y("form"),ne,w,v):"variable"==e?Pe&&"type"==t?(Ve.marked="keyword",f(U,k("operator"),U,k(";"))):Pe&&"declare"==t?(Ve.marked="keyword",f(w)):f(y("stat"),K):"switch"==e?f(y("form"),M,k("{"),y("}","switch"),F,v,v):"case"==e?f(x,k(":")):"default"==e?f(k(":")):"catch"==e?f(y("form"),g,k("("),ce,k(")"),w,v,b):"class"==e?f(y("form"),ue,v):"export"==e?f(y("stat"),he,v):"import"==e?f(y("stat"),be,v):"module"==e?f(y("form"),J,k("{"),y("}"),F,v,v):"async"==e?f(w):"@"==t?f(x,w):m(y("stat"),x,k(";"),v)}function x(e){return j(e,!1)}function z(e){return j(e,!0)}function M(e){return"("!=e?m():f(y(")"),x,k(")"),v)}function j(e,t){if(Ve.state.fatArrowAt==Ve.stream.start){var r=t?I:P;if("("==e)return f(g,y(")"),_(ce,")"),v,k("=>"),r,b);if("variable"==e)return m(g,J,k("=>"),r,b)}var n=t?A:T;return $e.hasOwnProperty(e)?f(n):"function"==e?f(se,n):"class"==e?f(y("form"),de,v):"keyword c"==e||"async"==e?f(t?z:x):"("==e?f(y(")"),S,k(")"),v,n):"operator"==e||"spread"==e?f(t?z:x):"["==e?f(y("]"),xe,v,n):"{"==e?L(V,"}",null,n):"quasi"==e?m(C,n):"new"==e?f(E(t)):f()}function S(e){return e.match(/[;\}\)\],]/)?m():m(x)}function T(e,t){return","==e?f(x):A(e,t,!1)}function A(e,t,r){var n=0==r?T:A,o=0==r?x:z;return"=>"==e?f(g,r?I:P,b):"operator"==e?/\+\+|--/.test(t)||Pe&&"!"==t?f(n):"?"==t?f(x,k(":"),o):f(o):"quasi"==e?m(C,n):";"!=e?"("==e?L(z,")","call",n):"."==e?f($,n):"["==e?f(y("]"),S,k("]"),v,n):Pe&&"as"==t?(Ve.marked="keyword",f(U,n)):"regexp"==e?(Ve.state.lastType=Ve.marked="operator",Ve.stream.backUp(Ve.stream.pos-Ve.stream.start-1),f(o)):void 0:void 0}function C(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(C):f(x,q)}function q(e){if("}"==e)return Ve.marked="string-2",Ve.state.tokenize=s,f(C)}function P(e){return c(Ve.stream,Ve.state),m("{"==e?w:x)}function I(e){return c(Ve.stream,Ve.state),m("{"==e?w:z)}function E(e){return function(t){return"."==t?f(e?N:O):"variable"==t&&Pe?f(X,e?A:T):m(e?z:x)}}function O(e,t){if("target"==t)return Ve.marked="keyword",f(T)}function N(e,t){if("target"==t)return Ve.marked="keyword",f(A)}function K(e){return":"==e?f(v,w):m(T,k(";"),v)}function $(e){if("variable"==e)return Ve.marked="property",f()}function V(e,t){if("async"==e)return Ve.marked="property",f(V);if("variable"==e||"keyword"==Ve.style){if(Ve.marked="property","get"==t||"set"==t)return f(B);var r;return Pe&&Ve.state.fatArrowAt==Ve.stream.start&&(r=Ve.stream.match(/^\s*:\s*/,!1))&&(Ve.state.fatArrowAt=Ve.stream.pos+r[0].length),f(W)}return"number"==e||"string"==e?(Ve.marked=Ce?"property":Ve.style+" property",f(W)):"jsonld-keyword"==e?f(W):"modifier"==e?f(V):"["==e?f(x,k("]"),W):"spread"==e?f(z,W):"*"==t?(Ve.marked="keyword",f(V)):":"==e?m(W):void 0}function B(e){return"variable"!=e?m(W):(Ve.marked="property",f(se))}function W(e){return":"==e?f(z):"("==e?m(se):void 0}function _(e,t,r){function n(o,i){if(r?r.indexOf(o)>-1:","==o){var a=Ve.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return o==t||i==t?f():f(k(t))}return function(r,o){return r==t||o==t?f():m(e,n)}}function L(e,t,r){for(var n=3;n"==e)return f(U)}function G(e,t){return"variable"==e||"keyword"==Ve.style?(Ve.marked="property",f(G)):"?"==t?f(G):":"==e?f(U):"["==e?f(x,D,k("]"),G):void 0}function Y(e){return"variable"==e?f(Y):":"==e?f(U):void 0}function R(e,t){return"<"==t?f(y(">"),_(U,">"),v,R):"|"==t||"."==e?f(U):"["==e?f(k("]"),R):"extends"==t?f(U):void 0}function X(e,t){if("<"==t)return f(y(">"),_(U,">"),v,R)}function Z(){return m(J,D,ee,te)}function J(e,t){return"modifier"==e?f(J):"variable"==e?(h(t),f()):"spread"==e?f(J):"["==e?L(J,"]"):"{"==e?L(Q,"}"):void 0}function Q(e,t){return"variable"!=e||Ve.stream.match(/^\s*:/,!1)?("variable"==e&&(Ve.marked="property"),"spread"==e?f(J):"}"==e?m():f(k(":"),J,ee)):(h(t),f(ee))}function ee(e,t){if("="==t)return f(z)}function te(e){if(","==e)return f(Z)}function re(e,t){if("keyword b"==e&&"else"==t)return f(y("form","else"),w,v)}function ne(e){if("("==e)return f(y(")"),oe,k(")"),v)}function oe(e){return"var"==e?f(Z,k(";"),ae):";"==e?f(ae):"variable"==e?f(ie):m(x,k(";"),ae)}function ie(e,t){return"in"==t||"of"==t?(Ve.marked="keyword",f(x)):f(T,ae)}function ae(e,t){return";"==e?f(le):"in"==t||"of"==t?(Ve.marked="keyword",f(x)):m(x,k(";"),le)}function le(e){")"!=e&&f(x)}function se(e,t){return"*"==t?(Ve.marked="keyword",f(se)):"variable"==e?(h(t),f(se)):"("==e?f(g,y(")"),_(ce,")"),v,D,w,b):Pe&&"<"==t?f(y(">"),_(U,">"),v,se):void 0}function ce(e,t){return"@"==t&&f(x,ce),"spread"==e||"modifier"==e?f(ce):m(J,D,ee)}function de(e,t){return"variable"==e?ue(e,t):pe(e,t)}function ue(e,t){if("variable"==e)return h(t),f(pe)}function pe(e,t){return"<"==t?f(y(">"),_(U,">"),v,pe):"extends"==t||"implements"==t||Pe&&","==e?f(Pe?U:x,pe):"{"==e?f(y("}"),me,v):void 0}function me(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&Ve.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ve.marked="keyword",f(me)):"variable"==e||"keyword"==Ve.style?(Ve.marked="property",f(Pe?fe:se,me)):"["==e?f(x,k("]"),Pe?fe:se,me):"*"==t?(Ve.marked="keyword",f(me)):";"==e?f(me):"}"==e?f():"@"==t?f(x,me):void 0}function fe(e,t){return"?"==t?f(fe):":"==e?f(U,ee):"="==t?f(z):m(se)}function he(e,t){return"*"==t?(Ve.marked="keyword",f(we,k(";"))):"default"==t?(Ve.marked="keyword",f(x,k(";"))):"{"==e?f(_(ge,"}"),we,k(";")):m(w)}function ge(e,t){return"as"==t?(Ve.marked="keyword",f(k("variable"))):"variable"==e?m(z,ge):void 0}function be(e){return"string"==e?f():m(ye,ve,we)}function ye(e,t){return"{"==e?L(ye,"}"):("variable"==e&&h(t),"*"==t&&(Ve.marked="keyword"),f(ke))}function ve(e){if(","==e)return f(ye,ve)}function ke(e,t){if("as"==t)return Ve.marked="keyword",f(ye)}function we(e,t){if("from"==t)return Ve.marked="keyword",f(x)}function xe(e){return"]"==e?f():m(_(z,"]"))}function ze(e,t){return"operator"==e.lastType||","==e.lastType||Oe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Me(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var je,Se,Te=t.indentUnit,Ae=r.statementIndent,Ce=r.jsonld,qe=r.json||Ce,Pe=r.typescript,Ie=r.wordCharacters||/[\w$\xa1-\uffff]/,Ee=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),i=e("operator"),a={type:"atom",style:"atom"},l={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(Pe){var s={type:"variable",style:"type"},c={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var d in c)l[d]=c[d]}return l}(),Oe=/[+\-*&%=<>!?|~^@]/,Ne=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ke="([{}])",$e={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ve={state:null,column:null,marked:null,cc:null},Be={name:"this",next:{name:"arguments"}};return v.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new d((e||0)-Te,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==je?r:(t.lastType="operator"!=je||"++"!=Se&&"--"!=Se?je:"incdec",p(t,r,je,Se,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=i)return 0;var o,a=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==v)s=s.prev;else if(d!=re)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(o=t.cc[t.cc.length-1])&&(o==T||o==A)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Ae&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,p=a==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==u&&"{"==a?s.indented:"form"==u?s.indented+Te:"stat"==u?s.indented+(ze(t,n)?Ae||Te:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Te):s.indented+(/^(?:case|default)\b/.test(n)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:qe?null:"/*",blockCommentEnd:qe?null:"*/",blockCommentContinue:qe?null:" * ",lineComment:qe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:qe?"json":"javascript",jsonldMode:Ce,jsonMode:qe,expressionAllowed:Me,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=x&&t!=z||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function i(e){return function(t,r){for(var o,i=!1;null!=(o=t.next());){if(o==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==o}return(o==e||!i&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function d(e,t,r){return P[r.context.type](e,t,r)}function u(e,t,r,n){for(var o=n||1;o>0;o--)r.context=r.context.prev;return d(e,t,r)}function p(e){var t=e.current().toLowerCase();h=T.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,h,g=t.indentUnit,b=r.tokenHooks,y=r.documentTypes||{},v=r.mediaTypes||{},k=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},z=r.nonStandardPropertyKeywords||{},M=r.fontProperties||{},j=r.counterDescriptors||{},S=r.colorKeywords||{},T=r.valueKeywords||{},A=r.allowNested,C=r.lineComment,q=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(q&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)h="builtin";else if("word"==e)h="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(h="property","maybeprop"):z.hasOwnProperty(n)?(h="string-2","maybeprop"):A?(h=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(h+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(h="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):d(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else h+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(h="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(h="variable-3",r.context.type):d(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(h="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();h="only"==n||"not"==n||"and"==n||"or"==n?"keyword":v.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":z.hasOwnProperty(n)?"string-2":T.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(h="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?u(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(h="variable","restricted_atBlock_before"):d(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(h="@font-face"==r.stateArg&&!M.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!j.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(h="variable","keyframes"):"{"==e?s(r,t,"top"):d(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?u(e,t,r):("word"==e?h="tag":"hash"==e&&(h="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?u(e,t,r):("word"==e?h="variable":"variable"!=e&&"("!=e&&")"!=e&&(h="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||o)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),h=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),h},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-g)):(r=r.prev,o=r.indent)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}})
2
- ;var n=["domain","regexp","url","url-prefix"],o=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(i),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],d=t(c),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(u),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(m),h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(h),b=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(b),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=t(v),w=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],x=t(w),z=n.concat(i).concat(l).concat(c).concat(u).concat(m).concat(v).concat(w);e.registerHelper("hintWords","css",z),e.defineMIME("text/css",{documentTypes:o,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:k,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:a,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:k,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),o=n.search(t);return o>-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"","i")}function i(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],i=o.length-1;i>=0;i--)n.unshift(o[i])}function a(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(l))i.inTag=l+" ";else if(i.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var f=">"==n.current()&&a(d[m[1]],m[2]),h=e.getMode(r,f),g=o(m[1],!0),b=o(m[1],!1);i.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,b,r.localMode.token(e,r.localState))},i.localMode=h,i.localState=e.startState(h,c.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return u}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),d={},u=n&&n.tags,p=n&&n.scriptTypes;if(i(l,d),u&&i(u,d),p)for(var m=p.length-1;m>=0;m--)d.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function r(e,t,r,n){if("string"==typeof t){var o=e.indexOf(t,r);return n&&o>-1?o+t.length:o}var i=t.exec(r?e.slice(r):e);return i?i.index+r+(n?i[0].length:0):-1}var n=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(r){return{outer:e.copyState(t,r.outer),innerActive:r.innerActive,inner:r.innerActive&&e.copyState(r.innerActive.mode,r.inner)}},token:function(o,i){if(i.innerActive){var a=i.innerActive,l=o.string;if(!a.close&&o.sol())return i.innerActive=i.inner=null,this.token(o,i);var s=a.close?r(l,a.close,o.pos,a.parseDelimiters):-1;if(s==o.pos&&!a.parseDelimiters)return o.match(a.close),i.innerActive=i.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(o.string=l.slice(0,s));var c=a.mode.token(o,i.inner);return s>-1&&(o.string=l),s==o.pos&&a.parseDelimiters&&(i.innerActive=i.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var d=1/0,l=o.string,u=0;u",mode:e.getMode(t,r.scriptingModeSpec)})},"htmlmixed"),e.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),e.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),e.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),e.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}),function(e){"function"==typeof define&&define("modeHtml",["mode/htmlembedded/htmlembedded.js"],function(){})}();
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,o){function a(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(S=e.eat("/")?"closeTag":"openTag",t.tokenize=i,"tag bracket");if("&"==n){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function i(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=a,S=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return S="equals",null;if("<"==r){t.tokenize=a,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=i;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=a;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=a;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function d(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(M.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!M.contextGrabbers.hasOwnProperty(r)||!M.contextGrabbers[r].hasOwnProperty(t))return;u(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),T="tag",y):M.allowMissingTagName&&"endTag"==e?(T="tag bracket",y(e,t,r)):(T="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&M.implicitlyClosed.hasOwnProperty(r.context.tagName)&&u(r),r.context&&r.context.tagName==n||!1===M.matchClosing?(T="tag",g):(T="tag error",b)}return M.allowMissingTagName&&"endTag"==e?(T="tag bracket",g(e,t,r)):(T="error",b)}function g(e,t,r){return"endTag"!=e?(T="error",g):(u(r),m)}function b(e,t,r){return T="error",g(e,t,r)}function y(e,t,r){if("word"==e)return T="attribute",v;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||M.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new d(r,n,o==r.indented)),m}return T="error",y}function v(e,t,r){return"equals"==e?k:(M.allowMissing||(T="error"),y(e,t,r))}function k(e,t,r){return"string"==e?w:"word"==e&&M.allowUnquoted?(T="string",y):(T="error",y(e,t,r))}function w(e,t,r){return"string"==e?w:y(e,t,r)}var x=n.indentUnit,M={},z=o.htmlMode?t:r;for(var j in z)M[j]=z[j];for(var j in o)M[j]=o[j];var S,T;return a.isInText=!0,{startState:function(e){var t={tokenize:a,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;S=null;var r=t.tokenize(e,t);return(r||S)&&"comment"!=r&&(T=null,t.state=t.state(S||r,e,t),T&&(r="error"==T?r+" error":T)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+x;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=a)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==M.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+x*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return Be=e,_e=r,t}function a(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=i(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),o("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):Ve(e,t,1)?(n(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),o("regexp","string-2")):(e.eat("="),o("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),o("error","error");if(Ye.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),o("operator","operator",e.current());if(He.test(r)){e.eatWhile(He);var a=e.current();if("."!=t.lastType){if(Ge.propertyIsEnumerable(a)){var c=Ge[a];return o(c.type,c.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return o("async","keyword",a)}return o("variable","variable",a)}}function i(e){return function(t,r){var n,i=!1;if(Fe&&"@"==t.peek()&&t.match(Re))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ue){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,a=!1,i=r-1;i>=0;--i){var l=e.string.charAt(i),s=Xe.indexOf(l);if(s>=0&&s<3){if(!o){++i;break}if(0==--o){"("==l&&(a=!0);break}}else if(s>=3&&s<6)++o;else if(He.test(l))a=!0;else{if(/["'\/]/.test(l))return;if(a&&!o){++i;break}}}a&&!o&&(t.fatArrowAt=i)}}function d(e,t,r,n,o,a){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=a,null!=n&&(this.align=n)}function u(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,o){var a=e.cc;for(Je.state=e,Je.stream=o,Je.marked=null,Je.cc=a,Je.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((a.length?a.pop():De?C:T)(r,n)){for(;a.length&&a[a.length-1].lex;)a.pop()();return Je.marked?Je.marked:"variable"==r&&u(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Je.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function h(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function g(e){var t=Je.state;if(Je.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=b(e,t.context);if(null!=n)return void(t.context=n)}else if(!h(e,t.localVars))return void(t.localVars=new k(e,t.localVars));r.globalVars&&!h(e,t.globalVars)&&(t.globalVars=new k(e,t.globalVars))}function b(e,t){if(t){if(t.block){var r=b(e,t.prev);return r?r==t.prev?t:new v(r,t.vars,!0):null}return h(e,t.vars)?t:new v(t.prev,new k(e,t.vars),!1)}return null}function y(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function v(e,t,r){this.prev=e,this.vars=t,this.block=r}function k(e,t){this.name=e,this.next=t}function w(){Je.state.context=new v(Je.state.context,Je.state.localVars,!1),Je.state.localVars=Qe}function x(){Je.state.context=new v(Je.state.context,Je.state.localVars,!0),Je.state.localVars=null}function M(){Je.state.localVars=Je.state.context.vars,Je.state.context=Je.state.context.prev}function z(e,t){var r=function(){var r=Je.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new d(n,Je.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function j(){var e=Je.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function S(e){function t(r){return r==e?f():";"==e||"}"==r||")"==r||"]"==r?m():f(t)}return t}function T(e,t){return"var"==e?f(z("vardef",t),se,S(";"),j):"keyword a"==e?f(z("form"),P,T,j):"keyword b"==e?f(z("form"),T,j):"keyword d"==e?Je.stream.match(/^\s*$/,!1)?f():f(z("stat"),E,S(";"),j):"debugger"==e?f(S(";")):"{"==e?f(z("}"),x,X,j,M):";"==e?f():"if"==e?("else"==Je.state.lexical.info&&Je.state.cc[Je.state.cc.length-1]==j&&Je.state.cc.pop()(),f(z("form"),P,T,j,fe)):"function"==e?f(ye):"for"==e?f(z("form"),he,T,j):"class"==e||Ue&&"interface"==t?(Je.marked="keyword",f(z("form","class"==e?e:t),Me,j)):"variable"==e?Ue&&"declare"==t?(Je.marked="keyword",f(T)):Ue&&("module"==t||"enum"==t||"type"==t)&&Je.stream.match(/^\s*\w/,!1)?(Je.marked="keyword","enum"==t?f(Ne):"type"==t?f(ke,S("operator"),ee,S(";")):f(z("form"),ce,S("{"),z("}"),X,j,j)):Ue&&"namespace"==t?(Je.marked="keyword",f(z("form"),C,T,j)):Ue&&"abstract"==t?(Je.marked="keyword",f(T)):f(z("stat"),F):"switch"==e?f(z("form"),P,S("{"),z("}","switch"),x,X,j,j,M):"case"==e?f(C,S(":")):"default"==e?f(S(":")):"catch"==e?f(z("form"),w,A,T,j,M):"export"==e?f(z("stat"),Te,j):"import"==e?f(z("stat"),Ce,j):"async"==e?f(T):"@"==t?f(C,T):m(z("stat"),C,S(";"),j)}function A(e){if("("==e)return f(we,S(")"))}function C(e,t){return I(e,t,!1)}function q(e,t){return I(e,t,!0)}function P(e){return"("!=e?m():f(z(")"),C,S(")"),j)}function I(e,t,r){if(Je.state.fatArrowAt==Je.stream.start){var n=r?B:V;if("("==e)return f(w,z(")"),Y(we,")"),j,S("=>"),n,M);if("variable"==e)return m(w,ce,S("=>"),n,M)}var o=r?N:O;return Ze.hasOwnProperty(e)?f(o):"function"==e?f(ye,o):"class"==e||Ue&&"interface"==t?(Je.marked="keyword",f(z("form"),xe,j)):"keyword c"==e||"async"==e?f(r?q:C):"("==e?f(z(")"),E,S(")"),j,o):"operator"==e||"spread"==e?f(r?q:C):"["==e?f(z("]"),Oe,j,o):"{"==e?R(U,"}",null,o):"quasi"==e?m($,o):"new"==e?f(_(r)):"import"==e?f(C):f()}function E(e){return e.match(/[;\}\)\],]/)?m():m(C)}function O(e,t){return","==e?f(C):N(e,t,!1)}function N(e,t,r){var n=0==r?O:N,o=0==r?C:q;return"=>"==e?f(w,r?B:V,M):"operator"==e?/\+\+|--/.test(t)||Ue&&"!"==t?f(n):Ue&&"<"==t&&Je.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(z(">"),Y(ee,">"),j,n):"?"==t?f(C,S(":"),o):f(o):"quasi"==e?m($,n):";"!=e?"("==e?R(q,")","call",n):"."==e?f(D,n):"["==e?f(z("]"),E,S("]"),j,n):Ue&&"as"==t?(Je.marked="keyword",f(ee,n)):"regexp"==e?(Je.state.lastType=Je.marked="operator",Je.stream.backUp(Je.stream.pos-Je.stream.start-1),f(o)):void 0:void 0}function $(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f($):f(C,K)}function K(e){if("}"==e)return Je.marked="string-2",Je.state.tokenize=s,f($)}function V(e){return c(Je.stream,Je.state),m("{"==e?T:C)}function B(e){return c(Je.stream,Je.state),m("{"==e?T:q)}function _(e){return function(t){return"."==t?f(e?L:W):"variable"==t&&Ue?f(ae,e?N:O):m(e?q:C)}}function W(e,t){if("target"==t)return Je.marked="keyword",f(O)}function L(e,t){if("target"==t)return Je.marked="keyword",f(N)}function F(e){return":"==e?f(j,T):m(O,S(";"),j)}function D(e){if("variable"==e)return Je.marked="property",f()}function U(e,t){if("async"==e)return Je.marked="property",f(U);if("variable"==e||"keyword"==Je.style){if(Je.marked="property","get"==t||"set"==t)return f(H);var r;return Ue&&Je.state.fatArrowAt==Je.stream.start&&(r=Je.stream.match(/^\s*:\s*/,!1))&&(Je.state.fatArrowAt=Je.stream.pos+r[0].length),f(G)}return"number"==e||"string"==e?(Je.marked=Fe?"property":Je.style+" property",f(G)):"jsonld-keyword"==e?f(G):Ue&&y(t)?(Je.marked="keyword",f(U)):"["==e?f(C,Z,S("]"),G):"spread"==e?f(q,G):"*"==t?(Je.marked="keyword",f(U)):":"==e?m(G):void 0}function H(e){return"variable"!=e?m(G):(Je.marked="property",f(ye))}function G(e){return":"==e?f(q):"("==e?m(ye):void 0}function Y(e,t,r){function n(o,a){if(r?r.indexOf(o)>-1:","==o){var i=Je.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return o==t||a==t?f():r&&r.indexOf(";")>-1?m(e):f(S(t))}return function(r,o){return r==t||o==t?f():m(e,n)}}function R(e,t,r){for(var n=3;n"),ee):void 0}function te(e){if("=>"==e)return f(ee)}function re(e,t){return"variable"==e||"keyword"==Je.style?(Je.marked="property",f(re)):"?"==t||"number"==e||"string"==e?f(re):":"==e?f(ee):"["==e?f(S("variable"),Z,S("]"),re):"("==e?m(ve,re):void 0}function ne(e,t){return"variable"==e&&Je.stream.match(/^\s*[?:]/,!1)||"?"==t?f(ne):":"==e?f(ee):"spread"==e?f(ne):m(ee)}function oe(e,t){return"<"==t?f(z(">"),Y(ee,">"),j,oe):"|"==t||"."==e||"&"==t?f(ee):"["==e?f(ee,S("]"),oe):"extends"==t||"implements"==t?(Je.marked="keyword",f(ee)):"?"==t?f(ee,S(":"),ee):void 0}function ae(e,t){if("<"==t)return f(z(">"),Y(ee,">"),j,oe)}function ie(){return m(ee,le)}function le(e,t){if("="==t)return f(ee)}function se(e,t){return"enum"==t?(Je.marked="keyword",f(Ne)):m(ce,Z,pe,me)}function ce(e,t){return Ue&&y(t)?(Je.marked="keyword",f(ce)):"variable"==e?(g(t),f()):"spread"==e?f(ce):"["==e?R(ue,"]"):"{"==e?R(de,"}"):void 0}function de(e,t){return"variable"!=e||Je.stream.match(/^\s*:/,!1)?("variable"==e&&(Je.marked="property"),"spread"==e?f(ce):"}"==e?m():"["==e?f(C,S("]"),S(":"),de):f(S(":"),ce,pe)):(g(t),f(pe))}function ue(){return m(ce,pe)}function pe(e,t){if("="==t)return f(q)}function me(e){if(","==e)return f(se)}function fe(e,t){if("keyword b"==e&&"else"==t)return f(z("form","else"),T,j)}function he(e,t){return"await"==t?f(he):"("==e?f(z(")"),ge,j):void 0}function ge(e){return"var"==e?f(se,be):"variable"==e?f(be):m(be)}function be(e,t){return")"==e?f():";"==e?f(be):"in"==t||"of"==t?(Je.marked="keyword",f(C,be)):m(C,be)}function ye(e,t){return"*"==t?(Je.marked="keyword",f(ye)):"variable"==e?(g(t),f(ye)):"("==e?f(w,z(")"),Y(we,")"),j,J,T,M):Ue&&"<"==t?f(z(">"),Y(ie,">"),j,ye):void 0}function ve(e,t){return"*"==t?(Je.marked="keyword",f(ve)):"variable"==e?(g(t),f(ve)):"("==e?f(w,z(")"),Y(we,")"),j,J,M):Ue&&"<"==t?f(z(">"),Y(ie,">"),j,ve):void 0}function ke(e,t){return"keyword"==e||"variable"==e?(Je.marked="type",f(ke)):"<"==t?f(z(">"),Y(ie,">"),j):void 0}function we(e,t){return"@"==t&&f(C,we),"spread"==e?f(we):Ue&&y(t)?(Je.marked="keyword",f(we)):Ue&&"this"==e?f(Z,pe):m(ce,Z,pe)}function xe(e,t){return"variable"==e?Me(e,t):ze(e,t)}function Me(e,t){if("variable"==e)return g(t),f(ze)}function ze(e,t){return"<"==t?f(z(">"),Y(ie,">"),j,ze):"extends"==t||"implements"==t||Ue&&","==e?("implements"==t&&(Je.marked="keyword"),f(Ue?ee:C,ze)):"{"==e?f(z("}"),je,j):void 0}function je(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Ue&&y(t))&&Je.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Je.marked="keyword",f(je)):"variable"==e||"keyword"==Je.style?(Je.marked="property",f(Ue?Se:ye,je)):"number"==e||"string"==e?f(Ue?Se:ye,je):"["==e?f(C,Z,S("]"),Ue?Se:ye,je):"*"==t?(Je.marked="keyword",f(je)):Ue&&"("==e?m(ve,je):";"==e||","==e?f(je):"}"==e?f():"@"==t?f(C,je):void 0}function Se(e,t){if("?"==t)return f(Se);if(":"==e)return f(ee,pe);if("="==t)return f(q);var r=Je.state.lexical.prev;return m(r&&"interface"==r.info?ve:ye)}function Te(e,t){return"*"==t?(Je.marked="keyword",f(Ee,S(";"))):"default"==t?(Je.marked="keyword",f(C,S(";"))):"{"==e?f(Y(Ae,"}"),Ee,S(";")):m(T)}function Ae(e,t){return"as"==t?(Je.marked="keyword",f(S("variable"))):"variable"==e?m(q,Ae):void 0}function Ce(e){return"string"==e?f():"("==e?m(C):m(qe,Pe,Ee)}function qe(e,t){return"{"==e?R(qe,"}"):("variable"==e&&g(t),"*"==t&&(Je.marked="keyword"),f(Ie))}function Pe(e){if(","==e)return f(qe,Pe)}function Ie(e,t){if("as"==t)return Je.marked="keyword",f(qe)}function Ee(e,t){if("from"==t)return Je.marked="keyword",f(C)}function Oe(e){return"]"==e?f():m(Y(q,"]"))}function Ne(){return m(z("form"),ce,S("{"),z("}"),Y($e,"}"),j,j)}function $e(){return m(ce,pe)}function Ke(e,t){return"operator"==e.lastType||","==e.lastType||Ye.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ve(e,t,r){return t.tokenize==a&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Be,_e,We=t.indentUnit,Le=r.statementIndent,Fe=r.jsonld,De=r.json||Fe,Ue=r.typescript,He=r.wordCharacters||/[\w$\xa1-\uffff]/,Ge=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),a=e("operator"),i={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Ye=/[+\-*&%=<>!?|~^@]/,Re=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Xe="([{}])",Ze={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Je={state:null,column:null,marked:null,cc:null},Qe=new k("this",new k("arguments",null));return M.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-We,0,"block",!1),localVars:r.localVars,context:r.localVars&&new v(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Be?r:(t.lastType="operator"!=Be||"++"!=_e&&"--"!=_e?Be:"incdec",p(t,r,Be,_e,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=a)return 0;var o,i=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==j)s=s.prev;else if(d!=fe)break}for(;("stat"==s.type||"form"==s.type)&&("}"==i||(o=t.cc[t.cc.length-1])&&(o==O||o==N)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Le&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var u=s.type,p=i==u;return"vardef"==u?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==u&&"{"==i?s.indented:"form"==u?s.indented+We:"stat"==u?s.indented+(Ke(t,n)?Le||We:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:We):s.indented+(/^(?:case|default)\b/.test(n)?We:2*We)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:De?null:"/*",blockCommentEnd:De?null:"*/",blockCommentContinue:De?null:" * ",lineComment:De?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:De?"json":"javascript",jsonldMode:Fe,jsonMode:De,expressionAllowed:Ve,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=q||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):e.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(e.current().toLowerCase())&&(t.tokenize=i),n("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function a(e){return function(t,r){for(var o,a=!1;null!=(o=t.next());){if(o==e&&!a){")"==e&&t.backUp(1);break}a=!a&&"\\"==o}return(o==e||!a&&")"!=e)&&(r.tokenize=null),n("string","string")}}function i(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=a(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:g),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function d(e,t,r){return P[r.context.type](e,t,r)}function u(e,t,r,n){for(var o=n||1;o>0;o--)r.context=r.context.prev;return d(e,t,r)}function p(e){var t=e.current().toLowerCase();h=T.hasOwnProperty(t)?"atom":S.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,h,g=t.indentUnit,b=r.tokenHooks,y=r.documentTypes||{},v=r.mediaTypes||{},k=r.mediaFeatures||{},w=r.mediaValueKeywords||{},x=r.propertyKeywords||{},M=r.nonStandardPropertyKeywords||{},z=r.fontProperties||{},j=r.counterDescriptors||{},S=r.colorKeywords||{},T=r.valueKeywords||{},A=r.allowNested,C=r.lineComment,q=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(q&&/@component/i.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)h="builtin";else if("word"==e)h="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(A&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return x.hasOwnProperty(n)?(h="property","maybeprop"):M.hasOwnProperty(n)?(h="string-2","maybeprop"):A?(h=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(h+=" error","maybeprop")}return"meta"==e?"block":A||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(h="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):d(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&A)return s(r,t,"propBlock");if("}"==e||"{"==e)return u(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else h+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(h="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?u(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(h="variable-3",r.context.type):d(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(h="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return u(e,t,r);if("{"==e)return c(r)&&s(r,t,A?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();h="only"==n||"not"==n||"and"==n||"or"==n?"keyword":v.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":w.hasOwnProperty(n)?"keyword":x.hasOwnProperty(n)?"property":M.hasOwnProperty(n)?"string-2":T.hasOwnProperty(n)?"atom":S.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?u(e,t,r):"{"==e?c(r)&&s(r,t,A?"block":"top",!1):("word"==e&&(h="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?u(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(h="variable","restricted_atBlock_before"):d(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(h="@font-face"==r.stateArg&&!z.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!j.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(h="variable","keyframes"):"{"==e?s(r,t,"top"):d(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?u(e,t,r):("word"==e?h="tag":"hash"==e&&(h="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?u(e,t,r):("word"==e?h="variable":"variable"!=e&&"("!=e&&")"!=e&&(h="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||o)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),h=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),h},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-g)):(r=r.prev,o=r.indent)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}})
2
+ ;var n=["domain","regexp","url","url-prefix"],o=t(n),a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(a),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],d=t(c),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(u),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(m),h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(h),b=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(b),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=t(v),w=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],x=t(w),M=n.concat(a).concat(l).concat(c).concat(u).concat(m).concat(v).concat(w);e.registerHelper("hintWords","css",M),e.defineMIME("text/css",{documentTypes:o,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:k,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:i,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:k,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),o=n.search(t);return o>-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function o(e,t){return new RegExp((t?"^":"")+"","i")}function a(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],a=o.length-1;a>=0;a--)n.unshift(o[a])}function i(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=a.htmlState.tagName&&a.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(l))a.inTag=l+" ";else if(a.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(a.inTag);a.inTag=null;var f=">"==n.current()&&i(d[m[1]],m[2]),h=e.getMode(r,f),g=o(m[1],!0),b=o(m[1],!1);a.token=function(e,r){return e.match(g,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,b,r.localMode.token(e,r.localState))},a.localMode=h,a.localState=e.startState(h,c.indent(a.htmlState,"",""))}else a.inTag&&(a.inTag+=n.current(),n.eol()&&(a.inTag+=" "));return u}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),d={},u=n&&n.tags,p=n&&n.scriptTypes;if(a(l,d),u&&a(u,d),p)for(var m=p.length-1;m>=0;m--)d.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function r(e,t,r,n){if("string"==typeof t){var o=e.indexOf(t,r);return n&&o>-1?o+t.length:o}var a=t.exec(r?e.slice(r):e);return a?a.index+r+(n?a[0].length:0):-1}var n=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(r){return{outer:e.copyState(t,r.outer),innerActive:r.innerActive,inner:r.innerActive&&e.copyState(r.innerActive.mode,r.inner)}},token:function(o,a){if(a.innerActive){var i=a.innerActive,l=o.string;if(!i.close&&o.sol())return a.innerActive=a.inner=null,this.token(o,a);var s=i.close?r(l,i.close,o.pos,i.parseDelimiters):-1;if(s==o.pos&&!i.parseDelimiters)return o.match(i.close),a.innerActive=a.inner=null,i.delimStyle&&i.delimStyle+" "+i.delimStyle+"-close";s>-1&&(o.string=l.slice(0,s));var c=i.mode.token(o,a.inner);return s>-1&&(o.string=l),s==o.pos&&i.parseDelimiters&&(a.innerActive=a.inner=null),i.innerStyle&&(c=c?c+" "+i.innerStyle:i.innerStyle),c}for(var d=1/0,l=o.string,u=0;u";return e.multiplexingMode(e.getMode(t,"htmlmixed"),{open:r.openComment||"<%--",close:n,delimStyle:"comment",mode:{token:function(e){return e.skipTo(n)||e.skipToEnd(),"comment"}}},{open:r.open||r.scriptStartRegex||"<%",close:r.close||r.scriptEndRegex||"%>",mode:e.getMode(t,r.scriptingModeSpec)})},"htmlmixed"),e.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),e.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),e.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),e.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}),function(e){"function"==typeof define&&define("modeHtml",["mode/htmlembedded/htmlembedded.js"],function(){})}();
@@ -1 +1 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Ve=e,Ae=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),a("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),a("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=c,c(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):Me(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Oe.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(Ce.test(r)){e.eatWhile(Ce);var i=e.current();if("."!=t.lastType){if(qe.propertyIsEnumerable(i)){var u=qe[i];return a(u.type,u.style,i)}if("async"==i&&e.match(/^\s*[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(Ie&&"@"==t.peek()&&t.match(Pe))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function c(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if($e){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=Se.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(Ce.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function f(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function l(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function d(e,t,r,n,a){var i=e.cc;for(Ne.state=e,Ne.stream=a,Ne.marked=null,Ne.cc=i,Ne.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():Te?g:h)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ne.marked?Ne.marked:"variable"==r&&l(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Ne.cc.push(arguments[e])}function m(){return p.apply(null,arguments),!0}function v(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=Ne.state;if(Ne.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function y(){Ne.state.context={prev:Ne.state.context,vars:Ne.state.localVars},Ne.state.localVars=Ue}function k(){Ne.state.localVars=Ne.state.context.vars,Ne.state.context=Ne.state.context.prev}function b(e,t){var r=function(){var r=Ne.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new f(n,Ne.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function x(){var e=Ne.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?m():";"==e?p():m(t)}return t}function h(e,t){return"var"==e?m(b("vardef",t.length),Y,w(";"),x):"keyword a"==e?m(b("form"),M,h,x):"keyword b"==e?m(b("form"),h,x):"keyword d"==e?Ne.stream.match(/^\s*$/,!1)?m():m(b("stat"),A,w(";"),x):"debugger"==e?m(w(";")):"{"==e?m(b("}"),D,x):";"==e?m():"if"==e?("else"==Ne.state.lexical.info&&Ne.state.cc[Ne.state.cc.length-1]==x&&Ne.state.cc.pop()(),m(b("form"),M,h,x,re)):"function"==e?m(se):"for"==e?m(b("form"),ne,h,x):"variable"==e?$e&&"type"==t?(Ne.marked="keyword",m(G,w("operator"),G,w(";"))):$e&&"declare"==t?(Ne.marked="keyword",m(h)):m(b("stat"),S):"switch"==e?m(b("form"),M,w("{"),b("}","switch"),D,x,x):"case"==e?m(g,w(":")):"default"==e?m(w(":")):"catch"==e?m(b("form"),y,w("("),ue,w(")"),h,x,k):"class"==e?m(b("form"),le,x):"export"==e?m(b("stat"),ve,x):"import"==e?m(b("stat"),ke,x):"module"==e?m(b("form"),Z,w("{"),b("}"),D,x,x):"async"==e?m(h):"@"==t?m(g,h):p(b("stat"),g,w(";"),x)}function g(e){return V(e,!1)}function j(e){return V(e,!0)}function M(e){return"("!=e?p():m(b(")"),g,w(")"),x)}function V(e,t){if(Ne.state.fatArrowAt==Ne.stream.start){var r=t?C:$;if("("==e)return m(y,b(")"),H(ue,")"),x,w("=>"),r,k);if("variable"==e)return p(y,Z,w("=>"),r,k)}var n=t?z:E;return We.hasOwnProperty(e)?m(n):"function"==e?m(se,n):"class"==e?m(b("form"),fe,x):"keyword c"==e||"async"==e?m(t?j:g):"("==e?m(b(")"),A,w(")"),x,n):"operator"==e||"spread"==e?m(t?j:g):"["==e?m(b("]"),ge,x,n):"{"==e?J(N,"}",null,n):"quasi"==e?p(I,n):"new"==e?m(q(t)):m()}function A(e){return e.match(/[;\}\)\],]/)?p():p(g)}function E(e,t){return","==e?m(g):z(e,t,!1)}function z(e,t,r){var n=0==r?E:z,a=0==r?g:j;return"=>"==e?m(y,r?C:$,k):"operator"==e?/\+\+|--/.test(t)||$e&&"!"==t?m(n):"?"==t?m(g,w(":"),a):m(a):"quasi"==e?p(I,n):";"!=e?"("==e?J(j,")","call",n):"."==e?m(W,n):"["==e?m(b("]"),A,w("]"),x,n):$e&&"as"==t?(Ne.marked="keyword",m(G,n)):"regexp"==e?(Ne.state.lastType=Ne.marked="operator",Ne.stream.backUp(Ne.stream.pos-Ne.stream.start-1),m(a)):void 0:void 0}function I(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?m(I):m(g,T)}function T(e){if("}"==e)return Ne.marked="string-2",Ne.state.tokenize=s,m(I)}function $(e){return u(Ne.stream,Ne.state),p("{"==e?h:g)}function C(e){return u(Ne.stream,Ne.state),p("{"==e?h:j)}function q(e){return function(t){return"."==t?m(e?P:O):"variable"==t&&$e?m(X,e?z:E):p(e?j:g)}}function O(e,t){if("target"==t)return Ne.marked="keyword",m(E)}function P(e,t){if("target"==t)return Ne.marked="keyword",m(z)}function S(e){return":"==e?m(x,h):p(E,w(";"),x)}function W(e){if("variable"==e)return Ne.marked="property",m()}function N(e,t){if("async"==e)return Ne.marked="property",m(N);if("variable"==e||"keyword"==Ne.style){if(Ne.marked="property","get"==t||"set"==t)return m(U);var r;return $e&&Ne.state.fatArrowAt==Ne.stream.start&&(r=Ne.stream.match(/^\s*:\s*/,!1))&&(Ne.state.fatArrowAt=Ne.stream.pos+r[0].length),m(B)}return"number"==e||"string"==e?(Ne.marked=Ie?"property":Ne.style+" property",m(B)):"jsonld-keyword"==e?m(B):"modifier"==e?m(N):"["==e?m(g,w("]"),B):"spread"==e?m(j,B):"*"==t?(Ne.marked="keyword",m(N)):":"==e?p(B):void 0}function U(e){return"variable"!=e?p(B):(Ne.marked="property",m(se))}function B(e){return":"==e?m(j):"("==e?p(se):void 0}function H(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=Ne.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),m(function(r,n){return r==t||n==t?p():p(e)},n)}return a==t||i==t?m():m(w(t))}return function(r,a){return r==t||a==t?m():p(e,n)}}function J(e,t,r){for(var n=3;n"==e)return m(G)}function L(e,t){return"variable"==e||"keyword"==Ne.style?(Ne.marked="property",m(L)):"?"==t?m(L):":"==e?m(G):"["==e?m(g,F,w("]"),L):void 0}function Q(e){return"variable"==e?m(Q):":"==e?m(G):void 0}function R(e,t){return"<"==t?m(b(">"),H(G,">"),x,R):"|"==t||"."==e?m(G):"["==e?m(w("]"),R):"extends"==t?m(G):void 0}function X(e,t){if("<"==t)return m(b(">"),H(G,">"),x,R)}function Y(){return p(Z,F,ee,te)}function Z(e,t){return"modifier"==e?m(Z):"variable"==e?(v(t),m()):"spread"==e?m(Z):"["==e?J(Z,"]"):"{"==e?J(_,"}"):void 0}function _(e,t){return"variable"!=e||Ne.stream.match(/^\s*:/,!1)?("variable"==e&&(Ne.marked="property"),"spread"==e?m(Z):"}"==e?p():m(w(":"),Z,ee)):(v(t),m(ee))}function ee(e,t){if("="==t)return m(j)}function te(e){if(","==e)return m(Y)}function re(e,t){if("keyword b"==e&&"else"==t)return m(b("form","else"),h,x)}function ne(e){if("("==e)return m(b(")"),ae,w(")"),x)}function ae(e){return"var"==e?m(Y,w(";"),oe):";"==e?m(oe):"variable"==e?m(ie):p(g,w(";"),oe)}function ie(e,t){return"in"==t||"of"==t?(Ne.marked="keyword",m(g)):m(E,oe)}function oe(e,t){return";"==e?m(ce):"in"==t||"of"==t?(Ne.marked="keyword",m(g)):p(g,w(";"),ce)}function ce(e){")"!=e&&m(g)}function se(e,t){return"*"==t?(Ne.marked="keyword",m(se)):"variable"==e?(v(t),m(se)):"("==e?m(y,b(")"),H(ue,")"),x,F,h,k):$e&&"<"==t?m(b(">"),H(G,">"),x,se):void 0}function ue(e,t){return"@"==t&&m(g,ue),"spread"==e||"modifier"==e?m(ue):p(Z,F,ee)}function fe(e,t){return"variable"==e?le(e,t):de(e,t)}function le(e,t){if("variable"==e)return v(t),m(de)}function de(e,t){return"<"==t?m(b(">"),H(G,">"),x,de):"extends"==t||"implements"==t||$e&&","==e?m($e?G:g,de):"{"==e?m(b("}"),pe,x):void 0}function pe(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&Ne.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ne.marked="keyword",m(pe)):"variable"==e||"keyword"==Ne.style?(Ne.marked="property",m($e?me:se,pe)):"["==e?m(g,w("]"),$e?me:se,pe):"*"==t?(Ne.marked="keyword",m(pe)):";"==e?m(pe):"}"==e?m():"@"==t?m(g,pe):void 0}function me(e,t){return"?"==t?m(me):":"==e?m(G,ee):"="==t?m(j):p(se)}function ve(e,t){return"*"==t?(Ne.marked="keyword",m(he,w(";"))):"default"==t?(Ne.marked="keyword",m(g,w(";"))):"{"==e?m(H(ye,"}"),he,w(";")):p(h)}function ye(e,t){return"as"==t?(Ne.marked="keyword",m(w("variable"))):"variable"==e?p(j,ye):void 0}function ke(e){return"string"==e?m():p(be,xe,he)}function be(e,t){return"{"==e?J(be,"}"):("variable"==e&&v(t),"*"==t&&(Ne.marked="keyword"),m(we))}function xe(e){if(","==e)return m(be,xe)}function we(e,t){if("as"==t)return Ne.marked="keyword",m(be)}function he(e,t){if("from"==t)return Ne.marked="keyword",m(g)}function ge(e){return"]"==e?m():p(H(j,"]"))}function je(e,t){return"operator"==e.lastType||","==e.lastType||Oe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Me(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Ve,Ae,Ee=t.indentUnit,ze=r.statementIndent,Ie=r.jsonld,Te=r.json||Ie,$e=r.typescript,Ce=r.wordCharacters||/[\w$\xa1-\uffff]/,qe=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"},c={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if($e){var s={type:"variable",style:"type"},u={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var f in u)c[f]=u[f]}return c}(),Oe=/[+\-*&%=<>!?|~^@]/,Pe=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Se="([{}])",We={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ne={state:null,column:null,marked:null,cc:null},Ue={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new f((e||0)-Ee,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=c&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Ve?r:(t.lastType="operator"!=Ve||"++"!=Ae&&"--"!=Ae?Ve:"incdec",d(t,r,Ve,Ae,e))},indent:function(t,n){if(t.tokenize==c)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var f=t.cc[u];if(f==x)s=s.prev;else if(f!=re)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==E||a==z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;ze&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var l=s.type,d=o==l;return"vardef"==l?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==l&&"{"==o?s.indented:"form"==l?s.indented+Ee:"stat"==l?s.indented+(je(t,n)?ze||Ee:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:Ee):s.indented+(/^(?:case|default)\b/.test(n)?Ee:2*Ee)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Te?null:"/*",blockCommentEnd:Te?null:"*/",blockCommentContinue:Te?null:" * ",lineComment:Te?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Te?"json":"javascript",jsonldMode:Ie,jsonMode:Te,expressionAllowed:Me,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=g&&t!=j||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"function"==typeof e.define&&e.define("modeJs",["mode/javascript/javascript.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Be=e,He=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=c,c(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):Ue(e,t,1)?(n(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Qe.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(Ke.test(r)){e.eatWhile(Ke);var i=e.current();if("."!=t.lastType){if(Le.propertyIsEnumerable(i)){var u=Le[i];return a(u.type,u.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(De&&"@"==t.peek()&&t.match(Re))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function c(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ge){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=Xe.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(Ke.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function f(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function l(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function d(e,t,r,n,a){var i=e.cc;for(Ze.state=e,Ze.stream=a,Ze.marked=null,Ze.cc=i,Ze.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():Fe?I:E)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ze.marked?Ze.marked:"variable"==r&&l(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Ze.cc.push(arguments[e])}function m(){return p.apply(null,arguments),!0}function v(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function k(e){var t=Ze.state;if(Ze.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=y(e,t.context);if(null!=n)return void(t.context=n)}else if(!v(e,t.localVars))return void(t.localVars=new x(e,t.localVars));r.globalVars&&!v(e,t.globalVars)&&(t.globalVars=new x(e,t.globalVars))}function y(e,t){if(t){if(t.block){var r=y(e,t.prev);return r?r==t.prev?t:new b(r,t.vars,!0):null}return v(e,t.vars)?t:new b(t.prev,new x(e,t.vars),!1)}return null}function w(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function b(e,t,r){this.prev=e,this.vars=t,this.block=r}function x(e,t){this.name=e,this.next=t}function h(){Ze.state.context=new b(Ze.state.context,Ze.state.localVars,!1),Ze.state.localVars=_e}function g(){Ze.state.context=new b(Ze.state.context,Ze.state.localVars,!0),Ze.state.localVars=null}function j(){Ze.state.localVars=Ze.state.context.vars,Ze.state.context=Ze.state.context.prev}function M(e,t){var r=function(){var r=Ze.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new f(n,Ze.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function V(){var e=Ze.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function A(e){function t(r){return r==e?m():";"==e||"}"==r||")"==r||"]"==r?p():m(t)}return t}function E(e,t){return"var"==e?m(M("vardef",t),se,A(";"),V):"keyword a"==e?m(M("form"),$,E,V):"keyword b"==e?m(M("form"),E,V):"keyword d"==e?Ze.stream.match(/^\s*$/,!1)?m():m(M("stat"),O,A(";"),V):"debugger"==e?m(A(";")):"{"==e?m(M("}"),g,X,V,j):";"==e?m():"if"==e?("else"==Ze.state.lexical.info&&Ze.state.cc[Ze.state.cc.length-1]==V&&Ze.state.cc.pop()(),m(M("form"),$,E,V,me)):"function"==e?m(we):"for"==e?m(M("form"),ve,E,V):"class"==e||Ge&&"interface"==t?(Ze.marked="keyword",m(M("form","class"==e?e:t),je,V)):"variable"==e?Ge&&"declare"==t?(Ze.marked="keyword",m(E)):Ge&&("module"==t||"enum"==t||"type"==t)&&Ze.stream.match(/^\s*\w/,!1)?(Ze.marked="keyword","enum"==t?m(Pe):"type"==t?m(xe,A("operator"),ee,A(";")):m(M("form"),ue,A("{"),M("}"),X,V,V)):Ge&&"namespace"==t?(Ze.marked="keyword",m(M("form"),I,E,V)):Ge&&"abstract"==t?(Ze.marked="keyword",m(E)):m(M("stat"),D):"switch"==e?m(M("form"),$,A("{"),M("}","switch"),g,X,V,V,j):"case"==e?m(I,A(":")):"default"==e?m(A(":")):"catch"==e?m(M("form"),h,z,E,V,j):"export"==e?m(M("stat"),Ee,V):"import"==e?m(M("stat"),Ie,V):"async"==e?m(E):"@"==t?m(I,E):p(M("stat"),I,A(";"),V)}function z(e){if("("==e)return m(he,A(")"))}function I(e,t){return C(e,t,!1)}function T(e,t){return C(e,t,!0)}function $(e){return"("!=e?p():m(M(")"),I,A(")"),V)}function C(e,t,r){if(Ze.state.fatArrowAt==Ze.stream.start){var n=r?B:U;if("("==e)return m(h,M(")"),Q(he,")"),V,A("=>"),n,j);if("variable"==e)return p(h,ue,A("=>"),n,j)}var a=r?P:q;return Ye.hasOwnProperty(e)?m(a):"function"==e?m(we,a):"class"==e||Ge&&"interface"==t?(Ze.marked="keyword",m(M("form"),ge,V)):"keyword c"==e||"async"==e?m(r?T:I):"("==e?m(M(")"),O,A(")"),V,a):"operator"==e||"spread"==e?m(r?T:I):"["==e?m(M("]"),qe,V,a):"{"==e?R(G,"}",null,a):"quasi"==e?p(S,a):"new"==e?m(H(r)):"import"==e?m(I):m()}function O(e){return e.match(/[;\}\)\],]/)?p():p(I)}function q(e,t){return","==e?m(I):P(e,t,!1)}function P(e,t,r){var n=0==r?q:P,a=0==r?I:T;return"=>"==e?m(h,r?B:U,j):"operator"==e?/\+\+|--/.test(t)||Ge&&"!"==t?m(n):Ge&&"<"==t&&Ze.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?m(M(">"),Q(ee,">"),V,n):"?"==t?m(I,A(":"),a):m(a):"quasi"==e?p(S,n):";"!=e?"("==e?R(T,")","call",n):"."==e?m(F,n):"["==e?m(M("]"),O,A("]"),V,n):Ge&&"as"==t?(Ze.marked="keyword",m(ee,n)):"regexp"==e?(Ze.state.lastType=Ze.marked="operator",Ze.stream.backUp(Ze.stream.pos-Ze.stream.start-1),m(a)):void 0:void 0}function S(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?m(S):m(I,N)}function N(e){if("}"==e)return Ze.marked="string-2",Ze.state.tokenize=s,m(S)}function U(e){return u(Ze.stream,Ze.state),p("{"==e?E:I)}function B(e){return u(Ze.stream,Ze.state),p("{"==e?E:T)}function H(e){return function(t){return"."==t?m(e?W:J):"variable"==t&&Ge?m(ie,e?P:q):p(e?T:I)}}function J(e,t){if("target"==t)return Ze.marked="keyword",m(q)}function W(e,t){if("target"==t)return Ze.marked="keyword",m(P)}function D(e){return":"==e?m(V,E):p(q,A(";"),V)}function F(e){if("variable"==e)return Ze.marked="property",m()}function G(e,t){if("async"==e)return Ze.marked="property",m(G);if("variable"==e||"keyword"==Ze.style){if(Ze.marked="property","get"==t||"set"==t)return m(K);var r;return Ge&&Ze.state.fatArrowAt==Ze.stream.start&&(r=Ze.stream.match(/^\s*:\s*/,!1))&&(Ze.state.fatArrowAt=Ze.stream.pos+r[0].length),m(L)}return"number"==e||"string"==e?(Ze.marked=De?"property":Ze.style+" property",m(L)):"jsonld-keyword"==e?m(L):Ge&&w(t)?(Ze.marked="keyword",m(G)):"["==e?m(I,Y,A("]"),L):"spread"==e?m(T,L):"*"==t?(Ze.marked="keyword",m(G)):":"==e?p(L):void 0}function K(e){return"variable"!=e?p(L):(Ze.marked="property",m(we))}function L(e){return":"==e?m(T):"("==e?p(we):void 0}function Q(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=Ze.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),m(function(r,n){return r==t||n==t?p():p(e)},n)}return a==t||i==t?m():r&&r.indexOf(";")>-1?p(e):m(A(t))}return function(r,a){return r==t||a==t?m():p(e,n)}}function R(e,t,r){for(var n=3;n"),ee):void 0}function te(e){if("=>"==e)return m(ee)}function re(e,t){return"variable"==e||"keyword"==Ze.style?(Ze.marked="property",m(re)):"?"==t||"number"==e||"string"==e?m(re):":"==e?m(ee):"["==e?m(A("variable"),Y,A("]"),re):"("==e?p(be,re):void 0}function ne(e,t){return"variable"==e&&Ze.stream.match(/^\s*[?:]/,!1)||"?"==t?m(ne):":"==e?m(ee):"spread"==e?m(ne):p(ee)}function ae(e,t){return"<"==t?m(M(">"),Q(ee,">"),V,ae):"|"==t||"."==e||"&"==t?m(ee):"["==e?m(ee,A("]"),ae):"extends"==t||"implements"==t?(Ze.marked="keyword",m(ee)):"?"==t?m(ee,A(":"),ee):void 0}function ie(e,t){if("<"==t)return m(M(">"),Q(ee,">"),V,ae)}function oe(){return p(ee,ce)}function ce(e,t){if("="==t)return m(ee)}function se(e,t){return"enum"==t?(Ze.marked="keyword",m(Pe)):p(ue,Y,de,pe)}function ue(e,t){return Ge&&w(t)?(Ze.marked="keyword",m(ue)):"variable"==e?(k(t),m()):"spread"==e?m(ue):"["==e?R(le,"]"):"{"==e?R(fe,"}"):void 0}function fe(e,t){return"variable"!=e||Ze.stream.match(/^\s*:/,!1)?("variable"==e&&(Ze.marked="property"),"spread"==e?m(ue):"}"==e?p():"["==e?m(I,A("]"),A(":"),fe):m(A(":"),ue,de)):(k(t),m(de))}function le(){return p(ue,de)}function de(e,t){if("="==t)return m(T)}function pe(e){if(","==e)return m(se)}function me(e,t){if("keyword b"==e&&"else"==t)return m(M("form","else"),E,V)}function ve(e,t){return"await"==t?m(ve):"("==e?m(M(")"),ke,V):void 0}function ke(e){return"var"==e?m(se,ye):"variable"==e?m(ye):p(ye)}function ye(e,t){return")"==e?m():";"==e?m(ye):"in"==t||"of"==t?(Ze.marked="keyword",m(I,ye)):p(I,ye)}function we(e,t){return"*"==t?(Ze.marked="keyword",m(we)):"variable"==e?(k(t),m(we)):"("==e?m(h,M(")"),Q(he,")"),V,Z,E,j):Ge&&"<"==t?m(M(">"),Q(oe,">"),V,we):void 0}function be(e,t){return"*"==t?(Ze.marked="keyword",m(be)):"variable"==e?(k(t),m(be)):"("==e?m(h,M(")"),Q(he,")"),V,Z,j):Ge&&"<"==t?m(M(">"),Q(oe,">"),V,be):void 0}function xe(e,t){return"keyword"==e||"variable"==e?(Ze.marked="type",m(xe)):"<"==t?m(M(">"),Q(oe,">"),V):void 0}function he(e,t){return"@"==t&&m(I,he),"spread"==e?m(he):Ge&&w(t)?(Ze.marked="keyword",m(he)):Ge&&"this"==e?m(Y,de):p(ue,Y,de)}function ge(e,t){return"variable"==e?je(e,t):Me(e,t)}function je(e,t){if("variable"==e)return k(t),m(Me)}function Me(e,t){return"<"==t?m(M(">"),Q(oe,">"),V,Me):"extends"==t||"implements"==t||Ge&&","==e?("implements"==t&&(Ze.marked="keyword"),m(Ge?ee:I,Me)):"{"==e?m(M("}"),Ve,V):void 0}function Ve(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Ge&&w(t))&&Ze.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ze.marked="keyword",m(Ve)):"variable"==e||"keyword"==Ze.style?(Ze.marked="property",m(Ge?Ae:we,Ve)):"number"==e||"string"==e?m(Ge?Ae:we,Ve):"["==e?m(I,Y,A("]"),Ge?Ae:we,Ve):"*"==t?(Ze.marked="keyword",m(Ve)):Ge&&"("==e?p(be,Ve):";"==e||","==e?m(Ve):"}"==e?m():"@"==t?m(I,Ve):void 0}function Ae(e,t){if("?"==t)return m(Ae);if(":"==e)return m(ee,de);if("="==t)return m(T);var r=Ze.state.lexical.prev;return p(r&&"interface"==r.info?be:we)}function Ee(e,t){return"*"==t?(Ze.marked="keyword",m(Oe,A(";"))):"default"==t?(Ze.marked="keyword",m(I,A(";"))):"{"==e?m(Q(ze,"}"),Oe,A(";")):p(E)}function ze(e,t){return"as"==t?(Ze.marked="keyword",m(A("variable"))):"variable"==e?p(T,ze):void 0}function Ie(e){return"string"==e?m():"("==e?p(I):p(Te,$e,Oe)}function Te(e,t){return"{"==e?R(Te,"}"):("variable"==e&&k(t),"*"==t&&(Ze.marked="keyword"),m(Ce))}function $e(e){if(","==e)return m(Te,$e)}function Ce(e,t){if("as"==t)return Ze.marked="keyword",m(Te)}function Oe(e,t){if("from"==t)return Ze.marked="keyword",m(I)}function qe(e){return"]"==e?m():p(Q(T,"]"))}function Pe(){return p(M("form"),ue,A("{"),M("}"),Q(Se,"}"),V,V)}function Se(){return p(ue,de)}function Ne(e,t){return"operator"==e.lastType||","==e.lastType||Qe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Ue(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Be,He,Je=t.indentUnit,We=r.statementIndent,De=r.jsonld,Fe=r.json||De,Ge=r.typescript,Ke=r.wordCharacters||/[\w$\xa1-\uffff]/,Le=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),Qe=/[+\-*&%=<>!?|~^@]/,Re=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Xe="([{}])",Ye={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ze={state:null,column:null,marked:null,cc:null},_e=new x("this",new x("arguments",null));return j.lex=!0,V.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new f((e||0)-Je,0,"block",!1),localVars:r.localVars,context:r.localVars&&new b(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=c&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Be?r:(t.lastType="operator"!=Be||"++"!=He&&"--"!=He?Be:"incdec",d(t,r,Be,He,e))},indent:function(t,n){if(t.tokenize==c)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var f=t.cc[u];if(f==V)s=s.prev;else if(f!=me)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==q||a==P)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;We&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var l=s.type,d=o==l;return"vardef"==l?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==l&&"{"==o?s.indented:"form"==l?s.indented+Je:"stat"==l?s.indented+(Ne(t,n)?We||Je:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:Je):s.indented+(/^(?:case|default)\b/.test(n)?Je:2*Je)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Fe?null:"/*",blockCommentEnd:Fe?null:"*/",blockCommentContinue:Fe?null:" * ",lineComment:Fe?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Fe?"json":"javascript",jsonldMode:De,jsonMode:Fe,expressionAllowed:Ue,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=I&&t!=T||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"function"==typeof e.define&&e.define("modeJs",["mode/javascript/javascript.js"],function(){})}(this);
@@ -1,3 +1,3 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,a){function i(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(M=e.eat("/")?"closeTag":"openTag",t.tokenize=o,"tag bracket");if("&"==n){var a;return a=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),a?"atom":"error"}return e.eatWhile(/[^&<]/),null}function o(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=i,M=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return M="equals",null;if("<"==r){t.tokenize=i,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=o;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=i;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=i;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?g:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),z="tag",y):(z="error",f)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(z="tag",_):(z="tag error",h)}return z="error",h}function _(e,t,r){return"endTag"!=e?(z="error",_):(d(r),m)}function h(e,t,r){return z="error",_(e,t,r)}function y(e,t,r){if("word"==e)return z="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,a=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new u(r,n,a==r.indented)),m}return z="error",y}function b(e,t,r){return"equals"==e?k:(x.allowMissing||(z="error"),y(e,t,r))}function k(e,t,r){return"string"==e?v:"word"==e&&x.allowUnquoted?(z="string",y):(z="error",y(e,t,r))}function v(e,t,r){return"string"==e?v:y(e,t,r)}var w=n.indentUnit,x={},q=a.htmlMode?t:r;for(var S in q)x[S]=q[S];for(var S in a)x[S]=a[S];var M,z;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;M=null;var r=t.tokenize(e,t);return(r||M)&&"comment"!=r&&(z=null,t.state=t.state(M||r,e,t),z&&(r="error"==z?r+" error":z)),r},indent:function(t,r,n){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=o&&t.tokenize!=i)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Se=e,Me=r,t}function i(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=o(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),a("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),a("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):qe(e,t,1)?(n(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(Ae.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(Ie.test(r)){e.eatWhile(Ie);var i=e.current();if("."!=t.lastType){if(Ee.propertyIsEnumerable(i)){var c=Ee[i];return a(c.type,c.style,i)}if("async"==i&&e.match(/^\s*[\(\w]/,!1))return a("async","keyword",i)}return a("variable","variable",i)}}function o(e){return function(t,r){var n,o=!1;if(Ce&&"@"==t.peek()&&t.match(Le))return r.tokenize=i,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=i),a("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=i;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=i;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Pe){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var l=e.string.charAt(o),s=Oe.indexOf(l);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==l&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(Ie.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function u(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,a){var i=e.cc;for($e.state=e,$e.stream=a,$e.marked=null,$e.cc=i,$e.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():je?w:v)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return $e.marked?$e.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)$e.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function g(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=$e.state;if($e.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function _(){$e.state.context={prev:$e.state.context,vars:$e.state.localVars},$e.state.localVars=Fe}function h(){$e.state.localVars=$e.state.context.vars,$e.state.context=$e.state.context.prev}function y(e,t){var r=function(){var r=$e.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new u(n,$e.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function b(){var e=$e.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function k(e){function t(r){return r==e?f():";"==e?m():f(t)}return t}function v(e,t){return"var"==e?f(y("vardef",t.length),X,k(";"),b):"keyword a"==e?f(y("form"),q,v,b):"keyword b"==e?f(y("form"),v,b):"keyword d"==e?$e.stream.match(/^\s*$/,!1)?f():f(y("stat"),M,k(";"),b):"debugger"==e?f(k(";")):"{"==e?f(y("}"),V,b):";"==e?f():"if"==e?("else"==$e.state.lexical.info&&$e.state.cc[$e.state.cc.length-1]==b&&$e.state.cc.pop()(),f(y("form"),q,v,b,re)):"function"==e?f(se):"for"==e?f(y("form"),ne,v,b):"variable"==e?Pe&&"type"==t?($e.marked="keyword",f(W,k("operator"),W,k(";"))):Pe&&"declare"==t?($e.marked="keyword",f(v)):f(y("stat"),O):"switch"==e?f(y("form"),q,k("{"),y("}","switch"),V,b,b):"case"==e?f(w,k(":")):"default"==e?f(k(":")):"catch"==e?f(y("form"),_,k("("),ce,k(")"),v,b,h):"class"==e?f(y("form"),de,b):"export"==e?f(y("stat"),ge,b):"import"==e?f(y("stat"),he,b):"module"==e?f(y("form"),Q,k("{"),y("}"),V,b,b):"async"==e?f(v):"@"==t?f(w,v):m(y("stat"),w,k(";"),b)}function w(e){return S(e,!1)}function x(e){return S(e,!0)}function q(e){return"("!=e?m():f(y(")"),w,k(")"),b)}function S(e,t){if($e.state.fatArrowAt==$e.stream.start){var r=t?I:P;if("("==e)return f(_,y(")"),K(ce,")"),b,k("=>"),r,h);if("variable"==e)return m(_,Q,k("=>"),r,h)}var n=t?T:z;return De.hasOwnProperty(e)?f(n):"function"==e?f(se,n):"class"==e?f(y("form"),ue,b):"keyword c"==e||"async"==e?f(t?x:w):"("==e?f(y(")"),M,k(")"),b,n):"operator"==e||"spread"==e?f(t?x:w):"["==e?f(y("]"),we,b,n):"{"==e?N($,"}",null,n):"quasi"==e?m(C,n):"new"==e?f(E(t)):f()}function M(e){return e.match(/[;\}\)\],]/)?m():m(w)}function z(e,t){return","==e?f(w):T(e,t,!1)}function T(e,t,r){var n=0==r?z:T,a=0==r?w:x;return"=>"==e?f(_,r?I:P,h):"operator"==e?/\+\+|--/.test(t)||Pe&&"!"==t?f(n):"?"==t?f(w,k(":"),a):f(a):"quasi"==e?m(C,n):";"!=e?"("==e?N(x,")","call",n):"."==e?f(D,n):"["==e?f(y("]"),M,k("]"),b,n):Pe&&"as"==t?($e.marked="keyword",f(W,n)):"regexp"==e?($e.state.lastType=$e.marked="operator",$e.stream.backUp($e.stream.pos-$e.stream.start-1),f(a)):void 0:void 0}function C(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(C):f(w,j)}function j(e){if("}"==e)return $e.marked="string-2",$e.state.tokenize=s,f(C)}function P(e){return c($e.stream,$e.state),m("{"==e?v:w)}function I(e){return c($e.stream,$e.state),m("{"==e?v:x)}function E(e){return function(t){return"."==t?f(e?L:A):"variable"==t&&Pe?f(Y,e?T:z):m(e?x:w)}}function A(e,t){if("target"==t)return $e.marked="keyword",f(z)}function L(e,t){if("target"==t)return $e.marked="keyword",f(T)}function O(e){return":"==e?f(b,v):m(z,k(";"),b)}function D(e){if("variable"==e)return $e.marked="property",f()}function $(e,t){if("async"==e)return $e.marked="property",f($);if("variable"==e||"keyword"==$e.style){if($e.marked="property","get"==t||"set"==t)return f(F);var r;return Pe&&$e.state.fatArrowAt==$e.stream.start&&(r=$e.stream.match(/^\s*:\s*/,!1))&&($e.state.fatArrowAt=$e.stream.pos+r[0].length),f(B)}return"number"==e||"string"==e?($e.marked=Ce?"property":$e.style+" property",f(B)):"jsonld-keyword"==e?f(B):"modifier"==e?f($):"["==e?f(w,k("]"),B):"spread"==e?f(x,B):"*"==t?($e.marked="keyword",f($)):":"==e?m(B):void 0}function F(e){return"variable"!=e?m(B):($e.marked="property",f(se))}function B(e){return":"==e?f(x):"("==e?m(se):void 0}function K(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=$e.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return a==t||i==t?f():f(k(t))}return function(r,a){return r==t||a==t?f():m(e,n)}}function N(e,t,r){for(var n=3;n"==e)return f(W)}function H(e,t){return"variable"==e||"keyword"==$e.style?($e.marked="property",f(H)):"?"==t?f(H):":"==e?f(W):"["==e?f(w,U,k("]"),H):void 0}function G(e){return"variable"==e?f(G):":"==e?f(W):void 0}function Z(e,t){return"<"==t?f(y(">"),K(W,">"),b,Z):"|"==t||"."==e?f(W):"["==e?f(k("]"),Z):"extends"==t?f(W):void 0}function Y(e,t){if("<"==t)return f(y(">"),K(W,">"),b,Z)}function X(){return m(Q,U,ee,te)}function Q(e,t){return"modifier"==e?f(Q):"variable"==e?(g(t),f()):"spread"==e?f(Q):"["==e?N(Q,"]"):"{"==e?N(J,"}"):void 0}function J(e,t){return"variable"!=e||$e.stream.match(/^\s*:/,!1)?("variable"==e&&($e.marked="property"),"spread"==e?f(Q):"}"==e?m():f(k(":"),Q,ee)):(g(t),f(ee))}function ee(e,t){if("="==t)return f(x)}function te(e){if(","==e)return f(X)}function re(e,t){if("keyword b"==e&&"else"==t)return f(y("form","else"),v,b)}function ne(e){if("("==e)return f(y(")"),ae,k(")"),b)}function ae(e){return"var"==e?f(X,k(";"),oe):";"==e?f(oe):"variable"==e?f(ie):m(w,k(";"),oe)}function ie(e,t){return"in"==t||"of"==t?($e.marked="keyword",f(w)):f(z,oe)}function oe(e,t){return";"==e?f(le):"in"==t||"of"==t?($e.marked="keyword",f(w)):m(w,k(";"),le)}function le(e){")"!=e&&f(w)}function se(e,t){return"*"==t?($e.marked="keyword",f(se)):"variable"==e?(g(t),f(se)):"("==e?f(_,y(")"),K(ce,")"),b,U,v,h):Pe&&"<"==t?f(y(">"),K(W,">"),b,se):void 0}function ce(e,t){return"@"==t&&f(w,ce),"spread"==e||"modifier"==e?f(ce):m(Q,U,ee)}function ue(e,t){return"variable"==e?de(e,t):pe(e,t)}function de(e,t){if("variable"==e)return g(t),f(pe)}function pe(e,t){return"<"==t?f(y(">"),K(W,">"),b,pe):"extends"==t||"implements"==t||Pe&&","==e?f(Pe?W:w,pe):"{"==e?f(y("}"),me,b):void 0}function me(e,t){return"modifier"==e||"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t)&&$e.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?($e.marked="keyword",f(me)):"variable"==e||"keyword"==$e.style?($e.marked="property",f(Pe?fe:se,me)):"["==e?f(w,k("]"),Pe?fe:se,me):"*"==t?($e.marked="keyword",f(me)):";"==e?f(me):"}"==e?f():"@"==t?f(w,me):void 0}function fe(e,t){return"?"==t?f(fe):":"==e?f(W,ee):"="==t?f(x):m(se)}function ge(e,t){return"*"==t?($e.marked="keyword",f(ve,k(";"))):"default"==t?($e.marked="keyword",f(w,k(";"))):"{"==e?f(K(_e,"}"),ve,k(";")):m(v)}function _e(e,t){return"as"==t?($e.marked="keyword",f(k("variable"))):"variable"==e?m(x,_e):void 0}function he(e){return"string"==e?f():m(ye,be,ve)}function ye(e,t){return"{"==e?N(ye,"}"):("variable"==e&&g(t),"*"==t&&($e.marked="keyword"),f(ke))}function be(e){if(","==e)return f(ye,be)}function ke(e,t){if("as"==t)return $e.marked="keyword",f(ye)}function ve(e,t){if("from"==t)return $e.marked="keyword",f(w)}function we(e){return"]"==e?f():m(K(x,"]"))}function xe(e,t){return"operator"==e.lastType||","==e.lastType||Ae.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function qe(e,t,r){return t.tokenize==i&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Se,Me,ze=t.indentUnit,Te=r.statementIndent,Ce=r.jsonld,je=r.json||Ce,Pe=r.typescript,Ie=r.wordCharacters||/[\w$\xa1-\uffff]/,Ee=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"},l={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n};if(Pe){var s={type:"variable",style:"type"},c={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),readonly:e("modifier"),string:s,number:s,boolean:s,any:s};for(var u in c)l[u]=c[u]}return l}(),Ae=/[+\-*&%=<>!?|~^@]/,Le=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Oe="([{}])",De={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},$e={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:i,lastType:"sof",cc:[],lexical:new u((e||0)-ze,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Se?r:(t.lastType="operator"!=Se||"++"!=Me&&"--"!=Me?Se:"incdec",p(t,r,Se,Me,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=i)return 0;var a,o=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==b)s=s.prev;else if(u!=re)break}for(;("stat"==s.type||"form"==s.type)&&("}"==o||(a=t.cc[t.cc.length-1])&&(a==z||a==T)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Te&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,p=o==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==d&&"{"==o?s.indented:"form"==d?s.indented+ze:"stat"==d?s.indented+(xe(t,n)?Te||ze:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:ze):s.indented+(/^(?:case|default)\b/.test(n)?ze:2*ze)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:je?null:"/*",blockCommentEnd:je?null:"*/",blockCommentContinue:je?null:" * ",lineComment:je?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:je?"json":"javascript",jsonldMode:Ce,jsonMode:je,expressionAllowed:qe,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=w&&t!=x||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=o,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function i(e){return function(t,r){for(var a,i=!1;null!=(a=t.next());){if(a==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==a}return(a==e||!i&&")"!=e)&&(r.tokenize=null),n("string","string")}}function o(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:_),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return P[r.context.type](e,t,r)}function d(e,t,r,n){for(var a=n||1;a>0;a--)r.context=r.context.prev;return u(e,t,r)}function p(e){var t=e.current().toLowerCase();g=z.hasOwnProperty(t)?"atom":M.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,g,_=t.indentUnit,h=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},k=r.mediaFeatures||{},v=r.mediaValueKeywords||{},w=r.propertyKeywords||{},x=r.nonStandardPropertyKeywords||{},q=r.fontProperties||{},S=r.counterDescriptors||{},M=r.colorKeywords||{},z=r.valueKeywords||{},T=r.allowNested,C=r.lineComment,j=!0===r.supportsAtComponent,P={};return P.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(j&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(T&&"("==e)return s(r,t,"parens")}return r.context.type},P.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return w.hasOwnProperty(n)?(g="property","maybeprop"):x.hasOwnProperty(n)?(g="string-2","maybeprop"):T?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":T||"hash"!=e&&"qualifier"!=e?P.top(e,t,r):(g="error","block")},P.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},P.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&T)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},P.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},P.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},P.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(g="variable-3",r.context.type):u(e,t,r)},P.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):P.atBlock(e,t,r)},P.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,T?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":v.hasOwnProperty(n)?"keyword":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"string-2":z.hasOwnProperty(n)?"atom":M.hasOwnProperty(n)?"keyword":"error"}return r.context.type},P.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,T?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},P.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):P.atBlock(e,t,r)},P.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},P.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!q.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},P.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},P.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||a)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),g=r,"comment"!=f&&(t.state=P[t.state](f,e,t)),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-_)):(r=r.prev,a=r.indent)),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}})
2
- ;var n=["domain","regexp","url","url-prefix"],a=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(d),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(m),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],_=t(g),h=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(h),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=t(b),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=t(v),x=n.concat(i).concat(l).concat(c).concat(d).concat(m).concat(b).concat(v);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:a,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:w,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:w,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:o,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),a=n.search(t);return a>-1?e.backUp(n.length-a):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"","i")}function i(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),a=e[r],i=a.length-1;i>=0;i--)n.unshift(a[i])}function o(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))i.inTag=l+" ";else if(i.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var f=">"==n.current()&&o(u[m[1]],m[2]),g=e.getMode(r,f),_=a(m[1],!0),h=a(m[1],!1);i.token=function(e,r){return e.match(_,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,h,r.localMode.token(e,r.localState))},i.localMode=g,i.localState=e.startState(g,c.indent(i.htmlState,""))}else i.inTag&&(i.inTag+=n.current(),n.eol()&&(i.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,p=n&&n.scriptTypes;if(i(l,u),d&&i(d,u),p)for(var m=p.length-1;m>=0;m--)u.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/clike/clike",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=a,this.prev=i}function r(e,r,n,a){var i=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=n&&(i=e.context.indented),e.context=new t(i,r,n,a,null,e.context)}function n(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function a(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function i(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function o(e){for(var t={},r=e.split(" "),n=0;n!?|\/]/,E=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-g,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(null==o.align&&(o.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return p(e,t),null;m=f=null;var l=(t.tokenize||c)(e,t);if("comment"==l||"meta"==l)return l;if(null==o.align&&(o.align=!0),";"==m||":"==m||","==m&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)n(t);else if("{"==m)r(t,e.column(),"}");else if("["==m)r(t,e.column(),"]");else if("("==m)r(t,e.column(),")");else if("}"==m){for(;"statement"==o.type;)o=n(t);for("}"==o.type&&(o=n(t));"statement"==o.type;)o=n(t)}else m==o.type?n(t):M&&(("}"==o.type||"top"==o.type)&&";"!=m||"statement"==o.type&&"newstatement"==m)&&r(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&a(e,t,e.start)&&i(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),q.token){var u=q.token(e,t,l);void 0!==u&&(l=u)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=f?"def":l||m,p(e,t),l},indent:function(t,r){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var n=t.context,a=r&&r.charAt(0);if("statement"==n.type&&"}"==a&&(n=n.prev),s.dontIndentStatements)for(;"statement"==n.type&&s.dontIndentStatements.test(n.info);)n=n.prev;if(q.indent){var i=q.indent(t,n,r);if("number"==typeof i)return i}var o=a==n.type,l=n.prev&&"switch"==n.prev.info;if(s.allmanIndentation&&/[{(]/.test(a)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==a?0:_):!n.align||h&&")"==n.type?")"!=n.type||o?n.indented+(o?0:g)+(o||!l||/^(?:case|default)\b/.test(r)?0:g):n.indented+_:n.column+(o?0:1)},electricInput:z?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var b="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",k="int long char short double float unsigned signed void size_t ptrdiff_t";g(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:o(b),types:o(k+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:o("case do else for if switch while struct"),defKeywords:o("struct"),typeFirstDefinitions:!0,atoms:o("null true false"),hooks:{"#":s,"*":c},modeProps:{fold:["brace","include"]}}),g(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:o(b+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:o(k+" bool wchar_t"),blockKeywords:o("catch class do else finally for if struct switch try while"),defKeywords:o("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:o("true false null"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":s,"*":c,u:d,U:d,L:d,R:d,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&p(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),g("text/x-java",{name:"clike",keywords:o("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:o("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:o("catch class do else finally for if switch try while"),defKeywords:o("class interface package enum @interface"),typeFirstDefinitions:!0,atoms:o("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),g("text/x-csharp",{name:"clike",keywords:o("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:o("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:o("catch class do else finally for foreach if struct switch try while"),defKeywords:o("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=m,m(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),g("text/x-scala",{name:"clike",keywords:o("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:o("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:o("catch class enum do else finally for forSome if match switch try while"),defKeywords:o("class enum def object package trait type val var"),atoms:o("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){
3
- return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=_,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,r){var n=r.context;return!("}"!=n.type||!n.align||!e.eat(">"))&&(r.context=new t(n.indented,n.column,n.type,n.info,null,n.prev),"operator")}},modeProps:{closeBrackets:{triples:'"'}}}),g("text/x-kotlin",{name:"clike",keywords:o("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend"),types:o("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object interface fun"),atoms:o("true false null this"),hooks:{'"':function(e,t){return t.tokenize=h(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),g(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:o("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-nesc",{name:"clike",keywords:o(b+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:o(k),blockKeywords:o("case do else for if switch while struct"),atoms:o("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),g("text/x-objectivec",{name:"clike",keywords:o(b+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:o(k),atoms:o("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":s,indent:function(e,t,r){if("statement"==t.type&&/^@\w/.test(r))return t.indented}},modeProps:{fold:"brace"}}),g("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:o(k),blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var v=null;g("text/x-ceylon",{name:"clike",keywords:o("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:o("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=y(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!v||!e.match("`"))&&(t.tokenize=v,v=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define("mode/php/php.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=e.split(" "),n=0;n\w/,!1)&&(t.tokenize=r([[["->",null]],[[/[\w]+/,"variable"]]],n,a)),"variable-2";for(var i=!1;!e.eol()&&(i||!1===a||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(n)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}var i="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",o="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",l="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[i,o,l].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var s={name:"clike",helperType:"php",keywords:t(i),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(o),builtin:t(l),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var a=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(r[0].length+(a?2:1));if(a&&e.eat(a),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=n(i,"'"!=a),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=n('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=n(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,r){function n(t,r){var n=r.curMode==i;if(t.sol()&&r.pending&&'"'!=r.pending&&"'"!=r.pending&&(r.pending=null),n)return n&&null==r.php.tokenize&&t.match("?>")?(r.curMode=a,r.curState=r.html,r.php.context.prev||(r.php=null),"meta"):i.token(t,r.curState);if(t.match(/^<\?\w*/))return r.curMode=i,r.php||(r.php=e.startState(i,a.indent(r.html,""))),r.curState=r.php,"meta";if('"'==r.pending||"'"==r.pending){for(;!t.eol()&&t.next()!=r.pending;);var o="string"}else if(r.pending&&t.pos/.test(s)?r.pending=l[0]:r.pending={end:t.pos,style:o},t.backUp(s.length-c)),o}var a=e.getMode(t,r&&r.htmlMode||"text/html"),i=e.getMode(t,s);return{startState:function(){var t=e.startState(a),n=r.startOpen?e.startState(i):null;return{html:t,php:n,curMode:r.startOpen?i:a,curState:r.startOpen?n:t,pending:null}},copyState:function(t){var r,n=t.html,o=e.copyState(a,n),l=t.php,s=l&&e.copyState(i,l);return r=t.curMode==a?o:s,{html:o,php:s,curMode:t.curMode,curState:r,pending:t.pending}},token:n,indent:function(e,t){return e.curMode!=i&&/^\s*<\//.test(t)||e.curMode==i&&/^\?>/.test(t)?a.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",s)}),function(e){"function"==typeof e.define&&e.define("modePHP",["mode/php/php.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/xml/xml",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",function(n,a){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=i,"tag bracket");if("&"==n){var a;return a=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),a?"atom":"error"}return e.eatWhile(/[^&<]/),null}function i(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,T=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return T="equals",null;if("<"==r){t.tokenize=o,t.state=m,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=i;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function m(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?g:m}function f(e,t,r){return"word"==e?(r.tagName=t.current(),z="tag",y):x.allowMissingTagName&&"endTag"==e?(z="tag bracket",y(e,t,r)):(z="error",f)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&x.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===x.matchClosing?(z="tag",_):(z="tag error",h)}return x.allowMissingTagName&&"endTag"==e?(z="tag bracket",_(e,t,r)):(z="error",h)}function _(e,t,r){return"endTag"!=e?(z="error",_):(d(r),m)}function h(e,t,r){return z="error",_(e,t,r)}function y(e,t,r){if("word"==e)return z="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,a=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n)?p(r,n):(p(r,n),r.context=new u(r,n,a==r.indented)),m}return z="error",y}function b(e,t,r){return"equals"==e?k:(x.allowMissing||(z="error"),y(e,t,r))}function k(e,t,r){return"string"==e?v:"word"==e&&x.allowUnquoted?(z="string",y):(z="error",y(e,t,r))}function v(e,t,r){return"string"==e?v:y(e,t,r)}var w=n.indentUnit,x={},q=a.htmlMode?t:r;for(var S in q)x[S]=q[S];for(var S in a)x[S]=a[S];var T,z;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var r=t.tokenize(e,t);return(r||T)&&"comment"!=r&&(z=null,t.state=t.state(T||r,e,t),z&&(r="error"==z?r+" error":z)),r},indent:function(t,r,n){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==x.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/javascript/javascript",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function a(e,t,r){return Fe=e,$e=r,t}function o(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=i(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return a("number","number");if("."==r&&e.match(".."))return a("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return a(r);if("="==r&&e.eat(">"))return a("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return a("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),a("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),a("comment","comment")):De(e,t,1)?(n(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),a("regexp","string-2")):(e.eat("="),a("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),a("error","error");if(He.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),a("operator","operator",e.current());if(We.test(r)){e.eatWhile(We);var o=e.current();if("."!=t.lastType){if(Ge.propertyIsEnumerable(o)){var c=Ge[o];return a(c.type,c.style,o)}if("async"==o&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return a("async","keyword",o)}return a("variable","variable",o)}}function i(e){return function(t,r){var n,i=!1;if(Ue&&"@"==t.peek()&&t.match(Ze))return r.tokenize=o,a("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=o),a("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=o;break}n="*"==r}return a("comment","comment")}function s(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=o;break}n=!n&&"\\"==r}return a("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ve){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,o=!1,i=r-1;i>=0;--i){var l=e.string.charAt(i),s=Xe.indexOf(l);if(s>=0&&s<3){if(!a){++i;break}if(0==--a){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++a;else if(We.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!a){++i;break}}}o&&!a&&(t.fatArrowAt=i)}}function u(e,t,r,n,a,o){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=o,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,a){var o=e.cc;for(Qe.state=e,Qe.stream=a,Qe.marked=null,Qe.cc=o,Qe.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():Re?C:z)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Qe.marked?Qe.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Qe.cc.push(arguments[e])}function f(){return m.apply(null,arguments),!0}function g(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function _(e){var t=Qe.state;if(Qe.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=h(e,t.context);if(null!=n)return void(t.context=n)}else if(!g(e,t.localVars))return void(t.localVars=new k(e,t.localVars));r.globalVars&&!g(e,t.globalVars)&&(t.globalVars=new k(e,t.globalVars))}function h(e,t){if(t){if(t.block){var r=h(e,t.prev);return r?r==t.prev?t:new b(r,t.vars,!0):null}return g(e,t.vars)?t:new b(t.prev,new k(e,t.vars),!1)}return null}function y(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function b(e,t,r){this.prev=e,this.vars=t,this.block=r}function k(e,t){this.name=e,this.next=t}function v(){Qe.state.context=new b(Qe.state.context,Qe.state.localVars,!1),Qe.state.localVars=Je}function w(){Qe.state.context=new b(Qe.state.context,Qe.state.localVars,!0),Qe.state.localVars=null}function x(){Qe.state.localVars=Qe.state.context.vars,Qe.state.context=Qe.state.context.prev}function q(e,t){var r=function(){var r=Qe.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new u(n,Qe.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function S(){var e=Qe.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function T(e){function t(r){return r==e?f():";"==e||"}"==r||")"==r||"]"==r?m():f(t)}return t}function z(e,t){return"var"==e?f(q("vardef",t),se,T(";"),S):"keyword a"==e?f(q("form"),I,z,S):"keyword b"==e?f(q("form"),z,S):"keyword d"==e?Qe.stream.match(/^\s*$/,!1)?f():f(q("stat"),E,T(";"),S):"debugger"==e?f(T(";")):"{"==e?f(q("}"),w,X,S,x):";"==e?f():"if"==e?("else"==Qe.state.lexical.info&&Qe.state.cc[Qe.state.cc.length-1]==S&&Qe.state.cc.pop()(),f(q("form"),I,z,S,fe)):"function"==e?f(ye):"for"==e?f(q("form"),ge,z,S):"class"==e||Ve&&"interface"==t?(Qe.marked="keyword",f(q("form","class"==e?e:t),xe,S)):"variable"==e?Ve&&"declare"==t?(Qe.marked="keyword",f(z)):Ve&&("module"==t||"enum"==t||"type"==t)&&Qe.stream.match(/^\s*\w/,!1)?(Qe.marked="keyword","enum"==t?f(Ae):"type"==t?f(ke,T("operator"),ee,T(";")):f(q("form"),ce,T("{"),q("}"),X,S,S)):Ve&&"namespace"==t?(Qe.marked="keyword",f(q("form"),C,z,S)):Ve&&"abstract"==t?(Qe.marked="keyword",f(z)):f(q("stat"),U):"switch"==e?f(q("form"),I,T("{"),q("}","switch"),w,X,S,S,x):"case"==e?f(C,T(":")):"default"==e?f(T(":")):"catch"==e?f(q("form"),v,M,z,S,x):"export"==e?f(q("stat"),ze,S):"import"==e?f(q("stat"),Ce,S):"async"==e?f(z):"@"==t?f(C,z):m(q("stat"),C,T(";"),S)}function M(e){if("("==e)return f(ve,T(")"))}function C(e,t){return P(e,t,!1)}function j(e,t){return P(e,t,!0)}function I(e){return"("!=e?m():f(q(")"),C,T(")"),S)}function P(e,t,r){if(Qe.state.fatArrowAt==Qe.stream.start){var n=r?F:D;if("("==e)return f(v,q(")"),H(ve,")"),S,T("=>"),n,x);if("variable"==e)return m(v,ce,T("=>"),n,x)}var a=r?A:N;return Ye.hasOwnProperty(e)?f(a):"function"==e?f(ye,a):"class"==e||Ve&&"interface"==t?(Qe.marked="keyword",f(q("form"),we,S)):"keyword c"==e||"async"==e?f(r?j:C):"("==e?f(q(")"),E,T(")"),S,a):"operator"==e||"spread"==e?f(r?j:C):"["==e?f(q("]"),Ne,S,a):"{"==e?Z(V,"}",null,a):"quasi"==e?m(L,a):"new"==e?f($(r)):"import"==e?f(C):f()}function E(e){return e.match(/[;\}\)\],]/)?m():m(C)}function N(e,t){return","==e?f(C):A(e,t,!1)}function A(e,t,r){var n=0==r?N:A,a=0==r?C:j;return"=>"==e?f(v,r?F:D,x):"operator"==e?/\+\+|--/.test(t)||Ve&&"!"==t?f(n):Ve&&"<"==t&&Qe.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?f(q(">"),H(ee,">"),S,n):"?"==t?f(C,T(":"),a):f(a):"quasi"==e?m(L,n):";"!=e?"("==e?Z(j,")","call",n):"."==e?f(R,n):"["==e?f(q("]"),E,T("]"),S,n):Ve&&"as"==t?(Qe.marked="keyword",f(ee,n)):"regexp"==e?(Qe.state.lastType=Qe.marked="operator",Qe.stream.backUp(Qe.stream.pos-Qe.stream.start-1),f(a)):void 0:void 0}function L(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?f(L):f(C,O)}function O(e){if("}"==e)return Qe.marked="string-2",Qe.state.tokenize=s,f(L)}function D(e){return c(Qe.stream,Qe.state),m("{"==e?z:C)}function F(e){return c(Qe.stream,Qe.state),m("{"==e?z:j)}function $(e){return function(t){return"."==t?f(e?K:B):"variable"==t&&Ve?f(oe,e?A:N):m(e?j:C)}}function B(e,t){if("target"==t)return Qe.marked="keyword",f(N)}function K(e,t){if("target"==t)return Qe.marked="keyword",f(A)}function U(e){return":"==e?f(S,z):m(N,T(";"),S)}function R(e){if("variable"==e)return Qe.marked="property",f()}function V(e,t){if("async"==e)return Qe.marked="property",f(V);if("variable"==e||"keyword"==Qe.style){if(Qe.marked="property","get"==t||"set"==t)return f(W);var r;return Ve&&Qe.state.fatArrowAt==Qe.stream.start&&(r=Qe.stream.match(/^\s*:\s*/,!1))&&(Qe.state.fatArrowAt=Qe.stream.pos+r[0].length),f(G)}return"number"==e||"string"==e?(Qe.marked=Ue?"property":Qe.style+" property",f(G)):"jsonld-keyword"==e?f(G):Ve&&y(t)?(Qe.marked="keyword",f(V)):"["==e?f(C,Y,T("]"),G):"spread"==e?f(j,G):"*"==t?(Qe.marked="keyword",f(V)):":"==e?m(G):void 0}function W(e){return"variable"!=e?m(G):(Qe.marked="property",f(ye))}function G(e){return":"==e?f(j):"("==e?m(ye):void 0}function H(e,t,r){function n(a,o){if(r?r.indexOf(a)>-1:","==a){var i=Qe.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),f(function(r,n){return r==t||n==t?m():m(e)},n)}return a==t||o==t?f():r&&r.indexOf(";")>-1?m(e):f(T(t))}return function(r,a){return r==t||a==t?f():m(e,n)}}function Z(e,t,r){for(var n=3;n"),ee):void 0}function te(e){if("=>"==e)return f(ee)}function re(e,t){return"variable"==e||"keyword"==Qe.style?(Qe.marked="property",f(re)):"?"==t||"number"==e||"string"==e?f(re):":"==e?f(ee):"["==e?f(T("variable"),Y,T("]"),re):"("==e?m(be,re):void 0}function ne(e,t){return"variable"==e&&Qe.stream.match(/^\s*[?:]/,!1)||"?"==t?f(ne):":"==e?f(ee):"spread"==e?f(ne):m(ee)}function ae(e,t){return"<"==t?f(q(">"),H(ee,">"),S,ae):"|"==t||"."==e||"&"==t?f(ee):"["==e?f(ee,T("]"),ae):"extends"==t||"implements"==t?(Qe.marked="keyword",f(ee)):"?"==t?f(ee,T(":"),ee):void 0}function oe(e,t){if("<"==t)return f(q(">"),H(ee,">"),S,ae)}function ie(){return m(ee,le)}function le(e,t){if("="==t)return f(ee)}function se(e,t){return"enum"==t?(Qe.marked="keyword",f(Ae)):m(ce,Y,pe,me)}function ce(e,t){return Ve&&y(t)?(Qe.marked="keyword",f(ce)):"variable"==e?(_(t),f()):"spread"==e?f(ce):"["==e?Z(de,"]"):"{"==e?Z(ue,"}"):void 0}function ue(e,t){return"variable"!=e||Qe.stream.match(/^\s*:/,!1)?("variable"==e&&(Qe.marked="property"),"spread"==e?f(ce):"}"==e?m():"["==e?f(C,T("]"),T(":"),ue):f(T(":"),ce,pe)):(_(t),f(pe))}function de(){return m(ce,pe)}function pe(e,t){if("="==t)return f(j)}function me(e){if(","==e)return f(se)}function fe(e,t){if("keyword b"==e&&"else"==t)return f(q("form","else"),z,S)}function ge(e,t){return"await"==t?f(ge):"("==e?f(q(")"),_e,S):void 0}function _e(e){return"var"==e?f(se,he):"variable"==e?f(he):m(he)}function he(e,t){return")"==e?f():";"==e?f(he):"in"==t||"of"==t?(Qe.marked="keyword",f(C,he)):m(C,he)}function ye(e,t){return"*"==t?(Qe.marked="keyword",f(ye)):"variable"==e?(_(t),f(ye)):"("==e?f(v,q(")"),H(ve,")"),S,Q,z,x):Ve&&"<"==t?f(q(">"),H(ie,">"),S,ye):void 0}function be(e,t){return"*"==t?(Qe.marked="keyword",f(be)):"variable"==e?(_(t),f(be)):"("==e?f(v,q(")"),H(ve,")"),S,Q,x):Ve&&"<"==t?f(q(">"),H(ie,">"),S,be):void 0}function ke(e,t){return"keyword"==e||"variable"==e?(Qe.marked="type",f(ke)):"<"==t?f(q(">"),H(ie,">"),S):void 0}function ve(e,t){return"@"==t&&f(C,ve),"spread"==e?f(ve):Ve&&y(t)?(Qe.marked="keyword",f(ve)):Ve&&"this"==e?f(Y,pe):m(ce,Y,pe)}function we(e,t){return"variable"==e?xe(e,t):qe(e,t)}function xe(e,t){if("variable"==e)return _(t),f(qe)}function qe(e,t){return"<"==t?f(q(">"),H(ie,">"),S,qe):"extends"==t||"implements"==t||Ve&&","==e?("implements"==t&&(Qe.marked="keyword"),f(Ve?ee:C,qe)):"{"==e?f(q("}"),Se,S):void 0}function Se(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||Ve&&y(t))&&Qe.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Qe.marked="keyword",f(Se)):"variable"==e||"keyword"==Qe.style?(Qe.marked="property",f(Ve?Te:ye,Se)):"number"==e||"string"==e?f(Ve?Te:ye,Se):"["==e?f(C,Y,T("]"),Ve?Te:ye,Se):"*"==t?(Qe.marked="keyword",f(Se)):Ve&&"("==e?m(be,Se):";"==e||","==e?f(Se):"}"==e?f():"@"==t?f(C,Se):void 0}function Te(e,t){if("?"==t)return f(Te);if(":"==e)return f(ee,pe);if("="==t)return f(j);var r=Qe.state.lexical.prev;return m(r&&"interface"==r.info?be:ye)}function ze(e,t){return"*"==t?(Qe.marked="keyword",f(Ee,T(";"))):"default"==t?(Qe.marked="keyword",f(C,T(";"))):"{"==e?f(H(Me,"}"),Ee,T(";")):m(z)}function Me(e,t){return"as"==t?(Qe.marked="keyword",f(T("variable"))):"variable"==e?m(j,Me):void 0}function Ce(e){return"string"==e?f():"("==e?m(C):m(je,Ie,Ee)}function je(e,t){return"{"==e?Z(je,"}"):("variable"==e&&_(t),"*"==t&&(Qe.marked="keyword"),f(Pe))}function Ie(e){if(","==e)return f(je,Ie)}function Pe(e,t){if("as"==t)return Qe.marked="keyword",f(je)}function Ee(e,t){if("from"==t)return Qe.marked="keyword",f(C)}function Ne(e){return"]"==e?f():m(H(j,"]"))}function Ae(){return m(q("form"),ce,T("{"),q("}"),H(Le,"}"),S,S)}function Le(){return m(ce,pe)}function Oe(e,t){return"operator"==e.lastType||","==e.lastType||He.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function De(e,t,r){return t.tokenize==o&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}var Fe,$e,Be=t.indentUnit,Ke=r.statementIndent,Ue=r.jsonld,Re=r.json||Ue,Ve=r.typescript,We=r.wordCharacters||/[\w$\xa1-\uffff]/,Ge=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),o=e("operator"),i={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),He=/[+\-*&%=<>!?|~^@]/,Ze=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Xe="([{}])",Ye={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Qe={state:null,column:null,marked:null,cc:null},Je=new k("this",new k("arguments",null));return x.lex=!0,S.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new u((e||0)-Be,0,"block",!1),localVars:r.localVars,context:r.localVars&&new b(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Fe?r:(t.lastType="operator"!=Fe||"++"!=$e&&"--"!=$e?Fe:"incdec",p(t,r,Fe,$e,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=o)return 0;var a,i=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==S)s=s.prev;else if(u!=fe)break}for(;("stat"==s.type||"form"==s.type)&&("}"==i||(a=t.cc[t.cc.length-1])&&(a==N||a==A)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;Ke&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var d=s.type,p=i==d;return"vardef"==d?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==d&&"{"==i?s.indented:"form"==d?s.indented+Be:"stat"==d?s.indented+(Oe(t,n)?Ke||Be:0):"switch"!=s.info||p||0==r.doubleIndentSwitch?s.align?s.column+(p?0:1):s.indented+(p?0:Be):s.indented+(/^(?:case|default)\b/.test(n)?Be:2*Be)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Re?null:"/*",blockCommentEnd:Re?null:"*/",blockCommentContinue:Re?null:" * ",lineComment:Re?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Re?"json":"javascript",jsonldMode:Ue,jsonMode:Re,expressionAllowed:De,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=j||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/css/css",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):e.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(e.current().toLowerCase())&&(t.tokenize=i),n("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var a,o=!1;null!=(a=t.next());){if(a==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==a}return(a==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function i(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(!1===n?0:_),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return I[r.context.type](e,t,r)}function d(e,t,r,n){for(var a=n||1;a>0;a--)r.context=r.context.prev;return u(e,t,r)}function p(e){var t=e.current().toLowerCase();g=z.hasOwnProperty(t)?"atom":T.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var f,g,_=t.indentUnit,h=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},k=r.mediaFeatures||{},v=r.mediaValueKeywords||{},w=r.propertyKeywords||{},x=r.nonStandardPropertyKeywords||{},q=r.fontProperties||{},S=r.counterDescriptors||{},T=r.colorKeywords||{},z=r.valueKeywords||{},M=r.allowNested,C=r.lineComment,j=!0===r.supportsAtComponent,I={};return I.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(j&&/@component/i.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(M&&"("==e)return s(r,t,"parens")}return r.context.type},I.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return w.hasOwnProperty(n)?(g="property","maybeprop"):x.hasOwnProperty(n)?(g="string-2","maybeprop"):M?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":M||"hash"!=e&&"qualifier"!=e?I.top(e,t,r):(g="error","block")},I.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},I.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&M)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)p(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},I.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},I.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&p(t),"parens")},I.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(g="variable-3",r.context.type):u(e,t,r)},I.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):I.atBlock(e,t,r)},I.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,M?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":k.hasOwnProperty(n)?"property":v.hasOwnProperty(n)?"keyword":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"string-2":z.hasOwnProperty(n)?"atom":T.hasOwnProperty(n)?"keyword":"error"}return r.context.type},I.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,M?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},I.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):I.atBlock(e,t,r)},I.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},I.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!q.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},I.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},I.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},I.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||a)(e,t);return r&&"object"==typeof r&&(f=r[1],r=r[0]),g=r,"comment"!=f&&(t.state=I[t.state](f,e,t)),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-_)):(r=r.prev,a=r.indent)),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:C,fold:"brace"}})
2
+ ;var n=["domain","regexp","url","url-prefix"],a=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(d),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(m),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],_=t(g),h=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(h),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=t(b),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=t(v),x=n.concat(o).concat(l).concat(c).concat(d).concat(m).concat(b).concat(v);e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:a,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:w,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:w,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:k,valueKeywords:w,fontProperties:_,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:i,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:_,counterDescriptors:y,colorKeywords:k,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define("mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),a=n.search(t);return a>-1?e.backUp(n.length-a):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t||(s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"","i")}function o(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),a=e[r],o=a.length-1;o>=0;o--)n.unshift(a[o])}function i(e,t){for(var r=0;r\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&p&&/>$/.test(n.current())){var m=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==n.current()&&i(u[m[1]],m[2]),g=e.getMode(r,f),_=a(m[1],!0),h=a(m[1],!1);o.token=function(e,r){return e.match(_,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,h,r.localMode.token(e,r.localState))},o.localMode=g,o.localState=e.startState(g,c.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,p=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),p)for(var m=p.length-1;m>=0;m--)u.script.unshift(["type",p[m].matches,p[m].mode]);return{startState:function(){return{token:s,inTag:null,localMode:null,localState:null,htmlState:e.startState(c)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("mode/clike/clike",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r,n,a,o){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=a,this.prev=o}function r(e,r,n,a){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=n&&(o=e.context.indented),e.context=new t(o,r,n,a,null,e.context)}function n(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function a(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},r=e.split(" "),n=0;n!?|\/]/,E=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/,N=s.isReservedIdentifier||!1;return{startState:function(e){return{tokenize:null,context:new t((e||0)-g,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return p(e,t),null;m=f=null;var l=(t.tokenize||c)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==m||":"==m||","==m&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)n(t);else if("{"==m)r(t,e.column(),"}");else if("["==m)r(t,e.column(),"]");else if("("==m)r(t,e.column(),")");else if("}"==m){for(;"statement"==i.type;)i=n(t);for("}"==i.type&&(i=n(t));"statement"==i.type;)i=n(t)}else m==i.type?n(t):T&&(("}"==i.type||"top"==i.type)&&";"!=m||"statement"==i.type&&"newstatement"==m)&&r(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&a(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),q.token){var u=q.token(e,t,l);void 0!==u&&(l=u)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=f?"def":l||m,p(e,t),l},indent:function(t,r){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var n=t.context,a=r&&r.charAt(0),o=a==n.type;if("statement"==n.type&&"}"==a&&(n=n.prev),s.dontIndentStatements)for(;"statement"==n.type&&s.dontIndentStatements.test(n.info);)n=n.prev;if(q.indent){var i=q.indent(t,n,r,g);if("number"==typeof i)return i}var l=n.prev&&"switch"==n.prev.info;if(s.allmanIndentation&&/[{(]/.test(a)){for(;"top"!=n.type&&"}"!=n.type;)n=n.prev;return n.indented}return"statement"==n.type?n.indented+("{"==a?0:_):!n.align||h&&")"==n.type?")"!=n.type||o?n.indented+(o?0:g)+(o||!l||/^(?:case|default)\b/.test(r)?0:g):n.indented+_:n.column+(o?0:1)},electricInput:z?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var x="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",q=i("int long char short double float unsigned signed void bool"),S=i("SEL instancetype id Class Protocol BOOL"),T="case do else for if switch while struct enum union";y(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:i(x),types:s,blockKeywords:i(T),defKeywords:i("struct enum union"),typeFirstDefinitions:!0,atoms:i("NULL true false"),isReservedIdentifier:p,hooks:{"#":u,"*":d},modeProps:{fold:["brace","include"]}}),y(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:i(x+"alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq"),types:s,blockKeywords:i(T+" class try catch"),defKeywords:i("struct enum union class namespace"),typeFirstDefinitions:!0,atoms:i("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:p,hooks:{"#":u,"*":d,u:f,U:f,L:f,R:f,0:m,1:m,2:m,3:m,4:m,5:m,6:m,7:m,8:m,9:m,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&g(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),y("text/x-java",{name:"clike",keywords:i("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:i("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:i("catch class do else finally for if switch try while"),defKeywords:i("class interface enum @interface"),typeFirstDefinitions:!0,atoms:i("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),y("text/x-csharp",{name:"clike",keywords:i("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:i("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:i("catch class do else finally for foreach if struct switch try while"),defKeywords:i("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=_,_(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),y("text/x-scala",{name:"clike",keywords:i("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),
3
+ types:i("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:i("catch class enum do else finally for forSome if match switch try while"),defKeywords:i("class enum def object package trait type val var"),atoms:i("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=b,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,r){var n=r.context;return!("}"!=n.type||!n.align||!e.eat(">"))&&(r.context=new t(n.indented,n.column,n.type,n.info,null,n.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=k(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),y("text/x-kotlin",{name:"clike",keywords:i("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:i("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object interface fun"),atoms:i("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){return t.tokenize=v(e.match('""')),t.tokenize(e,t)},indent:function(e,t,r,n){var a=r&&r.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=r?"operator"==e.prevToken&&"}"!=r||"variable"==e.prevToken&&"."==a||("}"==e.prevToken||")"==e.prevToken)&&"."==a?2*n+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(r||"").charAt(0)?0:n):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),y(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:i("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-nesc",{name:"clike",keywords:i(x+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:s,blockKeywords:i(T),atoms:i("null true false"),hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-objectivec",{name:"clike",keywords:i(x+" bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available"),types:c,builtin:i("FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINED NS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT"),blockKeywords:i(T+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:i("struct enum union @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:i("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:p,hooks:{"#":u,"*":d},modeProps:{fold:["brace","include"]}}),y("text/x-squirrel",{name:"clike",keywords:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:s,blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":u},modeProps:{fold:["brace","include"]}});var z=null;y("text/x-ceylon",{name:"clike",keywords:i("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:i("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=w(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!z||!e.match("`"))&&(t.tokenize=z,z=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define("mode/php/php.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=e.split(" "),n=0;n\w/,!1)&&(t.tokenize=r([[["->",null]],[[/[\w]+/,"variable"]]],n,a)),"variable-2";for(var o=!1;!e.eol()&&(o||!1===a||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!o&&e.match(n)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}o="\\"==e.next()&&!o}return"string"}var o="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",i="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",l="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[o,i,l].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var s={name:"clike",helperType:"php",keywords:t(o),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(i),builtin:t(l),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var a=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var o=e.current().slice(r[0].length+(a?2:1));if(a&&e.eat(a),o)return(t.tokStack||(t.tokStack=[])).push(o,0),t.tokenize=n(o,"'"!=a),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=n('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=n(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,r){function n(t,r){var n=r.curMode==o;if(t.sol()&&r.pending&&'"'!=r.pending&&"'"!=r.pending&&(r.pending=null),n)return n&&null==r.php.tokenize&&t.match("?>")?(r.curMode=a,r.curState=r.html,r.php.context.prev||(r.php=null),"meta"):o.token(t,r.curState);if(t.match(/^<\?\w*/))return r.curMode=o,r.php||(r.php=e.startState(o,a.indent(r.html,"",""))),r.curState=r.php,"meta";if('"'==r.pending||"'"==r.pending){for(;!t.eol()&&t.next()!=r.pending;);var i="string"}else if(r.pending&&t.pos/.test(s)?r.pending=l[0]:r.pending={end:t.pos,style:i},t.backUp(s.length-c)),i}var a=e.getMode(t,r&&r.htmlMode||"text/html"),o=e.getMode(t,s);return{startState:function(){var t=e.startState(a),n=r.startOpen?e.startState(o):null;return{html:t,php:n,curMode:r.startOpen?o:a,curState:r.startOpen?n:t,pending:null}},copyState:function(t){var r,n=t.html,i=e.copyState(a,n),l=t.php,s=l&&e.copyState(o,l);return r=t.curMode==a?i:s,{html:i,php:s,curMode:t.curMode,curState:r,pending:t.pending}},token:n,indent:function(e,t,r){return e.curMode!=o&&/^\s*<\//.test(t)||e.curMode==o&&/^\?>/.test(t)?a.indent(e.html,t,r):e.curMode.indent(e.curState,t,r)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",s)}),function(e){"function"==typeof e.define&&e.define("modePHP",["mode/php/php.js"],function(){})}(this);
@@ -1 +1 @@
1
- !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(n){function t(e,n,t,i){if("string"==typeof n){var r=e.indexOf(n,t);return i&&r>-1?r+n.length:r}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner)}},token:function(r,o){if(o.innerActive){var a=o.innerActive,c=r.string;if(!a.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var s=a.close?t(c,a.close,r.pos,a.parseDelimiters):-1;if(s==r.pos&&!a.parseDelimiters)return r.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(r.string=c.slice(0,s));var l=a.mode.token(r,o.inner);return s>-1&&(r.string=c),s==r.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(l=l?l+" "+a.innerStyle:a.innerStyle),l}for(var d=1/0,c=r.string,u=0;u<i.length;++u){var m=i[u],s=t(c,m.open,r.pos);if(s==r.pos)return m.parseDelimiters||r.match(m.open),o.innerActive=m,o.inner=e.startState(m.mode,n.indent?n.indent(o.outer,""):0),m.delimStyle&&m.delimStyle+" "+m.delimStyle+"-open";-1!=s&&s<d&&(d=s)}d!=1/0&&(r.string=c.slice(0,d));var f=n.token(r,o.outer);return d!=1/0&&(r.string=c),f},indent:function(t,i){var r=t.innerActive?t.innerActive.mode:n;return r.indent?r.indent(t.innerActive?t.inner:t.outer,i):e.Pass},blankLine:function(t){var r=t.innerActive?t.innerActive.mode:n;if(r.blankLine&&r.blankLine(t.innerActive?t.inner:t.outer),t.innerActive)"\n"===t.innerActive.close&&(t.innerActive=t.inner=null);else for(var o=0;o<i.length;++o){var a=i[o];"\n"===a.open&&(t.innerActive=a,t.inner=e.startState(a.mode,r.indent?r.indent(t.outer,""):0))}},electricChars:n.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:n}}}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/twig/twig.js",["../../lib/codemirror","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("twig:inner",function(){function e(e,a){var c=e.peek();if(a.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.sign){if(a.sign=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.instring)return c==a.instring&&(a.instring=!1),e.next(),"string";if("'"==c||'"'==c)return a.instring=c,e.next(),"string";if(e.match(a.intag+"}")||e.eat("-")&&e.match(a.intag+"}"))return a.intag=!1,"tag";if(e.match(t))return a.operator=!0,"operator";if(e.match(i))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(n))return"keyword";if(e.match(r))return"atom";if(e.match(o))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(c=e.eat(/\{|%/))return a.intag=c,"{"==c&&(a.intag="}"),e.eat("-"),"tag"}e.next()}var n=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],t=/^[+\-*&%=<>!?|~^]/,i=/^[:\[\(\{]/,r=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],o=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return n=new RegExp("(("+n.join(")|(")+"))\\b"),r=new RegExp("(("+r.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(n,t){return e(n,t)}}}),e.defineMode("twig",function(n,t){var i=e.getMode(n,"twig:inner");return t&&t.base?e.multiplexingMode(e.getMode(n,t.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:i,parseDelimiters:!0}):i}),e.defineMIME("text/x-twig","twig")}),function(e){"function"==typeof e.define&&e.define("modeTwig",["mode/twig/twig.js"],function(){})}(this);
1
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(n){function t(e,n,t,i){if("string"==typeof n){var r=e.indexOf(n,t);return i&&r>-1?r+n.length:r}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner)}},token:function(r,o){if(o.innerActive){var a=o.innerActive,c=r.string;if(!a.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var s=a.close?t(c,a.close,r.pos,a.parseDelimiters):-1;if(s==r.pos&&!a.parseDelimiters)return r.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";s>-1&&(r.string=c.slice(0,s));var l=a.mode.token(r,o.inner);return s>-1&&(r.string=c),s==r.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(l=l?l+" "+a.innerStyle:a.innerStyle),l}for(var d=1/0,c=r.string,u=0;u<i.length;++u){var f=i[u],s=t(c,f.open,r.pos);if(s==r.pos){f.parseDelimiters||r.match(f.open),o.innerActive=f;var m=0;if(n.indent){var p=n.indent(o.outer,"","");p!==e.Pass&&(m=p)}return o.inner=e.startState(f.mode,m),f.delimStyle&&f.delimStyle+" "+f.delimStyle+"-open"}-1!=s&&s<d&&(d=s)}d!=1/0&&(r.string=c.slice(0,d));var v=n.token(r,o.outer);return d!=1/0&&(r.string=c),v},indent:function(t,i,r){var o=t.innerActive?t.innerActive.mode:n;return o.indent?o.indent(t.innerActive?t.inner:t.outer,i,r):e.Pass},blankLine:function(t){var r=t.innerActive?t.innerActive.mode:n;if(r.blankLine&&r.blankLine(t.innerActive?t.inner:t.outer),t.innerActive)"\n"===t.innerActive.close&&(t.innerActive=t.inner=null);else for(var o=0;o<i.length;++o){var a=i[o];"\n"===a.open&&(t.innerActive=a,t.inner=e.startState(a.mode,r.indent?r.indent(t.outer,"",""):0))}},electricChars:n.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:n}}}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/twig/twig.js",["../../lib/codemirror","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("twig:inner",function(){function e(e,a){var c=e.peek();if(a.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.sign){if(a.sign=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.instring)return c==a.instring&&(a.instring=!1),e.next(),"string";if("'"==c||'"'==c)return a.instring=c,e.next(),"string";if(e.match(a.intag+"}")||e.eat("-")&&e.match(a.intag+"}"))return a.intag=!1,"tag";if(e.match(t))return a.operator=!0,"operator";if(e.match(i))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(n))return"keyword";if(e.match(r))return"atom";if(e.match(o))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(c=e.eat(/\{|%/))return a.intag=c,"{"==c&&(a.intag="}"),e.eat("-"),"tag"}e.next()}var n=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],t=/^[+\-*&%=<>!?|~^]/,i=/^[:\[\(\{]/,r=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],o=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return n=new RegExp("(("+n.join(")|(")+"))\\b"),r=new RegExp("(("+r.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(n,t){return e(n,t)}}}),e.defineMode("twig",function(n,t){var i=e.getMode(n,"twig:inner");return t&&t.base?e.multiplexingMode(e.getMode(n,t.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:i,parseDelimiters:!0}):i}),e.defineMIME("text/x-twig","twig")}),function(e){"function"==typeof e.define&&e.define("modeTwig",["mode/twig/twig.js"],function(){})}(this);
@@ -7,10 +7,10 @@
7
7
  */
8
8
 
9
9
  (function() {
10
- CKEDITOR.plugins.add('codemirror', {
11
- icons: 'searchcode,autoformat,commentselectedrange,uncommentselectedrange,autocomplete', // %REMOVE_LINE_CORE%
12
- lang: 'en,ru', // %REMOVE_LINE_CORE%
13
- version: '1.17.3',
10
+ CKEDITOR.plugins.add("codemirror", {
11
+ icons: "searchcode,autoformat,commentselectedrange,uncommentselectedrange,autocomplete", // %REMOVE_LINE_CORE%
12
+ lang: "af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en-au,en-ca,en-gb,en,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,ug,uk,vi,zh-cn,zh", // %REMOVE_LINE_CORE%
13
+ version: "1.17.11",
14
14
  init: function (editor) {
15
15
  var rootPath = this.path,
16
16
  defaultConfig = {
@@ -27,7 +27,7 @@
27
27
  indentWithTabs: false,
28
28
  lineNumbers: true,
29
29
  lineWrapping: true,
30
- mode: 'htmlmixed',
30
+ mode: "htmlmixed",
31
31
  matchBrackets: true,
32
32
  maxHighlightLineLength: 1000,
33
33
  matchTags: true,
@@ -38,7 +38,7 @@
38
38
  showTrailingSpace: true,
39
39
  showUncommentButton: true,
40
40
  styleActiveLine: true,
41
- theme: 'default',
41
+ theme: "default",
42
42
  useBeautifyOnStart: false
43
43
  };
44
44
 
@@ -58,59 +58,66 @@
58
58
  if (editor.plugins.bbcode && config.mode.indexOf("bbcode") <= 0) {
59
59
  config.mode = "bbcode";
60
60
  }
61
- var requirePresent = "function" === typeof require;
62
-
61
+ var requirePresent = "function" === typeof require && "function" === typeof require.config;
62
+ var pluginRequire;
63
63
  if (requirePresent){
64
- var location = window.CKEDITOR_GETURL('plugins/codemirror/js');
65
- require.config({
64
+ var requireContext = config.requireContext || "_";
65
+ var location = CKEDITOR.getUrl("plugins/codemirror/js");
66
+ pluginRequire = require.config({
67
+ context: requireContext,
66
68
  packages: [{
67
- name: 'codemirror',
69
+ name: "codemirror",
70
+ location: location,
71
+ main: "codemirror.min.js"
72
+ }, {
73
+ name: "codemirror-mode-handlebars",
68
74
  location: location,
69
- main: 'codemirror.min.js'
75
+ main: "codemirror.mode.handlebars.min.js"
70
76
  }, {
71
- name: 'codemirror-mode-twig',
77
+ name: "codemirror-mode-twig",
72
78
  location: location,
73
- main: 'codemirror.mode.twig.min.js'
79
+ main: "codemirror.mode.twig.min.js"
74
80
  }, {
75
- name: 'codemirror-mode-html',
81
+ name: "codemirror-mode-html",
76
82
  location: location,
77
- main: 'codemirror.mode.htmlmixed.min.js'
83
+ main: "codemirror.mode.htmlmixed.min.js"
78
84
  }, {
79
- name: 'codemirror-mode-php',
85
+ name: "codemirror-mode-php",
80
86
  location: location,
81
- main: 'codemirror.mode.php.min.js'
87
+ main: "codemirror.mode.php.min.js"
82
88
  }, {
83
- name: 'codemirror-mode-js',
89
+ name: "codemirror-mode-js",
84
90
  location: location,
85
- main: 'codemirror.mode.js.min.js'
91
+ main: "codemirror.mode.js.min.js"
86
92
  }, {
87
- name: 'codemirror-addons',
93
+ name: "codemirror-addons",
88
94
  location: location,
89
- main: 'codemirror.addons.min.js'
95
+ main: "codemirror.addons.min.js"
90
96
  }, {
91
- name: 'codemirror-addon-search',
97
+ name: "codemirror-addon-search",
92
98
  location: location,
93
- main: 'codemirror.addons.search.min.js'
99
+ main: "codemirror.addons.search.min.js"
94
100
  }, {
95
- name: 'codemirror-beautify',
101
+ name: "codemirror-beautify",
96
102
  location: location,
97
- main: 'beautify.min.js'
103
+ main: "beautify.min.js"
98
104
  }],
99
105
  bundles: {
100
- 'codemirror': ['core', 'codemirror.js'],
101
- 'codemirror-mode-twig': ['modeTwig'],
102
- 'codemirror-mode-html': ['modeHtml'],
103
- 'codemirror-mode-php': ['modePHP'],
104
- 'codemirror-mode-js': ['modeJS'],
105
- 'codemirror-addons': ['addons'],
106
- 'codemirror-addon-search': ['addonSearch'],
107
- 'codemirror-beautify': ['beautifyModule']
106
+ 'codemirror': ["core", "codemirror.js"],
107
+ 'codemirror-mode-handlebars': ["modeHandlebars"],
108
+ 'codemirror-mode-twig': ["modeTwig"],
109
+ 'codemirror-mode-html': ["modeHtml"],
110
+ 'codemirror-mode-php': ["modePHP"],
111
+ 'codemirror-mode-js': ["modeJS"],
112
+ 'codemirror-addons': ["addons"],
113
+ 'codemirror-addon-search': ["addonSearch"],
114
+ 'codemirror-beautify': ["beautifyModule"]
108
115
  },
109
116
  map: {
110
117
  '*': {
111
118
  //all the requires pointing to ../../lib/codemirror from addons will be redirected to module named codemirror.js
112
119
  //which is located in bundle 'codemirror' whose js file is codemirror.min.js
113
- 'lib/codemirror': 'codemirror.js'
120
+ 'lib/codemirror': "codemirror.js"
114
121
  }
115
122
  }
116
123
  });
@@ -119,7 +126,7 @@
119
126
  if (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE || editor.plugins.sourcedialog) {
120
127
 
121
128
  // Override Source Dialog
122
- CKEDITOR.dialog.add('sourcedialog', function (editor) {
129
+ CKEDITOR.dialog.add("sourcedialog", function (editor) {
123
130
  var sizeDialog = CKEDITOR.document.getWindow().getViewPaneSize(),
124
131
  minWidth = Math.min(sizeDialog.width - 70, 800),
125
132
  minHeight = sizeDialog.height / 1.5,
@@ -131,7 +138,7 @@
131
138
  height = size.height / 1.5;
132
139
 
133
140
  window["codemirror_" + editor.id] = CodeMirror.fromTextArea(textarea, {
134
- mode: config.mode,
141
+ mode: config.mode === "handlebars" ? { name: "handlebars", base: "text/html" } : config.mode,
135
142
  matchBrackets: config.matchBrackets,
136
143
  maxHighlightLineLength: config.maxHighlightLineLength,
137
144
  matchTags: config.matchTags,
@@ -150,8 +157,9 @@
150
157
  showCursorWhenSelecting: true,
151
158
  styleActiveLine: config.styleActiveLine,
152
159
  viewportMargin: Infinity,
153
- //extraKeys: {"Ctrl-Space": "autocomplete"},
154
160
  extraKeys: {
161
+ "Ctrl-Space":
162
+ "autocomplete",
155
163
  "Ctrl-Q": function (codeMirror_Editor) {
156
164
  if (config.enableCodeFolding) {
157
165
  window["foldFunc_" + editor.id](codeMirror_Editor, codeMirror_Editor.getCursor().line);
@@ -163,8 +171,8 @@
163
171
  });
164
172
 
165
173
 
166
- var holderHeight = height + 'px';
167
- var holderWidth = width + 'px';
174
+ var holderHeight = height + "px";
175
+ var holderWidth = width + "px";
168
176
 
169
177
  // Store config so we can access it within commands etc.
170
178
  window["codemirror_" + editor.id].config = config;
@@ -172,8 +180,8 @@
172
180
  if (config.autoFormatOnStart) {
173
181
  if (config.useBeautifyOnStart) {
174
182
  var indent_size = 4,
175
- indent_char = ' ',
176
- brace_style = 'collapse'; //collapse, expand, end-expand
183
+ indent_char = " ",
184
+ brace_style = "collapse"; //collapse, expand, end-expand
177
185
 
178
186
  var source = window["codemirror_" + editor.id].getValue();
179
187
 
@@ -198,7 +206,7 @@
198
206
 
199
207
  window["codemirror_" + editor.id].on("change", function () {
200
208
  window["codemirror_" + editor.id].save();
201
- editor.fire('change', this);
209
+ editor.fire("change", this);
202
210
  });
203
211
 
204
212
 
@@ -209,13 +217,13 @@
209
217
  window["codemirror_" + editor.id].on("gutterClick", window["foldFunc_" + editor.id]);
210
218
  }
211
219
  // Run config.onLoad callback, if present.
212
- if (typeof config.onLoad === 'function') {
220
+ if (typeof config.onLoad === "function") {
213
221
  config.onLoad(window["codemirror_" + editor.id], editor);
214
222
  }
215
223
 
216
224
  // inherit blur event
217
225
  window["codemirror_" + editor.id].on("blur", function () {
218
- editor.fire('blur', this);
226
+ editor.fire("blur", this);
219
227
  });
220
228
 
221
229
  window["codemirror_" + editor.id].on("keypress", function (codeMirror_Editor, evt) {
@@ -242,7 +250,7 @@
242
250
 
243
251
  start = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.startOffset);
244
252
 
245
- if (typeof (textRange.endOffset) == 'undefined') {
253
+ if (typeof (textRange.endOffset) == "undefined") {
246
254
  window["codemirror_" + editor.id].focus();
247
255
  window["codemirror_" + editor.id].setCursor(start);
248
256
  } else {
@@ -260,14 +268,14 @@
260
268
  minHeight: minHeight,
261
269
  resizable: CKEDITOR.DIALOG_RESIZE_BOTH,
262
270
  onLoad: function() {
263
- this.on('resize',
271
+ this.on("resize",
264
272
  function (event) {
265
273
  var parts = event.sender.parts;
266
274
  var title = parts.title;
267
275
  var footer = parts.footer;
268
276
 
269
- var holderHeight = (event.data.height - title.$.offsetHeight - footer.$.offsetHeight) + 'px';
270
- var holderWidth = event.data.width + 'px';
277
+ var holderHeight = (event.data.height - title.$.offsetHeight - footer.$.offsetHeight) + "px";
278
+ var holderWidth = event.data.width + "px";
271
279
 
272
280
  window["codemirror_" + editor.id].setSize(holderWidth, holderHeight);
273
281
  },
@@ -275,33 +283,33 @@
275
283
  },
276
284
  onShow: function (event) {
277
285
  // Set Elements
278
- this.getContentElement('main', 'data').focus();
279
- this.getContentElement('main', 'AutoComplete').setValue(config.autoCloseTags, true);
286
+ this.getContentElement("main", "data").focus();
287
+ this.getContentElement("main", "AutoComplete").setValue(config.autoCloseTags, true);
280
288
 
281
- var textArea = this.getContentElement('main', 'data').getInputElement().$;
289
+ var textArea = this.getContentElement("main", "data").getInputElement().$;
282
290
 
283
291
  // Load the content
284
- this.setValueOf('main', 'data', oldData = editor.getData());
292
+ this.setValueOf("main", "data", oldData = editor.getData());
285
293
 
286
294
  if (config.autoLoadCodeMirror) {
287
295
 
288
- if (!IsStyleSheetAlreadyLoaded(rootPath + 'css/codemirror.min.css')) {
289
- CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css');
296
+ if (!IsStyleSheetAlreadyLoaded(rootPath + "css/codemirror.min.css")) {
297
+ CKEDITOR.document.appendStyleSheet(rootPath + "css/codemirror.min.css");
290
298
  }
291
299
 
292
300
  if (config.theme.length &&
293
- config.theme != 'default' &&
294
- !IsStyleSheetAlreadyLoaded(rootPath + 'theme/' + config.theme + '.css')) {
295
- CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css');
301
+ config.theme != "default" &&
302
+ !IsStyleSheetAlreadyLoaded(rootPath + "theme/" + config.theme + ".css")) {
303
+ CKEDITOR.document.appendStyleSheet(rootPath + "theme/" + config.theme + ".css");
296
304
  }
297
305
  if(requirePresent) {
298
- require(getCodeMirrorDependencies(),function (codemirror, addons){
306
+ pluginRequire(getCodeMirrorDependencies(),function (codemirror, addons){
299
307
  loadCodeMirrorInline(editor, textArea, event.sender);
300
308
  });
301
309
  } else {
302
- if (typeof (CodeMirror) == 'undefined') {
310
+ if (typeof (CodeMirror) == "undefined") {
303
311
 
304
- CKEDITOR.scriptLoader.load(rootPath + 'js/codemirror.min.js',
312
+ CKEDITOR.scriptLoader.load(rootPath + "js/codemirror.min.js",
305
313
  function() {
306
314
 
307
315
  CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
@@ -312,7 +320,7 @@
312
320
 
313
321
 
314
322
  } else {
315
- if (CodeMirror.prototype['autoFormatAll']) {
323
+ if (CodeMirror.prototype["autoFormatAll"]) {
316
324
  loadCodeMirrorInline(editor, textArea, event.sender);
317
325
  } else {
318
326
  // loading the add-on scripts.
@@ -332,8 +340,8 @@
332
340
  // Free Memory
333
341
  window["codemirror_" + editor.id] = null;
334
342
 
335
- editor.fire('blur', this);
336
- editor.fire('focus', this);
343
+ editor.fire("blur", this);
344
+ editor.fire("focus", this);
337
345
  }
338
346
  },
339
347
  onOk: (function () {
@@ -358,21 +366,21 @@
358
366
  window["codemirror_" + editor.id] = null;
359
367
 
360
368
  // Remove CR from input data for reliable comparison with editor data.
361
- var newData = this.getValueOf('main', 'data').replace(/\r/g, '');
369
+ var newData = this.getValueOf("main", "data").replace(/\r/g, "");
362
370
 
363
371
  // Avoid unnecessary setData. Also preserve selection
364
372
  // when user changed his mind and goes back to wysiwyg editing.
365
373
  if (newData === oldData) {
366
- editor.fire('blur', this);
367
- editor.fire('focus', this);
374
+ editor.fire("blur", this);
375
+ editor.fire("focus", this);
368
376
  return true;
369
377
  }
370
378
 
371
379
  // Set data asynchronously to avoid errors in IE.
372
380
  CKEDITOR.env.ie ? CKEDITOR.tools.setTimeout(setData, 0, this, newData) : setData.call(this, newData);
373
381
 
374
- editor.fire('blur', this);
375
- editor.fire('focus', this);
382
+ editor.fire("blur", this);
383
+ editor.fire("focus", this);
376
384
 
377
385
  // Don't let the dialog close before setData is over.
378
386
  return false;
@@ -380,29 +388,29 @@
380
388
  })(),
381
389
 
382
390
  contents: [{
383
- id: 'main',
391
+ id: "main",
384
392
  label: editor.lang.sourcedialog.title,
385
393
  elements: [
386
394
  {
387
- type: 'hbox',
388
- style: 'width: 80px;margin:0;',
389
- widths: ['20px', '20px', '20px', '20px'],
395
+ type: "hbox",
396
+ style: "width: 80px;margin:0;",
397
+ widths: ["20px", "20px", "20px", "20px"],
390
398
  children: [
391
399
  {
392
- type: 'button',
393
- id: 'searchCode',
394
- label: '',
400
+ type: "button",
401
+ id: "searchCode",
402
+ label: "",
395
403
  title: lang.searchCode,
396
- 'class': 'searchCodeButton',
404
+ 'class': "searchCodeButton",
397
405
  onClick: function() {
398
406
  CodeMirror.commands.find(window["codemirror_" + editor.id]);
399
407
  }
400
408
  }, {
401
- type: 'button',
402
- id: 'autoFormat',
403
- label: '',
409
+ type: "button",
410
+ id: "autoFormat",
411
+ label: "",
404
412
  title: lang.autoFormat,
405
- 'class': 'autoFormat',
413
+ 'class': "autoFormat",
406
414
  onClick: function() {
407
415
  var range = {
408
416
  from: window["codemirror_" + editor.id].getCursor(true),
@@ -411,11 +419,11 @@
411
419
  window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
412
420
  }
413
421
  }, {
414
- type: 'button',
415
- id: 'CommentSelectedRange',
416
- label: '',
422
+ type: "button",
423
+ id: "CommentSelectedRange",
424
+ label: "",
417
425
  title: lang.commentSelectedRange,
418
- 'class': 'CommentSelectedRange',
426
+ 'class': "CommentSelectedRange",
419
427
  onClick: function () {
420
428
  var range = {
421
429
  from: window["codemirror_" + editor.id].getCursor(true),
@@ -424,11 +432,11 @@
424
432
  window["codemirror_" + editor.id].commentRange(true, range.from, range.to);
425
433
  }
426
434
  }, {
427
- type: 'button',
428
- id: 'UncommentSelectedRange',
429
- label: '',
435
+ type: "button",
436
+ id: "UncommentSelectedRange",
437
+ label: "",
430
438
  title: lang.uncommentSelectedRange,
431
- 'class': 'UncommentSelectedRange',
439
+ 'class': "UncommentSelectedRange",
432
440
  onClick: function () {
433
441
  var range = {
434
442
  from: window["codemirror_" + editor.id].getCursor(true),
@@ -441,23 +449,23 @@
441
449
  }
442
450
  }]
443
451
  }, {
444
- type: 'checkbox',
445
- id: 'AutoComplete',
452
+ type: "checkbox",
453
+ id: "AutoComplete",
446
454
  label: lang.autoCompleteToggle,
447
455
  title: lang.autoCompleteToggle,
448
456
  onChange: function () {
449
457
  window["codemirror_" + editor.id].setOption("autoCloseTags", this.getValue());
450
458
  }
451
459
  }, {
452
- type: 'textarea',
453
- id: 'data',
454
- dir: 'ltr',
455
- inputStyle: 'cursor:auto;' +
456
- 'width:' + minWidth + 'px;' +
457
- 'height:' + minHeight + 'px;' +
458
- 'tab-size:4;' +
459
- 'text-align:left;',
460
- 'class': 'cke_source cke_enable_context_menu'
460
+ type: "textarea",
461
+ id: "data",
462
+ dir: "ltr",
463
+ inputStyle: "cursor:auto;" +
464
+ "width:" + minWidth + "px;" +
465
+ "height:" + minHeight + "px;" +
466
+ "tab-size:4;" +
467
+ "text-align:left;",
468
+ 'class': "cke_source cke_enable_context_menu"
461
469
  }
462
470
  ]
463
471
  }]
@@ -506,8 +514,8 @@
506
514
  };
507
515
 
508
516
  editor.commands.find.exec = function() {
509
- if (editor.mode === 'wysiwyg') {
510
- editor.openDialog('find');
517
+ if (editor.mode === "wysiwyg") {
518
+ editor.openDialog("find");
511
519
  } else {
512
520
  CodeMirror.commands.find(window["codemirror_" + editor.id]);
513
521
  }
@@ -522,8 +530,10 @@
522
530
  };
523
531
 
524
532
  editor.commands.replace.exec = function () {
525
- if (editor.mode === 'wysiwyg') {
526
- editor.openDialog('replace');
533
+ if (editor.mode === "wysiwyg") {
534
+ editor.openDialog("find", function () {
535
+ this.selectPage("replace");
536
+ });
527
537
  } else {
528
538
  CodeMirror.commands.replace(window["codemirror_" + editor.id]);
529
539
  }
@@ -544,11 +554,11 @@
544
554
  editorFocus: false,
545
555
  readOnly: 1,
546
556
  exec: function(editorInstance) {
547
- if (editorInstance.mode === 'wysiwyg') {
548
- editorInstance.fire('saveSnapshot');
557
+ if (editorInstance.mode === "wysiwyg") {
558
+ editorInstance.fire("saveSnapshot");
549
559
  }
550
- editorInstance.getCommand('source').setState(CKEDITOR.TRISTATE_DISABLED);
551
- editorInstance.setMode(editorInstance.mode === 'source' ? 'wysiwyg' : 'source');
560
+ editorInstance.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);
561
+ editorInstance.setMode(editorInstance.mode === "source" ? "wysiwyg" : "source");
552
562
  },
553
563
  canUndo: false
554
564
  },
@@ -638,30 +648,30 @@
638
648
  };
639
649
  }
640
650
 
641
- editor.addMode('source', function (callback) {
651
+ editor.addMode("source", function (callback) {
642
652
  if (!config.autoLoadCodeMirror) {
643
653
  return;
644
654
  }
645
655
 
646
- if (!IsStyleSheetAlreadyLoaded(rootPath + 'css/codemirror.min.css')) {
647
- CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css');
656
+ if (!IsStyleSheetAlreadyLoaded(rootPath + "css/codemirror.min.css")) {
657
+ CKEDITOR.document.appendStyleSheet(rootPath + "css/codemirror.min.css");
648
658
  }
649
659
 
650
660
  if (config.theme.length &&
651
- config.theme != 'default' &&
652
- !IsStyleSheetAlreadyLoaded(rootPath + 'theme/' + config.theme + '.css')) {
653
- CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css');
661
+ config.theme != "default" &&
662
+ !IsStyleSheetAlreadyLoaded(rootPath + "theme/" + config.theme + ".css")) {
663
+ CKEDITOR.document.appendStyleSheet(rootPath + "theme/" + config.theme + ".css");
654
664
  }
655
665
 
656
666
  if (requirePresent) {
657
- require(getCodeMirrorDependencies(), function () {
667
+ pluginRequire(getCodeMirrorDependencies(), function () {
658
668
  loadCodeMirror(editor);
659
669
  callback();
660
670
  });
661
671
  } else {
662
- if (typeof (CodeMirror) == 'undefined') {
672
+ if (typeof (CodeMirror) == "undefined") {
663
673
 
664
- CKEDITOR.scriptLoader.load(rootPath + 'js/codemirror.min.js',
674
+ CKEDITOR.scriptLoader.load(rootPath + "js/codemirror.min.js",
665
675
  function() {
666
676
 
667
677
  CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
@@ -671,7 +681,7 @@
671
681
  });
672
682
  });
673
683
  } else {
674
- if (CodeMirror.prototype['autoFormatAll']) {
684
+ if (CodeMirror.prototype["autoFormatAll"]) {
675
685
  loadCodeMirror(editor);
676
686
  callback();
677
687
  } else {
@@ -687,127 +697,134 @@
687
697
 
688
698
  });
689
699
  function getCodeMirrorDependencies() {
690
- var dependencies = ['core', 'addons'];
700
+ var dependencies = ["core", "addons"];
691
701
  switch (config.mode) {
692
702
  case "bbcode":
693
703
  case "bbcodemixed":
694
- dependencies.push('modeHtml');
704
+ dependencies.push("modeHtml");
695
705
  break;
696
706
  case "application/x-httpd-php":
697
- dependencies.push('modePHP');
707
+ dependencies.push("modePHP");
698
708
  break;
699
709
  case "text/javascript":
700
- dependencies.push('modeJs');
710
+ dependencies.push("modeJs");
711
+ break;
712
+ case "handlebars":
713
+ dependencies.push("modeHandlebars");
701
714
  break;
702
715
  case "twig":
703
- dependencies.push('modeTwig');
716
+ dependencies.push("modeTwig");
704
717
  break;
705
718
  case "htmlmixed":
706
719
  case "text/html":
707
720
  default:
708
- dependencies.push('modeHtml');
721
+ dependencies.push("modeHtml");
709
722
  }
710
723
 
711
724
  if (config.useBeautifyOnStart) {
712
- dependencies.push('beautifyModule');
725
+ dependencies.push("beautifyModule");
713
726
  }
714
727
 
715
728
  if (config.enableSearchTools) {
716
- dependencies.push('addonSearch');
729
+ dependencies.push("addonSearch");
717
730
  }
718
731
  return dependencies;
719
732
  }
720
733
 
721
734
  function getCodeMirrorScripts() {
722
- var scriptFiles = [rootPath + 'js/codemirror.addons.min.js'];
735
+ var scriptFiles = [rootPath + "js/codemirror.addons.min.js"];
723
736
 
724
737
  switch (config.mode) {
738
+ case 'handlebars':
739
+ {
740
+ scriptFiles.push(rootPath + "js/codemirror.mode.handlebars.min.js");
741
+ }
725
742
  case "bbcode":
726
743
  {
727
- scriptFiles.push(rootPath + 'js/codemirror.mode.bbcode.min.js');
744
+ scriptFiles.push(rootPath + "js/codemirror.mode.bbcode.min.js");
728
745
  }
729
746
 
730
747
  break;
731
748
  case "bbcodemixed":
732
749
  {
733
- scriptFiles.push(rootPath + 'js/codemirror.mode.bbcodemixed.min.js');
750
+ scriptFiles.push(rootPath + "js/codemirror.mode.bbcodemixed.min.js");
734
751
  }
735
752
 
736
753
  break;
737
754
  case "htmlmixed":
738
755
  {
739
- scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
756
+ scriptFiles.push(rootPath + "js/codemirror.mode.htmlmixed.min.js");
740
757
  }
741
758
 
742
759
  break;
743
760
  case "text/html":
744
761
  {
745
- scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
762
+ scriptFiles.push(rootPath + "js/codemirror.mode.htmlmixed.min.js");
746
763
  }
747
764
 
748
765
  break;
749
766
  case "application/x-httpd-php":
750
767
  {
751
- scriptFiles.push(rootPath + 'js/codemirror.mode.php.min.js');
768
+ scriptFiles.push(rootPath + "js/codemirror.mode.php.min.js");
752
769
  }
753
770
 
754
771
  break;
755
772
  case "text/javascript":
756
773
  {
757
- scriptFiles.push(rootPath + 'js/codemirror.mode.javascript.min.js');
774
+ scriptFiles.push(rootPath + "js/codemirror.mode.javascript.min.js");
758
775
  }
759
776
 
760
777
  break;
761
778
  case "twig":
762
779
  {
763
- scriptFiles.push(rootPath + 'js/codemirror.mode.twig.min.js');
780
+ scriptFiles.push(rootPath + "js/codemirror.mode.twig.min.js");
764
781
  }
765
782
 
766
783
  break;
767
784
  default:
768
- scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
785
+ scriptFiles.push(rootPath + "js/codemirror.mode.htmlmixed.min.js");
769
786
  }
770
787
 
771
788
  if (config.useBeautifyOnStart) {
772
- scriptFiles.push(rootPath + 'js/beautify.min.js');
789
+ scriptFiles.push(rootPath + "js/beautify.min.js");
773
790
  }
774
791
 
775
792
  if (config.enableSearchTools) {
776
- scriptFiles.push(rootPath + 'js/codemirror.addons.search.min.js');
793
+ scriptFiles.push(rootPath + "js/codemirror.addons.search.min.js");
777
794
  }
778
795
  return scriptFiles;
779
796
  }
780
797
 
781
798
  function loadCodeMirror(editor) {
782
- var contentsSpace = editor.ui.space('contents'),
783
- textarea = contentsSpace.getDocument().createElement('textarea');
799
+ var contentsSpace = editor.ui.space("contents"),
800
+ textarea = contentsSpace.getDocument().createElement("textarea");
784
801
 
785
802
  textarea.setStyles(
786
803
  CKEDITOR.tools.extend({
787
804
  // IE7 has overflow the <textarea> from wrapping table cell.
788
- width: CKEDITOR.env.ie7Compat ? '99%' : '100%',
789
- height: '100%',
790
- resize: 'none',
791
- outline: 'none',
792
- 'text-align': 'left'
805
+ width: CKEDITOR.env.ie7Compat ? "99%" : "100%",
806
+ height: "100%",
807
+ resize: "none",
808
+ outline: "none",
809
+ 'text-align': "left"
793
810
  },
794
- CKEDITOR.tools.cssVendorPrefix('tab-size', editor.config.sourceAreaTabSize || 4)));
795
- var ariaLabel = [editor.lang.editor, editor.name].join(',');
811
+ CKEDITOR.tools.cssVendorPrefix("tab-size", editor.config.sourceAreaTabSize || 4)));
812
+ var ariaLabel = [editor.lang.editor, editor.name].join(",");
796
813
  textarea.setAttributes({
797
- dir: 'ltr',
814
+ dir: "ltr",
798
815
  tabIndex: CKEDITOR.env.webkit ? -1 : editor.tabIndex,
799
- 'role': 'textbox',
816
+ 'role': "textbox",
800
817
  'aria-label': ariaLabel
801
818
  });
802
- textarea.addClass('cke_source');
803
- textarea.addClass('cke_reset');
804
- textarea.addClass('cke_enable_context_menu');
805
- editor.ui.space('contents').append(textarea);
819
+ textarea.addClass("cke_source");
820
+ textarea.addClass("cke_reset");
821
+ textarea.addClass("cke_enable_context_menu");
822
+ editor.ui.space("contents").append(textarea);
806
823
  window["editable_" + editor.id] = editor.editable(new sourceEditable(editor, textarea));
807
824
  // Fill the textarea with the current editor data.
808
825
  window["editable_" + editor.id].setData(editor.getData(1));
809
826
  window["editable_" + editor.id].editorID = editor.id;
810
- editor.fire('ariaWidget', this);
827
+ editor.fire("ariaWidget", this);
811
828
 
812
829
  var sourceAreaElement = window["editable_" + editor.id],
813
830
  holderElement = sourceAreaElement.getParent();
@@ -857,6 +874,7 @@
857
874
  }
858
875
 
859
876
  var extraKeys = {
877
+ "Ctrl-Space": "autocomplete",
860
878
  "Ctrl-Q": function(codeMirror_Editor) {
861
879
  if (config.enableCodeFolding) {
862
880
  window["foldFunc_" + editor.id](codeMirror_Editor, codeMirror_Editor.getCursor().line);
@@ -867,7 +885,7 @@
867
885
  addCKEditorKeystrokes(extraKeys);
868
886
 
869
887
  window["codemirror_" + editor.id] = CodeMirror.fromTextArea(sourceAreaElement.$, {
870
- mode: config.mode,
888
+ mode: config.mode === "handlebars" ? { name: "handlebars", base: "text/html" } : config.mode,
871
889
  matchBrackets: config.matchBrackets,
872
890
  maxHighlightLineLength: config.maxHighlightLineLength,
873
891
  matchTags: config.matchTags,
@@ -891,16 +909,16 @@
891
909
  gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
892
910
  });
893
911
 
894
- var holderHeight = holderElement.$.clientHeight == 0 ? editor.ui.space('contents').getStyle('height') : holderElement.$.clientHeight + 'px';
895
- var holderWidth = holderElement.$.clientWidth + 'px';
912
+ var holderHeight = holderElement.$.clientHeight == 0 ? editor.ui.space("contents").getStyle("height") : holderElement.$.clientHeight + "px";
913
+ var holderWidth = holderElement.$.clientWidth + "px";
896
914
 
897
915
  // Store config so we can access it within commands etc.
898
916
  window["codemirror_" + editor.id].config = config;
899
917
  if (config.autoFormatOnStart) {
900
918
  if (config.useBeautifyOnStart) {
901
919
  var indent_size = 4;
902
- var indent_char = ' ';
903
- var brace_style = 'collapse'; //collapse, expand, end-expand
920
+ var indent_char = " ";
921
+ var brace_style = "collapse"; //collapse, expand, end-expand
904
922
 
905
923
  var source = window["codemirror_" + editor.id].getValue();
906
924
 
@@ -925,7 +943,7 @@
925
943
 
926
944
  window["codemirror_" + editor.id].on("change", function () {
927
945
  window["codemirror_" + editor.id].save();
928
- editor.fire('change', this);
946
+ editor.fire("change", this);
929
947
  });
930
948
 
931
949
  window["codemirror_" + editor.id].setSize(null, holderHeight);
@@ -936,13 +954,13 @@
936
954
  }
937
955
 
938
956
  // Run config.onLoad callback, if present.
939
- if (typeof config.onLoad === 'function') {
957
+ if (typeof config.onLoad === "function") {
940
958
  config.onLoad(window["codemirror_" + editor.id], editor);
941
959
  }
942
960
 
943
961
  // inherit blur event
944
962
  window["codemirror_" + editor.id].on("blur", function () {
945
- editor.fire('blur', this);
963
+ editor.fire("blur", this);
946
964
  });
947
965
 
948
966
  window["codemirror_" + editor.id].on("keypress", function (codeMirror_Editor, evt) {
@@ -964,65 +982,65 @@
964
982
  });
965
983
  }
966
984
 
967
- editor.addCommand('source', sourcearea.commands.source);
985
+ editor.addCommand("source", sourcearea.commands.source);
968
986
  if (editor.ui.addButton) {
969
- editor.ui.addButton('Source', {
987
+ editor.ui.addButton("Source", {
970
988
  label: editor.lang.codemirror.toolbar,
971
- command: 'source',
972
- toolbar: 'mode,10'
989
+ command: "source",
990
+ toolbar: "mode,10"
973
991
  });
974
992
  }
975
993
  if (config.enableCodeFormatting) {
976
- editor.addCommand('searchCode', sourcearea.commands.searchCode);
977
- editor.addCommand('autoFormat', sourcearea.commands.autoFormat);
978
- editor.addCommand('commentSelectedRange', sourcearea.commands.commentSelectedRange);
979
- editor.addCommand('uncommentSelectedRange', sourcearea.commands.uncommentSelectedRange);
980
- editor.addCommand('autoCompleteToggle', sourcearea.commands.autoCompleteToggle);
994
+ editor.addCommand("searchCode", sourcearea.commands.searchCode);
995
+ editor.addCommand("autoFormat", sourcearea.commands.autoFormat);
996
+ editor.addCommand("commentSelectedRange", sourcearea.commands.commentSelectedRange);
997
+ editor.addCommand("uncommentSelectedRange", sourcearea.commands.uncommentSelectedRange);
998
+ editor.addCommand("autoCompleteToggle", sourcearea.commands.autoCompleteToggle);
981
999
 
982
1000
  if (editor.ui.addButton) {
983
1001
  if (config.showFormatButton || config.showCommentButton || config.showUncommentButton || config.showSearchButton) {
984
- editor.ui.add('-', CKEDITOR.UI_SEPARATOR, { toolbar: 'mode,30' });
1002
+ editor.ui.add("-", CKEDITOR.UI_SEPARATOR, { toolbar: "mode,30" });
985
1003
  }
986
1004
  if (config.showSearchButton && config.enableSearchTools) {
987
- editor.ui.addButton('searchCode', {
1005
+ editor.ui.addButton("searchCode", {
988
1006
  label: lang.searchCode,
989
- command: 'searchCode',
990
- toolbar: 'mode,40'
1007
+ command: "searchCode",
1008
+ toolbar: "mode,40"
991
1009
  });
992
1010
  }
993
1011
  if (config.showFormatButton) {
994
- editor.ui.addButton('autoFormat', {
1012
+ editor.ui.addButton("autoFormat", {
995
1013
  label: lang.autoFormat,
996
- command: 'autoFormat',
997
- toolbar: 'mode,50'
1014
+ command: "autoFormat",
1015
+ toolbar: "mode,50"
998
1016
  });
999
1017
  }
1000
1018
  if (config.showCommentButton) {
1001
- editor.ui.addButton('CommentSelectedRange', {
1019
+ editor.ui.addButton("CommentSelectedRange", {
1002
1020
  label: lang.commentSelectedRange,
1003
- command: 'commentSelectedRange',
1004
- toolbar: 'mode,60'
1021
+ command: "commentSelectedRange",
1022
+ toolbar: "mode,60"
1005
1023
  });
1006
1024
  }
1007
1025
  if (config.showUncommentButton) {
1008
- editor.ui.addButton('UncommentSelectedRange', {
1026
+ editor.ui.addButton("UncommentSelectedRange", {
1009
1027
  label: lang.uncommentSelectedRange,
1010
- command: 'uncommentSelectedRange',
1011
- toolbar: 'mode,70'
1028
+ command: "uncommentSelectedRange",
1029
+ toolbar: "mode,70"
1012
1030
  });
1013
1031
  }
1014
1032
  if (config.showAutoCompleteButton) {
1015
- editor.ui.addButton('AutoComplete', {
1033
+ editor.ui.addButton("AutoComplete", {
1016
1034
  label: lang.autoCompleteToggle,
1017
- command: 'autoCompleteToggle',
1018
- toolbar: 'mode,80'
1035
+ command: "autoCompleteToggle",
1036
+ toolbar: "mode,80"
1019
1037
  });
1020
1038
  }
1021
1039
  }
1022
1040
  }
1023
1041
 
1024
- editor.on('beforeModeUnload', function (evt) {
1025
- if (editor.mode === 'source' && editor.plugins.textselection && !editor.config.fullPage) {
1042
+ editor.on("beforeModeUnload", function (evt) {
1043
+ if (editor.mode === "source" && editor.plugins.textselection && !editor.config.fullPage) {
1026
1044
 
1027
1045
  var range = editor.getTextSelection();
1028
1046
 
@@ -1041,11 +1059,11 @@
1041
1059
  evt.data = range.content;
1042
1060
  }
1043
1061
  });
1044
- editor.on('mode', function () {
1045
- editor.getCommand('source').setState(editor.mode === 'source' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
1062
+ editor.on("mode", function () {
1063
+ editor.getCommand("source").setState(editor.mode === "source" ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
1046
1064
 
1047
- if (editor.mode === 'source') {
1048
- editor.getCommand('autoCompleteToggle').setState(window["codemirror_" + editor.id].config.autoCloseTags ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
1065
+ if (editor.mode === "source") {
1066
+ editor.getCommand("autoCompleteToggle").setState(window["codemirror_" + editor.id].config.autoCloseTags ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
1049
1067
 
1050
1068
  if (editor.plugins.textselection && textRange && !editor.config.fullPage) {
1051
1069
 
@@ -1056,7 +1074,7 @@
1056
1074
 
1057
1075
  start = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.startOffset);
1058
1076
 
1059
- if (typeof (textRange.endOffset) == 'undefined') {
1077
+ if (typeof (textRange.endOffset) == "undefined") {
1060
1078
  window["codemirror_" + editor.id].focus();
1061
1079
  window["codemirror_" + editor.id].setCursor(start);
1062
1080
  } else {
@@ -1068,22 +1086,22 @@
1068
1086
  }
1069
1087
 
1070
1088
  });
1071
- editor.on('resize', function() {
1072
- if (window["editable_" + editor.id] && editor.mode === 'source') {
1089
+ editor.on("resize", function() {
1090
+ if (window["editable_" + editor.id] && editor.mode === "source") {
1073
1091
  var holderElement = window["editable_" + editor.id].getParent();
1074
- var holderHeight = holderElement.$.clientHeight + 'px';
1075
- var holderWidth = holderElement.$.clientWidth + 'px';
1092
+ var holderHeight = holderElement.$.clientHeight + "px";
1093
+ var holderWidth = holderElement.$.clientWidth + "px";
1076
1094
  window["codemirror_" + editor.id].setSize(holderWidth, holderHeight);
1077
1095
  }
1078
1096
  });
1079
1097
 
1080
- editor.on('readOnly', function () {
1081
- if (window["editable_" + editor.id] && editor.mode === 'source') {
1098
+ editor.on("readOnly", function () {
1099
+ if (window["editable_" + editor.id] && editor.mode === "source") {
1082
1100
  window["codemirror_" + editor.id].setOption("readOnly", this.readOnly);
1083
1101
  }
1084
1102
  });
1085
1103
 
1086
- editor.on('instanceReady', function (evt) {
1104
+ editor.on("instanceReady", function (evt) {
1087
1105
 
1088
1106
  //editor.container.getPrivate().events.contextmenu.listeners.splice(0, 1);
1089
1107
 
@@ -1092,7 +1110,7 @@
1092
1110
  // Replace Complete SelectAll command from the plugin, otherwise it will not work in IE10
1093
1111
  if (selectAllCommand != null) {
1094
1112
  selectAllCommand.exec = function () {
1095
- if (editor.mode === 'source') {
1113
+ if (editor.mode === "source") {
1096
1114
  window["codemirror_" + editor.id].setSelection({
1097
1115
  line: 0,
1098
1116
  ch: 0
@@ -1102,8 +1120,8 @@
1102
1120
  });
1103
1121
  } else {
1104
1122
  var editable = editor.editable();
1105
- if (editable.is('body'))
1106
- editor.document.$.execCommand('SelectAll', false, null);
1123
+ if (editable.is("body"))
1124
+ editor.document.$.execCommand("SelectAll", false, null);
1107
1125
  else {
1108
1126
  var range = editor.createRange();
1109
1127
  range.selectNodeContents(editable);
@@ -1118,15 +1136,15 @@
1118
1136
  }
1119
1137
  });
1120
1138
 
1121
- if (typeof (jQuery) != 'undefined' && jQuery('a[data-toggle="tab"]') && window["codemirror_" + editor.id]) {
1122
- jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function() {
1139
+ if (typeof (jQuery) != "undefined" && jQuery('a[data-toggle="tab"]') && window["codemirror_" + editor.id]) {
1140
+ jQuery('a[data-toggle="tab"]').on("shown.bs.tab", function() {
1123
1141
  window["codemirror_" + editor.id].refresh();
1124
1142
  });
1125
1143
  }
1126
1144
 
1127
- editor.on('setData', function(data) {
1145
+ editor.on("setData", function(data) {
1128
1146
 
1129
- if (window["editable_" + data.editor.id] && data.editor.mode === 'source') {
1147
+ if (window["editable_" + data.editor.id] && data.editor.mode === "source") {
1130
1148
  window["codemirror_" + data.editor.id].setValue(data.data.dataValue);
1131
1149
  }
1132
1150
  });
@@ -1139,11 +1157,11 @@
1139
1157
 
1140
1158
  this.setValue(data);
1141
1159
 
1142
- if (window["editable_" + this.editor.id] && this.editor.mode === 'source') {
1160
+ if (window["editable_" + this.editor.id] && this.editor.mode === "source") {
1143
1161
  window["codemirror_" + this.editor.id].setValue(data);
1144
1162
  }
1145
1163
 
1146
- this.editor.fire('dataReady');
1164
+ this.editor.fire("dataReady");
1147
1165
  },
1148
1166
  getData: function() {
1149
1167
  return this.getValue();
@@ -1157,7 +1175,7 @@
1157
1175
  },
1158
1176
  // Read-only support for textarea.
1159
1177
  setReadOnly: function(isReadOnly) {
1160
- this[(isReadOnly ? 'set' : 'remove') + 'Attribute']('readOnly', 'readonly');
1178
+ this[(isReadOnly ? "set" : "remove") + "Attribute"]("readOnly", "readonly");
1161
1179
  },
1162
1180
  editorID: null,
1163
1181
  detach: function() {
@@ -1185,12 +1203,12 @@ CKEDITOR.plugins.sourcearea = {
1185
1203
  editorFocus: false,
1186
1204
  readOnly: 1,
1187
1205
  exec: function(editor) {
1188
- if (editor.mode === 'wysiwyg') {
1189
- editor.fire('saveSnapshot');
1206
+ if (editor.mode === "wysiwyg") {
1207
+ editor.fire("saveSnapshot");
1190
1208
  }
1191
1209
 
1192
- editor.getCommand('source').setState(CKEDITOR.TRISTATE_DISABLED);
1193
- editor.setMode(editor.mode === 'source' ? 'wysiwyg' : 'source');
1210
+ editor.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);
1211
+ editor.setMode(editor.mode === "source" ? "wysiwyg" : "source");
1194
1212
  },
1195
1213
  canUndo: false
1196
1214
  },
@@ -1213,7 +1231,7 @@ CKEDITOR.plugins.sourcearea = {
1213
1231
  },
1214
1232
  editorFocus: false,
1215
1233
  readOnly: 0,
1216
- exec: function (editor) {
1234
+ exec: function(editor) {
1217
1235
  var range = {
1218
1236
  from: window["codemirror_" + editor.id].getCursor(true),
1219
1237
  to: window["codemirror_" + editor.id].getCursor(false)
@@ -1229,7 +1247,7 @@ CKEDITOR.plugins.sourcearea = {
1229
1247
  },
1230
1248
  editorFocus: false,
1231
1249
  readOnly: 0,
1232
- exec: function (editor) {
1250
+ exec: function(editor) {
1233
1251
  var range = {
1234
1252
  from: window["codemirror_" + editor.id].getCursor(true),
1235
1253
  to: window["codemirror_" + editor.id].getCursor(false)
@@ -1266,7 +1284,7 @@ CKEDITOR.plugins.sourcearea = {
1266
1284
  },
1267
1285
  editorFocus: false,
1268
1286
  readOnly: 1,
1269
- exec: function (editor) {
1287
+ exec: function(editor) {
1270
1288
  if (this.state == CKEDITOR.TRISTATE_ON) {
1271
1289
  window["codemirror_" + editor.id].setOption("autoCloseTags", false);
1272
1290
  } else if (this.state == CKEDITOR.TRISTATE_OFF) {
@@ -1308,4 +1326,4 @@ function OffSetToLineChannel(ed, n) {
1308
1326
 
1309
1327
  function IsStyleSheetAlreadyLoaded(href) {
1310
1328
  return CKEDITOR.document.getHead().findOne('link[href="' + href + '"]') != null;
1311
- }
1329
+ }