glebtv-ckeditor 4.6.0 → 4.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +15 -22
- data/MIT-LICENSE +0 -0
- data/README.md +2 -325
- data/Rakefile +1 -2
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.jpg +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.png +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_del.png +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_more.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/preloader.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/avi.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/ckfnothumb.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/doc.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/docx.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/exe.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/gz.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/htm.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/jpg.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/mp3.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/mpg.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/pdf.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/psd.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/rar.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/swf.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/tar.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/txt.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/unknown.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/wmv.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/xls.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/xlsx.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/zip.gif +0 -0
- data/app/assets/javascripts/ckeditor/application.js +0 -0
- data/app/assets/javascripts/ckeditor/config.js.erb +1 -2
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js.erb → application.js} +4 -6
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +0 -0
- data/app/assets/javascripts/ckeditor/init.js.erb +0 -0
- data/app/assets/stylesheets/ckeditor/application.css +1 -1
- data/app/assets/stylesheets/ckeditor/filebrowser/uploader.scss +172 -0
- data/app/controllers/ckeditor/application_controller.rb +9 -10
- data/app/controllers/ckeditor/attachment_files_controller.rb +11 -12
- data/app/controllers/ckeditor/pictures_controller.rb +10 -12
- data/app/helpers/ckeditor/application_helper.rb +1 -10
- data/app/views/ckeditor/attachment_files/index.html.erb +5 -5
- data/app/views/ckeditor/pictures/index.html.erb +5 -5
- data/app/views/ckeditor/shared/_asset.html.erb +18 -21
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +17 -20
- data/app/views/layouts/ckeditor/application.html.erb +3 -3
- data/config/locales/en.ckeditor.yml +0 -0
- data/config/locales/ru.ckeditor.yml +0 -0
- data/config/routes.rb +2 -2
- data/lib/ckeditor.rb +42 -34
- data/lib/ckeditor/asset_response.rb +74 -25
- data/lib/ckeditor/backend/carrierwave.rb +8 -5
- data/lib/ckeditor/backend/dragonfly.rb +5 -3
- data/lib/ckeditor/backend/paperclip.rb +15 -22
- data/lib/ckeditor/backend/refile.rb +6 -4
- data/lib/ckeditor/helpers/controllers.rb +15 -20
- data/lib/ckeditor/helpers/form_builder.rb +1 -1
- data/lib/ckeditor/helpers/form_helper.rb +0 -0
- data/lib/ckeditor/helpers/view_helper.rb +0 -0
- data/lib/ckeditor/hooks/cancan.rb +0 -2
- data/lib/ckeditor/hooks/formtastic.rb +2 -2
- data/lib/ckeditor/hooks/pundit.rb +1 -4
- data/lib/ckeditor/hooks/simple_form.rb +9 -14
- data/lib/ckeditor/http.rb +9 -11
- data/lib/ckeditor/orm/active_record.rb +1 -3
- data/lib/ckeditor/orm/base.rb +5 -5
- data/lib/ckeditor/orm/mongoid.rb +4 -6
- data/lib/ckeditor/paginatable.rb +3 -1
- data/lib/ckeditor/rails.rb +39 -0
- data/lib/ckeditor/text_area.rb +16 -15
- data/lib/ckeditor/utils.rb +45 -39
- data/lib/ckeditor/utils/content_type_detector.rb +7 -10
- data/lib/ckeditor/utils/javascript_code.rb +8 -3
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/install_generator.rb +52 -30
- data/lib/generators/ckeditor/pundit_policy_generator.rb +1 -3
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +2 -2
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +6 -10
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration_versioned.rb +22 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +4 -4
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +6 -10
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration_versioned.rb +23 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +3 -3
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +5 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +2 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration_versioned.rb +23 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/attachment_file.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +7 -12
- data/lib/generators/ckeditor/templates/active_record/refile/migration_versioned.rb +23 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +0 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +4 -4
- data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +4 -5
- data/lib/generators/ckeditor/templates/ckeditor.rb +16 -7
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +2 -2
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +1 -1
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +5 -5
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +5 -5
- data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +2 -2
- data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +2 -2
- data/lib/glebtv-ckeditor.rb +0 -0
- data/lib/tasks/ckeditor.rake +6 -14
- data/test/controllers/attachment_files_controller_test.rb +0 -0
- data/test/controllers/pictures_controller_test.rb +0 -0
- data/test/dummy/Rakefile +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +0 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +0 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -0
- data/test/dummy/app/controllers/posts_controller.rb +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -0
- data/test/dummy/app/helpers/posts_helper.rb +0 -0
- data/test/dummy/app/models/post.rb +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +0 -0
- data/test/dummy/app/views/posts/_form.html.erb +0 -0
- data/test/dummy/app/views/posts/edit.html.erb +0 -0
- data/test/dummy/app/views/posts/index.html.erb +0 -0
- data/test/dummy/app/views/posts/new.html.erb +0 -0
- data/test/dummy/app/views/posts/show.html.erb +0 -0
- data/test/dummy/config.ru +0 -0
- data/test/dummy/config/application.rb +0 -0
- data/test/dummy/config/boot.rb +0 -0
- data/test/dummy/config/database.yml +0 -0
- data/test/dummy/config/environment.rb +0 -0
- data/test/dummy/config/environments/development.rb +0 -0
- data/test/dummy/config/environments/production.rb +0 -0
- data/test/dummy/config/environments/test.rb +0 -0
- data/test/dummy/config/initializers/assets.rb +1 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/test/dummy/config/initializers/ckeditor.rb +0 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
- data/test/dummy/config/initializers/inflections.rb +0 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/paperclip.rb +3 -0
- data/test/dummy/config/initializers/session_store.rb +0 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/test/dummy/config/locales/en.yml +0 -0
- data/test/dummy/config/mongoid.yml +0 -0
- data/test/dummy/config/routes.rb +0 -0
- data/test/dummy/config/secrets.yml +0 -0
- data/test/dummy/db/migrate/20110623120047_create_posts.rb +0 -0
- data/test/dummy/public/404.html +0 -0
- data/test/dummy/public/422.html +0 -0
- data/test/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -0
- data/test/dummy/test/fixtures/files/rails.png +0 -0
- data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
- data/test/functional/posts_controller_test.rb +2 -3
- data/test/generators/install_generator_test.rb +2 -2
- data/test/integration/navigation_test.rb +0 -0
- data/test/models/attachment_file_test.rb +3 -8
- data/test/models/ckeditor_test.rb +1 -1
- data/test/models/picture_test.rb +0 -0
- data/test/models/utils_test.rb +6 -6
- data/test/orm/active_record.rb +0 -0
- data/test/orm/mongoid.rb +0 -0
- data/test/support/helpers.rb +0 -0
- data/test/support/integration_case.rb +0 -0
- data/test/support/raw_post.rb +0 -0
- data/test/support/routes.txt +0 -0
- data/test/test_helper.rb +1 -1
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +1358 -0
- data/vendor/assets/javascripts/ckeditor/README.md +39 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +31 -30
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +709 -675
- data/vendor/assets/javascripts/ckeditor/config.js +10 -0
- data/vendor/assets/javascripts/ckeditor/contents.css +208 -0
- data/vendor/assets/javascripts/ckeditor/lang/en.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +3 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +6 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +230 -74
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/abcdef.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +2 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/icecoder.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/material.css +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +0 -2
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/seti.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/yeti.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +23 -23
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/hidpi/loremipsum.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/loremipsum.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +13 -7
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +49 -39
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +33 -19
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +6 -1
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +4 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +92 -23
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +81 -82
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon-hdpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +448 -448
- data/vendor/assets/javascripts/ckeditor/samples/css/samples.css +1632 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/github-top.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/header-bg.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/header-separator.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/navigation-tip.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
- data/vendor/assets/javascripts/ckeditor/samples/js/sample.js +53 -0
- data/vendor/assets/javascripts/ckeditor/samples/js/sf.js +17 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/ajax.html +85 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/api.html +210 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/appendto.html +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +204 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/posteddata.php +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/sample.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +7 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/datafiltering.html +508 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/dialog/assets/my_dialog.js +48 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/dialog/dialog.html +190 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/divreplace.html +144 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/enterkey/enterkey.html +106 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/swfobject.js +19 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputforflash.html +283 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputhtml.html +224 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/index.html +131 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/inlineall.html +314 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/inlinebycode.html +124 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/inlinetextarea.html +113 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/jquery.html +103 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/magicline/magicline.html +209 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/readonly.html +76 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/replacebyclass.html +60 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/replacebycode.html +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/sample.css +357 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/sample.js +50 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/sample_posteddata.php +16 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/tabindex.html +78 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/toolbar/toolbar.html +235 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/uicolor.html +72 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/uilanguages.html +122 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +80 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/xhtmlstyle.html +234 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/css/fontello.css +55 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +10 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/config.json +28 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.svg +14 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +446 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +13 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +9 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +33 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +14 -0
- data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/LICENSE.md → samples/toolbarconfigurator/lib/codemirror/LICENSE} +19 -21
- data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/css → samples/toolbarconfigurator/lib/codemirror}/codemirror.css +325 -341
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +288 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +25 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +36 -0
- data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/js/addon/hint → samples/toolbarconfigurator/lib/codemirror}/show-hint.css +38 -36
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +16 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/readme.md +7 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons16.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons16.svg +2374 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons32.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons32.svg +2722 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/locations.json +145 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/skin.js +10 -0
- data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
- metadata +182 -177
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +0 -128
- data/app/views/rails_admin/main/_form_ck_editor.html.haml +0 -10
- data/app/views/rails_admin/main/_form_ck_editorml.html.haml +0 -11
- data/config/locales/bg.ckeditor.yml +0 -9
- data/config/locales/cs.ckeditor.yml +0 -9
- data/config/locales/de.ckeditor.yml +0 -9
- data/config/locales/el-GR.cdkeditor.yml +0 -9
- data/config/locales/es.ckeditor.yml +0 -9
- data/config/locales/fr.ckeditor.yml +0 -9
- data/config/locales/hu.ckeditor.yml +0 -9
- data/config/locales/it.ckeditor.yml +0 -9
- data/config/locales/ja.ckeditor.yml +0 -9
- data/config/locales/nb.ckeditor.yml +0 -9
- data/config/locales/nl.ckeditor.yml +0 -9
- data/config/locales/pl.ckeditor.yml +0 -9
- data/config/locales/pt-BR.ckeditor.yml +0 -9
- data/config/locales/pt-PT.ckeditor.yml +0 -9
- data/config/locales/sv-SE.ckeditor.yml +0 -9
- data/config/locales/tr.ckeditor.yml +0 -9
- data/config/locales/uk.ckeditor.yml +0 -9
- data/config/locales/zh-CN.ckeditor.yml +0 -9
- data/config/locales/zh-TW.ckeditor.yml +0 -9
- data/lib/ckeditor/engine.rb +0 -46
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +0 -183
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/comment.js +0 -206
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/continuecomment.js +0 -85
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.css +0 -32
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +0 -157
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +0 -202
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +0 -169
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +0 -51
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +0 -122
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchtags.js +0 -66
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/trailingspace.js +0 -27
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/brace-fold.js +0 -105
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/comment-fold.js +0 -59
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldcode.js +0 -150
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.css +0 -20
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.js +0 -146
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/indent-fold.js +0 -44
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/markdown-fold.js +0 -49
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/xml-fold.js +0 -182
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +0 -43
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js +0 -226
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/anyword-hint.js +0 -41
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/css-hint.js +0 -60
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/html-hint.js +0 -348
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/javascript-hint.js +0 -155
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.js +0 -438
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/sql-hint.js +0 -271
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/xml-hint.js +0 -110
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/loadmode.js +0 -64
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex.js +0 -123
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex_test.js +0 -33
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/overlay.js +0 -85
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/simple.js +0 -213
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/jump-to-line.js +0 -49
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +0 -165
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.css +0 -8
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.js +0 -97
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js +0 -252
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +0 -189
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/active-line.js +0 -74
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/mark-selection.js +0 -118
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/selection-pointer.js +0 -98
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify-html.js +0 -952
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.js +0 -2087
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +0 -9109
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/bbcode.js +0 -137
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/index.html +0 -73
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/bbcodemixed.js +0 -161
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/index.html +0 -128
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/clike.js +0 -785
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/index.html +0 -360
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/scala.html +0 -767
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/test.js +0 -55
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/css.js +0 -825
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss.html +0 -103
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss_test.js +0 -17
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/index.html +0 -75
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less.html +0 -152
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less_test.js +0 -54
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss.html +0 -157
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss_test.js +0 -110
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/test.js +0 -200
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/htmlembedded.js +0 -28
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/index.html +0 -60
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/htmlmixed.js +0 -152
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/index.html +0 -89
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/index.html +0 -114
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/javascript.js +0 -784
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/json-ld.html +0 -72
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/test.js +0 -247
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/typescript.html +0 -61
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/index.html +0 -64
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/php.js +0 -234
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/test.js +0 -154
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/index.html +0 -61
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/test.js +0 -51
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/xml.js +0 -394
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +0 -15
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.editorConfig = function( config ) {
|
7
|
+
// Define changes to default configuration here. For example:
|
8
|
+
// config.language = 'fr';
|
9
|
+
// config.uiColor = '#AADC6E';
|
10
|
+
};
|
@@ -0,0 +1,208 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
body
|
7
|
+
{
|
8
|
+
/* Font */
|
9
|
+
font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
|
10
|
+
font-size: 12px;
|
11
|
+
|
12
|
+
/* Text color */
|
13
|
+
color: #333;
|
14
|
+
|
15
|
+
/* Remove the background color to make it transparent */
|
16
|
+
background-color: #fff;
|
17
|
+
|
18
|
+
margin: 20px;
|
19
|
+
}
|
20
|
+
|
21
|
+
.cke_editable
|
22
|
+
{
|
23
|
+
font-size: 13px;
|
24
|
+
line-height: 1.6;
|
25
|
+
|
26
|
+
/* Fix for missing scrollbars with RTL texts. (#10488) */
|
27
|
+
word-wrap: break-word;
|
28
|
+
}
|
29
|
+
|
30
|
+
blockquote
|
31
|
+
{
|
32
|
+
font-style: italic;
|
33
|
+
font-family: Georgia, Times, "Times New Roman", serif;
|
34
|
+
padding: 2px 0;
|
35
|
+
border-style: solid;
|
36
|
+
border-color: #ccc;
|
37
|
+
border-width: 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
.cke_contents_ltr blockquote
|
41
|
+
{
|
42
|
+
padding-left: 20px;
|
43
|
+
padding-right: 8px;
|
44
|
+
border-left-width: 5px;
|
45
|
+
}
|
46
|
+
|
47
|
+
.cke_contents_rtl blockquote
|
48
|
+
{
|
49
|
+
padding-left: 8px;
|
50
|
+
padding-right: 20px;
|
51
|
+
border-right-width: 5px;
|
52
|
+
}
|
53
|
+
|
54
|
+
a
|
55
|
+
{
|
56
|
+
color: #0782C1;
|
57
|
+
}
|
58
|
+
|
59
|
+
ol,ul,dl
|
60
|
+
{
|
61
|
+
/* IE7: reset rtl list margin. (#7334) */
|
62
|
+
*margin-right: 0px;
|
63
|
+
/* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/
|
64
|
+
padding: 0 40px;
|
65
|
+
}
|
66
|
+
|
67
|
+
h1,h2,h3,h4,h5,h6
|
68
|
+
{
|
69
|
+
font-weight: normal;
|
70
|
+
line-height: 1.2;
|
71
|
+
}
|
72
|
+
|
73
|
+
hr
|
74
|
+
{
|
75
|
+
border: 0px;
|
76
|
+
border-top: 1px solid #ccc;
|
77
|
+
}
|
78
|
+
|
79
|
+
img.right
|
80
|
+
{
|
81
|
+
border: 1px solid #ccc;
|
82
|
+
float: right;
|
83
|
+
margin-left: 15px;
|
84
|
+
padding: 5px;
|
85
|
+
}
|
86
|
+
|
87
|
+
img.left
|
88
|
+
{
|
89
|
+
border: 1px solid #ccc;
|
90
|
+
float: left;
|
91
|
+
margin-right: 15px;
|
92
|
+
padding: 5px;
|
93
|
+
}
|
94
|
+
|
95
|
+
pre
|
96
|
+
{
|
97
|
+
white-space: pre-wrap; /* CSS 2.1 */
|
98
|
+
word-wrap: break-word; /* IE7 */
|
99
|
+
-moz-tab-size: 4;
|
100
|
+
tab-size: 4;
|
101
|
+
}
|
102
|
+
|
103
|
+
.marker
|
104
|
+
{
|
105
|
+
background-color: Yellow;
|
106
|
+
}
|
107
|
+
|
108
|
+
span[lang]
|
109
|
+
{
|
110
|
+
font-style: italic;
|
111
|
+
}
|
112
|
+
|
113
|
+
figure
|
114
|
+
{
|
115
|
+
text-align: center;
|
116
|
+
border: solid 1px #ccc;
|
117
|
+
border-radius: 2px;
|
118
|
+
background: rgba(0,0,0,0.05);
|
119
|
+
padding: 10px;
|
120
|
+
margin: 10px 20px;
|
121
|
+
display: inline-block;
|
122
|
+
}
|
123
|
+
|
124
|
+
figure > figcaption
|
125
|
+
{
|
126
|
+
text-align: center;
|
127
|
+
display: block; /* For IE8 */
|
128
|
+
}
|
129
|
+
|
130
|
+
a > img {
|
131
|
+
padding: 1px;
|
132
|
+
margin: 1px;
|
133
|
+
border: none;
|
134
|
+
outline: 1px solid #0782C1;
|
135
|
+
}
|
136
|
+
|
137
|
+
/* Widget Styles */
|
138
|
+
.code-featured
|
139
|
+
{
|
140
|
+
border: 5px solid red;
|
141
|
+
}
|
142
|
+
|
143
|
+
.math-featured
|
144
|
+
{
|
145
|
+
padding: 20px;
|
146
|
+
box-shadow: 0 0 2px rgba(200, 0, 0, 1);
|
147
|
+
background-color: rgba(255, 0, 0, 0.05);
|
148
|
+
margin: 10px;
|
149
|
+
}
|
150
|
+
|
151
|
+
.image-clean
|
152
|
+
{
|
153
|
+
border: 0;
|
154
|
+
background: none;
|
155
|
+
padding: 0;
|
156
|
+
}
|
157
|
+
|
158
|
+
.image-clean > figcaption
|
159
|
+
{
|
160
|
+
font-size: .9em;
|
161
|
+
text-align: right;
|
162
|
+
}
|
163
|
+
|
164
|
+
.image-grayscale
|
165
|
+
{
|
166
|
+
background-color: white;
|
167
|
+
color: #666;
|
168
|
+
}
|
169
|
+
|
170
|
+
.image-grayscale img, img.image-grayscale
|
171
|
+
{
|
172
|
+
filter: grayscale(100%);
|
173
|
+
}
|
174
|
+
|
175
|
+
.embed-240p
|
176
|
+
{
|
177
|
+
max-width: 426px;
|
178
|
+
max-height: 240px;
|
179
|
+
margin:0 auto;
|
180
|
+
}
|
181
|
+
|
182
|
+
.embed-360p
|
183
|
+
{
|
184
|
+
max-width: 640px;
|
185
|
+
max-height: 360px;
|
186
|
+
margin:0 auto;
|
187
|
+
}
|
188
|
+
|
189
|
+
.embed-480p
|
190
|
+
{
|
191
|
+
max-width: 854px;
|
192
|
+
max-height: 480px;
|
193
|
+
margin:0 auto;
|
194
|
+
}
|
195
|
+
|
196
|
+
.embed-720p
|
197
|
+
{
|
198
|
+
max-width: 1280px;
|
199
|
+
max-height: 720px;
|
200
|
+
margin:0 auto;
|
201
|
+
}
|
202
|
+
|
203
|
+
.embed-1080p
|
204
|
+
{
|
205
|
+
max-width: 1920px;
|
206
|
+
max-height: 1080px;
|
207
|
+
margin:0 auto;
|
208
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
For licensing, see LICENSE.md or http://ckeditor.com/license
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.md or http://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":"<not set>","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<span class=\"cke_accessibility\">, unavailable</span>","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"},"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","pasteArea":"Paste Area","pasteMsg":"Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK","securityMsg":"Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.","title":"Paste"},"button":{"selectedLabel":"%1 (Selected)"},"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"},"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"},"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"},"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":"<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":"<frame>","targetFrameName":"Target Frame Name","targetPopup":"<popup window>","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":"<not set>","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","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","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"},"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"},"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":"<not set>","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<span class=\"cke_accessibility\">, unavailable</span>","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":"<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":"<frame>","targetFrameName":"Target Frame Name","targetPopup":"<popup window>","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":"<not set>","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"}};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
For licensing, see LICENSE.md or http://ckeditor.com/license
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.md or http://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<span class=\"cke_accessibility\">, недоступно</span>","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":"Цитата"},"clipboard":{"copy":"Копировать","copyError":"Настройки безопасности вашего браузера не разрешают редактору выполнять операции по копированию текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+C).","cut":"Вырезать","cutError":"Настройки безопасности вашего браузера не разрешают редактору выполнять операции по вырезке текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+X).","paste":"Вставить","pasteArea":"Зона для вставки","pasteMsg":"Пожалуйста, вставьте текст в зону ниже, используя клавиатуру (<strong>Ctrl/Cmd+V</strong>) и нажмите кнопку \"OK\".","securityMsg":"Настройки безопасности вашего браузера не разрешают редактору напрямую обращаться к буферу обмена. Вы должны вставить текст снова в это окно.","title":"Вставить"},"button":{"selectedLabel":"%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":"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":"Ещё цвета...","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"},"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"},"image":{"alt":"Альтернативный текст","border":"Граница","btnUpload":"Загрузить на сервер","button2Img":"Вы желаете преобразовать это изображение-кнопку в обычное изображение?","hSpace":"Гориз. отступ","img2Button":"Вы желаете преобразовать это обычное изображение в изображение-кнопку?","infoTab":"Данные об изображении","linkTab":"Ссылка","lockRatio":"Сохранять пропорции","menu":"Свойства изображения","resetSize":"Вернуть обычные размеры","title":"Свойства изображения","titleButton":"Свойства изображения-кнопки","upload":"Загрузить","urlMissing":"Не указана ссылка на изображение.","vSpace":"Вертик. отступ","validateBorder":"Размер границ должен быть задан числом.","validateHSpace":"Горизонтальный отступ должен быть задан числом.","validateVSpace":"Вертикальный отступ должен быть задан числом."},"indent":{"indent":"Увеличить отступ","outdent":"Уменьшить отступ"},"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":"Force 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":"Вставить разрыв страницы для печати"},"pastefromword":{"confirmCleanup":"Текст, который вы желаете вставить, по всей видимости, был скопирован из Word. Следует ли очистить его перед вставкой?","error":"Невозможно очистить вставленные данные из-за внутренней ошибки","title":"Вставить из Word","toolbar":"Вставить из Word"},"pastetext":{"button":"Вставить только текст","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":"Верхняя строка","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":"Шаблоны содержимого"},"toolbar":{"toolbarCollapse":"Свернуть панель инструментов","toolbarExpand":"Развернуть панель инструментов","toolbarGroups":{"document":"Документ","clipboard":"Буфер обмена / Отмена действий","editing":"Корректировка","forms":"Формы","basicstyles":"Простые стили","paragraph":"Абзац","links":"Ссылки","insert":"Вставка","styles":"Стили","colors":"Цвета","tools":"Инструменты"},"toolbars":"Панели инструментов редактора"},"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":"Выравнивание","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<span class=\"cke_accessibility\">, недоступно</span>","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":"Проверить орфографию"}};
|
@@ -2,9 +2,9 @@
|
|
2
2
|
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.md or http://ckeditor.com/license
|
4
4
|
*/
|
5
|
-
CKEDITOR.dialog.add("a11yHelp",function(
|
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};
|
7
|
-
CKEDITOR.CTRL],
|
8
|
-
|
9
|
-
|
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'}]}],
|
10
10
|
buttons:[CKEDITOR.dialog.cancelButton]}});
|
@@ -6,5 +6,6 @@ CKEDITOR.plugins.setLang("a11yhelp","en",{title:"Accessibility Instructions",con
|
|
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."},
|
7
7
|
{name:"Editor Element Path Bar",legend:"Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."}]},{name:"Commands",items:[{name:" Undo command",legend:"Press ${undo}"},{name:" Redo command",legend:"Press ${redo}"},{name:" Bold command",legend:"Press ${bold}"},{name:" Italic command",legend:"Press ${italic}"},{name:" Underline command",
|
8
8
|
legend:"Press ${underline}"},{name:" Link command",legend:"Press ${link}"},{name:" Toolbar Collapse command",legend:"Press ${toolbarCollapse}"},{name:" Access previous focus space command",legend:"Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."},{name:" Access next focus space command",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."},
|
9
|
-
{name:" Accessibility Help",legend:"Press ${a11yHelp}"}]}],tab:"Tab",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",leftArrow:"Left Arrow",upArrow:"Up Arrow",rightArrow:"Right Arrow",downArrow:"Down Arrow",insert:"Insert",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Numpad 0",numpad1:"Numpad 1",
|
10
|
-
numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"Multiply",add:"Add",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"Divide",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:"Semicolon",equalSign:"Equal Sign",comma:"Comma",dash:"Dash",period:"Period",forwardSlash:"Forward Slash",
|
9
|
+
{name:" Accessibility Help",legend:"Press ${a11yHelp}"},{name:" Paste as plain text",legend:"Press ${pastetext}",legendEdge:"Press ${pastetext}, followed by ${paste}"}]}],tab:"Tab",pause:"Pause",capslock:"Caps Lock",escape:"Escape",pageUp:"Page Up",pageDown:"Page Down",leftArrow:"Left Arrow",upArrow:"Up Arrow",rightArrow:"Right Arrow",downArrow:"Down Arrow",insert:"Insert",leftWindowKey:"Left Windows key",rightWindowKey:"Right Windows key",selectKey:"Select key",numpad0:"Numpad 0",numpad1:"Numpad 1",
|
10
|
+
numpad2:"Numpad 2",numpad3:"Numpad 3",numpad4:"Numpad 4",numpad5:"Numpad 5",numpad6:"Numpad 6",numpad7:"Numpad 7",numpad8:"Numpad 8",numpad9:"Numpad 9",multiply:"Multiply",add:"Add",subtract:"Subtract",decimalPoint:"Decimal Point",divide:"Divide",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:"Semicolon",equalSign:"Equal Sign",comma:"Comma",dash:"Dash",period:"Period",forwardSlash:"Forward Slash",
|
11
|
+
graveAccent:"Grave Accent",openBracket:"Open Bracket",backSlash:"Backslash",closeBracket:"Close Bracket",singleQuote:"Single Quote"});
|
@@ -6,6 +6,6 @@ CKEDITOR.plugins.setLang("a11yhelp","ru",{title:"Горячие клавиши",
|
|
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}"}]}],tab:"Tab",pause:"Pause",capslock:"Caps Lock",escape:"Esc",pageUp:"Page Up",
|
10
|
-
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
|
-
scrollLock:"Scroll Lock",semiColon:"Точка с запятой",equalSign:"Равно",comma:"Запятая",dash:"Тире",period:"Точка",forwardSlash:"Наклонная черта",graveAccent:"Апостроф",openBracket:"Открыть скобку",backSlash:"Обратная наклонная черта",closeBracket:"Закрыть скобку",singleQuote:"Одинарная кавычка"});
|
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",
|
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
|
+
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 +1 @@
|
|
1
|
-
.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.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:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid #c0c0c0}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.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{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.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:#00f}.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{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:#fff}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;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{-webkit-user-select:none;-moz-user-select:none;user-select:none}.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:none;font-variant-ligatures:none}.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-code{outline:none}.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:#ffa;background: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:none}.CodeMirror{font:13px/1.4em monospace;text-align:left}.CodeMirror .activeline{background:#e8f2ff}.CodeMirror .CodeMirror-foldmarker{color:#00f;-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,.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 *{white-space:pre}.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 #c0c0c0;background:#fff;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:#000;cursor:pointer}.CodeMirror-hint-active{background:#08f;color:#fff}.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:none;outline:none;background:transparent;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}.CodeMirror-foldmarker{color:#00f;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:#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 +1,2 @@
|
|
1
|
-
(function(){function n(n,t){for(var i=0;i<t.length;i+=1)if(t[i]===n)return!0;return!1}function f(n){return n.replace(/^\s+|\s+$/g,"")}function e(n){return n.replace(/^\s+/g,"")}function r(n,t){"use strict";var i=new o(n,t);return i.beautify()}function o(r,u){"use strict";function wt(n,t){var i=0;return n&&(i=n.indentation_level,!v.just_added_newline()&&n.line_indent_level>i&&(i=n.line_indent_level)),{mode:t,parent:n,last_text:n?n.last_text:"",last_word:n?n.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:i,line_indent_level:n?n.line_indent_level:i,start_line_index:v.get_line_number(),ternary_depth:0}}function bt(n){var i=n.newlines,r=a.keep_array_indentation&&nt(o.mode),t;if(r)for(t=0;t<i;t+=1)y(t>0);else if(a.max_preserve_newlines&&i>a.max_preserve_newlines&&(i=a.max_preserve_newlines),a.preserve_newlines&&n.newlines>1)for(y(),t=1;t<i;t+=1)y(!0);s=n;yt[s.type]()}function gt(n){n=n.replace(/\x0d/g,"");for(var i=[],t=n.indexOf("\n");t!==-1;)i.push(n.substring(0,t)),n=n.substring(t+1),t=n.indexOf("\n");return n.length&&i.push(n),i}function d(n){if(n=n===undefined?!1:n,!v.just_added_newline())if(a.preserve_newlines&&s.wanted_newline||n)y(!1,!0);else if(a.wrap_line_length){var t=v.current_line.get_character_count()+s.text.length+(v.space_before_token?1:0);t>=a.wrap_line_length&&y(!1,!0)}}function y(n,i){if(!i&&o.last_text!==";"&&o.last_text!==","&&o.last_text!=="="&&l!=="TK_OPERATOR")while(o.mode===t.Statement&&!o.if_block&&!o.do_block)g();v.add_new_line(n)&&(o.multiline_frame=!0)}function kt(){v.just_added_newline()&&(a.keep_array_indentation&&nt(o.mode)&&s.wanted_newline?(v.current_line.push(s.whitespace_before),v.space_before_token=!1):v.set_indent(o.indentation_level)&&(o.line_indent_level=o.indentation_level))}function p(n){if(v.raw){v.add_raw_token(s);return}a.comma_first&&l==="TK_COMMA"&&v.just_added_newline()&&v.previous_line.last()===","&&(v.previous_line.pop(),kt(),v.add_token(","),v.space_before_token=!0);n=n||s.text;kt();v.add_token(n)}function ft(){o.indentation_level+=1}function ni(){o.indentation_level>0&&(!o.parent||o.indentation_level>o.parent.indentation_level)&&(o.indentation_level-=1)}function it(n){o?(st.push(o),b=o):b=wt(null,n);o=wt(b,n)}function nt(n){return n===t.ArrayLiteral}function et(i){return n(i,[t.Expression,t.ForInitializer,t.Conditional])}function g(){st.length>0&&(b=o,o=st.pop(),b.mode===t.Statement&&v.remove_redundant_indentation(b))}function ht(){return o.parent.mode===t.ObjectLiteral&&o.mode===t.Statement&&(o.last_text===":"&&o.ternary_depth===0||l==="TK_RESERVED"&&n(o.last_text,["get","set"]))}function rt(){return l==="TK_RESERVED"&&n(o.last_text,["var","let","const"])&&s.type==="TK_WORD"||l==="TK_RESERVED"&&o.last_text==="do"||l==="TK_RESERVED"&&o.last_text==="return"&&!s.wanted_newline||l==="TK_RESERVED"&&o.last_text==="else"&&!(s.type==="TK_RESERVED"&&s.text==="if")||l==="TK_END_EXPR"&&(b.mode===t.ForInitializer||b.mode===t.Conditional)||l==="TK_WORD"&&o.mode===t.BlockStatement&&!o.in_case&&!(s.text==="--"||s.text==="++")&&k!=="function"&&s.type!=="TK_WORD"&&s.type!=="TK_RESERVED"||o.mode===t.ObjectLiteral&&(o.last_text===":"&&o.ternary_depth===0||l==="TK_RESERVED"&&n(o.last_text,["get","set"]))?(it(t.Statement),ft(),l==="TK_RESERVED"&&n(o.last_text,["var","let","const"])&&s.type==="TK_WORD"&&(o.declaration_statement=!0),ht()||d(s.type==="TK_RESERVED"&&n(s.text,["do","for","if","while"])),!0):!1}function ti(n,t){for(var r,i=0;i<n.length;i++)if(r=f(n[i]),r.charAt(0)!==t)return!1;return!0}function ii(n,t){for(var i=0,u=n.length,r;i<u;i++)if(r=n[i],r&&r.indexOf(t)!==0)return!1;return!0}function ct(t){return n(t,["case","return","do","if","throw","else"])}function lt(n){var t=vt+(n||0);return t<0||t>=at.length?null:at[t]}function ri(){rt();var i=t.Expression;if(s.text==="["){if(l==="TK_WORD"||o.last_text===")"){l==="TK_RESERVED"&&n(o.last_text,tt.line_starters)&&(v.space_before_token=!0);it(i);p();ft();a.space_in_paren&&(v.space_before_token=!0);return}i=t.ArrayLiteral;nt(o.mode)&&(o.last_text==="["||o.last_text===","&&(k==="]"||k==="}"))&&(a.keep_array_indentation||y())}else l==="TK_RESERVED"&&o.last_text==="for"?i=t.ForInitializer:l==="TK_RESERVED"&&n(o.last_text,["if","while"])&&(i=t.Conditional);o.last_text===";"||l==="TK_START_BLOCK"?y():l==="TK_END_EXPR"||l==="TK_START_EXPR"||l==="TK_END_BLOCK"||o.last_text==="."?d(s.wanted_newline):l==="TK_RESERVED"&&s.text==="("||l==="TK_WORD"||l==="TK_OPERATOR"?l==="TK_RESERVED"&&(o.last_word==="function"||o.last_word==="typeof")||o.last_text==="*"&&k==="function"?a.space_after_anon_function&&(v.space_before_token=!0):l==="TK_RESERVED"&&(n(o.last_text,tt.line_starters)||o.last_text==="catch")&&a.space_before_conditional&&(v.space_before_token=!0):v.space_before_token=!0;s.text==="("&&l==="TK_RESERVED"&&o.last_word==="await"&&(v.space_before_token=!0);s.text==="("&&(l==="TK_EQUALS"||l==="TK_OPERATOR")&&(ht()||d());it(i);p();a.space_in_paren&&(v.space_before_token=!0);ft()}function ui(){while(o.mode===t.Statement)g();o.multiline_frame&&d(s.text==="]"&&nt(o.mode)&&!a.keep_array_indentation);a.space_in_paren&&(l!=="TK_START_EXPR"||a.space_in_empty_paren?v.space_before_token=!0:(v.trim(),v.space_before_token=!1));s.text==="]"&&a.keep_array_indentation?(p(),g()):(g(),p());v.remove_redundant_indentation(b);o.do_while&&b.mode===t.Conditional&&(b.mode=t.Expression,o.do_block=!1,o.do_while=!1)}function fi(){var i=lt(1),r=lt(2),u,f;r&&(r.text===":"&&n(i.type,["TK_STRING","TK_WORD","TK_RESERVED"])||n(i.text,["get","set"])&&n(r.type,["TK_WORD","TK_RESERVED"]))?n(k,["class","interface"])?it(t.BlockStatement):it(t.ObjectLiteral):it(t.BlockStatement);u=!i.comments_before.length&&i.text==="}";f=u&&o.last_word==="function"&&l==="TK_END_EXPR";a.brace_style==="expand"||a.brace_style==="none"&&s.wanted_newline?l!=="TK_OPERATOR"&&(f||l==="TK_EQUALS"||l==="TK_RESERVED"&&ct(o.last_text)&&o.last_text!=="else")?v.space_before_token=!0:y(!1,!0):l!=="TK_OPERATOR"&&l!=="TK_START_EXPR"?l==="TK_START_BLOCK"?y():v.space_before_token=!0:nt(b.mode)&&o.last_text===","&&(k==="}"?v.space_before_token=!0:y());p();ft()}function ei(){while(o.mode===t.Statement)g();var n=l==="TK_START_BLOCK";a.brace_style==="expand"?n||y():n||(nt(o.mode)&&a.keep_array_indentation?(a.keep_array_indentation=!1,y(),a.keep_array_indentation=!0):y());g();p()}function dt(){var i,r;if(s.type==="TK_RESERVED"&&o.mode!==t.ObjectLiteral&&n(s.text,["set","get"])&&(s.type="TK_WORD"),s.type==="TK_RESERVED"&&o.mode===t.ObjectLiteral&&(i=lt(1),i.text==":"&&(s.type="TK_WORD")),rt()||!s.wanted_newline||et(o.mode)||l==="TK_OPERATOR"&&o.last_text!=="--"&&o.last_text!=="++"||l==="TK_EQUALS"||!a.preserve_newlines&&l==="TK_RESERVED"&&n(o.last_text,["var","let","const","set","get"])||y(),o.do_block&&!o.do_while){if(s.type==="TK_RESERVED"&&s.text==="while"){v.space_before_token=!0;p();v.space_before_token=!0;o.do_while=!0;return}y();o.do_block=!1}if(o.if_block)if(o.else_block||s.type!=="TK_RESERVED"||s.text!=="else"){while(o.mode===t.Statement)g();o.if_block=!1;o.else_block=!1}else o.else_block=!0;if(s.type==="TK_RESERVED"&&(s.text==="case"||s.text==="default"&&o.in_case_statement)){y();(o.case_body||a.jslint_happy)&&(ni(),o.case_body=!1);p();o.in_case=!0;o.in_case_statement=!0;return}if(s.type==="TK_RESERVED"&&s.text==="function"&&((n(o.last_text,["}",";"])||v.just_added_newline()&&!n(o.last_text,["[","{",":","=",","]))&&(v.just_added_blankline()||s.comments_before.length||(y(),y(!0))),l==="TK_RESERVED"||l==="TK_WORD"?l==="TK_RESERVED"&&n(o.last_text,["get","set","new","return","export","async"])?v.space_before_token=!0:l==="TK_RESERVED"&&o.last_text==="default"&&k==="export"?v.space_before_token=!0:y():l==="TK_OPERATOR"||o.last_text==="="?v.space_before_token=!0:!o.multiline_frame&&(et(o.mode)||nt(o.mode))||y()),(l==="TK_COMMA"||l==="TK_START_EXPR"||l==="TK_EQUALS"||l==="TK_OPERATOR")&&(ht()||d()),s.type==="TK_RESERVED"&&n(s.text,["function","get","set"])){p();o.last_word=s.text;return}w="NONE";l==="TK_END_BLOCK"?s.type==="TK_RESERVED"&&n(s.text,["else","catch","finally"])?a.brace_style==="expand"||a.brace_style==="end-expand"||a.brace_style==="none"&&s.wanted_newline?w="NEWLINE":(w="SPACE",v.space_before_token=!0):w="NEWLINE":l==="TK_SEMICOLON"&&o.mode===t.BlockStatement?w="NEWLINE":l==="TK_SEMICOLON"&&et(o.mode)?w="SPACE":l==="TK_STRING"?w="NEWLINE":l==="TK_RESERVED"||l==="TK_WORD"||o.last_text==="*"&&k==="function"?w="SPACE":l==="TK_START_BLOCK"?w="NEWLINE":l==="TK_END_EXPR"&&(v.space_before_token=!0,w="NEWLINE");s.type==="TK_RESERVED"&&n(s.text,tt.line_starters)&&o.last_text!==")"&&(w=o.last_text==="else"||o.last_text==="export"?"SPACE":"NEWLINE");s.type==="TK_RESERVED"&&n(s.text,["else","catch","finally"])?l!=="TK_END_BLOCK"||a.brace_style==="expand"||a.brace_style==="end-expand"||a.brace_style==="none"&&s.wanted_newline?y():(v.trim(!0),r=v.current_line,r.last()!=="}"&&y(),v.space_before_token=!0):w==="NEWLINE"?l==="TK_RESERVED"&&ct(o.last_text)?v.space_before_token=!0:l!=="TK_END_EXPR"?l==="TK_START_EXPR"&&s.type==="TK_RESERVED"&&n(s.text,["var","let","const"])||o.last_text===":"||(s.type==="TK_RESERVED"&&s.text==="if"&&o.last_text==="else"?v.space_before_token=!0:y()):s.type==="TK_RESERVED"&&n(s.text,tt.line_starters)&&o.last_text!==")"&&y():o.multiline_frame&&nt(o.mode)&&o.last_text===","&&k==="}"?y():w==="SPACE"&&(v.space_before_token=!0);p();o.last_word=s.text;s.type==="TK_RESERVED"&&s.text==="do"&&(o.do_block=!0);s.type==="TK_RESERVED"&&s.text==="if"&&(o.if_block=!0)}function oi(){for(rt()&&(v.space_before_token=!1);o.mode===t.Statement&&!o.if_block&&!o.do_block;)g();p()}function si(){rt()?v.space_before_token=!0:l==="TK_RESERVED"||l==="TK_WORD"?v.space_before_token=!0:l==="TK_COMMA"||l==="TK_START_EXPR"||l==="TK_EQUALS"||l==="TK_OPERATOR"?ht()||d():y();p()}function hi(){rt();o.declaration_statement&&(o.declaration_assignment=!0);v.space_before_token=!0;p();v.space_before_token=!0}function ci(){if(o.declaration_statement){et(o.parent.mode)&&(o.declaration_assignment=!1);p();o.declaration_assignment?(o.declaration_assignment=!1,y(!1,!0)):(v.space_before_token=!0,a.comma_first&&d());return}p();o.mode===t.ObjectLiteral||o.mode===t.Statement&&o.parent.mode===t.ObjectLiteral?(o.mode===t.Statement&&g(),y()):(v.space_before_token=!0,a.comma_first&&d())}function li(){if(rt(),l==="TK_RESERVED"&&ct(o.last_text)){v.space_before_token=!0;p();return}if(s.text==="*"&&l==="TK_DOT"){p();return}if(s.text===":"&&o.in_case){o.case_body=!0;ft();p();y();o.in_case=!1;return}if(s.text==="::"){p();return}l==="TK_OPERATOR"&&d();var i=!0,r=!0;n(s.text,["--","++","!","~"])||n(s.text,["-","+"])&&(n(l,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||n(o.last_text,tt.line_starters)||o.last_text===",")?(i=!1,r=!1,s.wanted_newline&&(s.text==="--"||s.text==="++")&&y(!1,!0),o.last_text===";"&&et(o.mode)&&(i=!0),l==="TK_RESERVED"?i=!0:l==="TK_END_EXPR"?i=!(o.last_text==="]"&&(s.text==="--"||s.text==="++")):l==="TK_OPERATOR"&&(i=n(s.text,["--","-","++","+"])&&n(o.last_text,["--","-","++","+"]),n(s.text,["+","-"])&&n(o.last_text,["--","++"])&&(r=!0)),(o.mode===t.BlockStatement||o.mode===t.Statement)&&(o.last_text==="{"||o.last_text===";")&&y()):s.text===":"?o.ternary_depth===0?i=!1:o.ternary_depth-=1:s.text==="?"?o.ternary_depth+=1:s.text==="*"&&l==="TK_RESERVED"&&o.last_text==="function"&&(i=!1,r=!1);v.space_before_token=v.space_before_token||i;p();v.space_before_token=r}function ai(){if(v.raw){v.add_raw_token(s);s.directives&&s.directives.preserve==="end"&&(a.test_output_raw||(v.raw=!1));return}if(s.directives){y(!1,!0);p();s.directives.preserve==="start"&&(v.raw=!0);y(!1,!0);return}if(!i.newline.test(s.text)&&!s.wanted_newline){v.space_before_token=!0;p();v.space_before_token=!0;return}var n=gt(s.text),t,r=!1,u=!1,f=s.whitespace_before,o=f.length;for(y(!1,!0),n.length>1&&(ti(n.slice(1),"*")?r=!0:ii(n.slice(1),f)&&(u=!0)),p(n[0]),t=1;t<n.length;t++)y(!1,!0),r?p(" "+e(n[t])):u&&n[t].length>o?p(n[t].substring(o)):v.add_token(n[t]);y(!1,!0)}function vi(){s.wanted_newline?y(!1,!0):v.trim(!0);v.space_before_token=!0;p();y(!1,!0)}function yi(){rt();l==="TK_RESERVED"&&ct(o.last_text)?v.space_before_token=!0:d(o.last_text===")"&&a.break_chained_methods);p()}function pi(){p();s.text[s.text.length-1]==="\n"&&y()}function wi(){while(o.mode===t.Statement)g()}var v,at=[],vt,tt,s,l,k,ot,o,b,st,w,yt,a,pt="",ut;for(yt={TK_START_EXPR:ri,TK_END_EXPR:ui,TK_START_BLOCK:fi,TK_END_BLOCK:ei,TK_WORD:dt,TK_RESERVED:dt,TK_SEMICOLON:oi,TK_STRING:si,TK_EQUALS:hi,TK_OPERATOR:li,TK_COMMA:ci,TK_BLOCK_COMMENT:ai,TK_COMMENT:vi,TK_DOT:yi,TK_UNKNOWN:pi,TK_EOF:wi},u=u?u:{},a={},u.braces_on_own_line!==undefined&&(a.brace_style=u.braces_on_own_line?"expand":"collapse"),a.brace_style=u.brace_style?u.brace_style:a.brace_style?a.brace_style:"collapse",a.brace_style==="expand-strict"&&(a.brace_style="expand"),a.indent_size=u.indent_size?parseInt(u.indent_size,10):4,a.indent_char=u.indent_char?u.indent_char:" ",a.eol=u.eol?u.eol:"\n",a.preserve_newlines=u.preserve_newlines===undefined?!0:u.preserve_newlines,a.break_chained_methods=u.break_chained_methods===undefined?!1:u.break_chained_methods,a.max_preserve_newlines=u.max_preserve_newlines===undefined?0:parseInt(u.max_preserve_newlines,10),a.space_in_paren=u.space_in_paren===undefined?!1:u.space_in_paren,a.space_in_empty_paren=u.space_in_empty_paren===undefined?!1:u.space_in_empty_paren,a.jslint_happy=u.jslint_happy===undefined?!1:u.jslint_happy,a.space_after_anon_function=u.space_after_anon_function===undefined?!1:u.space_after_anon_function,a.keep_array_indentation=u.keep_array_indentation===undefined?!1:u.keep_array_indentation,a.space_before_conditional=u.space_before_conditional===undefined?!0:u.space_before_conditional,a.unescape_strings=u.unescape_strings===undefined?!1:u.unescape_strings,a.wrap_line_length=u.wrap_line_length===undefined?0:parseInt(u.wrap_line_length,10),a.e4x=u.e4x===undefined?!1:u.e4x,a.end_with_newline=u.end_with_newline===undefined?!1:u.end_with_newline,a.comma_first=u.comma_first===undefined?!1:u.comma_first,a.test_output_raw=u.test_output_raw===undefined?!1:u.test_output_raw,a.jslint_happy&&(a.space_after_anon_function=!0),u.indent_with_tabs&&(a.indent_char="\t",a.indent_size=1),a.eol=a.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),ot="";a.indent_size>0;)ot+=a.indent_char,a.indent_size-=1;if(ut=0,r&&r.length){while(r.charAt(ut)===" "||r.charAt(ut)==="\t")pt+=r.charAt(ut),ut+=1;r=r.substring(ut)}l="TK_START_BLOCK";k="";v=new h(ot,pt);v.raw=a.test_output_raw;st=[];it(t.BlockStatement);this.beautify=function(){var n,t,i;for(tt=new c(r,a,ot),at=tt.tokenize(),vt=0;n=lt();){for(i=0;i<n.comments_before.length;i++)bt(n.comments_before[i]);bt(n);k=o.last_text;l=n.type;o.last_text=n.text;vt+=1}return t=v.get_code(),a.end_with_newline&&(t+="\n"),a.eol!="\n"&&(t=t.replace(/[\n]/g,a.eol)),t}}function s(n){var i=0,r=-1,t=[],u=!0;this.set_indent=function(t){i=n.baseIndentLength+t*n.indent_length;r=t};this.get_character_count=function(){return i};this.is_empty=function(){return u};this.last=function(){return this._empty?null:t[t.length-1]};this.push=function(n){t.push(n);i+=n.length;u=!1};this.pop=function(){var n=null;return u||(n=t.pop(),i-=n.length,u=t.length===0),n};this.remove_indent=function(){r>0&&(r-=1,i-=n.indent_length)};this.trim=function(){while(this.last()===" "){var n=t.pop();i-=1}u=t.length===0};this.toString=function(){var i="";return this._empty||(r>=0&&(i=n.indent_cache[r]),i+=t.join("")),i}}function h(n,i){i=i||"";this.indent_cache=[i];this.baseIndentLength=i.length;this.indent_length=n.length;this.raw=!1;var r=[];this.baseIndentString=i;this.indent_string=n;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);r.push(this.current_line)};this.add_outputline();this.get_line_number=function(){return r.length};this.add_new_line=function(n){return this.get_line_number()===1&&this.just_added_newline()?!1:n||!this.just_added_newline()?(this.raw||this.add_outputline(),!0):!1};this.get_code=function(){return r.join("\n").replace(/[\r\n\t ]+$/,"")};this.set_indent=function(n){if(r.length>1){while(n>=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(n),!0}return this.current_line.set_indent(0),!1};this.add_raw_token=function(n){for(var t=0;t<n.newlines;t++)this.add_outputline();this.current_line.push(n.whitespace_before);this.current_line.push(n.text);this.space_before_token=!1};this.add_token=function(n){this.add_space_before_token();this.current_line.push(n)};this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" ");this.space_before_token=!1};this.remove_redundant_indentation=function(n){if(!n.multiline_frame&&n.mode!==t.ForInitializer&&n.mode!==t.Conditional)for(var i=n.start_line_index,u=r.length;i<u;)r[i].remove_indent(),i++};this.trim=function(t){for(t=t===undefined?!1:t,this.current_line.trim(n,i);t&&r.length>1&&this.current_line.is_empty();)r.pop(),this.current_line=r[r.length-1],this.current_line.trim();this.previous_line=r.length>1?r[r.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(r.length===1)return!0;var n=r[r.length-2];return n.is_empty()}return!1}}function c(t,r){function rt(n){var i,t;if(!n.match(it))return null;for(i={},v.lastIndex=0,t=v.exec(n);t;)i[t[1]]=t[2],t=v.exec(n);return i}function d(){var d,at=[],it,v,et,yt,ot,pt,ii,wt,kt,lt,dt;if(h=0,c="",e>=o)return["","TK_EOF"];for(it=s.length?s[s.length-1]:new u("TK_START_BLOCK","{"),v=t.charAt(e),e+=1;n(v,g);){if(i.newline.test(v)?v==="\n"&&t.charAt(e-2)==="\r"||(h+=1,at=[]):at.push(v),e>=o)return["","TK_EOF"];v=t.charAt(e);e+=1}if(at.length&&(c=at.join("")),a.test(v)){var vt=!0,bt=!0,gt=a;for(v==="0"&&e<o&&/[Xx]/.test(t.charAt(e))?(vt=!1,bt=!1,v+=t.charAt(e),e+=1,gt=nt):(v="",e-=1);e<o&>.test(t.charAt(e));)v+=t.charAt(e),e+=1,vt&&e<o&&t.charAt(e)==="."&&(v+=t.charAt(e),e+=1,vt=!1),bt&&e<o&&/[Ee]/.test(t.charAt(e))&&(v+=t.charAt(e),e+=1,e<o&&/[+-]/.test(t.charAt(e))&&(v+=t.charAt(e),e+=1),bt=!1,vt=!1);return[v,"TK_WORD"]}if(i.isIdentifierStart(t.charCodeAt(e-1))){if(e<o)while(i.isIdentifierChar(t.charCodeAt(e)))if(v+=t.charAt(e),e+=1,e===o)break;return!(it.type==="TK_DOT"||it.type==="TK_RESERVED"&&n(it.text,["set","get"]))&&n(v,tt)?v==="in"?[v,"TK_OPERATOR"]:[v,"TK_RESERVED"]:[v,"TK_WORD"]}if(v==="("||v==="[")return[v,"TK_START_EXPR"];if(v===")"||v==="]")return[v,"TK_END_EXPR"];if(v==="{")return[v,"TK_START_BLOCK"];if(v==="}")return[v,"TK_END_BLOCK"];if(v===";")return[v,"TK_SEMICOLON"];if(v==="/"){if(et="",t.charAt(e)==="*")return e+=1,p.lastIndex=e,ot=p.exec(t),et="/*"+ot[0],e+=ot[0].length,yt=rt(et),yt&&yt.ignore==="start"&&(b.lastIndex=e,ot=b.exec(t),et+=ot[0],e+=ot[0].length),et=et.replace(i.lineBreak,"\n"),[et,"TK_BLOCK_COMMENT",yt];if(t.charAt(e)==="/")return e+=1,w.lastIndex=e,ot=w.exec(t),et="//"+ot[0],e+=ot[0].length,[et,"TK_COMMENT"]}if(v==="`"||v==="'"||v==='"'||(v==="/"||r.e4x&&v==="<"&&t.slice(e-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&(it.type==="TK_RESERVED"&&n(it.text,["return","case","throw","else","do","typeof","yield"])||it.type==="TK_END_EXPR"&&it.text===")"&&it.parent&&it.parent.type==="TK_RESERVED"&&n(it.parent.text,["if","while","for"])||n(it.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var st=v,ht=!1,ni=!1;if(d=v,st==="/")for(pt=!1;e<o&&(ht||pt||t.charAt(e)!==st)&&!i.newline.test(t.charAt(e));)d+=t.charAt(e),ht?ht=!1:(ht=t.charAt(e)==="\\",t.charAt(e)==="["?pt=!0:t.charAt(e)==="]"&&(pt=!1)),e+=1;else if(r.e4x&&st==="<"){var ti=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,ct=t.slice(e-1),ft=ti.exec(ct);if(ft&&ft.index===0){for(ii=ft[2],wt=0;ft;){var ui=!!ft[1],ri=ft[2],fi=!!ft[ft.length-1]||ri.slice(0,8)==="![CDATA[";if(ri!==ii||fi||(ui?--wt:++wt),wt<=0)break;ft=ti.exec(ct)}return kt=ft?ft.index+ft[0].length:ct.length,ct=ct.slice(0,kt),e+=kt-1,ct=ct.replace(i.lineBreak,"\n"),[ct,"TK_STRING"]}}else while(e<o&&(ht||t.charAt(e)!==st&&(st==="`"||!i.newline.test(t.charAt(e)))))(ht||st==="`")&&i.newline.test(t.charAt(e))?(t.charAt(e)==="\r"&&t.charAt(e+1)==="\n"&&(e+=1),d+="\n"):d+=t.charAt(e),ht?((t.charAt(e)==="x"||t.charAt(e)==="u")&&(ni=!0),ht=!1):ht=t.charAt(e)==="\\",e+=1;if(ni&&r.unescape_strings&&(d=ut(d)),e<o&&t.charAt(e)===st&&(d+=st,e+=1,st==="/"))while(e<o&&i.isIdentifierStart(t.charCodeAt(e)))d+=t.charAt(e),e+=1;return[d,"TK_STRING"]}if(v==="#"){if(s.length===0&&t.charAt(e)==="!"){for(d=v;e<o&&v!=="\n";)v=t.charAt(e),d+=v,e+=1;return[f(d)+"\n","TK_UNKNOWN"]}if(lt="#",e<o&&a.test(t.charAt(e))){do v=t.charAt(e),lt+=v,e+=1;while(e<o&&v!=="#"&&v!=="=");return v==="#"||(t.charAt(e)==="["&&t.charAt(e+1)==="]"?(lt+="[]",e+=2):t.charAt(e)==="{"&&t.charAt(e+1)==="}"&&(lt+="{}",e+=2)),[lt,"TK_WORD"]}}if(v==="<"&&(t.charAt(e)==="?"||t.charAt(e)==="%")&&(k.lastIndex=e-1,dt=k.exec(t),dt))return v=dt[0],e+=v.length-1,v=v.replace(i.lineBreak,"\n"),[v,"TK_STRING"];if(v==="<"&&t.substring(e-1,e+3)==="<!--"){for(e+=3,v="<!--";!i.newline.test(t.charAt(e))&&e<o;)v+=t.charAt(e),e++;return l=!0,[v,"TK_COMMENT"]}if(v==="-"&&l&&t.substring(e-1,e+2)==="-->")return l=!1,e+=2,["-->","TK_COMMENT"];if(v===".")return[v,"TK_DOT"];if(n(v,y)){while(e<o&&n(v+t.charAt(e),y))if(v+=t.charAt(e),e+=1,e>=o)break;return v===","?[v,"TK_COMMA"]:v==="="?[v,"TK_EQUALS"]:[v,"TK_OPERATOR"]}return[v,"TK_UNKNOWN"]}function ut(n){for(var e=!1,u="",r=0,f="",t=0,i;e||r<n.length;)if(i=n.charAt(r),r++,e){if(e=!1,i==="x")f=n.substr(r,2),r+=2;else if(i==="u")f=n.substr(r,4),r+=4;else{u+="\\"+i;continue}if(!f.match(/^[0123456789abcdefABCDEF]+$/))return n;if(t=parseInt(f,16),t>=0&&t<32){u+=i==="x"?"\\x"+f:"\\u"+f;continue}else if(t===34||t===39||t===92)u+="\\"+String.fromCharCode(t);else{if(i==="x"&&t>126&&t<=255)return n;u+=String.fromCharCode(t)}}else i==="\\"?e=!0:u+=i;return u}var g="\n\r\t ".split(""),a=/[0-9]/,nt=/[0123456789abcdefABCDEF]/,y=("+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>"+" <%= <% %> <?= <? ?>").split(" ");this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var tt=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),p=/([\s\S]*?)((?:\*\/)|$)/g,w=/([^\n\r\u2028\u2029]*)/g,it=/\/\* beautify( \w+[:]\w+)+ \*\//g,v=/ (\w+)[:](\w+)/g,b=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,k=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g,h,c,l,s,e,o;this.tokenize=function(){o=t.length;e=0;l=!1;s=[];for(var n,f,r,i=null,v=[],a=[];!(f&&f.type==="TK_EOF");){for(r=d(),n=new u(r[1],r[0],h,c);n.type==="TK_COMMENT"||n.type==="TK_BLOCK_COMMENT"||n.type==="TK_UNKNOWN";)n.type==="TK_BLOCK_COMMENT"&&(n.directives=r[2]),a.push(n),r=d(),n=new u(r[1],r[0],h,c);a.length&&(n.comments_before=a,a=[]);n.type==="TK_START_BLOCK"||n.type==="TK_START_EXPR"?(n.parent=f,v.push(i),i=n):(n.type==="TK_END_BLOCK"||n.type==="TK_END_EXPR")&&i&&(n.text==="]"&&i.text==="["||n.text===")"&&i.text==="("||n.text==="}"&&i.text==="{")&&(n.parent=i.parent,i=v.pop());s.push(n);f=n}return s}}var i={},t,u;(function(n){var t="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i=new RegExp("["+t+"]"),r=new RegExp("["+t+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"),u=n.newline=/[\n\r\u2028\u2029]/,f=n.lineBreak=/\r\n|[\n\r\u2028\u2029]/g,e=n.isIdentifierStart=function(n){return n<65?n===36:n<91?!0:n<97?n===95:n<123?!0:n>=170&&i.test(String.fromCharCode(n))},o=n.isIdentifierChar=function(n){return n<48?n===36:n<58?!0:n<65?!1:n<91?!0:n<97?n===95:n<123?!0:n>=170&&r.test(String.fromCharCode(n))}})(i);t={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};u=function(n,t,i,r){this.type=n;this.text=t;this.comments_before=[];this.newlines=i||0;this.wanted_newline=i>0;this.whitespace_before=r||"";this.parent=null;this.directives=null};typeof define=="function"&&define.amd?define([],function(){return{js_beautify:r}}):typeof exports!="undefined"?exports.js_beautify=r:typeof window!="undefined"?window.js_beautify=r:typeof global!="undefined"&&(global.js_beautify=r)})(),function(){function i(n){return n.replace(/^\s+/g,"")}function t(n){return n.replace(/\s+$/g,"")}function n(n,r,u,f){function lt(){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=tt,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:st,in_array:function(n,t){for(var i=0;i<t.length;i++)if(n===t[i])return!0;return!1}},this.is_whitespace=function(n){for(var t=0;t<n.length;n++)if(!this.Utils.in_array(n.charAt(t),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var n="";if(n=this.input.charAt(this.pos),this.Utils.in_array(n,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(n,this.Utils.whitespace);)b&&n==="\n"&&this.newlines<=ut&&(this.newlines+=1),this.pos++,n=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(n){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,n),this.print_indentation(n)):(this.line_char_count++,n.push(" "))},this.get_content=function(){for(var i="",n=[],t;this.input.charAt(this.pos)!=="<";){if(this.pos>=this.input.length)return n.length?n.join(""):["","TK_EOF"];if(this.traverse_whitespace()){this.space_or_wrap(n);continue}if(o)if(t=this.input.substr(this.pos,3),t==="{{#"||t==="{{/")break;else{if(t==="{{!")return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if(this.input.substr(this.pos,2)==="{{"&&this.get_tag(!0)==="{{else}}")break}i=this.input.charAt(this.pos);this.pos++;this.line_char_count++;n.push(i)}return n.length?n.join(""):""},this.get_contents_to=function(n){var i,t;if(this.pos===this.input.length)return["","TK_EOF"];var r="",u=new RegExp("<\/"+n+"\\s*>","igm");return u.lastIndex=this.pos,i=u.exec(this.input),t=i?i.index:this.input.length,this.pos<t&&(r=this.input.substring(this.pos,t),this.pos=t),r},this.record_tag=function(n){this.tags[n+"count"]?(this.tags[n+"count"]++,this.tags[n+this.tags[n+"count"]]=this.indent_level):(this.tags[n+"count"]=1,this.tags[n+this.tags[n+"count"]]=this.indent_level);this.tags[n+this.tags[n+"count"]+"parent"]=this.tags.parent;this.tags.parent=n+this.tags[n+"count"]},this.retrieve_tag=function(n){if(this.tags[n+"count"]){for(var t=this.tags.parent;t;){if(n+this.tags[n+"count"]===t)break;t=this.tags[t+"parent"]}t&&(this.indent_level=this.tags[n+this.tags[n+"count"]],this.tags.parent=this.tags[t+"parent"]);delete this.tags[n+this.tags[n+"count"]+"parent"];delete this.tags[n+this.tags[n+"count"]];this.tags[n+"count"]===1?delete this.tags[n+"count"]:this.tags[n+"count"]--}},this.indent_to_tag=function(n){if(this.tags[n+"count"]){for(var t=this.tags.parent;t;){if(n+this.tags[n+"count"]===t)break;t=this.tags[t+"parent"]}t&&(this.indent_level=this.tags[n+this.tags[n+"count"]])}},this.get_tag=function(n){var i="",t=[],l="",f=!1,a=!0,s,d,e,v=this.pos,w=this.line_char_count,c,h,r,b,k,u;n=n!==undefined?n:!1;do{if(this.pos>=this.input.length)return n&&(this.pos=v,this.line_char_count=w),t.length?t.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace)){f=!0;continue}if((i==="'"||i==='"')&&(i+=this.get_unformatted(i),f=!0),i==="="&&(f=!1),t.length&&t[t.length-1]!=="="&&i!==">"&&f){if(this.space_or_wrap(t),f=!1,!a&&ft==="force"&&i!=="/")for(this.print_newline(!0,t),this.print_indentation(t),c=0;c<et;c++)t.push(y);for(h=0;h<t.length;h++)if(t[h]===" "){a=!1;break}}if(o&&e==="<"&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),t.length&&t[t.length-1]!==" "&&t[t.length-1]!=="<"&&(i=" "+i),f=!0),i!=="<"||e||(s=this.pos-1,e="<"),o&&!e&&t.length>=2&&t[t.length-1]==="{"&&t[t.length-2]==="{"&&(s=i==="#"||i==="/"||i==="!"?this.pos-3:this.pos-2,e="{"),this.line_char_count++,t.push(i),t[1]&&(t[1]==="!"||t[1]==="?"||t[1]==="%")){t=[this.get_comment(s)];break}if(o&&t[1]&&t[1]==="{"&&t[2]&&t[2]==="!"){t=[this.get_comment(s)];break}if(o&&e==="{"&&t.length>2&&t[t.length-2]==="}"&&t[t.length-1]==="}")break}while(i!==">");return r=t.join(""),b=r.indexOf(" ")!==-1?r.indexOf(" "):r.charAt(0)==="{"?r.indexOf("}"):r.indexOf(">"),k=r.charAt(0)!=="<"&&o?r.charAt(2)==="#"?3:2:1,u=r.substring(k,b).toLowerCase(),r.charAt(r.length-2)==="/"||this.Utils.in_array(u,this.Utils.single_token)?n||(this.tag_type="SINGLE"):o&&r.charAt(0)==="{"&&u==="else"?n||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(u,p)?(l=this.get_unformatted("<\/"+u+">",r),t.push(l),d=this.pos-1,this.tag_type="SINGLE"):u==="script"&&(r.search("type")===-1||r.search("type")>-1&&r.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/)>-1)?n||(this.record_tag(u),this.tag_type="SCRIPT"):u==="style"&&(r.search("type")===-1||r.search("type")>-1&&r.search("text/css")>-1)?n||(this.record_tag(u),this.tag_type="STYLE"):u.charAt(0)==="!"?n||(this.tag_type="SINGLE",this.traverse_whitespace()):n||(u.charAt(0)==="/"?(this.retrieve_tag(u.substring(1)),this.tag_type="END"):(this.record_tag(u),u.toLowerCase()!=="html"&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(t),this.Utils.in_array(u,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&this.output[this.output.length-2]!=="\n"&&this.print_newline(!0,this.output))),n&&(this.pos=v,this.line_char_count=w),t.join("")},this.get_comment=function(n){var t="",i=">",r=!1;for(this.pos=n,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length;){if(t+=input_char,t.charAt(t.length-1)===i.charAt(i.length-1)&&t.indexOf(i)!==-1)break;!r&&t.length<10&&(t.indexOf("<![if")===0?(i="<![endif]>",r=!0):t.indexOf("<![cdata[")===0?(i="]\]>",r=!0):t.indexOf("<![")===0?(i="]>",r=!0):t.indexOf("<!--")===0?(i="-->",r=!0):t.indexOf("{{!")===0?(i="}}",r=!0):t.indexOf("<?")===0?(i="?>",r=!0):t.indexOf("<%")===0&&(i="%>",r=!0));input_char=this.input.charAt(this.pos);this.pos++}return t},this.get_unformatted=function(n,t){if(t&&t.toLowerCase().indexOf(n)!==-1)return"";var r="",i="",u=0,f=!0;do{if(this.pos>=this.input.length)return i;if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace)){if(!f){this.line_char_count--;continue}if(r==="\n"||r==="\r"){i+="\n";this.line_char_count=0;continue}}i+=r;this.line_char_count++;f=!0;o&&r==="{"&&i.length&&i.charAt(i.length-2)==="{"&&(i+=this.get_unformatted("}}"),u=i.length)}while(i.toLowerCase().indexOf(n,u)===-1);return i},this.get_token=function(){var n,t,i;return this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"?(t=this.last_token.substr(7),n=this.get_contents_to(t),typeof n!="string")?n:[n,"TK_"+t]:this.current_mode==="CONTENT"?(n=this.get_content(),typeof n!="string"?n:[n,"TK_CONTENT"]):this.current_mode==="TAG"?(n=this.get_tag(),typeof n!="string"?n:(i="TK_TAG_"+this.tag_type,[n,i])):void 0},this.get_full_indent=function(n){return(n=this.indent_level+n||0,n<1)?"":Array(n+1).join(this.indent_string)},this.is_unformatted=function(n,t){if(!this.Utils.in_array(n,t))return!1;if(n.toLowerCase()!=="a"||!this.Utils.in_array("a",t))return!0;var r=this.get_tag(!0),i=(r||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!i||this.Utils.in_array(i,t)?!0:!1},this.printer=function(n,r,u,f,e){this.input=n||"";this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n");this.output=[];this.indent_character=r;this.indent_string="";this.indent_size=u;this.brace_style=e;this.indent_level=0;this.wrap_line_length=f;this.line_char_count=0;for(var o=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(n,i){(this.line_char_count=0,i&&i.length)&&(n||i[i.length-1]!=="\n")&&(i[i.length-1]!=="\n"&&(i[i.length-1]=t(i[i.length-1])),i.push("\n"))};this.print_indentation=function(n){for(var t=0;t<this.indent_level;t++)n.push(this.indent_string),this.line_char_count+=this.indent_string.length};this.print_token=function(n){(!this.is_whitespace(n)||this.output.length)&&((n||n!=="")&&this.output.length&&this.output[this.output.length-1]==="\n"&&(this.print_indentation(this.output),n=i(n)),this.print_token_raw(n))};this.print_token_raw=function(n){this.newlines>0&&(n=t(n));n&&n!==""&&(n.length>1&&n.charAt(n.length-1)==="\n"?(this.output.push(n.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(n));for(var i=0;i<this.newlines;i++)this.print_newline(i>0,this.output);this.newlines=0};this.indent=function(){this.indent_level++};this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var e,tt,h,y,it,rt,p,b,ut,o,ft,et,ot,st,c,k,ht,l,d,s,w,a,g,nt,ct,v;for(r=r||{},(r.wrap_line_length===undefined||parseInt(r.wrap_line_length,10)===0)&&r.max_char!==undefined&&parseInt(r.max_char,10)!==0&&(r.wrap_line_length=r.max_char),tt=r.indent_inner_html===undefined?!1:r.indent_inner_html,h=r.indent_size===undefined?4:parseInt(r.indent_size,10),y=r.indent_char===undefined?" ":r.indent_char,rt=r.brace_style===undefined?"collapse":r.brace_style,it=parseInt(r.wrap_line_length,10)===0?32786:parseInt(r.wrap_line_length||250,10),p=r.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"],b=r.preserve_newlines===undefined?!0:r.preserve_newlines,ut=b?isNaN(parseInt(r.max_preserve_newlines,10))?32786:parseInt(r.max_preserve_newlines,10):0,o=r.indent_handlebars===undefined?!1:r.indent_handlebars,ft=r.wrap_attributes===undefined?"auto":r.wrap_attributes,et=r.wrap_attributes_indent_size===undefined?h:parseInt(r.wrap_attributes_indent_size,10)||h,ot=r.end_with_newline===undefined?!1:r.end_with_newline,st=typeof r.extra_liners=="object"&&r.extra_liners?r.extra_liners.concat():typeof r.extra_liners=="string"?r.extra_liners.split(","):"head,body,/html".split(","),c=r.eol?r.eol:"\n",r.indent_with_tabs&&(y="\t",h=1),c=c.replace(/\\r/,"\r").replace(/\\n/,"\n"),e=new lt,e.printer(n,y,h,it,rt);;){if(k=e.get_token(),e.token_text=k[0],e.token_type=k[1],e.token_type==="TK_EOF")break;switch(e.token_type){case"TK_TAG_START":e.print_newline(!1,e.output);e.print_token(e.token_text);e.indent_content&&(e.indent(),e.indent_content=!1);e.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":e.print_newline(!1,e.output);e.print_token(e.token_text);e.current_mode="CONTENT";break;case"TK_TAG_END":e.last_token==="TK_CONTENT"&&e.last_text===""&&(ht=e.token_text.match(/\w+/)[0],l=null,e.output.length&&(l=e.output[e.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),l!==null&&(l[1]===ht||e.Utils.in_array(l[1],p))||e.print_newline(!1,e.output));e.print_token(e.token_text);e.current_mode="CONTENT";break;case"TK_TAG_SINGLE":d=e.token_text.match(/^\s*<([a-z-]+)/i);d&&e.Utils.in_array(d[1],p)||e.print_newline(!1,e.output);e.print_token(e.token_text);e.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":e.print_token(e.token_text);e.indent_content&&(e.indent(),e.indent_content=!1);e.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":e.print_token(e.token_text);e.current_mode="TAG";break;case"TK_CONTENT":e.print_token(e.token_text);e.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(e.token_text!==""){if(e.print_newline(!1,e.output),s=e.token_text,a=1,e.token_type==="TK_SCRIPT"?w=typeof u=="function"&&u:e.token_type==="TK_STYLE"&&(w=typeof f=="function"&&f),r.indent_scripts==="keep"?a=0:r.indent_scripts==="separate"&&(a=-e.indent_level),g=e.get_full_indent(a),w)nt=function(){this.eol="\n"},nt.prototype=r,ct=new nt,s=w(s.replace(/^\s*/,g),ct);else{var at=s.match(/^\s*/)[0],vt=at.match(/[^\n\r]*$/)[0].split(e.indent_string).length-1,yt=e.get_full_indent(a-vt);s=s.replace(/^\s*/,g).replace(/\r\n|\r|\n/g,"\n"+yt).replace(/\s+$/,"")}s&&(e.print_token_raw(s),e.print_newline(!0,e.output))}e.current_mode="TAG";break;default:e.token_text!==""&&e.print_token(e.token_text)}e.last_token=e.token_type;e.last_text=e.token_text}return v=e.output.join("").replace(/[\r\n\t ]+$/,""),ot&&(v+="\n"),c!="\n"&&(v=v.replace(/[\n]/g,c)),v}if(typeof define=="function"&&define.amd)define(["require","./beautify","./beautify-css"],function(t){var i=t("./beautify"),r=t("./beautify-css");return{html_beautify:function(t,u){return n(t,u,i.js_beautify,r.css_beautify)}}});else if(typeof exports!="undefined"){var r=require("./beautify.js"),u=require("./beautify-css.js");exports.html_beautify=function(t,i){return n(t,i,r.js_beautify,u.css_beautify)}}else typeof window!="undefined"?window.html_beautify=function(t,i){return n(t,i,window.js_beautify,window.css_beautify)}:typeof global!="undefined"&&(global.html_beautify=function(t,i){return n(t,i,global.js_beautify,global.css_beautify)})}()
|
1
|
+
!function(){function t(t,e){for(var n=0;n<e.length;n+=1)if(e[n]===t)return!0;return!1}function e(t){return t.replace(/^\s+|\s+$/g,"")}function n(t){return t.replace(/^\s+/g,"")}function i(t,e){"use strict";return new r(t,e).beautify()}function r(i,r){"use strict";function s(t,e){var n=0;return t&&(n=t.indentation_level,!z.just_added_newline()&&t.line_indent_level>n&&(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;n<e;n+=1)p(n>0);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<e;n+=1)p(!0)}F=t,tt[F.type]()}function c(t){t=t.replace(/\x0d/g,"");for(var e=[],n=t.indexOf("\n");-1!==n;)e.push(t.substring(0,n)),t=t.substring(n+1),n=t.indexOf("\n");return t.length&&e.push(t),e}function u(t){if(t=void 0!==t&&t,!z.just_added_newline())if(et.preserve_newlines&&F.wanted_newline||t)p(!1,!0);else if(et.wrap_line_length){var e=z.current_line.get_character_count()+F.text.length+(z.space_before_token?1:0);e>=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<t.length;i++){if(e(t[i]).charAt(0)!==n)return!1}return!0}function y(t,e){for(var n,i=0,r=t.length;i<r;i++)if((n=t[i])&&0!==n.indexOf(e))return!1;return!0}function v(e){return t(e,["case","return","do","if","throw","else"])}function A(t){var e=G+(t||0);return e<0||e>=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<e.length;t++)p(!1,!0),i?d(" "+n(e[t])):r&&e[t].length>_?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;n<t.comments_before.length;n++)h(t.comments_before[n]);h(t),Q=q.last_text,$=t.type,q.last_text=t.text,G+=1}return e=z.get_code(),et.end_with_newline&&(e+="\n"),"\n"!=et.eol&&(e=e.replace(/[\n]/g,et.eol)),e}}function s(t){var e=0,n=-1,i=[],r=!0;this.set_indent=function(i){e=t.baseIndentLength+i*t.indent_length,n=i},this.get_character_count=function(){return e},this.is_empty=function(){return r},this.last=function(){return this._empty?null:i[i.length-1]},this.push=function(t){i.push(t),e+=t.length,r=!1},this.pop=function(){var t=null;return r||(t=i.pop(),e-=t.length,r=0===i.length),t},this.remove_indent=function(){n>0&&(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;e<t.newlines;e++)this.add_outputline();this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1},this.add_token=function(t){this.add_space_before_token(),this.current_line.push(t)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(t){if(!t.multiline_frame&&t.mode!==l.ForInitializer&&t.mode!==l.Conditional)for(var e=t.start_line_index,i=n.length;e<i;)n[e].remove_indent(),e++},this.trim=function(i){for(i=void 0!==i&&i,this.current_line.trim(t,e);i&&n.length>1&&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<x&&/[Xx]/.test(n.charAt(g))?(A=!1,k=!1,m+=n.charAt(g),g+=1,S=u):(m="",g-=1);g<x&&S.test(n.charAt(g));)m+=n.charAt(g),g+=1,A&&g<x&&"."===n.charAt(g)&&(m+=n.charAt(g),g+=1,A=!1),k&&g<x&&/[Ee]/.test(n.charAt(g))&&(m+=n.charAt(g),g+=1,g<x&&/[+-]/.test(n.charAt(g))&&(m+=n.charAt(g),g+=1),k=!1,A=!1);return[m,"TK_WORD"]}if(o.isIdentifierStart(n.charCodeAt(g-1))){if(g<x)for(;o.isIdentifierChar(n.charCodeAt(g))&&(m+=n.charAt(g),(g+=1)!==x););return"TK_DOT"===R.type||"TK_RESERVED"===R.type&&t(R.text,["set","get"])||!t(m,b)?[m,"TK_WORD"]:"in"===m?[m,"TK_OPERATOR"]:[m,"TK_RESERVED"]}if("("===m||"["===m)return[m,"TK_START_EXPR"];if(")"===m||"]"===m)return[m,"TK_END_EXPR"];if("{"===m)return[m,"TK_START_BLOCK"];if("}"===m)return[m,"TK_END_BLOCK"];if(";"===m)return[m,"TK_SEMICOLON"];if("/"===m){var O="";if("*"===n.charAt(g)){g+=1,K.lastIndex=g;var N=K.exec(n);O="/*"+N[0],g+=N[0].length;var D=s(O);return D&&"start"===D.ignore&&(y.lastIndex=g,N=y.exec(n),O+=N[0],g+=N[0].length),O=O.replace(o.lineBreak,"\n"),[O,"TK_BLOCK_COMMENT",D]}if("/"===n.charAt(g)){g+=1,w.lastIndex=g;var N=w.exec(n);return O="//"+N[0],g+=N[0].length,[O,"TK_COMMENT"]}}if("`"===m||"'"===m||'"'===m||("/"===m||i.e4x&&"<"===m&&n.slice(g-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("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<x&&(L||j||n.charAt(g)!==C)&&!o.newline.test(n.charAt(g));)r+=n.charAt(g),L?L=!1:(L="\\"===n.charAt(g),"["===n.charAt(g)?j=!0:"]"===n.charAt(g)&&(j=!1)),g+=1;else if(i.e4x&&"<"===C){var V=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/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&&(L||n.charAt(g)!==C&&("`"===C||!o.newline.test(n.charAt(g))));)(L||"`"===C)&&o.newline.test(n.charAt(g))?("\r"===n.charAt(g)&&"\n"===n.charAt(g+1)&&(g+=1),r+="\n"):r+=n.charAt(g),L?("x"!==n.charAt(g)&&"u"!==n.charAt(g)||(I=!0),L=!1):L="\\"===n.charAt(g),g+=1;if(I&&i.unescape_strings&&(r=a(r)),g<x&&n.charAt(g)===C&&(r+=C,g+=1,"/"===C))for(;g<x&&o.isIdentifierStart(n.charCodeAt(g));)r+=n.charAt(g),g+=1;return[r,"TK_STRING"]}if("#"===m){if(0===E.length&&"!"===n.charAt(g)){for(r=m;g<x&&"\n"!==m;)m=n.charAt(g),r+=m,g+=1;return[e(r)+"\n","TK_UNKNOWN"]}var F="#";if(g<x&&c.test(n.charAt(g))){do{m=n.charAt(g),F+=m,g+=1}while(g<x&&"#"!==m&&"="!==m);return"#"===m||("["===n.charAt(g)&&"]"===n.charAt(g+1)?(F+="[]",g+=2):"{"===n.charAt(g)&&"}"===n.charAt(g+1)&&(F+="{}",g+=2)),[F,"TK_WORD"]}}if("<"===m&&("?"===n.charAt(g)||"%"===n.charAt(g))){v.lastIndex=g-1;var $=v.exec(n);if($)return m=$[0],g+=m.length-1,m=m.replace(o.lineBreak,"\n"),[m,"TK_STRING"]}if("<"===m&&"\x3c!--"===n.substring(g-1,g+3)){for(g+=3,m="\x3c!--";!o.newline.test(n.charAt(g))&&g<x;)m+=n.charAt(g),g++;return T=!0,[m,"TK_COMMENT"]}if("-"===m&&T&&"--\x3e"===n.substring(g-1,g+2))return T=!1,g+=2,["--\x3e","TK_COMMENT"];if("."===m)return[m,"TK_DOT"];if(t(m,p)){for(;g<x&&t(m+n.charAt(g),p)&&(m+=n.charAt(g),!((g+=1)>=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<t.length;)if(e=t.charAt(r),r++,n){if(n=!1,"x"===e)s=t.substr(r,2),r+=2;else{if("u"!==e){i+="\\"+e;continue}s=t.substr(r,4),r+=4}if(!s.match(/^[0123456789abcdefABCDEF]+$/))return t;if((_=parseInt(s,16))>=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<e.length;n++)if(t===e[n])return!0;return!1}},this.is_whitespace=function(t){for(;0<t.length;t++)if(!this.Utils.in_array(t.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var t="";if(t=this.input.charAt(this.pos),this.Utils.in_array(t,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(t,this.Utils.whitespace);)f&&"\n"===t&&this.newlines<=d&&(this.newlines+=1),this.pos++,t=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(t){this.line_char_count>=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("</"+t+"\\s*>","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(e=this.input.substring(this.pos,r),this.pos=r),e},this.record_tag=function(t){this.tags[t+"count"]?(this.tags[t+"count"]++,this.tags[t+this.tags[t+"count"]]=this.indent_level):(this.tags[t+"count"]=1,this.tags[t+this.tags[t+"count"]]=this.indent_level),this.tags[t+this.tags[t+"count"]+"parent"]=this.tags.parent,this.tags.parent=t+this.tags[t+"count"]},this.retrieve_tag=function(t){if(this.tags[t+"count"]){for(var e=this.tags.parent;e&&t+this.tags[t+"count"]!==e;)e=this.tags[e+"parent"];e&&(this.indent_level=this.tags[t+this.tags[t+"count"]],this.tags.parent=this.tags[e+"parent"]),delete this.tags[t+this.tags[t+"count"]+"parent"],delete this.tags[t+this.tags[t+"count"]],1===this.tags[t+"count"]?delete this.tags[t+"count"]:this.tags[t+"count"]--}},this.indent_to_tag=function(t){if(this.tags[t+"count"]){for(var e=this.tags.parent;e&&t+this.tags[t+"count"]!==e;)e=this.tags[e+"parent"];e&&(this.indent_level=this.tags[t+this.tags[t+"count"]])}},this.get_tag=function(t){var e,n,i="",r=[],s="",_=!1,a=!0,o=this.pos,l=this.line_char_count;t=void 0!==t&&t;do{if(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<g;c++)r.push(h)}for(var u=0;u<r.length;u++)if(" "===r[u]){a=!1;break}}if(T&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),r.length&&" "!==r[r.length-1]&&"<"!==r[r.length-1]&&(i=" "+i),_=!0),"<"!==i||n||(e=this.pos-1,n="<"),T&&!n&&r.length>=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("</"+b+">",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("<![if")?(n="<![endif]>",i=!0):0===e.indexOf("<![cdata[")?(n="]]>",i=!0):0===e.indexOf("<![")?(n="]>",i=!0):0===e.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===e.indexOf("{{!")?(n="}}",i=!0):0===e.indexOf("<?")?(n="?>",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;a<this.indent_size;a++)this.indent_string+=this.indent_character;this.print_newline=function(t,n){this.line_char_count=0,n&&n.length&&(t||"\n"!==n[n.length-1])&&("\n"!==n[n.length-1]&&(n[n.length-1]=e(n[n.length-1])),n.push("\n"))},this.print_indentation=function(t){for(var e=0;e<this.indent_level;e++)t.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=t(e)),this.print_token_raw(e))},this.print_token_raw=function(t){this.newlines>0&&(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;n<this.newlines;n++)this.print_newline(n>0,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 +1,2 @@
|
|
1
|
-
(function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){function r(n,t){return t=="pairs"&&typeof n=="string"?n:typeof n=="object"&&n[t]!=null?n[t]:o[t]}function h(n){return function(t){return v(t,n)}}function e(n){var t=n.state.closeBrackets,i;return t?(i=n.getModeAt(n.getCursor()),i.closeBrackets||t):null}function c(i){var c=e(i),l,f,h,u,o;if(!c||i.getOption("disableInput"))return n.Pass;for(l=r(c,"pairs"),f=i.listSelections(),u=0;u<f.length;u++)if(!f[u].empty()||(h=s(i,f[u].head),!h||l.indexOf(h)%2!=0))return n.Pass;for(u=f.length-1;u>=0;u--)o=f[u].head,i.replaceRange("",t(o.line,o.ch-1),t(o.line,o.ch+1),"+delete")}function l(t){var o=e(t),h=o&&r(o,"explode"),i,u,f;if(!h||t.getOption("disableInput"))return n.Pass;for(i=t.listSelections(),u=0;u<i.length;u++)if(!i[u].empty()||(f=s(t,i[u].head),!f||h.indexOf(f)%2!=0))return n.Pass;t.operation(function(){var n,r;for(t.replaceSelection("\n\n",null),t.execCommand("goCharLeft"),i=t.listSelections(),n=0;n<i.length;n++)r=i[n].head.line,t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)})}function a(i){var r=n.cmpPos(i.anchor,i.head)>0;return{anchor:new t(i.anchor.line,i.anchor.ch+(r?-1:1)),head:new t(i.head.line,i.head.ch+(r?1:-1))}}function v(i,u){var g=e(i),l,o,b,h,d;if(!g||i.getOption("disableInput")||(l=r(g,"pairs"),o=l.indexOf(u),o==-1))return n.Pass;var tt=r(g,"triples"),v=l.charAt(o+1)==u,it=i.listSelections(),nt=o%2==0,s;for(b=0;b<it.length;b++){var rt=it[b],f=rt.head,c,k=i.getRange(f,t(f.line,f.ch+1));if(nt&&!rt.empty())c="surround";else if((v||!nt)&&k==u)c=v&&w(i,f)?"both":tt.indexOf(u)>=0&&i.getRange(f,t(f.line,f.ch+3))==u+u+u?"skipThree":"skip";else if(v&&f.ch>1&&tt.indexOf(u)>=0&&i.getRange(t(f.line,f.ch-2),f)==u+u&&(f.ch<=2||i.getRange(t(f.line,f.ch-3),t(f.line,f.ch-2))!=u))c="addFour";else if(v)if(!n.isWordChar(k)&&p(i,f,u))c="both";else return n.Pass;else if(nt&&(i.getLine(f.line).length==f.ch||y(k,l)||/\s/.test(k)))c="both";else return n.Pass;if(s){if(s!=c)return n.Pass}else s=c}h=o%2?l.charAt(o-1):u;d=o%2?u:l.charAt(o+1);i.operation(function(){var t,n;if(s=="skip")i.execCommand("goCharRight");else if(s=="skipThree")for(n=0;n<3;n++)i.execCommand("goCharRight");else if(s=="surround"){for(t=i.getSelections(),n=0;n<t.length;n++)t[n]=h+t[n]+d;for(i.replaceSelections(t,"around"),t=i.listSelections().slice(),n=0;n<t.length;n++)t[n]=a(t[n]);i.setSelections(t)}else s=="both"?(i.replaceSelection(h+d,null),i.triggerElectric(h+d),i.execCommand("goCharLeft")):s=="addFour"&&(i.replaceSelection(h+h+h+h,"before"),i.execCommand("goCharRight"))})}function y(n,t){var i=t.lastIndexOf(n);return i>-1&&i%2==1}function s(n,i){var r=n.getRange(t(i.line,i.ch-1),t(i.line,i.ch+1));return r.length==2?r:null}function p(t,i,r){var e=t.getLine(i.line),f=t.getTokenAt(i),u,o;if(/\bstring2?\b/.test(f.type))return!1;for(u=new n.StringStream(e.slice(0,i.ch)+r+e.slice(i.ch),4),u.pos=u.start=f.start;;){if(o=t.getMode().token(u,f.state),u.pos>=i.ch+1)return/\bstring2?\b/.test(o);u.start=u.pos}}function w(n,i){var r=n.getTokenAt(t(i.line,i.ch+1));return/\bstring/.test(r.type)&&r.start==i.ch}var o={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},t=n.Pos,u,f,i;for(n.defineOption("autoCloseBrackets",!1,function(t,i,r){r&&r!=n.Init&&(t.removeKeyMap(f),t.state.closeBrackets=null);i&&(t.state.closeBrackets=i,t.addKeyMap(f))}),u=o.pairs+"`",f={Backspace:c,Enter:l},i=0;i<u.length;i++)f["'"+u.charAt(i)+"'"]=h(u.charAt(i))}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror"),require("../fold/xml-fold")):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],n):n(CodeMirror)}(function(n){function e(t){var h,p,b,y,e,l,k;if(t.getOption("disableInput"))return n.Pass;for(h=t.listSelections(),p=[],e=0;e<h.length;e++){if(!h[e].empty())return n.Pass;var s=h[e].head,o=t.getTokenAt(s),w=n.innerMode(t.getMode(),o.state),a=w.state;if(w.mode.name!="xml"||!a.tagName)return n.Pass;var v=t.getOption("autoCloseTags"),d=w.mode.configuration=="html",g=typeof v=="object"&&v.dontCloseTags||d&&u,nt=typeof v=="object"&&v.indentTags||d&&f,c=a.tagName;if(o.end>s.ch&&(c=c.slice(0,c.length-o.end+s.ch)),b=c.toLowerCase(),!c||o.type=="string"&&(o.end!=s.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&a.type=="closeTag"||o.string.indexOf("/")==o.string.length-1||g&&i(g,b)>-1||r(t,c,s,a,!0))return n.Pass;y=nt&&i(nt,b)>-1;p[e]={indent:y,text:">"+(y?"\n\n":"")+"<\/"+c+">",newPos:y?n.Pos(s.line+1,0):n.Pos(s.line,s.ch+1)}}for(e=h.length-1;e>=0;e--)l=p[e],t.replaceRange(l.text,h[e].head,h[e].anchor,"+insert"),k=t.listSelections().slice(0),k[e]={head:l.newPos,anchor:l.newPos},t.setSelections(k),l.indent&&(t.indentLine(l.newPos.line,null,!0),t.indentLine(l.newPos.line+1,null,!0))}function t(t,i){for(var s,f=t.listSelections(),a=[],l=i?"/":"<\/",u=0;u<f.length;u++){if(!f[u].empty())return n.Pass;var h=f[u].head,e=t.getTokenAt(h),c=n.innerMode(t.getMode(),e.state),o=c.state;if(i&&(e.type=="string"||e.string.charAt(0)!="<"||e.start!=h.ch-1))return n.Pass;if(c.mode.name!="xml")if(t.getMode().name=="htmlmixed"&&c.mode.name=="javascript")s=l+"script";else if(t.getMode().name=="htmlmixed"&&c.mode.name=="css")s=l+"style";else return n.Pass;else{if(!o.context||!o.context.tagName||r(t,o.context.tagName,h,o))return n.Pass;s=l+o.context.tagName}t.getLine(h.line).charAt(e.end)!=">"&&(s+=">");a[u]=s}for(t.replaceSelections(a),f=t.listSelections(),u=0;u<f.length;u++)(u==f.length-1||f[u].head.line<f[u+1].head.line)&&t.indentLine(f[u].head.line)}function o(i){return i.getOption("disableInput")?n.Pass:t(i,!0)}function i(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0,r=n.length;i<r;++i)if(n[i]==t)return i;return-1}function r(t,i,r,u,f){var h,o,e,c,l,s;if(!n.scanForClosingTag||(h=Math.min(t.lastLine()+1,r.line+500),o=n.scanForClosingTag(t,r,null,h),!o||o.tag!=i))return!1;for(e=u.context,c=f?1:0;e&&e.tagName==i;e=e.prev)++c;for(r=o.to,l=1;l<c;l++){if(s=n.scanForClosingTag(t,r,null,h),!s||s.tag!=i)return!1;r=s.to}return!0}n.defineOption("autoCloseTags",!1,function(t,i,r){if(r!=n.Init&&r&&t.removeKeyMap("autoCloseTags"),i){var u={name:"autoCloseTags"};(typeof i!="object"||i.whenClosing)&&(u["'/'"]=function(n){return o(n)});(typeof i!="object"||i.whenOpening)&&(u["'>'"]=function(n){return e(n)});t.addKeyMap(u)}});var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],f=["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"];n.commands.closeTag=function(n){return t(n)}}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){function r(t){var o,i,v,h,s,f,y,r,l,c,p,a,e;if(t.getOption("disableInput"))return n.Pass;for(o=t.listSelections(),v=[],h=0;h<o.length;h++){if(s=o[h].head,f=t.getTokenAt(s),f.type!="comment")return n.Pass;if(y=n.innerMode(t.getMode(),f.state).mode,i){if(i!=y)return n.Pass}else i=y;if(r=null,i.blockCommentStart&&i.blockCommentContinue){if(l=f.string.indexOf(i.blockCommentEnd),c=t.getRange(n.Pos(s.line,0),n.Pos(s.line,f.end)),l==-1||l!=f.string.length-i.blockCommentEnd.length||!(s.ch>=l))if(f.string.indexOf(i.blockCommentStart)==0){if(r=c.slice(0,f.start),!/^\s*$/.test(r))for(r="",p=0;p<f.start;++p)r+=" "}else(e=c.indexOf(i.blockCommentContinue))!=-1&&e+i.blockCommentContinue.length>f.start&&/^\s*$/.test(c.slice(0,e))&&(r=c.slice(0,e));r!=null&&(r+=i.blockCommentContinue)}if(r==null&&i.lineComment&&u(t)&&(a=t.getLine(s.line),e=a.indexOf(i.lineComment),e>-1&&(r=a.slice(0,e),/\S/.test(r)?r=null:r+=i.lineComment+a.slice(e+i.lineComment.length).match(/^\s*/)[0])),r==null)return n.Pass;v[h]="\n"+r}t.operation(function(){for(var n=o.length-1;n>=0;n--)t.replaceRange(v[n],o[n].from(),o[n].to(),"+insert")})}function u(n){var t=n.getOption("continueComments");return t&&typeof t=="object"?t.continueLineComment!==!1:!0}for(var i=["clike","css","javascript"],t=0;t<i.length;++t)n.extendMode(i[t],{blockCommentContinue:" * "});n.defineOption("continueComments",null,function(t,i,u){var f,e;u&&u!=n.Init&&t.removeKeyMap("continueComment");i&&(f="Enter",typeof i=="string"?f=i:typeof i=="object"&&i.key&&(f=i.key),e={name:"continueComment"},e[f]=r,t.addKeyMap(e))})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){function u(n,i,u,e){var l=n.getLineHandle(i.line),o=i.ch-1,c=o>=0&&r[l.text.charAt(o)]||r[l.text.charAt(++o)],h,a,s;return c?(h=c.charAt(1)==">"?1:-1,u&&h>0!=(o==i.ch))?null:(a=n.getTokenTypeAt(t(i.line,o+1)),s=f(n,t(i.line,o+(h>0?1:0)),h,a||null,e),s==null)?null:{from:t(i.line,o),to:s&&s.pos,match:s&&s.ch==c.charAt(0),forward:h>0}:null}function f(n,i,u,f,e){for(var h,s,v,c,y,p=e&&e.maxScanLineLength||1e4,a=e&&e.maxScanLines||1e3,l=[],w=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,b=u>0?Math.min(i.line+a,n.lastLine()+1):Math.max(n.firstLine()-1,i.line-a),o=i.line;o!=b;o+=u)if((h=n.getLine(o),h)&&(s=u>0?0:h.length-1,v=u>0?h.length:-1,!(h.length>p)))for(o==i.line&&(s=i.ch-(u<0?1:0));s!=v;s+=u)if(c=h.charAt(s),w.test(c)&&(f===undefined||n.getTokenTypeAt(t(o,s+1))==f))if(y=r[c],y.charAt(1)==">"==u>0)l.push(c);else if(l.length)l.pop();else return{pos:t(o,s),ch:c};return o-u==(u>0?n.lastLine():n.firstLine())?!1:null}function e(n,i,r){for(var f,c,l,a=n.state.matchBrackets.maxHighlightLineLength||1e3,e=[],h=n.listSelections(),o=0;o<h.length;o++)f=h[o].empty()&&u(n,h[o].head,!1,r),f&&n.getLine(f.from.line).length<=a&&(c=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",e.push(n.markText(f.from,t(f.from.line,f.from.ch+1),{className:c})),f.to&&n.getLine(f.to.line).length<=a&&e.push(n.markText(f.to,t(f.to.line,f.to.ch+1),{className:c})));if(e.length)if(s&&n.state.focused&&n.focus(),l=function(){n.operation(function(){for(var n=0;n<e.length;n++)e[n].clear()})},i)setTimeout(l,800);else return l}function o(n){n.operation(function(){i&&(i(),i=null);i=e(n,!1,n.state.matchBrackets)})}var s=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),t=n.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;n.defineOption("matchBrackets",!1,function(t,r,u){if(u&&u!=n.Init&&(t.off("cursorActivity",o),i&&(i(),i=null)),r){t.state.matchBrackets=typeof r=="object"?r:{};t.on("cursorActivity",o)}});n.defineExtension("matchBrackets",function(){e(this,!0)});n.defineExtension("findMatchingBracket",function(n,t,i){return u(this,n,t,i)});n.defineExtension("scanForBracket",function(n,t,i,r){return f(this,n,t,i,r)})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror"),require("../fold/xml-fold")):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],n):n(CodeMirror)}(function(n){"use strict";function i(n){n.state.tagHit&&n.state.tagHit.clear();n.state.tagOther&&n.state.tagOther.clear();n.state.tagHit=n.state.tagOther=null}function t(t){t.state.failedTagMatch=!1;t.operation(function(){var f,u,r,e,o;(i(t),t.somethingSelected())||(f=t.getCursor(),u=t.getViewport(),u.from=Math.min(u.from,f.line),u.to=Math.max(f.line+1,u.to),r=n.findMatchingTag(t,f,u),r)&&(t.state.matchBothTags&&(e=r.at=="open"?r.open:r.close,e&&(t.state.tagHit=t.markText(e.from,e.to,{className:"CodeMirror-matchingtag"}))),o=r.at=="close"?r.open:r.close,o?t.state.tagOther=t.markText(o.from,o.to,{className:"CodeMirror-matchingtag"}):t.state.failedTagMatch=!0)})}function r(n){n.state.failedTagMatch&&t(n)}n.defineOption("matchTags",!1,function(u,f,e){if(e&&e!=n.Init&&(u.off("cursorActivity",t),u.off("viewportChange",r),i(u)),f){u.state.matchBothTags=typeof f=="object"&&f.bothTags;u.on("cursorActivity",t);u.on("viewportChange",r);t(u)}});n.commands.toMatchingTag=function(t){var i=n.findMatchingTag(t,t.getCursor()),r;i&&(r=i.at=="close"?i.open:i.close,r&&t.extendSelection(r.to,r.from))}}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){n.defineOption("showTrailingSpace",!1,function(t,i,r){r==n.Init&&(r=!1);r&&!i?t.removeOverlay("trailingspace"):!r&&i&&t.addOverlay({token:function(n){for(var i=n.string.length,t=i;t&&/\s/.test(n.string.charAt(t-1));--t);return t>n.pos?(n.pos=t,null):(n.pos=i,"trailingspace")},name:"trailingspace"})})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";function i(i,u,f,e){function a(n){var t=s(i,u),f,r;if(!t||t.to.line-t.from.line<l)return null;for(f=i.findMarksAt(t.from),r=0;r<f.length;++r)if(f[r].__isFold&&e!=="fold"){if(!n)return null;t.cleared=!0;f[r].clear()}return t}var s,l,o,h,c;if(f&&f.call?(s=f,f=null):s=t(i,f,"rangeFinder"),typeof u=="number"&&(u=n.Pos(u,0)),l=t(i,f,"minFoldSize"),o=a(!0),t(i,f,"scanUp"))while(!o&&u.line>i.firstLine())u=n.Pos(u.line-1,0),o=a(!1);if(o&&!o.cleared&&e!=="unfold"){h=r(i,f);n.on(h,"mousedown",function(t){c.clear();n.e_preventDefault(t)});c=i.markText(o.from,o.to,{replacedWith:h,clearOnEnter:t(i,f,"clearOnEnter"),__isFold:!0});c.on("clear",function(t,r){n.signal(i,"unfold",i,t,r)});n.signal(i,"fold",i,o.from,o.to)}}function r(n,i){var r=t(n,i,"widget"),u;return typeof r=="string"&&(u=document.createTextNode(r),r=document.createElement("span"),r.appendChild(u),r.className="CodeMirror-foldmarker"),r}function t(n,t,i){if(t&&t[i]!==undefined)return t[i];var r=n.options.foldOptions;return r&&r[i]!==undefined?r[i]:u[i]}n.newFoldFunction=function(n,t){return function(r,u){i(r,u,{rangeFinder:n,widget:t})}};n.defineExtension("foldCode",function(n,t,r){i(this,n,t,r)});n.defineExtension("isFolded",function(n){for(var i=this.findMarksAt(n),t=0;t<i.length;++t)if(i[t].__isFold)return!0});n.commands.toggleFold=function(n){n.foldCode(n.getCursor())};n.commands.fold=function(n){n.foldCode(n.getCursor(),null,"fold")};n.commands.unfold=function(n){n.foldCode(n.getCursor(),null,"unfold")};n.commands.foldAll=function(t){t.operation(function(){for(var i=t.firstLine(),r=t.lastLine();i<=r;i++)t.foldCode(n.Pos(i,0),null,"fold")})};n.commands.unfoldAll=function(t){t.operation(function(){for(var i=t.firstLine(),r=t.lastLine();i<=r;i++)t.foldCode(n.Pos(i,0),null,"unfold")})};n.registerHelper("fold","combine",function(){var n=Array.prototype.slice.call(arguments,0);return function(t,i){for(var u,r=0;r<n.length;++r)if(u=n[r](t,i),u)return u}});n.registerHelper("fold","auto",function(n,t){for(var r,u=n.getHelpers(t,"fold"),i=0;i<u.length;i++)if(r=u[i](n,t),r)return r});var u={rangeFinder:n.fold.auto,widget:"\u2194",minFoldSize:0,scanUp:!1,clearOnEnter:!0};n.defineOption("foldOptions",null);n.defineExtension("foldOption",function(n,i){return t(this,n,i)})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror"),require("./foldcode")):typeof define=="function"&&define.amd?define(["../../lib/codemirror","./foldcode"],n):n(CodeMirror)}(function(n){"use strict";function c(n){this.options=n;this.from=this.to=0}function l(n){return n===!0&&(n={}),n.gutter==null&&(n.gutter="CodeMirror-foldgutter"),n.indicatorOpen==null&&(n.indicatorOpen="CodeMirror-foldgutter-open"),n.indicatorFolded==null&&(n.indicatorFolded="CodeMirror-foldgutter-folded"),n}function e(n,i){for(var u=n.findMarks(t(i,0),t(i+1,0)),r=0;r<u.length;++r)if(u[r].__isFold&&u[r].find().from.line==i)return u[r]}function o(n){if(typeof n=="string"){var t=document.createElement("div");return t.className=n+" CodeMirror-guttermarker-subtle",t}return n.cloneNode(!0)}function i(n,i,r){var u=n.state.foldGutter.options,f=i,h=n.foldOption(u,"minFoldSize"),s=n.foldOption(u,"rangeFinder");n.eachLine(i,r,function(i){var c=null,l,r;e(n,f)?c=o(u.indicatorFolded):(l=t(f,0),r=s&&s(n,l),r&&r.to.line-r.from.line>=h&&(c=o(u.indicatorOpen)));n.setGutterMarker(i,u.gutter,c);++f})}function f(n){var t=n.getViewport(),r=n.state.foldGutter;r&&(n.operation(function(){i(n,t.from,t.to)}),r.from=t.from,r.to=t.to)}function s(n,i,r){var o=n.state.foldGutter,u,f;o&&(u=o.options,r==u.gutter)&&(f=e(n,i),f?f.clear():n.foldCode(t(i,0),u.rangeFinder))}function r(n){var t=n.state.foldGutter,i;t&&(i=t.options,t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){f(n)},i.foldOnChangeTimeSpan||600))}function h(n){var t=n.state.foldGutter,r;t&&(r=t.options,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var r=n.getViewport();t.from==t.to||r.from-t.to>20||t.from-r.to>20?f(n):n.operation(function(){r.from<t.from&&(i(n,r.from,t.from),t.from=r.from);r.to>t.to&&(i(n,t.to,r.to),t.to=r.to)})},r.updateViewportTimeSpan||400))}function u(n,t){var u=n.state.foldGutter,r;u&&(r=t.line,r>=u.from&&r<u.to&&i(n,r,r+1))}n.defineOption("foldGutter",!1,function(t,i,e){if(e&&e!=n.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",s),t.off("change",r),t.off("viewportChange",h),t.off("fold",u),t.off("unfold",u),t.off("swapDoc",r)),i){t.state.foldGutter=new c(l(i));f(t);t.on("gutterClick",s);t.on("change",r);t.on("viewportChange",h);t.on("fold",u);t.on("unfold",u);t.on("swapDoc",r)}});var t=n.Pos}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";n.registerHelper("fold","brace",function(t,i){function p(r){for(var u,e=i.ch,o=0;;){if(u=e<=0?-1:y.lastIndexOf(r,e-1),u==-1){if(o==1)break;o=1;e=y.length;continue}if(o==1&&u<i.ch)break;if(l=t.getTokenTypeAt(n.Pos(f,u+1)),!/^(comment|string)/.test(l))return u+1;e=u-1}}var f=i.line,y=t.getLine(f),l,w="{",b="}",e=p("{"),a,k,h,v,u,o,r,s,c;if(e==null&&(w="[",b="]",e=p("[")),e!=null){a=1;k=t.lastLine();n:for(u=f;u<=k;++u)for(o=t.getLine(u),r=u==f?e:0;;){if(s=o.indexOf(w,r),c=o.indexOf(b,r),s<0&&(s=o.length),c<0&&(c=o.length),r=Math.min(s,c),r==o.length)break;if(t.getTokenTypeAt(n.Pos(u,r+1))==l)if(r==s)++a;else if(!--a){h=u;v=r;break n}++r}if(h!=null&&(f!=h||v!=e))return{from:n.Pos(f,e),to:n.Pos(h,v)}}});n.registerHelper("fold","import",function(t,i){function u(i){var r,u,e,o,f;if(i<t.firstLine()||i>t.lastLine()||(r=t.getTokenAt(n.Pos(i,1)),/\S/.test(r.string)||(r=t.getTokenAt(n.Pos(i,r.end+1))),r.type!="keyword"||r.string!="import"))return null;for(u=i,e=Math.min(t.lastLine(),i+10);u<=e;++u)if(o=t.getLine(u),f=o.indexOf(";"),f!=-1)return{startCh:r.end,end:n.Pos(u,f)}}var r=i.line,e=u(r),s,f,o;if(!e||u(r-1)||(s=u(r-2))&&s.end.line==r-1)return null;for(f=e.end;;){if(o=u(f.line+1),o==null)break;f=o.end}return{from:t.clipPos(n.Pos(r,e.startCh+1)),to:f}});n.registerHelper("fold","include",function(t,i){function f(i){if(i<t.firstLine()||i>t.lastLine())return null;var r=t.getTokenAt(n.Pos(i,1));return/\S/.test(r.string)||(r=t.getTokenAt(n.Pos(i,r.end+1))),r.type=="meta"&&r.string.slice(0,8)=="#include"?r.start+8:void 0}var r=i.line,e=f(r),u,o;if(e==null||f(r-1)!=null)return null;for(u=r;;){if(o=f(u+1),o==null)break;++u}return{from:n.Pos(r,e+1),to:t.clipPos(n.Pos(u))}})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";n.registerGlobalHelper("fold","comment",function(n){return n.blockCommentStart&&n.blockCommentEnd},function(t,i){var d=t.getModeAt(i),c=d.blockCommentStart,l=d.blockCommentEnd,u,a,v,s,y,r,b,g,p,k,e,o,f,h,w;if(c&&l){for(u=i.line,a=t.getLine(u),s=i.ch,y=0;;){if(r=s<=0?-1:a.lastIndexOf(c,s-1),r==-1){if(y==1)return;y=1;s=a.length;continue}if(y==1&&r<i.ch)return;if(/comment/.test(t.getTokenTypeAt(n.Pos(u,r+1)))&&(r==0||a.slice(r-l.length,r)==l||!/comment/.test(t.getTokenTypeAt(n.Pos(u,r))))){v=r+c.length;break}s=r-1}b=1;g=t.lastLine();n:for(e=u;e<=g;++e)for(o=t.getLine(e),f=e==u?v:0;;){if(h=o.indexOf(c,f),w=o.indexOf(l,f),h<0&&(h=o.length),w<0&&(w=o.length),f=Math.min(h,w),f==o.length)break;if(f==h)++b;else if(!--b){p=e;k=f;break n}++f}if(p!=null&&(u!=p||k!=v))return{from:n.Pos(u,v),to:n.Pos(p,k)}}})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";n.registerHelper("fold","indent",function(t,i){var c=t.getOption("tabSize"),f=t.getLine(i.line),r,s,e,h;if(/\S/.test(f)){var o=function(t){return n.countColumn(t,null,c)},l=o(f),u=null;for(r=i.line+1,s=t.lastLine();r<=s;++r)if(e=t.getLine(r),h=o(e),h>l)u=r;else if(/\S/.test(e))break;if(u)return{from:n.Pos(i.line,f.length),to:n.Pos(u,t.getLine(u).length)}}})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";function v(n,t){return n.line-t.line||n.ch-t.ch}function i(n,t,i,r){this.line=t;this.ch=i;this.cm=n;this.text=n.getLine(t);this.min=r?Math.max(r.from,n.firstLine()):n.firstLine();this.max=r?Math.min(r.to-1,n.lastLine()):n.lastLine()}function u(n,i){var r=n.cm.getTokenTypeAt(t(n.line,i));return r&&/\btag\b/.test(r)}function h(n){if(!(n.line>=n.max))return n.ch=0,n.text=n.cm.getLine(++n.line),!0}function c(n){if(!(n.line<=n.min))return n.text=n.cm.getLine(--n.line),n.ch=n.text.length,!0}function e(n){for(var t,i,r;;){if(t=n.text.indexOf(">",n.ch),t==-1)if(h(n))continue;else return;if(!u(n,t+1)){n.ch=t+1;continue}return i=n.text.lastIndexOf("/",t),r=i>-1&&!/\S/.test(n.text.slice(i+1,t)),n.ch=t+1,r?"selfClose":"regular"}}function o(n){for(var t,i;;){if(t=n.ch?n.text.lastIndexOf("<",n.ch-1):-1,t==-1)if(c(n))continue;else return;if(!u(n,t+1)){n.ch=t;continue}if(r.lastIndex=t,n.ch=t,i=r.exec(n.text),i&&i.index==t)return i}}function l(n){for(;;){r.lastIndex=n.ch;var t=r.exec(n.text);if(!t)if(h(n))continue;else return;if(!u(n,t.index+1)){n.ch=t.index+1;continue}return n.ch=t.index+t[0].length,t}}function p(n){for(var t,i,r;;){if(t=n.ch?n.text.lastIndexOf(">",n.ch-1):-1,t==-1)if(c(n))continue;else return;if(!u(n,t+1)){n.ch=t;continue}return i=n.text.lastIndexOf("/",t),r=i>-1&&!/\S/.test(n.text.slice(i+1,t)),n.ch=t+1,r?"selfClose":"regular"}}function f(n,i){for(var f=[],u;;){var r=l(n),o,s=n.line,h=n.ch-(r?r[0].length:0);if(!r||!(o=e(n)))return;if(o!="selfClose")if(r[1]){for(u=f.length-1;u>=0;--u)if(f[u]==r[2]){f.length=u;break}if(u<0&&(!i||i==r[2]))return{tag:r[2],from:t(s,h),to:t(n.line,n.ch)}}else f.push(r[2])}}function a(n,i){for(var f=[],e,u;;){if(e=p(n),!e)return;if(e=="selfClose"){o(n);continue}var s=n.line,h=n.ch,r=o(n);if(!r)return;if(r[1])f.push(r[2]);else{for(u=f.length-1;u>=0;--u)if(f[u]==r[2]){f.length=u;break}if(u<0&&(!i||i==r[2]))return{tag:r[2],from:t(n.line,n.ch),to:t(s,h)}}}}var t=n.Pos,s="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",y=s+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",r=new RegExp("<(/?)(["+s+"]["+y+"]*)","g");n.registerHelper("fold","xml",function(n,r){for(var u=new i(n,r.line,0),o,h,c,s;;){if(o=l(u),!o||u.line!=r.line||!(h=e(u)))return;if(!o[1]&&h!="selfClose")return c=t(u.line,u.ch),s=f(u,o[2]),s&&{from:c,to:s.from}}});n.findMatchingTag=function(n,r,u){var s=new i(n,r.line,r.ch,u),l;if(s.text.indexOf(">")!=-1||s.text.indexOf("<")!=-1){var c=e(s),y=c&&t(s.line,s.ch),h=c&&o(s);if(c&&h&&!(v(s,r)>0))return(l={from:t(s.line,s.ch),to:y,tag:h[2]},c=="selfClose")?{open:l,close:null,at:"open"}:h[1]?{open:a(s,h[2]),close:l,at:"close"}:(s=new i(n,y.line,y.ch,u),{open:l,close:f(s,h[2]),at:"open"})}};n.findEnclosingTag=function(n,t,r){for(var s=new i(n,t.line,t.ch,r),u,o,e;;){if(u=a(s),!u)break;if(o=new i(n,t.line,t.ch,r),e=f(o,u.tag),e)return{open:u,close:e}}};n.scanForClosingTag=function(n,t,r,u){var e=new i(n,t.line,t.ch,u?{from:0,to:u}:null);return f(e,r)}}),function(){CodeMirror.defineExtension("autoFormatAll",function(n,t){function v(){h+="\n";f=!0;++a}for(var i,r=this,u=r.getMode(),o=r.getRange(n,t).split("\n"),s=CodeMirror.copyState(u,r.getTokenAt(n).state),y=r.getOption("tabSize"),h="",a=0,f=n.ch==0,e=0;e<o.length;++e){for(i=new CodeMirror.StringStream(o[e],y);!i.eol();){var c=CodeMirror.innerMode(u,s),p=u.token(i,s),l=i.current();i.start=i.pos;(!f||/\S/.test(l))&&(h+=l,f=!1);!f&&c.mode.newlineAfterToken&&c.mode.newlineAfterToken(p,l,i.string.slice(i.pos)||o[e+1]||"",c.state)&&v()}!i.pos&&u.blankLine&&u.blankLine(s);!f&&e<o.length-1&&v()}r.operation(function(){r.replaceRange(h,n,t);for(var i=n.line+1,u=n.line+a;i<=u;++i)r.indentLine(i,"smart");r.setCursor({line:0,ch:0})})})}(),function(){function n(n){for(var i,t,f=[/for\s*?\((.*?)\)/g,/&#?[a-z0-9]+;[\s\S]/g,/\"(.*?)((\")|$)/g,/\/\*(.*?)(\*\/|$)/g,/^\/\/.*/g],r=[],u=0;u<f.length;u++)for(i=0;i<n.length;)if(t=n.substr(i).match(f[u]),t!=null)r.push({start:i+t.index,end:i+t.index+t[0].length}),i+=t.index+Math.max(1,t[0].length);else break;return r.sort(function(n,t){return n.start-t.start}),r}CodeMirror.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(n,t){return/^[;{}]$/.test(t)}});CodeMirror.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",wordWrapChars:[";","\\{","\\}"],autoFormatLineBreaks:function(t){var r=0,e=this.jsonMode?function(n){return n.replace(/([,{])/g,"$1\n").replace(/}/g,"\n}")}:function(n){return n.replace(/(;|\{|\})([^\r\n;])/g,"$1\n$2")},u=n(t),f="",i;if(u!=null){for(i=0;i<u.length;i++)u[i].start>r&&(f+=e(t.substring(r,u[i].start)),r=u[i].start),u[i].start<=r&&u[i].end>=r&&(f+=t.substring(r,u[i].end),r=u[i].end);r<t.length&&(f+=e(t.substr(r)))}else f=e(t);return f.replace(/^\n*|\n*$/,"")}});CodeMirror.extendMode("xml",{commentStart:"<!--",commentEnd:"-->",noBreak:!1,noBreakEmpty:null,tagType:"",tagName:"",isXML:!1,newlineAfterToken:function(n,t,i){var o="a|b|bdi|bdo|big|center|cite|del|em|font|i|img|ins|s|small|span|strike|strong|sub|sup|u",e="label|li|option|textarea|title|"+o,f=!1,r=null,u="",s;if(this.isXML=this.configuration=="xml"?!0:!1,n=="comment"||/<!--/.test(i))return!1;if(n=="tag"){if(t.indexOf("<")==0&&!t.indexOf("<\/")==0&&(this.tagType="open",r=t.match(/^<\s*?([\w]+?)$/i),this.tagName=r!=null?r[1]:"",u=this.tagName.toLowerCase(),("|"+e+"|").indexOf("|"+u+"|")!=-1&&(this.noBreak=!0)),t.indexOf(">")==0&&this.tagType=="open")return(this.tagType="",s=this.isXML?"[^<]*?":"",RegExp("^"+s+"<\/s*?"+this.tagName+"s*?>","i").test(i))?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(f=this.noBreak,this.noBreak=!1,f?!1:!0);if(t.indexOf("<\/")==0&&(this.tagType="close",r=t.match(/^<\/\s*?([\w]+?)$/i),r!=null&&(u=r[1].toLowerCase()),("|"+o+"|").indexOf("|"+u+"|")!=-1&&(this.noBreak=!0)),t.indexOf(">")==0&&this.tagType=="close")return(this.tagType="",i.indexOf("<")==0&&(r=i.match(/^<\/?\s*?([\w]+?)(\s|>)/i),u=r!=null?r[1].toLowerCase():"",("|"+e+"|").indexOf("|"+u+"|")==-1))?(this.noBreak=!1,!0):(f=this.noBreak,this.noBreak=!1,f?!1:!0)}return i.indexOf("<")==0?(this.noBreak=!1,this.isXML&&this.tagName!="")?(this.tagName="",!1):(r=i.match(/^<\/?\s*?([\w]+?)(\s|>)/i),u=r!=null?r[1].toLowerCase():"",("|"+e+"|").indexOf("|"+u+"|")!=-1?!1:!0):!1}});CodeMirror.defineExtension("commentRange",function(n,t,i){var r=this,u=CodeMirror.innerMode(r.getMode(),r.getTokenAt(t).state).mode;r.operation(function(){if(n)r.replaceRange(u.commentEnd,i),r.replaceRange(u.commentStart,t),t.line==i.line&&t.ch==i.ch&&r.setCursor(t.line,t.ch+u.commentStart.length);else{var f=r.getRange(t,i),e=f.indexOf(u.commentStart),o=f.lastIndexOf(u.commentEnd);e>-1&&o>-1&&o>e&&(f=f.substr(0,e)+f.substring(e+u.commentStart.length,o)+f.substr(o+u.commentEnd.length));r.replaceRange(f,t,i)}})});CodeMirror.defineExtension("autoIndentRange",function(n,t){var i=this;this.operation(function(){for(var r=n.line;r<=t.line;r++)i.indentLine(r,"smart")})});CodeMirror.defineExtension("autoFormatRange",function(n,t){function v(){h+="\n";f=!0;++a}for(var r,i=this,u=i.getMode(),o=i.getRange(n,t).split("\n"),s=CodeMirror.copyState(u,i.getTokenAt(n).state),y=i.getOption("tabSize"),h="",a=0,f=n.ch==0,e=0;e<o.length;++e){for(r=new CodeMirror.StringStream(o[e],y);!r.eol();){var c=CodeMirror.innerMode(u,s),p=u.token(r,s),l=r.current();r.start=r.pos;(!f||/\S/.test(l))&&(h+=l,f=!1);!f&&c.mode.newlineAfterToken&&c.mode.newlineAfterToken(p,l,r.string.slice(r.pos)||o[e+1]||"",c.state)&&v()}!r.pos&&u.blankLine&&u.blankLine(s);!f&&e<o.length-1&&v()}i.operation(function(){i.replaceRange(h,n,t);for(var r=n.line+1,u=n.line+a;r<=u;++r)i.indentLine(r,"smart");i.setSelection(n,i.getCursor(!1))})})}(),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";function u(n){for(var u=0;u<n.state.activeLines.length;u++)n.removeLineClass(n.state.activeLines[u],"wrap",t),n.removeLineClass(n.state.activeLines[u],"background",i),n.removeLineClass(n.state.activeLines[u],"gutter",r)}function o(n,t){if(n.length!=t.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!=t[i])return!1;return!0}function f(n,f){for(var h,c,e=[],s=0;s<f.length;s++)(h=f[s],h.empty())&&(c=n.getLineHandleVisualStart(h.head.line),e[e.length-1]!=c&&e.push(c));o(n.state.activeLines,e)||n.operation(function(){u(n);for(var f=0;f<e.length;f++)n.addLineClass(e[f],"wrap",t),n.addLineClass(e[f],"background",i),n.addLineClass(e[f],"gutter",r);n.state.activeLines=e})}function e(n,t){f(n,t.ranges)}var t="CodeMirror-activeline",i="CodeMirror-activeline-background",r="CodeMirror-activeline-gutter";n.defineOption("styleActiveLine",!1,function(t,i,r){var o=r&&r!=n.Init;if(i&&!o){t.state.activeLines=[];f(t,t.listSelections());t.on("beforeSelectionChange",e)}else!i&&o&&(t.off("beforeSelectionChange",e),u(t),delete t.state.activeLines)})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror"),require("./matchesonscrollbar")):typeof define=="function"&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],n):n(CodeMirror)}(function(n){"use strict";function s(n){this.options={};for(var i in t)this.options[i]=(n&&n.hasOwnProperty(i)?n:t)[i];this.overlay=this.timeout=null;this.matchesonscroll=null;this.active=!1}function i(n){var t=n.state.matchHighlighter;(t.active||n.hasFocus())&&u(n,t)}function r(n){var t=n.state.matchHighlighter;t.active||(t.active=!0,u(n,t))}function u(n,t){clearTimeout(t.timeout);t.timeout=setTimeout(function(){o(n)},t.options.delay)}function f(n,t,i,r){var u=n.state.matchHighlighter,f;n.addOverlay(u.overlay=l(t,i,r));u.options.annotateScrollbar&&n.showMatchesOnScrollbar&&(f=i?new RegExp("\\b"+t+"\\b"):t,u.matchesonscroll=n.showMatchesOnScrollbar(f,!1,{className:"CodeMirror-selection-highlight-scrollbar"}))}function e(n){var t=n.state.matchHighlighter;t.overlay&&(n.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function o(n){n.operation(function(){var t=n.state.matchHighlighter,s,c,u;if(e(n),!n.somethingSelected()&&t.options.showToken){for(var l=t.options.showToken===!0?/[\w$]/:t.options.showToken,a=n.getCursor(),o=n.getLine(a.line),i=a.ch,r=i;i&&l.test(o.charAt(i-1));)--i;while(r<o.length&&l.test(o.charAt(r)))++r;i<r&&f(n,o.slice(i,r),l,t.options.style);return}(s=n.getCursor("from"),c=n.getCursor("to"),s.line==c.line)&&(!t.options.wordsOnly||h(n,s,c))&&(u=n.getRange(s,c),t.options.trim&&(u=u.replace(/^\s+|\s+$/g,"")),u.length>=t.options.minChars&&f(n,u,!1,t.options.style))})}function h(n,t,i){var f=n.getRange(t,i),r,u;return f.match(/^\w+$/)!==null?t.ch>0&&(r={line:t.line,ch:t.ch-1},u=n.getRange(r,t),u.match(/\W/)===null)?!1:i.ch<n.getLine(t.line).length&&(r={line:i.line,ch:i.ch+1},u=n.getRange(i,r),u.match(/\W/)===null)?!1:!0:!1}function c(n,t){return(!n.start||!t.test(n.string.charAt(n.start-1)))&&(n.pos==n.string.length||!t.test(n.string.charAt(n.pos)))}function l(n,t,i){return{token:function(r){if(r.match(n)&&(!t||c(r,t)))return i;r.next();r.skipTo(n.charAt(0))||r.skipToEnd()}}}var t={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};n.defineOption("highlightSelectionMatches",!1,function(t,u,f){if(f&&f!=n.Init&&(e(t),clearTimeout(t.state.matchHighlighter.timeout),t.state.matchHighlighter=null,t.off("cursorActivity",i),t.off("focus",r)),u){var h=t.state.matchHighlighter=new s(u);if(t.hasFocus())h.active=!0,o(t);else t.on("focus",r);t.on("cursorActivity",i)}})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";n.multiplexingMode=function(t){function r(n,t,i,r){var u,f;return typeof t=="string"?(u=n.indexOf(t,i),r&&u>-1?u+t.length:u):(f=t.exec(i?n.slice(i):n),f?f.index+i+(r?f[0].length:0):-1)}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:n.startState(t),innerActive:null,inner:null}},copyState:function(i){return{outer:n.copyState(t,i.outer),innerActive:i.innerActive,inner:i.innerActive&&n.copyState(i.innerActive.mode,i.inner)}},token:function(u,f){var c,a,s,v,e,h,o,l;if(f.innerActive)return(e=f.innerActive,h=u.string,!e.close&&u.sol())?(f.innerActive=f.inner=null,this.token(u,f)):(o=e.close?r(h,e.close,u.pos,e.parseDelimiters):-1,o==u.pos&&!e.parseDelimiters)?(u.match(e.close),f.innerActive=f.inner=null,e.delimStyle&&e.delimStyle+" "+e.delimStyle+"-close"):(o>-1&&(u.string=h.slice(0,o)),l=e.mode.token(u,f.inner),o>-1&&(u.string=h),o==u.pos&&e.parseDelimiters&&(f.innerActive=f.inner=null),e.innerStyle&&(l=l?l+" "+e.innerStyle:e.innerStyle),l);for(c=Infinity,h=u.string,a=0;a<i.length;++a){if(s=i[a],o=r(h,s.open,u.pos),o==u.pos)return s.parseDelimiters||u.match(s.open),f.innerActive=s,f.inner=n.startState(s.mode,t.indent?t.indent(f.outer,""):0),s.delimStyle&&s.delimStyle+" "+s.delimStyle+"-open";o!=-1&&o<c&&(c=o)}return c!=Infinity&&(u.string=h.slice(0,c)),v=t.token(u,f.outer),c!=Infinity&&(u.string=h),v},indent:function(i,r){var u=i.innerActive?i.innerActive.mode:t;return u.indent?u.indent(i.innerActive?i.inner:i.outer,r):n.Pass},blankLine:function(r){var u=r.innerActive?r.innerActive.mode:t,f,e;if(u.blankLine&&u.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)r.innerActive.close==="\n"&&(r.innerActive=r.inner=null);else for(f=0;f<i.length;++f)e=i[f],e.open==="\n"&&(r.innerActive=e,r.inner=n.startState(e.mode,u.indent?u.indent(r.outer,""):0))},electricChars:t.electricChars,innerMode:function(n){return n.inner?{state:n.inner,mode:n.innerActive.mode}:{state:n.outer,mode:t}}}}})
|
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<r.length;a++){var l=r[a].head;if(!/\bcomment\b/.test(t.getTokenTypeAt(l)))return e.Pass;var s=t.getModeAt(l);if(i){if(i!=s)return e.Pass}else i=s;var c=null;if(i.blockCommentStart&&i.blockCommentContinue){var f,u=t.getLine(l.line).slice(0,l.ch),d=u.lastIndexOf(i.blockCommentEnd);if(-1!=d&&d==l.ch-i.blockCommentEnd.length);else if((f=u.lastIndexOf(i.blockCommentStart))>-1&&f>d){if(c=u.slice(0,f),/\S/.test(c)){c="";for(var h=0;h<f;++h)c+=" "}}else(f=u.indexOf(i.blockCommentContinue))>-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<e.length;t++){var n=e.charAt(t),r="'"+n+"'";g[r]||(g[r]=i(n))}}function i(e){return function(t){return s(t,e)}}function r(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function o(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var o=t(i,"pairs"),a=n.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var s=f(n,a[l].head);if(!s||o.indexOf(s)%2!=0)return e.Pass}for(var l=a.length-1;l>=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;l<a.length;l++){if(!a[l].empty())return e.Pass;var s=f(n,a[l].head);if(!s||o.indexOf(s)%2!=0)return e.Pass}n.operation(function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),n.execCommand("goCharLeft"),a=n.listSelections();for(var t=0;t<a.length;t++){var i=a[t].head.line;n.indentLine(i,null,!0),n.indentLine(i+1,null,!0)}})}function l(t){var n=e.cmpPos(t.anchor,t.head)>0;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;b<p.length;b++){var x,y=p[b],C=y.head,k=n.getRange(C,m(C.line,C.ch+1));if(v&&!y.empty())x="surround";else if(!g&&v||k!=i)if(g&&C.ch>1&&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<t.length;e++)t[e]=L+t[e]+S;n.replaceSelections(t,"around"),t=n.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=l(t[e]);n.setSelections(t)}else"both"==f?(n.replaceSelection(L+S,null),n.triggerElectric(L+S),n.execCommand("goCharLeft")):"addFour"==f&&(n.replaceSelection(L+L+L+L,"before"),n.execCommand("goCharRight"))})}function c(e,t){var n=t.lastIndexOf(e);return n>-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;s<n.length;s++){if(!n[s].empty())return e.Pass;var c=n[s].head,f=t.getTokenAt(c),u=e.innerMode(t.getMode(),f.state),d=u.state;if("xml"!=u.mode.name||!d.tagName)return e.Pass;var h=t.getOption("autoCloseTags"),m="html"==u.mode.configuration,g="object"==typeof h&&h.dontCloseTags||m&&a,p="object"==typeof h&&h.indentTags||m&&l,v=d.tagName;f.end>c.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":"")+"</"+v+">",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?"/":"</",l=0;l<i.length;l++){if(!i[l].empty())return e.Pass;var s=i[l].head,c=t.getTokenAt(s),f=e.innerMode(t.getMode(),c.state),u=f.state;if(n&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return e.Pass;var d;if("xml"!=f.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==f.mode.name)d=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=f.mode.name)return e.Pass;d=a+"style"}else{if(!u.context||!u.context.tagName||o(t,u.context.tagName,s,u))return e.Pass;d=a+u.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(d+=">"),r[l]=d}t.replaceSelections(r),i=t.listSelections();for(var l=0;l<i.length;l++)(l==i.length-1||i[l].head.line<i[l+1].head.line)&&t.indentLine(i[l].head.line)}function i(t){return t.getOption("disableInput")?e.Pass:n(t,!0)}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;++n)if(e[n]==t)return n;return-1}function o(t,n,i,r,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,i.line+500),l=e.scanForClosingTag(t,i,null,a);if(!l||l.tag!=n)return!1;for(var s=r.context,c=o?1:0;s&&s.tagName==n;s=s.prev)++c;i=l.to;for(var f=1;f<c;f++){var u=e.scanForClosingTag(t,i,null,a);if(!u||u.tag!=n)return!1;i=u.to}return!0}e.defineOption("autoCloseTags",!1,function(n,r,o){if(o!=e.Init&&o&&n.removeKeyMap("autoCloseTags"),r){var a={name:"autoCloseTags"};("object"!=typeof r||r.whenClosing)&&(a["'/'"]=function(e){return i(e)}),("object"!=typeof r||r.whenOpening)&&(a["'>'"]=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.length;c++){var f=s[c].empty()&&t(e,s[c].head,i);if(f&&e.getLine(f.from.line).length<=r){var u=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(f.from,a(f.from.line,f.from.ch+1),{className:u})),f.to&&e.getLine(f.to.line).length<=r&&l.push(e.markText(f.to,a(f.to.line,f.to.ch+1),{className:u}))}}if(l.length){o&&e.state.focused&&e.focus();var d=function(){e.operation(function(){for(var e=0;e<l.length;e++)l[e].clear()})};if(!n)return d;setTimeout(d,800)}}function r(e){e.operation(function(){s&&(s(),s=null),s=i(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},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.line<c)return null;for(var i=t.findMarksAt(n.from),o=0;o<i.length;++o)if(i[o].__isFold&&"fold"!==a){if(!e)return null;n.cleared=!0,i[o].clear()}return n}if(o&&o.call){var s=o;o=null}else var s=i(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var c=i(t,o,"minFoldSize"),f=l(!0);if(i(t,o,"scanUp"))for(;!f&&r.line>t.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<t.length;++n)if(t[n].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),null,"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),null,"unfold")})},e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var i=0;i<e.length;++i){var r=e[i](t,n);if(r)return r}}}),e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),i=0;i<n.length;i++){var r=n[i](e,t);if(r)return r}});var r={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};e.defineOption("foldOptions",null),e.defineExtension("foldOption",function(e,t){return i(this,e,t)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define("addon/fold/foldgutter.js",["../../lib/codemirror","./foldcode"],e):e(CodeMirror)}(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,t){for(var n=e.findMarks(u(t,0),u(t+1,0)),i=0;i<n.length;++i)if(n[i].__isFold&&n[i].find().from.line==t)return n[i]}function r(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function o(e,t,n){var o=e.state.foldGutter.options,a=t,l=e.foldOption(o,"minFoldSize"),s=e.foldOption(o,"rangeFinder");e.eachLine(t,n,function(t){var n=null;if(i(e,a))n=r(o.indicatorFolded);else{var c=u(a,0),f=s&&s(e,c);f&&f.to.line-f.from.line>=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.from<t.from&&(o(e,n.from,t.from),t.from=n.from),n.to>t.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&&i<n.to&&o(e,i,i+1)}}e.defineOption("foldGutter",!1,function(i,r,o){o&&o!=e.Init&&(i.clearGutter(i.state.foldGutter.options.gutter),i.state.foldGutter=null,i.off("gutterClick",l),i.off("change",s),i.off("viewportChange",c),i.off("fold",f),i.off("unfold",f),i.off("swapDoc",s)),r&&(i.state.foldGutter=new t(n(r)),a(i),i.on("gutterClick",l),i.on("change",s),i.on("viewportChange",c),i.on("fold",f),i.on("unfold",f),i.on("swapDoc",s))});var u=e.Pos}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/brace-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function i(i){for(var l=n.ch,s=0;;){var c=l<=0?-1:a.lastIndexOf(i,l-1);if(-1!=c){if(1==s&&c<n.ch)break;if(r=t.getTokenTypeAt(e.Pos(o,c+1)),!/^(comment|string)/.test(r))return c+1;l=c-1}else{if(1==s)break;s=1,l=a.length}}}var r,o=n.line,a=t.getLine(o),l="{",s="}",c=i("{");if(null==c&&(l="[",s="]",c=i("[")),null!=c){var f,u,d=1,h=t.lastLine();e:for(var m=o;m<=h;++m)for(var g=t.getLine(m),p=m==o?c:0;;){var v=g.indexOf(l,p),b=g.indexOf(s,p);if(v<0&&(v=g.length),b<0&&(b=g.length),(p=Math.min(v,b))==g.length)break;if(t.getTokenTypeAt(e.Pos(m,p+1))==r)if(p==v)++d;else if(!--d){f=m,u=p;break e}++p}if(null!=f&&(o!=f||u!=c))return{from:e.Pos(o,c),to:e.Pos(f,u)}}}),e.registerHelper("fold","import",function(t,n){function i(n){if(n<t.firstLine()||n>t.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(n<t.firstLine()||n>t.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&&u<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(l,u+1)))&&(0==u||s.slice(u-o.length,u)==o||!/comment/.test(t.getTokenTypeAt(e.Pos(l,u))))){a=u+r.length;break}c=u-1}else{if(1==f)return;f=1,c=s.length}}var d,h,m=1,g=t.lastLine();e:for(var p=l;p<=g;++p)for(var v=t.getLine(p),b=p==l?a:0;;){var x=v.indexOf(r,b),y=v.indexOf(o,b);if(x<0&&(x=v.length),y<0&&(y=v.length),(b=Math.min(x,y))==v.length)break;if(b==x)++m;else if(!--m){d=p,h=b;break e}++b}if(null!=d&&(l!=d||h!=a))return{from:e.Pos(l,a),to:e.Pos(d,h)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/fold/indent-fold.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(t,n){var i=t.getLine(n),r=i.search(/\S/);return-1==r||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,r+1)))?-1:e.countColumn(i,null,t.getOption("tabSize"))}e.registerHelper("fold","indent",function(n,i){var r=t(n,i.line);if(!(r<0)){for(var o=null,a=i.line+1,l=n.lastLine();a<=l;++a){var s=t(n,a);if(-1==s);else{if(!(s>r))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;d<a.length;++d){for(var h=new e.StringStream(a[d],s);!h.eol();){var m=e.innerMode(o,l),g=o.token(h,l),p=h.current();h.start=h.pos,u&&!/\S/.test(p)||(c+=p,u=!1),!u&&m.mode.newlineAfterToken&&m.mode.newlineAfterToken(g,p,h.string.slice(h.pos)||a[d+1]||"",m.state)&&i()}!h.pos&&o.blankLine&&o.blankLine(l),!u&&d<a.length-1&&i()}r.operation(function(){r.replaceRange(c,t,n);for(var e=t.line+1,i=t.line+f;e<=i;++e)r.indentLine(e,"smart");r.setCursor({line:0,ch:0})})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/format/formatting.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e){for(var t=[/for\s*?\((.*?)\)/g,/&#?[a-z0-9]+;[\s\S]/g,/\"(.*?)((\")|$)/g,/\/\*(.*?)(\*\/|$)/g,/^\/\/.*/g],n=[],i=0;i<t.length;i++)for(var r=0;r<e.length;){var o=e.substr(r).match(t[i]);if(null==o)break;n.push({start:r+o.index,end:r+o.index+o[0].length}),r+=o.index+Math.max(1,o[0].length)}return n.sort(function(e,t){return e.start-t.start}),n}e.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(e,t){return/^[;{}]$/.test(t)}}),e.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",wordWrapChars:[";","\\{","\\}"],autoFormatLineBreaks:function(e){var n=0,i=this.jsonMode?function(e){return e.replace(/([,{])/g,"$1\n").replace(/}/g,"\n}")}:function(e){return e.replace(/(;|\{|\})([^\r\n;])/g,"$1\n$2")},r=t(e),o="";if(null!=r){for(var a=0;a<r.length;a++)r[a].start>n&&(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<e.length&&(o+=i(e.substr(n)))}else o=i(e);return o.replace(/^\n*|\n*$/,"")}});e.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",noBreak:!1,noBreakEmpty:null,tagType:"",tagName:"",isXML:!1,newlineAfterToken:function(e,t,n,i){var r="a|b|bdi|bdo|big|center|cite|del|em|font|i|img|ins|s|small|span|strike|strong|sub|sup|u",o="label|li|option|textarea|title|"+r,a=!1,l=null,s="";if(this.isXML="xml"==this.configuration,"comment"==e||/<!--/.test(n))return!1;if("tag"==e){if(0==t.indexOf("<")&&0==!t.indexOf("</")){this.tagType="open",l=t.match(/^<\s*?([\w]+?)$/i),this.tagName=null!=l?l[1]:"";var s=this.tagName.toLowerCase();-1!=("|"+o+"|").indexOf("|"+s+"|")&&(this.noBreak=!0)}if(0==t.indexOf(">")&&"open"==this.tagType){this.tagType="";var c=this.isXML?"[^<]*?":"";return RegExp("^"+c+"</s*?"+this.tagName+"s*?>","i").test(n)?(this.noBreak=!1,this.isXML||(this.tagName=""),!1):(a=this.noBreak,this.noBreak=!1,!a)}if(0==t.indexOf("</")&&(this.tagType="close",l=t.match(/^<\/\s*?([\w]+?)$/i),null!=l&&(s=l[1].toLowerCase()),-1!=("|"+r+"|").indexOf("|"+s+"|")&&(this.noBreak=!0)),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<a.length;++d){for(var h=new e.StringStream(a[d],s);!h.eol();){var m=e.innerMode(o,l),g=o.token(h,l),p=h.current();h.start=h.pos,u&&!/\S/.test(p)||(c+=p,u=!1),!u&&m.mode.newlineAfterToken&&m.mode.newlineAfterToken(g,p,h.string.slice(h.pos)||a[d+1]||"",m.state)&&i()}!h.pos&&o.blankLine&&o.blankLine(l),!u&&d<a.length-1&&i()}r.operation(function(){r.replaceRange(c,t,n);for(var e=t.line+1,i=t.line+f;e<=i;++e)r.indentLine(e,"smart");r.setSelection(t,r.getCursor(!1))})})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/selection/active-line.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",o),e.removeLineClass(e.state.activeLines[t],"background",a),e.removeLineClass(e.state.activeLines[t],"gutter",l)}function n(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function i(e,i){for(var r=[],s=0;s<i.length;s++){var c=i[s],f=e.getOption("styleActiveLine");if("object"==typeof f&&f.nonEmpty?c.anchor.line==c.head.line:c.empty()){var u=e.getLineHandleVisualStart(c.head.line);r[r.length-1]!=u&&r.push(u)}}n(e.state.activeLines,r)||e.operation(function(){t(e);for(var n=0;n<r.length;n++)e.addLineClass(r[n],"wrap",o),e.addLineClass(r[n],"background",a),e.addLineClass(r[n],"gutter",l);e.state.activeLines=r})}function r(e,t){i(e,t.ranges)}var o="CodeMirror-activeline",a="CodeMirror-activeline-background",l="CodeMirror-activeline-gutter";e.defineOption("styleActiveLine",!1,function(n,o,a){var l=a!=e.Init&&a;o!=l&&(l&&(n.off("beforeSelectionChange",r),t(n),delete n.state.activeLines),o&&(n.state.activeLines=[],i(n,n.listSelections()),n.on("beforeSelectionChange",r)))})}),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 t(e){var t=e.flags
|
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;f++){var u=e.getLine(s++);a=null==a?u:a+"\n"+u}l*=2,t.lastIndex=o.ch;var d=t.exec(a);if(d){var h=a.slice(0,d.index).split("\n"),m=d[0].split("\n"),p=o.line+h.length-1,v=h[h.length-1].length;return{from:g(p,v),to:g(p+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:d}}}}function a(e,t){for(var n,i=0;;){t.lastIndex=i;var r=t.exec(e);if(!r)return n;if(n=r,(i=n.index+(n[0].length||1))==e.length)return n}}function l(e,t,i){t=n(t);for(var r=i.line,o=i.ch,l=e.firstLine();r>=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<o;c++){var f=e.getLine(l--);r=null==r?f.slice(0,i.ch):f+"\n"+r}o*=2;var u=a(r,t);if(u){var d=r.slice(0,u.index).split("\n"),h=u[0].split("\n"),m=l+d.length,p=d[d.length-1].length;return{from:g(m,p),to:g(m+h.length-1,1==h.length?p+h[0].length:h[h.length-1].length),match:u}}}}function c(e,t,n,i){if(e.length==t.length)return n;for(var r=0,o=n+Math.max(0,e.length-t.length);;){if(r==o)return r;var a=r+o>>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<o.length-1;v++)if(r(e.getLine(a+v))!=o[v])continue e;var b=e.getLine(a+o.length-1),x=r(b),y=o[o.length-1];if(b.slice(0,y.length)==y)return{from:g(a,c(f,u,p,r)+l),to:g(a+o.length-1,c(b,x,y.length,r))}}}}function u(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.firstLine()-1+o.length;a>=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;v<o.length-1;v++)if(r(e.getLine(n+v))!=o[v])continue e;var b=e.getLine(a+1-o.length),x=r(b);if(x.slice(x.length-o[0].length)==o[0])return{from:g(a+1-o.length,c(b,x,b.length-o[0].length,r)),to:g(a,c(f,u,p.length,r))}}}}function d(e,t,i,a){this.atOccurrence=!1,this.doc=e,i=i?e.clipPos(i):g(0,0),this.pos={from:i,to:i};var c;"object"==typeof a?c=a.caseFold:(c=a,a=null),"string"==typeof t?(null==c&&(c=!1),this.matches=function(n,i){return(n?u:f)(e,t,i,c)}):(t=n(t),a&&!1===a.multiline?this.matches=function(n,i){return(n?l:r)(e,t,i)}:this.matches=function(n,i){return(n?s:o)(e,t,i)})}var h,m,g=e.Pos;String.prototype.normalize?(h=function(e){return e.normalize("NFD").toLowerCase()},m=function(e){return e.normalize("NFD")}):(h=function(e){return e.toLowerCase()},m=function(e){return e}),d.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var n=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));n&&0==e.cmpPos(n.from,n.to);)t?n.from.ch?n.from=g(n.from.line,n.from.ch-1):n=n.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(g(n.from.line-1))):n.to.ch<this.doc.getLine(n.to.line).length?n.to=g(n.to.line,n.to.ch+1):n=n.to.line==this.doc.lastLine()?null:this.matches(t,g(n.to.line+1,0));if(n)return this.pos=n,this.atOccurrence=!0,this.pos.match||!0;var i=g(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=g(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,t,n){return new d(this.doc,e,t,n)}),e.defineDocExtension("getSearchCursor",function(e,t,n){return new d(this,e,t,n)}),e.defineExtension("selectMatches",function(t,n){for(var i=[],r=this.getSearchCursor(t,this.getCursor("from"),n);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)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;d<o.length;d++){var h=o[d];if(!(h.to.line>f)){for(var m=u||t(h.from,!0)*i,g=t(h.to,!1)*i;d<o.length-1&&!(o[d+1].to.line>f)&&!((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.matches.length;t++){var n=this.matches[t];if(n.from.line>=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<this.matches.length;a++){var l=this.matches[a],s=n(l.from.line,i,o);s!=l.from.line&&(l.from=e.Pos(s,l.from.ch));var c=n(l.to.line,i,o);c!=l.to.line&&(l.to=e.Pos(c,l.to.ch))}clearTimeout(this.update);var f=this;this.update=setTimeout(function(){f.updateAfterChange()},250)},t.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},t.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define("addon/search/match-highlighter.js",["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}(function(e){"use strict";function t(e){this.options={};for(var t in u)this.options[t]=(e&&e.hasOwnProperty(t)?e:u)[t];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function n(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&r(e,t)}function i(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,r(e,t))}function r(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(function(){l(e)},t.options.delay)}function o(e,t,n,i){var r=e.state.matchHighlighter;if(e.addOverlay(r.overlay=f(t,n,i)),r.options.annotateScrollbar&&e.showMatchesOnScrollbar){var o=n?new RegExp("\\b"+t+"\\b"):t;r.matchesonscroll=e.showMatchesOnScrollbar(o,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function a(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(e){e.operation(function(){var t=e.state.matchHighlighter;if(a(e),!e.somethingSelected()&&t.options.showToken){for(var n=!0===t.options.showToken?/[\w$]/:t.options.showToken,i=e.getCursor(),r=e.getLine(i.line),l=i.ch,c=l;l&&n.test(r.charAt(l-1));)--l;for(;c<r.length&&n.test(r.charAt(c));)++c;return void(l<c&&o(e,r.slice(l,c),n,t.options.style))}var f=e.getCursor("from"),u=e.getCursor("to");if(f.line==u.line&&(!t.options.wordsOnly||s(e,f,u))){var d=e.getRange(f,u);t.options.trim&&(d=d.replace(/^\s+|\s+$/g,"")),d.length>=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<e.getLine(t.line).length){var i={line:n.line,ch:n.ch+1},r=e.getRange(n,i);if(null===r.match(/\W/))return!1}return!0}return!1}function c(e,t){return!(e.start&&t.test(e.string.charAt(e.start-1))||e.pos!=e.string.length&&t.test(e.string.charAt(e.pos)))}function f(e,t,n){return{token:function(i){if(i.match(e)&&(!t||c(i,t)))return n;i.next(),i.skipTo(e.charAt(0))||i.skipToEnd()}}}var u={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};e.defineOption("highlightSelectionMatches",!1,function(r,o,s){if(s&&s!=e.Init&&(a(r),clearTimeout(r.state.matchHighlighter.timeout),r.state.matchHighlighter=null,r.off("cursorActivity",n),r.off("focus",i)),o){var c=r.state.matchHighlighter=new t(o);r.hasFocus()?(c.active=!0,l(r)):r.on("focus",i),r.on("cursorActivity",n)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define("addon/mode/multiplex.js",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.multiplexingMode=function(t){function n(e,t,n,i){if("string"==typeof t){var r=e.indexOf(t,n);return i&&r>-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<i.length;++u){var d=i[u],s=n(l,d.open,r.pos);if(s==r.pos)return d.parseDelimiters||r.match(d.open),o.innerActive=d,o.inner=e.startState(d.mode,t.indent?t.indent(o.outer,""):0),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open";-1!=s&&s<f&&(f=s)}f!=1/0&&(r.string=l.slice(0,f));var h=t.token(r,o.outer);return f!=1/0&&(r.string=l),h},indent:function(n,i){var r=n.innerActive?n.innerActive.mode:t;return r.indent?r.indent(n.innerActive?n.inner:n.outer,i):e.Pass},blankLine:function(n){var r=n.innerActive?n.innerActive.mode:t;if(r.blankLine&&r.blankLine(n.innerActive?n.inner:n.outer),n.innerActive)"\n"===n.innerActive.close&&(n.innerActive=n.inner=null);else for(var o=0;o<i.length;++o){var a=i[o];"\n"===a.open&&(n.innerActive=a,n.inner=e.startState(a.mode,r.indent?r.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){"function"==typeof e.define&&e.define("addons",["addon/comment/continuecomment.js","addon/edit/closebrackets.js","addon/edit/closetag.js","addon/edit/matchbrackets.js","addon/edit/matchtags.js","addon/edit/trailingspace.js","addon/fold/foldgutter.js","addon/fold/brace-fold.js","addon/fold/comment-fold.js","addon/fold/indent-fold.js","addon/format/autoFormatAll.js","addon/format/formatting.js","addon/selection/active-line.js","addon/search/match-highlighter.js","addon/mode/multiplex.js"],function(){})}(this);
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){function t(n,t,i){var u=n.getWrapperElement(),r;return r=u.appendChild(document.createElement("div")),r.className=i?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top",typeof t=="string"?r.innerHTML=t:r.appendChild(t),r}function i(n,t){n.state.currentNotificationClose&&n.state.currentNotificationClose();n.state.currentNotificationClose=t}n.defineExtension("openDialog",function(r,u,f){function o(n){if(typeof n=="string")e.value=n;else{if(c)return;if(c=!0,s.parentNode.removeChild(s),l.focus(),f.onClose)f.onClose(s)}}var e,h;f||(f={});i(this,null);var s=t(this,r,f.bottom),c=!1,l=this;if(e=s.getElementsByTagName("input")[0],e){if(e.focus(),f.value&&(e.value=f.value,f.selectValueOnOpen!==!1&&e.select()),f.onInput)n.on(e,"input",function(n){f.onInput(n,e.value,o)});if(f.onKeyUp)n.on(e,"keyup",function(n){f.onKeyUp(n,e.value,o)});n.on(e,"keydown",function(t){f&&f.onKeyDown&&f.onKeyDown(t,e.value,o)||((t.keyCode==27||f.closeOnEnter!==!1&&t.keyCode==13)&&(e.blur(),n.e_stop(t),o()),t.keyCode==13&&u(e.value,t))});if(f.closeOnBlur!==!1)n.on(e,"blur",o)}else if(h=s.getElementsByTagName("button")[0]){n.on(h,"click",function(){o();l.focus()});if(f.closeOnBlur!==!1)n.on(h,"blur",o);h.focus()}return o});n.defineExtension("openConfirm",function(r,u,f){function v(){l||(l=!0,s.parentNode.removeChild(s),a.focus())}var e,o;i(this,null);var s=t(this,r,f&&f.bottom),h=s.getElementsByTagName("button"),l=!1,a=this,c=1;for(h[0].focus(),e=0;e<h.length;++e){o=h[e],function(t){n.on(o,"click",function(i){n.e_preventDefault(i);v();t&&t(a)})}(u[e]);n.on(o,"blur",function(){--c;setTimeout(function(){c<=0&&v()},200)});n.on(o,"focus",function(){++c})}});n.defineExtension("openNotification",function(r,u){function f(){o||(o=!0,clearTimeout(s),e.parentNode.removeChild(e))}i(this,f);var e=t(this,r,u&&u.bottom),o=!1,s,h=u&&typeof u.duration!="undefined"?u.duration:5e3;n.on(e,"click",function(t){n.e_preventDefault(t);f()});return h&&(s=setTimeout(f,h)),f})}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):typeof define=="function"&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],n):n(CodeMirror)}(function(n){"use strict";function y(n,t){return typeof n=="string"?n=new RegExp(n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):n.global||(n=new RegExp(n.source,n.ignoreCase?"gi":"g")),{token:function(t){n.lastIndex=t.pos;var i=n.exec(t.string);if(i&&i.index==t.pos)return t.pos+=i[0].length||1,"searching";i?t.pos=i.index:t.skipToEnd()}}}function p(){this.posFrom=this.posTo=this.lastQuery=this.query=null;this.overlay=null}function i(n){return n.state.search||(n.state.search=new p)}function f(n){return typeof n=="string"&&n==n.toLowerCase()}function r(n,t,i){return n.getSearchCursor(t,i,f(t))}function w(n,t,i,r,f){n.openDialog(t,r,{value:i,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){u(n)},onKeyDown:f})}function s(n,t,i,r,u){n.openDialog?n.openDialog(t,u,{value:r,selectValueOnOpen:!0}):u(prompt(i,r))}function b(n,t,i,r){n.openConfirm?n.openConfirm(t,r):confirm(i)&&r[0]()}function h(n){return n.replace(/\\(.)/g,function(n,t){return t=="n"?"\n":t=="r"?"\r":t})}function c(n){var t=n.match(/^\/(.*)\/([a-z]*)$/);if(t)try{n=new RegExp(t[1],t[2].indexOf("i")==-1?"":"i")}catch(i){}else n=h(n);return(typeof n=="string"?n=="":n.test(""))&&(n=/x^/),n}function e(n,t,i){t.queryText=i;t.query=c(i);n.removeOverlay(t.overlay,f(t.query));t.overlay=y(t.query,f(t.query));n.addOverlay(t.overlay);n.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=n.showMatchesOnScrollbar(t.query,f(t.query)))}function t(t,r,u,f){var h=i(t),c,a,v;if(h.query)return o(t,r);c=t.getSelection()||h.lastQuery;u&&t.openDialog?(a=null,v=function(i,r){(n.e_stop(r),i)&&(i!=h.queryText&&(e(t,h,i),h.posFrom=h.posTo=t.getCursor()),a&&(a.style.opacity=1),o(t,r.shiftKey,function(n,i){var r;i.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(i,"window").top&&((a=r).style.opacity=.4)}))},w(t,l,c,v,function(r,u){var o=n.keyName(r),f=n.keyMap[t.getOption("keyMap")][o];f||(f=t.getOption("extraKeys")[o]);f=="findNext"||f=="findPrev"||f=="findPersistentNext"||f=="findPersistentPrev"?(n.e_stop(r),e(t,i(t),u),t.execCommand(f)):(f=="find"||f=="findPersistent")&&(n.e_stop(r),v(u,r))}),f&&c&&(e(t,h,c),o(t,r))):s(t,l,"Search for:",c,function(n){n&&!h.query&&t.operation(function(){e(t,h,n);h.posFrom=h.posTo=t.getCursor();o(t,r)})})}function o(t,u,f){t.operation(function(){var o=i(t),e=r(t,o.query,u?o.posFrom:o.posTo);(e.find(u)||(e=r(t,o.query,u?n.Pos(t.lastLine()):n.Pos(t.firstLine(),0)),e.find(u)))&&(t.setSelection(e.from(),e.to()),t.scrollIntoView({from:e.from(),to:e.to()},20),o.posFrom=e.from(),o.posTo=e.to(),f&&f(e.from(),e.to()))})}function u(n){n.operation(function(){var t=i(n);(t.lastQuery=t.query,t.query)&&(t.query=t.queryText=null,n.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function a(n,t,i){n.operation(function(){for(var f,u=r(n,t);u.findNext();)typeof t!="string"?(f=n.getRange(u.from(),u.to()).match(t),u.replace(i.replace(/\$(\d)/g,function(n,t){return f[t]}))):u.replace(i)})}function v(n,t){if(!n.getOption("readOnly")){var e=n.getSelection()||i(n).lastQuery,f=t?"Replace all:":"Replace:";s(n,f+k,f,e,function(i){i&&(i=c(i),s(n,d,"Replace with:","",function(f){if(f=h(f),t)a(n,i,f);else{u(n);var e=r(n,i,n.getCursor("from")),o=function(){var t=e.from(),u;((u=e.findNext())||(e=r(n,i),(u=e.findNext())&&(!t||e.from().line!=t.line||e.from().ch!=t.ch)))&&(n.setSelection(e.from(),e.to()),n.scrollIntoView({from:e.from(),to:e.to()}),b(n,g,"Replace?",[function(){s(u)},o,function(){a(n,i,f)}]))},s=function(n){e.replace(typeof i=="string"?f:f.replace(/\$(\d)/g,function(t,i){return n[i]}));o()};o()}}))})}}var l='Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)<\/span>',k=' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)<\/span>',d='With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',g="Replace? <button>Yes<\/button> <button>No<\/button> <button>All<\/button> <button>Stop<\/button>";n.commands.find=function(n){u(n);t(n)};n.commands.findPersistent=function(n){u(n);t(n,!1,!0)};n.commands.findPersistentNext=function(n){t(n,!1,!0,!0)};n.commands.findPersistentPrev=function(n){t(n,!0,!0,!0)};n.commands.findNext=t;n.commands.findPrev=function(n){t(n,!0)};n.commands.clearSearch=u;n.commands.replace=v;n.commands.replaceAll=function(n){v(n,!0)}}),function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";function i(n,i,u,f){var h,o,e,s;this.atOccurrence=!1;this.doc=n;f==null&&typeof i=="string"&&(f=!1);u=u?n.clipPos(u):t(0,0);this.pos={from:u,to:u};typeof i!="string"?(i.global||(i=new RegExp(i.source,i.ignoreCase?"ig":"g")),this.matches=function(r,u){var o,h,f,s,c,e;if(r){for(i.lastIndex=0,o=n.getLine(u.line).slice(0,u.ch),h=0;;){if(i.lastIndex=h,c=i.exec(o),!c)break;if(f=c,s=f.index,h=f.index+(f[0].length||1),h==o.length)break}e=f&&f[0].length||0;e||(s==0&&o.length==0?f=undefined:s!=n.getLine(u.line).length&&e++)}else{i.lastIndex=u.ch;var o=n.getLine(u.line),f=i.exec(o),e=f&&f[0].length||0,s=f&&f.index;s+e==o.length||e||(e=1)}if(f&&e)return{from:t(u.line,s),to:t(u.line,s+e),match:f}}):(h=i,f&&(i=i.toLowerCase()),o=f?function(n){return n.toLowerCase()}:function(n){return n},e=i.split("\n"),e.length==1?this.matches=i.length?function(u,f){if(u){var s=n.getLine(f.line).slice(0,f.ch),c=o(s),e=c.lastIndexOf(i);if(e>-1)return e=r(s,c,e),{from:t(f.line,e),to:t(f.line,e+h.length)}}else{var s=n.getLine(f.line).slice(f.ch),c=o(s),e=c.indexOf(i);if(e>-1)return e=r(s,c,e)+f.ch,{from:t(f.line,e),to:t(f.line,e+h.length)}}}:function(){}:(s=h.split("\n"),this.matches=function(i,r){var h=e.length-1,a,c,l,v,u,f;if(i){if(r.line-(e.length-1)<n.firstLine())return;if(o(n.getLine(r.line).slice(0,s[h].length))!=e[e.length-1])return;for(a=t(r.line,s[h].length),u=r.line-1,f=h-1;f>=1;--f,--u)if(e[f]!=o(n.getLine(u)))return;return(c=n.getLine(u),l=c.length-s[0].length,o(c.slice(l))!=e[0])?void 0:{from:t(u,l),to:a}}if(!(r.line+(e.length-1)>n.lastLine())&&(c=n.getLine(r.line),l=c.length-s[0].length,o(c.slice(l))==e[0])){for(v=t(r.line,l),u=r.line+1,f=1;f<h;++f,++u)if(e[f]!=o(n.getLine(u)))return;if(o(n.getLine(u).slice(0,s[h].length))==e[h])return{from:v,to:t(u,s[h].length)}}}))}function r(n,t,i){var r,u;if(n.length==t.length)return i;for(r=Math.min(i,n.length);;)if(u=n.slice(0,r).toLowerCase().length,u<i)++r;else if(u>i)--r;else return r}var t=n.Pos;i.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){function f(n){var i=t(n,0);return u.pos={from:i,to:i},u.atOccurrence=!1,!1}for(var u=this,i=this.doc.clipPos(n?this.pos.from:this.pos.to),r;;){if(this.pos=this.matches(n,i))return this.atOccurrence=!0,this.pos.match||!0;if(n){if(!i.line)return f(0);i=t(i.line-1,this.doc.getLine(i.line-1).length)}else{if(r=this.doc.lineCount(),i.line==r-1)return f(r);i=t(i.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(i,r){if(this.atOccurrence){var u=n.splitLines(i);this.doc.replaceRange(u,this.pos.from,this.pos.to,r);this.pos.to=t(this.pos.from.line+u.length-1,u[u.length-1].length+(u.length==1?this.pos.from.ch:0))}}};n.defineExtension("getSearchCursor",function(n,t,r){return new i(this.doc,n,t,r)});n.defineDocExtension("getSearchCursor",function(n,t,r){return new i(this,n,t,r)});n.defineExtension("selectMatches",function(t,i){for(var u=[],r=this.getSearchCursor(t,this.getCursor("from"),i);r.findNext();){if(n.cmpPos(r.to(),this.getCursor("to"))>0)break;u.push({anchor:r.from(),head:r.to()})}u.length&&this.setSelections(u,0)})})
|
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;u++){var f=e.getLine(l++);s=null==s?f:s+"\n"+f}c*=2,n.lastIndex=i.ch;var h=n.exec(s);if(h){var d=s.slice(0,h.index).split("\n"),p=h[0].split("\n"),m=i.line+d.length-1,v=d[d.length-1].length;return{from:g(m,v),to:g(m+p.length-1,1==p.length?v+p[0].length:p[p.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 c(e,n,o){n=t(n);for(var r=o.line,i=o.ch,c=e.firstLine();r>=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<i;a++){var u=e.getLine(c--);r=null==r?u.slice(0,o.ch):u+"\n"+r}i*=2;var f=s(r,n);if(f){var h=r.slice(0,f.index).split("\n"),d=f[0].split("\n"),p=c+h.length,m=h[h.length-1].length;return{from:g(p,m),to:g(p+d.length-1,1==d.length?m+d[0].length:d[d.length-1].length),match:f}}}}function a(e,n,t,o){if(e.length==n.length)return t;for(var r=0,i=t+Math.max(0,e.length-n.length);;){if(r==i)return r;var s=r+i>>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<i.length-1;v++)if(r(e.getLine(s+v))!=i[v])continue e;var y=e.getLine(s+i.length-1),x=r(y),C=i[i.length-1];if(y.slice(0,C.length)==C)return{from:g(s,a(u,f,m,r)+c),to:g(s+i.length-1,a(y,x,C.length,r))}}}}function f(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.firstLine()-1+i.length;s>=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;v<i.length-1;v++)if(r(e.getLine(t+v))!=i[v])continue e;var y=e.getLine(s+1-i.length),x=r(y);if(x.slice(x.length-i[0].length)==i[0])return{from:g(s+1-i.length,a(y,x,y.length-i[0].length,r)),to:g(s,a(u,f,m.length,r))}}}}function h(e,n,o,s){this.atOccurrence=!1,this.doc=e,o=o?e.clipPos(o):g(0,0),this.pos={from:o,to:o};var a;"object"==typeof s?a=s.caseFold:(a=s,s=null),"string"==typeof n?(null==a&&(a=!1),this.matches=function(t,o){return(t?f:u)(e,n,o,a)}):(n=t(n),s&&!1===s.multiline?this.matches=function(t,o){return(t?c:r)(e,n,o)}:this.matches=function(t,o){return(t?l:i)(e,n,o)})}var d,p,g=e.Pos;String.prototype.normalize?(d=function(e){return e.normalize("NFD").toLowerCase()},p=function(e){return e.normalize("NFD")}):(d=function(e){return e.toLowerCase()},p=function(e){return e}),h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){for(var t=this.matches(n,this.doc.clipPos(n?this.pos.from:this.pos.to));t&&0==e.cmpPos(t.from,t.to);)n?t.from.ch?t.from=g(t.from.line,t.from.ch-1):t=t.from.line==this.doc.firstLine()?null:this.matches(n,this.doc.clipPos(g(t.from.line-1))):t.to.ch<this.doc.getLine(t.to.line).length?t.to=g(t.to.line,t.to.ch+1):t=t.to.line==this.doc.lastLine()?null:this.matches(n,g(t.to.line+1,0));if(t)return this.pos=t,this.atOccurrence=!0,this.pos.match||!0;var o=g(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,t){if(this.atOccurrence){var o=e.splitLines(n);this.doc.replaceRange(o,this.pos.from,this.pos.to,t),this.pos.to=g(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,t){return new h(this.doc,e,n,t)}),e.defineDocExtension("getSearchCursor",function(e,n,t){return new h(this,e,n,t)}),e.defineExtension("selectMatches",function(n,t){for(var o=[],r=this.getSearchCursor(n,this.getCursor("from"),t);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)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;h<l.length;++h){var d=l[h];!function(n){e.on(d,"click",function(t){e.e_preventDefault(t),s(),n&&n(u)})}(r[h]),e.on(d,"blur",function(){--f,setTimeout(function(){f<=0&&s()},200)}),e.on(d,"focus",function(){++f})}}),e.defineExtension("openNotification",function(o,r){function i(){l||(l=!0,clearTimeout(s),c.parentNode.removeChild(c))}t(this,i);var s,c=n(this,o,r&&r.bottom),l=!1,a=r&&void 0!==r.duration?r.duration:5e3;return e.on(c,"click",function(n){e.e_preventDefault(n),i()}),a&&(s=setTimeout(i,a)),i})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define("addon/search/search.js",["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function n(e,n){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var t=e.exec(n.string);if(t&&t.index==n.pos)return n.pos+=t[0].length||1,"searching";t?n.pos=t.index:n.skipToEnd()}}}function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function o(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,n,t){return e.getSearchCursor(n,t,{caseFold:r(n),multiline:!0})}function s(e,n,t,o,r){e.openDialog(n,o,{value:t,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){p(e)},onKeyDown:r})}function c(e,n,t,o,r){e.openDialog?e.openDialog(n,r,{value:o,selectValueOnOpen:!0}):r(prompt(t,o))}function l(e,n,t,o){e.openConfirm?e.openConfirm(n,o):confirm(t)&&o[0]()}function a(e){return e.replace(/\\(.)/g,function(e,n){return"n"==n?"\n":"r"==n?"\r":n})}function u(e){var n=e.match(/^\/(.*)\/([a-z]*)$/);if(n)try{e=new RegExp(n[1],-1==n[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,t,o){t.queryText=o,t.query=u(o),e.removeOverlay(t.overlay,r(t.query)),t.overlay=n(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function h(n,t,r,i){var l=o(n);if(l.query)return d(n,t);var a=n.getSelection()||l.lastQuery;if(a instanceof RegExp&&"x^"==a.source&&(a=null),r&&n.openDialog){var u=null,h=function(t,o){e.e_stop(o),t&&(t!=l.queryText&&(f(n,l,t),l.posFrom=l.posTo=n.getCursor()),u&&(u.style.opacity=1),d(n,o.shiftKey,function(e,t){var o;t.line<3&&document.querySelector&&(o=n.display.wrapper.querySelector(".CodeMirror-dialog"))&&o.getBoundingClientRect().bottom-4>n.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='<span class="CodeMirror-search-label">'+(n?"Replace all:":"Replace:")+"</span>";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='<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',y=' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',x='<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',C='<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>';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 +1,6 @@
|
|
1
|
-
(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?module.exports=a():typeof define==="function"&&define.amd?define(a):(b.CodeMirror=a())}(this,(function(){var ea=navigator.userAgent;var el=navigator.platform;var ct=/gecko\/\d/i.test(ea);var e1=/MSIE \d/.test(ea);var bM=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ea);var dS=e1||bM;var l=dS&&(e1?document.documentMode||6:bM[1]);var c6=/WebKit\//.test(ea);var dV=c6&&/Qt\/\d+\.\d+/.test(ea);var dk=/Chrome\//.test(ea);var ec=/Opera\//.test(ea);var aC=/Apple Computer/.test(navigator.vendor);var dd=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ea);var fN=/PhantomJS/.test(ea);var fj=/AppleWebKit/.test(ea)&&/Mobile\/\w+/.test(ea);var er=fj||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ea);var cb=fj||/Mac/.test(el);var f6=/\bCrOS\b/.test(ea);var aP=/win/i.test(el);var aZ=ec&&ea.match(/Version\/(\d*\.\d*)/);if(aZ){aZ=Number(aZ[1])}if(aZ&&aZ>=15){ec=false;c6=true}var bT=cb&&(dV||ec&&(aZ==null||aZ<12.11));var gC=ct||(dS&&l>=9);function R(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var h=function(gO,i){var gP=gO.className;var gN=R(i).exec(gP);if(gN){var gQ=gP.slice(gN.index+gN[0].length);gO.className=gP.slice(0,gN.index)+(gQ?gN[1]+gQ:"")}};function eb(gN){for(var i=gN.childNodes.length;i>0;--i){gN.removeChild(gN.firstChild)}return gN}function bV(i,gN){return eb(i).appendChild(gN)}function gv(gN,gR,gQ,gP){var gS=document.createElement(gN);if(gQ){gS.className=gQ}if(gP){gS.style.cssText=gP}if(typeof gR=="string"){gS.appendChild(document.createTextNode(gR))}else{if(gR){for(var gO=0;gO<gR.length;++gO){gS.appendChild(gR[gO])}}}return gS}var cr;if(document.createRange){cr=function(gP,gQ,gN,i){var gO=document.createRange();gO.setEnd(i||gP,gN);gO.setStart(gP,gQ);return gO}}else{cr=function(gO,gQ,i){var gN=document.body.createTextRange();try{gN.moveToElementText(gO.parentNode)}catch(gP){return gN}gN.collapse(true);gN.moveEnd("character",i);gN.moveStart("character",gQ);return gN}}function gD(i,gN){if(gN.nodeType==3){gN=gN.parentNode}if(i.contains){return i.contains(gN)}do{if(gN.nodeType==11){gN=gN.host}if(gN==i){return true}}while(gN=gN.parentNode)}function dW(){var i;try{i=document.activeElement}catch(gN){i=document.body||null}while(i&&i.root&&i.root.activeElement){i=i.root.activeElement}return i}function fW(gN,i){var gO=gN.className;if(!R(i).test(gO)){gN.className+=(gO?" ":"")+i}}function gl(gP,gN){var gO=gP.split(" ");for(var gQ=0;gQ<gO.length;gQ++){if(gO[gQ]&&!R(gO[gQ]).test(gN)){gN+=" "+gO[gQ]}}return gN}var dT=function(i){i.select()};if(fj){dT=function(i){i.selectionStart=0;i.selectionEnd=i.value.length}}else{if(dS){dT=function(gN){try{gN.select()}catch(i){}}}}function cA(gN){var i=Array.prototype.slice.call(arguments,1);return function(){return gN.apply(null,i)}}function aN(gO,gN,i){if(!gN){gN={}}for(var gP in gO){if(gO.hasOwnProperty(gP)&&(i!==false||!gN.hasOwnProperty(gP))){gN[gP]=gO[gP]}}return gN}function bU(gQ,gO,gS,gT,gP){if(gO==null){gO=gQ.search(/[^\s\u00a0]/);if(gO==-1){gO=gQ.length}}for(var gR=gT||0,gU=gP||0;;){var gN=gQ.indexOf("\t",gR);if(gN<0||gN>=gO){return gU+(gO-gR)}gU+=gN-gR;gU+=gS-(gU%gS);gR=gN+1}}function gM(){this.id=null}gM.prototype.set=function(i,gN){clearTimeout(this.id);this.id=setTimeout(gN,i)};function dr(gP,gN){for(var gO=0;gO<gP.length;++gO){if(gP[gO]==gN){return gO}}return -1}var dR=30;var cg={toString:function(){return"CodeMirror.Pass"}};var Y={scroll:false};var L={origin:"*mouse"};var c2={origin:"+move"};function eC(gQ,gP,gR){for(var gS=0,gO=0;;){var gN=gQ.indexOf("\t",gS);if(gN==-1){gN=gQ.length}var i=gN-gS;if(gN==gQ.length||gO+i>=gP){return gS+Math.min(i,gP-gO)}gO+=gN-gS;gO+=gR-(gO%gR);gS=gN+1;if(gO>=gP){return gS}}}var a0=[""];function cu(i){while(a0.length<=i){a0.push(f2(a0)+" ")}return a0[i]}function f2(i){return i[i.length-1]}function bW(gQ,gP){var gN=[];for(var gO=0;gO<gQ.length;gO++){gN[gO]=gP(gQ[gO],gO)}return gN}function ce(gQ,gN,gO){var gP=0,i=gO(gN);while(gP<gQ.length&&gO(gQ[gP])<=i){gP++}gQ.splice(gP,0,gN)}function gm(){}function cp(gO,i){var gN;if(Object.create){gN=Object.create(gO)}else{gm.prototype=gO;gN=new gm()}if(i){aN(i,gN)}return gN}var bc=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function fZ(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||bc.test(i))}function cF(i,gN){if(!gN){return fZ(i)}if(gN.source.indexOf("\\w")>-1&&fZ(i)){return true}return gN.test(i)}function fc(i){for(var gN in i){if(i.hasOwnProperty(gN)&&i[gN]){return false}}return true}var e0=/[\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 fI(i){return i.charCodeAt(0)>=768&&e0.test(i)}function eY(i,gO,gN){var gP=this;this.input=gN;gP.scrollbarFiller=gv("div",null,"CodeMirror-scrollbar-filler");gP.scrollbarFiller.setAttribute("cm-not-content","true");gP.gutterFiller=gv("div",null,"CodeMirror-gutter-filler");gP.gutterFiller.setAttribute("cm-not-content","true");gP.lineDiv=gv("div",null,"CodeMirror-code");gP.selectionDiv=gv("div",null,null,"position: relative; z-index: 1");gP.cursorDiv=gv("div",null,"CodeMirror-cursors");gP.measure=gv("div",null,"CodeMirror-measure");gP.lineMeasure=gv("div",null,"CodeMirror-measure");gP.lineSpace=gv("div",[gP.measure,gP.lineMeasure,gP.selectionDiv,gP.cursorDiv,gP.lineDiv],null,"position: relative; outline: none");gP.mover=gv("div",[gv("div",[gP.lineSpace],"CodeMirror-lines")],null,"position: relative");gP.sizer=gv("div",[gP.mover],"CodeMirror-sizer");gP.sizerWidth=null;gP.heightForcer=gv("div",null,null,"position: absolute; height: "+dR+"px; width: 1px;");gP.gutters=gv("div",null,"CodeMirror-gutters");gP.lineGutter=null;gP.scroller=gv("div",[gP.sizer,gP.heightForcer,gP.gutters],"CodeMirror-scroll");gP.scroller.setAttribute("tabIndex","-1");gP.wrapper=gv("div",[gP.scrollbarFiller,gP.gutterFiller,gP.scroller],"CodeMirror");if(dS&&l<8){gP.gutters.style.zIndex=-1;gP.scroller.style.paddingRight=0}if(!c6&&!(ct&&er)){gP.scroller.draggable=true}if(i){if(i.appendChild){i.appendChild(gP.wrapper)}else{i(gP.wrapper)}}gP.viewFrom=gP.viewTo=gO.first;gP.reportedViewFrom=gP.reportedViewTo=gO.first;gP.view=[];gP.renderedView=null;gP.externalMeasured=null;gP.viewOffset=0;gP.lastWrapHeight=gP.lastWrapWidth=0;gP.updateLineNumbers=null;gP.nativeBarWidth=gP.barHeight=gP.barWidth=0;gP.scrollbarsClipped=false;gP.lineNumWidth=gP.lineNumInnerWidth=gP.lineNumChars=null;gP.alignWidgets=false;gP.cachedCharWidth=gP.cachedTextHeight=gP.cachedPaddingH=null;gP.maxLine=null;gP.maxLineLength=0;gP.maxLineChanged=false;gP.wheelDX=gP.wheelDY=gP.wheelStartX=gP.wheelStartY=null;gP.shift=false;gP.selForContextMenu=null;gP.activeTouch=null;gN.init(gP)}function fy(gQ,gS){gS-=gQ.first;if(gS<0||gS>=gQ.size){throw new Error("There is no line "+(gS+gQ.first)+" in the document.")}var gN=gQ;while(!gN.lines){for(var gO=0;;++gO){var gR=gN.children[gO],gP=gR.chunkSize();if(gS<gP){gN=gR;break}gS-=gP}}return gN.lines[gS]}function gw(gO,gQ,i){var gN=[],gP=gQ.line;gO.iter(gQ.line,i.line+1,function(gR){var gS=gR.text;if(gP==i.line){gS=gS.slice(0,i.ch)}if(gP==gQ.line){gS=gS.slice(gQ.ch)}gN.push(gS);++gP});return gN}function a2(gN,gP,gO){var i=[];gN.iter(gP,gO,function(gQ){i.push(gQ.text)});return i}function gz(gN,i){var gO=i-gN.height;if(gO){for(var gP=gN;gP;gP=gP.parent){gP.height+=gO}}}function bQ(gN){if(gN.parent==null){return null}var gR=gN.parent,gQ=dr(gR.lines,gN);for(var gO=gR.parent;gO;gR=gO,gO=gO.parent){for(var gP=0;;++gP){if(gO.children[gP]==gR){break}gQ+=gO.children[gP].chunkSize()}}return gQ+gR.first}function bK(gT,gS){var gQ=gT.first;outer:do{for(var gP=0;gP<gT.children.length;++gP){var gO=gT.children[gP],gN=gO.height;if(gS<gN){gT=gO;continue outer}gS-=gN;gQ+=gO.chunkSize()}return gQ}while(!gT.lines);var gR=0;for(;gR<gT.lines.length;++gR){var gV=gT.lines[gR],gU=gV.height;if(gS<gU){break}gS-=gU}return gQ+gR}function cd(gN,i){return i>=gN.first&&i<gN.first+gN.size}function eF(gN,gO){return String(gN.lineNumberFormatter(gO+gN.firstLineNumber))}function V(i,gN){if(!(this instanceof V)){return new V(i,gN)}this.line=i;this.ch=gN}function ck(gN,i){return gN.line-i.line||gN.ch-i.ch}function cn(i){return V(i.line,i.ch)}function bA(gN,i){return ck(gN,i)<0?i:gN}function aq(gN,i){return ck(gN,i)<0?gN:i}function db(i,gN){return Math.max(i.first,Math.min(gN,i.first+i.size-1))}function f7(gN,gO){if(gO.line<gN.first){return V(gN.first,0)}var i=gN.first+gN.size-1;if(gO.line>i){return V(i,fy(gN,i).text.length)}return fL(gO,fy(gN,gO.line).text.length)}function fL(gO,gN){var i=gO.ch;if(i==null||i>gN){return V(gO.line,gN)}else{if(i<0){return V(gO.line,0)}else{return gO}}}function d9(gP,gQ){var gN=[];for(var gO=0;gO<gQ.length;gO++){gN[gO]=f7(gP,gQ[gO])}return gN}var gG=false;var a7=false;function fU(){gG=true}function bz(){a7=true}function eu(i,gO,gN){this.marker=i;this.from=gO;this.to=gN}function ft(gP,gN){if(gP){for(var gO=0;gO<gP.length;++gO){var gQ=gP[gO];if(gQ.marker==gN){return gQ}}}}function eX(gO,gP){var gQ;for(var gN=0;gN<gO.length;++gN){if(gO[gN]!=gP){(gQ||(gQ=[])).push(gO[gN])}}return gQ}function ci(i,gN){i.markedSpans=i.markedSpans?i.markedSpans.concat([gN]):[gN];gN.marker.attachLine(i)}function aQ(gO,gP,gT){var gU;if(gO){for(var gR=0;gR<gO.length;++gR){var gV=gO[gR],gS=gV.marker;var gN=gV.from==null||(gS.inclusiveLeft?gV.from<=gP:gV.from<gP);if(gN||gV.from==gP&&gS.type=="bookmark"&&(!gT||!gV.marker.insertLeft)){var gQ=gV.to==null||(gS.inclusiveRight?gV.to>=gP:gV.to>gP);(gU||(gU=[])).push(new eu(gS,gV.from,gQ?null:gV.to))}}}return gU}function aB(gO,gQ,gT){var gU;if(gO){for(var gR=0;gR<gO.length;++gR){var gV=gO[gR],gS=gV.marker;var gP=gV.to==null||(gS.inclusiveRight?gV.to>=gQ:gV.to>gQ);if(gP||gV.from==gQ&&gS.type=="bookmark"&&(!gT||gV.marker.insertLeft)){var gN=gV.from==null||(gS.inclusiveLeft?gV.from<=gQ:gV.from<gQ);(gU||(gU=[])).push(new eu(gS,gN?null:gV.from-gQ,gV.to==null?null:gV.to-gQ))}}}return gU}function ev(g8,gY){if(gY.full){return null}var gP=cd(g8,gY.from.line)&&fy(g8,gY.from.line).markedSpans;var gW=cd(g8,gY.to.line)&&fy(g8,gY.to.line).markedSpans;if(!gP&&!gW){return null}var gV=gY.from.ch,g3=gY.to.ch,g0=ck(gY.from,gY.to)==0;var gU=aQ(gP,gV,g0);var gX=aB(gW,g3,g0);var g1=gY.text.length==1,gS=f2(gY.text).length+(g1?gV:0);if(gU){for(var g6=0;g6<gU.length;++g6){var g5=gU[g6];if(g5.to==null){var gZ=ft(gX,g5.marker);if(!gZ){g5.to=gV}else{if(g1){g5.to=gZ.to==null?null:gZ.to+gS}}}}}if(gX){for(var gT=0;gT<gX.length;++gT){var g4=gX[gT];if(g4.to!=null){g4.to+=gS}if(g4.from==null){var gO=ft(gU,g4.marker);if(!gO){g4.from=gS;if(g1){(gU||(gU=[])).push(g4)}}}else{g4.from+=gS;if(g1){(gU||(gU=[])).push(g4)}}}}if(gU){gU=r(gU)}if(gX&&gX!=gU){gX=r(gX)}var g7=[gU];if(!g1){var g2=gY.text.length-2,gN;if(g2>0&&gU){for(var gR=0;gR<gU.length;++gR){if(gU[gR].to==null){(gN||(gN=[])).push(new eu(gU[gR].marker,null,null))}}}for(var gQ=0;gQ<g2;++gQ){g7.push(gN)}g7.push(gX)}return g7}function r(gO){for(var gN=0;gN<gO.length;++gN){var gP=gO[gN];if(gP.from!=null&&gP.from==gP.to&&gP.marker.clearWhenEmpty!==false){gO.splice(gN--,1)}}if(!gO.length){return null}return gO}function cN(gZ,gX,gY){var gR=null;gZ.iter(gX.line,gY.line+1,function(g0){if(g0.markedSpans){for(var g1=0;g1<g0.markedSpans.length;++g1){var g2=g0.markedSpans[g1].marker;if(g2.readOnly&&(!gR||dr(gR,g2)==-1)){(gR||(gR=[])).push(g2)}}}});if(!gR){return null}var gS=[{from:gX,to:gY}];for(var gT=0;gT<gR.length;++gT){var gU=gR[gT],gP=gU.find(0);for(var gQ=0;gQ<gS.length;++gQ){var gO=gS[gQ];if(ck(gO.to,gP.from)<0||ck(gO.from,gP.to)>0){continue}var gW=[gQ,1],gN=ck(gO.from,gP.from),gV=ck(gO.to,gP.to);if(gN<0||!gU.inclusiveLeft&&!gN){gW.push({from:gO.from,to:gP.from})}if(gV>0||!gU.inclusiveRight&&!gV){gW.push({from:gP.to,to:gO.to})}gS.splice.apply(gS,gW);gQ+=gW.length-1}}return gS}function gB(gN){var gP=gN.markedSpans;if(!gP){return}for(var gO=0;gO<gP.length;++gO){gP[gO].marker.detachLine(gN)}gN.markedSpans=null}function c9(gN,gP){if(!gP){return}for(var gO=0;gO<gP.length;++gO){gP[gO].marker.attachLine(gN)}gN.markedSpans=gP}function v(i){return i.inclusiveLeft?-1:0}function bZ(i){return i.inclusiveRight?1:0}function d0(gP,gN){var gR=gP.lines.length-gN.lines.length;if(gR!=0){return gR}var gO=gP.find(),gS=gN.find();var i=ck(gO.from,gS.from)||v(gP)-v(gN);if(i){return -i}var gQ=ck(gO.to,gS.to)||bZ(gP)-bZ(gN);if(gQ){return gQ}return gN.id-gP.id}function a6(gO,gS){var gN=a7&&gO.markedSpans,gR;if(gN){for(var gQ=void 0,gP=0;gP<gN.length;++gP){gQ=gN[gP];if(gQ.marker.collapsed&&(gS?gQ.from:gQ.to)==null&&(!gR||d0(gR,gQ.marker)<0)){gR=gQ.marker}}}return gR}function e6(i){return a6(i,true)}function eJ(i){return a6(i,false)}function z(gV,gN,gT,gU,gR){var gY=fy(gV,gN);var gO=a7&&gY.markedSpans;if(gO){for(var gQ=0;gQ<gO.length;++gQ){var gP=gO[gQ];if(!gP.marker.collapsed){continue}var gX=gP.marker.find(0);var gW=ck(gX.from,gT)||v(gP.marker)-v(gR);var gS=ck(gX.to,gU)||bZ(gP.marker)-bZ(gR);if(gW>=0&&gS<=0||gW<=0&&gS>=0){continue}if(gW<=0&&(gP.marker.inclusiveRight&&gR.inclusiveLeft?ck(gX.to,gT)>=0:ck(gX.to,gT)>0)||gW>=0&&(gP.marker.inclusiveRight&&gR.inclusiveLeft?ck(gX.from,gU)<=0:ck(gX.from,gU)<0)){return true}}}}function y(gN){var i;while(i=e6(gN)){gN=i.find(-1,true).line}return gN}function g(gO){var i,gN;while(i=eJ(gO)){gO=i.find(1,true).line;(gN||(gN=[])).push(gO)}return gN}function aW(gP,gN){var i=fy(gP,gN),gO=y(i);if(i==gO){return gN}return bQ(gO)}function ed(gP,gO){if(gO>gP.lastLine()){return gO}var gN=fy(gP,gO),i;if(!fP(gP,gN)){return gO}while(i=eJ(gN)){gN=i.find(1,true).line}return bQ(gN)+1}function fP(gR,gO){var gN=a7&&gO.markedSpans;if(gN){for(var gQ=void 0,gP=0;gP<gN.length;++gP){gQ=gN[gP];if(!gQ.marker.collapsed){continue}if(gQ.from==null){return true}if(gQ.marker.widgetNode){continue}if(gQ.from==0&&gQ.marker.inclusiveLeft&&S(gR,gO,gQ)){return true}}}}function S(gS,gO,gQ){if(gQ.to==null){var gN=gQ.marker.find(1,true);return S(gS,gN.line,ft(gN.line.markedSpans,gQ.marker))}if(gQ.marker.inclusiveRight&&gQ.to==gO.text.length){return true}for(var gR=void 0,gP=0;gP<gO.markedSpans.length;++gP){gR=gO.markedSpans[gP];if(gR.marker.collapsed&&!gR.marker.widgetNode&&gR.from==gQ.to&&(gR.to==null||gR.to!=gQ.from)&&(gR.marker.inclusiveLeft||gQ.marker.inclusiveRight)&&S(gS,gO,gR)){return true}}}function bP(gP){gP=y(gP);var gR=0,gO=gP.parent;for(var gQ=0;gQ<gO.lines.length;++gQ){var gN=gO.lines[gQ];if(gN==gP){break}else{gR+=gN.height}}for(var gS=gO.parent;gS;gO=gS,gS=gO.parent){for(var gU=0;gU<gS.children.length;++gU){var gT=gS.children[gU];if(gT==gO){break}else{gR+=gT.height}}}return gR}function ey(gO){if(gO.height==0){return 0}var gN=gO.text.length,i,gR=gO;while(i=e6(gR)){var gP=i.find(0,true);gR=gP.from.line;gN+=gP.from.ch-gP.to.ch}gR=gO;while(i=eJ(gR)){var gQ=i.find(0,true);gN-=gR.text.length-gQ.from.ch;gR=gQ.to.line;gN+=gR.text.length-gQ.to.ch}return gN}function f(i){var gO=i.display,gN=i.doc;gO.maxLine=fy(gN,gN.first);gO.maxLineLength=ey(gO.maxLine);gO.maxLineChanged=true;gN.iter(function(gQ){var gP=ey(gQ);if(gP>gO.maxLineLength){gO.maxLineLength=gP;gO.maxLine=gQ}})}function ee(gN,gT,gS,gR){if(!gN){return gR(gT,gS,"ltr")}var gQ=false;for(var gP=0;gP<gN.length;++gP){var gO=gN[gP];if(gO.from<gS&&gO.to>gT||gT==gS&&gO.to==gT){gR(Math.max(gO.from,gT),Math.min(gO.to,gS),gO.level==1?"rtl":"ltr");gQ=true}}if(!gQ){gR(gT,gS,"ltr")}}function dH(i){return i.level%2?i.to:i.from}function gH(i){return i.level%2?i.from:i.to}function cJ(gN){var i=a(gN);return i?dH(i[0]):0}function cY(gN){var i=a(gN);if(!i){return gN.text.length}return gH(f2(i))}function am(gN,gO,i){var gP=gN[0].level;if(gO==gP){return true}if(i==gP){return false}return gO<i}var fl=null;function aH(gN,gR){var gP;fl=null;for(var gO=0;gO<gN.length;++gO){var gQ=gN[gO];if(gQ.from<gR&&gQ.to>gR){return gO}if((gQ.from==gR||gQ.to==gR)){if(gP==null){gP=gO}else{if(am(gN,gQ.level,gN[gP].level)){if(gQ.from!=gQ.to){fl=gP}return gO}else{if(gQ.from!=gQ.to){fl=gO}return gP}}}}return gP}function fz(i,gP,gN,gO){if(!gO){return gP+gN}do{gP+=gN}while(gP>0&&fI(i.text.charAt(gP)));return gP}function u(i,gT,gO,gP){var gQ=a(i);if(!gQ){return ah(i,gT,gO,gP)}var gS=aH(gQ,gT),gN=gQ[gS];var gR=fz(i,gT,gN.level%2?-gO:gO,gP);for(;;){if(gR>gN.from&&gR<gN.to){return gR}if(gR==gN.from||gR==gN.to){if(aH(gQ,gR)==gS){return gR}gN=gQ[gS+=gO];return(gO>0)==gN.level%2?gN.to:gN.from}else{gN=gQ[gS+=gO];if(!gN){return null}if((gO>0)==gN.level%2){gR=fz(i,gN.to,-1,gP)}else{gR=fz(i,gN.from,1,gP)}}}}function ah(i,gQ,gN,gO){var gP=gQ+gN;if(gO){while(gP>0&&fI(i.text.charAt(gP))){gP+=gN}}return gP<0||gP>i.text.length?null:gP}var bi=(function(){var gS="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var gQ="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";function gP(gW){if(gW<=247){return gS.charAt(gW)}else{if(1424<=gW&&gW<=1524){return"R"}else{if(1536<=gW&&gW<=1773){return gQ.charAt(gW-1536)}else{if(1774<=gW&&gW<=2220){return"r"}else{if(8192<=gW&&gW<=8203){return"w"}else{if(gW==8204){return"b"}else{return"L"}}}}}}}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var gV=/[stwN]/,gO=/[LRr]/,gN=/[Lb1n]/,gR=/[1n]/;var gU="L";function gT(gY,gX,gW){this.level=gY;this.from=gX;this.to=gW}return function(hk){if(!i.test(hk)){return false}var hr=hk.length,hb=[];for(var hp=0;hp<hr;++hp){hb.push(gP(hk.charCodeAt(hp)))}for(var g9=0,hf=gU;g9<hr;++g9){var g0=hb[g9];if(g0=="m"){hb[g9]=hf}else{hf=g0}}for(var g7=0,gY=gU;g7<hr;++g7){var hl=hb[g7];if(hl=="1"&&gY=="r"){hb[g7]="n"}else{if(gO.test(hl)){gY=hl;if(hl=="r"){hb[g7]="R"}}}}for(var g6=1,hg=hb[0];g6<hr-1;++g6){var hi=hb[g6];if(hi=="+"&&hg=="1"&&hb[g6+1]=="1"){hb[g6]="1"}else{if(hi==","&&hg==hb[g6+1]&&(hg=="1"||hg=="n")){hb[g6]=hg}}hg=hi}for(var g5=0;g5<hr;++g5){var hh=hb[g5];if(hh==","){hb[g5]="N"}else{if(hh=="%"){var g1=void 0;for(g1=g5+1;g1<hr&&hb[g1]=="%";++g1){}var hu=(g5&&hb[g5-1]=="!")||(g1<hr&&hb[g1]=="1")?"1":"N";for(var ho=g5;ho<g1;++ho){hb[ho]=hu}g5=g1-1}}}for(var g2=0,hq=gU;g2<hr;++g2){var he=hb[g2];if(hq=="L"&&he=="1"){hb[g2]="L"}else{if(gO.test(he)){hq=he}}}for(var gZ=0;gZ<hr;++gZ){if(gV.test(hb[gZ])){var g4=void 0;for(g4=gZ+1;g4<hr&&gV.test(hb[g4]);++g4){}var hc=(gZ?hb[gZ-1]:gU)=="L";var gX=(g4<hr?hb[g4]:gU)=="L";var ha=hc||gX?"L":"R";for(var ht=gZ;ht<g4;++ht){hb[ht]=ha}gZ=g4-1}}var hn=[],hj;for(var gW=0;gW<hr;){if(gN.test(hb[gW])){var g3=gW;for(++gW;gW<hr&&gN.test(hb[gW]);++gW){}hn.push(new gT(0,g3,gW))}else{var g8=gW,hd=hn.length;for(++gW;gW<hr&&hb[gW]!="L";++gW){}for(var hs=g8;hs<gW;){if(gR.test(hb[hs])){if(g8<hs){hn.splice(hd,0,new gT(1,g8,hs))}var hm=hs;for(++hs;hs<gW&&gR.test(hb[hs]);++hs){}hn.splice(hd,0,new gT(2,hm,hs));g8=hs}else{++hs}}if(g8<gW){hn.splice(hd,0,new gT(1,g8,gW))}}}if(hn[0].level==1&&(hj=hk.match(/^\s+/))){hn[0].from=hj[0].length;hn.unshift(new gT(0,0,hj[0].length))}if(f2(hn).level==1&&(hj=hk.match(/\s+$/))){f2(hn).to-=hj[0].length;hn.push(new gT(0,hr-hj[0].length,hr))}if(hn[0].level==2){hn.unshift(new gT(1,hn[0].to,hn[0].to))}if(hn[0].level!=f2(hn).level){hn.push(new gT(hn[0].level,hr,hr))}return hn}})();function a(gN){var i=gN.order;if(i==null){i=gN.order=bi(gN.text)}return i}var fp=[];var b0=function(gP,i,gO){if(gP.addEventListener){gP.addEventListener(i,gO,false)}else{if(gP.attachEvent){gP.attachEvent("on"+i,gO)}else{var gN=gP._handlers||(gP._handlers={});gN[i]=(gN[i]||fp).concat(gO)}}};function ew(gN,i){return gN._handlers&&gN._handlers[i]||fp}function eq(gR,gO,gQ){if(gR.removeEventListener){gR.removeEventListener(gO,gQ,false)}else{if(gR.detachEvent){gR.detachEvent("on"+gO,gQ)}else{var gP=gR._handlers,i=gP&&gP[gO];if(i){var gN=dr(i,gQ);if(gN>-1){gP[gO]=i.slice(0,gN).concat(i.slice(gN+1))}}}}}function aE(gR,gQ){var gN=ew(gR,gQ);if(!gN.length){return}var gO=Array.prototype.slice.call(arguments,2);for(var gP=0;gP<gN.length;++gP){gN[gP].apply(null,gO)}}function aR(i,gO,gN){if(typeof gO=="string"){gO={type:gO,preventDefault:function(){this.defaultPrevented=true}}}aE(i,gN||gO.type,i,gO);return bO(gO)||gO.codemirrorIgnore}function U(gO){var gN=gO._handlers&&gO._handlers.cursorActivity;if(!gN){return}var gQ=gO.curOp.cursorActivityHandlers||(gO.curOp.cursorActivityHandlers=[]);for(var gP=0;gP<gN.length;++gP){if(dr(gQ,gN[gP])==-1){gQ.push(gN[gP])}}}function fE(gN,i){return ew(gN,i).length>0}function bC(i){i.prototype.on=function(gN,gO){b0(this,gN,gO)};i.prototype.off=function(gN,gO){eq(this,gN,gO)}}function cL(i){if(i.preventDefault){i.preventDefault()}else{i.returnValue=false}}function dy(i){if(i.stopPropagation){i.stopPropagation()}else{i.cancelBubble=true}}function bO(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==false}function eD(i){cL(i);dy(i)}function K(i){return i.target||i.srcElement}function gc(gN){var i=gN.which;if(i==null){if(gN.button&1){i=1}else{if(gN.button&2){i=3}else{if(gN.button&4){i=2}}}}if(cb&&gN.ctrlKey&&i==1){i=3}return i}var e2=function(){if(dS&&l<9){return false}var i=gv("div");return"draggable" in i||"dragDrop" in i}();var ga;function bp(i){if(ga==null){var gO=gv("span","\u200b");bV(i,gv("span",[gO,document.createTextNode("x")]));if(i.firstChild.offsetHeight!=0){ga=gO.offsetWidth<=1&&gO.offsetHeight>2&&!(dS&&l<8)}}var gN=ga?gv("span","\u200b"):gv("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");gN.setAttribute("cm-text","");return gN}var gb;function bR(gP){if(gb!=null){return gb}var i=bV(gP,document.createTextNode("A\u062eA"));var gO=cr(i,0,1).getBoundingClientRect();var gN=cr(i,1,2).getBoundingClientRect();eb(gP);if(!gO||gO.left==gO.right){return false}return gb=(gN.right-gO.right<3)}var gh="\n\nb".split(/\n/).length!=3?function(gR){var gS=0,i=[],gQ=gR.length;while(gS<=gQ){var gP=gR.indexOf("\n",gS);if(gP==-1){gP=gR.length}var gO=gR.slice(gS,gR.charAt(gP-1)=="\r"?gP-1:gP);var gN=gO.indexOf("\r");if(gN!=-1){i.push(gO.slice(0,gN));gS+=gN+1}else{i.push(gO);gS=gP+1}}return i}:function(i){return i.split(/\r\n?|\n/)};var bu=window.getSelection?function(gN){try{return gN.selectionStart!=gN.selectionEnd}catch(i){return false}}:function(gO){var gN;try{gN=gO.ownerDocument.selection.createRange()}catch(i){}if(!gN||gN.parentElement()!=gO){return false}return gN.compareEndPoints("StartToEnd",gN)!=0};var dh=(function(){var i=gv("div");if("oncopy" in i){return true}i.setAttribute("oncopy","return;");return typeof i.oncopy=="function"})();var fq=null;function aL(gN){if(fq!=null){return fq}var gO=bV(gN,gv("span","x"));var gP=gO.getBoundingClientRect();var i=cr(gO,0,1).getBoundingClientRect();return fq=Math.abs(gP.left-i.left)>1}var dA={};var aS={};function eG(i,gN){if(arguments.length>2){gN.dependencies=Array.prototype.slice.call(arguments,2)}dA[i]=gN}function bo(gN,i){aS[gN]=i}function gE(i){if(typeof i=="string"&&aS.hasOwnProperty(i)){i=aS[i]}else{if(i&&typeof i.name=="string"&&aS.hasOwnProperty(i.name)){var gN=aS[i.name];if(typeof gN=="string"){gN={name:gN}}i=cp(gN,i);i.name=gN.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i)){return gE("application/xml")}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i)){return gE("application/json")}}}}if(typeof i=="string"){return{name:i}}else{return i||{name:"null"}}}function fV(gO,gN){gN=gE(gN);var gQ=dA[gN.name];if(!gQ){return fV(gO,"text/plain")}var gR=gQ(gO,gN);if(dx.hasOwnProperty(gN.name)){var gP=dx[gN.name];for(var gS in gP){if(!gP.hasOwnProperty(gS)){continue}if(gR.hasOwnProperty(gS)){gR["_"+gS]=gR[gS]}gR[gS]=gP[gS]}}gR.name=gN.name;if(gN.helperType){gR.helperType=gN.helperType}if(gN.modeProps){for(var i in gN.modeProps){gR[i]=gN.modeProps[i]}}return gR}var dx={};function eS(gO,gN){var i=dx.hasOwnProperty(gO)?dx[gO]:(dx[gO]={});aN(gN,i)}function b7(gP,i){if(i===true){return i}if(gP.copyState){return gP.copyState(i)}var gO={};for(var gQ in i){var gN=i[gQ];if(gN instanceof Array){gN=gN.concat([])}gO[gQ]=gN}return gO}function gA(gO,i){var gN;while(gO.innerMode){gN=gO.innerMode(i);if(!gN||gN.mode==gO){break}i=gN.state;gO=gN.mode}return gN||{mode:gO,state:i}}function b4(gO,gN,i){return gO.startState?gO.startState(gN,i):true}var fb=function(i,gN){this.pos=this.start=0;this.string=i;this.tabSize=gN||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};fb.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}},eat:function(i){var gO=this.string.charAt(this.pos);var gN;if(typeof i=="string"){gN=gO==i}else{gN=gO&&(i.test?i.test(gO):i(gO))}if(gN){++this.pos;return gO}},eatWhile:function(i){var gN=this.pos;while(this.eat(i)){}return this.pos>gN},eatSpace:function(){var gN=this;var i=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++gN.pos}return this.pos>i},skipToEnd:function(){this.pos=this.string.length},skipTo:function(i){var gN=this.string.indexOf(i,this.pos);if(gN>-1){this.pos=gN;return true}},backUp:function(i){this.pos-=i},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bU(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?bU(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return bU(this.string,null,this.tabSize)-(this.lineStart?bU(this.string,this.lineStart,this.tabSize):0)},match:function(gQ,gN,i){if(typeof gQ=="string"){var gR=function(gS){return i?gS.toLowerCase():gS};var gP=this.string.substr(this.pos,gQ.length);if(gR(gP)==gR(gQ)){if(gN!==false){this.pos+=gQ.length}return true}}else{var gO=this.string.slice(this.pos).match(gQ);if(gO&&gO.index>0){return null}if(gO&&gN!==false){this.pos+=gO[0].length}return gO}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(gN,i){this.lineStart+=gN;try{return i()}finally{this.lineStart-=gN}}};function fT(i,gO,gS,gR){var gQ=[i.state.modeGen],gP={};w(i,gO.text,i.doc.mode,gS,function(gU,gV){return gQ.push(gU,gV)},gP,gR);var gN=function(gX){var gV=i.state.overlays[gX],gW=1,gU=0;w(i,gO.text,gV.mode,true,function(gY,g0){var g2=gW;while(gU<gY){var gZ=gQ[gW];if(gZ>gY){gQ.splice(gW,1,gY,gQ[gW+1],gZ)}gW+=2;gU=Math.min(gY,gZ)}if(!g0){return}if(gV.opaque){gQ.splice(g2,gW-g2,gY,"overlay "+g0);gW=g2+2}else{for(;g2<gW;g2+=2){var g1=gQ[g2+1];gQ[g2+1]=(g1?g1+" ":"")+"overlay "+g0}}},gP)};for(var gT=0;gT<i.state.overlays.length;++gT){gN(gT)}return{styles:gQ,classes:gP.bgClass||gP.textClass?gP:null}}function de(gN,gO,gQ){if(!gO.styles||gO.styles[0]!=gN.state.modeGen){var gP=dK(gN,bQ(gO));var i=fT(gN,gO,gO.text.length>gN.options.maxHighlightLength?b7(gN.doc.mode,gP):gP);gO.stateAfter=gP;gO.styles=i.styles;if(i.classes){gO.styleClasses=i.classes}else{if(gO.styleClasses){gO.styleClasses=null}}if(gQ===gN.doc.frontier){gN.doc.frontier++}}return gO.styles}function dK(i,gS,gN){var gQ=i.doc,gP=i.display;if(!gQ.mode.startState){return true}var gR=cD(i,gS,gN),gO=gR>gQ.first&&fy(gQ,gR-1).stateAfter;if(!gO){gO=b4(gQ.mode)}else{gO=b7(gQ.mode,gO)}gQ.iter(gR,gS,function(gT){dF(i,gT.text,gO);var gU=gR==gS-1||gR%5==0||gR>=gP.viewFrom&&gR<gP.viewTo;gT.stateAfter=gU?b7(gQ.mode,gO):null;++gR});if(gN){gQ.frontier=gR}return gO}function dF(i,gR,gO,gN){var gQ=i.doc.mode;var gP=new fb(gR,i.options.tabSize);gP.start=gP.pos=gN||0;if(gR==""){fJ(gQ,gO)}while(!gP.eol()){eQ(gQ,gP,gO);gP.start=gP.pos}}function fJ(gO,gN){if(gO.blankLine){return gO.blankLine(gN)}if(!gO.innerMode){return}var i=gA(gO,gN);if(i.mode.blankLine){return i.mode.blankLine(i.state)}}function eQ(gS,gR,gQ,gN){for(var gO=0;gO<10;gO++){if(gN){gN[0]=gA(gS,gQ).mode}var gP=gS.token(gR,gQ);if(gR.pos>gR.start){return gP}}throw new Error("Mode "+gS.name+" failed to advance stream.")}function cv(gV,gT,gQ,gP){var i=function(gY){return({start:gW.start,end:gW.pos,string:gW.current(),type:gO||null,state:gY?b7(gU.mode,gN):gN})};var gU=gV.doc,gR=gU.mode,gO;gT=f7(gU,gT);var gX=fy(gU,gT.line),gN=dK(gV,gT.line,gQ);var gW=new fb(gX.text,gV.options.tabSize),gS;if(gP){gS=[]}while((gP||gW.pos<gT.ch)&&!gW.eol()){gW.start=gW.pos;gO=eQ(gR,gW,gN);if(gP){gS.push(i(true))}}return gP?gS:i()}function ds(gO,gN){if(gO){for(;;){var i=gO.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i){break}gO=gO.slice(0,i.index)+gO.slice(i.index+i[0].length);var gP=i[1]?"bgClass":"textClass";if(gN[gP]==null){gN[gP]=i[2]}else{if(!(new RegExp("(?:^|s)"+i[2]+"(?:$|s)")).test(gN[gP])){gN[gP]+=" "+i[2]}}}}return gO}function w(gW,gY,gR,gN,gS,gP,gQ){var gO=gR.flattenSpans;if(gO==null){gO=gW.options.flattenSpans}var gU=0,gT=null;var gX=new fb(gY,gW.options.tabSize),i;var g0=gW.options.addModeClass&&[null];if(gY==""){ds(fJ(gR,gN),gP)}while(!gX.eol()){if(gX.pos>gW.options.maxHighlightLength){gO=false;if(gQ){dF(gW,gY,gN,gX.pos)}gX.pos=gY.length;i=null}else{i=ds(eQ(gR,gX,gN,g0),gP)}if(g0){var gZ=g0[0].name;if(gZ){i="m-"+(i?gZ+" "+i:gZ)}}if(!gO||gT!=i){while(gU<gX.start){gU=Math.min(gX.start,gU+5000);gS(gU,gT)}gT=i}gX.start=gX.pos}while(gU<gX.pos){var gV=Math.min(gX.pos,gU+5000);gS(gV,gT);gU=gV}}function cD(gS,i,gP){var gN,gQ,gR=gS.doc;var gO=gP?-1:i-(gS.doc.mode.innerMode?1000:100);for(var gV=i;gV>gO;--gV){if(gV<=gR.first){return gR.first}var gU=fy(gR,gV-1);if(gU.stateAfter&&(!gP||gV<=gR.frontier)){return gV}var gT=bU(gU.text,null,gS.options.tabSize);if(gQ==null||gN>gT){gQ=gV-1;gN=gT}}return gQ}function gy(gO,gN,i){this.text=gO;c9(this,gN);this.height=i?i(this):1}bC(gy);gy.prototype.lineNo=function(){return bQ(this)};function ez(gN,gQ,gO,i){gN.text=gQ;if(gN.stateAfter){gN.stateAfter=null}if(gN.styles){gN.styles=null}if(gN.order!=null){gN.order=null}gB(gN);c9(gN,gO);var gP=i?i(gN):1;if(gP!=gN.height){gz(gN,gP)}}function bE(i){i.parent=null;gB(i)}var d5={};var b6={};function fe(gO,gN){if(!gO||/^\s*$/.test(gO)){return null}var i=gN.addModeClass?b6:d5;return i[gO]||(i[gO]=gO.replace(/\S+/g,"cm-$&"))}function e9(gT,gS){var gR=gv("span",null,null,c6?"padding-right: .1px":null);var gQ={pre:gv("pre",[gR],"CodeMirror-line"),content:gR,col:0,pos:0,cm:gT,trailingSpace:false,splitSpaces:(dS||c6)&&gT.getOption("lineWrapping")};gS.measure={};for(var gP=0;gP<=(gS.rest?gS.rest.length:0);gP++){var gV=gP?gS.rest[gP-1]:gS.line,gO=void 0;gQ.pos=0;gQ.addToken=t;if(bR(gT.display.measure)&&(gO=a(gV))){gQ.addToken=T(gQ.addToken,gO)}gQ.map=[];var gN=gS!=gT.display.externalMeasured&&bQ(gV);bq(gV,gQ,de(gT,gV,gN));if(gV.styleClasses){if(gV.styleClasses.bgClass){gQ.bgClass=gl(gV.styleClasses.bgClass,gQ.bgClass||"")}if(gV.styleClasses.textClass){gQ.textClass=gl(gV.styleClasses.textClass,gQ.textClass||"")}}if(gQ.map.length==0){gQ.map.push(0,0,gQ.content.appendChild(bp(gT.display.measure)))}if(gP==0){gS.measure.map=gQ.map;gS.measure.cache={}}else{(gS.measure.maps||(gS.measure.maps=[])).push(gQ.map);(gS.measure.caches||(gS.measure.caches=[])).push({})}}if(c6){var gU=gQ.content.lastChild;if(/\bcm-tab\b/.test(gU.className)||(gU.querySelector&&gU.querySelector(".cm-tab"))){gQ.content.className="cm-tab-wrap-hack"}}aE(gT,"renderLine",gT,gS.line,gQ.pre);if(gQ.pre.className){gQ.textClass=gl(gQ.pre.className,gQ.textClass||"")}return gQ}function fx(gN){var i=gv("span","\u2022","cm-invalidchar");i.title="\\u"+gN.charCodeAt(0).toString(16);i.setAttribute("aria-label",i.title);return i}function t(gX,gS,g2,gZ,gV,g5,gR){if(!gS){return}var g1=gX.splitSpaces?cK(gS,gX.trailingSpace):gS;var i=gX.cm.state.specialChars,gN=false;var g0;if(!i.test(gS)){gX.col+=gS.length;g0=document.createTextNode(g1);gX.map.push(gX.pos,gX.pos+gS.length,g0);if(dS&&l<9){gN=true}gX.pos+=gS.length}else{g0=document.createDocumentFragment();var gP=0;while(true){i.lastIndex=gP;var gY=i.exec(gS);var g4=gY?gY.index-gP:gS.length-gP;if(g4){var gU=document.createTextNode(g1.slice(gP,gP+g4));if(dS&&l<9){g0.appendChild(gv("span",[gU]))}else{g0.appendChild(gU)}gX.map.push(gX.pos,gX.pos+g4,gU);gX.col+=g4;gX.pos+=g4}if(!gY){break}gP+=g4+1;var g3=void 0;if(gY[0]=="\t"){var gW=gX.cm.options.tabSize,gT=gW-gX.col%gW;g3=g0.appendChild(gv("span",cu(gT),"cm-tab"));g3.setAttribute("role","presentation");g3.setAttribute("cm-text","\t");gX.col+=gT}else{if(gY[0]=="\r"||gY[0]=="\n"){g3=g0.appendChild(gv("span",gY[0]=="\r"?"\u240d":"\u2424","cm-invalidchar"));g3.setAttribute("cm-text",gY[0]);gX.col+=1}else{g3=gX.cm.options.specialCharPlaceholder(gY[0]);g3.setAttribute("cm-text",gY[0]);if(dS&&l<9){g0.appendChild(gv("span",[g3]))}else{g0.appendChild(g3)}gX.col+=1}}gX.map.push(gX.pos,gX.pos+1,g3);gX.pos++}}gX.trailingSpace=g1.charCodeAt(gS.length-1)==32;if(g2||gZ||gV||gN||gR){var gO=g2||"";if(gZ){gO+=gZ}if(gV){gO+=gV}var gQ=gv("span",[g0],gO,gR);if(g5){gQ.title=g5}return gX.content.appendChild(gQ)}gX.content.appendChild(g0)}function cK(gS,gR){if(gS.length>1&&!/ /.test(gS)){return gS}var gO=gR,gN="";for(var gP=0;gP<gS.length;gP++){var gQ=gS.charAt(gP);if(gQ==" "&&gO&&(gP==gS.length-1||gS.charCodeAt(gP+1)==32)){gQ="\u00a0"}gN+=gQ;gO=gQ==" "}return gN}function T(gN,i){return function(gV,gX,gO,gS,gY,gW,gU){gO=gO?gO+" cm-force-border":"cm-force-border";var gP=gV.pos,gR=gP+gX.length;for(;;){var gQ=void 0;for(var gT=0;gT<i.length;gT++){gQ=i[gT];if(gQ.to>gP&&gQ.from<=gP){break}}if(gQ.to>=gR){return gN(gV,gX,gO,gS,gY,gW,gU)}gN(gV,gX.slice(0,gQ.to-gP),gO,gS,null,gW,gU);gS=null;gX=gX.slice(gQ.to-gP);gP=gQ.to}}}function ac(gN,gP,i,gO){var gQ=!gO&&i.widgetNode;if(gQ){gN.map.push(gN.pos,gN.pos+gP,gQ)}if(!gO&&gN.cm.display.input.needsContentAttribute){if(!gQ){gQ=gN.content.appendChild(document.createElement("span"))}gQ.setAttribute("cm-marker",i.id)}if(gQ){gN.cm.display.input.setUneditable(gQ);gN.content.appendChild(gQ)}gN.pos+=gP;gN.trailingSpace=false}function bq(gY,g5,gX){var gS=gY.markedSpans,gV=gY.text,g3=0;if(!gS){for(var gT=1;gT<gX.length;gT+=2){g5.addToken(g5,gV.slice(g3,g3=gX[gT]),fe(gX[gT+1],g5.cm.options))}return}var g9=gV.length,gR=0,g8=1,g1="",ha,gZ;var he=0,gN,hd,g2,hf,gP;for(;;){if(he==gR){gN=hd=g2=hf=gZ="";gP=null;he=Infinity;var gU=[],gW=void 0;for(var g6=0;g6<gS.length;++g6){var g7=gS[g6],g4=g7.marker;if(g4.type=="bookmark"&&g7.from==gR&&g4.widgetNode){gU.push(g4)}else{if(g7.from<=gR&&(g7.to==null||g7.to>gR||g4.collapsed&&g7.to==gR&&g7.from==gR)){if(g7.to!=null&&g7.to!=gR&&he>g7.to){he=g7.to;hd=""}if(g4.className){gN+=" "+g4.className}if(g4.css){gZ=(gZ?gZ+";":"")+g4.css}if(g4.startStyle&&g7.from==gR){g2+=" "+g4.startStyle}if(g4.endStyle&&g7.to==he){(gW||(gW=[])).push(g4.endStyle,g7.to)}if(g4.title&&!hf){hf=g4.title}if(g4.collapsed&&(!gP||d0(gP.marker,g4)<0)){gP=g7}}else{if(g7.from>gR&&he>g7.from){he=g7.from}}}}if(gW){for(var hc=0;hc<gW.length;hc+=2){if(gW[hc+1]==he){hd+=" "+gW[hc]}}}if(!gP||gP.from==gR){for(var hb=0;hb<gU.length;++hb){ac(g5,0,gU[hb])}}if(gP&&(gP.from||0)==gR){ac(g5,(gP.to==null?g9+1:gP.to)-gR,gP.marker,gP.from==null);if(gP.to==null){return}if(gP.to==gR){gP=false}}}if(gR>=g9){break}var g0=Math.min(g9,he);while(true){if(g1){var gO=gR+g1.length;if(!gP){var gQ=gO>g0?g1.slice(0,g0-gR):g1;g5.addToken(g5,gQ,ha?ha+gN:gN,g2,gR+gQ.length==he?hd:"",hf,gZ)}if(gO>=g0){g1=g1.slice(g0-gR);gR=g0;break}gR=gO;g2=""}g1=gV.slice(g3,g3=gX[g8++]);ha=fe(gX[g8++],g5.cm.options)}}}function bx(gO,i,gN){this.line=i;this.rest=g(i);this.size=this.rest?bQ(f2(this.rest))-gN+1:1;this.node=this.text=null;this.hidden=fP(gO,i)}function fd(i,gS,gR){var gQ=[],gO;for(var gP=gS;gP<gR;gP=gO){var gN=new bx(i.doc,fy(i.doc,gP),gP);gO=gP+gN.size;gQ.push(gN)}return gQ}var br=null;function eM(i){if(br){br.ops.push(i)}else{i.ownsGroup=br={ops:[i],delayedCallbacks:[]}}}function c0(gQ){var gP=gQ.delayedCallbacks,gO=0;do{for(;gO<gP.length;gO++){gP[gO].call(null)}for(var gN=0;gN<gQ.ops.length;gN++){var gR=gQ.ops[gN];if(gR.cursorActivityHandlers){while(gR.cursorActivityCalled<gR.cursorActivityHandlers.length){gR.cursorActivityHandlers[gR.cursorActivityCalled++].call(null,gR.cm)}}}}while(gO<gP.length)}function b1(gO,gN){var i=gO.ownsGroup;if(!i){return}try{c0(i)}finally{br=null;gN(i)}}var bB=null;function ad(gT,gR){var gN=ew(gT,gR);if(!gN.length){return}var gP=Array.prototype.slice.call(arguments,2),gS;if(br){gS=br.delayedCallbacks}else{if(bB){gS=bB}else{gS=bB=[];setTimeout(aM,0)}}var gO=function(gU){gS.push(function(){return gN[gU].apply(null,gP)})};for(var gQ=0;gQ<gN.length;++gQ){gO(gQ)}}function aM(){var gN=bB;bB=null;for(var gO=0;gO<gN.length;++gO){gN[gO]()}}function aa(i,gO,gQ,gR){for(var gN=0;gN<gO.changes.length;gN++){var gP=gO.changes[gN];if(gP=="text"){fF(i,gO)}else{if(gP=="gutter"){dn(i,gO,gQ,gR)}else{if(gP=="class"){dO(gO)}else{if(gP=="widget"){an(i,gO,gR)}}}}}gO.changes=null}function f4(i){if(i.node==i.text){i.node=gv("div",null,null,"position: relative");if(i.text.parentNode){i.text.parentNode.replaceChild(i.node,i.text)}i.node.appendChild(i.text);if(dS&&l<8){i.node.style.zIndex=2}}return i.node}function eI(gN){var i=gN.bgClass?gN.bgClass+" "+(gN.line.bgClass||""):gN.line.bgClass;if(i){i+=" CodeMirror-linebackground"}if(gN.background){if(i){gN.background.className=i}else{gN.background.parentNode.removeChild(gN.background);gN.background=null}}else{if(i){var gO=f4(gN);gN.background=gO.insertBefore(gv("div",null,i),gO.firstChild)}}}function d4(i,gN){var gO=i.display.externalMeasured;if(gO&&gO.line==gN.line){i.display.externalMeasured=null;gN.measure=gO.measure;return gO.built}return e9(i,gN)}function fF(i,gP){var gN=gP.text.className;var gO=d4(i,gP);if(gP.text==gP.node){gP.node=gO.pre}gP.text.parentNode.replaceChild(gO.pre,gP.text);gP.text=gO.pre;if(gO.bgClass!=gP.bgClass||gO.textClass!=gP.textClass){gP.bgClass=gO.bgClass;gP.textClass=gO.textClass;dO(gP)}else{if(gN){gP.text.className=gN}}}function dO(gN){eI(gN);if(gN.line.wrapClass){f4(gN).className=gN.line.wrapClass}else{if(gN.node!=gN.text){gN.node.className=""}}var i=gN.textClass?gN.textClass+" "+(gN.line.textClass||""):gN.line.textClass;gN.text.className=i||""}function dn(gU,gS,gR,gT){if(gS.gutter){gS.node.removeChild(gS.gutter);gS.gutter=null}if(gS.gutterBackground){gS.node.removeChild(gS.gutterBackground);gS.gutterBackground=null}if(gS.line.gutterClass){var gN=f4(gS);gS.gutterBackground=gv("div",null,"CodeMirror-gutter-background "+gS.line.gutterClass,("left: "+(gU.options.fixedGutter?gT.fixedPos:-gT.gutterTotalWidth)+"px; width: "+(gT.gutterTotalWidth)+"px"));gN.insertBefore(gS.gutterBackground,gS.text)}var gP=gS.line.gutterMarkers;if(gU.options.lineNumbers||gP){var gV=f4(gS);var gQ=gS.gutter=gv("div",null,"CodeMirror-gutter-wrapper",("left: "+(gU.options.fixedGutter?gT.fixedPos:-gT.gutterTotalWidth)+"px"));gU.display.input.setUneditable(gQ);gV.insertBefore(gQ,gS.text);if(gS.line.gutterClass){gQ.className+=" "+gS.line.gutterClass}if(gU.options.lineNumbers&&(!gP||!gP["CodeMirror-linenumbers"])){gS.lineNumber=gQ.appendChild(gv("div",eF(gU.options,gR),"CodeMirror-linenumber CodeMirror-gutter-elt",("left: "+(gT.gutterLeft["CodeMirror-linenumbers"])+"px; width: "+(gU.display.lineNumInnerWidth)+"px")))}if(gP){for(var gO=0;gO<gU.options.gutters.length;++gO){var i=gU.options.gutters[gO],gW=gP.hasOwnProperty(i)&&gP[i];if(gW){gQ.appendChild(gv("div",[gW],"CodeMirror-gutter-elt",("left: "+(gT.gutterLeft[i])+"px; width: "+(gT.gutterWidth[i])+"px")))}}}}}function an(i,gN,gQ){if(gN.alignable){gN.alignable=null}for(var gP=gN.node.firstChild,gO=void 0;gP;gP=gO){gO=gP.nextSibling;if(gP.className=="CodeMirror-linewidget"){gN.node.removeChild(gP)}}fM(i,gN,gQ)}function aF(i,gO,gP,gQ){var gN=d4(i,gO);gO.text=gO.node=gN.pre;if(gN.bgClass){gO.bgClass=gN.bgClass}if(gN.textClass){gO.textClass=gN.textClass}dO(gO);dn(i,gO,gP,gQ);fM(i,gO,gQ);return gO.node}function fM(gN,gP,gQ){gx(gN,gP.line,gP,gQ,true);if(gP.rest){for(var gO=0;gO<gP.rest.length;gO++){gx(gN,gP.rest[gO],gP,gQ,false)}}}function gx(gV,gW,gS,gU,gQ){if(!gW.widgets){return}var gN=f4(gS);for(var gP=0,gT=gW.widgets;gP<gT.length;++gP){var gR=gT[gP],gO=gv("div",[gR.node],"CodeMirror-linewidget");if(!gR.handleMouseEvents){gO.setAttribute("cm-ignore-events","true")}bI(gR,gO,gS,gU);gV.display.input.setUneditable(gO);if(gQ&&gR.above){gN.insertBefore(gO,gS.gutter||gS.text)}else{gN.appendChild(gO)}ad(gR,"redraw")}}function bI(gP,gO,i,gQ){if(gP.noHScroll){(i.alignable||(i.alignable=[])).push(gO);var gN=gQ.wrapperWidth;gO.style.left=gQ.fixedPos+"px";if(!gP.coverGutter){gN-=gQ.gutterTotalWidth;gO.style.paddingLeft=gQ.gutterTotalWidth+"px"}gO.style.width=gN+"px"}if(gP.coverGutter){gO.style.zIndex=5;gO.style.position="relative";if(!gP.noHScroll){gO.style.marginLeft=-gQ.gutterTotalWidth+"px"}}}function c4(gO){if(gO.height!=null){return gO.height}var i=gO.doc.cm;if(!i){return 0}if(!gD(document.body,gO.node)){var gN="position: relative;";if(gO.coverGutter){gN+="margin-left: -"+i.display.gutters.offsetWidth+"px;"}if(gO.noHScroll){gN+="width: "+i.display.wrapper.clientWidth+"px;"}bV(i.display.measure,gv("div",[gO.node],null,gN))}return gO.height=gO.node.parentNode.offsetHeight}function bb(gN,i){for(var gO=K(i);gO!=gN.wrapper;gO=gO.parentNode){if(!gO||(gO.nodeType==1&&gO.getAttribute("cm-ignore-events")=="true")||(gO.parentNode==gN.sizer&&gO!=gN.mover)){return true}}}function fs(i){return i.lineSpace.offsetTop}function bL(i){return i.mover.offsetHeight-i.lineSpace.offsetHeight}function fo(gP){if(gP.cachedPaddingH){return gP.cachedPaddingH}var gO=bV(gP.measure,gv("pre","x"));var i=window.getComputedStyle?window.getComputedStyle(gO):gO.currentStyle;var gN={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};if(!isNaN(gN.left)&&!isNaN(gN.right)){gP.cachedPaddingH=gN}return gN}function cZ(i){return dR-i.display.nativeBarWidth}function du(i){return i.display.scroller.clientWidth-cZ(i)-i.display.barWidth}function c1(i){return i.display.scroller.clientHeight-cZ(i)-i.display.barHeight}function cm(gU,gQ,gT){var gP=gU.options.lineWrapping;var gR=gP&&du(gU);if(!gQ.measure.heights||gP&&gQ.measure.width!=gR){var gS=gQ.measure.heights=[];if(gP){gQ.measure.width=gR;var gW=gQ.text.firstChild.getClientRects();for(var gN=0;gN<gW.length-1;gN++){var gV=gW[gN],gO=gW[gN+1];if(Math.abs(gV.bottom-gO.bottom)>2){gS.push((gV.bottom+gO.top)/2-gT.top)}}}gS.push(gT.bottom-gT.top)}}function cy(gP,gN,gQ){if(gP.line==gN){return{map:gP.measure.map,cache:gP.measure.cache}}for(var gO=0;gO<gP.rest.length;gO++){if(gP.rest[gO]==gN){return{map:gP.measure.maps[gO],cache:gP.measure.caches[gO]}}}for(var gR=0;gR<gP.rest.length;gR++){if(bQ(gP.rest[gR])>gQ){return{map:gP.measure.maps[gR],cache:gP.measure.caches[gR],before:true}}}}function c8(i,gO){gO=y(gO);var gQ=bQ(gO);var gN=i.display.externalMeasured=new bx(i.doc,gO,gQ);gN.lineN=gQ;var gP=gN.built=e9(i,gN);gN.text=gP.pre;bV(i.display.lineMeasure,gP.pre);return gN}function es(i,gN,gP,gO){return C(i,a5(i,gN),gP,gO)}function fv(i,gO){if(gO>=i.display.viewFrom&&gO<i.display.viewTo){return i.display.view[dz(i,gO)]}var gN=i.display.externalMeasured;if(gN&&gO>=gN.lineN&&gO<gN.lineN+gN.size){return gN}}function a5(i,gO){var gP=bQ(gO);var gN=fv(i,gP);if(gN&&!gN.text){gN=null}else{if(gN&&gN.changes){aa(i,gN,gP,fw(i));i.curOp.forceUpdate=true}}if(!gN){gN=c8(i,gO)}var gQ=cy(gN,gO,gP);return{line:gO,view:gN,rect:null,map:gQ.map,cache:gQ.cache,before:gQ.before,hasHeights:false}}function C(i,gS,gQ,gN,gP){if(gS.before){gQ=-1}var gO=gQ+(gN||""),gR;if(gS.cache.hasOwnProperty(gO)){gR=gS.cache[gO]}else{if(!gS.rect){gS.rect=gS.view.text.getBoundingClientRect()}if(!gS.hasHeights){cm(i,gS.view,gS.rect);gS.hasHeights=true}gR=k(i,gS,gQ,gN);if(!gR.bogus){gS.cache[gO]=gR}}return{left:gR.left,right:gR.right,top:gP?gR.rtop:gR.top,bottom:gP?gR.rbottom:gR.bottom}}var eP={left:0,right:0,top:0,bottom:0};function aK(gW,gN,gT){var gP,gO,gR,gU,gQ,gV;for(var gS=0;gS<gW.length;gS+=3){gQ=gW[gS];gV=gW[gS+1];if(gN<gQ){gO=0;gR=1;gU="left"}else{if(gN<gV){gO=gN-gQ;gR=gO+1}else{if(gS==gW.length-3||gN==gV&&gW[gS+3]>gN){gR=gV-gQ;gO=gR-1;if(gN>=gV){gU="right"}}}}if(gO!=null){gP=gW[gS+2];if(gQ==gV&&gT==(gP.insertLeft?"left":"right")){gU=gT}if(gT=="left"&&gO==0){while(gS&&gW[gS-2]==gW[gS-3]&&gW[gS-1].insertLeft){gP=gW[(gS-=3)+2];gU="left"}}if(gT=="right"&&gO==gV-gQ){while(gS<gW.length-3&&gW[gS+3]==gW[gS+4]&&!gW[gS+5].insertLeft){gP=gW[(gS+=3)+2];gU="right"}}break}}return{node:gP,start:gO,end:gR,collapse:gU,coverStart:gQ,coverEnd:gV}}function fa(gO,gN){var gQ=eP;if(gN=="left"){for(var gP=0;gP<gO.length;gP++){if((gQ=gO[gP]).left!=gQ.right){break}}}else{for(var gR=gO.length-1;gR>=0;gR--){if((gQ=gO[gR]).left!=gQ.right){break}}}return gQ}function k(gV,g5,gY,gS){var gW=aK(g5.map,gY,gS);var g3=gW.node,gR=gW.start,gQ=gW.end,gN=gW.collapse;var gO;if(g3.nodeType==3){for(var gT=0;gT<4;gT++){while(gR&&fI(g5.line.text.charAt(gW.coverStart+gR))){--gR}while(gW.coverStart+gQ<gW.coverEnd&&fI(g5.line.text.charAt(gW.coverStart+gQ))){++gQ}if(dS&&l<9&&gR==0&&gQ==gW.coverEnd-gW.coverStart){gO=g3.parentNode.getBoundingClientRect()}else{gO=fa(cr(g3,gR,gQ).getClientRects(),gS)}if(gO.left||gO.right||gR==0){break}gQ=gR;gR=gR-1;gN="right"}if(dS&&l<11){gO=e4(gV.display.measure,gO)}}else{if(gR>0){gN=gS="right"}var gP;if(gV.options.lineWrapping&&(gP=g3.getClientRects()).length>1){gO=gP[gS=="right"?gP.length-1:0]}else{gO=g3.getBoundingClientRect()}}if(dS&&l<9&&!gR&&(!gO||!gO.left&&!gO.right)){var gU=g3.parentNode.getClientRects()[0];if(gU){gO={left:gU.left,right:gU.left+dL(gV.display),top:gU.top,bottom:gU.bottom}}else{gO=eP}}var g1=gO.top-g5.rect.top,gZ=gO.bottom-g5.rect.top;var g7=(g1+gZ)/2;var g6=g5.view.measure.heights;var g4=0;for(;g4<g6.length-1;g4++){if(g7<g6[g4]){break}}var g2=g4?g6[g4-1]:0,g0=g6[g4];var gX={left:(gN=="right"?gO.right:gO.left)-g5.rect.left,right:(gN=="left"?gO.left:gO.right)-g5.rect.left,top:g2,bottom:g0};if(!gO.left&&!gO.right){gX.bogus=true}if(!gV.options.singleCursorHeightPerLine){gX.rtop=g1;gX.rbottom=gZ}return gX}function e4(gO,gP){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!aL(gO)){return gP}var gN=screen.logicalXDPI/screen.deviceXDPI;var i=screen.logicalYDPI/screen.deviceYDPI;return{left:gP.left*gN,right:gP.right*gN,top:gP.top*i,bottom:gP.bottom*i}}function au(gO){if(gO.measure){gO.measure.cache={};gO.measure.heights=null;if(gO.rest){for(var gN=0;gN<gO.rest.length;gN++){gO.measure.caches[gN]={}}}}}function aO(gN){gN.display.externalMeasure=null;eb(gN.display.lineMeasure);for(var gO=0;gO<gN.display.view.length;gO++){au(gN.display.view[gO])}}function ai(i){aO(i);i.display.cachedCharWidth=i.display.cachedTextHeight=i.display.cachedPaddingH=null;if(!i.options.lineWrapping){i.display.maxLineChanged=true}i.display.lineNumChars=null}function cz(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function cx(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function e7(gU,gR,gT,gO,gQ){if(!gQ&&gR.widgets){for(var gP=0;gP<gR.widgets.length;++gP){if(gR.widgets[gP].above){var gW=c4(gR.widgets[gP]);gT.top+=gW;gT.bottom+=gW}}}if(gO=="line"){return gT}if(!gO){gO="local"}var gS=bP(gR);if(gO=="local"){gS+=fs(gU.display)}else{gS-=gU.display.viewOffset}if(gO=="page"||gO=="window"){var gN=gU.display.lineSpace.getBoundingClientRect();gS+=gN.top+(gO=="window"?0:cx());var gV=gN.left+(gO=="window"?0:cz());gT.left+=gV;gT.right+=gV}gT.top+=gS;gT.bottom+=gS;return gT}function gI(gN,gQ,gO){if(gO=="div"){return gQ}var gS=gQ.left,gR=gQ.top;if(gO=="page"){gS-=cz();gR-=cx()}else{if(gO=="local"||!gO){var gP=gN.display.sizer.getBoundingClientRect();gS+=gP.left;gR+=gP.top}}var i=gN.display.lineSpace.getBoundingClientRect();return{left:gS-i.left,top:gR-i.top}}function cP(i,gQ,gP,gO,gN){if(!gO){gO=fy(i.doc,gQ.line)}return e7(i,gO,es(i,gO,gQ.ch,gN),gP)}function d3(gV,gU,gO,gS,gX,gT){gS=gS||fy(gV.doc,gU.line);if(!gX){gX=a5(gV,gS)}function gQ(g0,gZ){var gY=C(gV,gX,g0,gZ?"right":"left",gT);if(gZ){gY.left=gY.right}else{gY.right=gY.left}return e7(gV,gS,gY,gO)}function gW(g1,gY){var gZ=gR[gY],g0=gZ.level%2;if(g1==dH(gZ)&&gY&&gZ.level<gR[gY-1].level){gZ=gR[--gY];g1=gH(gZ)-(gZ.level%2?0:1);g0=true}else{if(g1==gH(gZ)&&gY<gR.length-1&&gZ.level<gR[gY+1].level){gZ=gR[++gY];g1=dH(gZ)-gZ.level%2;g0=false}}if(g0&&g1==gZ.to&&g1>gZ.from){return gQ(g1-1)}return gQ(g1,g0)}var gR=a(gS),i=gU.ch;if(!gR){return gQ(i)}var gN=aH(gR,i);var gP=gW(i,gN);if(fl!=null){gP.other=gW(i,fl)}return gP}function dP(i,gQ){var gP=0;gQ=f7(i.doc,gQ);if(!i.options.lineWrapping){gP=dL(i.display)*gQ.ch}var gN=fy(i.doc,gQ.line);var gO=bP(gN)+fs(i.display);return{left:gP,right:gP,top:gO,bottom:gO+gN.height}}function gt(i,gN,gO,gQ){var gP=V(i,gN);gP.xRel=gQ;if(gO){gP.outside=true}return gP}function ge(gT,gQ,gP){var gS=gT.doc;gP+=gT.display.viewOffset;if(gP<0){return gt(gS.first,0,true,-1)}var gO=bK(gS,gP),gU=gS.first+gS.size-1;if(gO>gU){return gt(gS.first+gS.size-1,fy(gS,gU).text.length,true,1)}if(gQ<0){gQ=0}var gN=fy(gS,gO);for(;;){var gV=c5(gT,gN,gO,gQ,gP);var gR=eJ(gN);var i=gR&&gR.find(0,true);if(gR&&(gV.ch>i.from.ch||gV.ch==i.from.ch&&gV.xRel>0)){gO=bQ(gN=i.to.line)}else{return gV}}}function c5(gX,gP,hc,gZ,gY){var gW=gY-bP(gP);var gT=false,g5=2*gX.display.wrapper.clientWidth;var g2=a5(gX,gP);function ha(i){var he=d3(gX,V(hc,i),"line",gP,g2);gT=true;if(gW>he.bottom){return he.left-g5}else{if(gW<he.top){return he.left+g5}else{gT=false}}return he.left}var g1=a(gP),g4=gP.text.length;var g6=cJ(gP),gQ=cY(gP);var g3=ha(g6),gN=gT,gO=ha(gQ),gS=gT;if(gZ>gO){return gt(hc,gQ,gS,1)}for(;;){if(g1?gQ==g6||gQ==u(gP,g6,1):gQ-g6<=1){var g0=gZ<g3||gZ-g3<=gO-gZ?g6:gQ;var hb=g0==g6?gN:gS;var g9=gZ-(g0==g6?g3:gO);if(gS&&!g1&&!/\s/.test(gP.text.charAt(g0))&&g9>0&&g0<gP.text.length&&g2.view.measure.heights.length>1){var g7=C(gX,g2,g0,"right");if(gW<=g7.bottom&&gW>=g7.top&&Math.abs(gZ-g7.right)<g9){hb=false;g0++;g9=gZ-g7.right}}while(fI(gP.text.charAt(g0))){++g0}var gV=gt(hc,g0,hb,g9<-1?-1:g9>1?1:0);return gV}var gU=Math.ceil(g4/2),hd=g6+gU;if(g1){hd=g6;for(var g8=0;g8<gU;++g8){hd=u(gP,hd,1)}}var gR=ha(hd);if(gR>gZ){gQ=hd;gO=gR;if(gS=gT){gO+=1000}g4=gU}else{g6=hd;g3=gR;gN=gT;g4-=gU}}}var aG;function aY(gP){if(gP.cachedTextHeight!=null){return gP.cachedTextHeight}if(aG==null){aG=gv("pre");for(var gO=0;gO<49;++gO){aG.appendChild(document.createTextNode("x"));aG.appendChild(gv("br"))}aG.appendChild(document.createTextNode("x"))}bV(gP.measure,aG);var gN=aG.offsetHeight/50;if(gN>3){gP.cachedTextHeight=gN}eb(gP.measure);return gN||1}function dL(gQ){if(gQ.cachedCharWidth!=null){return gQ.cachedCharWidth}var i=gv("span","xxxxxxxxxx");var gP=gv("pre",[i]);bV(gQ.measure,gP);var gO=i.getBoundingClientRect(),gN=(gO.right-gO.left)/10;if(gN>2){gQ.cachedCharWidth=gN}return gN||10}function fw(gN){var gS=gN.display,gQ={},gP={};var gR=gS.gutters.clientLeft;for(var gT=gS.gutters.firstChild,gO=0;gT;gT=gT.nextSibling,++gO){gQ[gN.options.gutters[gO]]=gT.offsetLeft+gT.clientLeft+gR;gP[gN.options.gutters[gO]]=gT.clientWidth}return{fixedPos:d7(gS),gutterTotalWidth:gS.gutters.offsetWidth,gutterLeft:gQ,gutterWidth:gP,wrapperWidth:gS.wrapper.clientWidth}}function d7(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function be(i){var gO=aY(i.display),gN=i.options.lineWrapping;var gP=gN&&Math.max(5,i.display.scroller.clientWidth/dL(i.display)-3);return function(gR){if(fP(i.doc,gR)){return 0}var gQ=0;if(gR.widgets){for(var gS=0;gS<gR.widgets.length;gS++){if(gR.widgets[gS].height){gQ+=gR.widgets[gS].height}}}if(gN){return gQ+(Math.ceil(gR.text.length/gP)||1)*gO}else{return gQ+gO}}}function X(i){var gO=i.doc,gN=be(i);gO.iter(function(gP){var gQ=gN(gP);if(gQ!=gP.height){gz(gP,gQ)}})}function cs(gV,gQ,gN,gO){var gR=gV.display;if(!gN&&K(gQ).getAttribute("cm-not-content")=="true"){return null}var gU,gS,i=gR.lineSpace.getBoundingClientRect();try{gU=gQ.clientX-i.left;gS=gQ.clientY-i.top}catch(gQ){return null}var gT=ge(gV,gU,gS),gW;if(gO&&gT.xRel==1&&(gW=fy(gV.doc,gT.line).text).length==gT.ch){var gP=bU(gW,gW.length,gV.options.tabSize)-gW.length;gT=V(gT.line,Math.max(0,Math.round((gU-fo(gV.display).left)/dL(gV.display))-gP))}return gT}function dz(gN,gQ){if(gQ>=gN.display.viewTo){return null}gQ-=gN.display.viewFrom;if(gQ<0){return null}var gO=gN.display.view;for(var gP=0;gP<gO.length;gP++){gQ-=gO[gP].size;if(gQ<0){return gP}}}function bF(i){i.display.input.showSelection(i.display.input.prepareSelection())}function f5(gT,gN){var gS=gT.doc,gV={};var gR=gV.cursors=document.createDocumentFragment();var gO=gV.selection=document.createDocumentFragment();for(var gQ=0;gQ<gS.sel.ranges.length;gQ++){if(gN===false&&gQ==gS.sel.primIndex){continue}var gU=gS.sel.ranges[gQ];if(gU.from().line>=gT.display.viewTo||gU.to().line<gT.display.viewFrom){continue}var gP=gU.empty();if(gP||gT.options.showCursorWhenSelecting){A(gT,gU.head,gR)}if(!gP){bG(gT,gU,gO)}}return gV}function A(i,gP,gO){var gR=d3(i,gP,"div",null,null,!i.options.singleCursorHeightPerLine);var gQ=gO.appendChild(gv("div","\u00a0","CodeMirror-cursor"));gQ.style.left=gR.left+"px";gQ.style.top=gR.top+"px";gQ.style.height=Math.max(0,gR.bottom-gR.top)*i.options.cursorHeight+"px";if(gR.other){var gN=gO.appendChild(gv("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));gN.style.display="";gN.style.left=gR.other.left+"px";gN.style.top=gR.other.top+"px";gN.style.height=(gR.other.bottom-gR.other.top)*0.85+"px"}}function bG(gR,gQ,gS){var gZ=gR.display,g3=gR.doc;var i=document.createDocumentFragment();var gW=fo(gR.display),gP=gW.left;var g0=Math.max(gZ.sizerWidth,du(gR)-gZ.sizer.offsetLeft)-gW.right;function gX(g7,g6,g5,g4){if(g6<0){g6=0}g6=Math.round(g6);g4=Math.round(g4);i.appendChild(gv("div",null,"CodeMirror-selected",("position: absolute; left: "+g7+"px;\n top: "+g6+"px; width: "+(g5==null?g0-g7:g5)+"px;\n height: "+(g4-g6)+"px")))}function gN(g5,g7,ha){var g6=fy(g3,g5);var g8=g6.text.length;var hb,g4;function g9(hd,hc){return cP(gR,V(g5,hd),"div",g6,hc)}ee(a(g6),g7||0,ha==null?g8:ha,function(hj,hi,hc){var hf=g9(hj,"left"),hg,hh,he;if(hj==hi){hg=hf;hh=he=hf.left}else{hg=g9(hi-1,"right");if(hc=="rtl"){var hd=hf;hf=hg;hg=hd}hh=hf.left;he=hg.right}if(g7==null&&hj==0){hh=gP}if(hg.top-hf.top>3){gX(hh,hf.top,null,hf.bottom);hh=gP;if(hf.bottom<hg.top){gX(hh,hf.bottom,null,hg.top)}}if(ha==null&&hi==g8){he=g0}if(!hb||hf.top<hb.top||hf.top==hb.top&&hf.left<hb.left){hb=hf}if(!g4||hg.bottom>g4.bottom||hg.bottom==g4.bottom&&hg.right>g4.right){g4=hg}if(hh<gP+1){hh=gP}gX(hh,hg.top,he-hh,hg.bottom)});return{start:hb,end:g4}}var g2=gQ.from(),g1=gQ.to();if(g2.line==g1.line){gN(g2.line,g2.ch,g1.ch)}else{var gO=fy(g3,g2.line),gU=fy(g3,g1.line);var gT=y(gO)==y(gU);var gV=gN(g2.line,g2.ch,gT?gO.text.length+1:null).end;var gY=gN(g1.line,gT?0:null,g1.ch).start;if(gT){if(gV.top<gY.top-2){gX(gV.right,gV.top,null,gV.bottom);gX(gP,gY.top,gY.left,gY.bottom)}else{gX(gV.right,gV.top,gY.left-gV.right,gV.bottom)}}if(gV.bottom<gY.top){gX(gP,gV.bottom,null,gY.top)}}gS.appendChild(i)}function p(i){if(!i.state.focused){return}var gO=i.display;clearInterval(gO.blinker);var gN=true;gO.cursorDiv.style.visibility="";if(i.options.cursorBlinkRate>0){gO.blinker=setInterval(function(){return gO.cursorDiv.style.visibility=(gN=!gN)?"":"hidden"},i.options.cursorBlinkRate)}else{if(i.options.cursorBlinkRate<0){gO.cursorDiv.style.visibility="hidden"}}}function s(i){if(!i.state.focused){i.display.input.focus();cG(i)}}function aj(i){i.state.delayingBlurEvent=true;setTimeout(function(){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false;aV(i)}},100)}function cG(i,gN){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false}if(i.options.readOnly=="nocursor"){return}if(!i.state.focused){aE(i,"focus",i,gN);i.state.focused=true;fW(i.display.wrapper,"CodeMirror-focused");if(!i.curOp&&i.display.selForContextMenu!=i.doc.sel){i.display.input.reset();if(c6){setTimeout(function(){return i.display.input.reset(true)},20)}}i.display.input.receivedFocus()}p(i)}function aV(i,gN){if(i.state.delayingBlurEvent){return}if(i.state.focused){aE(i,"blur",i,gN);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 eT(gV){var gT=gV.display,gU=gT.view;if(!gT.alignWidgets&&(!gT.gutters.firstChild||!gV.options.fixedGutter)){return}var gR=d7(gT)-gT.scroller.scrollLeft+gV.doc.scrollLeft;var gN=gT.gutters.offsetWidth,gO=gR+"px";for(var gQ=0;gQ<gU.length;gQ++){if(!gU[gQ].hidden){if(gV.options.fixedGutter){if(gU[gQ].gutter){gU[gQ].gutter.style.left=gO}if(gU[gQ].gutterBackground){gU[gQ].gutterBackground.style.left=gO}}var gS=gU[gQ].alignable;if(gS){for(var gP=0;gP<gS.length;gP++){gS[gP].style.left=gO}}}}if(gV.options.fixedGutter){gT.gutters.style.left=(gR+gN)+"px"}}function ef(i){if(!i.options.lineNumbers){return false}var gR=i.doc,gN=eF(i.options,gR.first+gR.size-1),gQ=i.display;if(gN.length!=gQ.lineNumChars){var gS=gQ.measure.appendChild(gv("div",[gv("div",gN)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var gO=gS.firstChild.offsetWidth,gP=gS.offsetWidth-gO;gQ.lineGutter.style.width="";gQ.lineNumInnerWidth=Math.max(gO,gQ.lineGutter.offsetWidth-gP)+1;gQ.lineNumWidth=gQ.lineNumInnerWidth+gP;gQ.lineNumChars=gQ.lineNumInnerWidth?gN.length:-1;gQ.lineGutter.style.width=gQ.lineNumWidth+"px";da(i);return true}return false}function a9(gU){var gS=gU.display;var gO=gS.lineDiv.offsetTop;for(var gP=0;gP<gS.view.length;gP++){var gV=gS.view[gP],gW=void 0;if(gV.hidden){continue}if(dS&&l<8){var gR=gV.node.offsetTop+gV.node.offsetHeight;gW=gR-gO;gO=gR}else{var gQ=gV.node.getBoundingClientRect();gW=gQ.bottom-gQ.top}var gT=gV.line.height-gW;if(gW<2){gW=aY(gS)}if(gT>0.001||gT<-0.001){gz(gV.line,gW);cf(gV.line);if(gV.rest){for(var gN=0;gN<gV.rest.length;gN++){cf(gV.rest[gN])}}}}}function cf(gN){if(gN.widgets){for(var gO=0;gO<gN.widgets.length;++gO){gN.widgets[gO].height=gN.widgets[gO].node.parentNode.offsetHeight}}}function ca(gP,gT,gO){var gQ=gO&&gO.top!=null?Math.max(0,gO.top):gP.scroller.scrollTop;gQ=Math.floor(gQ-fs(gP));var i=gO&&gO.bottom!=null?gO.bottom:gQ+gP.wrapper.clientHeight;var gR=bK(gT,gQ),gS=bK(gT,i);if(gO&&gO.ensure){var gN=gO.ensure.from.line,gU=gO.ensure.to.line;if(gN<gR){gR=gN;gS=bK(gT,bP(fy(gT,gN))+gP.wrapper.clientHeight)}else{if(Math.min(gU,gT.lastLine())>=gS){gR=bK(gT,bP(fy(gT,gU))-gP.wrapper.clientHeight);gS=gU}}}return{from:gR,to:Math.max(gS,gR+1)}}function N(i,gN){if(Math.abs(i.doc.scrollTop-gN)<2){return}i.doc.scrollTop=gN;if(!ct){d2(i,{top:gN})}if(i.display.scroller.scrollTop!=gN){i.display.scroller.scrollTop=gN}i.display.scrollbars.setScrollTop(gN);if(ct){d2(i)}ep(i,100)}function bH(i,gO,gN){if(gN?gO==i.doc.scrollLeft:Math.abs(i.doc.scrollLeft-gO)<2){return}gO=Math.min(gO,i.display.scroller.scrollWidth-i.display.scroller.clientWidth);i.doc.scrollLeft=gO;eT(i);if(i.display.scroller.scrollLeft!=gO){i.display.scroller.scrollLeft=gO}i.display.scrollbars.setScrollLeft(gO)}var fG=0;var cl=null;if(dS){cl=-0.53}else{if(ct){cl=15}else{if(dk){cl=-0.7}else{if(aC){cl=-1/3}}}}function cW(gO){var gN=gO.wheelDeltaX,i=gO.wheelDeltaY;if(gN==null&&gO.detail&&gO.axis==gO.HORIZONTAL_AXIS){gN=gO.detail}if(i==null&&gO.detail&&gO.axis==gO.VERTICAL_AXIS){i=gO.detail}else{if(i==null){i=gO.wheelDelta}}return{x:gN,y:i}}function az(i){var gN=cW(i);gN.x*=cl;gN.y*=cl;return gN}function c(gX,gR){var gZ=cW(gR),g1=gZ.x,g0=gZ.y;var gT=gX.display,gW=gT.scroller;var gQ=gW.scrollWidth>gW.clientWidth;var gP=gW.scrollHeight>gW.clientHeight;if(!(g1&&gQ||g0&&gP)){return}if(g0&&cb&&c6){outer:for(var gY=gR.target,gV=gT.view;gY!=gW;gY=gY.parentNode){for(var gO=0;gO<gV.length;gO++){if(gV[gO].node==gY){gX.display.currentWheelTarget=gY;break outer}}}}if(g1&&!ct&&!ec&&cl!=null){if(g0&&gP){N(gX,Math.max(0,Math.min(gW.scrollTop+g0*cl,gW.scrollHeight-gW.clientHeight)))}bH(gX,Math.max(0,Math.min(gW.scrollLeft+g1*cl,gW.scrollWidth-gW.clientWidth)));if(!g0||(g0&&gP)){cL(gR)}gT.wheelStartX=null;return}if(g0&&cl!=null){var gN=g0*cl;var gU=gX.doc.scrollTop,gS=gU+gT.wrapper.clientHeight;if(gN<0){gU=Math.max(0,gU+gN-50)}else{gS=Math.min(gX.doc.height,gS+gN+50)}d2(gX,{top:gU,bottom:gS})}if(fG<20){if(gT.wheelStartX==null){gT.wheelStartX=gW.scrollLeft;gT.wheelStartY=gW.scrollTop;gT.wheelDX=g1;gT.wheelDY=g0;setTimeout(function(){if(gT.wheelStartX==null){return}var i=gW.scrollLeft-gT.wheelStartX;var g3=gW.scrollTop-gT.wheelStartY;var g2=(g3&&gT.wheelDY&&g3/gT.wheelDY)||(i&&gT.wheelDX&&i/gT.wheelDX);gT.wheelStartX=gT.wheelStartY=null;if(!g2){return}cl=(cl*fG+g2)/(fG+1);++fG},200)}else{gT.wheelDX+=g1;gT.wheelDY+=g0}}}function dI(i){var gP=i.display,gO=gP.gutters.offsetWidth;var gN=Math.round(i.doc.height+bL(i.display));return{clientHeight:gP.scroller.clientHeight,viewHeight:gP.wrapper.clientHeight,scrollWidth:gP.scroller.scrollWidth,clientWidth:gP.scroller.clientWidth,viewWidth:gP.wrapper.clientWidth,barLeft:i.options.fixedGutter?gO:0,docHeight:gN,scrollHeight:gN+cZ(i)+gP.barHeight,nativeBarWidth:gP.nativeBarWidth,gutterWidth:gO}}function dt(gO,gN,i){this.cm=i;var gP=this.vert=gv("div",[gv("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var gQ=this.horiz=gv("div",[gv("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");gO(gP);gO(gQ);b0(gP,"scroll",function(){if(gP.clientHeight){gN(gP.scrollTop,"vertical")}});b0(gQ,"scroll",function(){if(gQ.clientWidth){gN(gQ.scrollLeft,"horizontal")}});this.checkedZeroWidth=false;if(dS&&l<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}}dt.prototype=aN({update:function(gP){var gQ=gP.scrollWidth>gP.clientWidth+1;var gO=gP.scrollHeight>gP.clientHeight+1;var gR=gP.nativeBarWidth;if(gO){this.vert.style.display="block";this.vert.style.bottom=gQ?gR+"px":"0";var gN=gP.viewHeight-(gQ?gR:0);this.vert.firstChild.style.height=Math.max(0,gP.scrollHeight-gP.clientHeight+gN)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(gQ){this.horiz.style.display="block";this.horiz.style.right=gO?gR+"px":"0";this.horiz.style.left=gP.barLeft+"px";var i=gP.viewWidth-gP.barLeft-(gO?gR:0);this.horiz.firstChild.style.width=(gP.scrollWidth-gP.clientWidth+i)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&&gP.clientHeight>0){if(gR==0){this.zeroWidthHack()}this.checkedZeroWidth=true}return{right:gO?gR:0,bottom:gQ?gR:0}},setScrollLeft:function(i){if(this.horiz.scrollLeft!=i){this.horiz.scrollLeft=i}if(this.disableHoriz){this.enableZeroWidthBar(this.horiz,this.disableHoriz)}},setScrollTop:function(i){if(this.vert.scrollTop!=i){this.vert.scrollTop=i}if(this.disableVert){this.enableZeroWidthBar(this.vert,this.disableVert)}},zeroWidthHack:function(){var i=cb&&!dd?"12px":"18px";this.horiz.style.height=this.vert.style.width=i;this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new gM;this.disableVert=new gM},enableZeroWidthBar:function(gN,i){gN.style.pointerEvents="auto";function gO(){var gQ=gN.getBoundingClientRect();var gP=document.elementFromPoint(gQ.left+1,gQ.bottom-1);if(gP!=gN){gN.style.pointerEvents="none"}else{i.set(1000,gO)}}i.set(1000,gO)},clear:function(){var i=this.horiz.parentNode;i.removeChild(this.horiz);i.removeChild(this.vert)}},dt.prototype);function fm(){}fm.prototype=aN({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},fm.prototype);function fg(gP,gR){if(!gR){gR=dI(gP)}var gO=gP.display.barWidth,gN=gP.display.barHeight;aU(gP,gR);for(var gQ=0;gQ<4&&gO!=gP.display.barWidth||gN!=gP.display.barHeight;gQ++){if(gO!=gP.display.barWidth&&gP.options.lineWrapping){a9(gP)}aU(gP,dI(gP));gO=gP.display.barWidth;gN=gP.display.barHeight}}function aU(i,gN){var gP=i.display;var gO=gP.scrollbars.update(gN);gP.sizer.style.paddingRight=(gP.barWidth=gO.right)+"px";gP.sizer.style.paddingBottom=(gP.barHeight=gO.bottom)+"px";gP.heightForcer.style.borderBottom=gO.bottom+"px solid transparent";if(gO.right&&gO.bottom){gP.scrollbarFiller.style.display="block";gP.scrollbarFiller.style.height=gO.bottom+"px";gP.scrollbarFiller.style.width=gO.right+"px"}else{gP.scrollbarFiller.style.display=""}if(gO.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter){gP.gutterFiller.style.display="block";gP.gutterFiller.style.height=gO.bottom+"px";gP.gutterFiller.style.width=gN.gutterWidth+"px"}else{gP.gutterFiller.style.display=""}}var bn={"native":dt,"null":fm};function aD(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 bn[i.options.scrollbarStyle](function(gN){i.display.wrapper.insertBefore(gN,i.display.scrollbarFiller);b0(gN,"mousedown",function(){if(i.state.focused){setTimeout(function(){return i.display.input.focus()},0)}});gN.setAttribute("cm-not-content","true")},function(gO,gN){if(gN=="horizontal"){bH(i,gO)}else{N(i,gO)}},i);if(i.display.scrollbars.addClass){fW(i.display.wrapper,i.display.scrollbars.addClass)}}function eg(gN,gQ){if(aR(gN,"scrollCursorIntoView")){return}var gR=gN.display,gO=gR.sizer.getBoundingClientRect(),i=null;if(gQ.top+gO.top<0){i=true}else{if(gQ.bottom+gO.top>(window.innerHeight||document.documentElement.clientHeight)){i=false}}if(i!=null&&!fN){var gP=gv("div","\u200b",null,("position: absolute;\n top: "+(gQ.top-gR.viewOffset-fs(gN.display))+"px;\n height: "+(gQ.bottom-gQ.top+cZ(gN)+gR.barHeight)+"px;\n left: "+(gQ.left)+"px; width: 2px;"));gN.display.lineSpace.appendChild(gP);gP.scrollIntoView(i);gN.display.lineSpace.removeChild(gP)}}function D(gW,gU,gQ,gP){if(gP==null){gP=0}var gV;for(var gR=0;gR<5;gR++){var gS=false;gV=d3(gW,gU);var i=!gQ||gQ==gU?gV:d3(gW,gQ);var gO=G(gW,Math.min(gV.left,i.left),Math.min(gV.top,i.top)-gP,Math.max(gV.left,i.left),Math.max(gV.bottom,i.bottom)+gP);var gT=gW.doc.scrollTop,gN=gW.doc.scrollLeft;if(gO.scrollTop!=null){N(gW,gO.scrollTop);if(Math.abs(gW.doc.scrollTop-gT)>1){gS=true}}if(gO.scrollLeft!=null){bH(gW,gO.scrollLeft);if(Math.abs(gW.doc.scrollLeft-gN)>1){gS=true}}if(!gS){break}}return gV}function E(i,gO,gQ,gN,gP){var gR=G(i,gO,gQ,gN,gP);if(gR.scrollTop!=null){N(i,gR.scrollTop)}if(gR.scrollLeft!=null){bH(i,gR.scrollLeft)}}function G(gY,gP,gX,gN,gW){var gU=gY.display,gS=aY(gY.display);if(gX<0){gX=0}var gQ=gY.curOp&&gY.curOp.scrollTop!=null?gY.curOp.scrollTop:gU.scroller.scrollTop;var g0=c1(gY),g2={};if(gW-gX>g0){gW=gX+g0}var gO=gY.doc.height+bL(gU);var i=gX<gS,gT=gW>gO-gS;if(gX<gQ){g2.scrollTop=i?0:gX}else{if(gW>gQ+g0){var gV=Math.min(gX,(gT?gO:gW)-g0);if(gV!=gQ){g2.scrollTop=gV}}}var g1=gY.curOp&&gY.curOp.scrollLeft!=null?gY.curOp.scrollLeft:gU.scroller.scrollLeft;var gZ=du(gY)-(gY.options.fixedGutter?gU.gutters.offsetWidth:0);var gR=gN-gP>gZ;if(gR){gN=gP+gZ}if(gP<10){g2.scrollLeft=0}else{if(gP<g1){g2.scrollLeft=Math.max(0,gP-(gR?0:10))}else{if(gN>gZ+g1-3){g2.scrollLeft=gN+(gR?0:10)-gZ}}}return g2}function cR(i,gO,gN){if(gO!=null||gN!=null){fY(i)}if(gO!=null){i.curOp.scrollLeft=(i.curOp.scrollLeft==null?i.doc.scrollLeft:i.curOp.scrollLeft)+gO}if(gN!=null){i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+gN}}function f1(i){fY(i);var gN=i.getCursor(),gP=gN,gO=gN;if(!i.options.lineWrapping){gP=gN.ch?V(gN.line,gN.ch-1):gN;gO=V(gN.line,gN.ch+1)}i.curOp.scrollToPos={from:gP,to:gO,margin:i.options.cursorScrollMargin,isCursor:true}}function fY(i){var gO=i.curOp.scrollToPos;if(gO){i.curOp.scrollToPos=null;var gQ=dP(i,gO.from),gP=dP(i,gO.to);var gN=G(i,Math.min(gQ.left,gP.left),Math.min(gQ.top,gP.top)-gO.margin,Math.max(gQ.right,gP.right),Math.max(gQ.bottom,gP.bottom)+gO.margin);i.scrollTo(gN.scrollLeft,gN.scrollTop)}}var ek=0;function cO(i){i.curOp={cm:i,viewChanged:false,startHeight:i.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:false,id:++ek};eM(i.curOp)}function al(i){var gN=i.curOp;b1(gN,function(gP){for(var gO=0;gO<gP.ops.length;gO++){gP.ops[gO].cm.curOp=null}cQ(gP)})}function cQ(gS){var gO=gS.ops;for(var gN=0;gN<gO.length;gN++){b9(gO[gN])}for(var gT=0;gT<gO.length;gT++){ap(gO[gT])}for(var gR=0;gR<gO.length;gR++){b5(gO[gR])}for(var gQ=0;gQ<gO.length;gQ++){ao(gO[gQ])}for(var gP=0;gP<gO.length;gP++){fi(gO[gP])}}function b9(gO){var i=gO.cm,gN=i.display;I(i);if(gO.updateMaxLine){f(i)}gO.mustUpdate=gO.viewChanged||gO.forceUpdate||gO.scrollTop!=null||gO.scrollToPos&&(gO.scrollToPos.from.line<gN.viewFrom||gO.scrollToPos.to.line>=gN.viewTo)||gN.maxLineChanged&&i.options.lineWrapping;gO.update=gO.mustUpdate&&new aJ(i,gO.mustUpdate&&{top:gO.scrollTop,ensure:gO.scrollToPos},gO.forceUpdate)}function ap(i){i.updatedDisplay=i.mustUpdate&&B(i.cm,i.update)}function b5(gO){var i=gO.cm,gN=i.display;if(gO.updatedDisplay){a9(i)}gO.barMeasure=dI(i);if(gN.maxLineChanged&&!i.options.lineWrapping){gO.adjustWidthTo=es(i,gN.maxLine,gN.maxLine.text.length).left+3;i.display.sizerWidth=gO.adjustWidthTo;gO.barMeasure.scrollWidth=Math.max(gN.scroller.clientWidth,gN.sizer.offsetLeft+gO.adjustWidthTo+cZ(i)+i.display.barWidth);gO.maxScrollLeft=Math.max(0,gN.sizer.offsetLeft+gO.adjustWidthTo-du(i))}if(gO.updatedDisplay||gO.selectionChanged){gO.preparedSelection=gN.input.prepareSelection(gO.focus)}}function ao(gO){var i=gO.cm;if(gO.adjustWidthTo!=null){i.display.sizer.style.minWidth=gO.adjustWidthTo+"px";if(gO.maxScrollLeft<i.doc.scrollLeft){bH(i,Math.min(i.display.scroller.scrollLeft,gO.maxScrollLeft),true)}i.display.maxLineChanged=false}var gN=gO.focus&&gO.focus==dW()&&(!document.hasFocus||document.hasFocus());if(gO.preparedSelection){i.display.input.showSelection(gO.preparedSelection,gN)}if(gO.updatedDisplay||gO.startHeight!=i.doc.height){fg(i,gO.barMeasure)}if(gO.updatedDisplay){dG(i,gO.barMeasure)}if(gO.selectionChanged){p(i)}if(i.state.focused&&gO.updateInput){i.display.input.reset(gO.typing)}if(gN){s(gO.cm)}}function fi(gQ){var gV=gQ.cm,gS=gV.display,gU=gV.doc;if(gQ.updatedDisplay){co(gV,gQ.update)}if(gS.wheelStartX!=null&&(gQ.scrollTop!=null||gQ.scrollLeft!=null||gQ.scrollToPos)){gS.wheelStartX=gS.wheelStartY=null}if(gQ.scrollTop!=null&&(gS.scroller.scrollTop!=gQ.scrollTop||gQ.forceScroll)){gU.scrollTop=Math.max(0,Math.min(gS.scroller.scrollHeight-gS.scroller.clientHeight,gQ.scrollTop));gS.scrollbars.setScrollTop(gU.scrollTop);gS.scroller.scrollTop=gU.scrollTop}if(gQ.scrollLeft!=null&&(gS.scroller.scrollLeft!=gQ.scrollLeft||gQ.forceScroll)){gU.scrollLeft=Math.max(0,Math.min(gS.scroller.scrollWidth-gS.scroller.clientWidth,gQ.scrollLeft));gS.scrollbars.setScrollLeft(gU.scrollLeft);gS.scroller.scrollLeft=gU.scrollLeft;eT(gV)}if(gQ.scrollToPos){var gT=D(gV,f7(gU,gQ.scrollToPos.from),f7(gU,gQ.scrollToPos.to),gQ.scrollToPos.margin);if(gQ.scrollToPos.isCursor&&gV.state.focused){eg(gV,gT)}}var gR=gQ.maybeHiddenMarkers,gN=gQ.maybeUnhiddenMarkers;if(gR){for(var gP=0;gP<gR.length;++gP){if(!gR[gP].lines.length){aE(gR[gP],"hide")}}}if(gN){for(var gO=0;gO<gN.length;++gO){if(gN[gO].lines.length){aE(gN[gO],"unhide")}}}if(gS.wrapper.offsetHeight){gU.scrollTop=gV.display.scroller.scrollTop}if(gQ.changeObjs){aE(gV,"changes",gV,gQ.changeObjs)}if(gQ.update){gQ.update.finish()}}function cS(i,gN){if(i.curOp){return gN()}cO(i);try{return gN()}finally{al(i)}}function c7(i,gN){return function(){if(i.curOp){return gN.apply(i,arguments)}cO(i);try{return gN.apply(i,arguments)}finally{al(i)}}}function dg(i){return function(){if(this.curOp){return i.apply(this,arguments)}cO(this);try{return i.apply(this,arguments)}finally{al(this)}}}function cI(i){return function(){var gN=this.cm;if(!gN||gN.curOp){return i.apply(this,arguments)}cO(gN);try{return i.apply(this,arguments)}finally{al(gN)}}}function ag(gU,gS,gT,gV){if(gS==null){gS=gU.doc.first}if(gT==null){gT=gU.doc.first+gU.doc.size}if(!gV){gV=0}var gP=gU.display;if(gV&&gT<gP.viewTo&&(gP.updateLineNumbers==null||gP.updateLineNumbers>gS)){gP.updateLineNumbers=gS}gU.curOp.viewChanged=true;if(gS>=gP.viewTo){if(a7&&aW(gU.doc,gS)<gP.viewTo){eK(gU)}}else{if(gT<=gP.viewFrom){if(a7&&ed(gU.doc,gT+gV)>gP.viewFrom){eK(gU)}else{gP.viewFrom+=gV;gP.viewTo+=gV}}else{if(gS<=gP.viewFrom&&gT>=gP.viewTo){eK(gU)}else{if(gS<=gP.viewFrom){var gR=dm(gU,gT,gT+gV,1);if(gR){gP.view=gP.view.slice(gR.index);gP.viewFrom=gR.lineN;gP.viewTo+=gV}else{eK(gU)}}else{if(gT>=gP.viewTo){var gN=dm(gU,gS,gS,-1);if(gN){gP.view=gP.view.slice(0,gN.index);gP.viewTo=gN.lineN}else{eK(gU)}}else{var gQ=dm(gU,gS,gS,-1);var gO=dm(gU,gT,gT+gV,1);if(gQ&&gO){gP.view=gP.view.slice(0,gQ.index).concat(fd(gU,gQ.lineN,gO.lineN)).concat(gP.view.slice(gO.index));gP.viewTo+=gV}else{eK(gU)}}}}}}var i=gP.externalMeasured;if(i){if(gT<i.lineN){i.lineN+=gV}else{if(gS<i.lineN+i.size){gP.externalMeasured=null}}}}function Q(gN,gO,gR){gN.curOp.viewChanged=true;var gS=gN.display,gQ=gN.display.externalMeasured;if(gQ&&gO>=gQ.lineN&&gO<gQ.lineN+gQ.size){gS.externalMeasured=null}if(gO<gS.viewFrom||gO>=gS.viewTo){return}var gP=gS.view[dz(gN,gO)];if(gP.node==null){return}var i=gP.changes||(gP.changes=[]);if(dr(i,gR)==-1){i.push(gR)}}function eK(i){i.display.viewFrom=i.display.viewTo=i.doc.first;i.display.view=[];i.display.viewOffset=0}function dm(gV,gP,gR,gO){var gS=dz(gV,gP),gU,gT=gV.display.view;if(!a7||gR==gV.doc.first+gV.doc.size){return{index:gS,lineN:gR}}var gN=gV.display.viewFrom;for(var gQ=0;gQ<gS;gQ++){gN+=gT[gQ].size}if(gN!=gP){if(gO>0){if(gS==gT.length-1){return null}gU=(gN+gT[gS].size)-gP;gS++}else{gU=gN-gP}gP+=gU;gR+=gU}while(aW(gV.doc,gR)!=gR){if(gS==(gO<0?0:gT.length-1)){return null}gR+=gO*gT[gS-(gO<0?1:0)].size;gS+=gO}return{index:gS,lineN:gR}}function cX(i,gQ,gP){var gO=i.display,gN=gO.view;if(gN.length==0||gQ>=gO.viewTo||gP<=gO.viewFrom){gO.view=fd(i,gQ,gP);gO.viewFrom=gQ}else{if(gO.viewFrom>gQ){gO.view=fd(i,gQ,gO.viewFrom).concat(gO.view)}else{if(gO.viewFrom<gQ){gO.view=gO.view.slice(dz(i,gQ))}}gO.viewFrom=gQ;if(gO.viewTo<gP){gO.view=gO.view.concat(fd(i,gO.viewTo,gP))}else{if(gO.viewTo>gP){gO.view=gO.view.slice(0,dz(i,gP))}}}gO.viewTo=gP}function dj(gN){var gO=gN.display.view,gR=0;for(var gQ=0;gQ<gO.length;gQ++){var gP=gO[gQ];if(!gP.hidden&&(!gP.node||gP.changes)){++gR}}return gR}function ep(i,gN){if(i.doc.mode.startState&&i.doc.frontier<i.display.viewTo){i.state.highlight.set(gN,cA(cV,i))}}function cV(i){var gQ=i.doc;if(gQ.frontier<gQ.first){gQ.frontier=gQ.first}if(gQ.frontier>=i.display.viewTo){return}var gO=+new Date+i.options.workTime;var gP=b7(gQ.mode,dK(i,gQ.frontier));var gN=[];gQ.iter(gQ.frontier,Math.min(gQ.first+gQ.size,i.display.viewTo+500),function(gR){if(gQ.frontier>=i.display.viewFrom){var gU=gR.styles,gY=gR.text.length>i.options.maxHighlightLength;var gW=fT(i,gR,gY?b7(gQ.mode,gP):gP,true);gR.styles=gW.styles;var gT=gR.styleClasses,gV=gW.classes;if(gV){gR.styleClasses=gV}else{if(gT){gR.styleClasses=null}}var gX=!gU||gU.length!=gR.styles.length||gT!=gV&&(!gT||!gV||gT.bgClass!=gV.bgClass||gT.textClass!=gV.textClass);for(var gS=0;!gX&&gS<gU.length;++gS){gX=gU[gS]!=gR.styles[gS]}if(gX){gN.push(gQ.frontier)}gR.stateAfter=gY?gP:b7(gQ.mode,gP)}else{if(gR.text.length<=i.options.maxHighlightLength){dF(i,gR.text,gP)}gR.stateAfter=gQ.frontier%5==0?b7(gQ.mode,gP):null}++gQ.frontier;if(+new Date>gO){ep(i,i.options.workDelay);return true}});if(gN.length){cS(i,function(){for(var gR=0;gR<gN.length;gR++){Q(i,gN[gR],"text")}})}}function aJ(gN,i,gO){var gP=gN.display;this.viewport=i;this.visible=ca(gP,gN.doc,i);this.editorIsHidden=!gP.wrapper.offsetWidth;this.wrapperHeight=gP.wrapper.clientHeight;this.wrapperWidth=gP.wrapper.clientWidth;this.oldDisplayWidth=du(gN);this.force=gO;this.dims=fw(gN);this.events=[]}aJ.prototype.signal=function(gN,i){if(fE(gN,i)){this.events.push(arguments)}};aJ.prototype.finish=function(){var gO=this;for(var gN=0;gN<this.events.length;gN++){aE.apply(null,gO.events[gN])}};function I(i){var gN=i.display;if(!gN.scrollbarsClipped&&gN.scroller.offsetWidth){gN.nativeBarWidth=gN.scroller.offsetWidth-gN.scroller.clientWidth;gN.heightForcer.style.height=cZ(i)+"px";gN.sizer.style.marginBottom=-gN.nativeBarWidth+"px";gN.sizer.style.borderRightWidth=cZ(i)+"px";gN.scrollbarsClipped=true}}function B(gV,gP){var gQ=gV.display,gU=gV.doc;if(gP.editorIsHidden){eK(gV);return false}if(!gP.force&&gP.visible.from>=gQ.viewFrom&&gP.visible.to<=gQ.viewTo&&(gQ.updateLineNumbers==null||gQ.updateLineNumbers>=gQ.viewTo)&&gQ.renderedView==gQ.view&&dj(gV)==0){return false}if(ef(gV)){eK(gV);gP.dims=fw(gV)}var gO=gU.first+gU.size;var gS=Math.max(gP.visible.from-gV.options.viewportMargin,gU.first);var gT=Math.min(gO,gP.visible.to+gV.options.viewportMargin);if(gQ.viewFrom<gS&&gS-gQ.viewFrom<20){gS=Math.max(gU.first,gQ.viewFrom)}if(gQ.viewTo>gT&&gQ.viewTo-gT<20){gT=Math.min(gO,gQ.viewTo)}if(a7){gS=aW(gV.doc,gS);gT=ed(gV.doc,gT)}var gN=gS!=gQ.viewFrom||gT!=gQ.viewTo||gQ.lastWrapHeight!=gP.wrapperHeight||gQ.lastWrapWidth!=gP.wrapperWidth;cX(gV,gS,gT);gQ.viewOffset=bP(fy(gV.doc,gQ.viewFrom));gV.display.mover.style.top=gQ.viewOffset+"px";var i=dj(gV);if(!gN&&i==0&&!gP.force&&gQ.renderedView==gQ.view&&(gQ.updateLineNumbers==null||gQ.updateLineNumbers>=gQ.viewTo)){return false}var gR=dW();if(i>4){gQ.lineDiv.style.display="none"}cq(gV,gQ.updateLineNumbers,gP.dims);if(i>4){gQ.lineDiv.style.display=""}gQ.renderedView=gQ.view;if(gR&&dW()!=gR&&gR.offsetHeight){gR.focus()}eb(gQ.cursorDiv);eb(gQ.selectionDiv);gQ.gutters.style.height=gQ.sizer.style.minHeight=0;if(gN){gQ.lastWrapHeight=gP.wrapperHeight;gQ.lastWrapWidth=gP.wrapperWidth;ep(gV,400)}gQ.updateLineNumbers=null;return true}function co(gN,gQ){var i=gQ.viewport;for(var gP=true;;gP=false){if(!gP||!gN.options.lineWrapping||gQ.oldDisplayWidth==du(gN)){if(i&&i.top!=null){i={top:Math.min(gN.doc.height+bL(gN.display)-c1(gN),i.top)}}gQ.visible=ca(gN.display,gN.doc,i);if(gQ.visible.from>=gN.display.viewFrom&&gQ.visible.to<=gN.display.viewTo){break}}if(!B(gN,gQ)){break}a9(gN);var gO=dI(gN);bF(gN);fg(gN,gO);dG(gN,gO)}gQ.signal(gN,"update",gN);if(gN.display.viewFrom!=gN.display.reportedViewFrom||gN.display.viewTo!=gN.display.reportedViewTo){gQ.signal(gN,"viewportChange",gN,gN.display.viewFrom,gN.display.viewTo);gN.display.reportedViewFrom=gN.display.viewFrom;gN.display.reportedViewTo=gN.display.viewTo}}function d2(gN,i){var gP=new aJ(gN,i);if(B(gN,gP)){a9(gN);co(gN,gP);var gO=dI(gN);bF(gN);fg(gN,gO);dG(gN,gO);gP.finish()}}function cq(gY,gP,gX){var gU=gY.display,g0=gY.options.lineNumbers;var gN=gU.lineDiv,gZ=gN.firstChild;function gT(g1){var i=g1.nextSibling;if(c6&&cb&&gY.display.currentWheelTarget==g1){g1.style.display="none"}else{g1.parentNode.removeChild(g1)}return i}var gV=gU.view,gS=gU.viewFrom;for(var gQ=0;gQ<gV.length;gQ++){var gR=gV[gQ];if(gR.hidden){}else{if(!gR.node||gR.node.parentNode!=gN){var gO=aF(gY,gR,gS,gX);gN.insertBefore(gO,gZ)}else{while(gZ!=gR.node){gZ=gT(gZ)}var gW=g0&&gP!=null&&gP<=gS&&gR.lineNumber;if(gR.changes){if(dr(gR.changes,"gutter")>-1){gW=false}aa(gY,gR,gS,gX)}if(gW){eb(gR.lineNumber);gR.lineNumber.appendChild(document.createTextNode(eF(gY.options,gS)))}gZ=gR.node.nextSibling}}gS+=gR.size}while(gZ){gZ=gT(gZ)}}function da(i){var gN=i.display.gutters.offsetWidth;i.display.sizer.style.marginLeft=gN+"px"}function dG(i,gN){i.display.sizer.style.minHeight=gN.docHeight+"px";i.display.heightForcer.style.top=gN.docHeight+"px";i.display.gutters.style.height=(gN.docHeight+i.display.barHeight+cZ(i))+"px"}function en(gN){var gO=gN.display.gutters,gS=gN.options.gutters;eb(gO);var gP=0;for(;gP<gS.length;++gP){var gQ=gS[gP];var gR=gO.appendChild(gv("div",null,"CodeMirror-gutter "+gQ));if(gQ=="CodeMirror-linenumbers"){gN.display.lineGutter=gR;gR.style.width=(gN.display.lineNumWidth||1)+"px"}}gO.style.display=gP?"":"none";da(gN)}function cj(i){var gN=dr(i.gutters,"CodeMirror-linenumbers");if(gN==-1&&i.lineNumbers){i.gutters=i.gutters.concat(["CodeMirror-linenumbers"])}else{if(gN>-1&&!i.lineNumbers){i.gutters=i.gutters.slice(0);i.gutters.splice(gN,1)}}}function gu(i,gN){this.ranges=i;this.primIndex=gN}gu.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(gN){var gR=this;if(gN==this){return true}if(gN.primIndex!=this.primIndex||gN.ranges.length!=this.ranges.length){return false}for(var gP=0;gP<this.ranges.length;gP++){var gO=gR.ranges[gP],gQ=gN.ranges[gP];if(ck(gO.anchor,gQ.anchor)!=0||ck(gO.head,gQ.head)!=0){return false}}return true},deepCopy:function(){var gP=this;var gN=[];for(var gO=0;gO<this.ranges.length;gO++){gN[gO]=new d6(cn(gP.ranges[gO].anchor),cn(gP.ranges[gO].head))}return new gu(gN,this.primIndex)},somethingSelected:function(){var gO=this;for(var gN=0;gN<this.ranges.length;gN++){if(!gO.ranges[gN].empty()){return true}}return false},contains:function(gR,gN){var gQ=this;if(!gN){gN=gR}for(var gP=0;gP<this.ranges.length;gP++){var gO=gQ.ranges[gP];if(ck(gN,gO.from())>=0&&ck(gR,gO.to())<=0){return gP}}return -1}};function d6(i,gN){this.anchor=i;this.head=gN}d6.prototype={from:function(){return aq(this.anchor,this.head)},to:function(){return bA(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function cB(gN,gU){var gP=gN[gU];gN.sort(function(gW,i){return ck(gW.from(),i.from())});gU=dr(gN,gP);for(var gR=1;gR<gN.length;gR++){var gV=gN[gR],gO=gN[gR-1];if(ck(gO.to(),gV.from())>=0){var gS=aq(gO.from(),gV.from()),gT=bA(gO.to(),gV.to());var gQ=gO.empty()?gV.from()==gV.head:gO.from()==gO.head;if(gR<=gU){--gU}gN.splice(--gR,2,new d6(gQ?gT:gS,gQ?gS:gT))}}return new gu(gN,gU)}function e8(i,gN){return new gu([new d6(i,gN||i)],0)}function c3(i){if(!i.text){return i.to}return V(i.from.line+i.text.length-1,f2(i.text).length+(i.text.length==1?i.from.ch:0))}function b3(gP,gO){if(ck(gP,gO.from)<0){return gP}if(ck(gP,gO.to)<=0){return c3(gO)}var i=gP.line+gO.text.length-(gO.to.line-gO.from.line)-1,gN=gP.ch;if(gP.line==gO.to.line){gN+=c3(gO).ch-gO.to.ch}return V(i,gN)}function fD(gQ,gR){var gO=[];for(var gP=0;gP<gQ.sel.ranges.length;gP++){var gN=gQ.sel.ranges[gP];gO.push(new d6(b3(gN.anchor,gR),b3(gN.head,gR)))}return cB(gO,gQ.sel.primIndex)}function bw(gO,gN,i){if(gO.line==gN.line){return V(i.line,gO.ch-gN.ch+i.ch)}else{return V(i.line+(gO.line-gN.line),gO.ch)}}function ae(gX,gU,gO){var gP=[];var gN=V(gX.first,0),gY=gN;for(var gR=0;gR<gU.length;gR++){var gT=gU[gR];var gW=bw(gT.from,gN,gY);var gV=bw(c3(gT),gN,gY);gN=gT.to;gY=gV;if(gO=="around"){var gS=gX.sel.ranges[gR],gQ=ck(gS.head,gS.anchor)<0;gP[gR]=new d6(gQ?gV:gW,gQ?gW:gV)}else{gP[gR]=new d6(gW,gW)}}return new gu(gP,gX.sel.primIndex)}function bt(i){i.doc.mode=fV(i.options,i.doc.modeOption);ex(i)}function ex(i){i.doc.iter(function(gN){if(gN.stateAfter){gN.stateAfter=null}if(gN.styles){gN.styles=null}});i.doc.frontier=i.doc.first;ep(i,100);i.state.modeGen++;if(i.curOp){ag(i)}}function d1(i,gN){return gN.from.ch==0&&gN.to.ch==0&&f2(gN.text)==""&&(!i.cm||i.cm.options.wholeLineUpdateBefore)}function fS(g3,gW,gQ,gV){function gP(g4){return gQ?gQ[g4]:null}function gU(g4,g6,g5){ez(g4,g6,g5,gV);ad(g4,"change",g4,gW)}function g0(g7,g5){var g4=[];for(var g6=g7;g6<g5;++g6){g4.push(new gy(gY[g6],gP(g6),gV))}return g4}var g1=gW.from,gN=gW.to,gY=gW.text;var gX=fy(g3,g1.line),i=fy(g3,gN.line);var gO=f2(gY),g2=gP(gY.length-1),gZ=gN.line-g1.line;if(gW.full){g3.insert(0,g0(0,gY.length));g3.remove(gY.length,g3.size-gY.length)}else{if(d1(g3,gW)){var gT=g0(0,gY.length-1);gU(i,i.text,g2);if(gZ){g3.remove(g1.line,gZ)}if(gT.length){g3.insert(g1.line,gT)}}else{if(gX==i){if(gY.length==1){gU(gX,gX.text.slice(0,g1.ch)+gO+gX.text.slice(gN.ch),g2)}else{var gS=g0(1,gY.length-1);gS.push(new gy(gO+gX.text.slice(gN.ch),g2,gV));gU(gX,gX.text.slice(0,g1.ch)+gY[0],gP(0));g3.insert(g1.line+1,gS)}}else{if(gY.length==1){gU(gX,gX.text.slice(0,g1.ch)+gY[0]+i.text.slice(gN.ch),gP(0));g3.remove(g1.line+1,gZ)}else{gU(gX,gX.text.slice(0,g1.ch)+gY[0],gP(0));gU(i,gO+i.text.slice(gN.ch),g2);var gR=g0(1,gY.length-1);if(gZ>1){g3.remove(g1.line+1,gZ-1)}g3.insert(g1.line+1,gR)}}}}ad(g3,"change",g3,gW)}function eh(gP,gO,gN){function i(gV,gT,gR){if(gV.linked){for(var gS=0;gS<gV.linked.length;++gS){var gQ=gV.linked[gS];if(gQ.doc==gT){continue}var gU=gR&&gQ.sharedHist;if(gN&&!gU){continue}gO(gQ.doc,gU);i(gQ.doc,gV,gU)}}}i(gP,null,true)}function em(i,gN){if(gN.cm){throw new Error("This document is already in use.")}i.doc=gN;gN.cm=i;X(i);bt(i);if(!i.options.lineWrapping){f(i)}i.options.mode=gN.modeOption;ag(i)}function gk(i){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=i||1}function dD(i,gO){var gN={from:cn(gO.from),to:c3(gO),text:gw(i,gO.from,gO.to)};b2(i,gN,gO.from.line,gO.to.line+1);eh(i,function(gP){return b2(gP,gN,gO.from.line,gO.to.line+1)},true);return gN}function fX(gN){while(gN.length){var i=f2(gN);if(i.ranges){gN.pop()}else{break}}}function e3(gN,i){if(i){fX(gN.done);return f2(gN.done)}else{if(gN.done.length&&!f2(gN.done).ranges){return f2(gN.done)}else{if(gN.done.length>1&&!gN.done[gN.done.length-2].ranges){gN.done.pop();return f2(gN.done)}}}}function f9(gS,gQ,i,gP){var gO=gS.history;gO.undone.length=0;var gN=+new Date,gT;var gU;if((gO.lastOp==gP||gO.lastOrigin==gQ.origin&&gQ.origin&&((gQ.origin.charAt(0)=="+"&&gS.cm&&gO.lastModTime>gN-gS.cm.options.historyEventDelay)||gQ.origin.charAt(0)=="*"))&&(gT=e3(gO,gO.lastOp==gP))){gU=f2(gT.changes);if(ck(gQ.from,gQ.to)==0&&ck(gQ.from,gU.to)==0){gU.to=c3(gQ)}else{gT.changes.push(dD(gS,gQ))}}else{var gR=f2(gO.done);if(!gR||!gR.ranges){cU(gS.sel,gO.done)}gT={changes:[dD(gS,gQ)],generation:gO.generation};gO.done.push(gT);while(gO.done.length>gO.undoDepth){gO.done.shift();if(!gO.done[0].ranges){gO.done.shift()}}}gO.done.push(i);gO.generation=++gO.maxGeneration;gO.lastModTime=gO.lastSelTime=gN;gO.lastOp=gO.lastSelOp=gP;gO.lastOrigin=gO.lastSelOrigin=gQ.origin;if(!gU){aE(gS,"historyAdded")}}function bD(gQ,i,gO,gP){var gN=i.charAt(0);return gN=="*"||gN=="+"&&gO.ranges.length==gP.ranges.length&&gO.somethingSelected()==gP.somethingSelected()&&new Date-gQ.history.lastSelTime<=(gQ.cm?gQ.cm.options.historyEventDelay:500)}function gF(gR,gP,i,gO){var gQ=gR.history,gN=gO&&gO.origin;if(i==gQ.lastSelOp||(gN&&gQ.lastSelOrigin==gN&&(gQ.lastModTime==gQ.lastSelTime&&gQ.lastOrigin==gN||bD(gR,gN,f2(gQ.done),gP)))){gQ.done[gQ.done.length-1]=gP}else{cU(gP,gQ.done)}gQ.lastSelTime=+new Date;gQ.lastSelOrigin=gN;gQ.lastSelOp=i;if(gO&&gO.clearRedo!==false){fX(gQ.undone)}}function cU(gN,i){var gO=f2(i);if(!(gO&&gO.ranges&&gO.equals(gN))){i.push(gN)}}function b2(gN,gR,gQ,gP){var i=gR["spans_"+gN.id],gO=0;gN.iter(Math.max(gN.first,gQ),Math.min(gN.first+gN.size,gP),function(gS){if(gS.markedSpans){(i||(i=gR["spans_"+gN.id]={}))[gO]=gS.markedSpans}++gO})}function bl(gP){if(!gP){return null}var gN;for(var gO=0;gO<gP.length;++gO){if(gP[gO].marker.explicitlyCleared){if(!gN){gN=gP.slice(0,gO)}}else{if(gN){gN.push(gP[gO])}}}return !gN?gP:gN.length?gN:null}function b8(gQ,gR){var gP=gR["spans_"+gQ.id];if(!gP){return null}var gN=[];for(var gO=0;gO<gR.text.length;++gO){gN.push(bl(gP[gO]))}return gN}function ej(gV,gT){var gN=b8(gV,gT);var gW=ev(gV,gT);if(!gN){return gW}if(!gW){return gN}for(var gQ=0;gQ<gN.length;++gQ){var gR=gN[gQ],gS=gW[gQ];if(gR&&gS){spans:for(var gP=0;gP<gS.length;++gP){var gU=gS[gP];for(var gO=0;gO<gR.length;++gO){if(gR[gO].marker==gU.marker){continue spans}}gR.push(gU)}}else{if(gS){gN[gQ]=gS}}}return gN}function bS(gY,gQ,gX){var gO=[];for(var gT=0;gT<gY.length;++gT){var gP=gY[gT];if(gP.ranges){gO.push(gX?gu.prototype.deepCopy.call(gP):gP);continue}var gV=gP.changes,gW=[];gO.push({changes:gW});for(var gS=0;gS<gV.length;++gS){var gU=gV[gS],gR=void 0;gW.push({from:gU.from,to:gU.to,text:gU.text});if(gQ){for(var gN in gU){if(gR=gN.match(/^spans_(\d+)$/)){if(dr(gQ,Number(gR[1]))>-1){f2(gW)[gN]=gU[gN];delete gU[gN]}}}}}}return gO}function fO(gR,gN,gQ,i){if(gR.cm&&gR.cm.display.shift||gR.extend){var gP=gN.anchor;if(i){var gO=ck(gQ,gP)<0;if(gO!=(ck(i,gP)<0)){gP=gQ;gQ=i}else{if(gO!=(ck(gQ,i)<0)){gQ=i}}}return new d6(gP,gQ)}else{return new d6(i||gQ,gQ)}}function gp(gP,gO,i,gN){bX(gP,new gu([fO(gP,gP.sel.primary(),gO,i)],0),gN)}function av(gS,gR,gP){var gO=[];for(var gQ=0;gQ<gS.sel.ranges.length;gQ++){gO[gQ]=fO(gS,gS.sel.ranges[gQ],gR[gQ],null)}var gN=cB(gO,gS.sel.primIndex);bX(gS,gN,gP)}function e(gR,gQ,gO,gP){var gN=gR.sel.ranges.slice(0);gN[gQ]=gO;bX(gR,cB(gN,gR.sel.primIndex),gP)}function F(gP,gN,gO,i){bX(gP,e8(gN,gO),i)}function b(gP,gN,i){var gO={ranges:gN.ranges,update:function(gQ){var gS=this;this.ranges=[];for(var gR=0;gR<gQ.length;gR++){gS.ranges[gR]=new d6(f7(gP,gQ[gR].anchor),f7(gP,gQ[gR].head))}},origin:i&&i.origin};aE(gP,"beforeSelectionChange",gP,gO);if(gP.cm){aE(gP.cm,"beforeSelectionChange",gP.cm,gO)}if(gO.ranges!=gN.ranges){return cB(gO.ranges,gO.ranges.length-1)}else{return gN}}function fr(gQ,gP,gN){var i=gQ.history.done,gO=f2(i);if(gO&&gO.ranges){i[i.length-1]=gP;eB(gQ,gP,gN)}else{bX(gQ,gP,gN)}}function bX(gO,gN,i){eB(gO,gN,i);gF(gO,gO.sel,gO.cm?gO.cm.curOp.id:NaN,i)}function eB(gP,gO,gN){if(fE(gP,"beforeSelectionChange")||gP.cm&&fE(gP.cm,"beforeSelectionChange")){gO=b(gP,gO,gN)}var i=gN&&gN.bias||(ck(gO.primary().head,gP.sel.primary().head)<0?-1:1);df(gP,o(gP,gO,i,true));if(!(gN&&gN.scroll===false)&&gP.cm){f1(gP.cm)}}function df(gN,i){if(i.equals(gN.sel)){return}gN.sel=i;if(gN.cm){gN.cm.curOp.updateInput=gN.cm.curOp.selectionChanged=true;U(gN.cm)}ad(gN,"cursorActivity",gN)}function eL(i){df(i,o(i,i.sel,null,false),Y)}function o(gW,gN,gT,gU){var gQ;for(var gR=0;gR<gN.ranges.length;gR++){var gS=gN.ranges[gR];var gO=gN.ranges.length==gW.sel.ranges.length&&gW.sel.ranges[gR];var gV=bY(gW,gS.anchor,gO&&gO.anchor,gT,gU);var gP=bY(gW,gS.head,gO&&gO.head,gT,gU);if(gQ||gV!=gS.anchor||gP!=gS.head){if(!gQ){gQ=gN.ranges.slice(0,gR)}gQ[gR]=new d6(gV,gP)}}return gQ?cB(gQ,gN.primIndex):gN}function eZ(gX,gV,gQ,gP,gT){var gY=fy(gX,gV.line);if(gY.markedSpans){for(var gR=0;gR<gY.markedSpans.length;++gR){var gN=gY.markedSpans[gR],gO=gN.marker;if((gN.from==null||(gO.inclusiveLeft?gN.from<=gV.ch:gN.from<gV.ch))&&(gN.to==null||(gO.inclusiveRight?gN.to>=gV.ch:gN.to>gV.ch))){if(gT){aE(gO,"beforeCursorEnter");if(gO.explicitlyCleared){if(!gY.markedSpans){break}else{--gR;continue}}}if(!gO.atomic){continue}if(gQ){var gU=gO.find(gP<0?1:-1),gW=void 0;if(gP<0?gO.inclusiveRight:gO.inclusiveLeft){gU=gJ(gX,gU,-gP,gU&&gU.line==gV.line?gY:null)}if(gU&&gU.line==gV.line&&(gW=ck(gU,gQ))&&(gP<0?gW<0:gW>0)){return eZ(gX,gU,gV,gP,gT)}}var gS=gO.find(gP<0?-1:1);if(gP<0?gO.inclusiveLeft:gO.inclusiveRight){gS=gJ(gX,gS,gP,gS.line==gV.line?gY:null)}return gS?eZ(gX,gS,gV,gP,gT):null}}}return gV}function bY(gR,gS,gP,gN,i){var gO=gN||1;var gQ=eZ(gR,gS,gP,gO,i)||(!i&&eZ(gR,gS,gP,gO,true))||eZ(gR,gS,gP,-gO,i)||(!i&&eZ(gR,gS,gP,-gO,true));if(!gQ){gR.cantEdit=true;return V(gR.first,0)}return gQ}function gJ(gO,gP,gN,i){if(gN<0&&gP.ch==0){if(gP.line>gO.first){return f7(gO,V(gP.line-1))}else{return null}}else{if(gN>0&&gP.ch==(i||fy(gO,gP.line)).text.length){if(gP.line<gO.first+gO.size-1){return V(gP.line+1,0)}else{return null}}else{return new V(gP.line,gP.ch+gN)}}}function ak(i){i.setSelection(V(i.firstLine(),0),V(i.lastLine()),Y)}function dZ(gN,gP,gO){var i={canceled:false,from:gP.from,to:gP.to,text:gP.text,origin:gP.origin,cancel:function(){return i.canceled=true}};if(gO){i.update=function(gT,gS,gR,gQ){if(gT){i.from=f7(gN,gT)}if(gS){i.to=f7(gN,gS)}if(gR){i.text=gR}if(gQ!==undefined){i.origin=gQ}}}aE(gN,"beforeChange",gN,i);if(gN.cm){aE(gN.cm,"beforeChange",gN.cm,i)}if(i.canceled){return null}return{from:i.from,to:i.to,text:i.text,origin:i.origin}}function bg(gQ,gR,gP){if(gQ.cm){if(!gQ.cm.curOp){return c7(gQ.cm,bg)(gQ,gR,gP)}if(gQ.cm.state.suppressEdits){return}}if(fE(gQ,"beforeChange")||gQ.cm&&fE(gQ.cm,"beforeChange")){gR=dZ(gQ,gR,true);if(!gR){return}}var gO=gG&&!gP&&cN(gQ,gR.from,gR.to);if(gO){for(var gN=gO.length-1;gN>=0;--gN){J(gQ,{from:gO[gN].from,to:gO[gN].to,text:gN?[""]:gR.text})}}else{J(gQ,gR)}}function J(gO,gP){if(gP.text.length==1&&gP.text[0]==""&&ck(gP.from,gP.to)==0){return}var gN=fD(gO,gP);f9(gO,gP,gN,gO.cm?gO.cm.curOp.id:NaN);eo(gO,gP,gN,ev(gO,gP));var i=[];eh(gO,function(gR,gQ){if(!gQ&&dr(i,gR.history)==-1){dM(gR.history,gP);i.push(gR.history)}eo(gR,gP,null,ev(gR,gP))})}function cc(gY,gX,g0){if(gY.cm&&gY.cm.state.suppressEdits&&!g0){return}var gW=gY.history,gO,gQ=gY.sel;var gN=gX=="undo"?gW.done:gW.undone,gZ=gX=="undo"?gW.undone:gW.done;var gT=0;for(;gT<gN.length;gT++){gO=gN[gT];if(g0?gO.ranges&&!gO.equals(gY.sel):!gO.ranges){break}}if(gT==gN.length){return}gW.lastOrigin=gW.lastSelOrigin=null;for(;;){gO=gN.pop();if(gO.ranges){cU(gO,gZ);if(g0&&!gO.equals(gY.sel)){bX(gY,gO,{clearRedo:false});return}gQ=gO}else{break}}var gV=[];cU(gQ,gZ);gZ.push({changes:gV,generation:gW.generation});gW.generation=gO.generation||++gW.maxGeneration;var gP=fE(gY,"beforeChange")||gY.cm&&fE(gY.cm,"beforeChange");var gU=function(g1){var g4=gO.changes[g1];g4.origin=gX;if(gP&&!dZ(gY,g4,false)){gN.length=0;return{}}gV.push(dD(gY,g4));var g3=g1?fD(gY,g4):f2(gN);eo(gY,g4,g3,ej(gY,g4));if(!g1&&gY.cm){gY.cm.scrollIntoView({from:g4.from,to:c3(g4)})}var g2=[];eh(gY,function(g5,i){if(!i&&dr(g2,g5.history)==-1){dM(g5.history,g4);g2.push(g5.history)}eo(g5,g4,null,ej(g5,g4))})};for(var gR=gO.changes.length-1;gR>=0;--gR){var gS=gU(gR);if(gS){return gS.v}}}function fH(gN,gP){if(gP==0){return}gN.first+=gP;gN.sel=new gu(bW(gN.sel.ranges,function(gQ){return new d6(V(gQ.anchor.line+gP,gQ.anchor.ch),V(gQ.head.line+gP,gQ.head.ch))}),gN.sel.primIndex);if(gN.cm){ag(gN.cm,gN.first,gN.first-gP,gP);for(var gO=gN.cm.display,i=gO.viewFrom;i<gO.viewTo;i++){Q(gN.cm,i,"gutter")}}}function eo(gQ,gR,gP,gN){if(gQ.cm&&!gQ.cm.curOp){return c7(gQ.cm,eo)(gQ,gR,gP,gN)}if(gR.to.line<gQ.first){fH(gQ,gR.text.length-1-(gR.to.line-gR.from.line));return}if(gR.from.line>gQ.lastLine()){return}if(gR.from.line<gQ.first){var i=gR.text.length-1-(gQ.first-gR.from.line);fH(gQ,i);gR={from:V(gQ.first,0),to:V(gR.to.line+i,gR.to.ch),text:[f2(gR.text)],origin:gR.origin}}var gO=gQ.lastLine();if(gR.to.line>gO){gR={from:gR.from,to:V(gO,fy(gQ,gO).text.length),text:[gR.text[0]],origin:gR.origin}}gR.removed=gw(gQ,gR.from,gR.to);if(!gP){gP=fD(gQ,gR)}if(gQ.cm){aI(gQ.cm,gR,gN)}else{fS(gQ,gR,gN)}eB(gQ,gP,Y)}function aI(gX,gT,gR){var gW=gX.doc,gS=gX.display,gU=gT.from,gV=gT.to;var i=false,gQ=gU.line;if(!gX.options.lineWrapping){gQ=bQ(y(fy(gW,gU.line)));gW.iter(gQ,gV.line+1,function(gZ){if(gZ==gS.maxLine){i=true;return true}})}if(gW.sel.contains(gT.from,gT.to)>-1){U(gX)}fS(gW,gT,gR,be(gX));if(!gX.options.lineWrapping){gW.iter(gQ,gU.line+gT.text.length,function(g0){var gZ=ey(g0);if(gZ>gS.maxLineLength){gS.maxLine=g0;gS.maxLineLength=gZ;gS.maxLineChanged=true;i=false}});if(i){gX.curOp.updateMaxLine=true}}gW.frontier=Math.min(gW.frontier,gU.line);ep(gX,400);var gY=gT.text.length-(gV.line-gU.line)-1;if(gT.full){ag(gX)}else{if(gU.line==gV.line&&gT.text.length==1&&!d1(gX.doc,gT)){Q(gX,gU.line,"text")}else{ag(gX,gU.line,gV.line+1,gY)}}var gO=fE(gX,"changes"),gP=fE(gX,"change");if(gP||gO){var gN={from:gU,to:gV,text:gT.text,removed:gT.removed,origin:gT.origin};if(gP){ad(gX,"change",gX,gN)}if(gO){(gX.curOp.changeObjs||(gX.curOp.changeObjs=[])).push(gN)}}gX.display.selForContextMenu=null}function a1(gP,gO,gR,gQ,i){if(!gQ){gQ=gR}if(ck(gQ,gR)<0){var gN=gQ;gQ=gR;gR=gN}if(typeof gO=="string"){gO=gP.splitLines(gO)}bg(gP,{from:gR,to:gQ,text:gO,origin:i})}function H(gP,gO,gN,i){if(gN<gP.line){gP.line+=i}else{if(gO<gP.line){gP.line=gO;gP.ch=0}}}function fB(gR,gT,gU,gV){for(var gQ=0;gQ<gR.length;++gQ){var gN=gR[gQ],gS=true;if(gN.ranges){if(!gN.copied){gN=gR[gQ]=gN.deepCopy();gN.copied=true}for(var gP=0;gP<gN.ranges.length;gP++){H(gN.ranges[gP].anchor,gT,gU,gV);H(gN.ranges[gP].head,gT,gU,gV)}continue}for(var gO=0;gO<gN.changes.length;++gO){var gW=gN.changes[gO];if(gU<gW.from.line){gW.from=V(gW.from.line+gV,gW.from.ch);gW.to=V(gW.to.line+gV,gW.to.ch)}else{if(gT<=gW.to.line){gS=false;break}}}if(!gS){gR.splice(0,gQ+1);gQ=0}}}function dM(gN,gQ){var gP=gQ.from.line,gO=gQ.to.line,i=gQ.text.length-(gO-gP)-1;fB(gN.done,gP,gO,i);fB(gN.undone,gP,gO,i)}function eN(gP,gO,i,gR){var gQ=gO,gN=gO;if(typeof gO=="number"){gN=fy(gP,db(gP,gO))}else{gQ=bQ(gO)}if(gQ==null){return null}if(gR(gN,gQ)&&gP.cm){Q(gP.cm,gQ,i)}return gN}function fh(gO){var gQ=this;this.lines=gO;this.parent=null;var gN=0;for(var gP=0;gP<gO.length;++gP){gO[gP].parent=gQ;gN+=gO[gP].height}this.height=gN}fh.prototype={chunkSize:function(){return this.lines.length},removeInner:function(gN,gS){var gR=this;for(var gP=gN,gQ=gN+gS;gP<gQ;++gP){var gO=gR.lines[gP];gR.height-=gO.height;bE(gO);ad(gO,"delete")}this.lines.splice(gN,gS)},collapse:function(i){i.push.apply(i,this.lines)},insertInner:function(gO,gP,gN){var gR=this;this.height+=gN;this.lines=this.lines.slice(0,gO).concat(gP).concat(this.lines.slice(gO));for(var gQ=0;gQ<gP.length;++gQ){gP[gQ].parent=gR}},iterN:function(i,gQ,gP){var gO=this;for(var gN=i+gQ;i<gN;++i){if(gP(gO.lines[i])){return true}}}};function fR(gQ){var gS=this;this.children=gQ;var gP=0,gN=0;for(var gO=0;gO<gQ.length;++gO){var gR=gQ[gO];gP+=gR.chunkSize();gN+=gR.height;gR.parent=gS}this.size=gP;this.height=gN;this.parent=null}fR.prototype={chunkSize:function(){return this.size},removeInner:function(gP,gO){var gR=this;this.size-=gO;for(var gQ=0;gQ<this.children.length;++gQ){var gN=gR.children[gQ],gT=gN.chunkSize();if(gP<gT){var gS=Math.min(gO,gT-gP),gU=gN.height;gN.removeInner(gP,gS);gR.height-=gU-gN.height;if(gT==gS){gR.children.splice(gQ--,1);gN.parent=null}if((gO-=gS)==0){break}gP=0}else{gP-=gT}}if(this.size-gO<25&&(this.children.length>1||!(this.children[0] instanceof fh))){var gV=[];this.collapse(gV);this.children=[new fh(gV)];this.children[0].parent=this}},collapse:function(gN){var gP=this;for(var gO=0;gO<this.children.length;++gO){gP.children[gO].collapse(gN)}},insertInner:function(gO,gW,gV){var gR=this;this.size+=gW.length;this.height+=gV;for(var gQ=0;gQ<this.children.length;++gQ){var gN=gR.children[gQ],gT=gN.chunkSize();if(gO<=gT){gN.insertInner(gO,gW,gV);if(gN.lines&&gN.lines.length>50){var gP=gN.lines.length%25+25;for(var gU=gP;gU<gN.lines.length;){var gS=new fh(gN.lines.slice(gU,gU+=25));gN.height-=gS.height;gR.children.splice(++gQ,0,gS);gS.parent=gR}gN.lines=gN.lines.slice(0,gP);gR.maybeSpill()}break}gO-=gT}},maybeSpill:function(){if(this.children.length<=10){return}var gP=this;do{var gN=gP.children.splice(gP.children.length-5,5);var gO=new fR(gN);if(!gP.parent){var gQ=new fR(gP.children);gQ.parent=gP;gP.children=[gQ,gO];gP=gQ}else{gP.size-=gO.size;gP.height-=gO.height;var i=dr(gP.parent.children,gP);gP.parent.children.splice(i+1,0,gO)}gO.parent=gP.parent}while(gP.children.length>10);gP.parent.maybeSpill()},iterN:function(gN,gU,gT){var gS=this;for(var gO=0;gO<this.children.length;++gO){var gR=gS.children[gO],gQ=gR.chunkSize();if(gN<gQ){var gP=Math.min(gU,gQ-gN);if(gR.iterN(gN,gP,gT)){return true}if((gU-=gP)==0){break}gN=0}else{gN-=gQ}}}};function dJ(gP,gO,i){var gQ=this;if(i){for(var gN in i){if(i.hasOwnProperty(gN)){gQ[gN]=i[gN]}}}this.doc=gP;this.node=gO}bC(dJ);function d8(i,gN,gO){if(bP(gN)<((i.curOp&&i.curOp.scrollTop)||i.doc.scrollTop)){cR(i,null,gO)}}dJ.prototype.clear=function(){var gT=this;var gO=this.doc.cm,gQ=this.line.widgets,gP=this.line,gS=bQ(gP);if(gS==null||!gQ){return}for(var gR=0;gR<gQ.length;++gR){if(gQ[gR]==gT){gQ.splice(gR--,1)}}if(!gQ.length){gP.widgets=null}var gN=c4(this);gz(gP,Math.max(0,gP.height-gN));if(gO){cS(gO,function(){d8(gO,gP,-gN);Q(gO,gS,"widget")})}};dJ.prototype.changed=function(){var gN=this.height,i=this.doc.cm,gO=this.line;this.height=null;var gP=c4(this)-gN;if(!gP){return}gz(gO,gO.height+gP);if(i){cS(i,function(){i.curOp.forceUpdate=true;d8(i,gO,gP)})}};function bJ(gR,gQ,gO,gN){var gP=new dJ(gR,gO,gN);var i=gR.cm;if(i&&gP.noHScroll){i.display.alignWidgets=true}eN(gR,gQ,"widget",function(gT){var gU=gT.widgets||(gT.widgets=[]);if(gP.insertAt==null){gU.push(gP)}else{gU.splice(Math.min(gU.length-1,Math.max(0,gP.insertAt)),0,gP)}gP.line=gT;if(i&&!fP(gR,gT)){var gS=bP(gT)<gR.scrollTop;gz(gT,gT.height+c4(gP));if(gS){cR(i,null,gP.height)}i.curOp.forceUpdate=true}return true});return gP}var a4=0;function P(gN,i){this.lines=[];this.type=i;this.doc=gN;this.id=++a4}bC(P);P.prototype.clear=function(){var gS=this;if(this.explicitlyCleared){return}var gW=this.doc.cm,gP=gW&&!gW.curOp;if(gP){cO(gW)}if(fE(this,"clear")){var gX=this.find();if(gX){ad(this,"clear",gX.from,gX.to)}}var gQ=null,gU=null;for(var gR=0;gR<this.lines.length;++gR){var gY=gS.lines[gR];var gV=ft(gY.markedSpans,gS);if(gW&&!gS.collapsed){Q(gW,bQ(gY),"text")}else{if(gW){if(gV.to!=null){gU=bQ(gY)}if(gV.from!=null){gQ=bQ(gY)}}}gY.markedSpans=eX(gY.markedSpans,gV);if(gV.from==null&&gS.collapsed&&!fP(gS.doc,gY)&&gW){gz(gY,aY(gW.display))}}if(gW&&this.collapsed&&!gW.options.lineWrapping){for(var gO=0;gO<this.lines.length;++gO){var gN=y(gS.lines[gO]),gT=ey(gN);if(gT>gW.display.maxLineLength){gW.display.maxLine=gN;gW.display.maxLineLength=gT;gW.display.maxLineChanged=true}}}if(gQ!=null&&gW&&this.collapsed){ag(gW,gQ,gU+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(gW){eL(gW.doc)}}if(gW){ad(gW,"markerCleared",gW,this)}if(gP){al(gW)}if(this.parent){this.parent.clear()}};P.prototype.find=function(gQ,gO){var gU=this;if(gQ==null&&this.type=="bookmark"){gQ=1}var gT,gS;for(var gP=0;gP<this.lines.length;++gP){var gN=gU.lines[gP];var gR=ft(gN.markedSpans,gU);if(gR.from!=null){gT=V(gO?gN:bQ(gN),gR.from);if(gQ==-1){return gT}}if(gR.to!=null){gS=V(gO?gN:bQ(gN),gR.to);if(gQ==1){return gS}}}return gT&&{from:gT,to:gS}};P.prototype.changed=function(){var gO=this.find(-1,true),gN=this,i=this.doc.cm;if(!gO||!i){return}cS(i,function(){var gQ=gO.line,gR=bQ(gO.line);var gP=fv(i,gR);if(gP){au(gP);i.curOp.selectionChanged=i.curOp.forceUpdate=true}i.curOp.updateMaxLine=true;if(!fP(gN.doc,gQ)&&gN.height!=null){var gT=gN.height;gN.height=null;var gS=c4(gN)-gT;if(gS){gz(gQ,gQ.height+gS)}}})};P.prototype.attachLine=function(i){if(!this.lines.length&&this.doc.cm){var gN=this.doc.cm.curOp;if(!gN.maybeHiddenMarkers||dr(gN.maybeHiddenMarkers,this)==-1){(gN.maybeUnhiddenMarkers||(gN.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(i)};P.prototype.detachLine=function(i){this.lines.splice(dr(this.lines,i),1);if(!this.lines.length&&this.doc.cm){var gN=this.doc.cm.curOp;(gN.maybeHiddenMarkers||(gN.maybeHiddenMarkers=[])).push(this)}};function eU(gV,gT,gU,gX,gR){if(gX&&gX.shared){return M(gV,gT,gU,gX,gR)}if(gV.cm&&!gV.cm.curOp){return c7(gV.cm,eU)(gV,gT,gU,gX,gR)}var gQ=new P(gV,gR),gW=ck(gT,gU);if(gX){aN(gX,gQ,false)}if(gW>0||gW==0&&gQ.clearWhenEmpty!==false){return gQ}if(gQ.replacedWith){gQ.collapsed=true;gQ.widgetNode=gv("span",[gQ.replacedWith],"CodeMirror-widget");if(!gX.handleMouseEvents){gQ.widgetNode.setAttribute("cm-ignore-events","true")}if(gX.insertLeft){gQ.widgetNode.insertLeft=true}}if(gQ.collapsed){if(z(gV,gT.line,gT,gU,gQ)||gT.line!=gU.line&&z(gV,gU.line,gT,gU,gQ)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}bz()}if(gQ.addToHistory){f9(gV,{from:gT,to:gU,origin:"markText"},gV.sel,NaN)}var gO=gT.line,gS=gV.cm,gN;gV.iter(gO,gU.line+1,function(i){if(gS&&gQ.collapsed&&!gS.options.lineWrapping&&y(i)==gS.display.maxLine){gN=true}if(gQ.collapsed&&gO!=gT.line){gz(i,0)}ci(i,new eu(gQ,gO==gT.line?gT.ch:null,gO==gU.line?gU.ch:null));++gO});if(gQ.collapsed){gV.iter(gT.line,gU.line+1,function(i){if(fP(gV,i)){gz(i,0)}})}if(gQ.clearOnEnter){b0(gQ,"beforeCursorEnter",function(){return gQ.clear()})}if(gQ.readOnly){fU();if(gV.history.done.length||gV.history.undone.length){gV.clearHistory()}}if(gQ.collapsed){gQ.id=++a4;gQ.atomic=true}if(gS){if(gN){gS.curOp.updateMaxLine=true}if(gQ.collapsed){ag(gS,gT.line,gU.line+1)}else{if(gQ.className||gQ.title||gQ.startStyle||gQ.endStyle||gQ.css){for(var gP=gT.line;gP<=gU.line;gP++){Q(gS,gP,"text")}}}if(gQ.atomic){eL(gS.doc)}ad(gS,"markerAdded",gS,gQ)}return gQ}function x(gP,gO){var gQ=this;this.markers=gP;this.primary=gO;for(var gN=0;gN<gP.length;++gN){gP[gN].parent=gQ}}bC(x);x.prototype.clear=function(){var gO=this;if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var gN=0;gN<this.markers.length;++gN){gO.markers[gN].clear()}ad(this,"clear")};x.prototype.find=function(gN,i){return this.primary.find(gN,i)};function M(gQ,gT,gS,i,gO){i=aN(i);i.shared=false;var gR=[eU(gQ,gT,gS,i,gO)],gN=gR[0];var gP=i.widgetNode;eh(gQ,function(gV){if(gP){i.widgetNode=gP.cloneNode(true)}gR.push(eU(gV,f7(gV,gT),f7(gV,gS),i,gO));for(var gU=0;gU<gV.linked.length;++gU){if(gV.linked[gU].isParent){return}}gN=f2(gR)});return new x(gR,gN)}function e5(i){return i.findMarks(V(i.first,0),i.clipPos(V(i.lastLine())),function(gN){return gN.parent})}function dN(gS,gT){for(var gQ=0;gQ<gT.length;gQ++){var gO=gT[gQ],gU=gO.find();var gN=gS.clipPos(gU.from),gR=gS.clipPos(gU.to);if(ck(gN,gR)){var gP=eU(gS,gN,gR,gO.primary,gO.primary.type);gO.markers.push(gP);gP.parent=gO}}}function eA(gP){var gN=function(gS){var gQ=gP[gS],gU=[gQ.primary.doc];eh(gQ.primary.doc,function(i){return gU.push(i)});for(var gR=0;gR<gQ.markers.length;gR++){var gT=gQ.markers[gR];if(dr(gU,gT.doc)==-1){gT.parent=null;gQ.markers.splice(gR--,1)}}};for(var gO=0;gO<gP.length;gO++){gN(gO)}}var cw=0;var at=function(gP,gO,i,gN){if(!(this instanceof at)){return new at(gP,gO,i,gN)}if(i==null){i=0}fR.call(this,[new fh([new gy("",null)])]);this.first=i;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.frontier=i;var gQ=V(i,0);this.sel=e8(gQ);this.history=new gk(null);this.id=++cw;this.modeOption=gO;this.lineSep=gN;this.extend=false;if(typeof gP=="string"){gP=this.splitLines(gP)}fS(this,{from:gQ,to:gQ,text:gP});bX(this,e8(gQ),Y)};at.prototype=cp(fR.prototype,{constructor:at,iter:function(gO,gN,i){if(i){this.iterN(gO-this.first,gN-gO,i)}else{this.iterN(this.first,this.first+this.size,gO)}},insert:function(gO,gP){var gN=0;for(var gQ=0;gQ<gP.length;++gQ){gN+=gP[gQ].height}this.insertInner(gO-this.first,gP,gN)},remove:function(i,gN){this.removeInner(i-this.first,gN)},getValue:function(gN){var i=a2(this,this.first,this.first+this.size);if(gN===false){return i}return i.join(gN||this.lineSeparator())},setValue:cI(function(gN){var gO=V(this.first,0),i=this.first+this.size-1;bg(this,{from:gO,to:V(i,fy(this,i).text.length),text:this.splitLines(gN),origin:"setValue",full:true},true);bX(this,e8(gO))}),replaceRange:function(gN,gP,gO,i){gP=f7(this,gP);gO=gO?f7(this,gO):gP;a1(this,gN,gP,gO,i)},getRange:function(gP,gO,gN){var i=gw(this,f7(this,gP),f7(this,gO));if(gN===false){return i}return i.join(gN||this.lineSeparator())},getLine:function(gN){var i=this.getLineHandle(gN);return i&&i.text},getLineHandle:function(i){if(cd(this,i)){return fy(this,i)}},getLineNumber:function(i){return bQ(i)},getLineHandleVisualStart:function(i){if(typeof i=="number"){i=fy(this,i)}return y(i)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(i){return f7(this,i)},getCursor:function(gO){var i=this.sel.primary(),gN;if(gO==null||gO=="head"){gN=i.head}else{if(gO=="anchor"){gN=i.anchor}else{if(gO=="end"||gO=="to"||gO===false){gN=i.to()}else{gN=i.from()}}}return gN},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:cI(function(i,gO,gN){F(this,f7(this,typeof i=="number"?V(i,gO||0):i),null,gN)}),setSelection:cI(function(gN,gO,i){F(this,f7(this,gN),f7(this,gO||gN),i)}),extendSelection:cI(function(gO,i,gN){gp(this,f7(this,gO),i&&f7(this,i),gN)}),extendSelections:cI(function(gN,i){av(this,d9(this,gN),i)}),extendSelectionsBy:cI(function(gO,i){var gN=bW(this.sel.ranges,gO);av(this,d9(this,gN),i)}),setSelections:cI(function(gN,gR,gP){var gS=this;if(!gN.length){return}var gO=[];for(var gQ=0;gQ<gN.length;gQ++){gO[gQ]=new d6(f7(gS,gN[gQ].anchor),f7(gS,gN[gQ].head))}if(gR==null){gR=Math.min(gN.length-1,this.sel.primIndex)}bX(this,cB(gO,gR),gP)}),addSelection:cI(function(gO,gP,gN){var i=this.sel.ranges.slice(0);i.push(new d6(f7(this,gO),f7(this,gP||gO)));bX(this,cB(i,i.length-1),gN)}),getSelection:function(gR){var gS=this;var gO=this.sel.ranges,gN;for(var gP=0;gP<gO.length;gP++){var gQ=gw(gS,gO[gP].from(),gO[gP].to());gN=gN?gN.concat(gQ):gQ}if(gR===false){return gN}else{return gN.join(gR||this.lineSeparator())}},getSelections:function(gR){var gS=this;var gQ=[],gN=this.sel.ranges;for(var gO=0;gO<gN.length;gO++){var gP=gw(gS,gN[gO].from(),gN[gO].to());if(gR!==false){gP=gP.join(gR||gS.lineSeparator())}gQ[gO]=gP}return gQ},replaceSelection:function(gP,gR,gN){var gQ=[];for(var gO=0;gO<this.sel.ranges.length;gO++){gQ[gO]=gP}this.replaceSelections(gQ,gR,gN||"+input")},replaceSelections:cI(function(gO,gT,gV){var gS=this;var gU=[],gQ=this.sel;for(var gR=0;gR<gQ.ranges.length;gR++){var gW=gQ.ranges[gR];gU[gR]={from:gW.from(),to:gW.to(),text:gS.splitLines(gO[gR]),origin:gV}}var gN=gT&&gT!="end"&&ae(this,gU,gT);for(var gP=gU.length-1;gP>=0;gP--){bg(gS,gU[gP])}if(gN){fr(this,gN)}else{if(this.cm){f1(this.cm)}}}),undo:cI(function(){cc(this,"undo")}),redo:cI(function(){cc(this,"redo")}),undoSelection:cI(function(){cc(this,"undo",true)}),redoSelection:cI(function(){cc(this,"redo",true)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){var gQ=this.history,gN=0,gP=0;for(var gO=0;gO<gQ.done.length;gO++){if(!gQ.done[gO].ranges){++gN}}for(var gR=0;gR<gQ.undone.length;gR++){if(!gQ.undone[gR].ranges){++gP}}return{undo:gN,redo:gP}},clearHistory:function(){this.history=new gk(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(i){if(i){this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(i){return this.history.generation==(i||this.cleanGeneration)},getHistory:function(){return{done:bS(this.history.done),undone:bS(this.history.undone)}},setHistory:function(gN){var i=this.history=new gk(this.history.maxGeneration);i.done=bS(gN.done.slice(0),null,true);i.undone=bS(gN.undone.slice(0),null,true)},setGutterMarker:cI(function(i,gN,gO){return eN(this,i,"gutter",function(gP){var gQ=gP.gutterMarkers||(gP.gutterMarkers={});gQ[gN]=gO;if(!gO&&fc(gQ)){gP.gutterMarkers=null}return true})}),clearGutter:cI(function(gO){var gP=this;var gN=this.first;this.iter(function(i){if(i.gutterMarkers&&i.gutterMarkers[gO]){eN(gP,i,"gutter",function(){i.gutterMarkers[gO]=null;if(fc(i.gutterMarkers)){i.gutterMarkers=null}return true})}++gN})}),lineInfo:function(i){var gN;if(typeof i=="number"){if(!cd(this,i)){return null}gN=i;i=fy(this,i);if(!i){return null}}else{gN=bQ(i);if(gN==null){return null}}return{line:gN,handle:i,text:i.text,gutterMarkers:i.gutterMarkers,textClass:i.textClass,bgClass:i.bgClass,wrapClass:i.wrapClass,widgets:i.widgets}},addLineClass:cI(function(gO,gN,i){return eN(this,gO,gN=="gutter"?"gutter":"class",function(gP){var gQ=gN=="text"?"textClass":gN=="background"?"bgClass":gN=="gutter"?"gutterClass":"wrapClass";if(!gP[gQ]){gP[gQ]=i}else{if(R(i).test(gP[gQ])){return false}else{gP[gQ]+=" "+i}}return true})}),removeLineClass:cI(function(gO,gN,i){return eN(this,gO,gN=="gutter"?"gutter":"class",function(gQ){var gT=gN=="text"?"textClass":gN=="background"?"bgClass":gN=="gutter"?"gutterClass":"wrapClass";var gS=gQ[gT];if(!gS){return false}else{if(i==null){gQ[gT]=null}else{var gR=gS.match(R(i));if(!gR){return false}var gP=gR.index+gR[0].length;gQ[gT]=gS.slice(0,gR.index)+(!gR.index||gP==gS.length?"":" ")+gS.slice(gP)||null}}return true})}),addLineWidget:cI(function(gO,gN,i){return bJ(this,gO,gN,i)}),removeLineWidget:function(i){i.clear()},markText:function(gO,gN,i){return eU(this,f7(this,gO),f7(this,gN),i,i&&i.type||"range")},setBookmark:function(gO,i){var gN={replacedWith:i&&(i.nodeType==null?i.widget:i),insertLeft:i&&i.insertLeft,clearWhenEmpty:false,shared:i&&i.shared,handleMouseEvents:i&&i.handleMouseEvents};gO=f7(this,gO);return eU(this,gO,gO,gN,"bookmark")},findMarksAt:function(gR){gR=f7(this,gR);var gQ=[],gO=fy(this,gR.line).markedSpans;if(gO){for(var gN=0;gN<gO.length;++gN){var gP=gO[gN];if((gP.from==null||gP.from<=gR.ch)&&(gP.to==null||gP.to>=gR.ch)){gQ.push(gP.marker.parent||gP.marker)}}}return gQ},findMarks:function(gQ,gP,gN){gQ=f7(this,gQ);gP=f7(this,gP);var gO=[],i=gQ.line;this.iter(gQ.line,gP.line+1,function(gR){var gT=gR.markedSpans;if(gT){for(var gS=0;gS<gT.length;gS++){var gU=gT[gS];if(!(gU.to!=null&&i==gQ.line&&gQ.ch>=gU.to||gU.from==null&&i!=gQ.line||gU.from!=null&&i==gP.line&&gU.from>=gP.ch)&&(!gN||gN(gU.marker))){gO.push(gU.marker.parent||gU.marker)}}}++i});return gO},getAllMarks:function(){var i=[];this.iter(function(gO){var gN=gO.markedSpans;if(gN){for(var gP=0;gP<gN.length;++gP){if(gN[gP].from!=null){i.push(gN[gP].marker)}}}});return i},posFromIndex:function(gP){var gN,i=this.first,gO=this.lineSeparator().length;this.iter(function(gQ){var gR=gQ.text.length+gO;if(gR>gP){gN=gP;return true}gP-=gR;++i});return f7(this,V(i,gN))},indexFromPos:function(gO){gO=f7(this,gO);var i=gO.ch;if(gO.line<this.first||gO.ch<0){return 0}var gN=this.lineSeparator().length;this.iter(this.first,gO.line,function(gP){i+=gP.text.length+gN});return i},copy:function(i){var gN=new at(a2(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);gN.scrollTop=this.scrollTop;gN.scrollLeft=this.scrollLeft;gN.sel=this.sel;gN.extend=false;if(i){gN.history.undoDepth=this.history.undoDepth;gN.setHistory(this.getHistory())}return gN},linkedDoc:function(i){if(!i){i={}}var gP=this.first,gO=this.first+this.size;if(i.from!=null&&i.from>gP){gP=i.from}if(i.to!=null&&i.to<gO){gO=i.to}var gN=new at(a2(this,gP,gO),i.mode||this.modeOption,gP,this.lineSep);if(i.sharedHist){gN.history=this.history}(this.linked||(this.linked=[])).push({doc:gN,sharedHist:i.sharedHist});gN.linked=[{doc:this,isParent:true,sharedHist:i.sharedHist}];dN(gN,e5(this));return gN},unlinkDoc:function(gO){var gR=this;if(gO instanceof fn){gO=gO.doc}if(this.linked){for(var gP=0;gP<this.linked.length;++gP){var gQ=gR.linked[gP];if(gQ.doc!=gO){continue}gR.linked.splice(gP,1);gO.unlinkDoc(gR);eA(e5(gR));break}}if(gO.history==this.history){var gN=[gO.id];eh(gO,function(i){return gN.push(i.id)},true);gO.history=new gk(null);gO.history.done=bS(this.history.done,gN);gO.history.undone=bS(this.history.undone,gN)}},iterLinkedDocs:function(i){eh(this,i)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(i){if(this.lineSep){return i.split(this.lineSep)}return gh(i)},lineSeparator:function(){return this.lineSep||"\n"}});at.prototype.eachLine=at.prototype.iter;var af=0;function bk(gV){var gX=this;di(gX);if(aR(gX,gV)||bb(gX.display,gV)){return}cL(gV);if(dS){af=+new Date}var gW=cs(gX,gV,true),gO=gV.dataTransfer.files;if(!gW||gX.isReadOnly()){return}if(gO&&gO.length&&window.FileReader&&window.File){var gR=gO.length,gY=Array(gR),gP=0;var gT=function(g1,g0){if(gX.options.allowDropFileTypes&&dr(gX.options.allowDropFileTypes,g1.type)==-1){return}var gZ=new FileReader;gZ.onload=c7(gX,function(){var i=gZ.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(i)){i=""}gY[g0]=i;if(++gP==gR){gW=f7(gX.doc,gW);var g2={from:gW,to:gW,text:gX.doc.splitLines(gY.join(gX.doc.lineSeparator())),origin:"paste"};bg(gX.doc,g2);fr(gX.doc,e8(gW,c3(g2)))}});gZ.readAsText(g1)};for(var gU=0;gU<gR;++gU){gT(gO[gU],gU)}}else{if(gX.state.draggingText&&gX.doc.sel.contains(gW)>-1){gX.state.draggingText(gV);setTimeout(function(){return gX.display.input.focus()},20);return}try{var gN=gV.dataTransfer.getData("Text");if(gN){var gS;if(gX.state.draggingText&&!gX.state.draggingText.copy){gS=gX.listSelections()}eB(gX.doc,e8(gW,gW));if(gS){for(var gQ=0;gQ<gS.length;++gQ){a1(gX.doc,"",gS[gQ].anchor,gS[gQ].head,"drag")}}gX.replaceSelection(gN,"around","paste");gX.display.input.focus()}}catch(gV){}}}function O(i,gO){if(dS&&(!i.state.draggingText||+new Date-af<100)){eD(gO);return}if(aR(i,gO)||bb(i.display,gO)){return}gO.dataTransfer.setData("Text",i.getSelection());gO.dataTransfer.effectAllowed="copyMove";if(gO.dataTransfer.setDragImage&&!aC){var gN=gv("img",null,null,"position: fixed; left: 0; top: 0;");gN.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(ec){gN.width=gN.height=1;i.display.wrapper.appendChild(gN);gN._top=gN.offsetTop}gO.dataTransfer.setDragImage(gN,0,0);if(ec){gN.parentNode.removeChild(gN)}}}function gK(i,gN){var gP=cs(i,gN);if(!gP){return}var gO=document.createDocumentFragment();A(i,gP,gO);if(!i.display.dragCursor){i.display.dragCursor=gv("div",null,"CodeMirror-cursors CodeMirror-dragcursors");i.display.lineSpace.insertBefore(i.display.dragCursor,i.display.cursorDiv)}bV(i.display.dragCursor,gO)}function di(i){if(i.display.dragCursor){i.display.lineSpace.removeChild(i.display.dragCursor);i.display.dragCursor=null}}function aA(gQ){if(!document.body.getElementsByClassName){return}var gP=document.body.getElementsByClassName("CodeMirror");for(var gO=0;gO<gP.length;gO++){var gN=gP[gO].CodeMirror;if(gN){gQ(gN)}}}var cH=false;function bj(){if(cH){return}f0();cH=true}function f0(){var i;b0(window,"resize",function(){if(i==null){i=setTimeout(function(){i=null;aA(aT)},100)}});b0(window,"blur",function(){return aA(aV)})}function aT(i){var gN=i.display;if(gN.lastWrapHeight==gN.wrapper.clientHeight&&gN.lastWrapWidth==gN.wrapper.clientWidth){return}gN.cachedCharWidth=gN.cachedTextHeight=gN.cachedPaddingH=null;gN.scrollbarsClipped=false;i.setSize()}var fA={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"};for(var fQ=0;fQ<10;fQ++){fA[fQ+48]=fA[fQ+96]=String(fQ)}for(var gj=65;gj<=90;gj++){fA[gj]=String.fromCharCode(gj)}for(var gi=1;gi<=12;gi++){fA[gi+111]=fA[gi+63235]="F"+gi}var fu={};fu.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"};fu.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"};fu.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"};fu.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"]};fu["default"]=cb?fu.macDefault:fu.pcDefault;function dB(gO){var gU=gO.split(/-(?!$)/);gO=gU[gU.length-1];var gT,gS,gN,gR;for(var gQ=0;gQ<gU.length-1;gQ++){var gP=gU[gQ];if(/^(cmd|meta|m)$/i.test(gP)){gR=true}else{if(/^a(lt)?$/i.test(gP)){gT=true}else{if(/^(c|ctrl|control)$/i.test(gP)){gS=true}else{if(/^s(hift)?$/i.test(gP)){gN=true}else{throw new Error("Unrecognized modifier name: "+gP)}}}}}if(gT){gO="Alt-"+gO}if(gS){gO="Ctrl-"+gO}if(gR){gO="Cmd-"+gO}if(gN){gO="Shift-"+gO}return gO}function cM(gU){var gO={};for(var gT in gU){if(gU.hasOwnProperty(gT)){var gV=gU[gT];if(/^(name|fallthrough|(de|at)tach)$/.test(gT)){continue}if(gV=="..."){delete gU[gT];continue}var gW=bW(gT.split(" "),dB);for(var gS=0;gS<gW.length;gS++){var gQ=void 0,gP=void 0;if(gS==gW.length-1){gP=gW.join(" ");gQ=gV}else{gP=gW.slice(0,gS+1).join(" ");gQ="..."}var gR=gO[gP];if(!gR){gO[gP]=gQ}else{if(gR!=gQ){throw new Error("Inconsistent bindings for "+gP)}}}delete gU[gT]}}for(var gN in gO){gU[gN]=gO[gN]}return gU}function j(gQ,gR,gT,gP){gR=go(gR);var gS=gR.call?gR.call(gQ,gP):gR[gQ];if(gS===false){return"nothing"}if(gS==="..."){return"multi"}if(gS!=null&&gT(gS)){return"handled"}if(gR.fallthrough){if(Object.prototype.toString.call(gR.fallthrough)!="[object Array]"){return j(gQ,gR.fallthrough,gT,gP)}for(var gO=0;gO<gR.fallthrough.length;gO++){var gN=j(gQ,gR.fallthrough[gO],gT,gP);if(gN){return gN}}}}function eO(gN){var i=typeof gN=="string"?gN:fA[gN.keyCode];return i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function fK(gN,gP){if(ec&&gN.keyCode==34&&gN["char"]){return false}var gO=fA[gN.keyCode],i=gO;if(i==null||gN.altGraphKey){return false}if(gN.altKey&&gO!="Alt"){i="Alt-"+i}if((bT?gN.metaKey:gN.ctrlKey)&&gO!="Ctrl"){i="Ctrl-"+i}if((bT?gN.ctrlKey:gN.metaKey)&&gO!="Cmd"){i="Cmd-"+i}if(!gP&&gN.shiftKey&&gO!="Shift"){i="Shift-"+i}return i}function go(i){return typeof i=="string"?fu[i]:i}function ff(gN,gT){var gO=gN.doc.sel.ranges,gR=[];for(var gQ=0;gQ<gO.length;gQ++){var gP=gT(gO[gQ]);while(gR.length&&ck(gP.from,f2(gR).to)<=0){var gS=gR.pop();if(ck(gS.from,gP.from)<0){gP.from=gS.from;break}}gR.push(gP)}cS(gN,function(){for(var gU=gR.length-1;gU>=0;gU--){a1(gN.doc,"",gR[gU].from,gR[gU].to,"+delete")}f1(gN)})}var eR={selectAll:ak,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),Y)},killLine:function(i){return ff(i,function(gO){if(gO.empty()){var gN=fy(i.doc,gO.head.line).text.length;if(gO.head.ch==gN&&gO.head.line<i.lastLine()){return{from:gO.head,to:V(gO.head.line+1,0)}}else{return{from:gO.head,to:V(gO.head.line,gN)}}}else{return{from:gO.from(),to:gO.to()}}})},deleteLine:function(i){return ff(i,function(gN){return({from:V(gN.from().line,0),to:f7(i.doc,V(gN.to().line+1,0))})})},delLineLeft:function(i){return ff(i,function(gN){return({from:V(gN.from().line,0),to:gN.from()})})},delWrappedLineLeft:function(i){return ff(i,function(gN){var gP=i.charCoords(gN.head,"div").top+5;var gO=i.coordsChar({left:0,top:gP},"div");return{from:gO,to:gN.from()}})},delWrappedLineRight:function(i){return ff(i,function(gN){var gP=i.charCoords(gN.head,"div").top+5;var gO=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:gP},"div");return{from:gN.from(),to:gO}})},undo:function(i){return i.undo()},redo:function(i){return i.redo()},undoSelection:function(i){return i.undoSelection()},redoSelection:function(i){return i.redoSelection()},goDocStart:function(i){return i.extendSelection(V(i.firstLine(),0))},goDocEnd:function(i){return i.extendSelection(V(i.lastLine()))},goLineStart:function(i){return i.extendSelectionsBy(function(gN){return bv(i,gN.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(i){return i.extendSelectionsBy(function(gN){return dQ(i,gN.head)},{origin:"+move",bias:1})},goLineEnd:function(i){return i.extendSelectionsBy(function(gN){return dY(i,gN.head.line)},{origin:"+move",bias:-1})},goLineRight:function(i){return i.extendSelectionsBy(function(gN){var gO=i.charCoords(gN.head,"div").top+5;return i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:gO},"div")},c2)},goLineLeft:function(i){return i.extendSelectionsBy(function(gN){var gO=i.charCoords(gN.head,"div").top+5;return i.coordsChar({left:0,top:gO},"div")},c2)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(gN){var gO=i.charCoords(gN.head,"div").top+5;var gP=i.coordsChar({left:0,top:gO},"div");if(gP.ch<i.getLine(gP.line).search(/\S/)){return dQ(i,gN.head)}return gP},c2)},goLineUp:function(i){return i.moveV(-1,"line")},goLineDown:function(i){return i.moveV(1,"line")},goPageUp:function(i){return i.moveV(-1,"page")},goPageDown:function(i){return i.moveV(1,"page")},goCharLeft:function(i){return i.moveH(-1,"char")},goCharRight:function(i){return i.moveH(1,"char")},goColumnLeft:function(i){return i.moveH(-1,"column")},goColumnRight:function(i){return i.moveH(1,"column")},goWordLeft:function(i){return i.moveH(-1,"word")},goGroupRight:function(i){return i.moveH(1,"group")},goGroupLeft:function(i){return i.moveH(-1,"group")},goWordRight:function(i){return i.moveH(1,"word")},delCharBefore:function(i){return i.deleteH(-1,"char")},delCharAfter:function(i){return i.deleteH(1,"char")},delWordBefore:function(i){return i.deleteH(-1,"word")},delWordAfter:function(i){return i.deleteH(1,"word")},delGroupBefore:function(i){return i.deleteH(-1,"group")},delGroupAfter:function(i){return i.deleteH(1,"group")},indentAuto:function(i){return i.indentSelection("smart")},indentMore:function(i){return i.indentSelection("add")},indentLess:function(i){return i.indentSelection("subtract")},insertTab:function(i){return i.replaceSelection("\t")},insertSoftTab:function(gN){var gP=[],gO=gN.listSelections(),gS=gN.options.tabSize;for(var gR=0;gR<gO.length;gR++){var gT=gO[gR].from();var gQ=bU(gN.getLine(gT.line),gT.ch,gS);gP.push(cu(gS-gQ%gS))}gN.replaceSelections(gP)},defaultTab:function(i){if(i.somethingSelected()){i.indentSelection("add")}else{i.execCommand("insertTab")}},transposeChars:function(i){return cS(i,function(){var gP=i.listSelections(),gO=[];for(var gQ=0;gQ<gP.length;gQ++){if(!gP[gQ].empty()){continue}var gS=gP[gQ].head,gN=fy(i.doc,gS.line).text;if(gN){if(gS.ch==gN.length){gS=new V(gS.line,gS.ch-1)}if(gS.ch>0){gS=new V(gS.line,gS.ch+1);i.replaceRange(gN.charAt(gS.ch-1)+gN.charAt(gS.ch-2),V(gS.line,gS.ch-2),gS,"+transpose")}else{if(gS.line>i.doc.first){var gR=fy(i.doc,gS.line-1).text;if(gR){gS=new V(gS.line,1);i.replaceRange(gN.charAt(0)+i.doc.lineSeparator()+gR.charAt(gR.length-1),V(gS.line-1,gR.length-1),gS,"+transpose")}}}}gO.push(new d6(gS,gS))}i.setSelections(gO)})},newlineAndIndent:function(i){return cS(i,function(){var gN=i.listSelections();for(var gO=gN.length-1;gO>=0;gO--){i.replaceRange(i.doc.lineSeparator(),gN[gO].anchor,gN[gO].head,"+input")}gN=i.listSelections();for(var gP=0;gP<gN.length;gP++){i.indentLine(gN[gP].from().line,null,true)}f1(i)})},openLine:function(i){return i.replaceSelection("\n","start")},toggleOverwrite:function(i){return i.toggleOverwrite()}};function bv(gN,gQ){var gO=fy(gN.doc,gQ);var gR=y(gO);if(gR!=gO){gQ=bQ(gR)}var i=a(gR);var gP=!i?0:i[0].level%2?cY(gR):cJ(gR);return V(gQ,gP)}function dY(gO,gR){var gN,gP=fy(gO.doc,gR);while(gN=eJ(gP)){gP=gN.find(1,true).line;gR=null}var i=a(gP);var gQ=!i?gP.text.length:i[0].level%2?cJ(gP):cY(gP);return V(gR==null?bQ(gP):gR,gQ)}function dQ(gN,gS){var gR=bv(gN,gS.line);var gO=fy(gN.doc,gR.line);var i=a(gO);if(!i||i[0].level==0){var gQ=Math.max(0,gO.text.search(/\S/));var gP=gS.line==gR.line&&gS.ch<=gQ&&gS.ch;return V(gR.line,gP?0:gQ)}return gR}function gg(gN,gQ,i){if(typeof gQ=="string"){gQ=eR[gQ];if(!gQ){return false}}gN.display.input.ensurePolled();var gP=gN.display.shift,gO=false;try{if(gN.isReadOnly()){gN.state.suppressEdits=true}if(i){gN.display.shift=false}gO=gQ(gN)!=cg}finally{gN.display.shift=gP;gN.state.suppressEdits=false}return gO}function ei(gO,gP,gR){for(var gQ=0;gQ<gO.state.keyMaps.length;gQ++){var gN=j(gP,gO.state.keyMaps[gQ],gR,gO);if(gN){return gN}}return(gO.options.extraKeys&&j(gP,gO.options.extraKeys,gR,gO))||j(gP,gO.options.keyMap,gR,gO)}var dU=new gM;function bd(gN,gP,gR,gQ){var gO=gN.state.keySeq;if(gO){if(eO(gP)){return"handled"}dU.set(50,function(){if(gN.state.keySeq==gO){gN.state.keySeq=null;gN.display.input.reset()}});gP=gO+" "+gP}var i=ei(gN,gP,gQ);if(i=="multi"){gN.state.keySeq=gP}if(i=="handled"){ad(gN,"keyHandled",gN,gP,gR)}if(i=="handled"||i=="multi"){cL(gR);p(gN)}if(gO&&!i&&/\'$/.test(gP)){cL(gR);return true}return !!i}function fC(i,gO){var gN=fK(gO,true);if(!gN){return false}if(gO.shiftKey&&!i.state.keySeq){return bd(i,"Shift-"+gN,gO,function(gP){return gg(i,gP,true)})||bd(i,gN,gO,function(gP){if(typeof gP=="string"?/^go[A-Z]/.test(gP):gP.motion){return gg(i,gP)}})}else{return bd(i,gN,gO,function(gP){return gg(i,gP)})}}function et(i,gO,gN){return bd(i,"'"+gN+"'",gO,function(gP){return gg(i,gP,true)})}var dw=null;function q(gP){var i=this;i.curOp.focus=dW();if(aR(i,gP)){return}if(dS&&l<11&&gP.keyCode==27){gP.returnValue=false}var gN=gP.keyCode;i.display.shift=gN==16||gP.shiftKey;var gO=fC(i,gP);if(ec){dw=gO?gN:null;if(!gO&&gN==88&&!dh&&(cb?gP.metaKey:gP.ctrlKey)){i.replaceSelection("",null,"cut")}}if(gN==18&&!/\bCodeMirror-crosshair\b/.test(i.display.lineDiv.className)){ar(i)}}function ar(gN){var gO=gN.display.lineDiv;fW(gO,"CodeMirror-crosshair");function i(gP){if(gP.keyCode==18||!gP.altKey){h(gO,"CodeMirror-crosshair");eq(document,"keyup",i);eq(document,"mouseover",i)}}b0(document,"keyup",i);b0(document,"mouseover",i)}function bh(i){if(i.keyCode==16){this.doc.sel.shift=false}aR(this,i)}function cC(gQ){var i=this;if(bb(i.display,gQ)||aR(i,gQ)||gQ.ctrlKey&&!gQ.altKey||cb&&gQ.metaKey){return}var gP=gQ.keyCode,gN=gQ.charCode;if(ec&&gP==dw){dw=null;cL(gQ);return}if((ec&&(!gQ.which||gQ.which<10))&&fC(i,gQ)){return}var gO=String.fromCharCode(gN==null?gP:gN);if(gO=="\x08"){return}if(et(i,gQ,gO)){return}i.display.input.onKeyPress(gQ)}function eH(gO){var i=this,gN=i.display;if(aR(i,gO)||gN.activeTouch&&gN.input.supportsTouch()){return}gN.input.ensurePolled();gN.shift=gO.shiftKey;if(bb(gN,gO)){if(!c6){gN.scroller.draggable=false;setTimeout(function(){return gN.scroller.draggable=true},100)}return}if(m(i,gO)){return}var gP=cs(i,gO);window.focus();switch(gc(gO)){case 1:if(i.state.selectingText){i.state.selectingText(gO)}else{if(gP){aw(i,gO,gP)}else{if(K(gO)==gN.scroller){cL(gO)}}}break;case 2:if(c6){i.state.lastMiddleDown=+new Date}if(gP){gp(i.doc,gP)}setTimeout(function(){return gN.input.focus()},20);cL(gO);break;case 3:if(gC){ax(i,gO)}else{aj(i)}break}}var dv;var dl;function aw(gN,gS,gT){if(dS){setTimeout(cA(s,gN),0)}else{gN.curOp.focus=dW()}var gO=+new Date,gQ;if(dl&&dl.time>gO-400&&ck(dl.pos,gT)==0){gQ="triple"}else{if(dv&&dv.time>gO-400&&ck(dv.pos,gT)==0){gQ="double";dl={time:gO,pos:gT}}else{gQ="single";dv={time:gO,pos:gT}}}var gR=gN.doc.sel,i=cb?gS.metaKey:gS.ctrlKey,gP;if(gN.options.dragDrop&&e2&&!gN.isReadOnly()&&gQ=="single"&&(gP=gR.contains(gT))>-1&&(ck((gP=gR.ranges[gP]).from(),gT)<0||gT.xRel>0)&&(ck(gP.to(),gT)>0||gT.xRel<0)){a3(gN,gS,gT,i)}else{n(gN,gS,gT,gQ,i)}}function a3(gO,gR,gS,gN){var gQ=gO.display,gP=+new Date;var i=c7(gO,function(gT){if(c6){gQ.scroller.draggable=false}gO.state.draggingText=false;eq(document,"mouseup",i);eq(gQ.scroller,"drop",i);if(Math.abs(gR.clientX-gT.clientX)+Math.abs(gR.clientY-gT.clientY)<10){cL(gT);if(!gN&&+new Date-200<gP){gp(gO.doc,gS)}if(c6||dS&&l==9){setTimeout(function(){document.body.focus();gQ.input.focus()},20)}else{gQ.input.focus()}}});if(c6){gQ.scroller.draggable=true}gO.state.draggingText=i;i.copy=cb?gR.altKey:gR.ctrlKey;if(gQ.scroller.dragDrop){gQ.scroller.dragDrop()}b0(document,"mouseup",i);b0(gQ.scroller,"drop",i)}function n(gQ,g4,gP,gN,gS){var g1=gQ.display,g6=gQ.doc;cL(g4);var gO,g5,gR=g6.sel,i=gR.ranges;if(gS&&!g4.shiftKey){g5=g6.sel.contains(gP);if(g5>-1){gO=i[g5]}else{gO=new d6(gP,gP)}}else{gO=g6.sel.primary();g5=g6.sel.primIndex}if(f6?g4.shiftKey&&g4.metaKey:g4.altKey){gN="rect";if(!gS){gO=new d6(gP,gP)}gP=cs(gQ,g4,true,true);g5=-1}else{if(gN=="double"){var g2=gQ.findWordAt(gP);if(gQ.display.shift||g6.extend){gO=fO(g6,gO,g2.anchor,g2.head)}else{gO=g2}}else{if(gN=="triple"){var gV=new d6(V(gP.line,0),f7(g6,V(gP.line+1,0)));if(gQ.display.shift||g6.extend){gO=fO(g6,gO,gV.anchor,gV.head)}else{gO=gV}}else{gO=fO(g6,gO,gP)}}}if(!gS){g5=0;bX(g6,new gu([gO],0),L);gR=g6.sel}else{if(g5==-1){g5=i.length;bX(g6,cB(i.concat([gO]),g5),{scroll:false,origin:"*mouse"})}else{if(i.length>1&&i[g5].empty()&&gN=="single"&&!g4.shiftKey){bX(g6,cB(i.slice(0,g5).concat(i.slice(g5+1)),0),{scroll:false,origin:"*mouse"});gR=g6.sel}else{e(g6,g5,gO,L)}}}var g0=gP;function gZ(hh){if(ck(g0,hh)==0){return}g0=hh;if(gN=="rect"){var g9=[],he=gQ.options.tabSize;var g8=bU(fy(g6,gP.line).text,gP.ch,he);var hl=bU(fy(g6,hh.line).text,hh.ch,he);var ha=Math.min(g8,hl),hj=Math.max(g8,hl);for(var hm=Math.min(gP.line,hh.line),hc=Math.min(gQ.lastLine(),Math.max(gP.line,hh.line));hm<=hc;hm++){var hk=fy(g6,hm).text,hb=eC(hk,ha,he);if(ha==hj){g9.push(new d6(V(hm,hb),V(hm,hb)))}else{if(hk.length>hb){g9.push(new d6(V(hm,hb),V(hm,eC(hk,hj,he))))}}}if(!g9.length){g9.push(new d6(gP,gP))}bX(g6,cB(gR.ranges.slice(0,g5).concat(g9),g5),{origin:"*mouse",scroll:false});gQ.scrollIntoView(hh)}else{var hf=gO;var hd=hf.anchor,hg=hh;if(gN!="single"){var hi;if(gN=="double"){hi=gQ.findWordAt(hh)}else{hi=new d6(V(hh.line,0),f7(g6,V(hh.line+1,0)))}if(ck(hi.anchor,hd)>0){hg=hi.head;hd=aq(hf.from(),hi.anchor)}else{hg=hi.anchor;hd=bA(hf.to(),hi.head)}}var g7=gR.ranges.slice(0);g7[g5]=new d6(f7(g6,hd),hg);bX(g6,cB(g7,g5),L)}}var gX=g1.wrapper.getBoundingClientRect();var gT=0;function g3(g9){var g7=++gT;var hb=cs(gQ,g9,true,gN=="rect");if(!hb){return}if(ck(hb,g0)!=0){gQ.curOp.focus=dW();gZ(hb);var ha=ca(g1,g6);if(hb.line>=ha.to||hb.line<ha.from){setTimeout(c7(gQ,function(){if(gT==g7){g3(g9)}}),150)}}else{var g8=g9.clientY<gX.top?-20:g9.clientY>gX.bottom?20:0;if(g8){setTimeout(c7(gQ,function(){if(gT!=g7){return}g1.scroller.scrollTop+=g8;g3(g9)}),50)}}}function gW(g7){gQ.state.selectingText=false;gT=Infinity;cL(g7);g1.input.focus();eq(document,"mousemove",gY);eq(document,"mouseup",gU);g6.history.lastSelOrigin=null}var gY=c7(gQ,function(g7){if(!gc(g7)){gW(g7)}else{g3(g7)}});var gU=c7(gQ,gW);gQ.state.selectingText=gU;b0(document,"mousemove",gY);b0(document,"mouseup",gU)}function gL(gX,gT,gV,gW){var gO,gN;try{gO=gT.clientX;gN=gT.clientY}catch(gT){return false}if(gO>=Math.floor(gX.display.gutters.getBoundingClientRect().right)){return false}if(gW){cL(gT)}var gU=gX.display;var gS=gU.lineDiv.getBoundingClientRect();if(gN>gS.bottom||!fE(gX,gV)){return bO(gT)}gN-=gS.top-gU.viewOffset;for(var gQ=0;gQ<gX.options.gutters.length;++gQ){var gR=gU.gutters.childNodes[gQ];if(gR&&gR.getBoundingClientRect().right>=gO){var gY=bK(gX.doc,gN);var gP=gX.options.gutters[gQ];aE(gX,gV,gX,gY,gP,gT);return bO(gT)}}}function m(i,gN){return gL(i,gN,"gutterClick",true)}function ax(i,gN){if(bb(i.display,gN)||dp(i,gN)){return}if(aR(i,gN,"contextmenu")){return}i.display.input.onContextMenu(gN)}function dp(i,gN){if(!fE(i,"gutterContextMenu")){return false}return gL(i,gN,"gutterContextMenu",false)}function cT(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-");ai(i)}var ch={toString:function(){return"CodeMirror.Init"}};var fk={};var bf={};function eW(i){var gO=i.optionHandlers;function gN(gP,gS,gR,gQ){i.defaults[gP]=gS;if(gR){gO[gP]=gQ?function(gT,gV,gU){if(gU!=ch){gR(gT,gV,gU)}}:gR}}i.defineOption=gN;i.Init=ch;gN("value","",function(gP,gQ){return gP.setValue(gQ)},true);gN("mode",null,function(gP,gQ){gP.doc.modeOption=gQ;bt(gP)},true);gN("indentUnit",2,bt,true);gN("indentWithTabs",false);gN("smartIndent",true);gN("tabSize",4,function(gP){ex(gP);ai(gP);ag(gP)},true);gN("lineSeparator",null,function(gP,gS){gP.doc.lineSep=gS;if(!gS){return}var gR=[],gT=gP.doc.first;gP.doc.iter(function(gU){for(var gW=0;;){var gV=gU.text.indexOf(gS,gW);if(gV==-1){break}gW=gV+gS.length;gR.push(V(gT,gV))}gT++});for(var gQ=gR.length-1;gQ>=0;gQ--){a1(gP.doc,gS,gR[gQ],V(gR[gQ].line,gR[gQ].ch+gS.length))}});gN("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(gP,gR,gQ){gP.state.specialChars=new RegExp(gR.source+(gR.test("\t")?"":"|\t"),"g");if(gQ!=ch){gP.refresh()}});gN("specialCharPlaceholder",fx,function(gP){return gP.refresh()},true);gN("electricChars",true);gN("inputStyle",er?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},true);gN("spellcheck",false,function(gP,gQ){return gP.getInputField().spellcheck=gQ},true);gN("rtlMoveVisually",!aP);gN("wholeLineUpdateBefore",true);gN("theme","default",function(gP){cT(gP);dE(gP)},true);gN("keyMap","default",function(gP,gT,gQ){var gR=go(gT);var gS=gQ!=ch&&go(gQ);if(gS&&gS.detach){gS.detach(gP,gR)}if(gR.attach){gR.attach(gP,gS||null)}});gN("extraKeys",null);gN("lineWrapping",false,eV,true);gN("gutters",[],function(gP){cj(gP.options);dE(gP)},true);gN("fixedGutter",true,function(gP,gQ){gP.display.gutters.style.left=gQ?d7(gP.display)+"px":"0";gP.refresh()},true);gN("coverGutterNextToScrollbar",false,function(gP){return fg(gP)},true);gN("scrollbarStyle","native",function(gP){aD(gP);fg(gP);gP.display.scrollbars.setScrollTop(gP.doc.scrollTop);gP.display.scrollbars.setScrollLeft(gP.doc.scrollLeft)},true);gN("lineNumbers",false,function(gP){cj(gP.options);dE(gP)},true);gN("firstLineNumber",1,dE,true);gN("lineNumberFormatter",function(gP){return gP},dE,true);gN("showCursorWhenSelecting",false,bF,true);gN("resetSelectionOnContextMenu",true);gN("lineWiseCopyCut",true);gN("readOnly",false,function(gP,gQ){if(gQ=="nocursor"){aV(gP);gP.display.input.blur();gP.display.disabled=true}else{gP.display.disabled=false}gP.display.input.readOnlyChanged(gQ)});gN("disableInput",false,function(gP,gQ){if(!gQ){gP.display.input.reset()}},true);gN("dragDrop",true,gs);gN("allowDropFileTypes",null);gN("cursorBlinkRate",530);gN("cursorScrollMargin",0);gN("cursorHeight",1,bF,true);gN("singleCursorHeightPerLine",true,bF,true);gN("workTime",100);gN("workDelay",100);gN("flattenSpans",true,ex,true);gN("addModeClass",false,ex,true);gN("pollInterval",100);gN("undoDepth",200,function(gP,gQ){return gP.doc.history.undoDepth=gQ});gN("historyEventDelay",1250);gN("viewportMargin",10,function(gP){return gP.refresh()},true);gN("maxHighlightLength",10000,ex,true);gN("moveInputWithCursor",true,function(gP,gQ){if(!gQ){gP.display.input.resetPosition()}});gN("tabindex",null,function(gP,gQ){return gP.display.input.getField().tabIndex=gQ||""});gN("autofocus",null)}function dE(i){en(i);ag(i);setTimeout(function(){return eT(i)},20)}function gs(gN,gQ,gO){var gR=gO&&gO!=ch;if(!gQ!=!gR){var gP=gN.display.dragFunctions;var i=gQ?b0:eq;i(gN.display.scroller,"dragstart",gP.start);i(gN.display.scroller,"dragenter",gP.enter);i(gN.display.scroller,"dragover",gP.over);i(gN.display.scroller,"dragleave",gP.leave);i(gN.display.scroller,"drop",gP.drop)}}function eV(i){if(i.options.lineWrapping){fW(i.display.wrapper,"CodeMirror-wrap");i.display.sizer.style.minWidth="";i.display.sizerWidth=null}else{h(i.display.wrapper,"CodeMirror-wrap");f(i)}X(i);ag(i);ai(i);setTimeout(function(){return fg(i)},100)}function fn(gN,gP){var gU=this;if(!(this instanceof fn)){return new fn(gN,gP)}this.options=gP=gP?aN(gP):{};aN(fk,gP,false);cj(gP);var gT=gP.value;if(typeof gT=="string"){gT=new at(gT,gP.mode,null,gP.lineSeparator)}this.doc=gT;var gO=new fn.inputStyles[gP.inputStyle](this);var gS=this.display=new eY(gN,gT,gO);gS.wrapper.CodeMirror=this;en(this);cT(this);if(gP.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}if(gP.autofocus&&!er){gS.input.focus()}aD(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,delayingBlurEvent:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,selectingText:false,draggingText:false,highlight:new gM(),keySeq:null,specialChars:null};if(dS&&l<11){setTimeout(function(){return gU.display.input.reset(true)},20)}gf(this);bj();cO(this);this.curOp.forceUpdate=true;em(this,gT);if((gP.autofocus&&!er)||this.hasFocus()){setTimeout(cA(cG,this),20)}else{aV(this)}for(var gR in bf){if(bf.hasOwnProperty(gR)){bf[gR](gU,gP[gR],ch)}}ef(this);if(gP.finishInit){gP.finishInit(this)}for(var gQ=0;gQ<a8.length;++gQ){a8[gQ](gU)}al(this);if(c6&&gP.lineWrapping&&getComputedStyle(gS.lineDiv).textRendering=="optimizelegibility"){gS.lineDiv.style.textRendering="auto"}}fn.defaults=fk;fn.optionHandlers=bf;function gf(gN){var gR=gN.display;b0(gR.scroller,"mousedown",c7(gN,eH));if(dS&&l<11){b0(gR.scroller,"dblclick",c7(gN,function(gV){if(aR(gN,gV)){return}var gW=cs(gN,gV);if(!gW||m(gN,gV)||bb(gN.display,gV)){return}cL(gV);var gU=gN.findWordAt(gW);gp(gN.doc,gU.anchor,gU.head)}))}else{b0(gR.scroller,"dblclick",function(gU){return aR(gN,gU)||cL(gU)})}if(!gC){b0(gR.scroller,"contextmenu",function(gU){return ax(gN,gU)})}var gT,i={end:0};function gS(){if(gR.activeTouch){gT=setTimeout(function(){return gR.activeTouch=null},1000);i=gR.activeTouch;i.end=+new Date}}function gP(gU){if(gU.touches.length!=1){return false}var gV=gU.touches[0];return gV.radiusX<=1&&gV.radiusY<=1}function gO(gX,gU){if(gU.left==null){return true}var gW=gU.left-gX.left,gV=gU.top-gX.top;return gW*gW+gV*gV>20*20}b0(gR.scroller,"touchstart",function(gV){if(!aR(gN,gV)&&!gP(gV)){gR.input.ensurePolled();clearTimeout(gT);var gU=+new Date;gR.activeTouch={start:gU,moved:false,prev:gU-i.end<=300?i:null};if(gV.touches.length==1){gR.activeTouch.left=gV.touches[0].pageX;gR.activeTouch.top=gV.touches[0].pageY}}});b0(gR.scroller,"touchmove",function(){if(gR.activeTouch){gR.activeTouch.moved=true}});b0(gR.scroller,"touchend",function(gV){var gX=gR.activeTouch;if(gX&&!bb(gR,gV)&&gX.left!=null&&!gX.moved&&new Date-gX.start<300){var gW=gN.coordsChar(gR.activeTouch,"page"),gU;if(!gX.prev||gO(gX,gX.prev)){gU=new d6(gW,gW)}else{if(!gX.prev.prev||gO(gX,gX.prev.prev)){gU=gN.findWordAt(gW)}else{gU=new d6(V(gW.line,0),f7(gN.doc,V(gW.line+1,0)))}}gN.setSelection(gU.anchor,gU.head);gN.focus();cL(gV)}gS()});b0(gR.scroller,"touchcancel",gS);b0(gR.scroller,"scroll",function(){if(gR.scroller.clientHeight){N(gN,gR.scroller.scrollTop);bH(gN,gR.scroller.scrollLeft,true);aE(gN,"scroll",gN)}});b0(gR.scroller,"mousewheel",function(gU){return c(gN,gU)});b0(gR.scroller,"DOMMouseScroll",function(gU){return c(gN,gU)});b0(gR.wrapper,"scroll",function(){return gR.wrapper.scrollTop=gR.wrapper.scrollLeft=0});gR.dragFunctions={enter:function(gU){if(!aR(gN,gU)){eD(gU)}},over:function(gU){if(!aR(gN,gU)){gK(gN,gU);eD(gU)}},start:function(gU){return O(gN,gU)},drop:c7(gN,bk),leave:function(gU){if(!aR(gN,gU)){di(gN)}}};var gQ=gR.input.getField();b0(gQ,"keyup",function(gU){return bh.call(gN,gU)});b0(gQ,"keydown",c7(gN,q));b0(gQ,"keypress",c7(gN,cC));b0(gQ,"focus",function(gU){return cG(gN,gU)});b0(gQ,"blur",function(gU){return aV(gN,gU)})}var a8=[];fn.defineInitHook=function(i){return a8.push(i)};function ab(g2,gR,g1,gP){var g0=g2.doc,gO;if(g1==null){g1="add"}if(g1=="smart"){if(!g0.mode.indent){g1="prev"}else{gO=dK(g2,gR)}}var gV=g2.options.tabSize;var g3=fy(g0,gR),gU=bU(g3.text,null,gV);if(g3.stateAfter){g3.stateAfter=null}var gN=g3.text.match(/^\s*/)[0],gY;if(!gP&&!/\S/.test(g3.text)){gY=0;g1="not"}else{if(g1=="smart"){gY=g0.mode.indent(gO,g3.text.slice(gN.length),g3.text);if(gY==cg||gY>150){if(!gP){return}g1="prev"}}}if(g1=="prev"){if(gR>g0.first){gY=bU(fy(g0,gR-1).text,null,gV)}else{gY=0}}else{if(g1=="add"){gY=gU+g2.options.indentUnit}else{if(g1=="subtract"){gY=gU-g2.options.indentUnit}else{if(typeof g1=="number"){gY=gU+g1}}}}gY=Math.max(0,gY);var gZ="",gX=0;if(g2.options.indentWithTabs){for(var gS=Math.floor(gY/gV);gS;--gS){gX+=gV;gZ+="\t"}}if(gX<gY){gZ+=cu(gY-gX)}if(gZ!=gN){a1(g0,gZ,V(gR,0),V(gR,gN.length),"+input");g3.stateAfter=null;return true}else{for(var gQ=0;gQ<g0.sel.ranges.length;gQ++){var gT=g0.sel.ranges[gQ];if(gT.head.line==gR&&gT.head.ch<gN.length){var gW=V(gR,gN.length);e(g0,gQ,new d6(gW,gW));break}}}}var bm=null;function dc(i){bm=i}function gq(g1,gS,gQ,gP,g0){var gZ=g1.doc;g1.display.shift=false;if(!gP){gP=gZ.sel}var gR=g1.state.pasteIncoming||g0=="paste";var gU=gh(gS),gN=null;if(gR&&gP.ranges.length>1){if(bm&&bm.text.join("\n")==gS){if(gP.ranges.length%bm.text.length==0){gN=[];for(var gT=0;gT<bm.text.length;gT++){gN.push(gZ.splitLines(bm.text[gT]))}}}else{if(gU.length==gP.ranges.length){gN=bW(gU,function(i){return[i]})}}}var gV;for(var gO=gP.ranges.length-1;gO>=0;gO--){var g2=gP.ranges[gO];var gY=g2.from(),gX=g2.to();if(g2.empty()){if(gQ&&gQ>0){gY=V(gY.line,gY.ch-gQ)}else{if(g1.state.overwrite&&!gR){gX=V(gX.line,Math.min(fy(gZ,gX.line).text.length,gX.ch+f2(gU).length))}else{if(bm&&bm.lineWise&&bm.text.join("\n")==gS){gY=gX=V(gY.line,0)}}}}gV=g1.curOp.updateInput;var gW={from:gY,to:gX,text:gN?gN[gO%gN.length]:gU,origin:g0||(gR?"paste":g1.state.cutIncoming?"cut":"+input")};bg(g1.doc,gW);ad(g1,"inputRead",g1,gW)}if(gS&&!gR){gn(g1,gS)}f1(g1);g1.curOp.updateInput=gV;g1.curOp.typing=true;g1.state.pasteIncoming=g1.state.cutIncoming=false}function ba(gO,i){var gN=gO.clipboardData&&gO.clipboardData.getData("Text");if(gN){gO.preventDefault();if(!i.isReadOnly()&&!i.options.disableInput){cS(i,function(){return gq(i,gN,0,null,"paste")})}return true}}function gn(gN,gQ){if(!gN.options.electricChars||!gN.options.smartIndent){return}var gR=gN.doc.sel;for(var gP=gR.ranges.length-1;gP>=0;gP--){var gT=gR.ranges[gP];if(gT.head.ch>100||(gP&&gR.ranges[gP-1].head.line==gT.head.line)){continue}var gS=gN.getModeAt(gT.head);var gU=false;if(gS.electricChars){for(var gO=0;gO<gS.electricChars.length;gO++){if(gQ.indexOf(gS.electricChars.charAt(gO))>-1){gU=ab(gN,gT.head.line,"smart");break}}}else{if(gS.electricInput){if(gS.electricInput.test(fy(gN.doc,gT.head.line).text.slice(0,gT.head.ch))){gU=ab(gN,gT.head.line,"smart")}}}if(gU){ad(gN,"electricInput",gN,gT.head.line)}}}function dq(gN){var gS=[],gP=[];for(var gQ=0;gQ<gN.doc.sel.ranges.length;gQ++){var gO=gN.doc.sel.ranges[gQ].head.line;var gR={anchor:V(gO,0),head:V(gO+1,0)};gP.push(gR);gS.push(gN.getRange(gR.anchor,gR.head))}return{text:gS,ranges:gP}}function gd(gN,i){gN.setAttribute("autocorrect","off");gN.setAttribute("autocapitalize","off");gN.setAttribute("spellcheck",!!i)}function aX(){var i=gv("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");var gN=gv("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");if(c6){i.style.width="1000px"}else{i.setAttribute("wrap","off")}if(fj){i.style.border="1px solid black"}gd(i);return gN}var dX=function(i){var gN=i.optionHandlers;var gO=i.helpers={};i.prototype={constructor:i,focus:function(){window.focus();this.display.input.focus()},setOption:function(gR,gS){var gQ=this.options,gP=gQ[gR];if(gQ[gR]==gS&&gR!="mode"){return}gQ[gR]=gS;if(gN.hasOwnProperty(gR)){c7(this,gN[gR])(this,gS,gP)}},getOption:function(gP){return this.options[gP]},getDoc:function(){return this.doc},addKeyMap:function(gQ,gP){this.state.keyMaps[gP?"push":"unshift"](go(gQ))},removeKeyMap:function(gQ){var gR=this.state.keyMaps;for(var gP=0;gP<gR.length;++gP){if(gR[gP]==gQ||gR[gP].name==gQ){gR.splice(gP,1);return true}}},addOverlay:dg(function(gP,gQ){var gR=gP.token?gP:i.getMode(this.options,gP);if(gR.startState){throw new Error("Overlays may not be stateful.")}ce(this.state.overlays,{mode:gR,modeSpec:gP,opaque:gQ&&gQ.opaque,priority:(gQ&&gQ.priority)||0},function(gS){return gS.priority});this.state.modeGen++;ag(this)}),removeOverlay:dg(function(gP){var gT=this;var gR=this.state.overlays;for(var gQ=0;gQ<gR.length;++gQ){var gS=gR[gQ].modeSpec;if(gS==gP||typeof gP=="string"&&gS.name==gP){gR.splice(gQ,1);gT.state.modeGen++;ag(gT);return}}}),indentLine:dg(function(gR,gP,gQ){if(typeof gP!="string"&&typeof gP!="number"){if(gP==null){gP=this.options.smartIndent?"smart":"prev"}else{gP=gP?"add":"subtract"}}if(cd(this.doc,gR)){ab(this,gR,gP,gQ)}}),indentSelection:dg(function(gY){var gV=this;var gP=this.doc.sel.ranges,gS=-1;for(var gU=0;gU<gP.length;gU++){var gZ=gP[gU];if(!gZ.empty()){var gW=gZ.from(),gX=gZ.to();var gQ=Math.max(gS,gW.line);gS=Math.min(gV.lastLine(),gX.line-(gX.ch?0:1))+1;for(var gT=gQ;gT<gS;++gT){ab(gV,gT,gY)}var gR=gV.doc.sel.ranges;if(gW.ch==0&&gP.length==gR.length&&gR[gU].from().ch>0){e(gV.doc,gU,new d6(gW,gR[gU].to()),Y)}}else{if(gZ.head.line>gS){ab(gV,gZ.head.line,gY,true);gS=gZ.head.line;if(gU==gV.doc.sel.primIndex){f1(gV)}}}}}),getTokenAt:function(gQ,gP){return cv(this,gQ,gP)},getLineTokens:function(gQ,gP){return cv(this,V(gQ),gP,true)},getTokenTypeAt:function(gW){gW=f7(this.doc,gW);var gS=de(this,fy(this.doc,gW.line));var gU=0,gV=(gS.length-1)/2,gR=gW.ch;var gQ;if(gR==0){gQ=gS[2]}else{for(;;){var gP=(gU+gV)>>1;if((gP?gS[gP*2-1]:0)>=gR){gV=gP}else{if(gS[gP*2+1]<gR){gU=gP+1}else{gQ=gS[gP*2+2];break}}}}var gT=gQ?gQ.indexOf("overlay "):-1;return gT<0?gQ:gT==0?null:gQ.slice(0,gT-1)},getModeAt:function(gQ){var gP=this.doc.mode;if(!gP.innerMode){return gP}return i.innerMode(gP,this.getTokenAt(gQ).state).mode},getHelper:function(gQ,gP){return this.getHelpers(gQ,gP)[0]},getHelpers:function(gW,gV){var gT=this;var gY=[];if(!gO.hasOwnProperty(gV)){return gY}var gR=gO[gV],gU=this.getModeAt(gW);if(typeof gU[gV]=="string"){if(gR[gU[gV]]){gY.push(gR[gU[gV]])}}else{if(gU[gV]){for(var gS=0;gS<gU[gV].length;gS++){var gQ=gR[gU[gV][gS]];if(gQ){gY.push(gQ)}}}else{if(gU.helperType&&gR[gU.helperType]){gY.push(gR[gU.helperType])}else{if(gR[gU.name]){gY.push(gR[gU.name])}}}}for(var gP=0;gP<gR._global.length;gP++){var gX=gR._global[gP];if(gX.pred(gU,gT)&&dr(gY,gX.val)==-1){gY.push(gX.val)}}return gY},getStateAfter:function(gQ,gP){var gR=this.doc;gQ=db(gR,gQ==null?gR.first+gR.size-1:gQ);return dK(this,gQ+1,gP)},cursorCoords:function(gS,gQ){var gR,gP=this.doc.sel.primary();if(gS==null){gR=gP.head}else{if(typeof gS=="object"){gR=f7(this.doc,gS)}else{gR=gS?gP.from():gP.to()}}return d3(this,gR,gQ||"page")},charCoords:function(gQ,gP){return cP(this,f7(this.doc,gQ),gP||"page")},coordsChar:function(gP,gQ){gP=gI(this,gP,gQ||"page");return ge(this,gP.left,gP.top)},lineAtHeight:function(gP,gQ){gP=gI(this,{top:gP,left:0},gQ||"page").top;return bK(this.doc,gP+this.display.viewOffset)},heightAtLine:function(gQ,gU,gT){var gP=false,gR;if(typeof gQ=="number"){var gS=this.doc.first+this.doc.size-1;if(gQ<this.doc.first){gQ=this.doc.first}else{if(gQ>gS){gQ=gS;gP=true}}gR=fy(this.doc,gQ)}else{gR=gQ}return e7(this,gR,{top:0,left:0},gU||"page",gT).top+(gP?this.doc.height-bP(gR):0)},defaultTextHeight:function(){return aY(this.display)},defaultCharWidth:function(){return dL(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(gU,gR,gW,gS,gY){var gT=this.display;gU=d3(this,f7(this.doc,gU));var gV=gU.bottom,gQ=gU.left;gR.style.position="absolute";gR.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(gR);gT.sizer.appendChild(gR);if(gS=="over"){gV=gU.top}else{if(gS=="above"||gS=="near"){var gP=Math.max(gT.wrapper.clientHeight,this.doc.height),gX=Math.max(gT.sizer.clientWidth,gT.lineSpace.clientWidth);if((gS=="above"||gU.bottom+gR.offsetHeight>gP)&&gU.top>gR.offsetHeight){gV=gU.top-gR.offsetHeight}else{if(gU.bottom+gR.offsetHeight<=gP){gV=gU.bottom}}if(gQ+gR.offsetWidth>gX){gQ=gX-gR.offsetWidth}}}gR.style.top=gV+"px";gR.style.left=gR.style.right="";if(gY=="right"){gQ=gT.sizer.clientWidth-gR.offsetWidth;gR.style.right="0px"}else{if(gY=="left"){gQ=0}else{if(gY=="middle"){gQ=(gT.sizer.clientWidth-gR.offsetWidth)/2}}gR.style.left=gQ+"px"}if(gW){E(this,gQ,gV,gQ+gR.offsetWidth,gV+gR.offsetHeight)}},triggerOnKeyDown:dg(q),triggerOnKeyPress:dg(cC),triggerOnKeyUp:bh,execCommand:function(gP){if(eR.hasOwnProperty(gP)){return eR[gP].call(null,this)}},triggerElectric:dg(function(gP){gn(this,gP)}),findPosH:function(gW,gS,gT,gQ){var gV=this;var gP=1;if(gS<0){gP=-1;gS=-gS}var gU=f7(this.doc,gW);for(var gR=0;gR<gS;++gR){gU=by(gV.doc,gU,gP,gT,gQ);if(gU.hitSide){break}}return gU},moveH:dg(function(gP,gQ){var gR=this;this.extendSelectionsBy(function(gS){if(gR.display.shift||gR.doc.extend||gS.empty()){return by(gR.doc,gS.head,gP,gQ,gR.options.rtlMoveVisually)}else{return gP<0?gS.from():gS.to()}},c2)}),deleteH:dg(function(gP,gQ){var gR=this.doc.sel,gS=this.doc;if(gR.somethingSelected()){gS.replaceSelection("",null,"+delete")}else{ff(this,function(gU){var gT=by(gS,gU.head,gP,gQ,false);return gP<0?{from:gT,to:gU.head}:{from:gU.head,to:gT}})}}),findPosV:function(gV,gS,gW,gY){var gR=this;var gP=1,gU=gY;if(gS<0){gP=-1;gS=-gS}var gX=f7(this.doc,gV);for(var gQ=0;gQ<gS;++gQ){var gT=d3(gR,gX,"div");if(gU==null){gU=gT.left}else{gT.left=gU}gX=bs(gR,gT,gP,gW);if(gX.hitSide){break}}return gX},moveV:dg(function(gP,gR){var gV=this;var gT=this.doc,gS=[];var gU=!this.display.shift&&!gT.extend&&gT.sel.somethingSelected();gT.extendSelectionsBy(function(gW){if(gU){return gP<0?gW.from():gW.to()}var gY=d3(gV,gW.head,"div");if(gW.goalColumn!=null){gY.left=gW.goalColumn}gS.push(gY.left);var gX=bs(gV,gY,gP,gR);if(gR=="page"&&gW==gT.sel.primary()){cR(gV,null,cP(gV,gX,"div").top-gY.top)}return gX},c2);if(gS.length){for(var gQ=0;gQ<gT.sel.ranges.length;gQ++){gT.sel.ranges[gQ].goalColumn=gS[gQ]}}}),findWordAt:function(gW){var gU=this.doc,gS=fy(gU,gW.line).text;var gV=gW.ch,gR=gW.ch;if(gS){var gT=this.getHelper(gW,"wordChars");if((gW.xRel<0||gR==gS.length)&&gV){--gV}else{++gR}var gQ=gS.charAt(gV);var gP=cF(gQ,gT)?function(gX){return cF(gX,gT)}:/\s/.test(gQ)?function(gX){return/\s/.test(gX)}:function(gX){return(!/\s/.test(gX)&&!cF(gX))};while(gV>0&&gP(gS.charAt(gV-1))){--gV}while(gR<gS.length&&gP(gS.charAt(gR))){++gR}}return new d6(V(gW.line,gV),V(gW.line,gR))},toggleOverwrite:function(gP){if(gP!=null&&gP==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){fW(this.display.cursorDiv,"CodeMirror-overwrite")}else{h(this.display.cursorDiv,"CodeMirror-overwrite")}aE(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==dW()},isReadOnly:function(){return !!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dg(function(gP,gQ){if(gP!=null||gQ!=null){fY(this)}if(gP!=null){this.curOp.scrollLeft=gP}if(gQ!=null){this.curOp.scrollTop=gQ}}),getScrollInfo:function(){var gP=this.display.scroller;return{left:gP.scrollLeft,top:gP.scrollTop,height:gP.scrollHeight-cZ(this)-this.display.barHeight,width:gP.scrollWidth-cZ(this)-this.display.barWidth,clientHeight:c1(this),clientWidth:du(this)}},scrollIntoView:dg(function(gR,gQ){if(gR==null){gR={from:this.doc.sel.primary().head,to:null};if(gQ==null){gQ=this.options.cursorScrollMargin}}else{if(typeof gR=="number"){gR={from:V(gR,0),to:null}}else{if(gR.from==null){gR={from:gR,to:null}}}}if(!gR.to){gR.to=gR.from}gR.margin=gQ||0;if(gR.from.line!=null){fY(this);this.curOp.scrollToPos=gR}else{var gP=G(this,Math.min(gR.from.left,gR.to.left),Math.min(gR.from.top,gR.to.top)-gR.margin,Math.max(gR.from.right,gR.to.right),Math.max(gR.from.bottom,gR.to.bottom)+gR.margin);this.scrollTo(gP.scrollLeft,gP.scrollTop)}}),setSize:dg(function(gS,gP){var gT=this;var gR=function(gU){return typeof gU=="number"||/^\d+$/.test(String(gU))?gU+"px":gU};if(gS!=null){this.display.wrapper.style.width=gR(gS)}if(gP!=null){this.display.wrapper.style.height=gR(gP)}if(this.options.lineWrapping){aO(this)}var gQ=this.display.viewFrom;this.doc.iter(gQ,this.display.viewTo,function(gU){if(gU.widgets){for(var gV=0;gV<gU.widgets.length;gV++){if(gU.widgets[gV].noHScroll){Q(gT,gQ,"widget");break}}}++gQ});this.curOp.forceUpdate=true;aE(this,"refresh",this)}),operation:function(gP){return cS(this,gP)},refresh:dg(function(){var gP=this.display.cachedTextHeight;ag(this);this.curOp.forceUpdate=true;ai(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);da(this);if(gP==null||Math.abs(gP-aY(this.display))>0.5){X(this)}aE(this,"refresh",this)}),swapDoc:dg(function(gQ){var gP=this.doc;gP.cm=null;em(this,gQ);ai(this);this.display.input.reset();this.scrollTo(gQ.scrollLeft,gQ.scrollTop);this.curOp.forceScroll=true;ad(this,"swapDoc",this,gP);return gP}),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}};bC(i);i.registerHelper=function(gQ,gP,gR){if(!gO.hasOwnProperty(gQ)){gO[gQ]=i[gQ]={_global:[]}}gO[gQ][gP]=gR};i.registerGlobalHelper=function(gR,gQ,gP,gS){i.registerHelper(gR,gQ,gS);gO[gR]._global.push({pred:gP,val:gS})}};function by(g3,gQ,gY,gX,gS){var gV=gQ.line,gW=gQ.ch,g2=gY;var gN=fy(g3,gV);function g1(){var g4=gV+gY;if(g4<g3.first||g4>=g3.first+g3.size){return false}gV=g4;return gN=fy(g3,g4)}function g0(g5){var g4=(gS?u:ah)(gN,gW,gY,true);if(g4==null){if(!g5&&g1()){if(gS){gW=(gY<0?cY:cJ)(gN)}else{gW=gY<0?gN.text.length:0}}else{return false}}else{gW=g4}return true}if(gX=="char"){g0()}else{if(gX=="column"){g0(true)}else{if(gX=="word"||gX=="group"){var gZ=null,gT=gX=="group";var i=g3.cm&&g3.cm.getHelper(gQ,"wordChars");for(var gR=true;;gR=false){if(gY<0&&!g0(!gR)){break}var gO=gN.text.charAt(gW)||"\n";var gP=cF(gO,i)?"w":gT&&gO=="\n"?"n":!gT||/\s/.test(gO)?null:"p";if(gT&&!gR&&!gP){gP="s"}if(gZ&&gZ!=gP){if(gY<0){gY=1;g0()}break}if(gP){gZ=gP}if(gY>0&&!g0(!gR)){break}}}}}var gU=bY(g3,V(gV,gW),gQ,g2,true);if(!ck(gQ,gU)){gU.hitSide=true}return gU}function bs(gV,gQ,gN,gU){var gT=gV.doc,gS=gQ.left,gR;if(gU=="page"){var gP=Math.min(gV.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);var i=Math.max(gP-0.5*aY(gV.display),3);gR=(gN>0?gQ.bottom:gQ.top)+gN*i}else{if(gU=="line"){gR=gN>0?gQ.bottom+3:gQ.top-3}}var gO;for(;;){gO=ge(gV,gS,gR);if(!gO.outside){break}if(gN<0?gR<=0:gR>=gT.height){gO.hitSide=true;break}gR+=gN*5}return gO}function dC(i){this.cm=i;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new gM();this.composing=null;this.gracePeriod=false;this.readDOMTimeout=null}dC.prototype=aN({init:function(gP){var gR=this;var gO=this,i=gO.cm;var gQ=gO.div=gP.lineDiv;gd(gQ,i.options.spellcheck);b0(gQ,"paste",function(gS){if(aR(i,gS)||ba(gS,i)){return}if(l<=11){setTimeout(c7(i,function(){if(!gO.pollContent()){ag(i)}}),20)}});b0(gQ,"compositionstart",function(gS){gR.composing={data:gS.data}});b0(gQ,"compositionupdate",function(gS){if(!gR.composing){gR.composing={data:gS.data}}});b0(gQ,"compositionend",function(gS){if(gR.composing){if(gS.data!=gR.composing.data){gR.readFromDOMSoon()}gR.composing=null}});b0(gQ,"touchstart",function(){return gO.forceCompositionEnd()});b0(gQ,"input",function(){if(!gR.composing){gR.readFromDOMSoon()}});function gN(gW){if(aR(i,gW)){return}if(i.somethingSelected()){dc({lineWise:false,text:i.getSelections()});if(gW.type=="cut"){i.replaceSelection("",null,"cut")}}else{if(!i.options.lineWiseCopyCut){return}else{var gT=dq(i);dc({lineWise:true,text:gT.text});if(gW.type=="cut"){i.operation(function(){i.setSelections(gT.ranges,0,Y);i.replaceSelection("",null,"cut")})}}}if(gW.clipboardData){gW.clipboardData.clearData();var gV=bm.text.join("\n");gW.clipboardData.setData("Text",gV);if(gW.clipboardData.getData("Text")==gV){gW.preventDefault();return}}var gU=aX(),gX=gU.firstChild;i.display.lineSpace.insertBefore(gU,i.display.lineSpace.firstChild);gX.value=bm.text.join("\n");var gS=document.activeElement;dT(gX);setTimeout(function(){i.display.lineSpace.removeChild(gU);gS.focus();if(gS==gQ){gO.showPrimarySelection()}},50)}b0(gQ,"copy",gN);b0(gQ,"cut",gN)},prepareSelection:function(){var i=f5(this.cm,false);i.focus=this.cm.state.focused;return i},showSelection:function(gN,i){if(!gN||!this.cm.display.view.length){return}if(gN.focus||i){this.showPrimarySelection()}this.showMultipleSelections(gN)},showPrimarySelection:function(){var gP=window.getSelection(),gS=this.cm.doc.sel.primary();var gQ=ay(this.cm,gP.anchorNode,gP.anchorOffset);var gU=ay(this.cm,gP.focusNode,gP.focusOffset);if(gQ&&!gQ.bad&&gU&&!gU.bad&&ck(aq(gQ,gU),gS.from())==0&&ck(bA(gQ,gU),gS.to())==0){return}var gO=cE(this.cm,gS.from());var gT=cE(this.cm,gS.to());if(!gO&&!gT){return}var gW=this.cm.display.view;var gR=gP.rangeCount&&gP.getRangeAt(0);if(!gO){gO={node:gW[0].measure.map[2],offset:0}}else{if(!gT){var gN=gW[gW.length-1].measure;var gX=gN.maps?gN.maps[gN.maps.length-1]:gN.map;gT={node:gX[gX.length-1],offset:gX[gX.length-2]-gX[gX.length-3]}}}var i;try{i=cr(gO.node,gO.offset,gT.offset,gT.node)}catch(gV){}if(i){if(!ct&&this.cm.state.focused){gP.collapse(gO.node,gO.offset);if(!i.collapsed){gP.removeAllRanges();gP.addRange(i)}}else{gP.removeAllRanges();gP.addRange(i)}if(gR&&gP.anchorNode==null){gP.addRange(gR)}else{if(ct){this.startGracePeriod()}}}this.rememberSelection()},startGracePeriod:function(){var i=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){i.gracePeriod=false;if(i.selectionChanged()){i.cm.operation(function(){return i.cm.curOp.selectionChanged=true})}},20)},showMultipleSelections:function(i){bV(this.cm.display.cursorDiv,i.cursors);bV(this.cm.display.selectionDiv,i.selection)},rememberSelection:function(){var i=window.getSelection();this.lastAnchorNode=i.anchorNode;this.lastAnchorOffset=i.anchorOffset;this.lastFocusNode=i.focusNode;this.lastFocusOffset=i.focusOffset},selectionInEditor:function(){var gN=window.getSelection();if(!gN.rangeCount){return false}var i=gN.getRangeAt(0).commonAncestorContainer;return gD(this.div,i)},focus:function(){if(this.cm.options.readOnly!="nocursor"){if(!this.selectionInEditor()){this.showSelection(this.prepareSelection(),true)}this.div.focus()}},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return true},receivedFocus:function(){var i=this;if(this.selectionInEditor()){this.pollSelection()}else{cS(this.cm,function(){return i.cm.curOp.selectionChanged=true})}function gN(){if(i.cm.state.focused){i.pollSelection();i.polling.set(i.cm.options.pollInterval,gN)}}this.polling.set(this.cm.options.pollInterval,gN)},selectionChanged:function(){var i=window.getSelection();return i.anchorNode!=this.lastAnchorNode||i.anchorOffset!=this.lastAnchorOffset||i.focusNode!=this.lastFocusNode||i.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&this.readDOMTimeout==null&&!this.gracePeriod&&this.selectionChanged()){var gP=window.getSelection(),i=this.cm;this.rememberSelection();var gN=ay(i,gP.anchorNode,gP.anchorOffset);var gO=ay(i,gP.focusNode,gP.focusOffset);if(gN&&gO){cS(i,function(){bX(i.doc,e8(gN,gO),Y);if(gN.bad||gO.bad){i.curOp.selectionChanged=true}})}}},pollContent:function(){if(this.readDOMTimeout!=null){clearTimeout(this.readDOMTimeout);this.readDOMTimeout=null}var gW=this.cm,g6=gW.display,g4=gW.doc.sel.primary();var g5=g4.from(),gQ=g4.to();if(g5.ch==0&&g5.line>gW.firstLine()){g5=V(g5.line-1,fy(gW.doc,g5.line-1).length)}if(gQ.ch==fy(gW.doc,gQ.line).text.length&&gQ.line<gW.lastLine()){gQ=V(gQ.line+1,0)}if(g5.line<g6.viewFrom||gQ.line>g6.viewTo-1){return false}var gT,gR,gV;if(g5.line==g6.viewFrom||(gT=dz(gW,g5.line))==0){gR=bQ(g6.view[0].line);gV=g6.view[0].node}else{gR=bQ(g6.view[gT].line);gV=g6.view[gT-1].node.nextSibling}var g3=dz(gW,gQ.line);var gY,g1;if(g3==g6.view.length-1){gY=g6.viewTo-1;g1=g6.lineDiv.lastChild}else{gY=bQ(g6.view[g3+1].line)-1;g1=g6.view[g3+1].node.previousSibling}if(!gV){return false}var g7=gW.doc.splitLines(gr(gW,gV,g1,gR,gY));var g0=gw(gW.doc,V(gR,0),V(gY,fy(gW.doc,gY).text.length));while(g7.length>1&&g0.length>1){if(f2(g7)==f2(g0)){g7.pop();g0.pop();gY--}else{if(g7[0]==g0[0]){g7.shift();g0.shift();gR++}else{break}}}var g2=0,gO=0;var gX=g7[0],gN=g0[0],i=Math.min(gX.length,gN.length);while(g2<i&&gX.charCodeAt(g2)==gN.charCodeAt(g2)){++g2}var gU=f2(g7),g8=f2(g0);var gP=Math.min(gU.length-(g7.length==1?g2:0),g8.length-(g0.length==1?g2:0));while(gO<gP&&gU.charCodeAt(gU.length-gO-1)==g8.charCodeAt(g8.length-gO-1)){++gO}g7[g7.length-1]=gU.slice(0,gU.length-gO).replace(/^\u200b+/,"");g7[0]=g7[0].slice(g2).replace(/\u200b+$/,"");var gS=V(gR,g2);var gZ=V(gY,g0.length?f2(g0).length-gO:0);if(g7.length>1||g7[0]||ck(gS,gZ)){a1(gW.doc,g7,gS,gZ,"+input");return true}},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){if(!this.composing){return}this.composing=null;if(!this.pollContent()){ag(this.cm)}this.div.blur();this.div.focus()},readFromDOMSoon:function(){var i=this;if(this.readDOMTimeout!=null){return}this.readDOMTimeout=setTimeout(function(){i.readDOMTimeout=null;if(i.composing){return}if(i.cm.isReadOnly()||!i.pollContent()){cS(i.cm,function(){return ag(i.cm)})}},80)},setUneditable:function(i){i.contentEditable="false"},onKeyPress:function(i){i.preventDefault();if(!this.cm.isReadOnly()){c7(this.cm,gq)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0)}},readOnlyChanged:function(i){this.div.contentEditable=String(i!="nocursor")},onContextMenu:gm,resetPosition:gm,needsContentAttribute:true},dC.prototype);function cE(gS,gQ){var gR=fv(gS,gQ.line);if(!gR||gR.hidden){return null}var gU=fy(gS.doc,gQ.line);var gN=cy(gR,gU,gQ.line);var gO=a(gU),gP="left";if(gO){var i=aH(gO,gQ.ch);gP=i%2?"right":"left"}var gT=aK(gN.map,gQ.ch,gP);gT.offset=gT.collapse=="right"?gT.end:gT.start;return gT}function eE(gN,i){if(i){gN.bad=true}return gN}function gr(gU,gS,gT,gP,gN){var gV="",gO=false,i=gU.doc.lineSeparator();function gQ(gW){return function(gX){return gX.id==gW}}function gR(gZ){if(gZ.nodeType==1){var gW=gZ.getAttribute("cm-text");if(gW!=null){if(gW==""){gV+=gZ.textContent.replace(/\u200b/g,"")}else{gV+=gW}return}var gY=gZ.getAttribute("cm-marker"),g2;if(gY){var g0=gU.findMarks(V(gP,0),V(gN+1,0),gQ(+gY));if(g0.length&&(g2=g0[0].find())){gV+=gw(gU.doc,g2.from,g2.to).join(i)}return}if(gZ.getAttribute("contenteditable")=="false"){return}for(var gX=0;gX<gZ.childNodes.length;gX++){gR(gZ.childNodes[gX])}if(/^(pre|div|p)$/i.test(gZ.nodeName)){gO=true}}else{if(gZ.nodeType==3){var g1=gZ.nodeValue;if(!g1){return}if(gO){gV+=i;gO=false}gV+=g1}}}for(;;){gR(gS);if(gS==gT){break}gS=gS.nextSibling}return gV}function ay(gN,gQ,gS){var gR;if(gQ==gN.display.lineDiv){gR=gN.display.lineDiv.childNodes[gS];if(!gR){return eE(gN.clipPos(V(gN.display.viewTo-1)),true)}gQ=null;gS=0}else{for(gR=gQ;;gR=gR.parentNode){if(!gR||gR==gN.display.lineDiv){return null}if(gR.parentNode&&gR.parentNode==gN.display.lineDiv){break}}}for(var gP=0;gP<gN.display.view.length;gP++){var gO=gN.display.view[gP];if(gO.node==gR){return Z(gO,gQ,gS)}}}function Z(gV,gR,gT){var gO=gV.text.firstChild,gQ=false;if(!gR||!gD(gO,gR)){return eE(V(bQ(gV.line),0),true)}if(gR==gO){gQ=true;gR=gO.childNodes[gT];gT=0;if(!gR){var g1=gV.rest?f2(gV.rest):gV.line;return eE(V(bQ(g1),g1.text.length),gQ)}}var gS=gR.nodeType==3?gR:null,gZ=gR;if(!gS&&gR.childNodes.length==1&&gR.firstChild.nodeType==3){gS=gR.firstChild;if(gT){gT=gS.nodeValue.length}}while(gZ.parentNode!=gO){gZ=gZ.parentNode}var gN=gV.measure,gX=gN.maps;function gU(g3,g8,g5){for(var g7=-1;g7<(gX?gX.length:0);g7++){var g9=g7<0?gN.map:gX[g7];for(var g6=0;g6<g9.length;g6+=3){var g4=g9[g6+2];if(g4==g3||g4==g8){var ha=bQ(g7<0?gV.line:gV.rest[g7]);var g2=g9[g6]+g5;if(g5<0||g4!=g3){g2=g9[g6+(g5?1:0)]}return V(ha,g2)}}}}var g0=gU(gS,gZ,gT);if(g0){return eE(g0,gQ)}for(var i=gZ.nextSibling,gW=gS?gS.nodeValue.length-gT:0;i;i=i.nextSibling){g0=gU(i,i.firstChild,0);if(g0){return eE(V(g0.line,g0.ch-gW),gQ)}else{gW+=i.textContent.length}}for(var gY=gZ.previousSibling,gP=gT;gY;gY=gY.previousSibling){g0=gU(gY,gY.firstChild,-1);if(g0){return eE(V(g0.line,g0.ch+gP),gQ)}else{gP+=gY.textContent.length}}}function W(i){this.cm=i;this.prevInput="";this.pollingFast=false;this.polling=new gM();this.inaccurateSelection=false;this.hasSelection=false;this.composing=null}W.prototype=aN({init:function(gO){var gS=this;var gN=this,i=this.cm;var gR=this.wrapper=aX();var gP=this.textarea=gR.firstChild;gO.wrapper.insertBefore(gR,gO.wrapper.firstChild);if(fj){gP.style.width="0px"}b0(gP,"input",function(){if(dS&&l>=9&&gS.hasSelection){gS.hasSelection=null}gN.poll()});b0(gP,"paste",function(gT){if(aR(i,gT)||ba(gT,i)){return}i.state.pasteIncoming=true;gN.fastPoll()});function gQ(gU){if(aR(i,gU)){return}if(i.somethingSelected()){dc({lineWise:false,text:i.getSelections()});if(gN.inaccurateSelection){gN.prevInput="";gN.inaccurateSelection=false;gP.value=bm.text.join("\n");dT(gP)}}else{if(!i.options.lineWiseCopyCut){return}else{var gT=dq(i);dc({lineWise:true,text:gT.text});if(gU.type=="cut"){i.setSelections(gT.ranges,null,Y)}else{gN.prevInput="";gP.value=gT.text.join("\n");dT(gP)}}}if(gU.type=="cut"){i.state.cutIncoming=true}}b0(gP,"cut",gQ);b0(gP,"copy",gQ);b0(gO.scroller,"paste",function(gT){if(bb(gO,gT)||aR(i,gT)){return}i.state.pasteIncoming=true;gN.focus()});b0(gO.lineSpace,"selectstart",function(gT){if(!bb(gO,gT)){cL(gT)}});b0(gP,"compositionstart",function(){var gT=i.getCursor("from");if(gN.composing){gN.composing.range.clear()}gN.composing={start:gT,range:i.markText(gT,i.getCursor("to"),{className:"CodeMirror-composing"})}});b0(gP,"compositionend",function(){if(gN.composing){gN.poll();gN.composing.range.clear();gN.composing=null}})},prepareSelection:function(){var gN=this.cm,gR=gN.display,gQ=gN.doc;var i=f5(gN);if(gN.options.moveInputWithCursor){var gS=d3(gN,gQ.sel.primary().head,"div");var gO=gR.wrapper.getBoundingClientRect(),gP=gR.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(gR.wrapper.clientHeight-10,gS.top+gP.top-gO.top));i.teLeft=Math.max(0,Math.min(gR.wrapper.clientWidth-10,gS.left+gP.left-gO.left))}return i},showSelection:function(gO){var i=this.cm,gN=i.display;bV(gN.cursorDiv,gO.cursors);bV(gN.selectionDiv,gO.selection);if(gO.teTop!=null){this.wrapper.style.top=gO.teTop+"px";this.wrapper.style.left=gO.teLeft+"px"}},reset:function(gP){if(this.contextMenuPending){return}var gN,gO,i=this.cm,gR=i.doc;if(i.somethingSelected()){this.prevInput="";var gS=gR.sel.primary();gN=dh&&(gS.to().line-gS.from().line>100||(gO=i.getSelection()).length>1000);var gQ=gN?"-":gO||i.getSelection();this.textarea.value=gQ;if(i.state.focused){dT(this.textarea)}if(dS&&l>=9){this.hasSelection=gQ}}else{if(!gP){this.prevInput=this.textarea.value="";if(dS&&l>=9){this.hasSelection=null}}}this.inaccurateSelection=gN},getField:function(){return this.textarea},supportsTouch:function(){return false},focus:function(){if(this.cm.options.readOnly!="nocursor"&&(!er||dW()!=this.textarea)){try{this.textarea.focus()}catch(i){}}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},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()}})},fastPoll:function(){var gN=false,i=this;i.pollingFast=true;function gO(){var gP=i.poll();if(!gP&&!gN){gN=true;i.polling.set(60,gO)}else{i.pollingFast=false;i.slowPoll()}}i.polling.set(20,gO)},poll:function(){var gT=this;var i=this.cm,gO=this.textarea,gP=this.prevInput;if(this.contextMenuPending||!i.state.focused||(bu(gO)&&!gP&&!this.composing)||i.isReadOnly()||i.options.disableInput||i.state.keySeq){return false}var gR=gO.value;if(gR==gP&&!i.somethingSelected()){return false}if(dS&&l>=9&&this.hasSelection===gR||cb&&/[\uf700-\uf7ff]/.test(gR)){i.display.input.reset();return false}if(i.doc.sel==i.display.selForContextMenu){var gQ=gR.charCodeAt(0);if(gQ==8203&&!gP){gP="\u200b"}if(gQ==8666){this.reset();return this.cm.execCommand("undo")}}var gS=0,gN=Math.min(gP.length,gR.length);while(gS<gN&&gP.charCodeAt(gS)==gR.charCodeAt(gS)){++gS}cS(i,function(){gq(i,gR.slice(gS),gP.length-gS,null,gT.composing?"*compose":null);if(gR.length>1000||gR.indexOf("\n")>-1){gO.value=gT.prevInput=""}else{gT.prevInput=gR}if(gT.composing){gT.composing.range.clear();gT.composing.range=i.markText(gT.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"})}});return true},ensurePolled:function(){if(this.pollingFast&&this.poll()){this.pollingFast=false}},onKeyPress:function(){if(dS&&l>=9){this.hasSelection=null}this.fastPoll()},onContextMenu:function(gR){var gW=this,gX=gW.cm,gT=gX.display,gN=gW.textarea;var gV=cs(gX,gR),i=gT.scroller.scrollTop;if(!gV||ec){return}var gQ=gX.options.resetSelectionOnContextMenu;if(gQ&&gX.doc.sel.contains(gV)==-1){c7(gX,bX)(gX.doc,e8(gV),Y)}var gS=gN.style.cssText,g0=gW.wrapper.style.cssText;gW.wrapper.style.cssText="position: absolute";var gZ=gW.wrapper.getBoundingClientRect();gN.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(gR.clientY-gZ.top-5)+"px; left: "+(gR.clientX-gZ.left-5)+"px;\n z-index: 1000; background: "+(dS?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var gY;if(c6){gY=window.scrollY}gT.input.focus();if(c6){window.scrollTo(null,gY)}gT.input.reset();if(!gX.somethingSelected()){gN.value=gW.prevInput=" "}gW.contextMenuPending=true;gT.selForContextMenu=gX.doc.sel;clearTimeout(gT.detectingSelectAll);function gP(){if(gN.selectionStart!=null){var g1=gX.somethingSelected();var g2="\u200b"+(g1?gN.value:"");gN.value="\u21da";gN.value=g2;gW.prevInput=g1?"":"\u200b";gN.selectionStart=1;gN.selectionEnd=g2.length;gT.selForContextMenu=gX.doc.sel}}function gU(){gW.contextMenuPending=false;gW.wrapper.style.cssText=g0;gN.style.cssText=gS;if(dS&&l<9){gT.scrollbars.setScrollTop(gT.scroller.scrollTop=i)}if(gN.selectionStart!=null){if(!dS||(dS&&l<9)){gP()}var g1=0,g2=function(){if(gT.selForContextMenu==gX.doc.sel&&gN.selectionStart==0&&gN.selectionEnd>0&&gW.prevInput=="\u200b"){c7(gX,ak)(gX)}else{if(g1++<10){gT.detectingSelectAll=setTimeout(g2,500)}else{gT.input.reset()}}};gT.detectingSelectAll=setTimeout(g2,200)}}if(dS&&l>=9){gP()}if(gC){eD(gR);var gO=function(){eq(window,"mouseup",gO);setTimeout(gU,20)};b0(window,"mouseup",gO)}else{setTimeout(gU,50)}},readOnlyChanged:function(i){if(!i){this.reset()}},setUneditable:gm,needsContentAttribute:false},W.prototype);function f3(gT,gU){gU=gU?aN(gU):{};gU.value=gT.value;if(!gU.tabindex&&gT.tabIndex){gU.tabindex=gT.tabIndex}if(!gU.placeholder&&gT.placeholder){gU.placeholder=gT.placeholder}if(gU.autofocus==null){var i=dW();gU.autofocus=i==gT||gT.getAttribute("autofocus")!=null&&i==document.body}function gQ(){gT.value=gS.getValue()}var gR;if(gT.form){b0(gT.form,"submit",gQ);if(!gU.leaveSubmitMethodAlone){var gN=gT.form;gR=gN.submit;try{var gP=gN.submit=function(){gQ();gN.submit=gR;gN.submit();gN.submit=gP}}catch(gO){}}}gU.finishInit=function(gV){gV.save=gQ;gV.getTextArea=function(){return gT};gV.toTextArea=function(){gV.toTextArea=isNaN;gQ();gT.parentNode.removeChild(gV.getWrapperElement());gT.style.display="";if(gT.form){eq(gT.form,"submit",gQ);if(typeof gT.form.submit=="function"){gT.form.submit=gR}}}};gT.style.display="none";var gS=fn(function(gV){return gT.parentNode.insertBefore(gV,gT.nextSibling)},gU);return gS}function f8(i){i.off=eq;i.on=b0;i.wheelEventPixels=az;i.Doc=at;i.splitLines=gh;i.countColumn=bU;i.findColumn=eC;i.isWordChar=fZ;i.Pass=cg;i.signal=aE;i.Line=gy;i.changeEnd=c3;i.scrollbarModel=bn;i.Pos=V;i.cmpPos=ck;i.modes=dA;i.mimeModes=aS;i.resolveMode=gE;i.getMode=fV;i.modeExtensions=dx;i.extendMode=eS;i.copyState=b7;i.startState=b4;i.innerMode=gA;i.commands=eR;i.keyMap=fu;i.keyName=fK;i.isModifierKey=eO;i.lookupKey=j;i.normalizeKeyMap=cM;i.StringStream=fb;i.SharedTextMarker=x;i.TextMarker=P;i.LineWidget=dJ;i.e_preventDefault=cL;i.e_stopPropagation=dy;i.e_stop=eD;i.addClass=fW;i.contains=gD;i.rmClass=h;i.keyNames=fA}eW(fn);dX(fn);var d="iter insert remove copy getEditor constructor".split(" ");for(var bN in at.prototype){if(at.prototype.hasOwnProperty(bN)&&dr(d,bN)<0){fn.prototype[bN]=(function(i){return function(){return i.apply(this.doc,arguments)}})(at.prototype[bN])}}bC(at);fn.inputStyles={textarea:W,contenteditable:dC};fn.defineMode=function(i){if(!fn.defaults.mode&&i!="null"){fn.defaults.mode=i}eG.apply(this,arguments)};fn.defineMIME=bo;fn.defineMode("null",function(){return({token:function(i){return i.skipToEnd()}})});fn.defineMIME("text/plain","null");fn.defineExtension=function(i,gN){fn.prototype[i]=gN};fn.defineDocExtension=function(i,gN){at.prototype[i]=gN};fn.fromTextArea=f3;f8(fn);fn.version="5.21.0";return fn})));
|
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.length;++o)i.appendChild(t[o]);return i}function i(e,t,r,i){var o=n(e,t,r,i);return o.setAttribute("role","presentation"),o}function o(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function l(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function s(t,r){var n=t.className;e(r).test(n)||(t.className+=(n?" ":"")+r)}function a(t,r){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!e(n[i]).test(r)&&(r+=" "+n[i]);return r}function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function f(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}function h(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function d(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=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.length;n++)r[n]=t(e[n],n);return r}function m(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function y(){}function b(e,t){var r;return Object.create?r=Object.create(e):(y.prototype=e,r=new y),t&&c(t,r),r}function w(e){return/\w/.test(e)||e>""&&(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:t<e.length)&&S(e.charAt(t));)t+=r;return t}function k(e,t,r){for(var n=t>r?-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<o){r=i;break}t-=o}return r.lines[t]}function N(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function O(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function A(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function W(e){if(null==e.parent)return null;for(var t=e.parent,r=h(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function D(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l],a=s.height;if(t<a)break;t-=a}return r+l}function H(e,t){return t>=e.first&&t<e.first+e.size}function F(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function P(e,t,r){if(void 0===r&&(r=null),!(this instanceof P))return new P(e,t,r);this.line=e,this.ch=t,this.sticky=r}function E(e,t){return e.line-t.line||e.ch-t.ch}function z(e,t){return e.sticky==t.sticky&&0==E(e,t)}function I(e){return P(e.line,e.ch)}function R(e,t){return E(e,t)<0?t:e}function B(e,t){return E(e,t)<0?e:t}function G(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function U(e,t){if(t.line<e.first)return P(e.first,0);var r=e.first+e.size-1;return t.line>r?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.length;n++)r[n]=U(e,t[n]);return r}function j(){$l=!0}function X(){ql=!0}function Y(e,t,r){this.marker=e,this.from=t,this.to=r}function _(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function $(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function q(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Z(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=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<e.length;++i){var o=e[i],l=o.marker,s=null==o.to||(l.inclusiveRight?o.to>=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.from<t);(n||(n=[])).push(new Y(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return n}function J(e,t){if(t.full)return null;var r=H(e,t.from.line)&&M(e,t.from.line).markedSpans,n=H(e,t.to.line)&&M(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==E(t.from,t.to),s=Z(r,i,l),a=Q(n,o,l),u=1==t.text.length,c=g(t.text).length+(u?i:0);if(s)for(var f=0;f<s.length;++f){var h=s[f];if(null==h.to){var d=_(a,h.marker);d?u&&(h.to=null==d.to?null:d.to+c):h.to=i}}if(a)for(var p=0;p<a.length;++p){var v=a[p];if(null!=v.to&&(v.to+=c),null==v.from){var m=_(s,v.marker);m||(v.from=c,u&&(s||(s=[])).push(v))}else v.from+=c,u&&(s||(s=[])).push(v)}s&&(s=ee(s)),a&&a!=s&&(a=ee(a));var y=[s];if(!u){var b,w=t.text.length-2;if(w>0&&s)for(var x=0;x<s.length;++x)null==s[x].to&&(b||(b=[])).push(new Y(s[x].marker,null,null));for(var C=0;C<w;++C)y.push(b);y.push(a)}return y}function ee(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function te(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=h(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(E(u.to,s.from)<0||E(u.from,s.to)>0)){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<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function ne(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function ie(e){return e.inclusiveLeft?-1:0}function oe(e){return e.inclusiveRight?1:0}function le(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=E(n.from,i.from)||ie(e)-ie(t);if(o)return-o;var l=E(n.to,i.to)||oe(e)-oe(t);return l||t.id-e.id}function se(e,t){var r,n=ql&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||le(r,i.marker)<0)&&(r=i.marker);return r}function ae(e){return se(e,!0)}function ue(e){return se(e,!1)}function ce(e,t,r,n,i){var o=M(e,t),l=ql&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=E(u.from,r)||ie(a.marker)-ie(i),f=E(u.to,n)||oe(a.marker)-oe(i);if(!(c>=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;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&me(e,t,n))return!0}}function me(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return me(e,n.line,_(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&me(e,t,i))return!0}function ye(e){e=fe(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function be(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=ae(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ue(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function we(e){var t=e.display,r=e.doc;t.maxLine=M(r,r.first),t.maxLineLength=be(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=be(e);r>t.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;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||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;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)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;i<r.length;++i)r[i].apply(null,n)}function Me(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Te(e,r||t.type,e,t),He(t)||t.codemirrorIgnore}function Ne(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==h(r,t[n])&&r.push(t[n])}function Oe(e,t){return Le(e,t).length>0}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;s<e.state.overlays.length;++s)!function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,rt(e,t.text,s.mode,r,function(e,t){for(var r=a;u<e;){var n=i[a];n>e&&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(;r<a;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=l,r.baseTokens=null,r.baseTokenPos=1}(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function $e(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=qe(e,W(t)),i=t.text.length>e.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&&n<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Ze(e,t,r,n){var i=e.doc.mode,o=new us(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Qe(i,r.state);!o.eol();)Je(i,o,r.state),o.start=o.pos}function Qe(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Xe(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Je(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Xe(e,r).mode);var o=e.token(t,r);if(t.pos>t.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.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Je(l,c,u.state),n&&s.push(new hs(c,i,je(o.mode,u.state)));return n?s:new hs(c,i,u.state)}function tt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function rt(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,f=new us(t,e.options.tabSize,n),h=e.options.addModeClass&&[null];for(""==t&&tt(Qe(r,n.state),o);!f.eol();){if(f.pos>e.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(;u<f.start;)u=Math.min(f.start,u+5e3),i(u,c);c=a}f.start=f.pos}for(;u<f.pos;){var p=Math.min(f.pos,u+5e3);i(p,c),u=p}}function nt(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--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.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=M(e,n).stateAfter;if(i&&(!(i instanceof cs)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}function ot(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),re(e),ne(e,r);var i=n?n(e):1;i!=e.height&&A(e,i)}function lt(e){e.parent=null,re(e)}function st(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?vs:gs;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function at(e,t){var r=i("span",null,null,bl?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(ml||bl)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var l=o?t.rest[o-1]:t.line,s=void 0;n.pos=0,n.addToken=ct,Ie(e.display.measure)&&(s=Se(l,e.doc.direction))&&(n.addToken=ht(n.addToken,s)),n.map=[];pt(l,n,$e(e,l,t!=e.display.externalMeasured&&W(l))),l.styleClasses&&(l.styleClasses.bgClass&&(n.bgClass=a(l.styleClasses.bgClass,n.bgClass||"")),l.styleClasses.textClass&&(n.textClass=a(l.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(ze(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(bl){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Te(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=a(n.pre.className,n.textClass||"")),n}function ut(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ct(e,t,r,i,o,l,s){if(t){var a,u=e.splitSpaces?ft(t,e.trailingSpace):t,c=e.cm.state.specialChars,f=!1;if(c.test(t)){a=document.createDocumentFragment();for(var h=0;;){c.lastIndex=h;var d=c.exec(t),g=d?d.index-h:t.length-h;if(g){var v=document.createTextNode(u.slice(h,h+g));ml&&yl<9?a.appendChild(n("span",[v])):a.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!d)break;h+=g+1;var m=void 0;if("\t"==d[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=a.appendChild(n("span",p(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==d[0]||"\n"==d[0]?(m=a.appendChild(n("span","\r"==d[0]?"␍":"","cm-invalidchar")),m.setAttribute("cm-text",d[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(d[0]),m.setAttribute("cm-text",d[0]),ml&&yl<9?a.appendChild(n("span",[m])):a.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,a=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,a),ml&&yl<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||i||o||f||s){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[a],w,s);return l&&(x.title=l),e.content.appendChild(x)}e.content.appendChild(a)}}function ft(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function ht(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var f=void 0,h=0;h<t.length&&(f=t[h],!(f.to>u&&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;w<n.length;++w){var x=n[w],C=x.marker;"bookmark"==C.type&&x.from==p&&C.widgetNode?y.push(C):x.from<=p&&(null==x.to||x.to>p||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<b.length;S+=2)b[S+1]==m&&(u+=" "+b[S]);if(!h||h.from==p)for(var L=0;L<y.length;++L)dt(t,0,y[L]);if(h&&(h.from||0)==p){if(dt(t,(null==h.to?d+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=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;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),st(r[N+1],t.cm.options))}function gt(e,t,r){this.line=t,this.rest=de(t),this.size=this.rest?W(g(this.rest))-r+1:1,this.node=this.text=null,this.hidden=ve(e,t)}function vt(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new gt(e.doc,M(e.doc,o),o);n=o+l.size,i.push(l)}return i}function mt(e){ms?ms.ops.push(e):e.ownsGroup=ms={ops:[e],delayedCallbacks:[]}}function yt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function bt(e,t){var r=e.ownsGroup;if(r)try{yt(r)}finally{ms=null,t(r)}}function wt(e,t){var r=Le(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);ms?n=ms.delayedCallbacks:ys?n=ys:(n=ys=[],setTimeout(xt,0));for(var o=0;o<r.length;++o)!function(e){n.push(function(){return r[e].apply(null,i)})}(o)}}function xt(){var e=ys;ys=null;for(var t=0;t<e.length;++t)e[t]()}function Ct(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Tt(e,t):"gutter"==o?Nt(e,t,r,n):"class"==o?Mt(e,t):"widget"==o&&Ot(e,t,n)}t.changes=null}function St(e){return e.node==e.text&&(e.node=n("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),ml&&yl<8&&(e.node.style.zIndex=2)),e.node}function Lt(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var i=St(t);t.background=i.insertBefore(n("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}function kt(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):at(e,t)}function Tt(e,t){var r=t.text.className,n=kt(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Mt(e,t)):r&&(t.text.className=r)}function Mt(e,t){Lt(e,t),t.line.wrapClass?St(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Nt(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=St(t);t.gutterBackground=n("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var l=t.line.gutterMarkers;if(e.options.lineNumbers||l){var s=St(t),a=t.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),s.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||l&&l["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(n("div",F(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),l)for(var u=0;u<e.options.gutters.length;++u){var c=e.options.gutters[u],f=l.hasOwnProperty(c)&&l[c];f&&a.appendChild(n("div",[f],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function Ot(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);Wt(e,t,r)}function At(e,t,r,n){var i=kt(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Mt(e,t),Nt(e,t,r,n),Wt(e,t,n),t.node}function Wt(e,t,r){if(Dt(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Dt(e,t.rest[n],t,r,!1)}function Dt(e,t,r,i,o){if(t.widgets)for(var l=St(r),s=0,a=t.widgets;s<a.length;++s){var u=a[s],c=n("div",[u.node],"CodeMirror-linewidget");u.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ht(u,c,r,i),e.display.input.setUneditable(c),o&&u.above?l.insertBefore(c,r.gutter||r.text):l.appendChild(c),wt(u,"redraw")}}function Ht(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Ft(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!o(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),r(t.display.measure,n("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Pt(e,t){for(var r=Pe(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Et(e){return e.lineSpace.offsetTop}function zt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function It(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=r(e.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function Rt(e){return Gl-e.display.nativeBarWidth}function Bt(e){return e.display.scroller.clientWidth-Rt(e)-e.display.barWidth}function Gt(e){return e.display.scroller.clientHeight-Rt(e)-e.display.barHeight}function Ut(e,t,r){var n=e.options.lineWrapping,i=n&&Bt(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&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;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(W(e.rest[i])>r)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<e.display.viewTo)return e.display.view[kr(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Yt(e,t){var r=W(t),n=Xt(e,r);n&&!n.text?n=null:n&&n.changes&&(Ct(e,n,r,wr(e)),e.curOp.forceUpdate=!0),n||(n=Kt(e,t));var i=Vt(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function _t(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ut(e,t.view,t.rect),t.hasHeights=!0),o=Zt(e,t,r,n),o.bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function $t(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?(i=t-s,o=i+1):(u==e.length-3||t==a&&e[u+3]>t)&&(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<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function qt(e,t){var r=bs;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=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);
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
CodeMirror.defineMode("bbcode",function(b){var e,a,g;e={bbCodeTags:"b i u s img quote code list table tr td size color url",bbCodeUnaryTags:"* :-) hr cut"};if(b.hasOwnProperty("bbCodeTags")){e.bbCodeTags=b.bbCodeTags}if(b.hasOwnProperty("bbCodeUnaryTags")){e.bbCodeUnaryTags=b.bbCodeUnaryTags}var f={cont:function(i,h){g=h;return i},escapeRegEx:function(h){return h.replace(/([\:\-\)\(\*\+\?\[\]])/g,"\\$1")}};var d={validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/,tags:new RegExp("(?:"+f.escapeRegEx(e.bbCodeTags).split(" ").join("|")+")"),unaryTags:new RegExp("(?:"+f.escapeRegEx(e.bbCodeUnaryTags).split(" ").join("|")+")")};var c={tokenizer:function(i,h){if(i.eatSpace()){return null}if(i.match("[",true)){h.tokenize=c.bbcode;return f.cont("tag","startTag")}i.next();return null},inAttribute:function(h){return function(k,i){var l=null;var j=null;while(!k.eol()){j=k.peek();if(k.next()==h&&l!=="\\"){i.tokenize=c.bbcode;break}l=j}return"string"}},bbcode:function(k,i){if(a=k.match("]",true)){i.tokenize=c.tokenizer;return f.cont("tag",null)}if(k.match("[",true)){return f.cont("tag","startTag")}var h=k.next();if(d.stringChar.test(h)){i.tokenize=c.inAttribute(h);return f.cont("string","string")}else{if(/\d/.test(h)){k.eatWhile(/\d/);return f.cont("number","number")}else{if(i.last=="whitespace"){k.eatWhile(d.validIdentifier);return f.cont("attribute","modifier")}if(i.last=="property"){k.eatWhile(d.validIdentifier);return f.cont("property",null)}else{if(/\s/.test(h)){g="whitespace";return null}}var j="";if(h!="/"){j+=h}var l=null;while(l=k.eat(d.validIdentifier)){j+=l}if(d.unaryTags.test(j)){return f.cont("atom","atom")}if(d.tags.test(j)){return f.cont("keyword","keyword")}if(/\s/.test(h)){return null}return f.cont("tag","tag")}}}};return{startState:function(){return{tokenize:c.tokenizer,mode:"bbcode",last:null}},token:function(j,i){var h=i.tokenize(j,i);i.last=g;return h},electricChars:""}});CodeMirror.defineMIME("text/x-bbcode","bbcode");
|
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&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",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<arguments.length;aS++){H.cc.push(arguments[aS])}return am(aL(aR,aT),aB(aU,aR),h)}function B(aR){if(aR=="}"){return am()}return ah(aN,B)}function Z(aR,aS){if(g){if(aR==":"){return am(j)}if(aS=="?"){return am(Z)}}}function j(aR,aS){if(aR=="variable"||aS=="void"){if(aS=="keyof"){H.marked="keyword";return am(j)}else{H.marked="type";return am(K)}}if(aR=="string"||aR=="number"||aR=="atom"){return am(K)}if(aR=="["){return am(aL("]"),aB(j,"]",","),h,K)}if(aR=="{"){return am(aL("}"),aB(au,"}",",;"),h,K)}if(aR=="("){return am(aB(aj,")"),W)}}function W(aR){if(aR=="=>"){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<A.length;++y){z[A[y].toLowerCase()]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var 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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var c=["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"],m=g(c);var j=["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"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,lineComment:"//",tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/,false)){return[null,null]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,lineComment:"//",tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function f(n,j,k){var m=n.current(),l=m.search(j);if(l>-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?"^":"")+"</s*"+k+"s*>","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<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=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");
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js
CHANGED
@@ -1 +1,2 @@
|
|
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&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",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){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(af,ap){var m=af.indentUnit;var C=ap.statementIndent;var aG=ap.jsonld;var B=ap.json||aG;var g=ap.typescript;var aB=ap.wordCharacters||/[\w$\xa1-\uffff]/;var az=function(){function aX(aZ){return{type:aZ,style:"keyword"}}var aS=aX("keyword a"),aQ=aX("keyword b"),aP=aX("keyword c");var aR=aX("operator"),aV={type:"atom",style:"atom"};var aT={"if":aX("if"),"while":aS,"with":aS,"else":aQ,"do":aQ,"try":aQ,"finally":aQ,"return":aP,"break":aP,"continue":aP,"new":aX("new"),"delete":aP,"throw":aP,"debugger":aP,"var":aX("var"),"const":aX("var"),let:aX("var"),"function":aX("function"),"catch":aX("catch"),"for":aX("for"),"switch":aX("switch"),"case":aX("case"),"default":aX("default"),"in":aR,"typeof":aR,"instanceof":aR,"true":aV,"false":aV,"null":aV,"undefined":aV,"NaN":aV,"Infinity":aV,"this":aX("this"),"class":aX("class"),"super":aX("atom"),yield:aP,"export":aX("export"),"import":aX("import"),"extends":aP,await:aP,async:aX("async")};if(g){var aY={type:"variable",style:"variable-3"};var aU={"interface":aX("class"),"implements":aP,namespace:aP,module:aX("module"),"enum":aX("module"),type:aX("type"),"public":aX("modifier"),"private":aX("modifier"),"protected":aX("modifier"),"abstract":aX("modifier"),as:aR,string:aY,number:aY,"boolean":aY,any:aY};for(var aW in aU){aT[aW]=aU[aW]}}return aT}();var T=/[+\-*&%=<>!?|~^]/;var ay=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aS){var aQ=false,aP,aR=false;while((aP=aS.next())!=null){if(!aQ){if(aP=="/"&&!aR){return}if(aP=="["){aR=true}else{if(aR&&aP=="]"){aR=false}}}aQ=!aQ&&aP=="\\"}}var X,I;function P(aR,aQ,aP){X=aR;I=aP;return aQ}function Z(aT,aR){var aP=aT.next();if(aP=='"'||aP=="'"){aR.tokenize=W(aP);return aR.tokenize(aT,aR)}else{if(aP=="."&&aT.match(/^\d+(?:[eE][+\-]?\d+)?/)){return P("number","number")}else{if(aP=="."&&aT.match("..")){return P("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aP)){return P(aP)}else{if(aP=="="&&aT.eat(">")){return P("=>","operator")}else{if(aP=="0"&&aT.eat(/x/i)){aT.eatWhile(/[\da-f]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/o/i)){aT.eatWhile(/[0-7]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/b/i)){aT.eatWhile(/[01]/i);return P("number","number")}else{if(/\d/.test(aP)){aT.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return P("number","number")}else{if(aP=="/"){if(aT.eat("*")){aR.tokenize=aF;return aF(aT,aR)}else{if(aT.eat("/")){aT.skipToEnd();return P("comment","comment")}else{if(b(aT,aR,1)){H(aT);aT.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return P("regexp","string-2")}else{aT.eatWhile(T);return P("operator","operator",aT.current())}}}}else{if(aP=="`"){aR.tokenize=aH;return aH(aT,aR)}else{if(aP=="#"){aT.skipToEnd();return P("error","error")}else{if(T.test(aP)){aT.eatWhile(T);return P("operator","operator",aT.current())}else{if(aB.test(aP)){aT.eatWhile(aB);var aS=aT.current(),aQ=az.propertyIsEnumerable(aS)&&az[aS];return(aQ&&aR.lastType!=".")?P(aQ.type,aQ.style,aS):P("variable","variable",aS)}}}}}}}}}}}}}}}function W(aP){return function(aT,aR){var aS=false,aQ;if(aG&&aT.peek()=="@"&&aT.match(ay)){aR.tokenize=Z;return P("jsonld-keyword","meta")}while((aQ=aT.next())!=null){if(aQ==aP&&!aS){break}aS=!aS&&aQ=="\\"}if(!aS){aR.tokenize=Z}return P("string","string")}}function aF(aS,aR){var aP=false,aQ;while(aQ=aS.next()){if(aQ=="/"&&aP){aR.tokenize=Z;break}aP=(aQ=="*")}return P("comment","comment")}function aH(aS,aQ){var aR=false,aP;while((aP=aS.next())!=null){if(!aR&&(aP=="`"||aP=="$"&&aS.eat("{"))){aQ.tokenize=Z;break}aR=!aR&&aP=="\\"}return P("quasi","string-2",aS.current())}var n="([{}])";function aD(aX,aR){if(aR.fatArrowAt){aR.fatArrowAt=null}var aW=aX.string.indexOf("=>",aX.start);if(aW<0){return}if(g){var aT=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(aX.string.slice(aX.start,aW));if(aT){aW=aT.index}}var aU=0,aS=false;for(var aV=aW-1;aV>=0;--aV){var aP=aX.string.charAt(aV);var aQ=n.indexOf(aP);if(aQ>=0&&aQ<3){if(!aU){++aV;break}if(--aU==0){if(aP=="("){aS=true}break}}else{if(aQ>=3&&aQ<6){++aU}else{if(aB.test(aP)){aS=true}else{if(/["'\/]/.test(aP)){return}else{if(aS&&!aU){++aV;break}}}}}}if(aS&&!aU){aR.fatArrowAt=aV}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function N(aU,aQ,aP,aT,aR,aS){this.indented=aU;this.column=aQ;this.type=aP;this.prev=aR;this.info=aS;if(aT!=null){this.align=aT}}function u(aS,aR){for(var aQ=aS.localVars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}for(var aP=aS.context;aP;aP=aP.prev){for(var aQ=aP.vars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}}}function f(aT,aQ,aP,aS,aU){var aV=aT.cc;G.state=aT;G.stream=aU;G.marked=null,G.cc=aV;G.style=aQ;if(!aT.lexical.hasOwnProperty("align")){aT.lexical.align=true}while(true){var aR=aV.length?aV.pop():B?au:aM;if(aR(aP,aS)){while(aV.length&&aV[aV.length-1].lex){aV.pop()()}if(G.marked){return G.marked}if(aP=="variable"&&u(aT,aS)){return"variable-2"}return aQ}}}var G={state:null,column:null,marked:null,cc:null};function ag(){for(var aP=arguments.length-1;aP>=0;aP--){G.cc.push(arguments[aP])}}function al(){ag.apply(null,arguments);return true}function aC(aQ){function aP(aT){for(var aS=aT;aS;aS=aS.next){if(aS.name==aQ){return true}}return false}var aR=G.state;G.marked="def";if(aR.context){if(aP(aR.localVars)){return}aR.localVars={name:aQ,next:aR.localVars}}else{if(aP(aR.globalVars)){return}if(ap.globalVars){aR.globalVars={name:aQ,next:aR.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){G.state.context={prev:G.state.context,vars:G.state.localVars};G.state.localVars=s}function z(){G.state.localVars=G.state.context.vars;G.state.context=G.state.context.prev}function aK(aQ,aR){var aP=function(){var aU=G.state,aS=aU.indented;if(aU.lexical.type=="stat"){aS=aU.lexical.indented}else{for(var aT=aU.lexical;aT&&aT.type==")"&&aT.align;aT=aT.prev){aS=aT.indented}}aU.lexical=new N(aS,G.stream.column(),aQ,null,aU.lexical,aR)};aP.lex=true;return aP}function h(){var aP=G.state;if(aP.lexical.prev){if(aP.lexical.type==")"){aP.indented=aP.lexical.indented}aP.lexical=aP.lexical.prev}}h.lex=true;function t(aP){function aQ(aR){if(aR==aP){return al()}else{if(aP==";"){return ag()}else{return al(aQ)}}}return aQ}function aM(aP,aQ){if(aP=="var"){return al(aK("vardef",aQ.length),d,t(";"),h)}if(aP=="keyword a"){return al(aK("form"),av,aM,h)}if(aP=="keyword b"){return al(aK("form"),aM,h)}if(aP=="{"){return al(aK("}"),A,h)}if(aP==";"){return al()}if(aP=="if"){if(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==h){G.state.cc.pop()()}return al(aK("form"),av,aM,h,e)}if(aP=="function"){return al(Q)}if(aP=="for"){return al(aK("form"),w,aM,h)}if(aP=="variable"){return al(aK("stat"),aN)}if(aP=="switch"){return al(aK("form"),av,aK("}","switch"),t("{"),A,h,h)}if(aP=="case"){return al(au,t(":"))}if(aP=="default"){return al(t(":"))}if(aP=="catch"){return al(aK("form"),y,t("("),ak,t(")"),aM,h,z)}if(aP=="class"){return al(aK("form"),ab,h)}if(aP=="export"){return al(aK("stat"),aL,h)}if(aP=="import"){return al(aK("stat"),am,h)}if(aP=="module"){return al(aK("form"),i,aK("}"),t("{"),A,h,h)}if(aP=="type"){return al(j,t("operator"),j,t(";"))}if(aP=="async"){return al(aM)}return ag(aK("stat"),au,t(";"),h)}function au(aP){return ae(aP,false)}function aJ(aP){return ae(aP,true)}function av(aP){if(aP!="("){return ag()}return al(aK(")"),au,t(")"),h)}function ae(aQ,aS){if(G.state.fatArrowAt==G.stream.start){var aP=aS?R:ac;if(aQ=="("){return al(y,aK(")"),aA(i,")"),h,t("=>"),aP,z)}else{if(aQ=="variable"){return ag(y,i,t("=>"),aP,z)}}}var aR=aS?k:ah;if(c.hasOwnProperty(aQ)){return al(aR)}if(aQ=="function"){return al(Q,aR)}if(aQ=="class"){return al(aK("form"),L,h)}if(aQ=="keyword c"||aQ=="async"){return al(aS?aq:ao)}if(aQ=="("){return al(aK(")"),ao,t(")"),h,aR)}if(aQ=="operator"||aQ=="spread"){return al(aS?aJ:au)}if(aQ=="["){return al(aK("]"),o,h,aR)}if(aQ=="{"){return aE(v,"}",null,aR)}if(aQ=="quasi"){return ag(U,aR)}if(aQ=="new"){return al(K(aS))}return al()}function ao(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(au)}function aq(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(aJ)}function ah(aP,aQ){if(aP==","){return al(au)}return k(aP,aQ,false)}function k(aP,aR,aT){var aQ=aT==false?ah:k;var aS=aT==false?au:aJ;if(aP=="=>"){return al(y,aT?R:ac,z)}if(aP=="operator"){if(/\+\+|--/.test(aR)){return al(aQ)}if(aR=="?"){return al(au,t(":"),aS)}return al(aS)}if(aP=="quasi"){return ag(U,aQ)}if(aP==";"){return}if(aP=="("){return aE(aJ,")","call",aQ)}if(aP=="."){return al(ar,aQ)}if(aP=="["){return al(aK("]"),ao,t("]"),h,aQ)}}function U(aP,aQ){if(aP!="quasi"){return ag()}if(aQ.slice(aQ.length-2)!="${"){return al(U)}return al(au,r)}function r(aP){if(aP=="}"){G.marked="string-2";G.state.tokenize=aH;return al(U)}}function ac(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:au)}function R(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:aJ)}function K(aP){return function(aQ){if(aQ=="."){return al(aP?p:aa)}else{return ag(aP?aJ:au)}}}function aa(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(ah)}}function p(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(k)}}function aN(aP){if(aP==":"){return al(h,aM)}return ag(ah,t(";"),h)}function ar(aP){if(aP=="variable"){G.marked="property";return al()}}function v(aP,aQ){if(aP=="async"){G.marked="property";return al(v)}else{if(aP=="variable"||G.style=="keyword"){G.marked="property";if(aQ=="get"||aQ=="set"){return al(M)}return al(O)}else{if(aP=="number"||aP=="string"){G.marked=aG?"property":(G.style+" property");return al(O)}else{if(aP=="jsonld-keyword"){return al(O)}else{if(aP=="modifier"){return al(v)}else{if(aP=="["){return al(au,t("]"),O)}else{if(aP=="spread"){return al(au)}else{if(aP==":"){return ag(O)}}}}}}}}}function M(aP){if(aP!="variable"){return ag(O)}G.marked="property";return al(Q)}function O(aP){if(aP==":"){return al(aJ)}if(aP=="("){return ag(Q)}}function aA(aR,aP){function aQ(aT,aU){if(aT==","){var aS=G.state.lexical;if(aS.info=="call"){aS.pos=(aS.pos||0)+1}return al(function(aV,aW){if(aV==aP||aW==aP){return ag()}return ag(aR)},aQ)}if(aT==aP||aU==aP){return al()}return al(t(aP))}return function(aS,aT){if(aS==aP||aT==aP){return al()}return ag(aR,aQ)}}function aE(aS,aP,aR){for(var aQ=3;aQ<arguments.length;aQ++){G.cc.push(arguments[aQ])}return al(aK(aP,aR),aA(aS,aP),h)}function A(aP){if(aP=="}"){return al()}return ag(aM,A)}function Y(aP,aQ){if(g){if(aP==":"){return al(j)}if(aQ=="?"){return al(Y)}}}function j(aP){if(aP=="variable"){G.marked="variable-3";return al(J)}if(aP=="{"){return al(aA(at,"}"))}if(aP=="("){return al(aA(ai,")"),V)}}function V(aP){if(aP=="=>"){return al(j)}}function at(aP){if(aP=="variable"||G.style=="keyword"){G.marked="property";return al(at)}else{if(aP==":"){return al(j)}}}function ai(aP){if(aP=="variable"){return al(ai)}else{if(aP==":"){return al(j)}}}function J(aP,aQ){if(aQ=="<"){return al(aA(j,">"),J)}if(aP=="["){return al(t("]"),J)}}function d(){return ag(i,Y,aj,ad)}function i(aP,aQ){if(aP=="modifier"){return al(i)}if(aP=="variable"){aC(aQ);return al()}if(aP=="spread"){return al(i)}if(aP=="["){return aE(i,"]")}if(aP=="{"){return aE(aI,"}")}}function aI(aP,aQ){if(aP=="variable"&&!G.stream.match(/^\s*:/,false)){aC(aQ);return al(aj)}if(aP=="variable"){G.marked="property"}if(aP=="spread"){return al(i)}if(aP=="}"){return ag()}return al(t(":"),i,aj)}function aj(aP,aQ){if(aQ=="="){return al(aJ)}}function ad(aP){if(aP==","){return al(d)}}function e(aP,aQ){if(aP=="keyword b"&&aQ=="else"){return al(aK("form","else"),aM,h)}}function w(aP){if(aP=="("){return al(aK(")"),F,t(")"),h)}}function F(aP){if(aP=="var"){return al(d,t(";"),E)}if(aP==";"){return al(E)}if(aP=="variable"){return al(x)}return ag(au,t(";"),E)}function x(aP,aQ){if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return al(ah,E)}function E(aP,aQ){if(aP==";"){return al(D)}if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return ag(au,t(";"),D)}function D(aP){if(aP!=")"){al(au)}}function Q(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(Q)}if(aP=="variable"){aC(aQ);return al(Q)}if(aP=="("){return al(y,aK(")"),aA(ak,")"),h,Y,aM,z)}}function ak(aP){if(aP=="spread"){return al(ak)}return ag(i,Y,aj)}function L(aP,aQ){if(aP=="variable"){return ab(aP,aQ)}return S(aP,aQ)}function ab(aP,aQ){if(aP=="variable"){aC(aQ);return al(S)}}function S(aP,aQ){if(aQ=="extends"||aQ=="implements"){return al(g?j:au,S)}if(aP=="{"){return al(aK("}"),q,h)}}function q(aP,aQ){if(aP=="variable"||G.style=="keyword"){if((aQ=="static"||aQ=="get"||aQ=="set"||(g&&(aQ=="public"||aQ=="private"||aQ=="protected"||aQ=="readonly"||aQ=="abstract")))&&G.stream.match(/^\s+[\w$\xa1-\uffff]/,false)){G.marked="keyword";return al(q)}G.marked="property";return al(g?aO:Q,q)}if(aQ=="*"){G.marked="keyword";return al(q)}if(aP==";"){return al(q)}if(aP=="}"){return al()}}function aO(aP,aQ){if(aQ=="?"){return al(aO)}if(aP==":"){return al(j,aj)}return ag(Q)}function aL(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(an,t(";"))}if(aQ=="default"){G.marked="keyword";return al(au,t(";"))}return ag(aM)}function am(aP){if(aP=="string"){return al()}return ag(ax,an)}function ax(aP,aQ){if(aP=="{"){return aE(ax,"}")}if(aP=="variable"){aC(aQ)}if(aQ=="*"){G.marked="keyword"}return al(l)}function l(aP,aQ){if(aQ=="as"){G.marked="keyword";return al(ax)}}function an(aP,aQ){if(aQ=="from"){G.marked="keyword";return al(au)}}function o(aP){if(aP=="]"){return al()}return ag(aA(aJ,"]"))}function aw(aQ,aP){return aQ.lastType=="operator"||aQ.lastType==","||T.test(aP.charAt(0))||/[,.]/.test(aP.charAt(0))}return{startState:function(aQ){var aP={tokenize:Z,lastType:"sof",cc:[],lexical:new N((aQ||0)-m,0,"block",false),localVars:ap.localVars,context:ap.localVars&&{vars:ap.localVars},indented:aQ||0};if(ap.globalVars&&typeof ap.globalVars=="object"){aP.globalVars=ap.globalVars}return aP},token:function(aR,aQ){if(aR.sol()){if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=false}aQ.indented=aR.indentation();aD(aR,aQ)}if(aQ.tokenize!=aF&&aR.eatSpace()){return null}var aP=aQ.tokenize(aR,aQ);if(X=="comment"){return aP}aQ.lastType=X=="operator"&&(I=="++"||I=="--")?"incdec":X;return f(aQ,aP,X,I,aR)},indent:function(aP,aS){if(aP.tokenize==aF){return a.Pass}if(aP.tokenize!=Z){return 0}var aW=aS&&aS.charAt(0),aX=aP.lexical,aV;if(!/^\s*else\b/.test(aS)){for(var aR=aP.cc.length-1;aR>=0;--aR){var aT=aP.cc[aR];if(aT==h){aX=aX.prev}else{if(aT!=e){break}}}}while((aX.type=="stat"||aX.type=="form")&&(aW=="}"||((aV=aP.cc[aP.cc.length-1])&&(aV==ah||aV==k)&&!/^[,\.=+\-*:?[\(]/.test(aS)))){aX=aX.prev}if(C&&aX.type==")"&&aX.prev.type=="stat"){aX=aX.prev}var aU=aX.type,aQ=aW==aU;if(aU=="vardef"){return aX.indented+(aP.lastType=="operator"||aP.lastType==","?aX.info+1:0)}else{if(aU=="form"&&aW=="{"){return aX.indented}else{if(aU=="form"){return aX.indented+m}else{if(aU=="stat"){return aX.indented+(aw(aP,aS)?C||m:0)}else{if(aX.info=="switch"&&!aQ&&ap.doubleIndentSwitch!=false){return aX.indented+(/^(?:case|default)\b/.test(aS)?m:2*m)}else{if(aX.align){return aX.column+(aQ?0:1)}else{return aX.indented+(aQ?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aG,jsonMode:B,expressionAllowed:b,skipExpression:function(aP){var aQ=aP.cc[aP.cc.length-1];if(aQ==au||aQ==aJ){aP.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(Y,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Y.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},X=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},W=J.counterDescriptors||{},O=J.colorKeywords||{},S=J.valueKeywords||{},M=J.allowNested,U=J.supportsAtComponent===true;var C,N;function Z(ac,ad){C=ad;return ac}function ab(af,ae){var ad=af.next();if(A[ad]){var ac=A[ad](af,ae);if(ac!==false){return ac}}if(ad=="@"){af.eatWhile(/[\w\\\-]/);return Z("def",af.current())}else{if(ad=="="||(ad=="~"||ad=="|")&&af.eat("=")){return Z(null,"compare")}else{if(ad=='"'||ad=="'"){ae.tokenize=K(ad);return ae.tokenize(af,ae)}else{if(ad=="#"){af.eatWhile(/[\w\\\-]/);return Z("atom","hash")}else{if(ad=="!"){af.match(/^\s*\w*/);return Z("keyword","important")}else{if(/\d/.test(ad)||ad=="."&&af.eat(/\d/)){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(ad==="-"){if(/[\d.]/.test(af.peek())){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(af.match(/^-[\w\\\-]+/)){af.eatWhile(/[\w\\\-]/);if(af.match(/^\s*:/,false)){return Z("variable-2","variable-definition")}return Z("variable-2","variable")}else{if(af.match(/^\w+-/)){return Z("meta","meta")}}}}else{if(/[,+>*\/]/.test(ad)){return Z(null,"select-op")}else{if(ad=="."&&af.match(/^-?[_a-z][_a-z0-9-]*/i)){return Z("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ad)){return Z(null,ad)}else{if((ad=="u"&&af.match(/rl(-prefix)?\(/))||(ad=="d"&&af.match("omain("))||(ad=="r"&&af.match("egexp("))){af.backUp(1);ae.tokenize=aa;return Z("property","word")}else{if(/[\w\\\-]/.test(ad)){af.eatWhile(/[\w\\\-]/);return Z("property","word")}else{return Z(null,null)}}}}}}}}}}}}}function K(ac){return function(ag,ae){var af=false,ad;while((ad=ag.next())!=null){if(ad==ac&&!af){if(ac==")"){ag.backUp(1)}break}af=!af&&ad=="\\"}if(ad==ac||!af&&ac!=")"){ae.tokenize=null}return Z("string","string")}}function aa(ad,ac){ad.next();if(!ad.match(/\s*[\"\')]/,false)){ac.tokenize=K(")")}else{ac.tokenize=null}return Z(null,"(")}function R(ad,ac,ae){this.type=ad;this.indent=ac;this.prev=ae}function G(ae,af,ad,ac){ae.context=new R(ad,af.indentation()+(ac===false?0:Q),ae.context);return ad}function T(ac){if(ac.context.prev){ac.context=ac.context.prev}return ac.context.type}function z(ac,ae,ad){return F[ad.context.type](ac,ae,ad)}function V(ad,af,ae,ag){for(var ac=ag||1;ac>0;ac--){ae.context=ae.context.prev}return z(ad,af,ae)}function H(ad){var ac=ad.current().toLowerCase();if(S.hasOwnProperty(ac)){N="atom"}else{if(O.hasOwnProperty(ac)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"block")}else{if(ac=="}"&&ad.context.prev){return T(ad)}else{if(U&&/@component/.test(ac)){return G(ad,ae,"atComponentBlock")}else{if(/^@(-moz-)?document$/.test(ac)){return G(ad,ae,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/.test(ac)){return G(ad,ae,"atBlock")}else{if(/^@(font-face|counter-style)/.test(ac)){ad.stateArg=ac;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(ac)){return"keyframes"}else{if(ac&&ac.charAt(0)=="@"){return G(ad,ae,"at")}else{if(ac=="hash"){N="builtin"}else{if(ac=="word"){N="tag"}else{if(ac=="variable-definition"){return"maybeprop"}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}else{if(ac==":"){return"pseudo"}else{if(M&&ac=="("){return G(ad,ae,"parens")}}}}}}}}}}}}}}return ad.context.type};F.block=function(ac,af,ad){if(ac=="word"){var ae=af.current().toLowerCase();if(I.hasOwnProperty(ae)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(ae)){N="string-2";return"maybeprop"}else{if(M){N=af.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ac=="meta"){return"block"}else{if(!M&&(ac=="hash"||ac=="qualifier")){N="error";return"block"}else{return F.top(ac,af,ad)}}}};F.maybeprop=function(ac,ae,ad){if(ac==":"){return G(ad,ae,"prop")}return z(ac,ae,ad)};F.prop=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"&&M){return G(ad,ae,"propBlock")}if(ac=="}"||ac=="{"){return V(ac,ae,ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(ae.current())){N+=" error"}else{if(ac=="word"){H(ae)}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}}}return"prop"};F.propBlock=function(ad,ac,ae){if(ad=="}"){return T(ae)}if(ad=="word"){N="property";return"maybeprop"}return ae.context.type};F.parens=function(ac,ae,ad){if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac==")"){return T(ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="interpolation"){return G(ad,ae,"interpolation")}if(ac=="word"){H(ae)}return"parens"};F.pseudo=function(ac,ae,ad){if(ac=="word"){N="variable-3";return ad.context.type}return z(ac,ae,ad)};F.documentTypes=function(ac,ae,ad){if(ac=="word"&&y.hasOwnProperty(ae.current())){N="tag";return ad.context.type}else{return F.atBlock(ac,ae,ad)}};F.atBlock=function(ac,af,ad){if(ac=="("){return G(ad,af,"atBlock_parens")}if(ac=="}"||ac==";"){return V(ac,af,ad)}if(ac=="{"){return T(ad)&&G(ad,af,M?"block":"top")}if(ac=="interpolation"){return G(ad,af,"interpolation")}if(ac=="word"){var ae=af.current().toLowerCase();if(ae=="only"||ae=="not"||ae=="and"||ae=="or"){N="keyword"}else{if(X.hasOwnProperty(ae)){N="attribute"}else{if(L.hasOwnProperty(ae)){N="property"}else{if(P.hasOwnProperty(ae)){N="keyword"}else{if(I.hasOwnProperty(ae)){N="property"}else{if(B.hasOwnProperty(ae)){N="string-2"}else{if(S.hasOwnProperty(ae)){N="atom"}else{if(O.hasOwnProperty(ae)){N="keyword"}else{N="error"}}}}}}}}}return ad.context.type};F.atComponentBlock=function(ac,ae,ad){if(ac=="}"){return V(ac,ae,ad)}if(ac=="{"){return T(ad)&&G(ad,ae,M?"block":"top",false)}if(ac=="word"){N="error"}return ad.context.type};F.atBlock_parens=function(ac,ae,ad){if(ac==")"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad,2)}return F.atBlock(ac,ae,ad)};F.restricted_atBlock_before=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"restricted_atBlock")}if(ac=="word"&&ad.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ac,ae,ad)};F.restricted_atBlock=function(ac,ae,ad){if(ac=="}"){ad.stateArg=null;return T(ad)}if(ac=="word"){if((ad.stateArg=="@font-face"&&!E.hasOwnProperty(ae.current().toLowerCase()))||(ad.stateArg=="@counter-style"&&!W.hasOwnProperty(ae.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ac,ae,ad){if(ac=="word"){N="variable";return"keyframes"}if(ac=="{"){return G(ad,ae,"top")}return z(ac,ae,ad)};F.at=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac=="word"){N="tag"}else{if(ac=="hash"){N="builtin"}}return"at"};F.interpolation=function(ac,ae,ad){if(ac=="}"){return T(ad)}if(ac=="{"||ac==";"){return V(ac,ae,ad)}if(ac=="word"){N="variable"}else{if(ac!="variable"&&ac!="("&&ac!=")"){N="error"}}return"interpolation"};return{startState:function(ac){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ac||0,null)}},token:function(ae,ad){if(!ad.tokenize&&ae.eatSpace()){return null}var ac=(ad.tokenize||ab)(ae,ad);if(ac&&typeof ac=="object"){C=ac[1];ac=ac[0]}N=ac;ad.state=F[ad.state](C,ae,ad);return N},indent:function(ag,ae){var ad=ag.context,af=ae&&ae.charAt(0);var ac=ad.indent;if(ad.type=="prop"&&(af=="}"||af==")")){ad=ad.prev}if(ad.prev){if(af=="}"&&(ad.type=="block"||ad.type=="top"||ad.type=="interpolation"||ad.type=="restricted_atBlock")){ad=ad.prev;ac=ad.indent}else{if(af==")"&&(ad.type=="parens"||ad.type=="atBlock_parens")||af=="{"&&(ad.type=="at"||ad.type=="atBlock")){ac=Math.max(0,ad.indent-Q);ad=ad.prev}}}return ac},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y].toLowerCase()]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var 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","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","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","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","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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var c=["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"],m=g(c);var j=["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","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","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","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","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","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","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","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","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","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"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/)){return[null,"{"]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function f(n,j,k){var m=n.current(),l=m.search(j);if(l>-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?"^":"")+"</s*"+k+"s*>","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<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=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(s,r){if(!s.localMode||/^\s*<\//.test(r)){return q.indent(s.htmlState,r)}else{if(s.localMode.indent){return s.localMode.indent(s.localState,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")});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("htmlembedded",function(b,c){return a.multiplexingMode(a.getMode(b,"htmlmixed"),{open:c.open||c.scriptStartRegex||"<%",close:c.close||c.scriptEndRegex||"%>",mode:a.getMode(b,c.scriptingModeSpec)})},"htmlmixed");a.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"});a.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"});a.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"});a.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})});
|
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&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;o;){if(o.tagName==l[2]){o=o.prev;break}if(!z.implicitlyClosed.hasOwnProperty(o.tagName))break;o=o.prev}else if(l)for(;o;){var s=z.contextGrabbers[o.tagName];if(!s||!s.hasOwnProperty(l[2]))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+x:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,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<arguments.length;n++)Ve.cc.push(arguments[n]);return f(y(t,r),_(e,t),v)}function F(e){return"}"==e?f():m(w,F)}function D(e,t){if(Pe){if(":"==e)return f(U);if("?"==t)return f(D)}}function U(e,t){return"variable"==e||"void"==t?"keyof"==t?(Ve.marked="keyword",f(U)):(Ve.marked="type",f(R)):"string"==e||"number"==e||"atom"==e?f(R):"["==e?f(y("]"),_(U,"]",","),v,R):"{"==e?f(y("}"),_(G,"}",",;"),v,R):"("==e?f(_(Y,")"),H):void 0}function H(e){if("=>"==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<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return f=t,e}function o(e,t){var r=e.next();if(b[r]){var o=b[r](e,t);if(!1!==o)return o}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=i(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==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?"^":"")+"</s*"+e+"s*>","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<e.length;r++){var o=e[r];if(!o[0]||o[1].test(n(t,o[0])))return o[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,i){var l,u=c.token(n,i.htmlState),p=/\btag\b/.test(u);if(p&&!/[<>\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<n.length;++u){var p=n[u],s=r(l,p.open,o.pos);if(s==o.pos)return p.parseDelimiters||o.match(p.open),i.innerActive=p,i.inner=e.startState(p.mode,t.indent?t.indent(i.outer,""):0),p.delimStyle&&p.delimStyle+" "+p.delimStyle+"-open";-1!=s&&s<d&&(d=s)}d!=1/0&&(o.string=l.slice(0,d));var m=t.token(o,i.outer);return d!=1/0&&(o.string=l),m},indent:function(r,n){var o=r.innerActive?r.innerActive.mode:t;return o.indent?o.indent(r.innerActive?r.inner:r.outer,n):e.Pass},blankLine:function(r){var o=r.innerActive?r.innerActive.mode:t;if(o.blankLine&&o.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var i=0;i<n.length;++i){var a=n[i];"\n"===a.open&&(r.innerActive=a,r.inner=e.startState(a.mode,o.indent?o.indent(r.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("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define("mode/htmlembedded/htmlembedded.js",["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("htmlembedded",function(t,r){return e.multiplexingMode(e.getMode(t,"htmlmixed"),{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(){})}();
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js
CHANGED
@@ -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){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(af,ap){var m=af.indentUnit;var C=ap.statementIndent;var aG=ap.jsonld;var B=ap.json||aG;var g=ap.typescript;var aB=ap.wordCharacters||/[\w$\xa1-\uffff]/;var az=function(){function aX(aZ){return{type:aZ,style:"keyword"}}var aS=aX("keyword a"),aQ=aX("keyword b"),aP=aX("keyword c");var aR=aX("operator"),aV={type:"atom",style:"atom"};var aT={"if":aX("if"),"while":aS,"with":aS,"else":aQ,"do":aQ,"try":aQ,"finally":aQ,"return":aP,"break":aP,"continue":aP,"new":aX("new"),"delete":aP,"throw":aP,"debugger":aP,"var":aX("var"),"const":aX("var"),let:aX("var"),"function":aX("function"),"catch":aX("catch"),"for":aX("for"),"switch":aX("switch"),"case":aX("case"),"default":aX("default"),"in":aR,"typeof":aR,"instanceof":aR,"true":aV,"false":aV,"null":aV,"undefined":aV,"NaN":aV,"Infinity":aV,"this":aX("this"),"class":aX("class"),"super":aX("atom"),yield:aP,"export":aX("export"),"import":aX("import"),"extends":aP,await:aP,async:aX("async")};if(g){var aY={type:"variable",style:"variable-3"};var aU={"interface":aX("class"),"implements":aP,namespace:aP,module:aX("module"),"enum":aX("module"),type:aX("type"),"public":aX("modifier"),"private":aX("modifier"),"protected":aX("modifier"),"abstract":aX("modifier"),as:aR,string:aY,number:aY,"boolean":aY,any:aY};for(var aW in aU){aT[aW]=aU[aW]}}return aT}();var T=/[+\-*&%=<>!?|~^]/;var ay=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aS){var aQ=false,aP,aR=false;while((aP=aS.next())!=null){if(!aQ){if(aP=="/"&&!aR){return}if(aP=="["){aR=true}else{if(aR&&aP=="]"){aR=false}}}aQ=!aQ&&aP=="\\"}}var X,I;function P(aR,aQ,aP){X=aR;I=aP;return aQ}function Z(aT,aR){var aP=aT.next();if(aP=='"'||aP=="'"){aR.tokenize=W(aP);return aR.tokenize(aT,aR)}else{if(aP=="."&&aT.match(/^\d+(?:[eE][+\-]?\d+)?/)){return P("number","number")}else{if(aP=="."&&aT.match("..")){return P("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aP)){return P(aP)}else{if(aP=="="&&aT.eat(">")){return P("=>","operator")}else{if(aP=="0"&&aT.eat(/x/i)){aT.eatWhile(/[\da-f]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/o/i)){aT.eatWhile(/[0-7]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/b/i)){aT.eatWhile(/[01]/i);return P("number","number")}else{if(/\d/.test(aP)){aT.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return P("number","number")}else{if(aP=="/"){if(aT.eat("*")){aR.tokenize=aF;return aF(aT,aR)}else{if(aT.eat("/")){aT.skipToEnd();return P("comment","comment")}else{if(b(aT,aR,1)){H(aT);aT.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return P("regexp","string-2")}else{aT.eatWhile(T);return P("operator","operator",aT.current())}}}}else{if(aP=="`"){aR.tokenize=aH;return aH(aT,aR)}else{if(aP=="#"){aT.skipToEnd();return P("error","error")}else{if(T.test(aP)){aT.eatWhile(T);return P("operator","operator",aT.current())}else{if(aB.test(aP)){aT.eatWhile(aB);var aS=aT.current(),aQ=az.propertyIsEnumerable(aS)&&az[aS];return(aQ&&aR.lastType!=".")?P(aQ.type,aQ.style,aS):P("variable","variable",aS)}}}}}}}}}}}}}}}function W(aP){return function(aT,aR){var aS=false,aQ;if(aG&&aT.peek()=="@"&&aT.match(ay)){aR.tokenize=Z;return P("jsonld-keyword","meta")}while((aQ=aT.next())!=null){if(aQ==aP&&!aS){break}aS=!aS&&aQ=="\\"}if(!aS){aR.tokenize=Z}return P("string","string")}}function aF(aS,aR){var aP=false,aQ;while(aQ=aS.next()){if(aQ=="/"&&aP){aR.tokenize=Z;break}aP=(aQ=="*")}return P("comment","comment")}function aH(aS,aQ){var aR=false,aP;while((aP=aS.next())!=null){if(!aR&&(aP=="`"||aP=="$"&&aS.eat("{"))){aQ.tokenize=Z;break}aR=!aR&&aP=="\\"}return P("quasi","string-2",aS.current())}var n="([{}])";function aD(aX,aR){if(aR.fatArrowAt){aR.fatArrowAt=null}var aW=aX.string.indexOf("=>",aX.start);if(aW<0){return}if(g){var aT=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(aX.string.slice(aX.start,aW));if(aT){aW=aT.index}}var aU=0,aS=false;for(var aV=aW-1;aV>=0;--aV){var aP=aX.string.charAt(aV);var aQ=n.indexOf(aP);if(aQ>=0&&aQ<3){if(!aU){++aV;break}if(--aU==0){if(aP=="("){aS=true}break}}else{if(aQ>=3&&aQ<6){++aU}else{if(aB.test(aP)){aS=true}else{if(/["'\/]/.test(aP)){return}else{if(aS&&!aU){++aV;break}}}}}}if(aS&&!aU){aR.fatArrowAt=aV}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function N(aU,aQ,aP,aT,aR,aS){this.indented=aU;this.column=aQ;this.type=aP;this.prev=aR;this.info=aS;if(aT!=null){this.align=aT}}function u(aS,aR){for(var aQ=aS.localVars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}for(var aP=aS.context;aP;aP=aP.prev){for(var aQ=aP.vars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}}}function f(aT,aQ,aP,aS,aU){var aV=aT.cc;G.state=aT;G.stream=aU;G.marked=null,G.cc=aV;G.style=aQ;if(!aT.lexical.hasOwnProperty("align")){aT.lexical.align=true}while(true){var aR=aV.length?aV.pop():B?au:aM;if(aR(aP,aS)){while(aV.length&&aV[aV.length-1].lex){aV.pop()()}if(G.marked){return G.marked}if(aP=="variable"&&u(aT,aS)){return"variable-2"}return aQ}}}var G={state:null,column:null,marked:null,cc:null};function ag(){for(var aP=arguments.length-1;aP>=0;aP--){G.cc.push(arguments[aP])}}function al(){ag.apply(null,arguments);return true}function aC(aQ){function aP(aT){for(var aS=aT;aS;aS=aS.next){if(aS.name==aQ){return true}}return false}var aR=G.state;G.marked="def";if(aR.context){if(aP(aR.localVars)){return}aR.localVars={name:aQ,next:aR.localVars}}else{if(aP(aR.globalVars)){return}if(ap.globalVars){aR.globalVars={name:aQ,next:aR.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){G.state.context={prev:G.state.context,vars:G.state.localVars};G.state.localVars=s}function z(){G.state.localVars=G.state.context.vars;G.state.context=G.state.context.prev}function aK(aQ,aR){var aP=function(){var aU=G.state,aS=aU.indented;if(aU.lexical.type=="stat"){aS=aU.lexical.indented}else{for(var aT=aU.lexical;aT&&aT.type==")"&&aT.align;aT=aT.prev){aS=aT.indented}}aU.lexical=new N(aS,G.stream.column(),aQ,null,aU.lexical,aR)};aP.lex=true;return aP}function h(){var aP=G.state;if(aP.lexical.prev){if(aP.lexical.type==")"){aP.indented=aP.lexical.indented}aP.lexical=aP.lexical.prev}}h.lex=true;function t(aP){function aQ(aR){if(aR==aP){return al()}else{if(aP==";"){return ag()}else{return al(aQ)}}}return aQ}function aM(aP,aQ){if(aP=="var"){return al(aK("vardef",aQ.length),d,t(";"),h)}if(aP=="keyword a"){return al(aK("form"),av,aM,h)}if(aP=="keyword b"){return al(aK("form"),aM,h)}if(aP=="{"){return al(aK("}"),A,h)}if(aP==";"){return al()}if(aP=="if"){if(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==h){G.state.cc.pop()()}return al(aK("form"),av,aM,h,e)}if(aP=="function"){return al(Q)}if(aP=="for"){return al(aK("form"),w,aM,h)}if(aP=="variable"){return al(aK("stat"),aN)}if(aP=="switch"){return al(aK("form"),av,aK("}","switch"),t("{"),A,h,h)}if(aP=="case"){return al(au,t(":"))}if(aP=="default"){return al(t(":"))}if(aP=="catch"){return al(aK("form"),y,t("("),ak,t(")"),aM,h,z)}if(aP=="class"){return al(aK("form"),ab,h)}if(aP=="export"){return al(aK("stat"),aL,h)}if(aP=="import"){return al(aK("stat"),am,h)}if(aP=="module"){return al(aK("form"),i,aK("}"),t("{"),A,h,h)}if(aP=="type"){return al(j,t("operator"),j,t(";"))}if(aP=="async"){return al(aM)}return ag(aK("stat"),au,t(";"),h)}function au(aP){return ae(aP,false)}function aJ(aP){return ae(aP,true)}function av(aP){if(aP!="("){return ag()}return al(aK(")"),au,t(")"),h)}function ae(aQ,aS){if(G.state.fatArrowAt==G.stream.start){var aP=aS?R:ac;if(aQ=="("){return al(y,aK(")"),aA(i,")"),h,t("=>"),aP,z)}else{if(aQ=="variable"){return ag(y,i,t("=>"),aP,z)}}}var aR=aS?k:ah;if(c.hasOwnProperty(aQ)){return al(aR)}if(aQ=="function"){return al(Q,aR)}if(aQ=="class"){return al(aK("form"),L,h)}if(aQ=="keyword c"||aQ=="async"){return al(aS?aq:ao)}if(aQ=="("){return al(aK(")"),ao,t(")"),h,aR)}if(aQ=="operator"||aQ=="spread"){return al(aS?aJ:au)}if(aQ=="["){return al(aK("]"),o,h,aR)}if(aQ=="{"){return aE(v,"}",null,aR)}if(aQ=="quasi"){return ag(U,aR)}if(aQ=="new"){return al(K(aS))}return al()}function ao(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(au)}function aq(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(aJ)}function ah(aP,aQ){if(aP==","){return al(au)}return k(aP,aQ,false)}function k(aP,aR,aT){var aQ=aT==false?ah:k;var aS=aT==false?au:aJ;if(aP=="=>"){return al(y,aT?R:ac,z)}if(aP=="operator"){if(/\+\+|--/.test(aR)){return al(aQ)}if(aR=="?"){return al(au,t(":"),aS)}return al(aS)}if(aP=="quasi"){return ag(U,aQ)}if(aP==";"){return}if(aP=="("){return aE(aJ,")","call",aQ)}if(aP=="."){return al(ar,aQ)}if(aP=="["){return al(aK("]"),ao,t("]"),h,aQ)}}function U(aP,aQ){if(aP!="quasi"){return ag()}if(aQ.slice(aQ.length-2)!="${"){return al(U)}return al(au,r)}function r(aP){if(aP=="}"){G.marked="string-2";G.state.tokenize=aH;return al(U)}}function ac(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:au)}function R(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:aJ)}function K(aP){return function(aQ){if(aQ=="."){return al(aP?p:aa)}else{return ag(aP?aJ:au)}}}function aa(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(ah)}}function p(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(k)}}function aN(aP){if(aP==":"){return al(h,aM)}return ag(ah,t(";"),h)}function ar(aP){if(aP=="variable"){G.marked="property";return al()}}function v(aP,aQ){if(aP=="async"){G.marked="property";return al(v)}else{if(aP=="variable"||G.style=="keyword"){G.marked="property";if(aQ=="get"||aQ=="set"){return al(M)}return al(O)}else{if(aP=="number"||aP=="string"){G.marked=aG?"property":(G.style+" property");return al(O)}else{if(aP=="jsonld-keyword"){return al(O)}else{if(aP=="modifier"){return al(v)}else{if(aP=="["){return al(au,t("]"),O)}else{if(aP=="spread"){return al(au)}else{if(aP==":"){return ag(O)}}}}}}}}}function M(aP){if(aP!="variable"){return ag(O)}G.marked="property";return al(Q)}function O(aP){if(aP==":"){return al(aJ)}if(aP=="("){return ag(Q)}}function aA(aR,aP){function aQ(aT,aU){if(aT==","){var aS=G.state.lexical;if(aS.info=="call"){aS.pos=(aS.pos||0)+1}return al(function(aV,aW){if(aV==aP||aW==aP){return ag()}return ag(aR)},aQ)}if(aT==aP||aU==aP){return al()}return al(t(aP))}return function(aS,aT){if(aS==aP||aT==aP){return al()}return ag(aR,aQ)}}function aE(aS,aP,aR){for(var aQ=3;aQ<arguments.length;aQ++){G.cc.push(arguments[aQ])}return al(aK(aP,aR),aA(aS,aP),h)}function A(aP){if(aP=="}"){return al()}return ag(aM,A)}function Y(aP,aQ){if(g){if(aP==":"){return al(j)}if(aQ=="?"){return al(Y)}}}function j(aP){if(aP=="variable"){G.marked="variable-3";return al(J)}if(aP=="{"){return al(aA(at,"}"))}if(aP=="("){return al(aA(ai,")"),V)}}function V(aP){if(aP=="=>"){return al(j)}}function at(aP){if(aP=="variable"||G.style=="keyword"){G.marked="property";return al(at)}else{if(aP==":"){return al(j)}}}function ai(aP){if(aP=="variable"){return al(ai)}else{if(aP==":"){return al(j)}}}function J(aP,aQ){if(aQ=="<"){return al(aA(j,">"),J)}if(aP=="["){return al(t("]"),J)}}function d(){return ag(i,Y,aj,ad)}function i(aP,aQ){if(aP=="modifier"){return al(i)}if(aP=="variable"){aC(aQ);return al()}if(aP=="spread"){return al(i)}if(aP=="["){return aE(i,"]")}if(aP=="{"){return aE(aI,"}")}}function aI(aP,aQ){if(aP=="variable"&&!G.stream.match(/^\s*:/,false)){aC(aQ);return al(aj)}if(aP=="variable"){G.marked="property"}if(aP=="spread"){return al(i)}if(aP=="}"){return ag()}return al(t(":"),i,aj)}function aj(aP,aQ){if(aQ=="="){return al(aJ)}}function ad(aP){if(aP==","){return al(d)}}function e(aP,aQ){if(aP=="keyword b"&&aQ=="else"){return al(aK("form","else"),aM,h)}}function w(aP){if(aP=="("){return al(aK(")"),F,t(")"),h)}}function F(aP){if(aP=="var"){return al(d,t(";"),E)}if(aP==";"){return al(E)}if(aP=="variable"){return al(x)}return ag(au,t(";"),E)}function x(aP,aQ){if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return al(ah,E)}function E(aP,aQ){if(aP==";"){return al(D)}if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return ag(au,t(";"),D)}function D(aP){if(aP!=")"){al(au)}}function Q(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(Q)}if(aP=="variable"){aC(aQ);return al(Q)}if(aP=="("){return al(y,aK(")"),aA(ak,")"),h,Y,aM,z)}}function ak(aP){if(aP=="spread"){return al(ak)}return ag(i,Y,aj)}function L(aP,aQ){if(aP=="variable"){return ab(aP,aQ)}return S(aP,aQ)}function ab(aP,aQ){if(aP=="variable"){aC(aQ);return al(S)}}function S(aP,aQ){if(aQ=="extends"||aQ=="implements"){return al(g?j:au,S)}if(aP=="{"){return al(aK("}"),q,h)}}function q(aP,aQ){if(aP=="variable"||G.style=="keyword"){if((aQ=="static"||aQ=="get"||aQ=="set"||(g&&(aQ=="public"||aQ=="private"||aQ=="protected"||aQ=="readonly"||aQ=="abstract")))&&G.stream.match(/^\s+[\w$\xa1-\uffff]/,false)){G.marked="keyword";return al(q)}G.marked="property";return al(g?aO:Q,q)}if(aQ=="*"){G.marked="keyword";return al(q)}if(aP==";"){return al(q)}if(aP=="}"){return al()}}function aO(aP,aQ){if(aQ=="?"){return al(aO)}if(aP==":"){return al(j,aj)}return ag(Q)}function aL(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(an,t(";"))}if(aQ=="default"){G.marked="keyword";return al(au,t(";"))}return ag(aM)}function am(aP){if(aP=="string"){return al()}return ag(ax,an)}function ax(aP,aQ){if(aP=="{"){return aE(ax,"}")}if(aP=="variable"){aC(aQ)}if(aQ=="*"){G.marked="keyword"}return al(l)}function l(aP,aQ){if(aQ=="as"){G.marked="keyword";return al(ax)}}function an(aP,aQ){if(aQ=="from"){G.marked="keyword";return al(au)}}function o(aP){if(aP=="]"){return al()}return ag(aA(aJ,"]"))}function aw(aQ,aP){return aQ.lastType=="operator"||aQ.lastType==","||T.test(aP.charAt(0))||/[,.]/.test(aP.charAt(0))}return{startState:function(aQ){var aP={tokenize:Z,lastType:"sof",cc:[],lexical:new N((aQ||0)-m,0,"block",false),localVars:ap.localVars,context:ap.localVars&&{vars:ap.localVars},indented:aQ||0};if(ap.globalVars&&typeof ap.globalVars=="object"){aP.globalVars=ap.globalVars}return aP},token:function(aR,aQ){if(aR.sol()){if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=false}aQ.indented=aR.indentation();aD(aR,aQ)}if(aQ.tokenize!=aF&&aR.eatSpace()){return null}var aP=aQ.tokenize(aR,aQ);if(X=="comment"){return aP}aQ.lastType=X=="operator"&&(I=="++"||I=="--")?"incdec":X;return f(aQ,aP,X,I,aR)},indent:function(aP,aS){if(aP.tokenize==aF){return a.Pass}if(aP.tokenize!=Z){return 0}var aW=aS&&aS.charAt(0),aX=aP.lexical,aV;if(!/^\s*else\b/.test(aS)){for(var aR=aP.cc.length-1;aR>=0;--aR){var aT=aP.cc[aR];if(aT==h){aX=aX.prev}else{if(aT!=e){break}}}}while((aX.type=="stat"||aX.type=="form")&&(aW=="}"||((aV=aP.cc[aP.cc.length-1])&&(aV==ah||aV==k)&&!/^[,\.=+\-*:?[\(]/.test(aS)))){aX=aX.prev}if(C&&aX.type==")"&&aX.prev.type=="stat"){aX=aX.prev}var aU=aX.type,aQ=aW==aU;if(aU=="vardef"){return aX.indented+(aP.lastType=="operator"||aP.lastType==","?aX.info+1:0)}else{if(aU=="form"&&aW=="{"){return aX.indented}else{if(aU=="form"){return aX.indented+m}else{if(aU=="stat"){return aX.indented+(aw(aP,aS)?C||m:0)}else{if(aX.info=="switch"&&!aQ&&ap.doubleIndentSwitch!=false){return aX.indented+(/^(?:case|default)\b/.test(aS)?m:2*m)}else{if(aX.align){return aX.column+(aQ?0:1)}else{return aX.indented+(aQ?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aG,jsonMode:B,expressionAllowed:b,skipExpression:function(aP){var aQ=aP.cc[aP.cc.length-1];if(aQ==au||aQ==aJ){aP.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})});
|
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<arguments.length;n++)Ne.cc.push(arguments[n]);return m(b(t,r),H(e,t),x)}function D(e){return"}"==e?m():p(h,D)}function F(e,t){if($e){if(":"==e)return m(G);if("?"==t)return m(F)}}function G(e,t){return"variable"==e||"void"==t?"keyof"==t?(Ne.marked="keyword",m(G)):(Ne.marked="type",m(R)):"string"==e||"number"==e||"atom"==e?m(R):"["==e?m(b("]"),H(G,"]",","),x,R):"{"==e?m(b("}"),H(L,"}",",;"),x,R):"("==e?m(H(Q,")"),K):void 0}function K(e){if("=>"==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 +1,3 @@
|
|
1
|
-
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function f(n,j,k){var m=n.current(),l=m.search(j);if(l>-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?"^":"")+"</s*"+k+"s*>","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<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=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(s,r){if(!s.localMode||/^\s*<\//.test(r)){return q.indent(s.htmlState,r)}else{if(s.localMode.indent){return s.localMode.indent(s.localState,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")});(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&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",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){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(af,ap){var m=af.indentUnit;var C=ap.statementIndent;var aG=ap.jsonld;var B=ap.json||aG;var g=ap.typescript;var aB=ap.wordCharacters||/[\w$\xa1-\uffff]/;var az=function(){function aX(aZ){return{type:aZ,style:"keyword"}}var aS=aX("keyword a"),aQ=aX("keyword b"),aP=aX("keyword c");var aR=aX("operator"),aV={type:"atom",style:"atom"};var aT={"if":aX("if"),"while":aS,"with":aS,"else":aQ,"do":aQ,"try":aQ,"finally":aQ,"return":aP,"break":aP,"continue":aP,"new":aX("new"),"delete":aP,"throw":aP,"debugger":aP,"var":aX("var"),"const":aX("var"),let:aX("var"),"function":aX("function"),"catch":aX("catch"),"for":aX("for"),"switch":aX("switch"),"case":aX("case"),"default":aX("default"),"in":aR,"typeof":aR,"instanceof":aR,"true":aV,"false":aV,"null":aV,"undefined":aV,"NaN":aV,"Infinity":aV,"this":aX("this"),"class":aX("class"),"super":aX("atom"),yield:aP,"export":aX("export"),"import":aX("import"),"extends":aP,await:aP,async:aX("async")};if(g){var aY={type:"variable",style:"variable-3"};var aU={"interface":aX("class"),"implements":aP,namespace:aP,module:aX("module"),"enum":aX("module"),type:aX("type"),"public":aX("modifier"),"private":aX("modifier"),"protected":aX("modifier"),"abstract":aX("modifier"),as:aR,string:aY,number:aY,"boolean":aY,any:aY};for(var aW in aU){aT[aW]=aU[aW]}}return aT}();var T=/[+\-*&%=<>!?|~^]/;var ay=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aS){var aQ=false,aP,aR=false;while((aP=aS.next())!=null){if(!aQ){if(aP=="/"&&!aR){return}if(aP=="["){aR=true}else{if(aR&&aP=="]"){aR=false}}}aQ=!aQ&&aP=="\\"}}var X,I;function P(aR,aQ,aP){X=aR;I=aP;return aQ}function Z(aT,aR){var aP=aT.next();if(aP=='"'||aP=="'"){aR.tokenize=W(aP);return aR.tokenize(aT,aR)}else{if(aP=="."&&aT.match(/^\d+(?:[eE][+\-]?\d+)?/)){return P("number","number")}else{if(aP=="."&&aT.match("..")){return P("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aP)){return P(aP)}else{if(aP=="="&&aT.eat(">")){return P("=>","operator")}else{if(aP=="0"&&aT.eat(/x/i)){aT.eatWhile(/[\da-f]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/o/i)){aT.eatWhile(/[0-7]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/b/i)){aT.eatWhile(/[01]/i);return P("number","number")}else{if(/\d/.test(aP)){aT.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return P("number","number")}else{if(aP=="/"){if(aT.eat("*")){aR.tokenize=aF;return aF(aT,aR)}else{if(aT.eat("/")){aT.skipToEnd();return P("comment","comment")}else{if(b(aT,aR,1)){H(aT);aT.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return P("regexp","string-2")}else{aT.eatWhile(T);return P("operator","operator",aT.current())}}}}else{if(aP=="`"){aR.tokenize=aH;return aH(aT,aR)}else{if(aP=="#"){aT.skipToEnd();return P("error","error")}else{if(T.test(aP)){aT.eatWhile(T);return P("operator","operator",aT.current())}else{if(aB.test(aP)){aT.eatWhile(aB);var aS=aT.current(),aQ=az.propertyIsEnumerable(aS)&&az[aS];return(aQ&&aR.lastType!=".")?P(aQ.type,aQ.style,aS):P("variable","variable",aS)}}}}}}}}}}}}}}}function W(aP){return function(aT,aR){var aS=false,aQ;if(aG&&aT.peek()=="@"&&aT.match(ay)){aR.tokenize=Z;return P("jsonld-keyword","meta")}while((aQ=aT.next())!=null){if(aQ==aP&&!aS){break}aS=!aS&&aQ=="\\"}if(!aS){aR.tokenize=Z}return P("string","string")}}function aF(aS,aR){var aP=false,aQ;while(aQ=aS.next()){if(aQ=="/"&&aP){aR.tokenize=Z;break}aP=(aQ=="*")}return P("comment","comment")}function aH(aS,aQ){var aR=false,aP;while((aP=aS.next())!=null){if(!aR&&(aP=="`"||aP=="$"&&aS.eat("{"))){aQ.tokenize=Z;break}aR=!aR&&aP=="\\"}return P("quasi","string-2",aS.current())}var n="([{}])";function aD(aX,aR){if(aR.fatArrowAt){aR.fatArrowAt=null}var aW=aX.string.indexOf("=>",aX.start);if(aW<0){return}if(g){var aT=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(aX.string.slice(aX.start,aW));if(aT){aW=aT.index}}var aU=0,aS=false;for(var aV=aW-1;aV>=0;--aV){var aP=aX.string.charAt(aV);var aQ=n.indexOf(aP);if(aQ>=0&&aQ<3){if(!aU){++aV;break}if(--aU==0){if(aP=="("){aS=true}break}}else{if(aQ>=3&&aQ<6){++aU}else{if(aB.test(aP)){aS=true}else{if(/["'\/]/.test(aP)){return}else{if(aS&&!aU){++aV;break}}}}}}if(aS&&!aU){aR.fatArrowAt=aV}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function N(aU,aQ,aP,aT,aR,aS){this.indented=aU;this.column=aQ;this.type=aP;this.prev=aR;this.info=aS;if(aT!=null){this.align=aT}}function u(aS,aR){for(var aQ=aS.localVars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}for(var aP=aS.context;aP;aP=aP.prev){for(var aQ=aP.vars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}}}function f(aT,aQ,aP,aS,aU){var aV=aT.cc;G.state=aT;G.stream=aU;G.marked=null,G.cc=aV;G.style=aQ;if(!aT.lexical.hasOwnProperty("align")){aT.lexical.align=true}while(true){var aR=aV.length?aV.pop():B?au:aM;if(aR(aP,aS)){while(aV.length&&aV[aV.length-1].lex){aV.pop()()}if(G.marked){return G.marked}if(aP=="variable"&&u(aT,aS)){return"variable-2"}return aQ}}}var G={state:null,column:null,marked:null,cc:null};function ag(){for(var aP=arguments.length-1;aP>=0;aP--){G.cc.push(arguments[aP])}}function al(){ag.apply(null,arguments);return true}function aC(aQ){function aP(aT){for(var aS=aT;aS;aS=aS.next){if(aS.name==aQ){return true}}return false}var aR=G.state;G.marked="def";if(aR.context){if(aP(aR.localVars)){return}aR.localVars={name:aQ,next:aR.localVars}}else{if(aP(aR.globalVars)){return}if(ap.globalVars){aR.globalVars={name:aQ,next:aR.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){G.state.context={prev:G.state.context,vars:G.state.localVars};G.state.localVars=s}function z(){G.state.localVars=G.state.context.vars;G.state.context=G.state.context.prev}function aK(aQ,aR){var aP=function(){var aU=G.state,aS=aU.indented;if(aU.lexical.type=="stat"){aS=aU.lexical.indented}else{for(var aT=aU.lexical;aT&&aT.type==")"&&aT.align;aT=aT.prev){aS=aT.indented}}aU.lexical=new N(aS,G.stream.column(),aQ,null,aU.lexical,aR)};aP.lex=true;return aP}function h(){var aP=G.state;if(aP.lexical.prev){if(aP.lexical.type==")"){aP.indented=aP.lexical.indented}aP.lexical=aP.lexical.prev}}h.lex=true;function t(aP){function aQ(aR){if(aR==aP){return al()}else{if(aP==";"){return ag()}else{return al(aQ)}}}return aQ}function aM(aP,aQ){if(aP=="var"){return al(aK("vardef",aQ.length),d,t(";"),h)}if(aP=="keyword a"){return al(aK("form"),av,aM,h)}if(aP=="keyword b"){return al(aK("form"),aM,h)}if(aP=="{"){return al(aK("}"),A,h)}if(aP==";"){return al()}if(aP=="if"){if(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==h){G.state.cc.pop()()}return al(aK("form"),av,aM,h,e)}if(aP=="function"){return al(Q)}if(aP=="for"){return al(aK("form"),w,aM,h)}if(aP=="variable"){return al(aK("stat"),aN)}if(aP=="switch"){return al(aK("form"),av,aK("}","switch"),t("{"),A,h,h)}if(aP=="case"){return al(au,t(":"))}if(aP=="default"){return al(t(":"))}if(aP=="catch"){return al(aK("form"),y,t("("),ak,t(")"),aM,h,z)}if(aP=="class"){return al(aK("form"),ab,h)}if(aP=="export"){return al(aK("stat"),aL,h)}if(aP=="import"){return al(aK("stat"),am,h)}if(aP=="module"){return al(aK("form"),i,aK("}"),t("{"),A,h,h)}if(aP=="type"){return al(j,t("operator"),j,t(";"))}if(aP=="async"){return al(aM)}return ag(aK("stat"),au,t(";"),h)}function au(aP){return ae(aP,false)}function aJ(aP){return ae(aP,true)}function av(aP){if(aP!="("){return ag()}return al(aK(")"),au,t(")"),h)}function ae(aQ,aS){if(G.state.fatArrowAt==G.stream.start){var aP=aS?R:ac;if(aQ=="("){return al(y,aK(")"),aA(i,")"),h,t("=>"),aP,z)}else{if(aQ=="variable"){return ag(y,i,t("=>"),aP,z)}}}var aR=aS?k:ah;if(c.hasOwnProperty(aQ)){return al(aR)}if(aQ=="function"){return al(Q,aR)}if(aQ=="class"){return al(aK("form"),L,h)}if(aQ=="keyword c"||aQ=="async"){return al(aS?aq:ao)}if(aQ=="("){return al(aK(")"),ao,t(")"),h,aR)}if(aQ=="operator"||aQ=="spread"){return al(aS?aJ:au)}if(aQ=="["){return al(aK("]"),o,h,aR)}if(aQ=="{"){return aE(v,"}",null,aR)}if(aQ=="quasi"){return ag(U,aR)}if(aQ=="new"){return al(K(aS))}return al()}function ao(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(au)}function aq(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(aJ)}function ah(aP,aQ){if(aP==","){return al(au)}return k(aP,aQ,false)}function k(aP,aR,aT){var aQ=aT==false?ah:k;var aS=aT==false?au:aJ;if(aP=="=>"){return al(y,aT?R:ac,z)}if(aP=="operator"){if(/\+\+|--/.test(aR)){return al(aQ)}if(aR=="?"){return al(au,t(":"),aS)}return al(aS)}if(aP=="quasi"){return ag(U,aQ)}if(aP==";"){return}if(aP=="("){return aE(aJ,")","call",aQ)}if(aP=="."){return al(ar,aQ)}if(aP=="["){return al(aK("]"),ao,t("]"),h,aQ)}}function U(aP,aQ){if(aP!="quasi"){return ag()}if(aQ.slice(aQ.length-2)!="${"){return al(U)}return al(au,r)}function r(aP){if(aP=="}"){G.marked="string-2";G.state.tokenize=aH;return al(U)}}function ac(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:au)}function R(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:aJ)}function K(aP){return function(aQ){if(aQ=="."){return al(aP?p:aa)}else{return ag(aP?aJ:au)}}}function aa(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(ah)}}function p(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(k)}}function aN(aP){if(aP==":"){return al(h,aM)}return ag(ah,t(";"),h)}function ar(aP){if(aP=="variable"){G.marked="property";return al()}}function v(aP,aQ){if(aP=="async"){G.marked="property";return al(v)}else{if(aP=="variable"||G.style=="keyword"){G.marked="property";if(aQ=="get"||aQ=="set"){return al(M)}return al(O)}else{if(aP=="number"||aP=="string"){G.marked=aG?"property":(G.style+" property");return al(O)}else{if(aP=="jsonld-keyword"){return al(O)}else{if(aP=="modifier"){return al(v)}else{if(aP=="["){return al(au,t("]"),O)}else{if(aP=="spread"){return al(au)}else{if(aP==":"){return ag(O)}}}}}}}}}function M(aP){if(aP!="variable"){return ag(O)}G.marked="property";return al(Q)}function O(aP){if(aP==":"){return al(aJ)}if(aP=="("){return ag(Q)}}function aA(aR,aP){function aQ(aT,aU){if(aT==","){var aS=G.state.lexical;if(aS.info=="call"){aS.pos=(aS.pos||0)+1}return al(function(aV,aW){if(aV==aP||aW==aP){return ag()}return ag(aR)},aQ)}if(aT==aP||aU==aP){return al()}return al(t(aP))}return function(aS,aT){if(aS==aP||aT==aP){return al()}return ag(aR,aQ)}}function aE(aS,aP,aR){for(var aQ=3;aQ<arguments.length;aQ++){G.cc.push(arguments[aQ])}return al(aK(aP,aR),aA(aS,aP),h)}function A(aP){if(aP=="}"){return al()}return ag(aM,A)}function Y(aP,aQ){if(g){if(aP==":"){return al(j)}if(aQ=="?"){return al(Y)}}}function j(aP){if(aP=="variable"){G.marked="variable-3";return al(J)}if(aP=="{"){return al(aA(at,"}"))}if(aP=="("){return al(aA(ai,")"),V)}}function V(aP){if(aP=="=>"){return al(j)}}function at(aP){if(aP=="variable"||G.style=="keyword"){G.marked="property";return al(at)}else{if(aP==":"){return al(j)}}}function ai(aP){if(aP=="variable"){return al(ai)}else{if(aP==":"){return al(j)}}}function J(aP,aQ){if(aQ=="<"){return al(aA(j,">"),J)}if(aP=="["){return al(t("]"),J)}}function d(){return ag(i,Y,aj,ad)}function i(aP,aQ){if(aP=="modifier"){return al(i)}if(aP=="variable"){aC(aQ);return al()}if(aP=="spread"){return al(i)}if(aP=="["){return aE(i,"]")}if(aP=="{"){return aE(aI,"}")}}function aI(aP,aQ){if(aP=="variable"&&!G.stream.match(/^\s*:/,false)){aC(aQ);return al(aj)}if(aP=="variable"){G.marked="property"}if(aP=="spread"){return al(i)}if(aP=="}"){return ag()}return al(t(":"),i,aj)}function aj(aP,aQ){if(aQ=="="){return al(aJ)}}function ad(aP){if(aP==","){return al(d)}}function e(aP,aQ){if(aP=="keyword b"&&aQ=="else"){return al(aK("form","else"),aM,h)}}function w(aP){if(aP=="("){return al(aK(")"),F,t(")"),h)}}function F(aP){if(aP=="var"){return al(d,t(";"),E)}if(aP==";"){return al(E)}if(aP=="variable"){return al(x)}return ag(au,t(";"),E)}function x(aP,aQ){if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return al(ah,E)}function E(aP,aQ){if(aP==";"){return al(D)}if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return ag(au,t(";"),D)}function D(aP){if(aP!=")"){al(au)}}function Q(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(Q)}if(aP=="variable"){aC(aQ);return al(Q)}if(aP=="("){return al(y,aK(")"),aA(ak,")"),h,Y,aM,z)}}function ak(aP){if(aP=="spread"){return al(ak)}return ag(i,Y,aj)}function L(aP,aQ){if(aP=="variable"){return ab(aP,aQ)}return S(aP,aQ)}function ab(aP,aQ){if(aP=="variable"){aC(aQ);return al(S)}}function S(aP,aQ){if(aQ=="extends"||aQ=="implements"){return al(g?j:au,S)}if(aP=="{"){return al(aK("}"),q,h)}}function q(aP,aQ){if(aP=="variable"||G.style=="keyword"){if((aQ=="static"||aQ=="get"||aQ=="set"||(g&&(aQ=="public"||aQ=="private"||aQ=="protected"||aQ=="readonly"||aQ=="abstract")))&&G.stream.match(/^\s+[\w$\xa1-\uffff]/,false)){G.marked="keyword";return al(q)}G.marked="property";return al(g?aO:Q,q)}if(aQ=="*"){G.marked="keyword";return al(q)}if(aP==";"){return al(q)}if(aP=="}"){return al()}}function aO(aP,aQ){if(aQ=="?"){return al(aO)}if(aP==":"){return al(j,aj)}return ag(Q)}function aL(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(an,t(";"))}if(aQ=="default"){G.marked="keyword";return al(au,t(";"))}return ag(aM)}function am(aP){if(aP=="string"){return al()}return ag(ax,an)}function ax(aP,aQ){if(aP=="{"){return aE(ax,"}")}if(aP=="variable"){aC(aQ)}if(aQ=="*"){G.marked="keyword"}return al(l)}function l(aP,aQ){if(aQ=="as"){G.marked="keyword";return al(ax)}}function an(aP,aQ){if(aQ=="from"){G.marked="keyword";return al(au)}}function o(aP){if(aP=="]"){return al()}return ag(aA(aJ,"]"))}function aw(aQ,aP){return aQ.lastType=="operator"||aQ.lastType==","||T.test(aP.charAt(0))||/[,.]/.test(aP.charAt(0))}return{startState:function(aQ){var aP={tokenize:Z,lastType:"sof",cc:[],lexical:new N((aQ||0)-m,0,"block",false),localVars:ap.localVars,context:ap.localVars&&{vars:ap.localVars},indented:aQ||0};if(ap.globalVars&&typeof ap.globalVars=="object"){aP.globalVars=ap.globalVars}return aP},token:function(aR,aQ){if(aR.sol()){if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=false}aQ.indented=aR.indentation();aD(aR,aQ)}if(aQ.tokenize!=aF&&aR.eatSpace()){return null}var aP=aQ.tokenize(aR,aQ);if(X=="comment"){return aP}aQ.lastType=X=="operator"&&(I=="++"||I=="--")?"incdec":X;return f(aQ,aP,X,I,aR)},indent:function(aP,aS){if(aP.tokenize==aF){return a.Pass}if(aP.tokenize!=Z){return 0}var aW=aS&&aS.charAt(0),aX=aP.lexical,aV;if(!/^\s*else\b/.test(aS)){for(var aR=aP.cc.length-1;aR>=0;--aR){var aT=aP.cc[aR];if(aT==h){aX=aX.prev}else{if(aT!=e){break}}}}while((aX.type=="stat"||aX.type=="form")&&(aW=="}"||((aV=aP.cc[aP.cc.length-1])&&(aV==ah||aV==k)&&!/^[,\.=+\-*:?[\(]/.test(aS)))){aX=aX.prev}if(C&&aX.type==")"&&aX.prev.type=="stat"){aX=aX.prev}var aU=aX.type,aQ=aW==aU;if(aU=="vardef"){return aX.indented+(aP.lastType=="operator"||aP.lastType==","?aX.info+1:0)}else{if(aU=="form"&&aW=="{"){return aX.indented}else{if(aU=="form"){return aX.indented+m}else{if(aU=="stat"){return aX.indented+(aw(aP,aS)?C||m:0)}else{if(aX.info=="switch"&&!aQ&&ap.doubleIndentSwitch!=false){return aX.indented+(/^(?:case|default)\b/.test(aS)?m:2*m)}else{if(aX.align){return aX.column+(aQ?0:1)}else{return aX.indented+(aQ?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aG,jsonMode:B,expressionAllowed:b,skipExpression:function(aP){var aQ=aP.cc[aP.cc.length-1];if(aQ==au||aQ==aJ){aP.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(Y,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Y.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},X=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},W=J.counterDescriptors||{},O=J.colorKeywords||{},S=J.valueKeywords||{},M=J.allowNested,U=J.supportsAtComponent===true;var C,N;function Z(ac,ad){C=ad;return ac}function ab(af,ae){var ad=af.next();if(A[ad]){var ac=A[ad](af,ae);if(ac!==false){return ac}}if(ad=="@"){af.eatWhile(/[\w\\\-]/);return Z("def",af.current())}else{if(ad=="="||(ad=="~"||ad=="|")&&af.eat("=")){return Z(null,"compare")}else{if(ad=='"'||ad=="'"){ae.tokenize=K(ad);return ae.tokenize(af,ae)}else{if(ad=="#"){af.eatWhile(/[\w\\\-]/);return Z("atom","hash")}else{if(ad=="!"){af.match(/^\s*\w*/);return Z("keyword","important")}else{if(/\d/.test(ad)||ad=="."&&af.eat(/\d/)){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(ad==="-"){if(/[\d.]/.test(af.peek())){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(af.match(/^-[\w\\\-]+/)){af.eatWhile(/[\w\\\-]/);if(af.match(/^\s*:/,false)){return Z("variable-2","variable-definition")}return Z("variable-2","variable")}else{if(af.match(/^\w+-/)){return Z("meta","meta")}}}}else{if(/[,+>*\/]/.test(ad)){return Z(null,"select-op")}else{if(ad=="."&&af.match(/^-?[_a-z][_a-z0-9-]*/i)){return Z("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ad)){return Z(null,ad)}else{if((ad=="u"&&af.match(/rl(-prefix)?\(/))||(ad=="d"&&af.match("omain("))||(ad=="r"&&af.match("egexp("))){af.backUp(1);ae.tokenize=aa;return Z("property","word")}else{if(/[\w\\\-]/.test(ad)){af.eatWhile(/[\w\\\-]/);return Z("property","word")}else{return Z(null,null)}}}}}}}}}}}}}function K(ac){return function(ag,ae){var af=false,ad;while((ad=ag.next())!=null){if(ad==ac&&!af){if(ac==")"){ag.backUp(1)}break}af=!af&&ad=="\\"}if(ad==ac||!af&&ac!=")"){ae.tokenize=null}return Z("string","string")}}function aa(ad,ac){ad.next();if(!ad.match(/\s*[\"\')]/,false)){ac.tokenize=K(")")}else{ac.tokenize=null}return Z(null,"(")}function R(ad,ac,ae){this.type=ad;this.indent=ac;this.prev=ae}function G(ae,af,ad,ac){ae.context=new R(ad,af.indentation()+(ac===false?0:Q),ae.context);return ad}function T(ac){if(ac.context.prev){ac.context=ac.context.prev}return ac.context.type}function z(ac,ae,ad){return F[ad.context.type](ac,ae,ad)}function V(ad,af,ae,ag){for(var ac=ag||1;ac>0;ac--){ae.context=ae.context.prev}return z(ad,af,ae)}function H(ad){var ac=ad.current().toLowerCase();if(S.hasOwnProperty(ac)){N="atom"}else{if(O.hasOwnProperty(ac)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"block")}else{if(ac=="}"&&ad.context.prev){return T(ad)}else{if(U&&/@component/.test(ac)){return G(ad,ae,"atComponentBlock")}else{if(/^@(-moz-)?document$/.test(ac)){return G(ad,ae,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/.test(ac)){return G(ad,ae,"atBlock")}else{if(/^@(font-face|counter-style)/.test(ac)){ad.stateArg=ac;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(ac)){return"keyframes"}else{if(ac&&ac.charAt(0)=="@"){return G(ad,ae,"at")}else{if(ac=="hash"){N="builtin"}else{if(ac=="word"){N="tag"}else{if(ac=="variable-definition"){return"maybeprop"}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}else{if(ac==":"){return"pseudo"}else{if(M&&ac=="("){return G(ad,ae,"parens")}}}}}}}}}}}}}}return ad.context.type};F.block=function(ac,af,ad){if(ac=="word"){var ae=af.current().toLowerCase();if(I.hasOwnProperty(ae)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(ae)){N="string-2";return"maybeprop"}else{if(M){N=af.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ac=="meta"){return"block"}else{if(!M&&(ac=="hash"||ac=="qualifier")){N="error";return"block"}else{return F.top(ac,af,ad)}}}};F.maybeprop=function(ac,ae,ad){if(ac==":"){return G(ad,ae,"prop")}return z(ac,ae,ad)};F.prop=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"&&M){return G(ad,ae,"propBlock")}if(ac=="}"||ac=="{"){return V(ac,ae,ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(ae.current())){N+=" error"}else{if(ac=="word"){H(ae)}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}}}return"prop"};F.propBlock=function(ad,ac,ae){if(ad=="}"){return T(ae)}if(ad=="word"){N="property";return"maybeprop"}return ae.context.type};F.parens=function(ac,ae,ad){if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac==")"){return T(ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="interpolation"){return G(ad,ae,"interpolation")}if(ac=="word"){H(ae)}return"parens"};F.pseudo=function(ac,ae,ad){if(ac=="word"){N="variable-3";return ad.context.type}return z(ac,ae,ad)};F.documentTypes=function(ac,ae,ad){if(ac=="word"&&y.hasOwnProperty(ae.current())){N="tag";return ad.context.type}else{return F.atBlock(ac,ae,ad)}};F.atBlock=function(ac,af,ad){if(ac=="("){return G(ad,af,"atBlock_parens")}if(ac=="}"||ac==";"){return V(ac,af,ad)}if(ac=="{"){return T(ad)&&G(ad,af,M?"block":"top")}if(ac=="interpolation"){return G(ad,af,"interpolation")}if(ac=="word"){var ae=af.current().toLowerCase();if(ae=="only"||ae=="not"||ae=="and"||ae=="or"){N="keyword"}else{if(X.hasOwnProperty(ae)){N="attribute"}else{if(L.hasOwnProperty(ae)){N="property"}else{if(P.hasOwnProperty(ae)){N="keyword"}else{if(I.hasOwnProperty(ae)){N="property"}else{if(B.hasOwnProperty(ae)){N="string-2"}else{if(S.hasOwnProperty(ae)){N="atom"}else{if(O.hasOwnProperty(ae)){N="keyword"}else{N="error"}}}}}}}}}return ad.context.type};F.atComponentBlock=function(ac,ae,ad){if(ac=="}"){return V(ac,ae,ad)}if(ac=="{"){return T(ad)&&G(ad,ae,M?"block":"top",false)}if(ac=="word"){N="error"}return ad.context.type};F.atBlock_parens=function(ac,ae,ad){if(ac==")"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad,2)}return F.atBlock(ac,ae,ad)};F.restricted_atBlock_before=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"restricted_atBlock")}if(ac=="word"&&ad.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ac,ae,ad)};F.restricted_atBlock=function(ac,ae,ad){if(ac=="}"){ad.stateArg=null;return T(ad)}if(ac=="word"){if((ad.stateArg=="@font-face"&&!E.hasOwnProperty(ae.current().toLowerCase()))||(ad.stateArg=="@counter-style"&&!W.hasOwnProperty(ae.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ac,ae,ad){if(ac=="word"){N="variable";return"keyframes"}if(ac=="{"){return G(ad,ae,"top")}return z(ac,ae,ad)};F.at=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac=="word"){N="tag"}else{if(ac=="hash"){N="builtin"}}return"at"};F.interpolation=function(ac,ae,ad){if(ac=="}"){return T(ad)}if(ac=="{"||ac==";"){return V(ac,ae,ad)}if(ac=="word"){N="variable"}else{if(ac!="variable"&&ac!="("&&ac!=")"){N="error"}}return"interpolation"};return{startState:function(ac){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ac||0,null)}},token:function(ae,ad){if(!ad.tokenize&&ae.eatSpace()){return null}var ac=(ad.tokenize||ab)(ae,ad);if(ac&&typeof ac=="object"){C=ac[1];ac=ac[0]}N=ac;ad.state=F[ad.state](C,ae,ad);return N},indent:function(ag,ae){var ad=ag.context,af=ae&&ae.charAt(0);var ac=ad.indent;if(ad.type=="prop"&&(af=="}"||af==")")){ad=ad.prev}if(ad.prev){if(af=="}"&&(ad.type=="block"||ad.type=="top"||ad.type=="interpolation"||ad.type=="restricted_atBlock")){ad=ad.prev;ac=ad.indent}else{if(af==")"&&(ad.type=="parens"||ad.type=="atBlock_parens")||af=="{"&&(ad.type=="at"||ad.type=="atBlock")){ac=Math.max(0,ad.indent-Q);ad=ad.prev}}}return ac},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y].toLowerCase()]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var 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","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","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","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","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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var c=["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"],m=g(c);var j=["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","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","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","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","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","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","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","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","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","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"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/)){return[null,"{"]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(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){function q(B,x,w,z,A,y){this.indented=B;this.column=x;this.type=w;this.info=z;this.align=A;this.prev=y}function g(z,x,y,A){var w=z.indented;if(z.context&&z.context.type=="statement"&&y!="statement"){w=z.context.indented}return z.context=new q(w,x,y,A,null,z.context)}function t(x){var w=x.context.type;if(w==")"||w=="]"||w=="}"){x.indented=x.context.indented}return x.context=x.context.prev}function a(x,w,y){if(w.prevToken=="variable"||w.prevToken=="variable-3"){return true}if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(x.string.slice(0,y))){return true}if(w.typeAtEndOfLine&&x.column()==x.indentation()){return true}}function p(w){for(;;){if(!w||w.type=="top"){return true}if(w.type=="}"&&w.prev.info!="namespace"){return false}w=w.prev}}r.defineMode("clike",function(S,D){var O=S.indentUnit,L=D.statementIndentUnit||O,P=D.dontAlignCalls,G=D.keywords||{},J=D.types||{},T=D.builtin||{},Q=D.blockKeywords||{},N=D.defKeywords||{},y=D.atoms||{},x=D.hooks||{},K=D.multiLineStrings,I=D.indentStatements!==false,F=D.indentSwitch!==false,A=D.namespaceSeparator,C=D.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,z=D.numberStart||/[\d\.]/,w=D.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,H=D.isOperatorChar||/[+\-*&%=<>!?|\/]/;var R,B;function V(aa,Y){var X=aa.next();if(x[X]){var W=x[X](aa,Y);if(W!==false){return W}}if(X=='"'||X=="'"){Y.tokenize=E(X);return Y.tokenize(aa,Y)}if(C.test(X)){R=X;return null}if(z.test(X)){aa.backUp(1);if(aa.match(w)){return"number"}aa.next()}if(X=="/"){if(aa.eat("*")){Y.tokenize=M;return M(aa,Y)}if(aa.eat("/")){aa.skipToEnd();return"comment"}}if(H.test(X)){while(!aa.match(/^\/[\/*]/,false)&&aa.eat(H)){}return"operator"}aa.eatWhile(/[\w\$_\xa1-\uffff]/);if(A){while(aa.match(A)){aa.eatWhile(/[\w\$_\xa1-\uffff]/)}}var Z=aa.current();if(h(G,Z)){if(h(Q,Z)){R="newstatement"}if(h(N,Z)){B=true}return"keyword"}if(h(J,Z)){return"variable-3"}if(h(T,Z)){if(h(Q,Z)){R="newstatement"}return"builtin"}if(h(y,Z)){return"atom"}return"variable"}function E(W){return function(ab,Z){var aa=false,Y,X=false;while((Y=ab.next())!=null){if(Y==W&&!aa){X=true;break}aa=!aa&&Y=="\\"}if(X||!(aa||K)){Z.tokenize=null}return"string"}}function M(Z,Y){var W=false,X;while(X=Z.next()){if(X=="/"&&W){Y.tokenize=null;break}W=(X=="*")}return"comment"}function U(X,W){if(D.typeFirstDefinitions&&X.eol()&&p(W.context)){W.typeAtEndOfLine=a(X,W,X.pos)}}return{startState:function(W){return{tokenize:null,context:new q((W||0)-O,0,"top",null,false),indented:0,startOfLine:true,prevToken:null}},token:function(aa,Z){var X=Z.context;if(aa.sol()){if(X.align==null){X.align=false}Z.indented=aa.indentation();Z.startOfLine=true}if(aa.eatSpace()){U(aa,Z);return null}R=B=null;var Y=(Z.tokenize||V)(aa,Z);if(Y=="comment"||Y=="meta"){return Y}if(X.align==null){X.align=true}if(R==";"||R==":"||(R==","&&aa.match(/^\s*(?:\/\/.*)?$/,false))){while(Z.context.type=="statement"){t(Z)}}else{if(R=="{"){g(Z,aa.column(),"}")}else{if(R=="["){g(Z,aa.column(),"]")}else{if(R=="("){g(Z,aa.column(),")")}else{if(R=="}"){while(X.type=="statement"){X=t(Z)}if(X.type=="}"){X=t(Z)}while(X.type=="statement"){X=t(Z)}}else{if(R==X.type){t(Z)}else{if(I&&(((X.type=="}"||X.type=="top")&&R!=";")||(X.type=="statement"&&R=="newstatement"))){g(Z,aa.column(),"statement",aa.current())}}}}}}}if(Y=="variable"&&((Z.prevToken=="def"||(D.typeFirstDefinitions&&a(aa,Z,aa.start)&&p(Z.context)&&aa.match(/^\s*\(/,false))))){Y="def"}if(x.token){var W=x.token(aa,Z,Y);if(W!==undefined){Y=W}}if(Y=="def"&&D.styleDefs===false){Y="variable"}Z.startOfLine=false;Z.prevToken=B?"def":Y||R;U(aa,Z);return Y},indent:function(ac,X){if(ac.tokenize!=V&&ac.tokenize!=null||ac.typeAtEndOfLine){return r.Pass}var W=ac.context,aa=X&&X.charAt(0);if(W.type=="statement"&&aa=="}"){W=W.prev}if(D.dontIndentStatements){while(W.type=="statement"&&D.dontIndentStatements.test(W.info)){W=W.prev}}if(x.indent){var ab=x.indent(ac,W,X);if(typeof ab=="number"){return ab}}var Y=aa==W.type;var Z=W.prev&&W.prev.info=="switch";if(D.allmanIndentation&&/[{(]/.test(aa)){while(W.type!="top"&&W.type!="}"){W=W.prev}return W.indented}if(W.type=="statement"){return W.indented+(aa=="{"?0:L)}if(W.align&&(!P||W.type!=")")){return W.column+(Y?0:1)}if(W.type==")"&&!Y){return W.indented+L}return W.indented+(Y?0:O)+(!Y&&Z&&!/^(?:case|default)\b/.test(X)?O:0)},electricInput:F?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});function o(z){var x={},y=z.split(" ");for(var w=0;w<y.length;++w){x[y[w]]=true}return x}function h(x,w){if(typeof x==="function"){return x(w)}else{return x.propertyIsEnumerable(w)}}var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile";var s="int long char short double float unsigned signed void size_t ptrdiff_t";function m(z,y){if(!y.startOfLine){return false}for(var x,w=null;x=z.peek();){if(x=="\\"&&z.match(/^.$/)){w=m;break}else{if(x=="/"&&z.match(/^\/[\/\*]/,false)){break}}z.next()}y.tokenize=w;return"meta"}function d(w,x){if(x.prevToken=="variable-3"){return"variable-3"}return false}function f(w){w.eatWhile(/[\w\.']/);return"number"}function n(y,x){y.backUp(1);if(y.match(/(R|u8R|uR|UR|LR)/)){var w=y.match(/"([^\s\\()]{0,16})\(/);if(!w){return false}x.cpp11RawStringDelim=w[1];x.tokenize=i;return i(y,x)}if(y.match(/(u8|u|U|L)/)){if(y.match(/["']/,false)){return"string"}return false}y.next();return false}function v(x){var w=/(\w+)::(\w+)$/.exec(x);return w&&w[1]==w[2]}function u(y,x){var w;while((w=y.next())!=null){if(w=='"'&&!y.eat('"')){x.tokenize=null;break}}return"string"}function i(z,x){var y=x.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");var w=z.match(new RegExp(".*?\\)"+y+'"'));if(w){x.tokenize=null}else{z.skipToEnd()}return"string"}function k(w,A){if(typeof w=="string"){w=[w]}var z=[];function y(B){if(B){for(var C in B){if(B.hasOwnProperty(C)){z.push(C)}}}}y(A.keywords);y(A.types);y(A.builtin);y(A.atoms);if(z.length){A.helperType=w[0];r.registerHelper("hintWords",w[0],z)}for(var x=0;x<w.length;++x){r.defineMIME(w[x],A)}}k(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:o(l),types:o(s+" 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:true,atoms:o("null true false"),hooks:{"#":m,"*":d},modeProps:{fold:["brace","include"]}});k(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:o(l+" 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(s+" bool wchar_t"),blockKeywords:o("catch class do else finally for if struct switch try while"),defKeywords:o("class namespace struct enum union"),typeFirstDefinitions:true,atoms:o("true false null"),dontIndentStatements:/^template$/,hooks:{"#":m,"*":d,u:n,U:n,L:n,R:n,"0":f,"1":f,"2":f,"3":f,"4":f,"5":f,"6":f,"7":f,"8":f,"9":f,token:function(y,x,w){if(w=="variable"&&y.peek()=="("&&(x.prevToken==";"||x.prevToken==null||x.prevToken=="}")&&v(y.current())){return"def"}}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}});k("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"),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"),typeFirstDefinitions:true,atoms:o("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(w){w.eatWhile(/[\w\$_]/);return"meta"}},modeProps:{fold:["brace","import"]}});k("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:true,atoms:o("true false null"),hooks:{"@":function(x,w){if(x.eat('"')){w.tokenize=u;return u(x,w)}x.eatWhile(/[\w\$_]/);return"meta"}}});function c(y,w){var x=false;while(!y.eol()){if(!x&&y.match('"""')){w.tokenize=null;break}x=y.next()=="\\"&&!x}return"string"}k("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:true,blockKeywords:o("catch class do else finally for forSome if match switch try while"),defKeywords:o("class def object package trait type val var"),atoms:o("true false null"),indentStatements:false,indentSwitch:false,hooks:{"@":function(w){w.eatWhile(/[\w\$_]/);return"meta"},'"':function(x,w){if(!x.match('""')){return false}w.tokenize=c;return w.tokenize(x,w)},"'":function(w){w.eatWhile(/[\w\$_\xa1-\uffff]/);return"atom"},"=":function(y,x){var w=x.context;if(w.type=="}"&&w.align&&y.eat(">")){x.context=new q(w.indented,w.column,w.type,w.info,null,w.prev);return"operator"}else{return false}}},modeProps:{closeBrackets:{triples:'"'}}});function b(w){return function(B,z){var A=false,y,x=false;while(!B.eol()){if(!w&&!A&&B.match('"')){x=true;break}if(w&&B.match('"""')){x=true;break}y=B.next();if(!A&&y=="$"&&B.match("{")){B.skipTo("}")}A=!A&&y=="\\"&&!w}if(x||!w){z.tokenize=null}return"string"}}k("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"),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:false,indentStatements:false,multiLineStrings:true,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object package interface fun"),atoms:o("true false null this"),hooks:{'"':function(x,w){w.tokenize=b(x.match('""'));return w.tokenize(x,w)}},modeProps:{closeBrackets:{triples:'"'}}});k(["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:false,hooks:{"#":m},modeProps:{fold:["brace","include"]}});k("text/x-nesc",{name:"clike",keywords:o(l+"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(s),blockKeywords:o("case do else for if switch while struct"),atoms:o("null true false"),hooks:{"#":m},modeProps:{fold:["brace","include"]}});k("text/x-objectivec",{name:"clike",keywords:o(l+"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(s),atoms:o("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(w){w.eatWhile(/[\w\$]/);return"keyword"},"#":m,indent:function(y,w,x){if(w.type=="statement"&&/^@\w/.test(x)){return w.indented}}},modeProps:{fold:"brace"}});k("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(s),blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:true,atoms:o("true false null"),hooks:{"#":m},modeProps:{fold:["brace","include"]}});var e=null;function j(w){return function(B,z){var A=false,y,x=false;while(!B.eol()){if(!A&&B.match('"')&&(w=="single"||B.match('""'))){x=true;break}if(!A&&B.match("``")){e=j(w);x=true;break}y=B.next();A=w=="single"&&!A&&y=="\\"}if(x){z.tokenize=null}return"string"}}k("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(w){var x=w.charAt(0);return(x===x.toUpperCase()&&x!==x.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:true,typeFirstDefinitions:true,atoms:o("true false null larger smaller equal empty finished"),indentSwitch:false,styleDefs:false,hooks:{"@":function(w){w.eatWhile(/[\w\$_]/);return"meta"},'"':function(x,w){w.tokenize=j(x.match('""')?"triple":"single");return w.tokenize(x,w)},"`":function(x,w){if(!e||!x.match("`")){return false}w.tokenize=e;e=null;return w.tokenize(x,w)},"'":function(w){w.eatWhile(/[\w\$_\xa1-\uffff]/);return"atom"},token:function(w,y,x){if((x=="variable"||x=="variable-3")&&y.prevToken=="."){return"variable-2"}}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],a)}else{a(CodeMirror)}}})(function(d){function f(m){var k={},l=m.split(" ");for(var j=0;j<l.length;++j){k[l[j]]=true}return k}function e(l,j,k){if(l.length==0){return b(j)}return function(p,o){var n=l[0];for(var m=0;m<n.length;m++){if(p.match(n[m][0])){o.tokenize=e(l.slice(1),j);return n[m][1]}}o.tokenize=b(j,k);return"string"}}function b(k,j){return function(m,l){return c(m,l,k,j)}}function c(n,l,k,j){if(j!==false&&n.match("${",false)||n.match("{$",false)){l.tokenize=null;return"string"}if(j!==false&&n.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)){if(n.match("[",false)){l.tokenize=e([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],k,j)}if(n.match(/\-\>\w/,false)){l.tokenize=e([[["->",null]],[[/[\w]+/,"variable"]]],k,j)}return"variable-2"}var m=false;while(!n.eol()&&(m||j===false||(!n.match("{$",false)&&!n.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,false)))){if(!m&&n.match(k)){l.tokenize=null;l.tokStack.pop();l.tokStack.pop();break}m=n.next()=="\\"&&!m}return"string"}var h="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";var i="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";var a="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";d.registerHelper("hintWords","php",[h,i,a].join(" ").split(" "));d.registerHelper("wordChars","php",/[\w$]/);var g={name:"clike",helperType:"php",keywords:f(h),blockKeywords:f("catch do else elseif for foreach if switch try while finally"),defKeywords:f("class function interface namespace trait"),atoms:f(i),builtin:f(a),multiLineStrings:true,hooks:{"$":function(j){j.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(n,l){var k;if(k=n.match(/<<\s*/)){var j=n.eat(/['"]/);n.eatWhile(/[\w\.]/);var m=n.current().slice(k[0].length+(j?2:1));if(j){n.eat(j)}if(m){(l.tokStack||(l.tokStack=[])).push(m,0);l.tokenize=b(m,j!="'");return"string"}}return false},"#":function(j){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"},"/":function(j){if(j.eat("/")){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"}return false},'"':function(j,k){(k.tokStack||(k.tokStack=[])).push('"',0);k.tokenize=b('"');return"string"},"{":function(j,k){if(k.tokStack&&k.tokStack.length){k.tokStack[k.tokStack.length-1]++}return false},"}":function(j,k){if(k.tokStack&&k.tokStack.length>0&&!--k.tokStack[k.tokStack.length-1]){k.tokenize=b(k.tokStack[k.tokStack.length-2])}return false}}};d.defineMode("php",function(l,m){var n=d.getMode(l,"text/html");var j=d.getMode(l,g);function k(u,s){var r=s.curMode==j;if(u.sol()&&s.pending&&s.pending!='"'&&s.pending!="'"){s.pending=null}if(!r){if(u.match(/^<\?\w*/)){s.curMode=j;if(!s.php){s.php=d.startState(j,n.indent(s.html,""))}s.curState=s.php;return"meta"}if(s.pending=='"'||s.pending=="'"){while(!u.eol()&&u.next()!=s.pending){}var q="string"}else{if(s.pending&&u.pos<s.pending.end){u.pos=s.pending.end;var q=s.pending.style}else{var q=n.token(u,s.curState)}}if(s.pending){s.pending=null}var t=u.current(),p=t.search(/<\?/),o;if(p!=-1){if(q=="string"&&(o=t.match(/[\'\"]$/))&&!/\?>/.test(t)){s.pending=o[0]}else{s.pending={end:u.pos,style:q}}u.backUp(t.length-p)}return q}else{if(r&&s.php.tokenize==null&&u.match("?>")){s.curMode=n;s.curState=s.html;if(!s.php.context.prev){s.php=null}return"meta"}else{return j.token(u,s.curState)}}}return{startState:function(){var o=d.startState(n);var p=m.startOpen?d.startState(j):null;return{html:o,php:p,curMode:m.startOpen?j:n,curState:m.startOpen?p:o,pending:null}},copyState:function(r){var p=r.html,q=d.copyState(n,p),t=r.php,o=t&&d.copyState(j,t),s;if(r.curMode==n){s=q}else{s=o}return{html:q,php:o,curMode:r.curMode,curState:s,pending:r.pending}},token:k,indent:function(p,o){if((p.curMode!=j&&/^\s*<\//.test(o))||(p.curMode==j&&/^\?>/.test(o))){return n.indent(p.html,o)}return p.curMode.indent(p.curState,o)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(o){return{state:o.curState,mode:o.curMode}}}},"htmlmixed","clike");d.defineMIME("application/x-httpd-php","php");d.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});d.defineMIME("text/x-php",g)});
|
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&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;a;){if(a.tagName==l[2]){a=a.prev;break}if(!x.implicitlyClosed.hasOwnProperty(a.tagName))break;a=a.prev}else if(l)for(;a;){var s=x.contextGrabbers[a.tagName];if(!s||!s.hasOwnProperty(l[2]))break;a=a.prev}for(;a&&a.prev&&!a.startOfLine;)a=a.prev;return a?a.indent+w:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,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<arguments.length;n++)$e.cc.push(arguments[n]);return f(y(t,r),K(e,t),b)}function V(e){return"}"==e?f():m(v,V)}function U(e,t){if(Pe){if(":"==e)return f(W);if("?"==t)return f(U)}}function W(e,t){return"variable"==e||"void"==t?"keyof"==t?($e.marked="keyword",f(W)):($e.marked="type",f(Z)):"string"==e||"number"==e||"atom"==e?f(Z):"["==e?f(y("]"),K(W,"]",","),b,Z):"{"==e?f(y("}"),K(H,"}",",;"),b,Z):"("==e?f(K(G,")"),R):void 0}function R(e){if("=>"==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<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return f=t,e}function a(e,t){var r=e.next();if(h[r]){var a=h[r](e,t);if(!1!==a)return a}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=i(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==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?"^":"")+"</s*"+e+"s*>","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<e.length;r++){var a=e[r];if(!a[0]||a[1].test(n(t,a[0])))return a[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,i){var l,d=c.token(n,i.htmlState),p=/\btag\b/.test(d);if(p&&!/[<>\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<r.length;++n)t[r[n]]=!0;return t}function l(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}function s(e,t){if(!t.startOfLine)return!1;for(var r,n=null;r=e.peek();){if("\\"==r&&e.match(/^.$/)){n=s;break}if("/"==r&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=n,"meta"}function c(e,t){return"type"==t.prevToken&&"type"}function u(e){return e.eatWhile(/[\w\.']/),"number"}function d(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var r=e.match(/"([^\s\\()]{0,16})\(/);return!!r&&(t.cpp11RawStringDelim=r[1],t.tokenize=f,f(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function p(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function m(e,t){for(var r;null!=(r=e.next());)if('"'==r&&!e.eat('"')){t.tokenize=null;break}return"string"}function f(e,t){var r=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+r+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function g(t,r){function n(e){if(e)for(var t in e)e.hasOwnProperty(t)&&a.push(t)}"string"==typeof t&&(t=[t]);var a=[];n(r.keywords),n(r.types),n(r.builtin),n(r.atoms),a.length&&(r.helperType=t[0],e.registerHelper("hintWords",t[0],a));for(var i=0;i<t.length;++i)e.defineMIME(t[i],r)}function _(e,t){for(var r=!1;!e.eol();){if(!r&&e.match('"""')){t.tokenize=null;break}r="\\"==e.next()&&!r}return"string"}function h(e){return function(t,r){for(var n,a=!1,i=!1;!t.eol();){if(!e&&!a&&t.match('"')){i=!0;break}if(e&&t.match('"""')){i=!0;break}n=t.next(),!a&&"$"==n&&t.match("{")&&t.skipTo("}"),a=!a&&"\\"==n&&!e}return!i&&e||(r.tokenize=null),"string"}}function y(e){return function(t,r){for(var n,a=!1,i=!1;!t.eol();){if(!a&&t.match('"')&&("single"==e||t.match('""'))){i=!0;break}if(!a&&t.match("``")){v=y(e),i=!0;break}n=t.next(),a="single"==e&&!a&&"\\"==n}return i&&(r.tokenize=null),"string"}}e.defineMode("clike",function(o,s){function c(e,t){var r=e.next();if(q[r]){var n=q[r](e,t);if(!1!==n)return n}if('"'==r||"'"==r)return t.tokenize=u(r),t.tokenize(e,t);if(C.test(r))return m=r,null;if(j.test(r)){if(e.backUp(1),e.match(P))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=d,d(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(I.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(I););return"operator"}if(e.eatWhile(E),T)for(;e.match(T);)e.eatWhile(E);var a=e.current();return l(y,a)?(l(v,a)&&(m="newstatement"),l(w,a)&&(f=!0),"keyword"):l(b,a)?"type":l(k,a)?(l(v,a)&&(m="newstatement"),"builtin"):l(x,a)?"atom":"variable"}function u(e){return function(t,r){for(var n,a=!1,i=!1;null!=(n=t.next());){if(n==e&&!a){i=!0;break}a=!a&&"\\"==n}return(i||!a&&!S)&&(r.tokenize=null),"string"}}function d(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=null;break}n="*"==r}return"comment"}function p(e,t){s.typeFirstDefinitions&&e.eol()&&i(t.context)&&(t.typeAtEndOfLine=a(e,t,e.pos))}var m,f,g=o.indentUnit,_=s.statementIndentUnit||g,h=s.dontAlignCalls,y=s.keywords||{},b=s.types||{},k=s.builtin||{},v=s.blockKeywords||{},w=s.defKeywords||{},x=s.atoms||{},q=s.hooks||{},S=s.multiLineStrings,M=!1!==s.indentStatements,z=!1!==s.indentSwitch,T=s.namespaceSeparator,C=s.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,j=s.numberStart||/[\d\.]/,P=s.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,I=s.isOperatorChar||/[+\-*&%=<>!?|\/]/,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<r.length;++n)t[r[n]]=!0;return t}function r(e,t,a){return 0==e.length?n(t):function(i,o){for(var l=e[0],s=0;s<l.length;s++)if(i.match(l[s][0]))return o.tokenize=r(e.slice(1),t),l[s][1];return o.tokenize=n(t,a),"string"}}function n(e,t){return function(r,n){return a(r,n,e,t)}}function a(e,t,n,a){if(!1!==a&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(!1!==a&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=r([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],n,a)),e.match(/\-\>\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<r.pending.end){t.pos=r.pending.end;var o=r.pending.style}else var o=a.token(t,r.curState);r.pending&&(r.pending=null);var l,s=t.current(),c=s.search(/<\?/);return-1!=c&&("string"==o&&(l=s.match(/[\'\"]$/))&&!/\?>/.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);
|
@@ -0,0 +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);
|
@@ -9,15 +9,16 @@
|
|
9
9
|
(function() {
|
10
10
|
CKEDITOR.plugins.add('codemirror', {
|
11
11
|
icons: 'searchcode,autoformat,commentselectedrange,uncommentselectedrange,autocomplete', // %REMOVE_LINE_CORE%
|
12
|
-
lang: '
|
13
|
-
version: 1.
|
12
|
+
lang: 'en,ru', // %REMOVE_LINE_CORE%
|
13
|
+
version: '1.17.3',
|
14
14
|
init: function (editor) {
|
15
15
|
var rootPath = this.path,
|
16
16
|
defaultConfig = {
|
17
17
|
autoCloseBrackets: true,
|
18
18
|
autoCloseTags: true,
|
19
19
|
autoFormatOnStart: false,
|
20
|
-
autoFormatOnUncomment:
|
20
|
+
autoFormatOnUncomment: false,
|
21
|
+
autoLoadCodeMirror: true,
|
21
22
|
continueComments: true,
|
22
23
|
enableCodeFolding: true,
|
23
24
|
enableCodeFormatting: true,
|
@@ -28,6 +29,7 @@
|
|
28
29
|
lineWrapping: true,
|
29
30
|
mode: 'htmlmixed',
|
30
31
|
matchBrackets: true,
|
32
|
+
maxHighlightLineLength: 1000,
|
31
33
|
matchTags: true,
|
32
34
|
showAutoCompleteButton: true,
|
33
35
|
showCommentButton: true,
|
@@ -37,7 +39,7 @@
|
|
37
39
|
showUncommentButton: true,
|
38
40
|
styleActiveLine: true,
|
39
41
|
theme: 'default',
|
40
|
-
|
42
|
+
useBeautifyOnStart: false
|
41
43
|
};
|
42
44
|
|
43
45
|
// Get Config & Lang
|
@@ -56,21 +58,82 @@
|
|
56
58
|
if (editor.plugins.bbcode && config.mode.indexOf("bbcode") <= 0) {
|
57
59
|
config.mode = "bbcode";
|
58
60
|
}
|
59
|
-
|
61
|
+
var requirePresent = "function" === typeof require;
|
62
|
+
|
63
|
+
if (requirePresent){
|
64
|
+
var location = window.CKEDITOR_GETURL('plugins/codemirror/js');
|
65
|
+
require.config({
|
66
|
+
packages: [{
|
67
|
+
name: 'codemirror',
|
68
|
+
location: location,
|
69
|
+
main: 'codemirror.min.js'
|
70
|
+
}, {
|
71
|
+
name: 'codemirror-mode-twig',
|
72
|
+
location: location,
|
73
|
+
main: 'codemirror.mode.twig.min.js'
|
74
|
+
}, {
|
75
|
+
name: 'codemirror-mode-html',
|
76
|
+
location: location,
|
77
|
+
main: 'codemirror.mode.htmlmixed.min.js'
|
78
|
+
}, {
|
79
|
+
name: 'codemirror-mode-php',
|
80
|
+
location: location,
|
81
|
+
main: 'codemirror.mode.php.min.js'
|
82
|
+
}, {
|
83
|
+
name: 'codemirror-mode-js',
|
84
|
+
location: location,
|
85
|
+
main: 'codemirror.mode.js.min.js'
|
86
|
+
}, {
|
87
|
+
name: 'codemirror-addons',
|
88
|
+
location: location,
|
89
|
+
main: 'codemirror.addons.min.js'
|
90
|
+
}, {
|
91
|
+
name: 'codemirror-addon-search',
|
92
|
+
location: location,
|
93
|
+
main: 'codemirror.addons.search.min.js'
|
94
|
+
}, {
|
95
|
+
name: 'codemirror-beautify',
|
96
|
+
location: location,
|
97
|
+
main: 'beautify.min.js'
|
98
|
+
}],
|
99
|
+
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']
|
108
|
+
},
|
109
|
+
map: {
|
110
|
+
'*': {
|
111
|
+
//all the requires pointing to ../../lib/codemirror from addons will be redirected to module named codemirror.js
|
112
|
+
//which is located in bundle 'codemirror' whose js file is codemirror.min.js
|
113
|
+
'lib/codemirror': 'codemirror.js'
|
114
|
+
}
|
115
|
+
}
|
116
|
+
});
|
117
|
+
}
|
60
118
|
// Source mode isn't available in inline mode yet.
|
61
119
|
if (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE || editor.plugins.sourcedialog) {
|
62
120
|
|
63
121
|
// Override Source Dialog
|
64
122
|
CKEDITOR.dialog.add('sourcedialog', function (editor) {
|
65
|
-
var
|
66
|
-
|
67
|
-
|
123
|
+
var sizeDialog = CKEDITOR.document.getWindow().getViewPaneSize(),
|
124
|
+
minWidth = Math.min(sizeDialog.width - 70, 800),
|
125
|
+
minHeight = sizeDialog.height / 1.5,
|
68
126
|
oldData;
|
69
127
|
|
70
|
-
function loadCodeMirrorInline(editor, textarea) {
|
128
|
+
function loadCodeMirrorInline(editor, textarea, dialog) {
|
129
|
+
var size = dialog.getSize(),
|
130
|
+
width = size.width,
|
131
|
+
height = size.height / 1.5;
|
132
|
+
|
71
133
|
window["codemirror_" + editor.id] = CodeMirror.fromTextArea(textarea, {
|
72
134
|
mode: config.mode,
|
73
135
|
matchBrackets: config.matchBrackets,
|
136
|
+
maxHighlightLineLength: config.maxHighlightLineLength,
|
74
137
|
matchTags: config.matchTags,
|
75
138
|
workDelay: 300,
|
76
139
|
workTime: 35,
|
@@ -96,8 +159,9 @@
|
|
96
159
|
}
|
97
160
|
},
|
98
161
|
foldGutter: true,
|
99
|
-
gutters: ["CodeMirror-
|
162
|
+
gutters: ["CodeMirror-linenumbbers", "CodeMirror-foldgutter"]
|
100
163
|
});
|
164
|
+
|
101
165
|
|
102
166
|
var holderHeight = height + 'px';
|
103
167
|
var holderWidth = width + 'px';
|
@@ -106,7 +170,7 @@
|
|
106
170
|
window["codemirror_" + editor.id].config = config;
|
107
171
|
|
108
172
|
if (config.autoFormatOnStart) {
|
109
|
-
if (config.
|
173
|
+
if (config.useBeautifyOnStart) {
|
110
174
|
var indent_size = 4,
|
111
175
|
indent_char = ' ',
|
112
176
|
brace_style = 'collapse'; //collapse, expand, end-expand
|
@@ -137,6 +201,7 @@
|
|
137
201
|
editor.fire('change', this);
|
138
202
|
});
|
139
203
|
|
204
|
+
|
140
205
|
window["codemirror_" + editor.id].setSize(holderWidth, holderHeight);
|
141
206
|
|
142
207
|
// Enable Code Folding (Requires 'lineNumbers' to be set to 'true')
|
@@ -170,15 +235,45 @@
|
|
170
235
|
}*/
|
171
236
|
}
|
172
237
|
});
|
238
|
+
|
239
|
+
if (editor.plugins.textselection && textRange && !editor.config.fullPage) {
|
240
|
+
|
241
|
+
var start, end;
|
242
|
+
|
243
|
+
start = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.startOffset);
|
244
|
+
|
245
|
+
if (typeof (textRange.endOffset) == 'undefined') {
|
246
|
+
window["codemirror_" + editor.id].focus();
|
247
|
+
window["codemirror_" + editor.id].setCursor(start);
|
248
|
+
} else {
|
249
|
+
window["codemirror_" + editor.id].focus();
|
250
|
+
end = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.endOffset);
|
251
|
+
window["codemirror_" + editor.id].setSelection(start, end);
|
252
|
+
}
|
253
|
+
}
|
173
254
|
}
|
174
255
|
|
175
256
|
|
176
257
|
return {
|
177
258
|
title: editor.lang.sourcedialog.title,
|
178
|
-
minWidth:
|
179
|
-
minHeight:
|
180
|
-
resizable
|
181
|
-
|
259
|
+
minWidth: minWidth,
|
260
|
+
minHeight: minHeight,
|
261
|
+
resizable: CKEDITOR.DIALOG_RESIZE_BOTH,
|
262
|
+
onLoad: function() {
|
263
|
+
this.on('resize',
|
264
|
+
function (event) {
|
265
|
+
var parts = event.sender.parts;
|
266
|
+
var title = parts.title;
|
267
|
+
var footer = parts.footer;
|
268
|
+
|
269
|
+
var holderHeight = (event.data.height - title.$.offsetHeight - footer.$.offsetHeight) + 'px';
|
270
|
+
var holderWidth = event.data.width + 'px';
|
271
|
+
|
272
|
+
window["codemirror_" + editor.id].setSize(holderWidth, holderHeight);
|
273
|
+
},
|
274
|
+
this);
|
275
|
+
},
|
276
|
+
onShow: function (event) {
|
182
277
|
// Set Elements
|
183
278
|
this.getContentElement('main', 'data').focus();
|
184
279
|
this.getContentElement('main', 'AutoComplete').setValue(config.autoCloseTags, true);
|
@@ -188,33 +283,45 @@
|
|
188
283
|
// Load the content
|
189
284
|
this.setValueOf('main', 'data', oldData = editor.getData());
|
190
285
|
|
191
|
-
if (
|
192
|
-
CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css');
|
193
|
-
}
|
194
|
-
|
195
|
-
if (config.theme.length && config.theme != 'default' && !IsStyleSheetAlreadyLoaded(rootPath + 'theme/' + config.theme + '.css')) {
|
196
|
-
CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css');
|
197
|
-
}
|
198
|
-
|
199
|
-
if (typeof (CodeMirror) == 'undefined') {
|
286
|
+
if (config.autoLoadCodeMirror) {
|
200
287
|
|
201
|
-
|
288
|
+
if (!IsStyleSheetAlreadyLoaded(rootPath + 'css/codemirror.min.css')) {
|
289
|
+
CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css');
|
290
|
+
}
|
202
291
|
|
203
|
-
|
204
|
-
|
292
|
+
if (config.theme.length &&
|
293
|
+
config.theme != 'default' &&
|
294
|
+
!IsStyleSheetAlreadyLoaded(rootPath + 'theme/' + config.theme + '.css')) {
|
295
|
+
CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css');
|
296
|
+
}
|
297
|
+
if(requirePresent) {
|
298
|
+
require(getCodeMirrorDependencies(),function (codemirror, addons){
|
299
|
+
loadCodeMirrorInline(editor, textArea, event.sender);
|
205
300
|
});
|
206
|
-
});
|
207
|
-
|
208
|
-
|
209
|
-
} else {
|
210
|
-
//loadCodeMirrorInline(editor, textArea);
|
211
|
-
if (CodeMirror.prototype['autoFormatAll']) {
|
212
|
-
loadCodeMirrorInline(editor, textArea);
|
213
301
|
} else {
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
302
|
+
if (typeof (CodeMirror) == 'undefined') {
|
303
|
+
|
304
|
+
CKEDITOR.scriptLoader.load(rootPath + 'js/codemirror.min.js',
|
305
|
+
function() {
|
306
|
+
|
307
|
+
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
|
308
|
+
function() {
|
309
|
+
loadCodeMirrorInline(editor, textArea, event.sender);
|
310
|
+
});
|
311
|
+
});
|
312
|
+
|
313
|
+
|
314
|
+
} else {
|
315
|
+
if (CodeMirror.prototype['autoFormatAll']) {
|
316
|
+
loadCodeMirrorInline(editor, textArea, event.sender);
|
317
|
+
} else {
|
318
|
+
// loading the add-on scripts.
|
319
|
+
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
|
320
|
+
function() {
|
321
|
+
loadCodeMirrorInline(editor, textArea, event.sender);
|
322
|
+
});
|
323
|
+
}
|
324
|
+
}
|
218
325
|
}
|
219
326
|
}
|
220
327
|
},
|
@@ -255,8 +362,11 @@
|
|
255
362
|
|
256
363
|
// Avoid unnecessary setData. Also preserve selection
|
257
364
|
// when user changed his mind and goes back to wysiwyg editing.
|
258
|
-
if (newData === oldData)
|
365
|
+
if (newData === oldData) {
|
366
|
+
editor.fire('blur', this);
|
367
|
+
editor.fire('focus', this);
|
259
368
|
return true;
|
369
|
+
}
|
260
370
|
|
261
371
|
// Set data asynchronously to avoid errors in IE.
|
262
372
|
CKEDITOR.env.ie ? CKEDITOR.tools.setTimeout(setData, 0, this, newData) : setData.call(this, newData);
|
@@ -343,8 +453,8 @@
|
|
343
453
|
id: 'data',
|
344
454
|
dir: 'ltr',
|
345
455
|
inputStyle: 'cursor:auto;' +
|
346
|
-
'width:' +
|
347
|
-
'height:' +
|
456
|
+
'width:' + minWidth + 'px;' +
|
457
|
+
'height:' + minHeight + 'px;' +
|
348
458
|
'tab-size:4;' +
|
349
459
|
'text-align:left;',
|
350
460
|
'class': 'cke_source cke_enable_context_menu'
|
@@ -529,36 +639,84 @@
|
|
529
639
|
}
|
530
640
|
|
531
641
|
editor.addMode('source', function (callback) {
|
532
|
-
if (!
|
533
|
-
|
534
|
-
}
|
535
|
-
|
536
|
-
if (config.theme.length && config.theme != 'default' && !IsStyleSheetAlreadyLoaded(rootPath + 'theme/' + config.theme + '.css')) {
|
537
|
-
CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css');
|
642
|
+
if (!config.autoLoadCodeMirror) {
|
643
|
+
return;
|
538
644
|
}
|
539
645
|
|
540
|
-
if (
|
646
|
+
if (!IsStyleSheetAlreadyLoaded(rootPath + 'css/codemirror.min.css')) {
|
647
|
+
CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css');
|
648
|
+
}
|
541
649
|
|
542
|
-
|
650
|
+
if (config.theme.length &&
|
651
|
+
config.theme != 'default' &&
|
652
|
+
!IsStyleSheetAlreadyLoaded(rootPath + 'theme/' + config.theme + '.css')) {
|
653
|
+
CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css');
|
654
|
+
}
|
543
655
|
|
544
|
-
|
545
|
-
|
546
|
-
callback();
|
547
|
-
});
|
548
|
-
});
|
549
|
-
} else {
|
550
|
-
if (CodeMirror.prototype['autoFormatAll']) {
|
656
|
+
if (requirePresent) {
|
657
|
+
require(getCodeMirrorDependencies(), function () {
|
551
658
|
loadCodeMirror(editor);
|
552
659
|
callback();
|
660
|
+
});
|
661
|
+
} else {
|
662
|
+
if (typeof (CodeMirror) == 'undefined') {
|
663
|
+
|
664
|
+
CKEDITOR.scriptLoader.load(rootPath + 'js/codemirror.min.js',
|
665
|
+
function() {
|
666
|
+
|
667
|
+
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
|
668
|
+
function() {
|
669
|
+
loadCodeMirror(editor);
|
670
|
+
callback();
|
671
|
+
});
|
672
|
+
});
|
553
673
|
} else {
|
554
|
-
|
555
|
-
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(), function() {
|
674
|
+
if (CodeMirror.prototype['autoFormatAll']) {
|
556
675
|
loadCodeMirror(editor);
|
557
676
|
callback();
|
558
|
-
}
|
677
|
+
} else {
|
678
|
+
// loading the add-on scripts.
|
679
|
+
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
|
680
|
+
function() {
|
681
|
+
loadCodeMirror(editor);
|
682
|
+
callback();
|
683
|
+
});
|
684
|
+
}
|
559
685
|
}
|
560
686
|
}
|
687
|
+
|
561
688
|
});
|
689
|
+
function getCodeMirrorDependencies() {
|
690
|
+
var dependencies = ['core', 'addons'];
|
691
|
+
switch (config.mode) {
|
692
|
+
case "bbcode":
|
693
|
+
case "bbcodemixed":
|
694
|
+
dependencies.push('modeHtml');
|
695
|
+
break;
|
696
|
+
case "application/x-httpd-php":
|
697
|
+
dependencies.push('modePHP');
|
698
|
+
break;
|
699
|
+
case "text/javascript":
|
700
|
+
dependencies.push('modeJs');
|
701
|
+
break;
|
702
|
+
case "twig":
|
703
|
+
dependencies.push('modeTwig');
|
704
|
+
break;
|
705
|
+
case "htmlmixed":
|
706
|
+
case "text/html":
|
707
|
+
default:
|
708
|
+
dependencies.push('modeHtml');
|
709
|
+
}
|
710
|
+
|
711
|
+
if (config.useBeautifyOnStart) {
|
712
|
+
dependencies.push('beautifyModule');
|
713
|
+
}
|
714
|
+
|
715
|
+
if (config.enableSearchTools) {
|
716
|
+
dependencies.push('addonSearch');
|
717
|
+
}
|
718
|
+
return dependencies;
|
719
|
+
}
|
562
720
|
|
563
721
|
function getCodeMirrorScripts() {
|
564
722
|
var scriptFiles = [rootPath + 'js/codemirror.addons.min.js'];
|
@@ -600,11 +758,17 @@
|
|
600
758
|
}
|
601
759
|
|
602
760
|
break;
|
761
|
+
case "twig":
|
762
|
+
{
|
763
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.twig.min.js');
|
764
|
+
}
|
765
|
+
|
766
|
+
break;
|
603
767
|
default:
|
604
768
|
scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
|
605
769
|
}
|
606
770
|
|
607
|
-
if (config.
|
771
|
+
if (config.useBeautifyOnStart) {
|
608
772
|
scriptFiles.push(rootPath + 'js/beautify.min.js');
|
609
773
|
}
|
610
774
|
|
@@ -705,6 +869,7 @@
|
|
705
869
|
window["codemirror_" + editor.id] = CodeMirror.fromTextArea(sourceAreaElement.$, {
|
706
870
|
mode: config.mode,
|
707
871
|
matchBrackets: config.matchBrackets,
|
872
|
+
maxHighlightLineLength: config.maxHighlightLineLength,
|
708
873
|
matchTags: config.matchTags,
|
709
874
|
workDelay: 300,
|
710
875
|
workTime: 35,
|
@@ -732,7 +897,7 @@
|
|
732
897
|
// Store config so we can access it within commands etc.
|
733
898
|
window["codemirror_" + editor.id].config = config;
|
734
899
|
if (config.autoFormatOnStart) {
|
735
|
-
if (config.
|
900
|
+
if (config.useBeautifyOnStart) {
|
736
901
|
var indent_size = 4;
|
737
902
|
var indent_char = ' ';
|
738
903
|
var brace_style = 'collapse'; //collapse, expand, end-expand
|
@@ -857,7 +1022,7 @@
|
|
857
1022
|
}
|
858
1023
|
|
859
1024
|
editor.on('beforeModeUnload', function (evt) {
|
860
|
-
if (editor.mode === 'source' && editor.plugins.textselection) {
|
1025
|
+
if (editor.mode === 'source' && editor.plugins.textselection && !editor.config.fullPage) {
|
861
1026
|
|
862
1027
|
var range = editor.getTextSelection();
|
863
1028
|
|
@@ -882,7 +1047,7 @@
|
|
882
1047
|
if (editor.mode === 'source') {
|
883
1048
|
editor.getCommand('autoCompleteToggle').setState(window["codemirror_" + editor.id].config.autoCloseTags ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
|
884
1049
|
|
885
|
-
if (editor.plugins.textselection && textRange) {
|
1050
|
+
if (editor.plugins.textselection && textRange && !editor.config.fullPage) {
|
886
1051
|
|
887
1052
|
//textRange.element = new CKEDITOR.dom.element(editor._.editable.$);
|
888
1053
|
//textRange.select();
|
@@ -920,8 +1085,7 @@
|
|
920
1085
|
|
921
1086
|
editor.on('instanceReady', function (evt) {
|
922
1087
|
|
923
|
-
//
|
924
|
-
editor.container.getPrivate().events.contextmenu.listeners.splice(0, 1);
|
1088
|
+
//editor.container.getPrivate().events.contextmenu.listeners.splice(0, 1);
|
925
1089
|
|
926
1090
|
var selectAllCommand = editor.commands.selectAll;
|
927
1091
|
|
@@ -1143,13 +1307,5 @@ function OffSetToLineChannel(ed, n) {
|
|
1143
1307
|
}
|
1144
1308
|
|
1145
1309
|
function IsStyleSheetAlreadyLoaded(href) {
|
1146
|
-
|
1147
|
-
|
1148
|
-
for (var i = 0; i < links.count() ; i++) {
|
1149
|
-
if (links.getItem(i).$.href === href) {
|
1150
|
-
return true;
|
1151
|
-
}
|
1152
|
-
}
|
1153
|
-
|
1154
|
-
return false;
|
1310
|
+
return CKEDITOR.document.getHead().findOne('link[href="' + href + '"]') != null;
|
1155
1311
|
}
|