card 1.95.1 → 1.95.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/db/seed/new/card_actions.yml +1172 -1116
- data/db/seed/new/card_acts.yml +2 -2
- data/db/seed/new/card_references.yml +576 -583
- data/db/seed/new/cards.yml +2626 -1604
- data/db/seed/new/schema_migrations.yml +1 -23
- data/db/seed/new/schema_migrations_core_cards.yml +39 -35
- data/db/seed/test/fixtures/card_actions.yml +2012 -1980
- data/db/seed/test/fixtures/card_acts.yml +447 -447
- data/db/seed/test/fixtures/card_changes.yml +66 -66
- data/db/seed/test/fixtures/card_references.yml +908 -915
- data/db/seed/test/fixtures/cards.yml +3027 -2989
- data/db/seed/test/fixtures/schema_migrations.yml +8 -32
- data/db/seed/test/fixtures/schema_migrations_core_cards.yml +38 -36
- data/db/version_core_cards.txt +1 -1
- data/lib/card/env/location.rb +5 -5
- data/lib/card/mod.rb +26 -14
- data/lib/card/mod/dirs.rb +8 -0
- data/lib/cardio.rb +2 -0
- data/lib/cardio/schema.rb +1 -1
- data/lib/generators/card/mod/USAGE +16 -0
- data/lib/generators/card/mod/mod_generator.rb +27 -0
- data/lib/generators/card/set/USAGE +6 -6
- data/mod/ace_editor/lib/javascript/script_ace.js +11 -18196
- data/mod/ace_editor/lib/javascript/script_ace_config.js.coffee +1 -1
- data/mod/ace_editor/public/assets/ace/ext-beautify.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-elastic_tabstops_lite.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-emmet.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-error_marker.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-keybinding_menu.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-language_tools.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-linking.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-modelist.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-options.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-searchbox.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-settings_menu.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-spellcheck.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-split.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-static_highlight.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-statusbar.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-textarea.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-themelist.js +9 -0
- data/mod/ace_editor/public/assets/ace/ext-whitespace.js +9 -0
- data/mod/ace_editor/public/assets/ace/keybinding-emacs.js +9 -0
- data/mod/ace_editor/public/assets/ace/keybinding-vim.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-abap.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-abc.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-actionscript.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-ada.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-apache_conf.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-applescript.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-asciidoc.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-asl.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-assembly_x86.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-autohotkey.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-batchfile.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-bro.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-c9search.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-c_cpp.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-cirru.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-clojure.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-cobol.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-coffee.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-coldfusion.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-csharp.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-csound_document.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-csound_orchestra.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-csound_score.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-csp.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-css.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-curly.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-d.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-dart.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-diff.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-django.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-dockerfile.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-dot.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-drools.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-edifact.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-eiffel.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-ejs.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-elixir.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-elm.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-erlang.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-forth.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-fortran.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-ftl.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-gcode.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-gherkin.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-gitignore.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-glsl.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-gobstones.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-golang.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-graphqlschema.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-groovy.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-haml.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-handlebars.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-haskell.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-haskell_cabal.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-haxe.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-hjson.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-html.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-html_elixir.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-html_ruby.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-ini.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-io.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-jack.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-jade.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-java.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-javascript.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-json.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-jsoniq.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-jsp.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-jssm.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-jsx.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-julia.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-kotlin.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-latex.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-less.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-liquid.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-lisp.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-livescript.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-logiql.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-lsl.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-lua.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-luapage.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-lucene.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-makefile.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-markdown.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-mask.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-matlab.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-maze.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-mel.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-mixal.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-mushcode.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-mysql.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-nix.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-nsis.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-objectivec.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-ocaml.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-pascal.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-perl.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-pgsql.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-php.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-pig.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-plain_text.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-powershell.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-praat.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-prolog.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-properties.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-protobuf.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-python.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-r.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-razor.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-rdoc.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-red.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-redshift.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-rhtml.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-rst.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-ruby.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-rust.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-sass.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-scad.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-scala.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-scheme.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-scss.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-sh.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-sjs.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-smarty.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-snippets.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-soy_template.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-space.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-sparql.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-sql.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-sqlserver.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-stylus.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-svg.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-swift.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-tcl.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-tex.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-text.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-textile.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-toml.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-tsx.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-turtle.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-twig.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-typescript.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-vala.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-vbscript.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-velocity.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-verilog.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-vhdl.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-wollok.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-xml.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-xquery.js +9 -0
- data/mod/ace_editor/public/assets/ace/mode-yaml.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/abap.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/abc.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/actionscript.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/ada.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/apache_conf.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/applescript.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/asciidoc.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/asl.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/assembly_x86.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/autohotkey.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/batchfile.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/bro.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/c9search.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/c_cpp.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/cirru.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/clojure.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/cobol.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/coffee.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/coldfusion.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/csharp.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/csound_document.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/csound_orchestra.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/csound_score.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/csp.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/css.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/curly.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/d.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/dart.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/diff.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/django.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/dockerfile.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/dot.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/drools.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/edifact.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/eiffel.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/ejs.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/elixir.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/elm.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/erlang.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/forth.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/fortran.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/ftl.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/gcode.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/gherkin.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/gitignore.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/glsl.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/gobstones.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/golang.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/graphqlschema.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/groovy.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/haml.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/handlebars.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/haskell.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/haskell_cabal.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/haxe.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/hjson.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/html.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/html_elixir.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/html_ruby.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/ini.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/io.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/jack.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/jade.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/java.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/javascript.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/json.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/jsoniq.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/jsp.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/jssm.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/jsx.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/julia.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/kotlin.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/latex.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/less.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/liquid.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/lisp.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/livescript.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/logiql.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/lsl.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/lua.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/luapage.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/lucene.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/makefile.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/markdown.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/mask.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/matlab.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/maze.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/mel.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/mixal.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/mushcode.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/mysql.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/nix.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/nsis.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/objectivec.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/ocaml.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/pascal.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/perl.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/pgsql.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/php.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/pig.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/plain_text.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/powershell.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/praat.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/prolog.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/properties.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/protobuf.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/python.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/r.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/razor.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/rdoc.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/red.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/redshift.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/rhtml.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/rst.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/ruby.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/rust.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/sass.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/scad.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/scala.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/scheme.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/scss.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/sh.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/sjs.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/smarty.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/snippets.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/soy_template.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/space.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/sparql.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/sql.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/sqlserver.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/stylus.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/svg.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/swift.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/tcl.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/tex.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/text.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/textile.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/toml.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/tsx.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/turtle.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/twig.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/typescript.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/vala.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/vbscript.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/velocity.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/verilog.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/vhdl.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/wollok.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/xml.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/xquery.js +9 -0
- data/mod/ace_editor/public/assets/ace/snippets/yaml.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-ambiance.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-chaos.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-chrome.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-clouds.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-clouds_midnight.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-cobalt.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-crimson_editor.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-dawn.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-dracula.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-dreamweaver.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-eclipse.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-github.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-gob.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-gruvbox.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-idle_fingers.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-iplastic.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-katzenmilch.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-kr_theme.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-kuroir.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-merbivore.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-merbivore_soft.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-mono_industrial.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-monokai.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-pastel_on_dark.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-solarized_dark.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-solarized_light.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-sqlserver.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-terminal.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-textmate.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-tomorrow.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-tomorrow_night.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-tomorrow_night_blue.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-tomorrow_night_bright.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-tomorrow_night_eighties.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-twilight.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-vibrant_ink.js +9 -0
- data/mod/ace_editor/public/assets/ace/theme-xcode.js +9 -0
- data/mod/ace_editor/public/assets/ace/worker-coffee.js +1 -0
- data/mod/ace_editor/public/assets/ace/worker-css.js +1 -0
- data/mod/ace_editor/public/assets/ace/worker-html.js +1 -0
- data/mod/ace_editor/public/assets/ace/worker-javascript.js +1 -0
- data/mod/ace_editor/public/assets/ace/worker-json.js +1 -0
- data/mod/ace_editor/public/assets/ace/worker-lua.js +1 -0
- data/mod/ace_editor/public/assets/ace/worker-php.js +1 -0
- data/mod/ace_editor/public/assets/ace/worker-xml.js +1 -0
- data/mod/ace_editor/public/assets/ace/worker-xquery.js +1 -0
- data/mod/ace_editor/set/self/script_ace.rb +1 -1
- data/mod/basic_formats/set/all/head.rb +1 -1
- data/mod/basic_formats/set/all/json.rb +1 -1
- data/mod/basic_types/set/type/json.rb +1 -1
- data/mod/bootstrap/lib/stylesheets/font_awesome.css +2 -2
- data/mod/bootstrap/lib/stylesheets/material_icons.css +4 -4
- data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +8 -10
- data/mod/bootstrap/public/assets/fonts/FontAwesome.otf +0 -0
- data/mod/bootstrap/public/assets/fonts/MaterialIcons-Regular.eot +0 -0
- data/mod/bootstrap/public/assets/fonts/MaterialIcons-Regular.ijmap +1 -0
- data/mod/bootstrap/public/assets/fonts/MaterialIcons-Regular.svg +2373 -0
- data/mod/bootstrap/public/assets/fonts/MaterialIcons-Regular.ttf +0 -0
- data/mod/bootstrap/public/assets/fonts/MaterialIcons-Regular.woff +0 -0
- data/mod/bootstrap/public/assets/fonts/MaterialIcons-Regular.woff2 +0 -0
- data/mod/bootstrap/public/assets/fonts/fontawesome-webfont.eot +0 -0
- data/mod/bootstrap/public/assets/fonts/fontawesome-webfont.svg +2671 -0
- data/mod/bootstrap/public/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/mod/bootstrap/public/assets/fonts/fontawesome-webfont.woff +0 -0
- data/mod/bootstrap/public/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/mod/bootstrap/public/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/mod/bootstrap/public/assets/fonts/glyphicons-halflings-regular.svg +288 -0
- data/mod/bootstrap/public/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/mod/bootstrap/public/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/mod/bootstrap/public/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/mod/bootstrap/set/abstract/bootswatch_theme.rb +1 -1
- data/mod/core/format/html_format.rb +1 -0
- data/mod/core/set/all/export.rb +5 -1
- data/mod/core/spec/set/all/export_spec.rb +5 -1
- data/mod/machines/file/all_script_machine_output/file.js +67 -48800
- data/mod/machines/file/all_style_machine_output/file.css +6 -6
- data/mod/machines/file/script_html5shiv_printshiv_machine_output/file.js +1 -1
- data/mod/machines/lib/javascript/decko.js.coffee +1 -1
- data/mod/machines/lib/javascript/decko_layout.js.coffee +0 -1
- data/mod/machines/lib/stylesheets/style_cards.scss +51 -321
- data/mod/machines/lib/stylesheets/style_jquery_ui_smoothness.css +10 -10
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_222222_256x240.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_454545_256x240.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_888888_256x240.png +0 -0
- data/mod/machines/public/assets/jquery-ui-smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/mod/machines/spec/set/type/scss_spec.rb +7 -11
- data/mod/prosemirror_editor/db/migrate_core_cards/{20160804112547_add_prosemirror_cards.rb → 20160804112548_add_prosemirror_cards.rb} +10 -7
- data/mod/prosemirror_editor/lib/stylesheets/style_prosemirror.scss +298 -0
- data/mod/prosemirror_editor/set/self/style_prosemirror.rb +3 -0
- data/mod/standard/set/all/rich_html/modal.rb +5 -1
- data/mod/standard/spec/set/self/head_spec.rb +2 -2
- data/mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee +1 -1
- data/mod/tinymce_editor/public/assets/tinymce/jquery.tinymce.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/langs/readme.md +3 -0
- data/mod/tinymce_editor/public/assets/tinymce/license.txt +504 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/advlist/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/anchor/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autolink/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autoresize/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autosave/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/bbcode/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/charmap/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/code/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/codesample/css/prism.css +138 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/codesample/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/colorpicker/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/contextmenu/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/directionality/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/fullpage/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/help/img/logo.png +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/help/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/hr/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/image/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/imagetools/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/importcss/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/link/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/lists/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/media/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/noneditable/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/pagebreak/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/paste/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/preview/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/print/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/save/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/searchreplace/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/spellchecker/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/tabfocus/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/table/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/template/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/textcolor/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/textpattern/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/toc/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualblocks/css/visualblocks.css +154 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualblocks/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualchars/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/wordcount/plugin.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.inline.min.css +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.min.css +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/content.mobile.min.css +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.svg +131 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/object.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.min.css +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/lightgray/skin.mobile.min.css +2 -0
- data/mod/tinymce_editor/public/assets/tinymce/themes/inlite/theme.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/themes/mobile/theme.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/themes/modern/theme.min.js +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/tinymce.min.js +2 -0
- metadata +492 -5
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e,n){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===n?null:{"list-style-type":n})},o=function(n){n.addCommand("ApplyUnorderedListStyle",function(t,e){s(n,"UL",e["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(t,e){s(n,"OL",e["list-style-type"])})},e=function(t){var e=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return e?e.split(/[ ,]/):[]},n=function(t){var e=t.getParam("advlist_bullet_styles","default,circle,disc,square");return e?e.split(/[ ,]/):[]},u=function(t){return t&&/^(TH|TD)$/.test(t.nodeName)},c=function(r){return function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&(n=t,(e=r).$.contains(e.getBody(),n));var e,n}},d=function(t){var e=t.dom.getParent(t.selection.getNode(),"ol,ul");return t.dom.getStyle(e,"listStyleType")||""},p=function(t){return a.map(t,function(t){return{text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"===t?"":t}})},f=function(i,l){return function(t){var o=t.control;i.on("NodeChange",function(t){var e=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}(t.parents,u),n=-1!==e?t.parents.slice(0,e):t.parents,r=a.grep(n,c(i));o.active(0<r.length&&r[0].nodeName===l)})}},m=function(e,t,n,r,o,i){var l;e.addButton(t,{active:!1,type:"splitbutton",tooltip:n,menu:p(i),onPostRender:f(e,o),onshow:(l=e,function(t){var e=d(l);t.control.items().each(function(t){t.active(t.settings.data===e)})}),onselect:function(t){s(e,o,t.control.settings.data)},onclick:function(){e.execCommand(r)}})},r=function(t,e,n,r,o,i){var l,a,s,u,c;0<i.length?m(t,e,n,r,o,i):(a=e,s=n,u=r,c=o,(l=t).addButton(a,{active:!1,type:"button",tooltip:s,onPostRender:f(l,c),onclick:function(){l.execCommand(u)}}))},i=function(t){r(t,"numlist","Numbered list","InsertOrderedList","OL",e(t)),r(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))};t.add("advlist",function(t){var e,n,r;n="lists",r=(e=t).settings.plugins?e.settings.plugins:"",-1!==a.inArray(r.split(/[ ,]/),n)&&(i(t),o(t))})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},e=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.id||e.name:""},i=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},n=function(r){var t=e(r);r.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:t},onsubmit:function(t){var e,n,o=t.data.id;e=r,(a(n=o)?(i(e,n),0):(e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))&&t.preventDefault()}})},o=function(t){t.addCommand("mceAnchor",function(){n(t)})},r=function(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",r("false")),t.serializer.addNodeFilter("a",r(null))})},d=function(t){t.addButton("anchor",{icon:"anchor",tooltip:"Anchor",cmd:"mceAnchor",stateSelector:"a:not([href])"}),t.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",cmd:"mceAnchor"})};t.add("anchor",function(t){c(t),o(t),d(t)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),m=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},y=function(e){return e.getParam("default_link_target","")},o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},p=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},r=function(e,t,n){var i,o,r,a,f,s,d,l,c,u,g=m(e),h=y(e);if("A"!==e.selection.getNode().tagName){if((i=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(l=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;l=i.endContainer.firstChild.nextSibling}if(c=l.length,k(i,l,c),p(i,l,c),i.endOffset<5)return;o=i.endOffset,a=l}else{if(3!==(a=i.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(k(i,a,0),p(i,a,a.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-t}for(r=o;k(i,a,2<=o?o-2:0),p(i,a,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);var C;(C=i.toString())===n||" "===C||160===C.charCodeAt(0)?(k(i,a,o),p(i,a,r),o+=1):(0===i.startOffset?k(i,a,0):k(i,a,o),p(i,a,r)),"."===(s=i.toString()).charAt(s.length-1)&&p(i,a,r-1),(d=(s=i.toString().trim()).match(g))&&("www."===d[1]?d[1]="http://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),f=e.selection.getBookmark(),e.selection.setRng(i),e.execCommand("createlink",!1,d[1]+d[2]),h&&e.dom.setAttrib(e.selection.getNode(),"target",h),e.selection.moveToBookmark(f),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),i.ie?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var i=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return i(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),y=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),h=function(t){return parseInt(t.getParam("autoresize_min_height",t.getElement().offsetHeight),10)},v=function(t){return parseInt(t.getParam("autoresize_max_height",0),10)},o=function(t){return t.getParam("autoresize_overflow_padding",1)},a=function(t){return t.getParam("autoresize_bottom_margin",50)},n=function(t){return t.getParam("autoresize_on_init",!0)},u=function(t,e,n,i,o){r.setEditorTimeout(t,function(){_(t,e),n--?u(t,e,n,i,o):o&&o()},i)},S=function(t,e){var n=t.getBody();n&&(n.style.overflowY=e?"":"hidden",e||(n.scrollTop=0))},_=function(t,e){var n,i,o,r,a,u,s,l,g,c,f,d=t.dom;if(i=t.getDoc())if((m=t).plugins.fullscreen&&m.plugins.fullscreen.isFullscreen())S(t,!0);else{var m;o=i.body,r=h(t),u=d.getStyle(o,"margin-top",!0),s=d.getStyle(o,"margin-bottom",!0),l=d.getStyle(o,"padding-top",!0),g=d.getStyle(o,"padding-bottom",!0),c=d.getStyle(o,"border-top-width",!0),f=d.getStyle(o,"border-bottom-width",!0),a=o.offsetHeight+parseInt(u,10)+parseInt(s,10)+parseInt(l,10)+parseInt(g,10)+parseInt(c,10)+parseInt(f,10),(isNaN(a)||a<=0)&&(a=y.ie?o.scrollHeight:y.webkit&&0===o.clientHeight?0:o.offsetHeight),a>h(t)&&(r=a);var p=v(t);p&&p<a?(r=p,S(t,!0)):S(t,!1),r!==e.get()&&(n=r-e.get(),d.setStyle(t.iframeElement,"height",r+"px"),e.set(r),y.webkit&&n<0&&_(t,e))}},s={setup:function(i,e){i.on("init",function(){var t,e,n=i.dom;t=o(i),e=a(i),!1!==t&&n.setStyles(i.getBody(),{paddingLeft:t,paddingRight:t}),!1!==e&&n.setStyles(i.getBody(),{paddingBottom:e})}),i.on("nodechange setcontent keyup FullscreenStateChanged",function(t){_(i,e)}),n(i)&&i.on("init",function(){u(i,e,20,100,function(){u(i,e,5,1e3)})})},resize:_},l=function(t,e){t.addCommand("mceAutoResize",function(){s.resize(t,e)})};t.add("autoresize",function(t){if(!t.inline){var e=i(0);l(t,e),s.setup(t,e)}})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var n=function(t){var e=t,r=function(){return e};return{get:r,set:function(t){e=t},clone:function(){return n(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(t){return t.fire("RestoreDraft")},i=function(t){return t.fire("StoreDraft")},s=function(t){return t.fire("RemoveDraft")},e=function(t,e){return((t=/^(\d+)([ms]?)$/.exec(""+(t||e)))[2]?{s:1e3,m:6e4}[t[2]]:1)*parseInt(t,10)},u=function(t){return t.getParam("autosave_ask_before_unload",!0)},f=function(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,document.location.pathname)).replace(/\{query\}/g,document.location.search)).replace(/\{hash\}/g,document.location.hash)).replace(/\{id\}/g,t.id)},c=function(t){return e(t.settings.autosave_interval,"30s")},l=function(t){return e(t.settings.autosave_retention,"20m")},m=function(t,e){var r=t.settings.forced_root_block;return""===(e=o.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0| |[ \t]|<br[^>]*>)+?|)</"+r+">|<br>$","i").test(e)},v=function(t){var e=parseInt(a.getItem(f(t)+"time"),10)||0;return!((new Date).getTime()-e>l(t)&&(d(t,!1),1))},d=function(t,e){var r=f(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&s(t)},D=function(t){var e=f(t);!m(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),i(t))},g=function(t){var e=f(t);v(t)&&(t.setContent(a.getItem(e+"draft"),{format:"raw"}),r(t))},y={isEmpty:m,hasDraft:v,removeDraft:d,storeDraft:D,restoreDraft:g,startStoreDraft:function(t,e){var r=c(t);e.get()||(setInterval(function(){t.removed||D(t)},r),e.set(!0))},restoreLastDraft:function(t){t.undoManager.transact(function(){g(t),d(t)}),t.focus()}},p=function(e,r){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r].concat(t))}},h=function(t){return{hasDraft:p(y.hasDraft,t),storeDraft:p(y.storeDraft,t),restoreDraft:p(y.restoreDraft,t),removeDraft:p(y.removeDraft,t),isEmpty:p(y.isEmpty,t)}},_=tinymce.util.Tools.resolve("tinymce.EditorManager");_._beforeUnloadHandler=function(){var e;return o.each(_.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e};var b=function(t){window.onbeforeunload=_._beforeUnloadHandler},I=function(r,n){return function(t){var e=t.control;e.disabled(!y.hasDraft(r)),r.on("StoreDraft RestoreDraft RemoveDraft",function(){e.disabled(!y.hasDraft(r))}),y.startStoreDraft(r,n)}},w=function(t,e){t.addButton("restoredraft",{title:"Restore last draft",onclick:function(){y.restoreLastDraft(t)},onPostRender:I(t,e)}),t.addMenuItem("restoredraft",{text:"Restore last draft",onclick:function(){y.restoreLastDraft(t)},onPostRender:I(t,e),context:"file"})};t.add("autosave",function(t){var e=n(!1);return b(t),w(t,e),h(t)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/ |\u00a0/gi," "),o(/"/gi,'"'),o(/</gi,"<"),o(/>/gi,">"),o(/&/gi,"&"),e},i=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),e};o.add("bbcode",function(){return{init:function(o){o.on("beforeSetContent",function(o){o.content=i(o.content)}),o.on("postProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=e(o.content))})}}})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){return e.fire("insertCustomChar",{chr:t})},l=function(e,t){var a=i(e,t).chr;e.execCommand("mceInsertContent",!1,a)},a=tinymce.util.Tools.resolve("tinymce.util.Tools"),r=function(e){return e.settings.charmap},n=function(e){return e.settings.charmap_append},o=a.isArray,c=function(e){return o(e)?[].concat((t=e,a.grep(t,function(e){return o(e)&&2===e.length}))):"function"==typeof e?e():[];var t},s=function(e){return function(e,t){var a=r(e);a&&(t=c(a));var i=n(e);return i?[].concat(t).concat(c(i)):t}(e,[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]])},t=function(t){return{getCharMap:function(){return s(t)},insertChar:function(e){l(t,e)}}},u=function(e){var t,a,i,r=Math.min(e.length,25),n=Math.ceil(e.length/r);for(t='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>',i=0;i<n;i++){for(t+="<tr>",a=0;a<r;a++){var o=i*r+a;if(o<e.length){var l=e[o],c=parseInt(l[0],10),s=l?String.fromCharCode(c):" ";t+='<td title="'+l[1]+'"><div tabindex="-1" title="'+l[1]+'" role="button" data-chr="'+c+'">'+s+"</div></td>"}else t+="<td />"}t+="</tr>"}return t+="</tbody></table>"},d=function(e){for(;e;){if("TD"===e.nodeName)return e;e=e.parentNode}},m=function(n){var o,e={type:"container",html:u(s(n)),onclick:function(e){var t=e.target;if(/^(TD|DIV)$/.test(t.nodeName)){var a=d(t).firstChild;if(a&&a.hasAttribute("data-chr")){var i=a.getAttribute("data-chr"),r=parseInt(i,10);isNaN(r)||l(n,String.fromCharCode(r)),e.ctrlKey||o.close()}}},onmouseover:function(e){var t=d(e.target);t&&t.firstChild?(o.find("#preview").text(t.firstChild.firstChild.data),o.find("#previewTitle").text(t.title)):(o.find("#preview").text(" "),o.find("#previewTitle").text(" "))}};o=n.windowManager.open({title:"Special character",spacing:10,padding:10,items:[e,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"spacer",minHeight:20},{type:"label",name:"previewTitle",text:" ",style:"white-space: pre-wrap;",border:1,minWidth:140}]}],buttons:[{text:"Close",onclick:function(){o.close()}}]})},g=function(e){e.addCommand("mceShowCharmap",function(){m(e)})},p=function(e){e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"})};e.add("charmap",function(e){return g(e),p(e),t(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(t){return t.getParam("code_dialog_width",600)},i=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},c=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},d=function(t){return t.getContent({source_view:!0})},e=function(n){var t=o(n),e=i(n);n.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:t,minHeight:e,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){c(n,t.data.code)}}).find("#code").value(d(n))},u=function(t){t.addCommand("mceCodeEditor",function(){e(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){e(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){e(t)}})};t.add("code",function(t){return u(t),a(t),{}})}();
|
@@ -0,0 +1,138 @@
|
|
1
|
+
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
|
2
|
+
/**
|
3
|
+
* prism.js default theme for JavaScript, CSS and HTML
|
4
|
+
* Based on dabblet (http://dabblet.com)
|
5
|
+
* @author Lea Verou
|
6
|
+
*/
|
7
|
+
|
8
|
+
code[class*="language-"],
|
9
|
+
pre[class*="language-"] {
|
10
|
+
color: black;
|
11
|
+
text-shadow: 0 1px white;
|
12
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
13
|
+
direction: ltr;
|
14
|
+
text-align: left;
|
15
|
+
white-space: pre;
|
16
|
+
word-spacing: normal;
|
17
|
+
word-break: normal;
|
18
|
+
word-wrap: normal;
|
19
|
+
line-height: 1.5;
|
20
|
+
|
21
|
+
-moz-tab-size: 4;
|
22
|
+
-o-tab-size: 4;
|
23
|
+
tab-size: 4;
|
24
|
+
|
25
|
+
-webkit-hyphens: none;
|
26
|
+
-moz-hyphens: none;
|
27
|
+
-ms-hyphens: none;
|
28
|
+
hyphens: none;
|
29
|
+
}
|
30
|
+
|
31
|
+
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
32
|
+
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
33
|
+
text-shadow: none;
|
34
|
+
background: #b3d4fc;
|
35
|
+
}
|
36
|
+
|
37
|
+
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
38
|
+
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
39
|
+
text-shadow: none;
|
40
|
+
background: #b3d4fc;
|
41
|
+
}
|
42
|
+
|
43
|
+
@media print {
|
44
|
+
code[class*="language-"],
|
45
|
+
pre[class*="language-"] {
|
46
|
+
text-shadow: none;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
/* Code blocks */
|
51
|
+
pre[class*="language-"] {
|
52
|
+
padding: 1em;
|
53
|
+
margin: .5em 0;
|
54
|
+
overflow: auto;
|
55
|
+
}
|
56
|
+
|
57
|
+
:not(pre) > code[class*="language-"],
|
58
|
+
pre[class*="language-"] {
|
59
|
+
background: #f5f2f0;
|
60
|
+
}
|
61
|
+
|
62
|
+
/* Inline code */
|
63
|
+
:not(pre) > code[class*="language-"] {
|
64
|
+
padding: .1em;
|
65
|
+
border-radius: .3em;
|
66
|
+
}
|
67
|
+
|
68
|
+
.token.comment,
|
69
|
+
.token.prolog,
|
70
|
+
.token.doctype,
|
71
|
+
.token.cdata {
|
72
|
+
color: slategray;
|
73
|
+
}
|
74
|
+
|
75
|
+
.token.punctuation {
|
76
|
+
color: #999;
|
77
|
+
}
|
78
|
+
|
79
|
+
.namespace {
|
80
|
+
opacity: .7;
|
81
|
+
}
|
82
|
+
|
83
|
+
.token.property,
|
84
|
+
.token.tag,
|
85
|
+
.token.boolean,
|
86
|
+
.token.number,
|
87
|
+
.token.constant,
|
88
|
+
.token.symbol,
|
89
|
+
.token.deleted {
|
90
|
+
color: #905;
|
91
|
+
}
|
92
|
+
|
93
|
+
.token.selector,
|
94
|
+
.token.attr-name,
|
95
|
+
.token.string,
|
96
|
+
.token.char,
|
97
|
+
.token.builtin,
|
98
|
+
.token.inserted {
|
99
|
+
color: #690;
|
100
|
+
}
|
101
|
+
|
102
|
+
.token.operator,
|
103
|
+
.token.entity,
|
104
|
+
.token.url,
|
105
|
+
.language-css .token.string,
|
106
|
+
.style .token.string {
|
107
|
+
color: #a67f59;
|
108
|
+
background: hsla(0, 0%, 100%, .5);
|
109
|
+
}
|
110
|
+
|
111
|
+
.token.atrule,
|
112
|
+
.token.attr-value,
|
113
|
+
.token.keyword {
|
114
|
+
color: #07a;
|
115
|
+
}
|
116
|
+
|
117
|
+
.token.function {
|
118
|
+
color: #DD4A68;
|
119
|
+
}
|
120
|
+
|
121
|
+
.token.regex,
|
122
|
+
.token.important,
|
123
|
+
.token.variable {
|
124
|
+
color: #e90;
|
125
|
+
}
|
126
|
+
|
127
|
+
.token.important,
|
128
|
+
.token.bold {
|
129
|
+
font-weight: bold;
|
130
|
+
}
|
131
|
+
.token.italic {
|
132
|
+
font-style: italic;
|
133
|
+
}
|
134
|
+
|
135
|
+
.token.entity {
|
136
|
+
cursor: help;
|
137
|
+
}
|
138
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var n=function(e){var t=e,a=function(){return t};return{get:a,set:function(e){t=e},clone:function(){return n(a())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(e){return e.settings.codesample_content_css},a=function(e){return e.settings.codesample_languages},o=function(e){return Math.min(i.DOM.getViewPort().w,e.getParam("codesample_dialog_width",800))},l=function(e){return Math.min(i.DOM.getViewPort().w,e.getParam("codesample_dialog_height",650))},t={},r=t,u=void 0!==t?t:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},c=function(){var c=/\blang(?:uage)?-(?!\*)(\w+)\b/i,S=u.Prism={util:{encode:function(e){return e instanceof o?new o(e.type,S.util.encode(e.content),e.alias):"Array"===S.util.type(e)?e.map(S.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){switch(S.util.type(e)){case"Object":var t={};for(var a in e)e.hasOwnProperty(a)&&(t[a]=S.util.clone(e[a]));return t;case"Array":return e.map&&e.map(function(e){return S.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=S.util.clone(S.languages[e]);for(var n in t)a[n]=t[n];return a},insertBefore:function(a,e,t,n){var i=(n=n||S.languages)[a];if(2===arguments.length){for(var r in t=e)t.hasOwnProperty(r)&&(i[r]=t[r]);return i}var s={};for(var o in i)if(i.hasOwnProperty(o)){if(o===e)for(var r in t)t.hasOwnProperty(r)&&(s[r]=t[r]);s[o]=i[o]}return S.languages.DFS(S.languages,function(e,t){t===n[a]&&e!==a&&(this[e]=s)}),n[a]=s},DFS:function(e,t,a){for(var n in e)e.hasOwnProperty(n)&&(t.call(e,n,e[n],a||n),"Object"===S.util.type(e[n])?S.languages.DFS(e[n],t):"Array"===S.util.type(e[n])&&S.languages.DFS(e[n],t,n))}},plugins:{},highlightAll:function(e,t){for(var a=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),n=0,i=void 0;i=a[n++];)S.highlightElement(i,!0===e,t)},highlightElement:function(e,t,a){for(var n,i,r=e;r&&!c.test(r.className);)r=r.parentNode;r&&(n=(r.className.match(c)||[,""])[1],i=S.languages[n]),e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+n,r=e.parentNode,/pre/i.test(r.nodeName)&&(r.className=r.className.replace(c,"").replace(/\s+/g," ")+" language-"+n);var s=e.textContent,o={element:e,language:n,grammar:i,code:s};if(s&&i)if(S.hooks.run("before-highlight",o),t&&u.Worker){var l=new Worker(S.filename);l.onmessage=function(e){o.highlightedCode=e.data,S.hooks.run("before-insert",o),o.element.innerHTML=o.highlightedCode,a&&a.call(o.element),S.hooks.run("after-highlight",o),S.hooks.run("complete",o)},l.postMessage(JSON.stringify({language:o.language,code:o.code,immediateClose:!0}))}else o.highlightedCode=S.highlight(o.code,o.grammar,o.language),S.hooks.run("before-insert",o),o.element.innerHTML=o.highlightedCode,a&&a.call(e),S.hooks.run("after-highlight",o),S.hooks.run("complete",o);else S.hooks.run("complete",o)},highlight:function(e,t,a){var n=S.tokenize(e,t);return o.stringify(S.util.encode(n),a)},tokenize:function(e,t,a){var n=S.Token,i=[e],r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}e:for(var s in t)if(t.hasOwnProperty(s)&&t[s]){var o=t[s];o="Array"===S.util.type(o)?o:[o];for(var l=0;l<o.length;++l){var c=o[l],u=c.inside,g=!!c.lookbehind,d=0,p=c.alias;c=c.pattern||c;for(var f=0;f<i.length;f++){var h=i[f];if(i.length>e.length)break e;if(!(h instanceof n)){c.lastIndex=0;var m=c.exec(h);if(m){g&&(d=m[1].length);var b=m.index-1+d,y=b+(m=m[0].slice(d)).length,v=h.slice(0,b+1),k=h.slice(y+1),w=[f,1];v&&w.push(v);var x=new n(s,u?S.tokenize(m,u):m,p);w.push(x),k&&w.push(k),Array.prototype.splice.apply(i,w)}}}}}return i},hooks:{all:{},add:function(e,t){var a=S.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=S.hooks.all[e];if(a&&a.length)for(var n=0,i=void 0;i=a[n++];)i(t)}}},o=S.Token=function(e,t,a){this.type=e,this.content=t,this.alias=a};if(o.stringify=function(t,a,e){if("string"==typeof t)return t;if("Array"===S.util.type(t))return t.map(function(e){return o.stringify(e,a,t)}).join("");var n={type:t.type,content:o.stringify(t.content,a,e),tag:"span",classes:["token",t.type],attributes:{},language:a,parent:e};if("comment"===n.type&&(n.attributes.spellcheck="true"),t.alias){var i="Array"===S.util.type(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(n.classes,i)}S.hooks.run("wrap",n);var r="";for(var s in n.attributes)r+=(r?" ":"")+s+'="'+(n.attributes[s]||"")+'"';return"<"+n.tag+' class="'+n.classes.join(" ")+'" '+r+">"+n.content+"</"+n.tag+">"},!u.document)return u.addEventListener&&u.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,n=t.code,i=t.immediateClose;u.postMessage(S.highlight(n,S.languages[a],a)),i&&u.close()},!1),u.Prism}();void 0!==r&&(r.Prism=c),c.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},c.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),c.languages.xml=c.languages.markup,c.languages.html=c.languages.markup,c.languages.mathml=c.languages.markup,c.languages.svg=c.languages.markup,c.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},c.languages.css.atrule.inside.rest=c.util.clone(c.languages.css),c.languages.markup&&(c.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/i,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/i,inside:c.languages.markup.tag.inside},rest:c.languages.css},alias:"language-css"}}),c.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:c.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:c.languages.css}},alias:"language-css"}},c.languages.markup.tag)),c.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},c.languages.javascript=c.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),c.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),c.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:c.languages.javascript}},string:/[\s\S]+/}}}),c.languages.markup&&c.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/i,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/i,inside:c.languages.markup.tag.inside},rest:c.languages.javascript},alias:"language-javascript"}}),c.languages.js=c.languages.javascript,c.languages.c=c.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),c.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete c.languages.c["class-name"],delete c.languages.c["boolean"],c.languages.csharp=c.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),c.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),c.languages.cpp=c.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),c.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),c.languages.java=c.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),c.languages.php=c.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),c.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),c.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),c.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),c.languages.markup&&(c.hooks.add("before-highlight",function(t){"php"===t.language&&(t.tokenStack=[],t.backupCode=t.code,t.code=t.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(e){return t.tokenStack.push(e),"{{{PHP"+t.tokenStack.length+"}}}"}))}),c.hooks.add("before-insert",function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),c.hooks.add("after-highlight",function(e){if("php"===e.language){for(var t=0,a=void 0;a=e.tokenStack[t];t++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(t+1)+"}}}",c.highlight(a,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),c.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))}),c.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:c.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),c.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:t}},{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:t}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:t}}]}(c);var g={isCodeSample:function(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")},trimArg:function(a){return function(e,t){return a(t)}}},d=function(e){var t=e.selection.getNode();return g.isCodeSample(t)?t:null},p=d,f=function(t,a,n){t.undoManager.transact(function(){var e=d(t);n=i.DOM.encode(n),e?(t.dom.setAttrib(e,"class","language-"+a),e.innerHTML=n,c.highlightElement(e),t.selection.select(e)):(t.insertContent('<pre id="__new" class="language-'+a+'">'+n+"</pre>"),t.selection.select(t.$("#__new").removeAttr("id")[0]))})},h=function(e){var t=d(e);return t?t.textContent:""},m=function(e){var t=a(e);return t||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]},b=function(e){var t,a=p(e);return a&&(t=a.className.match(/language-(\w+)/))?t[1]:""},y=function(t){var e=o(t),a=l(t),n=b(t),i=m(t),r=h(t);t.windowManager.open({title:"Insert/Edit code sample",minWidth:e,minHeight:a,layout:"flex",direction:"column",align:"stretch",body:[{type:"listbox",name:"language",label:"Language",maxWidth:200,value:n,values:i},{type:"textbox",name:"code",multiline:!0,spellcheck:!1,ariaLabel:"Code view",flex:1,style:"direction: ltr; text-align: left",classes:"monospace",value:r,autofocus:!0}],onSubmit:function(e){f(t,e.data.language,e.data.code)}})},v=function(t){t.addCommand("codesample",function(){var e=t.selection.getNode();t.selection.isCollapsed()||g.isCodeSample(e)?y(t):t.formatter.toggle("code")})},k=function(a){var i=a.$;a.on("PreProcess",function(e){i("pre[contenteditable=false]",e.node).filter(g.trimArg(g.isCodeSample)).each(function(e,t){var a=i(t),n=t.textContent;a.attr("class",i.trim(a.attr("class"))),a.removeAttr("contentEditable"),a.empty().append(i("<code></code>").each(function(){this.textContent=n}))})}),a.on("SetContent",function(){var e=i("pre").filter(g.trimArg(g.isCodeSample)).filter(function(e,t){return"false"!==t.contentEditable});e.length&&a.undoManager.transact(function(){e.each(function(e,t){i(t).find("br").each(function(e,t){t.parentNode.replaceChild(a.getDoc().createTextNode("\n"),t)}),t.contentEditable=!1,t.innerHTML=a.dom.encode(t.textContent),c.highlightElement(t),t.className=i.trim(t.className)})})})},w=function(e,t,a,n){var i,r=s(e);e.inline&&a.get()||!e.inline&&n.get()||(e.inline?a.set(!0):n.set(!0),!1!==r&&(i=e.dom.create("link",{rel:"stylesheet",href:r||t+"/css/prism.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(i)))},x=function(e){e.addButton("codesample",{cmd:"codesample",title:"Insert/Edit code sample"}),e.addMenuItem("codesample",{cmd:"codesample",text:"Code sample",icon:"codesample"})},S=n(!1);e.add("codesample",function(t,e){var a=n(!1);k(t),x(t),v(t),t.on("init",function(){w(t,e,S,a)}),t.on("dblclick",function(e){g.isCodeSample(e.target)&&y(t)})})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Color"),a=function(e,n){e.find("#preview")[0].getEl().style.background=n},o=function(e,n){var i=l(n),t=i.toRgb();e.fromJSON({r:t.r,g:t.g,b:t.b,hex:i.toHex().substr(1)}),a(e,i.toHex())},t=function(e,n,i){var t=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:i,onchange:function(){var e=this.rgb();t&&(t.find("#r").value(e.r),t.find("#g").value(e.g),t.find("#b").value(e.b),t.find("#hex").value(this.value().substr(1)),a(t,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,n,i=t.find("colorpicker")[0];if(e=this.name(),n=this.value(),"hex"===e)return o(t,n="#"+n),void i.value(n);n={r:t.find("#r").value(),g:t.find("#g").value(),b:t.find("#b").value()},i.value(n),o(t,n)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){n("#"+t.toJSON().hex)}});o(t,i)};e.add("colorpicker",function(i){i.settings.color_picker_callback||(i.settings.color_picker_callback=function(e,n){t(i,e,n)})})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var o=function(t){var n=t,e=function(){return n};return{get:e,set:function(t){n=t},clone:function(){return o(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(t){return{isContextMenuVisible:function(){return t.get()}}},r=function(t){return t.settings.contextmenu_never_use_native},u=function(t){return t.getParam("contextmenu","link openlink image inserttable | cell row column deletetable")},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(t){return l.DOM.select(t.settings.ui_container)[0]},a=function(t,n){return{x:t,y:n}},f=function(t,n,e){return a(t.x+n,t.y+e)},m=function(t,n){if(t&&"static"!==l.DOM.getStyle(t,"position",!0)){var e=l.DOM.getPos(t),o=e.x-t.scrollLeft,i=e.y-t.scrollTop;return f(n,-o,-i)}return f(n,0,0)},c=function(t,n){if(t.inline)return m(s(t),a((u=n).pageX,u.pageY));var e,o,i,r,u,c=(e=t.getContentAreaContainer(),o=a((r=n).clientX,r.clientY),i=l.DOM.getPos(e),f(o,i.x,i.y));return m(s(t),c)},g=tinymce.util.Tools.resolve("tinymce.ui.Factory"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(t,n,e,o){null===o.get()?o.set(function(e,n){var t,o,i=[];o=u(e),v.each(o.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"===t&&(n={text:t}),n&&(n.shortcut="",i.push(n))});for(var r=0;r<i.length;r++)"|"===i[r].text&&(0!==r&&r!==i.length-1||i.splice(r,1));return(t=g.create("menu",{items:i,context:"contextmenu",classes:"contextmenu"})).uiContainer=s(e),t.renderTo(s(e)),t.on("hide",function(t){t.control===this&&n.set(!1)}),e.on("remove",function(){t.remove(),t=null}),t}(t,e)):o.get().show(),o.get().moveTo(n.x,n.y),e.set(!0)},x=function(e,o,i){e.on("contextmenu",function(t){var n;n=e,(!t.ctrlKey||r(n))&&(t.preventDefault(),y(e,c(e,t),o,i))})};t.add("contextmenu",function(t){var n=o(null),e=o(!1);return x(t,e,n),i(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(t,e){var i,n=t.dom,o=t.selection.getSelectedBlocks();o.length&&(i=n.getAttrib(o[0],"dir"),c.each(o,function(t){n.getParent(t.parentNode,'*[dir="'+e+'"]',n.getRoot())||n.setAttrib(t,"dir",i!==e?e:null)}),t.nodeChanged())},i=function(t){t.addCommand("mceDirectionLTR",function(){e(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){e(t,"rtl")})},n=function(e){var i=[];return c.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(t){i.push(t+"[dir="+e+"]")}),i.join(",")},o=function(t){t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})};t.add("directionality",function(t){i(t),o(t)})}();
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]],i=function(i){var o;return o='<table role="list" class="mce-grid">',e.each(n,function(t){o+="<tr>",e.each(t,function(t){var e=i+"/img/smiley-"+t+".gif";o+='<td><a href="#" data-mce-url="'+e+'" data-mce-alt="'+t+'" tabindex="-1" role="option" aria-label="'+t+'"><img src="'+e+'" style="width: 18px; height: 18px" role="presentation" /></a></td>'}),o+="</tr>"}),o+="</table>"},o=function(a,t){var e=i(t);a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:e,onclick:function(t){var e,i,o,n=a.dom.getParent(t.target,"a");n&&(e=a,i=n.getAttribute("data-mce-url"),o=n.getAttribute("data-mce-alt"),e.insertContent(e.dom.createHTML("img",{src:i,alt:o})),this.hide())}},tooltip:"Emoticons"})};t.add("emoticons",function(t,e){o(t,e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var l=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return l(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.html.DomParser"),f=tinymce.util.Tools.resolve("tinymce.html.Node"),m=tinymce.util.Tools.resolve("tinymce.html.Serializer"),h=function(e){return e.getParam("fullpage_hide_in_source_view")},r=function(e){return e.getParam("fullpage_default_xml_pi")},o=function(e){return e.getParam("fullpage_default_encoding")},a=function(e){return e.getParam("fullpage_default_font_family")},c=function(e){return e.getParam("fullpage_default_font_size")},s=function(e){return e.getParam("fullpage_default_text_color")},u=function(e){return e.getParam("fullpage_default_title")},d=function(e){return e.getParam("fullpage_default_doctype","<!DOCTYPE html>")},p=function(e){return t({validate:!1,root_name:"#document"}).parse(e)},y=p,v=function(e,t){var n,l,i=p(t),r={};function o(e,t){return e.attr(t)||""}return r.fontface=a(e),r.fontsize=c(e),7===(n=i.firstChild).type&&(r.xml_pi=!0,(l=/encoding="([^"]+)"/.exec(n.value))&&(r.docencoding=l[1])),(n=i.getAll("#doctype")[0])&&(r.doctype="<!DOCTYPE"+n.value+">"),(n=i.getAll("title")[0])&&n.firstChild&&(r.title=n.firstChild.value),g.each(i.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?r[n.toLowerCase()]=e.attr("content"):"Content-Type"===l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(r.docencoding=t[1])}),(n=i.getAll("html")[0])&&(r.langcode=o(n,"lang")||o(n,"xml:lang")),r.stylesheets=[],g.each(i.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&r.stylesheets.push(e.attr("href"))}),(n=i.getAll("body")[0])&&(r.langdir=o(n,"dir"),r.style=o(n,"style"),r.visited_color=o(n,"vlink"),r.link_color=o(n,"link"),r.active_color=o(n,"alink")),r},_=function(e,r,t){var o,n,l,a,i,c=e.dom;function s(e,t,n){e.attr(t,n||undefined)}function u(e){n.firstChild?n.insert(e,n.firstChild):n.append(e)}o=p(t),(n=o.getAll("head")[0])||(a=o.getAll("html")[0],n=new f("head",1),a.firstChild?a.insert(n,a.firstChild,!0):a.append(n)),a=o.firstChild,r.xml_pi?(i='version="1.0"',r.docencoding&&(i+=' encoding="'+r.docencoding+'"'),7!==a.type&&(a=new f("xml",7),o.insert(a,o.firstChild,!0)),a.value=i):a&&7===a.type&&a.remove(),a=o.getAll("#doctype")[0],r.doctype?(a||(a=new f("#doctype",10),r.xml_pi?o.insert(a,o.firstChild):u(a)),a.value=r.doctype.substring(9,r.doctype.length-1)):a&&a.remove(),a=null,g.each(o.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(a=e)}),r.docencoding?(a||((a=new f("meta",1)).attr("http-equiv","Content-Type"),a.shortEnded=!0,u(a)),a.attr("content","text/html; charset="+r.docencoding)):a&&a.remove(),a=o.getAll("title")[0],r.title?(a?a.empty():u(a=new f("title",1)),a.append(new f("#text",3)).value=r.title):a&&a.remove(),g.each("keywords,description,author,copyright,robots".split(","),function(e){var t,n,l=o.getAll("meta"),i=r[e];for(t=0;t<l.length;t++)if((n=l[t]).attr("name")===e)return void(i?n.attr("content",i):n.remove());i&&((a=new f("meta",1)).attr("name",e),a.attr("content",i),a.shortEnded=!0,u(a))});var d={};return g.each(o.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(d[e.attr("href")]=e)}),g.each(r.stylesheets,function(e){d[e]||((a=new f("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),a.shortEnded=!0,u(a)),delete d[e]}),g.each(d,function(e){e.remove()}),(a=o.getAll("body")[0])&&(s(a,"dir",r.langdir),s(a,"style",r.style),s(a,"vlink",r.visited_color),s(a,"link",r.link_color),s(a,"alink",r.active_color),c.setAttribs(e.getBody(),{style:r.style,dir:r.dir,vLink:r.visited_color,link:r.link_color,aLink:r.active_color})),(a=o.getAll("html")[0])&&(s(a,"lang",r.langcode),s(a,"xml:lang",r.langcode)),n.firstChild||n.remove(),(l=m({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(o)).substring(0,l.indexOf("</body>"))},n=function(n,l){var i=v(n,l.get());n.windowManager.open({title:"Document properties",data:i,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(e){var t=_(n,g.extend(i,e.data),l.get());l.set(t)}})},i=function(e,t){e.addCommand("mceFullPageProperties",function(){n(e,t)})},b=function(e,t){return g.each(e,function(e){t=t.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),t},x=function(e){return e.replace(/<!--mce:protected ([\s\S]*?)-->/g,function(e,t){return unescape(t)})},k=g.each,C=function(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})},A=function(e){var t,n="",l="";if(r(e)){var i=o(e);n+='<?xml version="1.0" encoding="'+(i||"ISO-8859-1")+'" ?>\n'}return n+=d(e),n+="\n<html>\n<head>\n",(t=u(e))&&(n+="<title>"+t+"</title>\n"),(t=o(e))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=a(e))&&(l+="font-family: "+t+";"),(t=c(e))&&(l+="font-size: "+t+";"),(t=s(e))&&(l+="color: "+t+";"),n+="</head>\n<body"+(l?' style="'+l+'"':"")+">\n"},w=function(r,o,a){r.on("BeforeSetContent",function(e){!function(e,t,n,l){var i,r,o,a,c,s="",u=e.dom;if(!(l.selection||(o=b(e.settings.protect,l.content),"raw"===l.format&&t.get()||l.source_view&&h(e)))){0!==o.length||l.source_view||(o=g.trim(t.get())+"\n"+g.trim(o)+"\n"+g.trim(n.get())),-1!==(i=(o=o.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("<body"))?(i=o.indexOf(">",i),t.set(C(o.substring(0,i+1))),-1===(r=o.indexOf("</body",i))&&(r=o.length),l.content=g.trim(o.substring(i+1,r)),n.set(C(o.substring(r)))):(t.set(A(e)),n.set("\n</body>\n</html>")),a=y(t.get()),k(a.getAll("style"),function(e){e.firstChild&&(s+=e.firstChild.value)}),(c=a.getAll("body")[0])&&u.setAttribs(e.getBody(),{style:c.attr("style")||"",dir:c.attr("dir")||"",vLink:c.attr("vlink")||"",link:c.attr("link")||"",aLink:c.attr("alink")||""}),u.remove("fullpage_styles");var d=e.getDoc().getElementsByTagName("head")[0];s&&(u.add(d,"style",{id:"fullpage_styles"},s),(c=u.get("fullpage_styles")).styleSheet&&(c.styleSheet.cssText=s));var f={};g.each(d.getElementsByTagName("link"),function(e){"stylesheet"===e.rel&&e.getAttribute("data-mce-fullpage")&&(f[e.href]=e)}),g.each(a.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;f[t]||"stylesheet"!==e.attr("rel")||u.add(d,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete f[t]}),g.each(f,function(e){e.parentNode.removeChild(e)})}}(r,o,a,e)}),r.on("GetContent",function(e){var t,n,l,i;t=r,n=o.get(),l=a.get(),(i=e).selection||i.source_view&&h(t)||(i.content=x(g.trim(n)+"\n"+g.trim(i.content)+"\n"+g.trim(l)))})},P=function(e){e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"})};e.add("fullpage",function(e){var t=l(""),n=l("");i(e,t),P(e),w(e,t,n)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=function(e,n){e.fire("FullscreenStateChanged",{state:n})},g=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=document.body,u=document.documentElement,d=n.get(),a=function(){var e,n,t,i;g.setStyle(l,"height",(t=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){g.unbind(window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),g.removeClass(s,"mce-fullscreen"),g.removeClass(u,"mce-fullscreen"),g.removeClass(r,"mce-fullscreen"),o=d.scrollPos,window.scrollTo(o.x,o.y),g.unbind(window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),m(e,!1);else{var f={scrollPos:(c=g.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",g.addClass(s,"mce-fullscreen"),g.addClass(u,"mce-fullscreen"),g.addClass(r,"mce-fullscreen"),g.bind(window,"resize",a),e.on("remove",h),a(),n.set(f),m(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}();
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e,t,n,r,o,a,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return function(){return e}},c=u(!1),l=u(!0),s={noop:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},noarg:function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n()}},compose:function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,arguments))}},constant:u,identity:function(e){return e},tripleEquals:function(e,t){return e===t},curry:function(a){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var i=new Array(arguments.length-1),n=1;n<arguments.length;n++)i[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=i.concat(n);return a.apply(null,o)}},not:function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,arguments)}},die:function(e){return function(){throw new Error(e)}},apply:function(e){return e()},call:function(e){e()},never:c,always:l},f=s.never,m=s.always,p=function(){return y},y=(r={fold:function(e,t){return e()},is:f,isSome:f,isNone:m,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},or:n,orThunk:t,map:p,ap:p,each:function(){},bind:p,flatten:p,exists:f,forall:m,filter:p,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:s.constant("none()")},Object.freeze&&Object.freeze(r),r),d=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:m,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,or:t,orThunk:t,map:function(e){return d(e(n))},ap:function(e){return e.fold(p,function(e){return d(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:y},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(f,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},h={some:d,none:p,from:function(e){return null===e||e===undefined?y:d(e)}},g=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},k={isString:g("string"),isObject:g("object"),isArray:g("array"),isNull:g("null"),isBoolean:g("boolean"),isUndefined:g("undefined"),isFunction:g("function"),isNumber:g("number")},v=(o=Array.prototype.indexOf)===undefined?function(e,t){return A(e,t)}:function(e,t){return o.call(e,t)},b=function(e,t){return-1<v(e,t)},x=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var a=e[o];r[o]=t(a,o,e)}return r},w=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var a=e[r];t(a,r,e)&&n.push(a)}return n},A=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},C=(Array.prototype.push,Array.prototype.slice,k.isFunction(Array.from)&&Array.from,x),S=w,P=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n,e))return h.some(o)}return h.none()},T=b,O=tinymce.util.Tools.resolve("tinymce.util.I18n"),_=tinymce.util.Tools.resolve("tinymce.Env"),F=_.mac?"\u2318":"Ctrl",H=_.mac?"Ctrl + Alt":"Shift + Alt",M={shortcuts:[{shortcut:F+" + B",action:"Bold"},{shortcut:F+" + I",action:"Italic"},{shortcut:F+" + U",action:"Underline"},{shortcut:F+" + A",action:"Select all"},{shortcut:F+" + Y or "+F+" + Shift + Z",action:"Redo"},{shortcut:F+" + Z",action:"Undo"},{shortcut:H+" + 1",action:"Header 1"},{shortcut:H+" + 2",action:"Header 2"},{shortcut:H+" + 3",action:"Header 3"},{shortcut:H+" + 4",action:"Header 4"},{shortcut:H+" + 5",action:"Header 5"},{shortcut:H+" + 6",action:"Header 6"},{shortcut:H+" + 7",action:"Paragraph"},{shortcut:H+" + 8",action:"Div"},{shortcut:H+" + 9",action:"Address"},{shortcut:"Alt + F9",action:"Focus to menubar"},{shortcut:"Alt + F10",action:"Focus to toolbar"},{shortcut:"Alt + F11",action:"Focus to element path"},{shortcut:"Ctrl + Shift + P > Ctrl + Shift + P",action:"Focus to contextual toolbar"},{shortcut:F+" + K",action:"Insert link (if link plugin activated)"},{shortcut:F+" + S",action:"Save (if save plugin activated)"},{shortcut:F+" + F",action:"Find (if searchreplace plugin activated)"}]},E=function(){var e=C(M.shortcuts,function(e){return'<tr data-mce-tabstop="1" tabindex="-1" aria-label="Action: '+(t=e).action+", Shortcut: "+t.shortcut.replace(/Ctrl/g,"Control")+'"><td>'+O.translate(e.action)+"</td><td>"+e.shortcut+"</td></tr>";var t}).join("");return{title:"Handy Shortcuts",type:"container",style:"overflow-y: auto; overflow-x: hidden; max-height: 250px",items:[{type:"container",html:'<div><table class="mce-table-striped"><thead><th>'+O.translate("Action")+"</th><th>"+O.translate("Shortcut")+"</th></thead>"+e+"</table></div>"}]}},j=(a=Object.keys)===undefined?function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}:a,I=function(e,t){for(var n=j(e),r=0,o=n.length;r<o;r++){var a=n[r];t(e[a],a,e)}},B=function(r,o){var a={};return I(r,function(e,t){var n=o(e,t,r);a[n.k]=n.v}),a},L=function(e,n){var r=[];return I(e,function(e,t){r.push(n(e,t))}),r},N=function(e){return L(e,function(e){return e})},z={bifilter:function(e,n){var r={},o={};return I(e,function(e,t){(n(e,t)?r:o)[t]=e}),{t:r,f:o}},each:I,map:function(e,r){return B(e,function(e,t,n){return{k:t,v:r(e,t,n)}})},mapToArray:L,tupleMap:B,find:function(e,t){for(var n=j(e),r=0,o=n.length;r<o;r++){var a=n[r],i=e[a];if(t(i,a,e))return h.some(i)}return h.none()},keys:j,values:N,size:function(e){return N(e).length}},D=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"compat3x",name:"3.x Compatibility"},{key:"contextmenu",name:"Context Menu"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"}],q=s.curry(function(e,o){return e.replace(/\${([^{}]*)}/g,function(e,t){var n,r=o[t];return"string"==(n=typeof r)||"number"===n?r:e})},'<a href="${url}" target="_blank" rel="noopener">${name}</a>'),R=function(r){var e,t,n=(e=r,t=z.keys(e.plugins),e.settings.forced_plugins===undefined?t:S(t,s.not(s.curry(T,e.settings.forced_plugins)))),o=C(n,function(e){return"<li>"+(t=r,n=e,P(D,function(e){return e.key===n}).fold(function(){var e=t.plugins[n].getMetadata;return"function"==typeof e?q(e()):n},function(e){return q({name:e.name,url:"https://www.tinymce.com/docs/plugins/"+e.key})}))+"</li>";var t,n}),a=o.length,i=o.join("");return"<p><b>"+O.translate(["Plugins installed ({0}):",a])+"</b></p><ul>"+i+"</ul>"},U=function(e){return{title:"Plugins",type:"container",style:"overflow-y: auto; overflow-x: hidden;",layout:"flex",padding:10,spacing:10,items:[(t=e,{type:"container",html:'<div style="overflow-y: auto; overflow-x: hidden; max-height: 230px; height: 230px;" data-mce-tabstop="1" tabindex="-1">'+R(t)+"</div>",flex:1}),{type:"container",html:'<div style="padding: 10px; background: #e3e7f4; height: 100%;" data-mce-tabstop="1" tabindex="-1"><p><b>'+O.translate("Premium plugins:")+'</b></p><ul><li>PowerPaste</li><li>Spell Checker Pro</li><li>Accessibility Checker</li><li>Advanced Code Editor</li><li>Enhanced Media Embed</li><li>Link Checker</li></ul><br /><p style="float: right;"><a href="https://www.tinymce.com/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+O.translate("Learn more...")+"</a></p></div>",flex:1}]};var t},V=tinymce.util.Tools.resolve("tinymce.EditorManager"),X=function(){var e,t,n='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(e=V.majorVersion,t=V.minorVersion,0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>";return[{type:"label",html:O.translate(["You are using {0}",n])},{type:"spacer",flex:1},{text:"Close",onclick:function(){this.parent().parent().close()}}]},$=function(e,t){return function(){e.windowManager.open({title:"Help",bodyType:"tabpanel",layout:"flex",body:[E(),U(e)],buttons:X(),onPostRender:function(){this.getEl("title").innerHTML='<img src="'+t+'/img/logo.png" alt="TinyMCE Logo" style="display: inline-block; width: 200px; height: 50px">'}})}},Y=function(e,t){e.addCommand("mceHelp",$(e,t))},Z=function(e,t){e.addButton("help",{icon:"help",onclick:$(e,t)}),e.addMenuItem("help",{text:"Help",icon:"help",context:"help",onclick:$(e,t)})};i.add("help",function(e,t){Z(e,t),Y(e,t),e.shortcuts.add("Alt+0","Open help dialog","mceHelp")})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},o=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};n.add("hr",function(n){t(n),o(n)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},a=function(e){return!0===e.settings.image_advtab},f=function(e){return e.getParam("image_prepend_url","")},n=function(e){return e.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},i=function(e){return!0===e.settings.image_title},o=function(e){return!0===e.settings.image_caption},l=function(e){return e.getParam("image_list",!1)},u=function(e){return e.getParam("images_upload_url",!1)},c=function(e){return e.getParam("images_upload_handler",!1)},s=function(e){return e.getParam("images_upload_url")},g=function(e){return e.getParam("images_upload_handler")},m=function(e){return e.getParam("images_upload_base_path")},p=function(e){return e.getParam("images_upload_credentials")},h="undefined"!=typeof window?window:Function("return this;")(),v=function(e,t){for(var n=t!==undefined&&null!==t?t:h,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n},b=function(e,t){var n=e.split(".");return v(n,t)},t={getOrDie:function(e,t){var n=b(e,t);if(n===undefined||null===n)throw e+" not available on this browser";return n}};function y(){return new(t.getOrDie("FileReader"))}var x=tinymce.util.Tools.resolve("tinymce.util.Promise"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=tinymce.util.Tools.resolve("tinymce.util.XHR"),N=function(e,t){return Math.max(parseInt(e,10),parseInt(t,10))},C=function(e,n){var r=document.createElement("img");function t(e,t){r.parentNode&&r.parentNode.removeChild(r),n({width:e,height:t})}r.onload=function(){t(N(r.width,r.clientWidth),N(r.height,r.clientHeight))},r.onerror=function(){t(0,0)};var i=r.style;i.visibility="hidden",i.position="fixed",i.bottom=i.left="0px",i.width=i.height="auto",document.body.appendChild(r),r.src=e},A=function(e,i,t){return function n(e,r){return r=r||[],w.each(e,function(e){var t={text:e.text||e.title};e.menu?t.menu=n(e.menu):(t.value=e.value,i(t)),r.push(t)}),r}(e,t||[])},_=function(e){return e&&(e=e.replace(/px$/,"")),e},T=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},O=function(e){if(e.margin){var t=e.margin.split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e},R=function(e,t){var n=l(e);"string"==typeof n?S.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeof n?n(t):t(n)},P=function(e,t,n){function r(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())}n.onload=function(){t.width||t.height||!d(e)||e.dom.setAttribs(n,{width:n.clientWidth,height:n.clientHeight}),r()},n.onerror=r},I=function(r){return new x(function(e,t){var n=new y;n.onload=function(){e(n.result)},n.onerror=function(){t(y.error.message)},n.readAsDataURL(r)})},L=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),U=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},E={isString:U("string"),isObject:U("object"),isArray:U("array"),isNull:U("null"),isBoolean:U("boolean"),isUndefined:U("undefined"),isFunction:U("function"),isNumber:U("number")},M=function(a){return function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var i=e[r];for(var o in i)i.hasOwnProperty(o)&&(n[o]=a(n[o],i[o]))}return n}},j=M(function(e,t){return E.isObject(e)&&E.isObject(t)?j(e,t):t}),k=M(function(e,t){return t}),D={deepMerge:j,merge:k},z=L.DOM,B=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?_(e.style.marginLeft):""},H=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?_(e.style.marginTop):""},F=function(e){return e.style.borderWidth?_(e.style.borderWidth):""},W=function(e,t){return e.hasAttribute(t)?e.getAttribute(t):""},J=function(e,t){return e.style[t]?e.style[t]:""},V=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},G=function(e,t,n){e.setAttribute(t,n)},$=function(e){var t,n,r,i;V(e)?(i=(r=e).parentNode,z.insertAfter(r,i),z.remove(i)):(t=e,n=z.create("figure",{"class":"image"}),z.insertAfter(n,t),n.appendChild(t),n.appendChild(z.create("figcaption",{contentEditable:!0},"Caption")),n.contentEditable="false")},X=function(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},q=function(e,r){return function(e,t,n){e.style[t]?(e.style[t]=T(n),X(e,r)):G(e,t,n)}},K=function(e,t){return e.style[t]?_(e.style[t]):W(e,t)},Q=function(e,t){var n=T(t);e.style.marginLeft=n,e.style.marginRight=n},Y=function(e,t){var n=T(t);e.style.marginTop=n,e.style.marginBottom=n},Z=function(e,t){var n=T(t);e.style.borderWidth=n},ee=function(e,t){e.style.borderStyle=t},te=function(e){return"FIGURE"===e.nodeName},ne=function(e,t){var n=document.createElement("img");return G(n,"style",t.style),(B(n)||""!==t.hspace)&&Q(n,t.hspace),(H(n)||""!==t.vspace)&&Y(n,t.vspace),(F(n)||""!==t.border)&&Z(n,t.border),(J(n,"borderStyle")||""!==t.borderStyle)&&ee(n,t.borderStyle),e(n.getAttribute("style"))},re=function(e,t){return{src:W(t,"src"),alt:W(t,"alt"),title:W(t,"title"),width:K(t,"width"),height:K(t,"height"),"class":W(t,"class"),style:e(W(t,"style")),caption:V(t),hspace:B(t),vspace:H(t),border:F(t),borderStyle:J(t,"borderStyle")}},ie=function(e,t,n,r,i){n[r]!==t[r]&&i(e,r,n[r])},oe=function(r,i){return function(e,t,n){r(e,n),X(e,i)}},ae=function(e,t,n){var r=re(e,n);ie(n,r,t,"caption",function(e,t,n){return $(e)}),ie(n,r,t,"src",G),ie(n,r,t,"alt",G),ie(n,r,t,"title",G),ie(n,r,t,"width",q(0,e)),ie(n,r,t,"height",q(0,e)),ie(n,r,t,"class",G),ie(n,r,t,"style",oe(function(e,t){return G(e,"style",t)},e)),ie(n,r,t,"hspace",oe(Q,e)),ie(n,r,t,"vspace",oe(Y,e)),ie(n,r,t,"border",oe(Z,e)),ie(n,r,t,"borderStyle",oe(ee,e))},le=function(e,t){var n=e.dom.styles.parse(t),r=O(n),i=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(i)},ue=function(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||t.getAttribute("data-mce-object")||t.getAttribute("data-mce-placeholder"))?null:t},ce=function(t,e){var n=t.dom,r=n.getParent(e.parentNode,function(e){return t.schema.getTextBlockElements()[e.nodeName]});return r?n.split(r,e):e},se=function(t){var e=ue(t);return e?re(function(e){return le(t,e)},e):{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""}},de=function(t,e){var n=function(e,t){var n=document.createElement("img");if(ae(e,D.merge(t,{caption:!1}),n),G(n,"alt",t.alt),t.caption){var r=z.create("figure",{"class":"image"});return r.appendChild(n),r.appendChild(z.create("figcaption",{contentEditable:!0},"Caption")),r.contentEditable="false",r}return n}(function(e){return le(t,e)},e);t.dom.setAttrib(n,"data-mce-id","__mcenew"),t.focus(),t.selection.setContent(n.outerHTML);var r=t.dom.select('*[data-mce-id="__mcenew"]')[0];if(t.dom.setAttrib(r,"data-mce-id",null),te(r)){var i=ce(t,r);t.selection.select(i)}else t.selection.select(r)},fe=function(e,t){var n=ue(e);n?t.src?function(t,e){var n,r=ue(t);if(ae(function(e){return le(t,e)},e,r),n=r,t.dom.setAttrib(n,"src",n.getAttribute("src")),te(r.parentNode)){var i=r.parentNode;ce(t,i),t.selection.select(r.parentNode)}else t.selection.select(r),P(t,e,r)}(e,t):function(e,t){if(t){var n=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(n),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(e,n):t.src&&de(e,t)},ge=function(n,r){r.find("#style").each(function(e){var t=ne(function(e){return le(n,e)},D.merge({src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},r.toJSON()));e.value(t)})},me=function(t){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:(o=t,function(e){var t=o.dom,n=e.control.rootControl;if(a(o)){var r=n.toJSON(),i=t.parseStyle(r.style);n.find("#vspace").value(""),n.find("#hspace").value(""),((i=O(i))["margin-top"]&&i["margin-bottom"]||i["margin-right"]&&i["margin-left"])&&(i["margin-top"]===i["margin-bottom"]?n.find("#vspace").value(_(i["margin-top"])):n.find("#vspace").value(""),i["margin-right"]===i["margin-left"]?n.find("#hspace").value(_(i["margin-right"])):n.find("#hspace").value("")),i["border-width"]?n.find("#border").value(_(i["border-width"])):n.find("#border").value(""),i["border-style"]?n.find("#borderStyle").value(i["border-style"]):n.find("#borderStyle").value(""),n.find("#style").value(t.serializeStyle(t.parseStyle(t.serializeStyle(i))))}})},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,defaults:{type:"textbox",maxWidth:50,onchange:function(e){ge(t,e.control.rootControl)}},items:[{label:"Vertical space",name:"vspace"},{label:"Border width",name:"border"},{label:"Horizontal space",name:"hspace"},{label:"Border style",type:"listbox",name:"borderStyle",width:90,maxWidth:90,onselect:function(e){ge(t,e.control.rootControl)},values:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]};var o},pe=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},he=function(e,t){var n=e.find("#width")[0],r=e.find("#height")[0],i=e.find("#constrain")[0];n&&r&&i&&t(n,r,i.checked())},ve=function(e,t,n){var r=e.state.get("oldVal"),i=t.state.get("oldVal"),o=e.value(),a=t.value();n&&r&&i&&o&&a&&(o!==r?(a=Math.round(o/r*a),isNaN(a)||t.value(a)):(o=Math.round(a/i*o),isNaN(o)||e.value(o))),pe(e,t)},be=function(e){he(e,ve)},ye=function(){var e=function(e){be(e.control.rootControl)};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},xe=function(e){he(e,pe)},we=be,Se=function(e){e.meta=e.control.rootControl.toJSON()},Ne=function(s,e){var t=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:function(e){var t,n,r,i,o,a,l,u,c;n=s,a=(t=e).meta||{},l=t.control,u=l.rootControl,(c=u.find("#image-list")[0])&&c.value(n.convertURL(l.value(),"src")),w.each(a,function(e,t){u.find("#"+t).value(e)}),a.width||a.height||(r=n.convertURL(l.value(),"src"),i=f(n),o=new RegExp("^(?:[a-z]+:)?//","i"),i&&!o.test(r)&&r.substring(0,i.length)!==i&&(r=i+r),l.value(r),C(n.documentBaseURI.toAbsolute(l.value()),function(e){e.width&&e.height&&d(n)&&(u.find("#width").value(e.width),u.find("#height").value(e.height),xe(u))}))},onbeforecall:Se},e];return r(s)&&t.push({name:"alt",type:"textbox",label:"Image description"}),i(s)&&t.push({name:"title",type:"textbox",label:"Image Title"}),d(s)&&t.push(ye()),n(s)&&t.push({name:"class",type:"listbox",label:"Class",values:A(n(s),function(e){e.value&&(e.textStyle=function(){return s.formatter.getCssText({inline:"img",classes:[e.value]})})})}),o(s)&&t.push({name:"caption",type:"checkbox",label:"Caption"}),t},Ce=function(e,t){return{title:"General",type:"form",items:Ne(e,t)}},Ae=Ne,_e=function(){return t.getOrDie("URL")},Te=function(e){return _e().createObjectURL(e)},Oe=function(e){_e().revokeObjectURL(e)},Re=tinymce.util.Tools.resolve("tinymce.ui.Factory");function Pe(){return new(t.getOrDie("XMLHttpRequest"))}var Ie=function(){};function Le(a){var t=function(e,r,i,t){var o,n;(o=new Pe).open("POST",a.url),o.withCredentials=a.credentials,o.upload.onprogress=function(e){t(e.loaded/e.total*100)},o.onerror=function(){i("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e,t,n;o.status<200||300<=o.status?i("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?r((t=a.basePath,n=e.location,t?t.replace(/\/$/,"")+"/"+n.replace(/^\//,""):n)):i("Invalid JSON: "+o.responseText)},(n=new FormData).append("file",e.blob(),e.filename()),o.send(n)};return a=w.extend({credentials:!1,handler:t},a),{upload:function(e){return a.url||a.handler!==t?(r=e,i=a.handler,new x(function(e,t){try{i(r,e,t,Ie)}catch(n){t(n.message)}})):x.reject("Upload url missing from the settings.");var r,i}}}var Ue=function(u){return function(e){var t=Re.get("Throbber"),n=e.control.rootControl,r=new t(n.getEl()),i=e.control.value(),o=Te(i),a=Le({url:s(u),basePath:m(u),credentials:p(u),handler:g(u)}),l=function(){r.hide(),Oe(o)};return r.show(),I(i).then(function(e){var t=u.editorUpload.blobCache.create({blob:i,blobUri:o,name:i.name?i.name.replace(/\.[^\.]+$/,""):null,base64:e.split(",")[1]});return a.upload(t).then(function(e){var t=n.find("#src");return t.value(e),n.find("tabpanel")[0].activateTab(0),t.fire("change"),l(),e})})["catch"](function(e){u.windowManager.alert(e),l()})}},Ee=".jpg,.jpeg,.png,.gif",Me=function(e){return{title:"Upload",type:"form",layout:"flex",direction:"column",align:"stretch",padding:"20 20 20 20",items:[{type:"container",layout:"flex",direction:"column",align:"center",spacing:10,items:[{text:"Browse for an image",type:"browsebutton",accept:Ee,onchange:Ue(e)},{text:"OR",type:"label"}]},{text:"Drop an image here",type:"dropzone",accept:Ee,height:100,onchange:Ue(e)}]}},je=function(e){return function(){return e}},ke=(je(!1),je(!0),function(o){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var i=a.concat(n);return o.apply(null,i)}}),De=function(t,e){var n=e.control.getRoot();we(n),t.undoManager.transact(function(){var e=D.merge(se(t),n.toJSON());fe(t,e)}),t.editorUpload.uploadImagesAuto()};function ze(o){function e(e){var n,t,r=se(o);if(e&&(t={type:"listbox",label:"Image list",name:"image-list",values:A(e,function(e){e.value=o.convertURL(e.value||e.url,"src")},[{text:"None",value:""}]),value:r.src&&o.convertURL(r.src,"src"),onselect:function(e){var t=n.find("#alt");(!t.value()||e.lastControl&&t.value()===e.lastControl.text())&&t.value(e.control.text()),n.find("#src").value(e.control.value()).fire("change")},onPostRender:function(){t=this}}),a(o)||u(o)||c(o)){var i=[Ce(o,t)];a(o)&&i.push(me(o)),(u(o)||c(o))&&i.push(Me(o)),n=o.windowManager.open({title:"Insert/edit image",data:r,bodyType:"tabpanel",body:i,onSubmit:ke(De,o)})}else n=o.windowManager.open({title:"Insert/edit image",data:r,body:Ae(o,t),onSubmit:ke(De,o)});xe(n)}return{open:function(){R(o,e)}}}var Be=function(e){e.addCommand("mceImage",ze(e).open)},He=function(o){return function(e){for(var t,n,r=e.length,i=function(e){e.attr("contenteditable",o?"true":null)};r--;)t=e[r],(n=t.attr("class"))&&/\bimage\b/.test(n)&&(t.attr("contenteditable",o?"false":null),w.each(t.getAll("figcaption"),i))}},Fe=function(e){e.on("preInit",function(){e.parser.addNodeFilter("figure",He(!0)),e.serializer.addNodeFilter("figure",He(!1))})},We=function(e){e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:ze(e).open,stateSelector:"img:not([data-mce-object],[data-mce-placeholder]),figure.image"}),e.addMenuItem("image",{icon:"image",text:"Image",onclick:ze(e).open,context:"insert",prependToContext:!0})};e.add("image",function(e){Fe(e),We(e),Be(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var r=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return r(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),Y=tinymce.util.Tools.resolve("tinymce.util.Tools");function n(t,e){return i(document.createElement("canvas"),t,e)}function o(t){return t.getContext("2d")}function i(t,e,n){return t.width=e,t.height=n,t}var a,u,c,l,h={create:n,clone:function(t){var e;return o(e=n(t.width,t.height)).drawImage(t,0,0),e},resize:i,get2dContext:o,get3dContext:function(t){var e=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(n){}return e||(e=null),e}},p={getWidth:function(t){return t.naturalWidth||t.width},getHeight:function(t){return t.naturalHeight||t.height}},g=window.Promise?window.Promise:function(){var t=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(t,r(o,this),r(a,this))},e=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(t){setTimeout(t,1)};function r(t,e){return function(){t.apply(e,arguments)}}var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(r){var o=this;null!==this._state?e(function(){var t=o._state?r.onFulfilled:r.onRejected;if(null!==t){var e;try{e=t(o._value)}catch(n){return void r.reject(n)}r.resolve(e)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void l(r(e,t),r(o,this),r(a,this))}this._state=!0,this._value=t,u.call(this)}catch(n){a.call(this,n)}}function a(t){this._state=!1,this._value=t,u.call(this)}function u(){for(var t=0,e=this._deferreds.length;t<e;t++)i.call(this,this._deferreds[t]);this._deferreds=null}function c(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function l(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(o){if(r)return;r=!0,n(o)}}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype.then=function(n,r){var o=this;return new t(function(t,e){i.call(o,new c(n,r,t,e))})},t.all=function(){var c=Array.prototype.slice.call(1===arguments.length&&n(arguments[0])?arguments[0]:arguments);return new t(function(o,i){if(0===c.length)return o([]);var a=c.length;function u(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){u(e,t)},i)}c[e]=t,0==--a&&o(c)}catch(r){i(r)}}for(var t=0;t<c.length;t++)u(t,c[t])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(n){return new t(function(t,e){e(n)})},t.race=function(o){return new t(function(t,e){for(var n=0,r=o.length;n<r;n++)o[n].then(t,e)})},t}(),s=function(t){return function(){return t}},f=s(!1),d=s(!0),m={noop:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},noarg:function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n()}},compose:function(n,r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n(r.apply(null,arguments))}},constant:s,identity:function(t){return t},tripleEquals:function(t,e){return t===e},curry:function(i){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=a.concat(n);return i.apply(null,o)}},not:function(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return!n.apply(null,arguments)}},die:function(t){return function(){throw new Error(t)}},apply:function(t){return t()},call:function(t){t()},never:f,always:d},v=m.never,y=m.always,b=function(){return w},w=(l={fold:function(t,e){return t()},is:v,isSome:v,isNone:y,getOr:c=function(t){return t},getOrThunk:u=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},or:c,orThunk:u,map:b,ap:b,each:function(){},bind:b,flatten:b,exists:v,forall:y,filter:b,equals:a=function(t){return t.isNone()},equals_:a,toArray:function(){return[]},toString:m.constant("none()")},Object.freeze&&Object.freeze(l),l),x=function(n){var t=function(){return n},e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:y,isNone:v,getOr:t,getOrThunk:t,getOrDie:t,or:e,orThunk:e,map:function(t){return x(t(n))},ap:function(t){return t.fold(b,function(t){return x(t(n))})},each:function(t){t(n)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(n)?o:w},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(v,function(t){return e(n,t)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},R={some:x,none:b,from:function(t){return null===t||t===undefined?w:x(t)}},I="undefined"!=typeof window?window:Function("return this;")(),T=function(t,e){for(var n=e!==undefined&&null!==e?e:I,r=0;r<t.length&&n!==undefined&&null!==n;++r)n=n[t[r]];return n},k=function(t,e){var n=t.split(".");return T(n,e)},C={getOrDie:function(t,e){var n=k(t,e);if(n===undefined||null===n)throw t+" not available on this browser";return n}};function B(){return new(C.getOrDie("FileReader"))}var j={atob:function(t){return C.getOrDie("atob")(t)},requestAnimationFrame:function(t){C.getOrDie("requestAnimationFrame")(t)}};function A(u){return new g(function(t,e){var n=URL.createObjectURL(u),r=new Image,o=function(){r.removeEventListener("load",i),r.removeEventListener("error",a)};function i(){o(),t(r)}function a(){o(),e("Unable to load data of type "+u.type+": "+n)}r.addEventListener("load",i),r.addEventListener("error",a),r.src=n,r.complete&&i()})}function U(r){return new g(function(t,n){var e=new XMLHttpRequest;e.open("GET",r,!0),e.responseType="blob",e.onload=function(){200==this.status&&t(this.response)},e.onerror=function(){var t,e=this;n(0===this.status?((t=new Error("No access to download image")).code=18,t.name="SecurityError",t):new Error("Error "+e.status+" downloading image"))},e.send()})}function M(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return R.none();for(var r,o,i,a=n[1],u=e[1],c=j.atob(u),l=c.length,s=Math.ceil(l/1024),f=new Array(s),d=0;d<s;++d){for(var h=1024*d,p=Math.min(h+1024,l),g=new Array(p-h),m=h,v=0;m<p;++v,++m)g[v]=c[m].charCodeAt(0);f[d]=(r=g,new(C.getOrDie("Uint8Array"))(r))}return R.some((o=f,i={type:a},new(C.getOrDie("Blob"))(o,i)))}function O(n){return new g(function(t,e){M(n).fold(function(){e("uri is not base64: "+n)},t)})}function z(n){return new g(function(t){var e=new B;e.onloadend=function(){t(e.result)},e.readAsDataURL(n)})}var D={blobToImage:A,imageToBlob:function(t){var e=t.src;return 0===e.indexOf("data:")?O(e):U(e)},blobToArrayBuffer:function(n){return new g(function(t){var e=new B;e.onloadend=function(){t(e.result)},e.readAsArrayBuffer(n)})},blobToDataUri:z,blobToBase64:function(t){return z(t).then(function(t){return t.split(",")[1]})},dataUriToBlobSync:M,canvasToBlob:function(t,n,r){return n=n||"image/png",HTMLCanvasElement.prototype.toBlob?new g(function(e){t.toBlob(function(t){e(t)},n,r)}):O(t.toDataURL(n,r))},canvasToDataURL:function(t,e,n){return e=e||"image/png",t.then(function(t){return t.toDataURL(e,n)})},blobToCanvas:function(t){return A(t).then(function(t){var e,n;return e=t,URL.revokeObjectURL(e.src),n=h.create(p.getWidth(t),p.getHeight(t)),h.get2dContext(n).drawImage(t,0,0),n})},uriToBlob:function(t){return 0===t.indexOf("blob:")?U(t):0===t.indexOf("data:")?O(t):null}},S=function(t){return D.blobToImage(t)},E=function(t){return D.imageToBlob(t)};function _(t,e,n){var r=e.type;function o(e,n){return t.then(function(t){return D.canvasToDataURL(t,e,n)})}return{getType:m.constant(r),toBlob:function(){return g.resolve(e)},toDataURL:function(){return n},toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then(function(t){return D.canvasToBlob(t,e,n)})},toAdjustedDataURL:o,toAdjustedBase64:function(t,e){return o(t,e).then(function(t){return t.split(",")[1]})},toCanvas:function(){return t.then(h.clone)}}}function L(e){return D.blobToDataUri(e).then(function(t){return _(D.blobToCanvas(e),e,t)})}var H={fromBlob:L,fromCanvas:function(e,t){return D.canvasToBlob(e,t).then(function(t){return _(g.resolve(e),t,e.toDataURL())})},fromImage:function(t){return D.imageToBlob(t).then(function(t){return L(t)})},fromBlobAndUrlSync:function(t,e){return _(D.blobToCanvas(t),t,e)}};function F(t,e,n){return n<(t=parseFloat(t))?t=n:t<e&&(t=e),t}var P=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];function W(t,e){var n,r,o,i,a=[],u=new Array(10);for(n=0;n<5;n++){for(r=0;r<5;r++)a[r]=e[r+5*n];for(r=0;r<5;r++){for(o=i=0;o<5;o++)i+=t[r+5*o]*a[o];u[r+5*n]=i}}return u}function V(t,n){return n=F(n,0,1),t.map(function(t,e){return e%6==0?t=1-(1-t)*n:t*=n,F(t,0,1)})}var N={identity:function(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]},adjust:V,multiply:W,adjustContrast:function(t,e){var n;return e=F(e,-1,1),W(t,[(n=(e*=100)<0?127+e/100*127:127*(n=0==(n=e%1)?P[e]:P[Math.floor(e)]*(1-n)+P[Math.floor(e)+1]*n)+127)/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])},adjustBrightness:function(t,e){return W(t,[1,0,0,0,e=F(255*e,-255,255),0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])},adjustSaturation:function(t,e){var n;return W(t,[.3086*(1-(n=1+(0<(e=F(e,-1,1))?3*e:e)))+n,.6094*(1-n),.082*(1-n),0,0,.3086*(1-n),.6094*(1-n)+n,.082*(1-n),0,0,.3086*(1-n),.6094*(1-n),.082*(1-n)+n,0,0,0,0,0,1,0,0,0,0,0,1])},adjustHue:function(t,e){var n,r,o,i,a;return e=F(e,-180,180)/180*Math.PI,W(t,[(o=.213)+.787*(n=Math.cos(e))+(r=Math.sin(e))*-o,(i=.715)+n*-i+r*-i,(a=.072)+n*-a+.928*r,0,0,o+n*-o+.143*r,i+n*(1-i)+.14*r,a+n*-a+-.283*r,0,0,o+n*-o+-.787*r,i+n*-i+r*i,a+.928*n+r*a,0,0,0,0,0,1,0,0,0,0,0,1])},adjustColors:function(t,e,n,r){return W(t,[e=F(e,0,2),0,0,0,0,0,n=F(n,0,2),0,0,0,0,0,r=F(r,0,2),0,0,0,0,0,1,0,0,0,0,0,1])},adjustSepia:function(t,e){return W(t,V([.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0,0,0,0,0,1],e=F(e,0,1)))},adjustGrayscale:function(t,e){return W(t,V([.33,.34,.33,0,0,.33,.34,.33,0,0,.33,.34,.33,0,0,0,0,0,1,0,0,0,0,0,1],e=F(e,0,1)))}};function q(a,u){return a.toCanvas().then(function(t){return e=t,n=a.getType(),r=u,i=h.get2dContext(e),o=function(t,e){var n,r,o,i,a,u=t.data,c=e[0],l=e[1],s=e[2],f=e[3],d=e[4],h=e[5],p=e[6],g=e[7],m=e[8],v=e[9],y=e[10],b=e[11],w=e[12],x=e[13],R=e[14],I=e[15],T=e[16],k=e[17],C=e[18],B=e[19];for(a=0;a<u.length;a+=4)n=u[a],r=u[a+1],o=u[a+2],i=u[a+3],u[a]=n*c+r*l+o*s+i*f+d,u[a+1]=n*h+r*p+o*g+i*m+v,u[a+2]=n*y+r*b+o*w+i*x+R,u[a+3]=n*I+r*T+o*k+i*C+B;return t}(i.getImageData(0,0,e.width,e.height),r),i.putImageData(o,0,0),H.fromCanvas(e,n);var e,n,r,o,i})}function $(u,c){return u.toCanvas().then(function(t){return e=t,n=u.getType(),r=c,a=h.get2dContext(e),o=a.getImageData(0,0,e.width,e.height),i=a.getImageData(0,0,e.width,e.height),i=function(t,e,n){var r,o,i,a,u,c,l,s,f,d,h,p,g,m,v,y,b;function w(t,e,n){return n<t?t=n:t<e&&(t=e),t}for(i=Math.round(Math.sqrt(n.length)),a=Math.floor(i/2),r=t.data,o=e.data,y=t.width,b=t.height,c=0;c<b;c++)for(u=0;u<y;u++){for(l=s=f=0,h=0;h<i;h++)for(d=0;d<i;d++)p=w(u+d-a,0,y-1),g=w(c+h-a,0,b-1),m=4*(g*y+p),v=n[h*i+d],l+=r[m]*v,s+=r[m+1]*v,f+=r[m+2]*v;o[m=4*(c*y+u)]=w(l,0,255),o[m+1]=w(s,0,255),o[m+2]=w(f,0,255)}return e}(o,i,r),a.putImageData(i,0,0),H.fromCanvas(e,n);var e,n,r,o,i,a})}function X(u){return function(e,n){return e.toCanvas().then(function(t){return function(t,e,n){var r,o,i=h.get2dContext(t),a=new Array(256);for(o=0;o<a.length;o++)a[o]=u(o,n);return r=function(t,e){var n,r=t.data;for(n=0;n<r.length;n+=4)r[n]=e[r[n]],r[n+1]=e[r[n+1]],r[n+2]=e[r[n+2]];return t}(i.getImageData(0,0,t.width,t.height),a),i.putImageData(r,0,0),H.fromCanvas(t,e)}(t,e.getType(),n)})}}function G(n){return function(t,e){return q(t,n(N.identity(),e))}}function K(e){return function(t){return $(t,e)}}var J,Z={invert:(J=[-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0],function(t){return q(t,J)}),brightness:G(N.adjustBrightness),hue:G(N.adjustHue),saturate:G(N.adjustSaturation),contrast:G(N.adjustContrast),grayscale:G(N.adjustGrayscale),sepia:G(N.adjustSepia),colorize:function(t,e,n,r){return q(t,N.adjustColors(N.identity(),e,n,r))},sharpen:K([0,-1,0,-1,5,-1,0,-1,0]),emboss:K([-2,-1,0,-1,1,1,0,1,2]),gamma:X(function(t,e){return 255*Math.pow(t/255,1-e)}),exposure:X(function(t,e){return 255*(1-Math.exp(-t/255*e))}),colorFilter:q,convoluteFilter:$},Q={scale:function e(t,n,r){var o=p.getWidth(t),i=p.getHeight(t),a=n/o,u=r/i,c=!1;(a<.5||2<a)&&(a=a<.5?.5:2,c=!0),(u<.5||2<u)&&(u=u<.5?.5:2,c=!0);var l,s,f,d=(l=t,s=a,f=u,new g(function(t){var e=p.getWidth(l),n=p.getHeight(l),r=Math.floor(e*s),o=Math.floor(n*f),i=h.create(r,o),a=h.get2dContext(i);a.drawImage(l,0,0,e,n,0,0,r,o),t(i)}));return c?d.then(function(t){return e(t,n,r)}):d}},tt={rotate:function(c,l){return c.toCanvas().then(function(t){return e=t,n=c.getType(),r=l,o=h.create(e.width,e.height),i=h.get2dContext(o),90!=(r=r<(u=a=0)?360+r:r)&&270!=r||h.resize(o,o.height,o.width),90!=r&&180!=r||(a=o.width),270!=r&&180!=r||(u=o.height),i.translate(a,u),i.rotate(r*Math.PI/180),i.drawImage(e,0,0),H.fromCanvas(o,n);var e,n,r,o,i,a,u})},flip:function(a,u){return a.toCanvas().then(function(t){return e=t,n=a.getType(),r=u,o=h.create(e.width,e.height),i=h.get2dContext(o),"v"==r?(i.scale(1,-1),i.drawImage(e,0,-o.height)):(i.scale(-1,1),i.drawImage(e,-o.width,0)),H.fromCanvas(o,n);var e,n,r,o,i})},crop:function(c,l,s,f,d){return c.toCanvas().then(function(t){return e=t,n=c.getType(),r=l,o=s,i=f,a=d,u=h.create(i,a),h.get2dContext(u).drawImage(e,-r,-o),H.fromCanvas(u,n);var e,n,r,o,i,a,u})},resize:function(e,n,r){return e.toCanvas().then(function(t){return Q.scale(t,n,r).then(function(t){return H.fromCanvas(t,e.getType())})})}},et={invert:function(t){return Z.invert(t)},sharpen:function(t){return Z.sharpen(t)},emboss:function(t){return Z.emboss(t)},brightness:function(t,e){return Z.brightness(t,e)},hue:function(t,e){return Z.hue(t,e)},saturate:function(t,e){return Z.saturate(t,e)},contrast:function(t,e){return Z.contrast(t,e)},grayscale:function(t,e){return Z.grayscale(t,e)},sepia:function(t,e){return Z.sepia(t,e)},colorize:function(t,e,n,r){return Z.colorize(t,e,n,r)},gamma:function(t,e){return Z.gamma(t,e)},exposure:function(t,e){return Z.exposure(t,e)},flip:function(t,e){return tt.flip(t,e)},crop:function(t,e,n,r,o){return tt.crop(t,e,n,r,o)},resize:function(t,e,n){return tt.resize(t,e,n)},rotate:function(t,e){return tt.rotate(t,e)}},nt=function(t){return t.toBlob()},rt={blobToImageResult:function(t){return H.fromBlob(t)},fromBlobAndUrlSync:function(t,e){return H.fromBlobAndUrlSync(t,e)},imageToImageResult:function(t){return H.fromImage(t)},imageResultToBlob:function(t,e,n){return e===undefined&&n===undefined?nt(t):t.toAdjustedBlob(e,n)},imageResultToOriginalBlob:nt,imageResultToDataURL:function(t){return t.toDataURL()}},ot=function(){return C.getOrDie("URL")},it={createObjectURL:function(t){return ot().createObjectURL(t)},revokeObjectURL:function(t){ot().revokeObjectURL(t)}},at=tinymce.util.Tools.resolve("tinymce.util.Delay"),ut=tinymce.util.Tools.resolve("tinymce.util.Promise"),ct=tinymce.util.Tools.resolve("tinymce.util.URI"),lt=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),st=tinymce.util.Tools.resolve("tinymce.ui.Factory"),ft=tinymce.util.Tools.resolve("tinymce.geom.Rect"),dt=function(n){return new ut(function(t){var e=function(){n.removeEventListener("load",e),t(n)};n.complete?t(n):n.addEventListener("load",e)})},ht=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),pt=tinymce.util.Tools.resolve("tinymce.util.Observable"),gt=tinymce.util.Tools.resolve("tinymce.util.VK"),mt=0,vt={create:function(t){return new(st.get("Control").extend({Defaults:{classes:"imagepanel"},selection:function(t){return arguments.length?(this.state.set("rect",t),this):this.state.get("rect")},imageSize:function(){var t=this.state.get("viewRect");return{w:t.w,h:t.h}},toggleCropRect:function(t){this.state.set("cropEnabled",t)},imageSrc:function(t){var o=this,i=new Image;i.src=t,dt(i).then(function(){var t,e,n=o.state.get("viewRect");if((e=o.$el.find("img"))[0])e.replaceWith(i);else{var r=document.createElement("div");r.className="mce-imagepanel-bg",o.getEl().appendChild(r),o.getEl().appendChild(i)}t={x:0,y:0,w:i.naturalWidth,h:i.naturalHeight},o.state.set("viewRect",t),o.state.set("rect",ft.inflate(t,-20,-20)),n&&n.w===t.w&&n.h===t.h||o.zoomFit(),o.repaintImage(),o.fire("load")})},zoom:function(t){return arguments.length?(this.state.set("zoom",t),this):this.state.get("zoom")},postRender:function(){return this.imageSrc(this.settings.imageSrc),this._super()},zoomFit:function(){var t,e,n,r,o,i;t=this.$el.find("img"),e=this.getEl().clientWidth,n=this.getEl().clientHeight,r=t[0].naturalWidth,o=t[0].naturalHeight,1<=(i=Math.min((e-10)/r,(n-10)/o))&&(i=1),this.zoom(i)},repaintImage:function(){var t,e,n,r,o,i,a,u,c,l,s;s=this.getEl(),c=this.zoom(),l=this.state.get("rect"),a=this.$el.find("img"),u=this.$el.find(".mce-imagepanel-bg"),o=s.offsetWidth,i=s.offsetHeight,n=a[0].naturalWidth*c,r=a[0].naturalHeight*c,t=Math.max(0,o/2-n/2),e=Math.max(0,i/2-r/2),a.css({left:t,top:e,width:n,height:r}),u.css({left:t,top:e,width:n,height:r}),this.cropRect&&(this.cropRect.setRect({x:l.x*c+t,y:l.y*c+e,w:l.w*c,h:l.h*c}),this.cropRect.setClampRect({x:t,y:e,w:n,h:r}),this.cropRect.setViewPortRect({x:0,y:0,w:o,h:i}))},bindStates:function(){var r=this;function n(t){r.cropRect=function(l,n,s,r,o){var f,a,t,i,e="mce-",u=e+"crid-"+mt++;function d(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}}function c(t,e,n,r){var o,i,a,u,c;o=e.x,i=e.y,a=e.w,u=e.h,o+=n*t.deltaX,i+=r*t.deltaY,(a+=n*t.deltaW)<20&&(a=20),(u+=r*t.deltaH)<20&&(u=20),c=l=ft.clamp({x:o,y:i,w:a,h:u},s,"move"===t.name),c=d(s,c),f.fire("updateRect",{rect:c}),g(c)}function h(e){function t(t,e){e.h<0&&(e.h=0),e.w<0&&(e.w=0),ht("#"+u+"-"+t,r).css({left:e.x,top:e.y,width:e.w,height:e.h})}Y.each(a,function(t){ht("#"+u+"-"+t.name,r).css({left:e.w*t.xMul+e.x,top:e.h*t.yMul+e.y})}),t("top",{x:n.x,y:n.y,w:n.w,h:e.y-n.y}),t("right",{x:e.x+e.w,y:e.y,w:n.w-e.x-e.w+n.x,h:e.h}),t("bottom",{x:n.x,y:e.y+e.h,w:n.w,h:n.h-e.y-e.h+n.y}),t("left",{x:n.x,y:e.y,w:e.x-n.x,h:e.h}),t("move",e)}function p(t){h(l=t)}function g(t){var e,n;p((e=s,{x:(n=t).x+e.x,y:n.y+e.y,w:n.w,h:n.h}))}return a=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],i=["top","right","bottom","left"],ht('<div id="'+u+'" class="'+e+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(r),Y.each(i,function(t){ht("#"+u,r).append('<div id="'+u+"-"+t+'"class="'+e+'croprect-block" style="display: none" data-mce-bogus="all">')}),Y.each(a,function(t){ht("#"+u,r).append('<div id="'+u+"-"+t.name+'" class="'+e+"croprect-handle "+e+"croprect-handle-"+t.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+t.label+'" aria-grabbed="false">')}),t=Y.map(a,function(e){var n;return new(st.get("DragHelper"))(u,{document:r.ownerDocument,handle:u+"-"+e.name,start:function(){n=l},drag:function(t){c(e,n,t.deltaX,t.deltaY)}})}),h(l),ht(r).on("focusin focusout",function(t){ht(t.target).attr("aria-grabbed","focus"===t.type)}),ht(r).on("keydown",function(e){var i;function t(t,e,n,r,o){t.stopPropagation(),t.preventDefault(),c(i,n,r,o)}switch(Y.each(a,function(t){if(e.target.id===u+"-"+t.name)return i=t,!1}),e.keyCode){case gt.LEFT:t(e,0,l,-10,0);break;case gt.RIGHT:t(e,0,l,10,0);break;case gt.UP:t(e,0,l,0,-10);break;case gt.DOWN:t(e,0,l,0,10);break;case gt.ENTER:case gt.SPACEBAR:e.preventDefault(),o()}}),f=Y.extend({toggleVisibility:function(t){var e;e=Y.map(a,function(t){return"#"+u+"-"+t.name}).concat(Y.map(i,function(t){return"#"+u+"-"+t})).join(","),t?ht(e,r).show():ht(e,r).hide()},setClampRect:function(t){s=t,h(l)},setRect:p,getInnerRect:function(){return d(s,l)},setInnerRect:g,setViewPortRect:function(t){n=t,h(l)},destroy:function(){Y.each(t,function(t){t.destroy()}),t=[]}},pt)}(t,r.state.get("viewRect"),r.state.get("viewRect"),r.getEl(),function(){r.fire("crop")}),r.cropRect.on("updateRect",function(t){var e=t.rect,n=r.zoom();e={x:Math.round(e.x/n),y:Math.round(e.y/n),w:Math.round(e.w/n),h:Math.round(e.h/n)},r.state.set("rect",e)}),r.on("remove",r.cropRect.destroy)}r.state.on("change:cropEnabled",function(t){r.cropRect.toggleVisibility(t.value),r.repaintImage()}),r.state.on("change:zoom",function(){r.repaintImage()}),r.state.on("change:rect",function(t){var e=t.value;r.cropRect||n(e),r.cropRect.setRect(e)})}}))(t)}};function yt(t){return{blob:t,url:it.createObjectURL(t)}}function bt(t){t&&it.revokeObjectURL(t.url)}function wt(t){Y.each(t,bt)}function xt(i,a,t,e){var u,n,r,c,o,l,s,f,d,h,p,g,m,v,y,b,w,x,R,I,T,k,C,B,j,A,U,M=function(){var n=[],r=-1;function t(){return 0<r}function e(){return-1!==r&&r<n.length-1}return{data:n,add:function(t){var e;return e=n.splice(++r),n.push(t),{state:t,removed:e}},undo:function(){if(t())return n[--r]},redo:function(){if(e())return n[++r]},canUndo:t,canRedo:e}}(),O=function(t){return i.rtl?t.reverse():t};function z(t){var e,n,r,o;e=u.find("#w")[0],n=u.find("#h")[0],r=parseInt(e.value(),10),o=parseInt(n.value(),10),u.find("#constrain")[0].checked()&&B&&j&&r&&o&&("w"===t.control.settings.name?(o=Math.round(r*A),n.value(o)):(r=Math.round(o*U),e.value(r))),B=r,j=o}function D(t){return Math.round(100*t)+"%"}function S(){u.find("#undo").disabled(!M.canUndo()),u.find("#redo").disabled(!M.canRedo()),u.statusbar.find("#save").disabled(!M.canUndo())}function E(){u.find("#undo").disabled(!0),u.find("#redo").disabled(!0)}function _(t){t&&f.imageSrc(t.url)}function L(e){return function(){var t=Y.grep(C,function(t){return t.settings.name!==e});Y.each(t,function(t){t.hide()}),e.show(),e.focus()}}function H(t){_(c=yt(t))}function F(t){_(a=yt(t)),wt(M.add(a).removed),S()}function P(){var e=f.selection();rt.blobToImageResult(a.blob).then(function(t){et.crop(t,e.x,e.y,e.w,e.h).then($).then(function(t){F(t),V()})})}var W=function(e){var n=[].slice.call(arguments,1);return function(){var t=c||a;rt.blobToImageResult(t.blob).then(function(t){e.apply(this,[t].concat(n)).then($).then(H)})}};function V(){_(a),bt(c),L(n)(),S()}function N(){c?(F(c.blob),V()):function t(e,n){c?n():setTimeout(function(){0<e--?t(e,n):i.windowManager.alert("Error: failed to apply image operation.")},10)}(100,N)}function q(t){return st.create("Form",{layout:"flex",direction:"row",labelGap:5,border:"0 0 1 0",align:"center",pack:"center",padding:"0 10 0 10",spacing:5,flex:0,minHeight:60,defaults:{classes:"imagetool",type:"button"},items:t})}var $=function(t){return t.toBlob()};function X(t,e){return q(O([{text:"Back",onclick:V},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:N}])).hide().on("show",function(){E(),rt.blobToImageResult(a.blob).then(function(t){return e(t)}).then($).then(function(t){var e=yt(t);_(e),bt(c),c=e})})}function G(t,n,e,r,o){return q(O([{text:"Back",onclick:V},{type:"spacer",flex:1},{type:"slider",flex:1,ondragend:function(t){var e;e=t.value,rt.blobToImageResult(a.blob).then(function(t){return n(t,e)}).then($).then(function(t){var e=yt(t);_(e),bt(c),c=e})},minValue:i.rtl?o:r,maxValue:i.rtl?r:o,value:e,previewFilter:D},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:N}])).hide().on("show",function(){this.find("slider").value(e),E()})}o=q(O([{text:"Back",onclick:V},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:P}])).hide().on("show hide",function(t){f.toggleCropRect("show"===t.type)}).on("show",E),l=q(O([{text:"Back",onclick:V},{type:"spacer",flex:1},{type:"textbox",name:"w",label:"Width",size:4,onkeyup:z},{type:"textbox",name:"h",label:"Height",size:4,onkeyup:z},{type:"checkbox",name:"constrain",text:"Constrain proportions",checked:!0,onchange:function(t){!0===t.control.value()&&(A=j/B,U=B/j)}},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:"submit"}])).hide().on("submit",function(t){var e=parseInt(u.find("#w").value(),10),n=parseInt(u.find("#h").value(),10);t.preventDefault(),function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=[].slice.call(arguments,1);return function(){rt.blobToImageResult(a.blob).then(function(t){e.apply(this,[t].concat(r)).then($).then(F)})}}(et.resize,e,n)(),V()}).on("show",E),s=q(O([{text:"Back",onclick:V},{type:"spacer",flex:1},{icon:"fliph",tooltip:"Flip horizontally",onclick:W(et.flip,"h")},{icon:"flipv",tooltip:"Flip vertically",onclick:W(et.flip,"v")},{icon:"rotateleft",tooltip:"Rotate counterclockwise",onclick:W(et.rotate,-90)},{icon:"rotateright",tooltip:"Rotate clockwise",onclick:W(et.rotate,90)},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:N}])).hide().on("show",E),p=X(0,et.invert),R=X(0,et.sharpen),I=X(0,et.emboss),g=G(0,et.brightness,0,-1,1),m=G(0,et.hue,180,0,360),v=G(0,et.saturate,0,-1,1),y=G(0,et.contrast,0,-1,1),b=G(0,et.grayscale,0,0,1),w=G(0,et.sepia,0,0,1),x=function(t,o){function e(){var e,n,r;e=u.find("#r")[0].value(),n=u.find("#g")[0].value(),r=u.find("#b")[0].value(),rt.blobToImageResult(a.blob).then(function(t){return o(t,e,n,r)}).then($).then(function(t){var e=yt(t);_(e),bt(c),c=e})}var n=i.rtl?2:0,r=i.rtl?0:2;return q(O([{text:"Back",onclick:V},{type:"spacer",flex:1},{type:"slider",label:"R",name:"r",minValue:n,value:1,maxValue:r,ondragend:e,previewFilter:D},{type:"slider",label:"G",name:"g",minValue:n,value:1,maxValue:r,ondragend:e,previewFilter:D},{type:"slider",label:"B",name:"b",minValue:n,value:1,maxValue:r,ondragend:e,previewFilter:D},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:N}])).hide().on("show",function(){u.find("#r,#g,#b").value(1),E()})}(0,et.colorize),T=G(0,et.gamma,0,-1,1),k=G(0,et.exposure,1,0,2),r=q(O([{text:"Back",onclick:V},{type:"spacer",flex:1},{text:"hue",icon:"hue",onclick:L(m)},{text:"saturate",icon:"saturate",onclick:L(v)},{text:"sepia",icon:"sepia",onclick:L(w)},{text:"emboss",icon:"emboss",onclick:L(I)},{text:"exposure",icon:"exposure",onclick:L(k)},{type:"spacer",flex:1}])).hide(),n=q(O([{tooltip:"Crop",icon:"crop",onclick:L(o)},{tooltip:"Resize",icon:"resize2",onclick:L(l)},{tooltip:"Orientation",icon:"orientation",onclick:L(s)},{tooltip:"Brightness",icon:"sun",onclick:L(g)},{tooltip:"Sharpen",icon:"sharpen",onclick:L(R)},{tooltip:"Contrast",icon:"contrast",onclick:L(y)},{tooltip:"Color levels",icon:"drop",onclick:L(x)},{tooltip:"Gamma",icon:"gamma",onclick:L(T)},{tooltip:"Invert",icon:"invert",onclick:L(p)}])),f=vt.create({flex:1,imageSrc:a.url}),d=st.create("Container",{layout:"flex",direction:"column",pack:"start",border:"0 1 0 0",padding:5,spacing:5,items:[{type:"button",icon:"undo",tooltip:"Undo",name:"undo",onclick:function(){_(a=M.undo()),S()}},{type:"button",icon:"redo",tooltip:"Redo",name:"redo",onclick:function(){_(a=M.redo()),S()}},{type:"button",icon:"zoomin",tooltip:"Zoom in",onclick:function(){var t=f.zoom();t<2&&(t+=.1),f.zoom(t)}},{type:"button",icon:"zoomout",tooltip:"Zoom out",onclick:function(){var t=f.zoom();.1<t&&(t-=.1),f.zoom(t)}}]}),h=st.create("Container",{type:"container",layout:"flex",direction:"row",align:"stretch",flex:1,items:O([d,f])}),C=[n,o,l,s,r,p,g,m,v,y,b,w,x,R,I,T,k],(u=i.windowManager.open({layout:"flex",direction:"column",align:"stretch",minWidth:Math.min(lt.DOM.getViewPort().w,800),minHeight:Math.min(lt.DOM.getViewPort().h,650),title:"Edit image",items:C.concat([h]),buttons:O([{text:"Save",name:"save",subtype:"primary",onclick:function(){t(a.blob),u.close()}},{text:"Cancel",onclick:"close"}])})).on("close",function(){e(),wt(M.data),c=M=null}),M.add(a),S(),f.on("load",function(){B=f.imageSize().w,j=f.imageSize().h,A=j/B,U=B/j,u.find("#w").value(B),u.find("#h").value(j)}),f.on("crop",P)}var Rt={edit:function(r,t){return new ut(function(e,n){return t.toBlob().then(function(t){xt(r,yt(t),e,n)})})}},It={getImageSize:function(t){var e,n;function r(t){return/^[0-9\.]+px$/.test(t)}return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)},setImageSize:function(t,e){var n,r;e&&(n=t.style.width,r=t.style.height,(n||r)&&(t.style.width=e.w+"px",t.style.height=e.h+"px",t.removeAttribute("data-mce-style")),n=t.width,r=t.height,(n||r)&&(t.setAttribute("width",e.w),t.setAttribute("height",e.h)))},getNaturalImageSize:function(t){return{w:t.naturalWidth,h:t.naturalHeight}}},Tt=function(e){return function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&Array.prototype.isPrototypeOf(t)?"array":"object"===e&&String.prototype.isPrototypeOf(t)?"string":e}(t)===e}},kt={isString:Tt("string"),isObject:Tt("object"),isArray:Tt("array"),isNull:Tt("null"),isBoolean:Tt("boolean"),isUndefined:Tt("undefined"),isFunction:Tt("function"),isNumber:Tt("number")},Ct=(Array.prototype.indexOf,undefined,Array.prototype.push,Array.prototype.slice,kt.isFunction(Array.from)&&Array.from,function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n,t))return R.some(o)}return R.none()});function Bt(){return new(C.getOrDie("XMLHttpRequest"))}var jt=function(t){return null!==t&&t!==undefined},At=function(t,e){var n;return n=e.reduce(function(t,e){return jt(t)?t[e]:undefined},t),jt(n)?n:null},Ut=function(e){return new ut(function(n){var t=new B;t.onload=function(t){var e=t.target;n(e.result)},t.readAsText(e)})},Mt=function(e,r,o){return new ut(function(t){var n;(n=new Bt).onreadystatechange=function(){4===n.readyState&&t({status:n.status,blob:this.response})},n.open("GET",e,!0),n.withCredentials=o,Y.each(r,function(t,e){n.setRequestHeader(e,t)}),n.responseType="blob",n.send()})},Ot=function(t){var e;try{e=JSON.parse(t)}catch(n){}return e},zt=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],Dt=[{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],St=function(e){return"ImageProxy HTTP error: "+Ct(zt,function(t){return e===t.code}).fold(m.constant("Unknown ImageProxy error"),function(t){return t.message})},Et=function(t){var e=St(t);return ut.reject(e)},_t=function(e){return Ct(Dt,function(t){return t.type===e}).fold(m.constant("Unknown service error"),function(t){return t.message})},Lt=function(t,e){return Ut(e).then(function(t){var e,n,r=(e=Ot(t),"ImageProxy Service error: "+((n=At(e,["error","type"]))?_t(n):"Invalid JSON in service error message"));return ut.reject(r)})},Ht=function(t,e){return 400===(n=t)||403===n||500===n?Lt(0,e):Et(t);var n},Ft=Et,Pt=function(t,e){var n,r,o,i={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return Mt((n=t,r=e,o=-1===n.indexOf("?")?"?":"&",/[?&]apiKey=/.test(n)||!r?n:n+o+"apiKey="+encodeURIComponent(r)),i,!1).then(function(t){return t.status<200||300<=t.status?Ht(t.status,t.blob):ut.resolve(t.blob)})},Wt=function(t,e,n){return e?Pt(t,e):Mt(t,{},n).then(function(t){return t.status<200||300<=t.status?Ft(t.status):ut.resolve(t.blob)})},Vt=0,Nt=function(t,e){t.notificationManager.open({text:e,type:"error"})},qt=function(t){return t.selection.getNode()},$t=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new ct(n).host===t.documentBaseURI.host},Xt=function(t,e){return-1!==Y.inArray(t.getParam("imagetools_cors_hosts",[],"string[]"),new ct(e.src).host)},Gt=function(t,e){var n,r,o,i,a=e.src;return Xt(t,e)?Wt(e.src,null,(r=t,o=e,-1!==Y.inArray(r.getParam("imagetools_credentials_hosts",[],"string[]"),new ct(o.src).host))):$t(t,e)?E(e):(a=t.getParam("imagetools_proxy"),a+=(-1===a.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),n=(i=t).getParam("api_key",i.getParam("imagetools_api_key","","string"),"string"),Wt(a,n,!1))},Yt=function(t){var e;return(e=t.editorUpload.blobCache.getByUri(qt(t).src))?ut.resolve(e.blob()):Gt(t,qt(t))},Kt=function(t){clearTimeout(t.get())},Jt=function(c,l,s,f,d){return l.toBlob().then(function(t){var e,n,r,o,i,a,u;return r=c.editorUpload.blobCache,e=(i=qt(c)).src,c.getParam("images_reuse_filename",!1,"boolean")&&((o=r.getByUri(e))?(e=o.uri(),n=o.name()):(a=c,n=(u=e.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i))?a.dom.encode(u[1]):null)),o=r.create({id:"imagetools"+Vt++,blob:t,base64:l.toBase64(),uri:e,name:n}),r.add(o),c.undoManager.transact(function(){c.$(i).on("load",function t(){var e,n,r;c.$(i).off("load",t),c.nodeChanged(),s?c.editorUpload.uploadImagesAuto():(Kt(f),e=c,n=f,r=at.setEditorTimeout(e,function(){e.editorUpload.uploadImagesAuto()},e.getParam("images_upload_timeout",3e4,"number")),n.set(r))}),d&&c.$(i).attr({width:d.w,height:d.h}),c.$(i).attr({src:o.blobUri()}).removeAttr("data-mce-src")}),o})},Zt=function(e,n,t,r){return function(){return e._scanForImages().then(m.curry(Yt,e)).then(rt.blobToImageResult).then(t).then(function(t){return Jt(e,t,!1,n,r)},function(t){Nt(e,t)})}},Qt=function(n,r,o){return function(){var t=It.getImageSize(qt(n)),e=t?{w:t.h,h:t.w}:null;return Zt(n,r,function(t){return et.rotate(t,o)},e)()}},te=function(t,e,n){return function(){return Zt(t,e,function(t){return et.flip(t,n)})()}},ee=function(e,r){return function(){var o=qt(e),i=It.getNaturalImageSize(o),n=function(r){return new ut(function(n){S(r).then(function(t){var e=It.getNaturalImageSize(t);i.w===e.w&&i.h===e.h||It.getImageSize(o)&&It.setImageSize(o,e),it.revokeObjectURL(t.src),n(r)})})};Yt(e).then(rt.blobToImageResult).then(m.curry(function(e,t){return Rt.edit(e,t).then(n).then(rt.blobToImageResult).then(function(t){return Jt(e,t,!0,r)},function(){})},e),function(t){Nt(e,t)})}},ne=function(t,e){return t.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")&&($t(t,e)||Xt(t,e)||t.settings.imagetools_proxy)},re=Kt,oe=function(n,t){Y.each({mceImageRotateLeft:Qt(n,t,-90),mceImageRotateRight:Qt(n,t,90),mceImageFlipVertical:te(n,t,"v"),mceImageFlipHorizontal:te(n,t,"h"),mceEditImage:ee(n,t)},function(t,e){n.addCommand(e,t)})},ie=function(n,r,o){n.on("NodeChange",function(t){var e=o.get();e&&e.src!==t.element.src&&(re(r),n.editorUpload.uploadImagesAuto(),o.set(null)),ne(n,t.element)&&o.set(t.element)})},ae=function(t){t.addButton("rotateleft",{title:"Rotate counterclockwise",cmd:"mceImageRotateLeft"}),t.addButton("rotateright",{title:"Rotate clockwise",cmd:"mceImageRotateRight"}),t.addButton("flipv",{title:"Flip vertically",cmd:"mceImageFlipVertical"}),t.addButton("fliph",{title:"Flip horizontally",cmd:"mceImageFlipHorizontal"}),t.addButton("editimage",{title:"Edit image",cmd:"mceEditImage"}),t.addButton("imageoptions",{title:"Image options",icon:"options",cmd:"mceImage"})},ue=function(t){t.addContextToolbar(m.curry(ne,t),t.getParam("imagetools_toolbar","rotateleft rotateright | flipv fliph | crop editimage imageoptions"))};t.add("imagetools",function(t){var e=r(0),n=r(null);oe(t,e),ae(t),ue(t),ie(t,e,n)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),v=tinymce.util.Tools.resolve("tinymce.EditorManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.getParam("importcss_merge_classes")},n=function(e){return e.getParam("importcss_exclusive")},_=function(e){return e.getParam("importcss_selector_converter")},r=function(e){return e.getParam("importcss_selector_filter")},i=function(e){return e.getParam("importcss_groups")},u=function(e){return e.getParam("importcss_append")},l=function(e){return e.getParam("importcss_file_filter")},a=function(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t},f=function(f,e,m){var g=[],n={};function p(e,t){var n,r,i,c=e.href;if(r=c,i=h.cacheSuffix,"string"==typeof r&&(r=r.replace("?"+i,"").replace("&"+i,"")),(c=r)&&m(c,t)&&(o=c,u=(s=f).settings,!(l=!1!==u.skin&&(u.skin||"lightgray"))||o!==(u.skin_url?s.documentBaseURI.toAbsolute(u.skin_url):v.baseURL+"/skins/"+l)+"/content"+(s.inline?".inline":"")+".min.css")){var s,o,u,l;y.each(e.imports,function(e){p(e,!0)});try{n=e.cssRules||e.rules}catch(a){}y.each(n,function(e){e.styleSheet?p(e.styleSheet,!0):e.selectorText&&y.each(e.selectorText.split(","),function(e){g.push(y.trim(e))})})}}y.each(f.contentCSS,function(e){n[e]=!0}),m||(m=function(e,t){return t||n[e]});try{y.each(e.styleSheets,function(e){p(e)})}catch(t){}return g},x=function(e,t){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(r){var i=r[1],c=r[2].substr(1).split(".").join(" "),s=y.makeMap("a,img");return r[1]?(n={title:t},e.schema.getTextBlockElements()[i]?n.block=i:e.schema.getBlockElements()[i]||s[i.toLowerCase()]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:t.substr(1),classes:c}),!1!==o(e)?n.classes=c:n.attributes={"class":c},n}},T=function(e,t){return null===t||!1!==n(e)},c=x,t=function(h){h.on("renderFormatsMenu",function(e){var t,p={},c=a(r(h)),v=e.control,s=(t=i(h),y.map(t,function(e){return y.extend({},e,{original:e,selectors:{},filter:a(e.filter),item:{text:e.title,menu:[]}})})),o=function(e,t){if(f=e,g=p,!(T(h,m=t)?f in g:f in m.selectors)){u=e,a=p,T(h,l=t)?a[u]=!0:l.selectors[u]=!0;var n=(c=(i=h).plugins.importcss,s=e,((o=t)&&o.selector_converter?o.selector_converter:_(i)?_(i):function(){return x(i,s)}).call(c,s,o));if(n){var r=n.name||d.DOM.uniqueId();return h.formatter.register(r,n),y.extend({},v.settings.itemDefaults,{text:n.title,format:r})}}var i,c,s,o,u,l,a,f,m,g;return null};u(h)||v.items().remove(),y.each(f(h,e.doc||h.getDoc(),a(l(h))),function(n){if(-1===n.indexOf(".mce-")&&(!c||c(n))){var e=(r=s,i=n,y.grep(r,function(e){return!e.filter||e.filter(i)}));if(0<e.length)y.each(e,function(e){var t=o(n,e);t&&e.item.menu.push(t)});else{var t=o(n,null);t&&v.add(t)}}var r,i}),y.each(s,function(e){0<e.item.menu.length&&v.add(e.item)}),e.control.renderNew()})},s=function(t){return{convertSelectorToFormat:function(e){return c(t,e)}}};e.add("importcss",function(e){return t(e),s(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},a=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},i=n,o=a,u=function(e){var t=a(e);return 0<t.length?t[0]:n(e)},m=function(e){return e.getParam("insertdatetime_element",!1)},c="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),d="January February March April May June July August September October November December".split(" "),p=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},f=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",p(n.getMonth()+1,2))).replace("%d",p(n.getDate(),2))).replace("%H",""+p(n.getHours(),2))).replace("%M",""+p(n.getMinutes(),2))).replace("%S",""+p(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(d[n.getMonth()]))).replace("%b",""+e.translate(s[n.getMonth()]))).replace("%A",""+e.translate(l[n.getDay()]))).replace("%a",""+e.translate(c[n.getDay()]))).replace("%%","%")},g=function(e,t){if(m(e)){var n=f(e,t),r=void 0;r=/%[HMSIp]/.test(t)?f(e,"%Y-%m-%dT%H:%M"):f(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,l=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(l,o),i.dom.remove(o),i.selection.select(l,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(f(e,t));var i,o,u,c,l},y=f,M=function(e){e.addCommand("mceInsertDate",function(){g(e,t(e))}),e.addCommand("mceInsertTime",function(){g(e,i(e))})},v=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(t,n){var r,a,e,i=(a=n,e=o(r=t),v.map(e,function(e){return{text:y(r,e),onclick:function(){a.set(e),g(r,e)}}}));t.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",menu:i,onclick:function(){var e=n.get();g(t,e||u(t))}}),t.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:i,context:"insert"})};e.add("insertdatetime",function(e){var t=r(null);M(e),S(e,t)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(a){a.settings.inline_styles=!1,a.on("init",function(){var e,t,n,i;e=a,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=o.explode(e.settings.font_size_style_values),i=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(e){return o.inArray(n,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),o.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),o.each(t.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})},n=function(i){i.addButton("fontsizeselect",function(){var o=[],e=i.settings.fontsizeFormats||"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7";return i.$.each(e.split(" "),function(e,t){var n=t,i=t,a=t.split("=");1<a.length&&(n=a[0],i=a[1]),o.push({text:n,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:o,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.size):t.value("")})},onclick:function(e){e.control.settings.value&&i.execCommand("FontSize",!1,e.control.settings.value)}}}),i.addButton("fontselect",function(){var n=[],e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(i.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return i.$.each(e,function(e,t){n.push({text:{raw:t[0]},value:t[1],textStyle:-1===t[1].indexOf("dings")?"font-family:"+t[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.face):t.value("")})},onselect:function(e){e.control.settings.value&&i.execCommand("FontName",!1,e.control.settings.value)}}})};e.add("legacyoutput",function(e){t(e),n(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),e=function(t){return t.target_list},o=function(t){return t.rel_list},i=function(t){return t.link_class_list},p=function(t){return"boolean"==typeof t.link_assume_external_targets&&t.link_assume_external_targets},a=function(t){return"boolean"==typeof t.link_context_toolbar&&t.link_context_toolbar},r=function(t){return t.link_list},k=function(t){return"string"==typeof t.default_link_target},y=function(t){return t.default_link_target},b=e,_=function(t,e){t.settings.target_list=e},w=function(t){return!1!==e(t)},T=o,C=function(t){return o(t)!==undefined},M=i,O=function(t){return i(t)!==undefined},R=function(t){return!1!==t.link_title},N=function(t){return"boolean"==typeof t.allow_unsafe_link_target&&t.allow_unsafe_link_target},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),u=tinymce.util.Tools.resolve("tinymce.Env"),c=function(t){if(!u.ie||10<u.ie){var e=document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r=e,a=n,document.body.appendChild(r),r.dispatchEvent(a),document.body.removeChild(r)}else{var o=window.open("","_blank");if(o){o.opener=null;var i=o.document;i.open(),i.write('<meta http-equiv="refresh" content="0; url='+l.DOM.encode(t)+'">'),i.close()}}var r,a},A=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e){var n,o,i=["noopener"],r=t?t.split(/\s+/):[],a=function(t){return t.filter(function(t){return-1===A.inArray(i,t)})};return(r=e?(n=a(n=r)).length?n.concat(i):i:a(r)).length?(o=r,A.trim(o.sort().join(" "))):null},f=function(t,e){return e=e||t.selection.getNode(),m(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},d=function(t){return t&&"A"===t.nodeName&&t.href},m=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},v=function(t,e){var n,o;(o=t.dom.select("img",e)[0])&&(n=t.dom.getParents(o,"a[href]",e)[0])&&(n.parentNode.insertBefore(o,n),t.dom.remove(n))},g=function(t,e,n){var o,i;(i=t.dom.select("img",e)[0])&&(o=t.dom.create("a",n),i.parentNode.insertBefore(o,i),o.appendChild(i))},L=function(i,r){return function(o){i.undoManager.transact(function(){var t=i.selection.getNode(),e=f(i,t),n={href:o.href,target:o.target?o.target:null,rel:o.rel?o.rel:null,"class":o["class"]?o["class"]:null,title:o.title?o.title:null};C(i.settings)||!1!==N(i.settings)||(n.rel=s(n.rel,"_blank"===n.target)),o.href===r.href&&(r.attach(),r={}),e?(i.focus(),o.hasOwnProperty("text")&&("innerText"in e?e.innerText=o.text:e.textContent=o.text),i.dom.setAttribs(e,n),i.selection.select(e),i.undoManager.add()):m(t)?g(i,t,n):o.hasOwnProperty("text")?i.insertContent(i.dom.createHTML("a",n,i.dom.encode(o.text))):i.execCommand("mceInsertLink",!1,n)})}},P=function(e){return function(){e.undoManager.transact(function(){var t=e.selection.getNode();m(t)?v(e,t):e.execCommand("unlink")})}},h=d,x=function(t){return 0<A.grep(t,d).length},E=function(t){return!(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},S=f,I=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},K=s,U=tinymce.util.Tools.resolve("tinymce.util.Delay"),D=tinymce.util.Tools.resolve("tinymce.util.XHR"),B={},F=function(t,o,e){var i=function(t,n){return n=n||[],A.each(t,function(t){var e={text:t.text||t.title};t.menu?e.menu=i(t.menu):(e.value=t.value,o&&o(e)),n.push(e)}),n};return i(t,e||[])},q=function(e,t,n){var o=e.selection.getRng();U.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),n(t)})})},V=function(a,t){var e,l,o,u,n,i,r,c,s,f,d,m={},v=a.selection,g=a.dom,h=function(t){var e=o.find("#text");(!e.value()||t.lastControl&&e.value()===t.lastControl.text())&&e.value(t.control.text()),o.find("#href").value(t.control.value())},x=function(){l||!u||m.text||this.parent().parent().find("#text")[0].value(this.value())};u=E(v.getContent()),e=S(a),m.text=l=I(a.selection,e),m.href=e?g.getAttrib(e,"href"):"",e?m.target=g.getAttrib(e,"target"):k(a.settings)&&(m.target=y(a.settings)),(d=g.getAttrib(e,"rel"))&&(m.rel=d),(d=g.getAttrib(e,"class"))&&(m["class"]=d),(d=g.getAttrib(e,"title"))&&(m.title=d),u&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){m.text=this.value()}}),t&&(i={type:"listbox",label:"Link list",values:F(t,function(t){t.value=a.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:h,value:a.convertURL(m.href,"href"),onPostRender:function(){i=this}}),w(a.settings)&&(b(a.settings)===undefined&&_(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),c={name:"target",type:"listbox",label:"Target",values:F(b(a.settings))}),C(a.settings)&&(r={name:"rel",type:"listbox",label:"Rel",values:F(T(a.settings),function(t){!1===N(a.settings)&&(t.value=K(t.value,"_blank"===m.target))})}),O(a.settings)&&(s={name:"class",type:"listbox",label:"Class",values:F(M(a.settings),function(t){t.value&&(t.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[t.value]})})})}),R(a.settings)&&(f={name:"title",type:"textbox",label:"Title",value:m.title}),o=a.windowManager.open({title:"Insert link",data:m,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(t){var e=t.meta||{};i&&i.value(a.convertURL(this.value(),"href")),A.each(t.meta,function(t,e){var n=o.find("#"+e);"text"===e?0===l.length&&(n.value(t),m.text=t):n.value(t)}),e.attach&&(B={href:this.value(),attach:e.attach}),e.text||x.call(this)},onkeyup:x,onpaste:x,onbeforecall:function(t){t.meta=o.toJSON()}},n,f,function(n){var o=[];if(A.each(a.dom.select("a:not([href])"),function(t){var e=t.name||t.id;e&&o.push({text:e,value:"#"+e,selected:-1!==n.indexOf("#"+e)})}),o.length)return o.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:o,onselect:h}}(m.href),i,r,c,s],onSubmit:function(t){var e=p(a.settings),n=L(a,B),o=P(a),i=A.extend({},m,t.data),r=i.href;r?(u&&i.text!==l||delete i.text,0<r.indexOf("@")&&-1===r.indexOf("//")&&-1===r.indexOf("mailto:")?q(a,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(i.href="mailto:"+r),n(i)}):!0===e&&!/^\w+:/i.test(r)||!1===e&&/^\s*www[\.|\d\.]/i.test(r)?q(a,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(i.href="http://"+r),n(i)}):n(i)):o()}})},z=function(t){var e,n,o;n=V,"string"==typeof(o=r((e=t).settings))?D.send({url:o,success:function(t){n(e,JSON.parse(t))}}):"function"==typeof o?o(function(t){n(e,t)}):n(e,o)},H=function(t,e){return t.dom.getParent(e,"a[href]")},J=function(t){return H(t,t.selection.getStart())},$=function(t,e){if(e){var n=(i=e).getAttribute("data-mce-href")||i.getAttribute("href");if(/^#/.test(n)){var o=t.$(n);o.length&&t.selection.scrollIntoView(o[0],!0)}else c(e.href)}var i},j=function(t){return function(){z(t)}},G=function(t){return function(){$(t,J(t))}},X=function(r){return function(t){var e,n,o,i;return!!(a(r.settings)&&(!(i=r.plugins.contextmenu)||!i.isContextMenuVisible())&&h(t)&&3===(o=(n=(e=r.selection).getRng()).startContainer).nodeType&&e.isCollapsed()&&0<n.startOffset&&n.startOffset<o.data.length)}},Q=function(o){o.on("click",function(t){var e=H(o,t.target);e&&n.metaKeyPressed(t)&&(t.preventDefault(),$(o,e))}),o.on("keydown",function(t){var e,n=J(o);n&&13===t.keyCode&&!0===(e=t).altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey&&(t.preventDefault(),$(o,n))})},W=function(n){return function(){var e=this;n.on("nodechange",function(t){e.active(!n.readonly&&!!S(n,t.element))})}},Y=function(n){return function(){var e=this,t=function(t){x(t.parents)?e.show():e.hide()};x(n.dom.getParents(n.selection.getStart()))||e.hide(),n.on("nodechange",t),e.on("remove",function(){n.off("nodechange",t)})}},Z=function(t){t.addCommand("mceLink",j(t))},tt=function(t){t.addShortcut("Meta+K","",j(t))},et=function(t){t.addButton("link",{active:!1,icon:"link",tooltip:"Insert/edit link",onclick:j(t),onpostrender:W(t)}),t.addButton("unlink",{active:!1,icon:"unlink",tooltip:"Remove link",onclick:P(t),onpostrender:W(t)}),t.addContextToolbar&&t.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:G(t)})},nt=function(t){t.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:G(t),onPostRender:Y(t),prependToContext:!0}),t.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:j(t),stateSelector:"a[href]",context:"insert",prependToContext:!0}),t.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onclick:P(t),stateSelector:"a[href]"})},ot=function(t){t.addContextToolbar&&t.addContextToolbar(X(t),"openlink | link unlink")};t.add("link",function(t){et(t),nt(t),ot(t),Q(t),Z(t),tt(t)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),l=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(e){return e&&"BR"===e.nodeName},r=function(e){return e&&3===e.nodeType},h=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},i=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},a=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},C=o,s=function(e){return e.parentNode.firstChild===e},c=function(e){return e.parentNode.lastChild===e},y=function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},f=function(e,t){return e&&e.nodeName in t},u=function(e,t){return!!o(t)&&!(!e.isBlock(t.nextSibling)||o(t.previousSibling))},m=function(e,t,n){var o=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&o},g=function(e,t){return e.isChildOf(t,e.getRoot())},N=function(e,t){var n=d.getNode(e,t);return i(e)&&r(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:{container:e,offset:t}},L=function(e){var t=e.cloneRange(),n=N(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var o=N(e.endContainer,e.endOffset);return t.setEnd(o.container,o.offset),t},S=t.DOM,b=function(r){var i={},e=function(e){var t,n,o;n=r[e?"startContainer":"endContainer"],o=r[e?"startOffset":"endOffset"],1===n.nodeType&&(t=S.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(o=Math.min(o,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[o]):S.insertAfter(t,n.childNodes[o])):n.appendChild(t),n=t,o=0),i[e?"startContainer":"endContainer"]=n,i[e?"startOffset":"endOffset"]=o};return e(!0),r.collapsed||e(),i},D=function(r){function e(e){var t,n,o;t=o=r[e?"startContainer":"endContainer"],n=r[e?"startOffset":"endOffset"],t&&(1===t.nodeType&&(n=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(t),t=t.parentNode,S.remove(o),!t.hasChildNodes()&&S.isBlock(t)&&t.appendChild(S.create("br"))),r[e?"startContainer":"endContainer"]=t,r[e?"startOffset":"endOffset"]=n)}e(!0),e();var t=S.createRng();return t.setStart(r.startContainer,r.startOffset),r.endContainer&&t.setEnd(r.endContainer,r.endOffset),L(t)},k=t.DOM,T=function(e,t){var n,o=t.parentNode;"LI"===o.nodeName&&o.firstChild===t&&((n=o.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),m(e,o)&&k.remove(o)):k.setStyle(o,"listStyleType","none")),h(o)&&(n=o.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)},I=function(t,e){v.each(v.grep(t.select("ol,ul",e)),function(e){T(t,e)})},B=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),R=function(e){var t=e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",O(e,t))},O=function(e,t){var n=e.dom.getParents(t,"TD,TH");return 0<n.length?n[0]:e.getBody()},E={getParentList:R,getSelectedSubLists:function(e){var t,n,o,r=R(e),i=e.selection.getSelectedBlocks();return o=i,(n=r)&&1===o.length&&o[0]===n?(t=r,v.grep(t.querySelectorAll("ol,ul,dl"),function(e){return h(e)})):v.grep(i,function(e){return h(e)&&r!==e})},getSelectedListItems:function(e){var n,t,o,r=e.selection.getSelectedBlocks();return v.grep((n=e,t=r,o=v.map(t,function(e){var t=n.dom.getParent(e,"li,dd,dt",O(n,e));return t||e}),B.unique(o)),function(e){return i(e)})},getClosestListRootElm:O},A=tinymce.util.Tools.resolve("tinymce.Env"),P=t.DOM,x=function(e,t,n){var o,r,i,a=P.createFragment(),s=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&((r=P.create(n)).tagName===e.settings.forced_root_block&&P.setAttribs(r,e.settings.forced_root_block_attrs),f(t.firstChild,s)||a.appendChild(r)),t)for(;o=t.firstChild;){var d=o.nodeName;i||"SPAN"===d&&"bookmark"===o.getAttribute("data-mce-type")||(i=!0),f(o,s)?(a.appendChild(o),r=null):n?(r||(r=P.create(n),a.appendChild(r)),r.appendChild(o)):a.appendChild(o)}return e.settings.forced_root_block?i||A.ie&&!(10<A.ie)||r.appendChild(P.create("br",{"data-mce-bogus":"1"})):a.appendChild(P.create("br")),a},_=t.DOM,M=function(e,t,n,o){var r,i,a,s,d;for(a=_.select('span[data-mce-type="bookmark"]',t),o=o||x(e,n),(r=_.createRng()).setStartAfter(n),r.setEndAfter(t),s=(i=r.extractContents()).firstChild;s;s=s.firstChild)if("LI"===s.nodeName&&e.dom.isEmpty(s)){_.remove(s);break}e.dom.isEmpty(i)||_.insertAfter(i,t),_.insertAfter(o,t),m(e.dom,n.parentNode)&&(d=n.parentNode,v.each(a,function(e){d.parentNode.insertBefore(e,n.parentNode)}),_.remove(d)),_.remove(n),m(e.dom,t)&&_.remove(t)},U=t.DOM,H=function(e,t){m(e,t)&&U.remove(t)},$=function(e,t){var n,o,r=t.parentNode;return r?(n=r.parentNode,r===e.getBody()||("DD"===t.nodeName?U.rename(t,"DT"):s(t)&&c(t)?"LI"===n.nodeName?(U.insertAfter(t,n),H(e.dom,n),U.remove(r)):h(n)?U.remove(r,!0):(n.insertBefore(x(e,t),r),U.remove(r)):s(t)?"LI"===n.nodeName?(U.insertAfter(t,n),t.appendChild(r),H(e.dom,n)):h(n)?n.insertBefore(t,r):(n.insertBefore(x(e,t),r),U.remove(t)):c(t)?"LI"===n.nodeName?U.insertAfter(t,n):h(n)?U.insertAfter(t,r):(U.insertAfter(x(e,t),r),U.remove(t)):("LI"===n.nodeName?(r=n,o=x(e,t,"LI")):o=h(n)?x(e,t,"LI"):x(e,t),M(e,r,t,o),I(e.dom,r.parentNode)))):H(e.dom,t),!0},w=$,K=function(e){var t=E.getSelectedListItems(e);if(t.length){var n=b(e.selection.getRng()),o=void 0,r=void 0,i=E.getClosestListRootElm(e,e.selection.getStart(!0));for(o=t.length;o--;)for(var a=t[o].parentNode;a&&a!==i;){for(r=t.length;r--;)if(t[r]===a){t.splice(o,1);break}a=a.parentNode}for(o=0;o<t.length&&($(e,t[o])||0!==o);o++);return e.selection.setRng(D(n)),e.nodeChanged(),!0}},Q=function(n,e){v.each(e,function(e,t){n.setAttribute(t,e)})},W=function(e,t,n){var o,r,i,a,s,d,l;o=e,r=t,a=(i=n)["list-style-type"]?i["list-style-type"]:null,o.setStyle(r,"list-style-type",a),s=e,Q(d=t,(l=n)["list-attributes"]),v.each(s.select("li",d),function(e){Q(e,l["list-item-attributes"])})},j=function(e,t,n,o){var r,i;for(r=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1===r.nodeType&&(r=r.childNodes[Math.min(i,r.childNodes.length-1)]||r),!n&&C(r.nextSibling)&&(r=r.nextSibling);r.parentNode!==o;){if(y(e,r))return r;if(/^(TD|TH)$/.test(r.parentNode.nodeName))return r;r=r.parentNode}return r},q=function(c,f,u){void 0===u&&(u={});var e,t=c.selection.getRng(!0),m="LI",n=E.getClosestListRootElm(c,c.selection.getStart(!0)),g=c.dom;"false"!==g.getContentEditable(c.selection.getNode())&&("DL"===(f=f.toUpperCase())&&(m="DT"),e=b(t),v.each(function(n,e,o){for(var r,i=[],a=n.dom,t=j(n,e,!0,o),s=j(n,e,!1,o),d=[],l=t;l&&(d.push(l),l!==s);l=l.nextSibling);return v.each(d,function(e){if(y(n,e))return i.push(e),void(r=null);if(a.isBlock(e)||C(e))return C(e)&&a.remove(e),void(r=null);var t=e.nextSibling;p.isBookmarkNode(e)&&(y(n,t)||!t&&e.parentNode===o)?r=null:(r||(r=a.create("p"),e.parentNode.insertBefore(r,e),i.push(r)),r.appendChild(e))}),i}(c,t,n),function(e){var t,n,o,r,i,a,s,d,l;(n=e.previousSibling)&&h(n)&&n.nodeName===f&&(o=n,r=u,i=g.getStyle(o,"list-style-type"),a=r?r["list-style-type"]:"",i===(a=null===a?"":a))?(t=n,e=g.rename(e,m),n.appendChild(e)):(t=g.create(f),e.parentNode.insertBefore(t,e),t.appendChild(e),e=g.rename(e,m)),s=g,d=e,l=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],v.each(l,function(e){return s.setStyle(d,((t={})[e]="",t));var t}),W(g,t,u),z(c.dom,t)}),c.selection.setRng(D(e)))},F=function(o){var e=b(o.selection.getRng(!0)),r=E.getClosestListRootElm(o,o.selection.getStart(!0)),t=E.getSelectedListItems(o),n=v.grep(t,function(e){return o.dom.isEmpty(e)});t=v.grep(t,function(e){return!o.dom.isEmpty(e)}),v.each(n,function(e){m(o.dom,e)&&w(o,e)}),v.each(t,function(e){var t,n;if(e.parentNode!==o.getBody()){for(t=e;t&&t!==r;t=t.parentNode)h(t)&&(n=t);M(o,n,e),I(o.dom,n.parentNode)}}),o.selection.setRng(D(e))},V=function(e,t,n){return d=n,(s=t)&&d&&h(s)&&s.nodeName===d.nodeName&&(i=t,a=n,(r=e).getStyle(i,"list-style-type",!0)===r.getStyle(a,"list-style-type",!0))&&(o=n,t.className===o.className);var o,r,i,a,s,d},z=function(e,t){var n,o;if(n=t.nextSibling,V(e,t,n)){for(;o=n.firstChild;)t.appendChild(o);e.remove(n)}if(n=t.previousSibling,V(e,t,n)){for(;o=n.lastChild;)t.insertBefore(o,t.firstChild);e.remove(n)}},G=function(t,e,n,o,r){if(e.nodeName!==o||J(r)){var i=b(t.selection.getRng(!0));v.each([e].concat(n),function(e){!function(e,t,n,o){if(t.nodeName!==n){var r=e.rename(t,n);W(e,r,o)}else W(e,t,o)}(t.dom,e,o,r)}),t.selection.setRng(D(i))}else F(t)},J=function(e){return"list-style-type"in e},X={toggleList:function(e,t,n){var o=E.getParentList(e),r=E.getSelectedSubLists(e);n=n||{},o&&0<r.length?G(e,o,r,t,n):function(e,t,n,o){if(t!==e.getBody())if(t)if(t.nodeName!==n||J(o)){var r=b(e.selection.getRng(!0));W(e.dom,t,o),z(e.dom,e.dom.rename(t,n)),e.selection.setRng(D(r))}else F(e);else q(e,n,o)}(e,o,t,n)},removeList:F,mergeWithAdjacentLists:z},Y=function(e,t,n,o){var r,i,a=t.startContainer,s=t.startOffset;if(3===a.nodeType&&(n?s<a.data.length:0<s))return a;for(r=e.schema.getNonEmptyElements(),1===a.nodeType&&(a=d.getNode(a,s)),i=new l(a,o),n&&u(e.dom,a)&&i.next();a=i[n?"next":"prev2"]();){if("LI"===a.nodeName&&!a.hasChildNodes())return a;if(r[a.nodeName])return a;if(3===a.nodeType&&0<a.data.length)return a}},Z=function(e,t){var n=t.childNodes;return 1===n.length&&!h(n[0])&&e.isBlock(n[0])},ee=function(e,t,n){var o,r,i,a;if(r=Z(e,n)?n.firstChild:n,Z(i=e,a=t)&&i.remove(a.firstChild,!0),!m(e,t,!0))for(;o=t.firstChild;)r.appendChild(o)},te=function(e,t,n){var o,r,i=t.parentNode;g(e,t)&&g(e,n)&&(h(n.lastChild)&&(r=n.lastChild),i===n.lastChild&&C(i.previousSibling)&&e.remove(i.previousSibling),(o=n.lastChild)&&C(o)&&t.hasChildNodes()&&e.remove(o),m(e,n,!0)&&e.$(n).empty(),ee(e,t,n),r&&n.appendChild(r),e.remove(t),m(e,i)&&i!==e.getRoot()&&e.remove(i))},ne=function(e,t,n,o){var r,i,a,s=e.dom;if(s.isEmpty(o))i=n,a=o,(r=e).dom.$(a).empty(),te(r.dom,i,a),r.selection.setCursorLocation(a);else{var d=b(t);te(s,n,o),e.selection.setRng(D(d))}},oe=function(e,t){var n,o,r,i=e.dom,a=e.selection,s=a.getStart(),d=E.getClosestListRootElm(e,s),l=i.getParent(a.getStart(),"LI",d);if(l){if((n=l.parentNode)===e.getBody()&&m(i,n))return!0;if(o=L(a.getRng(!0)),(r=i.getParent(Y(e,o,t,d),"LI",d))&&r!==l)return t?ne(e,o,r,l):function(e,t,n,o){var r=b(t);te(e.dom,n,o);var i=D(r);e.selection.setRng(i)}(e,o,l,r),!0;if(!r&&!t&&X.removeList(e))return!0}return!1},re=function(e,t){return oe(e,t)||function(r,i){var a=r.dom,e=r.selection.getStart(),s=E.getClosestListRootElm(r,e),d=a.getParent(e,a.isBlock,s);if(d&&a.isEmpty(d)){var t=L(r.selection.getRng(!0)),l=a.getParent(Y(r,t,i,s),"LI",s);if(l)return r.undoManager.transact(function(){var e,t,n,o;t=d,n=s,o=(e=a).getParent(t.parentNode,e.isBlock,n),e.remove(t),o&&e.isEmpty(o)&&e.remove(o),X.mergeWithAdjacentLists(a,l.parentNode),r.selection.select(l,!0),r.selection.collapse(i)}),!0}return!1}(e,t)},ie=function(e,t){return e.selection.isCollapsed()?re(e,t):(o=(n=e).selection.getStart(),r=E.getClosestListRootElm(n,o),!!(n.dom.getParent(o,"LI,DT,DD",r)||0<E.getSelectedListItems(n).length)&&(n.undoManager.transact(function(){n.execCommand("Delete"),I(n.dom,n.getBody())}),!0));var n,o,r},ae=function(t){t.on("keydown",function(e){e.keyCode===n.BACKSPACE?ie(t,!1)&&e.preventDefault():e.keyCode===n.DELETE&&ie(t,!0)&&e.preventDefault()})},se=ie,de=function(t){return{backspaceDelete:function(e){se(t,e)}}},le=t.DOM,ce=function(e,t){var n;if(h(e)){for(;n=e.firstChild;)t.appendChild(n);le.remove(e)}},fe=function(e){var t,n,o,r,i=E.getSelectedListItems(e);if(i.length){for(var a=b(e.selection.getRng(!0)),s=0;s<i.length&&(t=i[s],r=o=n=void 0,("DT"===t.nodeName?(le.rename(t,"DD"),1):(n=t.previousSibling)&&h(n)?(n.appendChild(t),1):n&&"LI"===n.nodeName&&h(n.lastChild)?(n.lastChild.appendChild(t),ce(t.lastChild,n.lastChild),1):(n=t.nextSibling)&&h(n)?(n.insertBefore(t,n.firstChild),1):(n=t.previousSibling)&&"LI"===n.nodeName&&(o=le.create(t.parentNode.nodeName),(r=le.getStyle(t.parentNode,"listStyleType"))&&le.setStyle(o,"listStyleType",r),n.appendChild(o),o.appendChild(t),ce(t.lastChild,o),1))||0!==s);s++);return e.selection.setRng(D(a)),e.nodeChanged(),!0}},ue=function(t,n){return function(){var e=t.dom.getParent(t.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===n}},me=function(o){o.on("BeforeExecCommand",function(e){var t,n=e.command.toLowerCase();if("indent"===n?fe(o)&&(t=!0):"outdent"===n&&K(o)&&(t=!0),t)return o.fire("ExecCommand",{command:e.command}),e.preventDefault(),!0}),o.addCommand("InsertUnorderedList",function(e,t){X.toggleList(o,"UL",t)}),o.addCommand("InsertOrderedList",function(e,t){X.toggleList(o,"OL",t)}),o.addCommand("InsertDefinitionList",function(e,t){X.toggleList(o,"DL",t)}),o.addQueryStateHandler("InsertUnorderedList",ue(o,"UL")),o.addQueryStateHandler("InsertOrderedList",ue(o,"OL")),o.addQueryStateHandler("InsertDefinitionList",ue(o,"DL"))},ge=function(e){return e.getParam("lists_indent_on_tab",!0)},pe=function(e){var t;ge(e)&&(t=e).on("keydown",function(e){e.keyCode!==n.TAB||n.metaKeyPressed(e)||t.dom.getParent(t.selection.getStart(),"LI,DT,DD")&&(e.preventDefault(),e.shiftKey?K(t):fe(t))}),ae(e)},ve=function(t,i){return function(e){var r=e.control;t.on("NodeChange",function(e){var t=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e.parents,a),n=-1!==t?e.parents.slice(0,t):e.parents,o=v.grep(n,h);r.active(0<o.length&&o[0].nodeName===i)})}},he=function(e){var t,n,o,r;n="advlist",o=(t=e).settings.plugins?t.settings.plugins:"",-1===v.inArray(o.split(/[ ,]/),n)&&(e.addButton("numlist",{active:!1,title:"Numbered list",cmd:"InsertOrderedList",onPostRender:ve(e,"OL")}),e.addButton("bullist",{active:!1,title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:ve(e,"UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:(r=e,function(e){var n=e.control;r.on("nodechange",function(){var e=E.getSelectedListItems(r),t=0<e.length&&s(e[0]);n.disabled(t)})})})};e.add("lists",function(e){return pe(e),he(e),me(e),de(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),w=function(e){return e.getParam("media_scripts")},b=function(e){return e.getParam("audio_template_callback")},y=function(e){return e.getParam("video_template_callback")},n=function(e){return e.getParam("media_live_embeds",!0)},t=function(e){return e.getParam("media_filter_html",!0)},s=function(e){return e.getParam("media_url_resolver")},m=function(e){return e.getParam("media_alt_source",!0)},d=function(e){return e.getParam("media_poster",!0)},h=function(e){return e.getParam("media_dimensions",!0)},p=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},i=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},a=function(i){return function(e,t){var r;e&&(e.style[i]=/^[0-9.]+$/.test(r=t)?r+"px":r)}},f={getMaxWidth:i("maxWidth"),getMaxHeight:i("maxHeight"),setMaxWidth:a("maxWidth"),setMaxHeight:a("maxHeight")},u=r.DOM,l=function(e){return u.getAttrib(e,"data-ephox-embed-iri")},j=function(e,t){return c=t,s=u.createFragment(c),""!==l(s.firstChild)?(o=t,n=u.createFragment(o).firstChild,{type:"ephox-embed-iri",source1:l(n),source2:"",poster:"",width:f.getMaxWidth(n),height:f.getMaxHeight(n)}):(i=e,r=t,p({validate:(a={},!1),allow_conditional_comments:!0,special:"script,noscript",start:function(e,t){if(a.source1||"param"!==e||(a.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(a.type||(a.type=e),a=v.extend(t.map,a)),"script"===e){var r=x(i,t.map.src);if(!r)return;a={type:"script",source1:t.map.src,width:r.width,height:r.height}}"source"===e&&(a.source1?a.source2||(a.source2=t.map.src):a.source1=t.map.src),"img"!==e||a.poster||(a.poster=t.map.src)}}).parse(r),a.source1=a.source1||a.src||a.data,a.source2=a.source2||"",a.poster=a.poster||"",a);var i,r,a,o,n,c,s},g=tinymce.util.Tools.resolve("tinymce.util.Promise"),M=function(e){var t={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},_=tinymce.util.Tools.resolve("tinymce.html.Writer"),C=tinymce.util.Tools.resolve("tinymce.html.Schema"),S=r.DOM,F=function(e,t){var r,i,a,o;for(r in t)if(a=""+t[r],e.map[r])for(i=e.length;i--;)(o=e[i]).name===r&&(a?(e.map[r]=a,o.value=a):(delete e.map[r],e.splice(i,1)));else a&&(e.push({name:r,value:a}),e.map[r]=a)},k=function(e,t){var r,i,a=S.createFragment(e).firstChild;return f.setMaxWidth(a,t.width),f.setMaxHeight(a,t.height),r=a.outerHTML,i=_(),p(i).parse(r),i.getContent()},A=function(e,t,r){return u=e,l=S.createFragment(u),""!==S.getAttrib(l.firstChild,"data-ephox-embed-iri")?k(e,t):(i=e,a=t,o=r,c=_(),p({validate:!1,allow_conditional_comments:!(s=0),special:"script,noscript",comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){switch(e){case"video":case"object":case"embed":case"img":case"iframe":a.height!==undefined&&a.width!==undefined&&F(t,{width:a.width,height:a.height})}if(o)switch(e){case"video":F(t,{poster:a.poster,src:""}),a.source2&&F(t,{src:""});break;case"iframe":F(t,{src:a.source1});break;case"source":if(++s<=2&&(F(t,{src:a["source"+s],type:a["source"+s+"mime"]}),!a["source"+s]))return;break;case"img":if(!a.poster)return;n=!0}c.start(e,t,r)},end:function(e){if("video"===e&&o)for(var t=1;t<=2;t++)if(a["source"+t]){var r=[];r.map={},s<t&&(F(r,{src:a["source"+t],type:a["source"+t+"mime"]}),c.start("source",r,!0))}if(a.poster&&"object"===e&&o&&!n){var i=[];i.map={},F(i,{src:a.poster,width:a.width,height:a.height}),c.start("img",i,!0)}c.end(e)}},C({})).parse(i),c.getContent());var i,a,o,n,c,s,u,l},N=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],c=function(r,e){var i=v.extend({},e);if(!i.source1&&(v.extend(i,j(w(r),i.embed)),!i.source1))return"";i.source2||(i.source2=""),i.poster||(i.poster=""),i.source1=r.convertURL(i.source1,"source"),i.source2=r.convertURL(i.source2,"source"),i.source1mime=M(i.source1),i.source2mime=M(i.source2),i.poster=r.convertURL(i.poster,"poster");var t,a,o=(t=i.source1,0<(a=N.filter(function(e){return e.regex.test(t)})).length?v.extend({},a[0],{url:function(e,t){for(var r=e.regex.exec(t),i=e.url,a=function(e){i=i.replace("$"+e,function(){return r[e]?r[e]:""})},o=0;o<r.length;o++)a(o);return i.replace(/\?$/,"")}(a[0],t)}):null);if(o&&(i.source1=o.url,i.type=o.type,i.allowFullscreen=o.allowFullscreen,i.width=i.width||o.w,i.height=i.height||o.h),i.embed)return A(i.embed,i,!0);var n=x(w(r),i.source1);n&&(i.type="script",i.width=n.width,i.height=n.height);var c,s,u,l,m,d,h,p,f=b(r),g=y(r);return i.width=i.width||300,i.height=i.height||150,v.each(i,function(e,t){i[t]=r.dom.encode(e)}),"iframe"===i.type?(p=(h=i).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+h.source1+'" width="'+h.width+'" height="'+h.height+'"'+p+"></iframe>"):"application/x-shockwave-flash"===i.source1mime?(d='<object data="'+(m=i).source1+'" width="'+m.width+'" height="'+m.height+'" type="application/x-shockwave-flash">',m.poster&&(d+='<img src="'+m.poster+'" width="'+m.width+'" height="'+m.height+'" />'),d+="</object>"):-1!==i.source1mime.indexOf("audio")?(u=i,(l=f)?l(u):'<audio controls="controls" src="'+u.source1+'">'+(u.source2?'\n<source src="'+u.source2+'"'+(u.source2mime?' type="'+u.source2mime+'"':"")+" />\n":"")+"</audio>"):"script"===i.type?'<script src="'+i.source1+'"><\/script>':(c=i,(s=g)?s(c):'<video width="'+c.width+'" height="'+c.height+'"'+(c.poster?' poster="'+c.poster+'"':"")+' controls="controls">\n<source src="'+c.source1+'"'+(c.source1mime?' type="'+c.source1mime+'"':"")+" />\n"+(c.source2?'<source src="'+c.source2+'"'+(c.source2mime?' type="'+c.source2mime+'"':"")+" />\n":"")+"</video>")},O={},P=function(t){return function(e){return c(t,e)}},T=function(e,t){var r,i,a,o,n,c=s(e);return c?(a=t,o=P(e),n=c,new g(function(t,e){var r=function(e){return e.html&&(O[a.source1]=e),t({url:a.source1,html:e.html?e.html:o(a)})};O[a.source1]?r(O[a.source1]):n({url:a.source1},r,e)})):(r=t,i=P(e),new g(function(e){e({html:i(r),url:r.source1})}))},$=function(e){return O.hasOwnProperty(e)},z=function(e,t){e.state.set("oldVal",e.value()),t.state.set("oldVal",t.value())},L=function(e,t){var r=e.find("#width")[0],i=e.find("#height")[0],a=e.find("#constrain")[0];r&&i&&a&&t(r,i,a.checked())},H=function(e,t,r){var i=e.state.get("oldVal"),a=t.state.get("oldVal"),o=e.value(),n=t.value();r&&i&&a&&o&&n&&(o!==i?(n=Math.round(o/i*n),isNaN(n)||t.value(n)):(o=Math.round(n/a*o),isNaN(o)||e.value(o))),z(e,t)},W=function(e){L(e,H)},J=function(e){var t=function(){e(function(e){W(e)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:t,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}},R=function(e){L(e,z)},D=W,E=o.ie&&o.ie<=8?"onChange":"onInput",I=function(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}},U=function(a,o){return function(e){var t=e.html,r=a.find("#embed")[0],i=v.extend(j(w(o),t),{source1:e.url});a.fromJSON(i),r&&(r.value(t),D(a))}},V=function(e,t){var r=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){var r,i,a=e.dom.select("img[data-mce-object]");for(r=0;r<t.length;r++)for(i=a.length-1;0<=i;i--)t[r]===a[i]&&a.splice(i,1);e.selection.select(a[0])}(e,r),e.nodeChanged()},B=function(i){var a,t,e,r,o,n=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){T(i,a.toJSON()).then(U(a,i))["catch"](I(i))},1)},onchange:function(e){var r,t;T(i,a.toJSON()).then(U(a,i))["catch"](I(i)),r=a,t=e.meta,v.each(t,function(e,t){r.find("#"+t).value(e)})},onbeforecall:function(e){e.meta=a.toJSON()}}],c=[];if(m(i)&&c.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),d(i)&&c.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),h(i)){var s=J(function(e){e(a),t=a.toJSON(),a.find("#embed").value(A(t.embed,t))});n.push(s)}r=(e=i).selection.getNode(),o=r.getAttribute("data-ephox-embed-iri"),t=o?{source1:o,"data-ephox-embed-iri":o,width:f.getMaxWidth(r),height:f.getMaxHeight(r)}:r.getAttribute("data-mce-object")?j(w(e),e.serializer.serialize(r,{selection:!0})):{};var u={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:function(e){var t=e.selection.getNode();if(t.getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri"))return e.selection.getContent()}(i),multiline:!0,rows:5,label:"Source"};u[E]=function(){t=v.extend({},j(w(i),this.value())),this.parent().parent().fromJSON(t)};var l=[{title:"General",type:"form",items:n},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},u]}];0<c.length&&l.push({title:"Advanced",type:"form",items:c}),a=i.windowManager.open({title:"Insert/edit media",data:t,bodyType:"tabpanel",body:l,onSubmit:function(){var t,e;D(a),t=i,(e=a.toJSON()).embed=A(e.embed,e),e.embed&&$(e.source1)?V(t,e.embed):T(t,e).then(function(e){V(t,e.html)})["catch"](I(t))}}),R(a)},G=function(e){return{showDialog:function(){B(e)}}},q=function(e){e.addCommand("mceMedia",function(){B(e)})},K=tinymce.util.Tools.resolve("tinymce.html.Node"),Q=function(a,e){if(!1===t(a))return e;var o,n=_();return p({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(e){n.comment(e)},cdata:function(e){n.cdata(e)},text:function(e,t){n.text(e,t)},start:function(e,t,r){if(o=!0,"script"!==e&&"noscript"!==e){for(var i=0;i<t.length;i++){if(0===t[i].name.indexOf("on"))return;"style"===t[i].name&&(t[i].value=a.dom.serializeStyle(a.dom.parseStyle(t[i].value),e))}n.start(e,t,r),o=!1}},end:function(e){o||n.end(e)}},C({})).parse(e),n.getContent()},X=function(e,t){var r,i=t.name;return(r=new K("img",1)).shortEnded=!0,Z(e,t,r),r.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===i?"30":"150"),style:t.attr("style"),src:o.transparentSrc,"data-mce-object":i,"class":"mce-object mce-object-"+i}),r},Y=function(e,t){var r,i,a,o=t.name;return(r=new K("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":o,"class":"mce-preview-object mce-object-"+o}),Z(e,t,r),(i=new K(o,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),"class":t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(a=new K("span",1)).attr("class","mce-shim"),r.append(i),r.append(a),r},Z=function(e,t,r){var i,a,o,n,c;for(n=(o=t.attributes).length;n--;)i=o[n].name,a=o[n].value,"width"!==i&&"height"!==i&&"style"!==i&&("data"!==i&&"src"!==i||(a=e.convertURL(a,i)),r.attr("data-mce-p-"+i,a));(c=t.firstChild&&t.firstChild.value)&&(r.attr("data-mce-html",escape(Q(e,c))),r.firstChild=null)},ee=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri"))return!0;return!1},te=function(a){return function(e){for(var t,r,i=e.length;i--;)(t=e[i]).parent&&(t.parent.attr("data-mce-object")||("script"!==t.name||(r=x(w(a),t.attr("src"))))&&(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&n(a)&&o.ceFalse?ee(t)||t.replace(Y(a,t)):ee(t)||t.replace(X(a,t))))}},re=function(d){d.on("preInit",function(){var t=d.schema.getSpecialElements();v.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();v.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",te(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,i,a,o,n,c,s,u,l=e.length;l--;)if((r=e[l]).parent){for(s=r.attr(t),i=new K(s,1),"audio"!==s&&"script"!==s&&((u=r.attr("class"))&&-1!==u.indexOf("mce-preview-object")?i.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):i.attr({width:r.attr("width"),height:r.attr("height")})),i.attr({style:r.attr("style")}),a=(o=r.attributes).length;a--;){var m=o[a].name;0===m.indexOf("data-mce-p-")&&i.attr(m.substr(11),o[a].value)}"script"===s&&i.attr("type","text/javascript"),(n=r.attr("data-mce-html"))&&((c=new K("#text",3)).raw=!0,c.value=Q(d,unescape(n)),i.append(c)),r.replace(i)}})}),d.on("setContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim",t).length&&r.append('<span class="mce-shim"></span>')})})},ie=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},ae=function(t){t.on("click keyup",function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),t.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),t.on("objectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(A(t,{width:e.width,height:e.height}))))})},oe=function(e){e.addButton("media",{tooltip:"Insert/edit media",cmd:"mceMedia",stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),e.addMenuItem("media",{icon:"media",text:"Media",cmd:"mceMedia",context:"insert",prependToContext:!0})};e.add("media",function(e){return q(e),oe(e),ie(e),re(e),ae(e),G(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n,e){var t,i=(t=n).plugins.visualchars&&t.plugins.visualchars.isEnabled()?'<span class="mce-nbsp"> </span>':" ";n.insertContent(function(n,e){for(var t="",i=0;i<e;i++)t+=n;return t}(i,e)),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")},e=function(n){n.addCommand("mceNonBreaking",function(){i(n,1)})},o=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},t=function(e){var t=a(e);0<t&&e.on("keydown",function(n){if(n.keyCode===o.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),i(e,t)}})},r=function(n){n.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),n.addMenuItem("nonbreaking",{icon:"nonbreaking",text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"})};n.add("nonbreaking",function(n){e(n),r(n),t(n)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},u=function(t){return t.getParam("noneditable_editable_class","mceEditable")},f=function(t){var n=t.getParam("noneditable_regexp",[]);return n&&n.constructor===RegExp?[n]:n},s=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},d=function(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0<e?o.charAt(e-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",e);if(-1!==a&&-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(n[0])+'">'+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}},n=function(n){var t,e,r="contenteditable";t=" "+c.trim(u(n))+" ",e=" "+c.trim(l(n))+" ";var a=s(t),i=s(e),o=f(n);n.on("PreInit",function(){0<o.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],d(t,a,l(t)));e.content=a}}(n,o,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],a(n)?n.attr(r,"true"):i(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(a(n)||i(n))&&(0<o.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};t.add("noneditable",function(t){n(t)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),n=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},i=function(e){return e.getParam("pagebreak_split_block",!1)},t=function(){return"mce-pagebreak"},r=function(){return'<img src="'+a.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'},c=function(c){var o=n(c),a=new RegExp(o.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");c.on("BeforeSetContent",function(e){e.content=e.content.replace(a,r())}),c.on("PreInit",function(){c.serializer.addNodeFilter("img",function(e){for(var a,n,t=e.length;t--;)if((n=(a=e[t]).attr("class"))&&-1!==n.indexOf("mce-pagebreak")){var r=a.parent;if(c.schema.getBlockElements()[r.name]&&i(c)){r.type=3,r.value=o,r.raw=!0,a.remove();continue}a.type=3,a.value=o,a.raw=!0}})})},o=r,g=t,u=function(e){e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+o()+"</p>"):e.insertContent(o())})},m=function(a){a.on("ResolveName",function(e){"IMG"===e.target.nodeName&&a.dom.hasClass(e.target,g())&&(e.name="pagebreak")})},s=function(e){e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"})};e.add("pagebreak",function(e){u(e),s(e),c(e),m(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var u=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return u(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins)||!t.get("powerpaste")||("undefined"!=typeof window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},s=function(e,t){return{clipboard:e,quirks:t}},f=function(e,t,n,r){return e.fire("PastePreProcess",{content:t,internal:n,wordContent:r})},d=function(e,t,n,r){return e.fire("PastePostProcess",{node:t,internal:n,wordContent:r})},l=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},n=function(e,t){return e.fire("paste",{ieFake:t})},m={shouldPlainTextInform:function(e){return e.getParam("paste_plaintext_inform",!0)},shouldBlockDrop:function(e){return e.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(e){return e.getParam("paste_data_images",!1)},shouldFilterDrop:function(e){return e.getParam("paste_filter_drop",!0)},getPreProcess:function(e){return e.getParam("paste_preprocess")},getPostProcess:function(e){return e.getParam("paste_postprocess")},getWebkitStyles:function(e){return e.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(e){return e.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(e){return e.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(e){return e.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(e){return e.getParam("paste_as_text",!1)},getRetainStyleProps:function(e){return e.getParam("paste_retain_style_properties")},getWordValidElements:function(e){return e.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(e){return e.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(e){return e.getParam("paste_enable_default_filters",!0)}},r=function(e,t,n){var r,a,i;"text"===t.pasteFormat.get()?(t.pasteFormat.set("html"),l(e,!1)):(t.pasteFormat.set("text"),l(e,!0),i=e,!1===n.get()&&m.shouldPlainTextInform(i)&&(a="Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",(r=e).notificationManager.open({text:r.translate(a),type:"info"}),n.set(!0))),e.focus()},c=function(e,n,t){e.addCommand("mceTogglePlainTextPaste",function(){r(e,n,t)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&n.pasteHtml(t.content,t.internal),t.text&&n.pasteText(t.text)})},v=tinymce.util.Tools.resolve("tinymce.Env"),h=tinymce.util.Tools.resolve("tinymce.util.Delay"),b=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=tinymce.util.Tools.resolve("tinymce.util.VK"),e="x-tinymce/html",i="\x3c!-- "+e+" --\x3e",p=function(e){return i+e},g=function(e){return e.replace(i,"")},y=function(e){return-1!==e.indexOf(i)},x=function(){return e},P=tinymce.util.Tools.resolve("tinymce.html.Entities"),w=function(e){return e.replace(/\r?\n/g,"<br>")},_=function(e,t,n){var r=e.split(/\n\n/),a=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+P.encodeAllRaw(t[n])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(t,n),i="</"+t+">",o=b.map(r,function(e){return e.split(/\n/).join("<br />")});return 1===o.length?o[0]:b.map(o,function(e){return a+e+i}).join("")},D=function(e){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e)},T=function(e,t,n){return t?_(e,t,n):w(e)},C=tinymce.util.Tools.resolve("tinymce.html.DomParser"),k=tinymce.util.Tools.resolve("tinymce.html.Node"),R=tinymce.util.Tools.resolve("tinymce.html.Schema"),F=tinymce.util.Tools.resolve("tinymce.html.Serializer");function E(t,e){return b.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}var S={filter:E,innerText:function(t){var n=R(),r=C({},n),a="",i=n.getShortEndedElements(),o=b.makeMap("script noscript style textarea video audio iframe object"," "),s=n.getBlockElements();return t=E(t,[/<!\[[^\]]+\]>/g]),function e(t){var n=t.name,r=t;if("br"!==n)if(i[n]&&(a+=" "),o[n])a+=" ";else{if(3===t.type&&(a+=t.value),!t.shortEnded&&(t=t.firstChild))for(;e(t),t=t.next;);s[n]&&r.next&&(a+="\n","p"===n&&(a+="\n"))}else a+="\n"}(r.parse(t)),a},trimHtml:function(e){return e=E(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function(e){var t=0;return function(){return e+t++}},isMsEdge:function(){return-1!==navigator.userAgent.indexOf(" Edge/")}};function I(t){var n,e;return e=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],t=t.replace(/^[\u00a0 ]+/,""),b.each(e,function(e){if(e.test(t))return!(n=!0)}),n}function M(e){var i,o,s=1;function n(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t}function l(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!l(e,t))return!1}while(e=e.next);return!0}function t(t,n,r){var a=t._listLevel||s;a!==s&&(a<s?i&&(i=i.parent.parent):(o=i,i=null)),i&&i.name===n?i.append(t):(o=o||i,i=new k(n,1),1<r&&i.attr("start",""+r),t.wrap(i)),t.name="li",s<a&&o&&o.lastChild.append(i),s=a,function e(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)for(;e(t),t=t.next;);}(t),l(t,/^\u00a0+/),l(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),l(t,/^\u00a0+/)}for(var r=[],a=e.firstChild;null!=a;)if(r.push(a),null!==(a=a.walk()))for(;void 0!==a&&a.parent!==e;)a=a.walk();for(var u=0;u<r.length;u++)if("p"===(e=r[u]).name&&e.firstChild){var c=n(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)){t(e,"ul");continue}if(I(c)){var f=/([0-9]+)\./.exec(c),d=1;f&&(d=parseInt(f[1],10)),t(e,"ol",d);continue}if(e._listLevel){t(e,"ul",1);continue}i=null}else o=i,i=null}function O(n,r,a,i){var o,s={},e=n.dom.parseStyle(i);return b.each(e,function(e,t){switch(t){case"mso-list":(o=/\w+ \w+([0-9]+)/i.exec(i))&&(a._listLevel=parseInt(o[1],10)),/Ignore/i.test(e)&&a.firstChild&&(a._listIgnore=!0,a.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void a.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===m.getRetainStyleProps(n)||r&&r[t])&&(s[t]=e):a.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],a.wrap(new k("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],a.wrap(new k("i",1))),(s=n.dom.serializeStyle(s,a.name))||null}var A={preProcess:function(e,t){return m.shouldUseDefaultFilters(e)?function(r,e){var t,a;(t=m.getRetainStyleProps(r))&&(a=b.makeMap(t.split(/[, ]/))),e=S.filter(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var n=m.getWordValidElements(r),i=R({valid_elements:n,valid_children:"-li[p]"});b.each(i.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var o=C({},i);o.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",O(r,a,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),o.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),o.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),o.addNodeFilter("a",function(e){for(var t,n,r,a=e.length;a--;)if(n=(t=e[a]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var s=o.parse(e);return m.shouldConvertWordFakeLists(r)&&M(s),e=F({validate:r.settings.validate},i).serialize(s)}(e,t):t},isWordContent:function(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}},H=function(e,t){return{content:e,cancelled:t}},B=function(e,t,n,r){var a,i,o,s,l,u,c=f(e,t,n,r);return e.hasEventListeners("PastePostProcess")&&!c.isDefaultPrevented()?(a=e,i=c.content,o=n,s=r,l=a.dom.create("div",{style:"display:none"},i),u=d(a,l,o,s),H(u.node.innerHTML,u.isDefaultPrevented())):H(c.content,c.isDefaultPrevented())},L=function(e,t,n){var r=A.isWordContent(t),a=r?A.preProcess(e,t):t;return B(e,a,n,r)},$=function(e,t){return e.insertContent(t,{merge:m.shouldMergeFormats(e),paste:!0}),!0},j=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},W=function(e){return j(e)&&/.(gif|jpe?g|png)$/.test(e)},N=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!j(t)||(a=t,i=n,(r=e).undoManager.extra(function(){i(r,a)},function(){r.execCommand("mceInsertLink",!1,a)}),0));var r,a,i},V=function(e,t,n){return!!W(t)&&(a=t,i=n,(r=e).undoManager.extra(function(){i(r,a)},function(){r.insertContent('<img src="'+a+'">')}),!0);var r,a,i},z=function(e,t){var n,r;!1===m.isSmartPasteEnabled(e)?$(e,t):(n=e,r=t,b.each([N,V,$],function(e){return!0!==e(n,r,$)}))},K=function(e,t,n){var r=n||y(t),a=L(e,g(t),r);!1===a.cancelled&&z(e,a.content)},U=function(e,t){t=e.dom.encode(t).replace(/\r\n/g,"\n"),t=T(t,e.settings.forced_root_block,e.settings.forced_root_block_attrs),K(e,t,!1)},G=function(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(t["text/plain"]=n)}if(e.types)for(var r=0;r<e.types.length;r++){var a=e.types[r];try{t[a]=e.getData(a)}catch(i){t[a]=""}}}return t},X=function(e,t){return t in e&&0<e[t].length},q=function(e){return X(e,"text/html")||X(e,"text/plain")},Y=S.createIdGenerator("mceclip"),Z=function(e,t,n,r){t&&(e.selection.setRng(t),t=null);var a,i,o,s,l,u,c,f=n.result,d=-1!==(i=(a=f).indexOf(","))?a.substr(i+1):null,m=Y(),p=e.settings.images_reuse_filename&&r.name?(o=e,s=r.name,(l=s.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i))?o.dom.encode(l[1]):null):m,g=new Image;if(g.src=f,u=e.settings,c=g,!u.images_dataimg_filter||u.images_dataimg_filter(c)){var v,h=e.editorUpload.blobCache,b=void 0;(v=h.findFirst(function(e){return e.base64()===d}))?b=v:(b=h.create(m,r,d,p),h.add(b)),K(e,'<img src="'+b.blobUri()+'">',!1)}else K(e,'<img src="'+f+'">',!1)},J=function(o,s,l){var e="paste"===s.type?s.clipboardData:s.dataTransfer;function t(e){var t,n,r,a=!1;if(e)for(t=0;t<e.length;t++)if(n=e[t],/^image\/(jpeg|png|gif|bmp)$/.test(n.type)){var i=n.getAsFile?n.getAsFile():n;(r=new window.FileReader).onload=Z.bind(null,o,l,r,i),r.readAsDataURL(i),s.preventDefault(),a=!0}return a}if(o.settings.paste_data_images&&e)return t(e.items)||t(e.files)},Q=function(e){return a.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},ee=function(c,f,d){var m,p=0;function g(e,t,n,r){var a,i;X(e,"text/html")?a=e["text/html"]:(a=f.getHtml(),r=r||y(a),f.isDefaultContent(a)&&(n=!0)),a=S.trimHtml(a),f.remove(),i=!1===r&&D(a),a.length&&!i||(n=!0),n&&(a=X(e,"text/plain")&&i?e["text/plain"]:S.innerText(a)),f.isDefaultContent(a)?t||c.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?U(c,a):K(c,a,r)}c.on("keydown",function(e){function t(e){Q(e)&&!e.isDefaultPrevented()&&f.remove()}if(Q(e)&&!e.isDefaultPrevented()){if((m=e.shiftKey&&86===e.keyCode)&&v.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(e.stopImmediatePropagation(),p=(new Date).getTime(),v.ie&&m)return e.preventDefault(),void n(c,!0);f.remove(),f.create(),c.once("keyup",t),c.once("paste",function(){c.off("keyup",t)})}}),c.on("paste",function(e){var t,n,r,a=(new Date).getTime(),i=(t=c,n=G(e.clipboardData||t.getDoc().dataTransfer),S.isMsEdge()?b.extend(n,{"text/html":""}):n),o=(new Date).getTime()-a,s=(new Date).getTime()-p-o<1e3,l="text"===d.get()||m,u=X(i,x());m=!1,e.isDefaultPrevented()||(r=e.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length)?f.remove():q(i)||!J(c,e,f.getLastRng()||c.selection.getRng())?(s||e.preventDefault(),!v.ie||s&&!e.ieFake||X(i,"text/html")||(f.create(),c.dom.bind(f.getEl(),"paste",function(e){e.stopPropagation()}),c.getDoc().execCommand("Paste",!1,null),i["text/html"]=f.getHtml()),X(i,"text/html")?(e.preventDefault(),u||(u=y(i["text/html"])),g(i,s,l,u)):h.setEditorTimeout(c,function(){g(i,s,l,u)},0)):f.remove()})},te=function(e){return v.ie&&e.inline?document.body:e.getBody()},ne=function(t,e){var n;te(n=t)!==n.getBody()&&t.dom.bind(e,"paste keyup",function(e){setTimeout(function(){t.fire("paste")},0)})},re=function(e){return e.dom.get("mcepastebin")},ae=function(e,t){return t===e},ie=function(o){var s=u(null),l="%MCEPASTEBIN%";return{create:function(){return t=s,n=l,a=(e=o).dom,i=e.getBody(),t.set(e.selection.getRng()),r=e.dom.add(te(e),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(v.ie||v.gecko)&&a.setStyle(r,"left","rtl"===a.getStyle(i,"direction",!0)?65535:-65535),a.bind(r,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),ne(e,r),r.focus(),void e.selection.select(r,!0);var e,t,n,r,a,i},remove:function(){return function(e,t){if(re(e)){for(var n=void 0,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(o,s)},getEl:function(){return re(o)},getHtml:function(){return function(n){var t,e,r,a,i,o=function(e,t){e.appendChild(t),n.dom.remove(t,!0)};for(e=b.grep(te(n).childNodes,function(e){return"mcepastebin"===e.id}),t=e.shift(),b.each(e,function(e){o(t,e)}),r=(a=n.dom.select("div[id=mcepastebin]",t)).length-1;0<=r;r--)i=n.dom.create("div"),t.insertBefore(i,a[r]),o(i,a[r]);return t?t.innerHTML:""}(o)},getLastRng:function(){return s.get()},isDefault:function(){return e=l,n=re(o),(t=n)&&"mcepastebin"===t.id&&ae(e,n.innerHTML);var e,t,n},isDefaultContent:function(e){return ae(l,e)}}},oe=function(n,e){var t=ie(n);return n.on("preInit",function(){return ee(o=n,t,e),void o.parser.addNodeFilter("img",function(e,t,n){var r,a=function(e){e.attr("data-mce-object")||s===v.transparentSrc||e.remove()};if(!o.settings.paste_data_images&&(r=n).data&&!0===r.data.paste)for(var i=e.length;i--;)(s=e[i].attributes.map.src)&&(0===s.indexOf("webkit-fake-url")?a(e[i]):o.settings.allow_html_data_urls||0!==s.indexOf("data:")||a(e[i]))});var o,s}),{pasteFormat:e,pasteHtml:function(e,t){return K(n,e,t)},pasteText:function(e){return U(n,e)},pasteImageData:function(e,t){return J(n,e,t)},getDataTransferItems:G,hasHtmlOrText:q,hasContentType:X}},se=function(){},le=function(e,t,n){if(r=e,!1!==v.iOS||r===undefined||"function"!=typeof r.setData||!0===S.isMsEdge())return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(x(),t),!0}catch(a){return!1}var r},ue=function(e,t,n,r){le(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},ce=function(s){return function(e,t){var n=p(e),r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),a=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(a),s.dom.add(s.getBody(),r);var i=s.selection.getRng();a.focus();var o=s.dom.createRng();o.selectNodeContents(a),s.selection.setRng(o),setTimeout(function(){s.selection.setRng(i),r.parentNode.removeChild(r),t()},0)}},fe=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},de=function(e){var t,n;e.on("cut",(t=e,function(e){!1===t.selection.isCollapsed()&&ue(e,fe(t),ce(t),function(){setTimeout(function(){t.execCommand("Delete")},0)})})),e.on("copy",(n=e,function(e){!1===n.selection.isCollapsed()&&ue(e,fe(n),ce(n),se)}))},me=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),pe=function(e,t){return me.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},ge=function(e,t){e.focus(),e.selection.setRng(t)},ve=function(o,s,l){m.shouldBlockDrop(o)&&o.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),m.shouldPasteDataImages(o)||o.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),o.on("drop",function(e){var t,n;if(n=pe(o,e),!e.isDefaultPrevented()&&!l.get()){t=s.getDataTransferItems(e.dataTransfer);var r,a=s.hasContentType(t,x());if((s.hasHtmlOrText(t)&&(!(r=t["text/plain"])||0!==r.indexOf("file://"))||!s.pasteImageData(e,n))&&n&&m.shouldFilterDrop(o)){var i=t["mce-internal"]||t["text/html"]||t["text/plain"];i&&(e.preventDefault(),h.setEditorTimeout(o,function(){o.undoManager.transact(function(){t["mce-internal"]&&o.execCommand("Delete"),ge(o,n),i=S.trimHtml(i),t["text/html"]?s.pasteHtml(i,a):s.pasteText(i)})}))}}}),o.on("dragstart",function(e){l.set(!0)}),o.on("dragover dragend",function(e){m.shouldPasteDataImages(o)&&!1===l.get()&&(e.preventDefault(),ge(o,pe(o,e))),"dragend"===e.type&&l.set(!1)})},he=function(e){var t=e.plugins.paste,n=m.getPreProcess(e);n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=m.getPostProcess(e);r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})};function be(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})}function ye(e,t){if(!A.isWordContent(t))return t;var n=[];b.each(e.schema.getBlockElements(),function(e,t){n.push(t)});var r=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return t=S.filter(t,[[r,"$1"]]),t=S.filter(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function xe(e,t,n,r){if(r||n)return t;var u,a=m.getWebkitStyles(e);if(!1===m.shouldRemoveWebKitStyles(e)||"all"===a)return t;if(a&&(u=a.split(/[, ]/)),u){var c=e.dom,f=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var a=c.parseStyle(c.decode(n)),i={};if("none"===u)return t+r;for(var o=0;o<u.length;o++){var s=a[u[o]],l=c.getStyle(f,u[o],!0);/color/.test(u[o])&&(s=c.toHex(s),l=c.toHex(l)),l!==s&&(i[u[o]]=s)}return(i=c.serializeStyle(i,"span"))?t+' style="'+i+'"'+r:t+r})}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function Pe(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})}var we=function(e){var t,n;v.webkit&&be(e,xe),v.ie&&(be(e,ye),n=Pe,(t=e).on("PastePostProcess",function(e){n(t,e.node)}))},_e=function(e){return function(){return e}},De=(_e(!1),_e(!0),function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var o=new Array(arguments.length-1),n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var a=o.concat(n);return i.apply(null,a)}}),Te=function(e,t,n){var r=n.control;r.active("text"===t.pasteFormat.get()),e.on("PastePlainTextToggle",function(e){r.active(e.state)})},Ce=function(e,t){var n=De(Te,e,t);e.addButton("pastetext",{active:!1,icon:"pastetext",tooltip:"Paste as text",cmd:"mceTogglePlainTextPaste",onPostRender:n}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:t.pasteFormat,cmd:"mceTogglePlainTextPaste",onPostRender:n})};t.add("paste",function(e){if(!1===o(e)){var t=u(!1),n=u(!1),r=u(m.isPasteAsTextEnabled(e)?"text":"html"),a=oe(e,r),i=we(e);return Ce(e,a),c(e,a,t),he(e),de(e),ve(e,a,n),s(a,i)}})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.Env"),c=function(e){return parseInt(e.getParam("plugin_preview_width","650"),10)},a=function(e){return parseInt(e.getParam("plugin_preview_height","500"),10)},s=function(e){return e.getParam("content_style","")},d=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){var n="",i=t.dom.encode,e=s(t);n+='<base href="'+i(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>"),d.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'">'});var o=t.settings.body_id||"tinymce";-1!==o.indexOf("=")&&(o=(o=t.getParam("body_id","","hash"))[t.id]||o);var r=t.settings.body_class||"";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_class","","hash"))[t.id]||"");var c=t.settings.directionality?' dir="'+t.settings.directionality+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(o)+'" class="mce-content-body '+i(r)+'"'+i(c)+">"+t.getContent()+'<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);<\/script> </body></html>'},m=function(e,t,n){var i=l(e);if(n)t.src="data:text/html;charset=utf-8,"+encodeURIComponent(i);else{var o=t.contentWindow.document;o.open(),o.write(i),o.close()}},t=function(n){var i=!r.ie,e='<iframe src="" frameborder="0"'+(i?' sandbox="allow-scripts"':"")+"></iframe>",t=c(n),o=a(n);n.windowManager.open({title:"Preview",width:t,height:o,html:e,buttons:{text:"Close",onclick:function(e){e.control.parent().parent().close()}},onPostRender:function(e){var t=e.control.getEl("body").firstChild;m(n,t,i)}})},n=function(e){e.addCommand("mcePreview",function(){t(e)})},i=function(e){e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})};e.add("preview",function(e){n(e),i(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){t.addCommand("mcePrint",function(){t.getWin().print()})},i=function(t){t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print"})};t.add("print",function(t){n(t),i(t),t.addShortcut("Meta+P","","mcePrint")})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(n){return n.getParam("save_enablewhendirty",!0)},c=function(n){return!!n.getParam("save_onsavecallback")},i=function(n){return!!n.getParam("save_oncancelcallback")},r=function(n,e){n.notificationManager.open({text:n.translate(e),type:"error"})},e=function(n){var e;if(e=t.DOM.getParent(n.id,"form"),!o(n)||n.isDirty()){if(n.save(),c(n))return n.execCallback("save_onsavecallback",n),void n.nodeChanged();e?(n.setDirty(!1),e.onsubmit&&!e.onsubmit()||("function"==typeof e.submit?e.submit():r(n,"Error: Form submit field collision.")),n.nodeChanged()):r(n,"Error: No form element found.")}},l=function(n){var e=a.trim(n.startContent);i(n)?n.execCallback("save_oncancelcallback",n):(n.setContent(e),n.undoManager.clear(),n.nodeChanged())},d=function(n){n.addCommand("mceSave",function(){e(n)}),n.addCommand("mceCancel",function(){l(n)})},s=function(t){return function(n){var e=n.control;t.on("nodeChange dirty",function(){e.disabled(o(t)&&!t.isDirty())})}},u=function(n){n.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:s(n)}),n.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:s(n)}),n.addShortcut("Meta+S","","mceSave")};n.add("save",function(n){u(n),d(n)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");function h(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var u={findAndReplaceDOMText:function(t,n,r,a,i){var o,d,v,f,p,g,c=[],l=0;function s(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(0<t){var r=e[t];if(!r)throw new Error("Invalid capture group");n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}if(v=n.ownerDocument,f=i.getBlockElements(),p=i.getWhiteSpaceElements(),g=i.getShortEndedElements(),d=function e(t){var n;if(3===t.nodeType)return t.data;if(p[t.nodeName]&&!f[t.nodeName])return"";if(n="",h(t))return"\n";if((f[t.nodeName]||g[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(n)){if(t.global)for(;o=t.exec(d);)c.push(s(o,a));else o=d.match(t),c.push(s(o,a));return c.length&&(l=c.length,function(e,t,n){var r,a,i,o,d=[],c=0,l=e,s=t.shift(),u=0;e:for(;;){if((f[l.nodeName]||g[l.nodeName]||h(l))&&c++,3===l.nodeType&&(!a&&l.length+c>=s[1]?(a=l,o=s[1]-c):r&&d.push(l),!r&&l.length+c>s[0]&&(r=l,i=s[0]-c),c+=l.length),r&&a){if(l=n({startNode:r,startNodeIndex:i,endNode:a,endNodeIndex:o,innerNodes:d,match:s[2],matchIndex:u}),c-=a.length-o,a=r=null,d=[],u++,!(s=t.shift()))break}else if(p[l.nodeName]&&!f[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!h(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===e)break e;l=l.parentNode}}}(n,c,function(e){var m;if("function"!=typeof e){var r=e.nodeType?e:v.createElement(e);m=function(e,t){var n=r.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(v.createTextNode(e)),n}}else m=e;return function(e){var t,n,r,a=e.startNode,i=e.endNode,o=e.matchIndex;if(a===i){var d=a;r=d.parentNode,0<e.startNodeIndex&&(t=v.createTextNode(d.data.substring(0,e.startNodeIndex)),r.insertBefore(t,d));var c=m(e.match[0],o);return r.insertBefore(c,d),e.endNodeIndex<d.length&&(n=v.createTextNode(d.data.substring(e.endNodeIndex)),r.insertBefore(n,d)),d.parentNode.removeChild(d),c}t=v.createTextNode(a.data.substring(0,e.startNodeIndex)),n=v.createTextNode(i.data.substring(e.endNodeIndex));for(var l=m(a.data.substring(e.startNodeIndex),o),s=[],u=0,f=e.innerNodes.length;u<f;++u){var p=e.innerNodes[u],g=m(p.data,o);p.parentNode.replaceChild(g,p),s.push(g)}var h=m(i.data.substring(0,e.endNodeIndex),o);return(r=a.parentNode).insertBefore(t,a),r.insertBefore(l,a),r.removeChild(a),(r=i.parentNode).insertBefore(h,i),r.insertBefore(n,i),r.removeChild(i),h}}(r))),l}}},g=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},m=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},o=function(e,t){var n,r=[];if((n=p.toArray(e.getBody().getElementsByTagName("span"))).length)for(var a=0;a<n.length;a++){var i=g(n[a]);null!==i&&i.length&&i===t.toString()&&r.push(n[a])}return r},f=function(e,t,n){var r=t.get(),a=e.dom;(n=!1!==n)?r++:r--,a.removeClass(o(e,t.get()),"mce-match-marker-selected");var i=o(e,r);return i.length?(a.addClass(o(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),r):-1},v=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},x=function(e,t){var n=f(e,t,!0);-1!==n&&t.set(n)},b=function(e,t){var n=f(e,t,!1);-1!==n&&t.set(n)},N=function(e){var t=g(e);return null!==t&&0<t.length},y=function(e,t,n){var r,a,i,o;for(a=p.toArray(e.getBody().getElementsByTagName("span")),r=0;r<a.length;r++){var d=g(a[r]);null!==d&&d.length&&(d===t.get().toString()&&(i||(i=a[r].firstChild),o=a[r].firstChild),m(a[r]))}if(i&&o){var c=e.dom.createRng();return c.setStart(i,0),c.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(c),c}},k=function(e,t){return 0<o(e,t.get()+1).length},C=function(e,t){return 0<o(e,t.get()-1).length},T={done:y,find:function(e,t,n,r,a){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"\\s"),n=a?"\\b"+n+"\\b":n;var i,o,d,c,l,s=(i=e,o=t,d=new RegExp(n,r?"g":"gi"),(l=i.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",c=i.getBody(),y(i,o,!1),u.findAndReplaceDOMText(d,c,l,!1,i.schema));return s&&(t.set(-1),t.set(f(e,t,!0))),s},next:x,prev:b,replace:function(e,t,n,r,a){var i,o,d,c,l,s,u=t.get();for(r=!1!==r,d=e.getBody(),o=p.grep(p.toArray(d.getElementsByTagName("span")),N),i=0;i<o.length;i++){var f=g(o[i]);if(c=l=parseInt(f,10),a||c===t.get()){for(n.length?(o[i].firstChild.nodeValue=n,m(o[i])):v(e.dom,o[i]);o[++i];){if((c=parseInt(g(o[i]),10))!==l){i--;break}v(e.dom,o[i])}r&&u--}else l>t.get()&&o[i].setAttribute("data-mce-index",l-1)}return t.set(u),r?(s=k(e,t),x(e,t)):(s=C(e,t),b(e,t)),!a&&s},hasNext:k,hasPrev:C},n=function(r,a){return{done:function(e){return T.done(r,a,e)},find:function(e,t,n){return T.find(r,a,e,t,n)},next:function(){return T.next(r,a)},prev:function(){return T.prev(r,a)},replace:function(e,t,n){return T.replace(r,a,e,t,n)}}},a=function(i,o){var e,d={};function c(){s.statusbar.find("#next").disabled(!1===T.hasNext(i,o)),s.statusbar.find("#prev").disabled(!1===T.hasPrev(i,o))}function l(){i.windowManager.alert("Could not find the specified string.",function(){s.find("#find")[0].focus()})}i.undoManager.add(),e=p.trim(i.selection.getContent({format:"text"}));var s=i.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){i.focus(),T.done(i,o),i.undoManager.add()},onSubmit:function(e){var t,n,r,a;return e.preventDefault(),n=s.find("#case").checked(),a=s.find("#words").checked(),(r=s.find("#find").value()).length?d.text===r&&d.caseState===n&&d.wholeWord===a?T.hasNext(i,o)?(T.next(i,o),void c()):void l():((t=T.find(i,o,r,n,a))||l(),s.statusbar.items().slice(1).disabled(0===t),c(),void(d={text:r,caseState:n,wholeWord:a})):(T.done(i,o,!1),void s.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){s.submit()}},{text:"Replace",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value())||(s.statusbar.items().slice(1).disabled(!0),o.set(-1),d={})}},{text:"Replace all",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value(),!0,!0),s.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){T.prev(i,o),c()}},{text:"Next",name:"next",disabled:!0,onclick:function(){T.next(i,o),c()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:e},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})},i=function(e,t){e.addCommand("SearchReplace",function(){a(e,t)})},d=function(e,t){return function(){a(e,t)}},c=function(e,t){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:d(e,t),separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",onclick:d(e,t)}),e.shortcuts.add("Meta+F","",d(e,t))};e.add("searchreplace",function(e){var t=r(-1);return i(e,t),c(e,t),n(e,t)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var c=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return c(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e){return!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins)||!t.get("tinymcespellchecker")||("undefined"!=typeof window.console&&window.console.log&&window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),0))},h=function(e){return e.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv")},l=function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},d=function(e){return e.getParam("spellchecker_rpc_url")},f=function(e){return e.getParam("spellchecker_callback")},s=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)},g=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.util.URI"),p=tinymce.util.Tools.resolve("tinymce.util.XHR"),u=function(e){return e.fire("SpellcheckStart")},r=function(e){return e.fire("SpellcheckEnd")};function v(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var x,o=function(c,r){var n,o,f,h,g,i=[],x=r.dom;function a(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function l(e){var t=c.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r<t.length;r++){var o=t[r],i=o.getAttribute("data-mce-index");null!==i&&i.length&&-1!==o.className.indexOf("mce-spellchecker-word")&&(i!==e&&null!==e||n.push(o))}return n}function s(e){for(var t=i.length;t--;)if(i[t]===e)return t;return-1}function t(e){for(var t=0,n=i.length;t<n&&!1!==e(i[t],t);t++);return this}function u(e){var t,n,r=l(e?s(e):null);for(t=r.length;t--;)(n=r[t]).parentNode.insertBefore(n.firstChild,n),n.parentNode.removeChild(n);return this}function d(e){var t=l(s(e)),n=r.dom.createRng();return n.setStartBefore(t[0]),n.setEndAfter(t[t.length-1]),n}return f=r.schema.getBlockElements(),h=r.schema.getWhiteSpaceElements(),g=r.schema.getShortEndedElements(),{text:o=function e(t){var n;if(3===t.nodeType)return t.data;if(h[t.nodeName]&&!f[t.nodeName])return"";if(v(t))return"\n";if(n="",(f[t.nodeName]||g[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(c),matches:i,each:t,filter:function(n){var r=[];return t(function(e,t){n(e,t)&&r.push(e)}),i=r,this},reset:function(){return i.splice(0,i.length),u(),this},matchFromElement:function(e){return i[e.getAttribute("data-mce-index")]},elementFromMatch:function(e){return l(s(e))[0]},find:function(e,t){if(o&&e.global)for(;n=e.exec(o);)i.push(a(n,t));return this},add:function(e,t,n){return i.push({start:e,end:e+t,text:o.substr(e,t),data:n}),this},wrap:function(e){return i.length&&function(e,t,n){var r,o,i,c,a,l=[],s=0,u=e,d=0;(t=t.slice(0)).sort(function(e,t){return e.start-t.start}),a=t.shift();e:for(;;){if((f[u.nodeName]||g[u.nodeName]||v(u))&&s++,3===u.nodeType&&(!o&&u.length+s>=a.end?(o=u,c=a.end-s):r&&l.push(u),!r&&u.length+s>a.start&&(r=u,i=a.start-s),s+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:c,innerNodes:l,match:a.text,matchIndex:d}),s-=o.length-c,o=r=null,l=[],d++,!(a=t.shift()))break}else if(h[u.nodeName]&&!f[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!v(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(c,i,function(o){function v(e,t){var n=i[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(x.doc.createTextNode(e)),r}return function(e){var t,n,r,o=e.startNode,i=e.endNode,c=e.matchIndex,a=x.doc;if(o===i){var l=o;r=l.parentNode,0<e.startNodeIndex&&(t=a.createTextNode(l.data.substring(0,e.startNodeIndex)),r.insertBefore(t,l));var s=v(e.match,c);return r.insertBefore(s,l),e.endNodeIndex<l.length&&(n=a.createTextNode(l.data.substring(e.endNodeIndex)),r.insertBefore(n,l)),l.parentNode.removeChild(l),s}t=a.createTextNode(o.data.substring(0,e.startNodeIndex)),n=a.createTextNode(i.data.substring(e.endNodeIndex));for(var u=v(o.data.substring(e.startNodeIndex),c),d=[],f=0,h=e.innerNodes.length;f<h;++f){var g=e.innerNodes[f],m=v(g.data,c);g.parentNode.replaceChild(m,g),d.push(m)}var p=v(i.data.substring(0,e.endNodeIndex),c);return(r=o.parentNode).insertBefore(t,o),r.insertBefore(u,o),r.removeChild(o),(r=i.parentNode).insertBefore(p,i),r.insertBefore(n,i),r.removeChild(i),p}}(e)),this},unwrap:u,replace:function(e,t){var n=d(e);return n.deleteContents(),0<t.length&&n.insertNode(r.dom.doc.createTextNode(t)),n},rangeFromMatch:d,indexOf:s}},N=function(e,t){if(!t.get()){var n=o(e.getBody(),e);t.set(n)}return t.get()},k=function(e,t,n,r,o,i,c){var a,l,s,u=f(e);(u||(a=e,l=t,s=n,function(e,t,n,r){var o={method:e,lang:s.get()},i="";o["addToDictionary"===e?"word":"text"]=t,g.each(o,function(e,t){i&&(i+="&"),i+=t+"="+encodeURIComponent(e)}),p.send({url:new m(l).toAbsolute(d(a)),type:"post",content_type:"application/x-www-form-urlencoded",data:i,success:function(e){if(e=JSON.parse(e))e.error?r(e.error):n(e);else{var t=a.translate("Server response wasn't proper JSON.");r(t)}},error:function(){var e=a.translate("The spelling service was not found: (")+d(a)+a.translate(")");r(e)}})})).call(e.plugins.spellchecker,r,o,i,c)},y=function(e,t,n){e.dom.select("span.mce-spellchecker-word").length||S(e,t,n)},S=function(e,t,n){if(N(e,n).reset(),n.set(null),t.get())return t.set(!1),r(e),!0},w=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},b=function(t,e,n,r,o){var i,c;if("string"!=typeof o&&o.words?(c=!!o.dictionary,i=o.words):i=o,t.setProgressState(!1),function(e){for(var t in e)return!1;return!0}(i)){var a=t.translate("No misspellings found.");return t.notificationManager.open({text:a,type:"info"}),void e.set(!1)}r.set({suggestions:i,hasDictionarySupport:c}),N(t,n).find(s(t)).filter(function(e){return!!i[e.text]}).wrap(function(e){return t.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":e.text})}),e.set(!0),u(t)},T={spellcheck:function(t,e,n,r,o,i){S(t,n,r)||(t.setProgressState(!0),k(t,e,i,"spellcheck",N(t,r).text,function(e){b(t,n,r,o,e)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1),S(t,n,r)}),t.focus())},checkIfFinished:y,addToDictionary:function(t,e,n,r,o,i,c){t.setProgressState(!0),k(t,e,o,"addToDictionary",i,function(){t.setProgressState(!1),t.dom.remove(c,!0),y(t,n,r)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1)})},ignoreWord:function(t,e,n,r,o,i){t.selection.collapse(),i?g.each(t.dom.select("span.mce-spellchecker-word"),function(e){e.getAttribute("data-mce-word")===r&&t.dom.remove(e,!0)}):t.dom.remove(o,!0),y(t,e,n)},findSpansByIndex:function(e,t){var n,r=[];if((n=g.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o<n.length;o++){var i=w(n[o]);null!==i&&i.length&&i===t.toString()&&r.push(n[o])}return r},getElmIndex:w,markErrors:b},I=function(t,n,r,o,e,i){return{getTextMatcher:function(){return o.get()},getWordCharPattern:function(){return s(t)},markErrors:function(e){T.markErrors(t,n,o,r,e)},getLanguage:function(){return e.get()}}},E=function(e,t,n,r,o,i){e.addCommand("mceSpellCheck",function(){T.spellcheck(e,t,n,r,o,i)})},P=function(n,e,r,t,o,i){var c,a,l,s,u=(l=n,c=g.map(h(l).split(","),function(e){return{name:(e=e.split("="))[0],value:e[1]}}),a=[],g.each(c,function(e){a.push({selectable:!0,text:e.name,data:e.value})}),a),d=function(){T.spellcheck(n,e,r,t,i,o)},f={tooltip:"Spellcheck",onclick:d,onPostRender:function(e){var t=e.control;n.on("SpellcheckStart SpellcheckEnd",function(){t.active(r.get())})}};1<u.length&&(f.type="splitbutton",f.menu=u,f.onshow=(s=o,function(e){var t=s.get();e.control.items().each(function(e){e.active(e.settings.data===t)})}),f.onselect=function(e){o.set(e.control.settings.data)}),n.addButton("spellchecker",f),n.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:d,selectable:!0,onPostRender:function(){var e=this;e.active(r.get()),n.on("SpellcheckStart SpellcheckEnd",function(){e.active(r.get())})}})},B=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),C=tinymce.util.Tools.resolve("tinymce.ui.Factory"),D=function(o,i,c,a,l,s){o.on("click",function(e){var t=e.target;if("mce-spellchecker-word"===t.className){e.preventDefault();var n=T.findSpansByIndex(o,T.getElmIndex(t));if(0<n.length){var r=o.dom.createRng();r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),o.selection.setRng(r),function(t,e,n,r,o,i,c,a){var l=[],s=n.get().suggestions[c];g.each(s,function(e){l.push({text:e,onclick:function(){t.insertContent(t.dom.encode(e)),t.dom.remove(a),T.checkIfFinished(t,r,o)}})}),l.push({text:"-"}),n.get().hasDictionarySupport&&l.push({text:"Add to Dictionary",onclick:function(){T.addToDictionary(t,e,r,o,i,c,a)}}),l.push.apply(l,[{text:"Ignore",onclick:function(){T.ignoreWord(t,r,o,c,a)}},{text:"Ignore all",onclick:function(){T.ignoreWord(t,r,o,c,a,!0)}}]),(x=C.create("menu",{items:l,context:"contextmenu",onautohide:function(e){-1!==e.target.className.indexOf("spellchecker")&&e.preventDefault()},onhide:function(){x.remove(),x=null}})).renderTo(document.body);var u=B.DOM.getPos(t.getContentAreaContainer()),d=t.dom.getPos(a[0]),f=t.dom.getRoot();"BODY"===f.nodeName?(d.x-=f.ownerDocument.documentElement.scrollLeft||f.scrollLeft,d.y-=f.ownerDocument.documentElement.scrollTop||f.scrollTop):(d.x-=f.scrollLeft,d.y-=f.scrollTop),u.x+=d.x,u.y+=d.y,x.moveTo(u.x,u.y+a[0].offsetHeight)}(o,i,c,a,l,s,t.getAttribute("data-mce-word"),n)}}})};t.add("spellchecker",function(e,t){if(!1===a(e)){var n=c(!1),r=c(l(e)),o=c(null),i=c(null);return P(e,t,n,o,r,i),D(e,t,i,n,o,r),E(e,t,n,o,i,r),I(e,n,i,o,r,t)}})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.EditorManager"),s=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.VK"),d=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},m=t.DOM,n=function(e){e.keyCode!==f.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==f.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=y.explode(d(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):m.get(e[0]):":next"===e[1]?u(1):m.get(e[1]))){var t=c.get(o.id||o.name);o.id&&t?t.focus():a.setTimeout(function(){s.webkit||window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&c.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=m.select(":input:enabled,*[tabindex]:not(iframe)"),y.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&m.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),s.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var n,e,t,r,o,i,u=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(n){return function(){return n}},c=a(!1),l=a(!0),y={noop:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e]},noarg:function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t()}},compose:function(t,r){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(r.apply(null,arguments))}},constant:a,identity:function(n){return n},tripleEquals:function(n,e){return n===e},curry:function(i){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var u=new Array(arguments.length-1),t=1;t<arguments.length;t++)u[t-1]=arguments[t];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var o=u.concat(t);return i.apply(null,o)}},not:function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return!t.apply(null,arguments)}},die:function(n){return function(){throw new Error(n)}},apply:function(n){return n()},call:function(n){n()},never:c,always:l},s=y.never,f=y.always,d=function(){return m},m=(r={fold:function(n,e){return n()},is:s,isSome:s,isNone:f,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},or:t,orThunk:e,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:s,forall:f,filter:d,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:y.constant("none()")},Object.freeze&&Object.freeze(r),r),g=function(t){var n=function(){return t},e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:f,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,or:e,orThunk:e,map:function(n){return g(n(t))},ap:function(n){return n.fold(d,function(n){return g(n(t))})},each:function(n){n(t)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(t)?o:m},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(s,function(n){return e(t,n)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},x={some:g,none:d,from:function(n){return null===n||n===undefined?m:g(n)}},h=function(e){return function(n){return function(n){if(null===n)return"null";var e=typeof n;return"object"===e&&Array.prototype.isPrototypeOf(n)?"array":"object"===e&&String.prototype.isPrototypeOf(n)?"string":e}(n)===e}},p={isString:h("string"),isObject:h("object"),isArray:h("array"),isNull:h("null"),isBoolean:h("boolean"),isUndefined:h("undefined"),isFunction:h("function"),isNumber:h("number")},v=(o=Array.prototype.indexOf)===undefined?function(n,e){return D(n,e)}:function(n,e){return o.call(n,e)},b=function(n,e){return-1<v(n,e)},w=function(n,e){for(var t=n.length,r=new Array(t),o=0;o<t;o++){var i=n[o];r[o]=e(i,o,n)}return r},C=function(n,e){for(var t=0,r=n.length;t<r;t++)e(n[t],t,n)},R=function(n,e){for(var t=n.length-1;0<=t;t--)e(n[t],t,n)},S=function(n,e){for(var t=[],r=0,o=n.length;r<o;r++){var i=n[r];e(i,r,n)&&t.push(i)}return t},T=function(n,e){for(var t=0,r=n.length;t<r;t++)if(e(n[t],t,n))return x.some(t);return x.none()},D=function(n,e){for(var t=0,r=n.length;t<r;++t)if(n[t]===e)return t;return-1},k=Array.prototype.push,A=function(n){for(var e=[],t=0,r=n.length;t<r;++t){if(!Array.prototype.isPrototypeOf(n[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+n);k.apply(e,n[t])}return e},O=function(n,e){for(var t=0,r=n.length;t<r;++t)if(!0!==e(n[t],t,n))return!1;return!0},N=Array.prototype.slice,E=p.isFunction(Array.from)?Array.from:function(n){return N.call(n)},P={map:w,each:C,eachr:R,partition:function(n,e){for(var t=[],r=[],o=0,i=n.length;o<i;o++){var u=n[o];(e(u,o,n)?t:r).push(u)}return{pass:t,fail:r}},filter:S,groupBy:function(n,e){if(0===n.length)return[];for(var t=e(n[0]),r=[],o=[],i=0,u=n.length;i<u;i++){var a=n[i],c=e(a);c!==t&&(r.push(o),o=[]),t=c,o.push(a)}return 0!==o.length&&r.push(o),r},indexOf:function(n,e){var t=v(n,e);return-1===t?x.none():x.some(t)},foldr:function(n,e,t){return R(n,function(n){t=e(t,n)}),t},foldl:function(n,e,t){return C(n,function(n){t=e(t,n)}),t},find:function(n,e){for(var t=0,r=n.length;t<r;t++){var o=n[t];if(e(o,t,n))return x.some(o)}return x.none()},findIndex:T,flatten:A,bind:function(n,e){var t=w(n,e);return A(t)},forall:O,exists:function(n,e){return T(n,e).isSome()},contains:b,equal:function(n,t){return n.length===t.length&&O(n,function(n,e){return n===t[e]})},reverse:function(n){var e=N.call(n,0);return e.reverse(),e},chunk:function(n,e){for(var t=[],r=0;r<n.length;r+=e){var o=n.slice(r,r+e);t.push(o)}return t},difference:function(n,e){return S(n,function(n){return!b(e,n)})},mapToObject:function(n,e){for(var t={},r=0,o=n.length;r<o;r++){var i=n[r];t[String(i)]=e(i,r)}return t},pure:function(n){return[n]},sort:function(n,e){var t=N.call(n,0);return t.sort(e),t},range:function(n,e){for(var t=[],r=0;r<n;r++)t.push(e(r));return t},head:function(n){return 0===n.length?x.none():x.some(n[0])},last:function(n){return 0===n.length?x.none():x.some(n[n.length-1])},from:E},B=(i=Object.keys)===undefined?function(n){var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push(t);return e}:i,I=function(n,e){for(var t=B(n),r=0,o=t.length;r<o;r++){var i=t[r];e(n[i],i,n)}},W=function(r,o){var i={};return I(r,function(n,e){var t=o(n,e,r);i[t.k]=t.v}),i},M=function(n,t){var r=[];return I(n,function(n,e){r.push(t(n,e))}),r},L=function(n){return M(n,function(n){return n})},q={bifilter:function(n,t){var r={},o={};return I(n,function(n,e){(t(n,e)?r:o)[e]=n}),{t:r,f:o}},each:I,map:function(n,r){return W(n,function(n,e,t){return{k:e,v:r(n,e,t)}})},mapToArray:M,tupleMap:W,find:function(n,e){for(var t=B(n),r=0,o=t.length;r<o;r++){var i=t[r],u=n[i];if(e(u,i,n))return x.some(u)}return x.none()},keys:B,values:L,size:function(n){return L(n).length}},j=function(n){return n.slice(0).sort()},_=function(n,e){throw new Error("All required keys ("+j(n).join(", ")+") were not specified. Specified keys were: "+j(e).join(", ")+".")},z=function(n){throw new Error("Unsupported keys for object: "+j(n).join(", "))},H=function(e,n){if(!p.isArray(n))throw new Error("The "+e+" fields must be an array. Was: "+n+".");P.each(n,function(n){if(!p.isString(n))throw new Error("The value "+n+" in the "+e+" fields was not a string.")})},F=function(n,e){throw new Error("All values need to be of type: "+e+". Keys ("+j(n).join(", ")+") were not.")},U=function(n){var t=j(n);P.find(t,function(n,e){return e<t.length-1&&n===t[e+1]}).each(function(n){throw new Error("The field: "+n+" occurs more than once in the combined fields: ["+t.join(", ")+"].")})},V={immutable:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+e.length+']", got '+t.length+" arguments");var r={};return P.each(e,function(n,e){r[n]=y.constant(t[e])}),r}},immutableBag:function(o,i){var u=o.concat(i);if(0===u.length)throw new Error("You must specify at least one required or optional field.");return H("required",o),H("optional",i),U(u),function(e){var t=q.keys(e);P.forall(o,function(n){return P.contains(t,n)})||_(o,t);var n=P.filter(t,function(n){return!P.contains(u,n)});0<n.length&&z(n);var r={};return P.each(o,function(n){r[n]=y.constant(e[n])}),P.each(i,function(n){r[n]=y.constant(Object.prototype.hasOwnProperty.call(e,n)?x.some(e[n]):x.none())}),r}}},G=V.immutable("width","height"),X=V.immutable("rows","columns"),Y=V.immutable("row","column"),K=V.immutable("x","y"),$=V.immutable("element","rowspan","colspan"),J=V.immutable("element","rowspan","colspan","isNew"),Q={dimensions:G,grid:X,address:Y,coords:K,extended:V.immutable("element","rowspan","colspan","row","column"),detail:$,detailnew:J,rowdata:V.immutable("element","cells","section"),elementnew:V.immutable("element","isNew"),rowdatanew:V.immutable("element","cells","section","isNew"),rowcells:V.immutable("cells","section"),rowdetails:V.immutable("details","section"),bounds:V.immutable("startRow","startCol","finishRow","finishCol")},Z=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:y.constant(n)}},nn={fromHtml:function(n,e){var t=(e||document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throw console.error("HTML does not have a single root node",n),"HTML must have a single root node";return Z(t.childNodes[0])},fromTag:function(n,e){var t=(e||document).createElement(n);return Z(t)},fromText:function(n,e){var t=(e||document).createTextNode(n);return Z(t)},fromDom:Z,fromPoint:function(n,e,t){return x.from(n.dom().elementFromPoint(e,t)).map(Z)}},en=8,tn=9,rn=1,on=3,un=rn,an=tn,cn=function(n){return n.nodeType!==un&&n.nodeType!==an||0===n.childElementCount},ln={all:function(n,e){var t=e===undefined?document:e.dom();return cn(t)?[]:P.map(t.querySelectorAll(n),nn.fromDom)},is:function(n,e){var t=n.dom();if(t.nodeType!==un)return!1;if(t.matches!==undefined)return t.matches(e);if(t.msMatchesSelector!==undefined)return t.msMatchesSelector(e);if(t.webkitMatchesSelector!==undefined)return t.webkitMatchesSelector(e);if(t.mozMatchesSelector!==undefined)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},one:function(n,e){var t=e===undefined?document:e.dom();return cn(t)?x.none():x.from(t.querySelector(n)).map(nn.fromDom)}},sn=function(n,e){for(var t=[],r=function(n){return t.push(n),e(n)},o=e(n);(o=o.bind(r)).isSome(););return t},fn="undefined"!=typeof window?window:Function("return this;")(),dn=function(n,e){for(var t=e!==undefined&&null!==e?e:fn,r=0;r<n.length&&t!==undefined&&null!==t;++r)t=t[n[r]];return t},mn=function(n,e){var t=n.split(".");return dn(t,e)},gn=function(n,e){var t=mn(n,e);if(t===undefined||null===t)throw n+" not available on this browser";return t},hn=function(){return gn("Node")},pn=function(n,e,t){return 0!=(n.compareDocumentPosition(e)&t)},vn=function(n,e){return pn(n,e,hn().DOCUMENT_POSITION_CONTAINED_BY)},bn=function(n){var e,t=!1;return function(){return t||(t=!0,e=n.apply(null,arguments)),e}},wn=function(n,e){var t=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return undefined}(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return xn(r(1),r(2))},yn=function(){return xn(0,0)},xn=function(n,e){return{major:n,minor:e}},Cn={nu:xn,detect:function(n,e){var t=String(e).toLowerCase();return 0===n.length?yn():wn(n,t)},unknown:yn},Rn="Firefox",Sn=function(n,e){return function(){return e===n}},Tn=function(n){var e=n.current;return{current:e,version:n.version,isEdge:Sn("Edge",e),isChrome:Sn("Chrome",e),isIE:Sn("IE",e),isOpera:Sn("Opera",e),isFirefox:Sn(Rn,e),isSafari:Sn("Safari",e)}},Dn={unknown:function(){return Tn({current:undefined,version:Cn.unknown()})},nu:Tn,edge:y.constant("Edge"),chrome:y.constant("Chrome"),ie:y.constant("IE"),opera:y.constant("Opera"),firefox:y.constant(Rn),safari:y.constant("Safari")},kn="Windows",An="Android",On="Solaris",Nn="FreeBSD",En=function(n,e){return function(){return e===n}},Pn=function(n){var e=n.current;return{current:e,version:n.version,isWindows:En(kn,e),isiOS:En("iOS",e),isAndroid:En(An,e),isOSX:En("OSX",e),isLinux:En("Linux",e),isSolaris:En(On,e),isFreeBSD:En(Nn,e)}},Bn={unknown:function(){return Pn({current:undefined,version:Cn.unknown()})},nu:Pn,windows:y.constant(kn),ios:y.constant("iOS"),android:y.constant(An),linux:y.constant("Linux"),osx:y.constant("OSX"),solaris:y.constant(On),freebsd:y.constant(Nn)},In=function(n,e){var t=String(e).toLowerCase();return P.find(n,function(n){return n.search(t)})},Wn=function(n,t){return In(n,t).map(function(n){var e=Cn.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Mn=function(n,t){return In(n,t).map(function(n){var e=Cn.detect(n.versionRegexes,t);return{current:n.name,version:e}})},Ln=function(n,e){return e+n},qn=function(n,e){return n+e},jn=function(n,e){return n.substring(e)},_n=function(n,e){return n.substring(0,n.length-e)},zn=function(n){return""===n?x.none():x.some(n.substr(0,1))},Hn=function(n){return""===n?x.none():x.some(n.substring(1))},Fn=function(n,e,t){return""===e||!(n.length<e.length)&&n.substr(t,t+e.length)===e},Un=function(n,e){return Fn(n,e,0)},Vn=function(n,e){return Fn(n,e,n.length-e.length)},Gn={supplant:function(n,o){return n.replace(/\${([^{}]*)}/g,function(n,e){var t,r=o[e];return"string"==(t=typeof r)||"number"===t?r:n})},startsWith:Un,removeLeading:function(n,e){return Un(n,e)?jn(n,e.length):n},removeTrailing:function(n,e){return Vn(n,e)?_n(n,e.length):n},ensureLeading:function(n,e){return Un(n,e)?n:Ln(n,e)},ensureTrailing:function(n,e){return Vn(n,e)?n:qn(n,e)},endsWith:Vn,contains:function(n,e){return-1!==n.indexOf(e)},trim:function(n){return n.replace(/^\s+|\s+$/g,"")},lTrim:function(n){return n.replace(/^\s+/g,"")},rTrim:function(n){return n.replace(/\s+$/g,"")},capitalize:function(n){return zn(n).bind(function(e){return Hn(n).map(function(n){return e.toUpperCase()+n})}).getOr(n)}},Xn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Yn=function(e){return function(n){return Gn.contains(n,e)}},Kn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return Gn.contains(n,"edge/")&&Gn.contains(n,"chrome")&&Gn.contains(n,"safari")&&Gn.contains(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Xn],search:function(n){return Gn.contains(n,"chrome")&&!Gn.contains(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return Gn.contains(n,"msie")||Gn.contains(n,"trident")}},{name:"Opera",versionRegexes:[Xn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Yn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Yn("firefox")},{name:"Safari",versionRegexes:[Xn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(Gn.contains(n,"safari")||Gn.contains(n,"mobile/"))&&Gn.contains(n,"applewebkit")}}],$n=[{name:"Windows",search:Yn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return Gn.contains(n,"iphone")||Gn.contains(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Yn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Yn("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Yn("linux"),versionRegexes:[]},{name:"Solaris",search:Yn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Yn("freebsd"),versionRegexes:[]}],Jn={browsers:y.constant(Kn),oses:y.constant($n)},Qn=function(n){var e,t,r,o,i,u,a,c,l,s,f,d=Jn.browsers(),m=Jn.oses(),g=Wn(d,n).fold(Dn.unknown,Dn.nu),h=Mn(m,n).fold(Bn.unknown,Bn.nu);return{browser:g,os:h,deviceType:(t=g,r=n,o=(e=h).isiOS()&&!0===/ipad/i.test(r),i=e.isiOS()&&!o,u=e.isAndroid()&&3===e.version.major,a=e.isAndroid()&&4===e.version.major,c=o||u||a&&!0===/mobile/i.test(r),l=e.isiOS()||e.isAndroid(),s=l&&!c,f=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),{isiPad:y.constant(o),isiPhone:y.constant(i),isTablet:y.constant(c),isPhone:y.constant(s),isTouch:y.constant(l),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:y.constant(f)})}},Zn={detect:bn(function(){var n=navigator.userAgent;return Qn(n)})},ne=function(n,e){return n.dom()===e.dom()},ee=Zn.detect().browser.isIE()?function(n,e){return vn(n.dom(),e.dom())}:function(n,e){var t=n.dom(),r=e.dom();return t!==r&&t.contains(r)},te={eq:ne,isEqualNode:function(n,e){return n.dom().isEqualNode(e.dom())},member:function(n,e){return P.exists(e,y.curry(ne,n))},contains:ee,is:ln.is},re=function(n){return nn.fromDom(n.dom().ownerDocument)},oe=function(n){var e=n.dom();return x.from(e.parentNode).map(nn.fromDom)},ie=function(n){var e=n.dom();return x.from(e.previousSibling).map(nn.fromDom)},ue=function(n){var e=n.dom();return x.from(e.nextSibling).map(nn.fromDom)},ae=function(n){var e=n.dom();return P.map(e.childNodes,nn.fromDom)},ce=function(n,e){var t=n.dom().childNodes;return x.from(t[e]).map(nn.fromDom)},le=V.immutable("element","offset"),se={owner:re,defaultView:function(n){var e=n.dom().ownerDocument.defaultView;return nn.fromDom(e)},documentElement:function(n){var e=re(n);return nn.fromDom(e.dom().documentElement)},parent:oe,findIndex:function(t){return oe(t).bind(function(n){var e=ae(n);return P.findIndex(e,function(n){return te.eq(t,n)})})},parents:function(n,e){for(var t=p.isFunction(e)?e:y.constant(!1),r=n.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=nn.fromDom(i);if(o.push(u),!0===t(u))break;r=i}return o},siblings:function(e){return oe(e).map(ae).map(function(n){return P.filter(n,function(n){return!te.eq(e,n)})}).getOr([])},prevSibling:ie,offsetParent:function(n){var e=n.dom();return x.from(e.offsetParent).map(nn.fromDom)},prevSiblings:function(n){return P.reverse(sn(n,ie))},nextSibling:ue,nextSiblings:function(n){return sn(n,ue)},children:ae,child:ce,firstChild:function(n){return ce(n,0)},lastChild:function(n){return ce(n,n.dom().childNodes.length-1)},childNodesCount:function(n){return n.dom().childNodes.length},hasChildNodes:function(n){return n.dom().hasChildNodes()},leaf:function(n,e){var t=ae(n);return 0<t.length&&e<t.length?le(t[e],0):le(n,e)}},fe=function(n,e,t){return P.bind(se.children(n),function(n){return ln.is(n,e)?t(n)?[n]:[]:fe(n,e,t)})},de={firstLayer:function(n,e){return fe(n,e,y.constant(!0))},filterFirstLayer:fe},me=function(n){return n.dom().nodeName.toLowerCase()},ge=function(n){return n.dom().nodeType},he=function(e){return function(n){return ge(n)===e}},pe=he(rn),ve=he(on),be=he(tn),we={name:me,type:ge,value:function(n){return n.dom().nodeValue},isElement:pe,isText:ve,isDocument:be,isComment:function(n){return ge(n)===en||"#comment"===me(n)}},ye=function(n,e,t){if(!(p.isString(t)||p.isBoolean(t)||p.isNumber(t)))throw console.error("Invalid call to Attr.set. Key ",e,":: Value ",t,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(e,t+"")},xe=function(n,e,t){ye(n.dom(),e,t)},Ce=function(n,e){var t=n.dom().getAttribute(e);return null===t?undefined:t},Re=function(n,e){var t=n.dom();return!(!t||!t.hasAttribute)&&t.hasAttribute(e)},Se={clone:function(n){return P.foldl(n.dom().attributes,function(n,e){return n[e.name]=e.value,n},{})},set:xe,setAll:function(n,e){var t=n.dom();q.each(e,function(n,e){ye(t,e,n)})},get:Ce,has:Re,remove:function(n,e){n.dom().removeAttribute(e)},hasNone:function(n){var e=n.dom().attributes;return e===undefined||null===e||0===e.length},transfer:function(o,i,n){we.isElement(o)&&we.isElement(i)&&P.each(n,function(n){var e,t,r;t=i,Re(e=o,r=n)&&!Re(t,r)&&xe(t,r,Ce(e,r))})}},Te=bn(function(){return De(nn.fromDom(document))}),De=function(n){var e=n.dom().body;if(null===e||e===undefined)throw"Body is not available yet";return nn.fromDom(e)},ke={body:Te,getBody:De,inBody:function(n){var e=we.isText(n)?n.dom().parentNode:n.dom();return e!==undefined&&null!==e&&e.ownerDocument.body.contains(e)}},Ae=function(n,e){var t=[];return P.each(se.children(n),function(n){e(n)&&(t=t.concat([n])),t=t.concat(Ae(n,e))}),t},Oe={all:function(n){return Ae(ke.body(),n)},ancestors:function(n,e,t){return P.filter(se.parents(n,t),e)},siblings:function(n,e){return P.filter(se.siblings(n),e)},children:function(n,e){return P.filter(se.children(n),e)},descendants:Ae},Ne={all:function(n){return ln.all(n)},ancestors:function(n,e,t){return Oe.ancestors(n,function(n){return ln.is(n,e)},t)},siblings:function(n,e){return Oe.siblings(n,function(n){return ln.is(n,e)})},children:function(n,e){return Oe.children(n,function(n){return ln.is(n,e)})},descendants:function(n,e){return ln.all(e,n)}};function Ee(n,e,t,r,o){return n(t,r)?x.some(t):p.isFunction(o)&&o(t)?x.none():e(t,r,o)}var Pe,Be,Ie,We,Me,Le=function(n,e,t){for(var r=n.dom(),o=p.isFunction(t)?t:y.constant(!1);r.parentNode;){r=r.parentNode;var i=nn.fromDom(r);if(e(i))return x.some(i);if(o(i))break}return x.none()},qe=function(n,e){return P.find(n.dom().childNodes,y.compose(e,nn.fromDom)).map(nn.fromDom)},je=function(n,r){var o=function(n){for(var e=0;e<n.childNodes.length;e++){if(r(nn.fromDom(n.childNodes[e])))return x.some(nn.fromDom(n.childNodes[e]));var t=o(n.childNodes[e]);if(t.isSome())return t}return x.none()};return o(n.dom())},_e={first:function(n){return je(ke.body(),n)},ancestor:Le,closest:function(n,e,t){return Ee(function(n){return e(n)},Le,n,e,t)},sibling:function(e,t){var n=e.dom();return n.parentNode?qe(nn.fromDom(n.parentNode),function(n){return!te.eq(e,n)&&t(n)}):x.none()},child:qe,descendant:je},ze=function(n,e,t){return _e.ancestor(n,function(n){return ln.is(n,e)},t)},He={first:function(n){return ln.one(n)},ancestor:ze,sibling:function(n,e){return _e.sibling(n,function(n){return ln.is(n,e)})},child:function(n,e){return _e.child(n,function(n){return ln.is(n,e)})},descendant:function(n,e){return ln.one(e,n)},closest:function(n,e,t){return Ee(ln.is,ze,n,e,t)}},Fe=function(n,e,t){var r=t!==undefined?t:y.constant(!1);return r(e)?x.none():P.contains(n,we.name(e))?x.some(e):He.ancestor(e,n.join(","),function(n){return ln.is(n,"table")||r(n)})},Ue=function(e,n){return se.parent(n).map(function(n){return Ne.children(n,e)})},Ve=y.curry(Ue,"th,td"),Ge=y.curry(Ue,"tr"),Xe=function(n,e){return parseInt(Se.get(n,e),10)},Ye={cell:function(n,e){return Fe(["td","th"],n,e)},firstCell:function(n){return He.descendant(n,"th,td")},cells:function(n){return de.firstLayer(n,"th,td")},neighbourCells:Ve,table:function(n,e){return He.closest(n,"table",e)},row:function(n,e){return Fe(["tr"],n,e)},rows:function(n){return de.firstLayer(n,"tr")},notCell:function(n,e){return Fe(["caption","tr","tbody","tfoot","thead"],n,e)},neighbourRows:Ge,attr:Xe,grid:function(n,e,t){var r=Xe(n,e),o=Xe(n,t);return Q.grid(r,o)}},Ke=function(n){var e=Ye.rows(n);return P.map(e,function(n){var e=n,t=se.parent(e).bind(function(n){var e=we.name(n);return"tfoot"===e||"thead"===e||"tbody"===e?e:"tbody"}),r=P.map(Ye.cells(n),function(n){var e=Se.has(n,"rowspan")?parseInt(Se.get(n,"rowspan"),10):1,t=Se.has(n,"colspan")?parseInt(Se.get(n,"colspan"),10):1;return Q.detail(n,e,t)});return Q.rowdata(e,r,t)})},$e=function(n,t){return P.map(n,function(n){var e=P.map(Ye.cells(n),function(n){var e=Se.has(n,"rowspan")?parseInt(Se.get(n,"rowspan"),10):1,t=Se.has(n,"colspan")?parseInt(Se.get(n,"colspan"),10):1;return Q.detail(n,e,t)});return Q.rowdata(n,e,t.section())})},Je=function(n,e){return n+","+e},Qe=function(n,e){var t=P.bind(n.all(),function(n){return n.cells()});return P.filter(t,e)},Ze={generate:function(n){var s={},e=[],t=n.length,f=0;P.each(n,function(n,c){var l=[];P.each(n.cells(),function(n,e){for(var t=0;s[Je(c,t)]!==undefined;)t++;for(var r=Q.extended(n.element(),n.rowspan(),n.colspan(),c,t),o=0;o<n.colspan();o++)for(var i=0;i<n.rowspan();i++){var u=t+o,a=Je(c+i,u);s[a]=r,f=Math.max(f,u+1)}l.push(r)}),e.push(Q.rowdata(n.element(),l,n.section()))});var r=Q.grid(t,f);return{grid:y.constant(r),access:y.constant(s),all:y.constant(e)}},getAt:function(n,e,t){var r=n.access()[Je(e,t)];return r!==undefined?x.some(r):x.none()},findItem:function(n,e,t){var r=Qe(n,function(n){return t(e,n.element())});return 0<r.length?x.some(r[0]):x.none()},filterItems:Qe,justCells:function(n){var e=P.map(n.all(),function(n){return n.cells()});return P.flatten(e)}},nt=function(n){return n.style!==undefined},et=function(n,e,t){if(!p.isString(t))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",t,":: Element ",n),new Error("CSS value must be a string: "+t);nt(n)&&n.style.setProperty(e,t)},tt=function(n,e){nt(n)&&n.style.removeProperty(e)},rt=function(n,e,t){var r=n.dom();et(r,e,t)},ot=function(n,e){return nt(n)?n.style.getPropertyValue(e):""},it=function(n,e){var t=n.dom(),r=ot(t,e);return x.from(r).filter(function(n){return 0<n.length})},ut={copy:function(n,e){var t=n.dom(),r=e.dom();nt(t)&&nt(r)&&(r.style.cssText=t.style.cssText)},set:rt,preserve:function(n,e){var t=Se.get(n,"style"),r=e(n);return(t===undefined?Se.remove:Se.set)(n,"style",t),r},setAll:function(n,e){var t=n.dom();q.each(e,function(n,e){et(t,e,n)})},setOptions:function(n,e){var t=n.dom();q.each(e,function(n,e){n.fold(function(){tt(t,e)},function(n){et(t,e,n)})})},remove:function(n,e){var t=n.dom();tt(t,e),Se.has(n,"style")&&""===Gn.trim(Se.get(n,"style"))&&Se.remove(n,"style")},get:function(n,e){var t=n.dom(),r=window.getComputedStyle(t).getPropertyValue(e),o=""!==r||ke.inBody(n)?r:ot(t,e);return null===o?undefined:o},getRaw:it,getAllRaw:function(n){var e={},t=n.dom();if(nt(t))for(var r=0;r<t.style.length;r++){var o=t.style.item(r);e[o]=t.style[o]}return e},isValidValue:function(n,e,t){var r=nn.fromTag(n);return rt(r,e,t),it(r,e).isSome()},reflow:function(n){return n.dom().offsetWidth},transfer:function(r,o,n){we.isElement(r)&&we.isElement(o)&&P.each(n,function(n){var e,t;e=o,it(r,t=n).each(function(n){it(e,t).isNone()&&rt(e,t,n)})})}},at=function(e,t){se.parent(e).each(function(n){n.dom().insertBefore(t.dom(),e.dom())})},ct=function(n,e){n.dom().appendChild(e.dom())},lt={before:at,after:function(n,e){se.nextSibling(n).fold(function(){se.parent(n).each(function(n){ct(n,e)})},function(n){at(n,e)})},prepend:function(e,t){se.firstChild(e).fold(function(){ct(e,t)},function(n){e.dom().insertBefore(t.dom(),n.dom())})},append:ct,appendAt:function(n,e,t){se.child(n,t).fold(function(){ct(n,e)},function(n){at(n,e)})},wrap:function(n,e){at(n,e),ct(e,n)}},st={before:function(e,n){P.each(n,function(n){lt.before(e,n)})},after:function(r,o){P.each(o,function(n,e){var t=0===e?r:o[e-1];lt.after(t,n)})},prepend:function(e,n){P.each(n.slice().reverse(),function(n){lt.prepend(e,n)})},append:function(e,n){P.each(n,function(n){lt.append(e,n)})}},ft=function(n){var e=n.dom();null!==e.parentNode&&e.parentNode.removeChild(e)},dt={empty:function(n){n.dom().textContent="",P.each(se.children(n),function(n){ft(n)})},remove:ft,unwrap:function(n){var e=se.children(n);0<e.length&&st.before(n,e),ft(n)}},mt=V.immutable("minRow","minCol","maxRow","maxCol"),gt=function(n,e){var t,i,r,u,a,c,l,o,s,f,d=function(n){return ln.is(n.element(),e)},m=Ke(n),g=Ze.generate(m),h=(i=d,r=(t=g).grid().columns(),u=t.grid().rows(),a=r,l=c=0,q.each(t.access(),function(n){if(i(n)){var e=n.row(),t=e+n.rowspan()-1,r=n.column(),o=r+n.colspan()-1;e<u?u=e:c<t&&(c=t),r<a?a=r:l<o&&(l=o)}}),mt(u,a,c,l)),p="th:not("+e+"),td:not("+e+")",v=de.filterFirstLayer(n,"th,td",function(n){return ln.is(n,p)});return P.each(v,dt.remove),function(n,e,t,r){for(var o,i,u,a=e.grid().columns(),c=e.grid().rows(),l=0;l<c;l++)for(var s=!1,f=0;f<a;f++)l<t.minRow()||l>t.maxRow()||f<t.minCol()||f>t.maxCol()||(Ze.getAt(e,l,f).filter(r).isNone()?(o=s,i=n[l].element(),u=nn.fromTag("td"),lt.append(u,nn.fromTag("br")),(o?lt.append:lt.prepend)(i,u)):s=!0)}(m,g,h,d),o=n,s=h,f=P.filter(de.firstLayer(o,"tr"),function(n){return 0===n.dom().childElementCount}),P.each(f,dt.remove),s.minCol()!==s.maxCol()&&s.minRow()!==s.maxRow()||P.each(de.firstLayer(o,"th,td"),function(n){Se.remove(n,"rowspan"),Se.remove(n,"colspan")}),Se.remove(o,"width"),Se.remove(o,"height"),ut.remove(o,"width"),ut.remove(o,"height"),n},ht=function(n,e){return nn.fromDom(n.dom().cloneNode(e))},pt=function(n){return ht(n,!0)},vt=function(n,e){var t=nn.fromTag(e),r=Se.clone(n);return Se.setAll(t,r),t},bt=function(n){return ht(n,!1)},wt=pt,yt=function(n,e){var t=vt(n,e),r=se.children(pt(n));return st.append(t,r),t},xt=(Pe=we.isText,Be="text",Ie=function(n){return Pe(n)?x.from(n.dom().nodeValue):x.none()},We=Zn.detect().browser,{get:function(n){if(!Pe(n))throw new Error("Can only get "+Be+" value of a "+Be+" node");return Me(n).getOr("")},getOption:Me=We.isIE()&&10===We.version.major?function(n){try{return Ie(n)}catch(e){return x.none()}}:Ie,set:function(n,e){if(!Pe(n))throw new Error("Can only set raw "+Be+" value of a "+Be+" node");n.dom().nodeValue=e}}),Ct={get:function(n){return xt.get(n)},getOption:function(n){return xt.getOption(n)},set:function(n,e){xt.set(n,e)}},Rt=function(n){return"img"===we.name(n)?1:Ct.getOption(n).fold(function(){return se.children(n).length},function(n){return n.length})},St=["img","br"],Tt=Rt,Dt=function(n){return Ct.getOption(n).filter(function(n){return 0!==n.trim().length||-1<n.indexOf("\xa0")}).isSome()||P.contains(St,we.name(n))},kt=function(n,i){var u=function(n){for(var e=se.children(n),t=e.length-1;0<=t;t--){var r=e[t];if(i(r))return x.some(r);var o=u(r);if(o.isSome())return o}return x.none()};return u(n)},At={first:function(n){return _e.descendant(n,Dt)},last:function(n){return kt(n,Dt)}},Ot=function(){var n=nn.fromTag("td");return lt.append(n,nn.fromTag("br")),n},Nt=function(n,e,t){var r=yt(n,e);return q.each(t,function(n,e){null===n?Se.remove(r,e):Se.set(r,e,n)}),r},Et=function(n){return n},Pt=function(n){return function(){return nn.fromTag("tr",n.dom())}},Bt=function(c,n,l){return{row:Pt(n),cell:function(n){var r,o,i,e=se.owner(n.element()),t=nn.fromTag(we.name(n.element()),e.dom()),u=l.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),a=0<u.length?(r=n.element(),o=t,i=u,At.first(r).map(function(n){var e=i.join(","),t=Ne.ancestors(n,e,function(n){return te.eq(n,r)});return P.foldr(t,function(n,e){var t=bt(e);return lt.append(n,t),t},o)}).getOr(o)):t;return lt.append(a,nn.fromTag("br")),ut.copy(n.element(),t),ut.remove(t,"height"),1!==n.colspan()&&ut.remove(n.element(),"width"),c(n.element(),t),t},replace:Nt,gap:Ot}},It=function(n){return{row:Pt(n),cell:Ot,replace:Et,gap:Ot}},Wt=function(n,e){var t=(e||document).createElement("div");return t.innerHTML=n,se.children(nn.fromDom(t))},Mt=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Lt(){return{up:y.constant({selector:He.ancestor,closest:He.closest,predicate:_e.ancestor,all:se.parents}),down:y.constant({selector:Ne.descendants,predicate:Oe.descendants}),styles:y.constant({get:ut.get,getRaw:ut.getRaw,set:ut.set,remove:ut.remove}),attrs:y.constant({get:Se.get,set:Se.set,remove:Se.remove,copyTo:function(n,e){var t=Se.clone(n);Se.setAll(e,t)}}),insert:y.constant({before:lt.before,after:lt.after,afterAll:st.after,append:lt.append,appendAll:st.append,prepend:lt.prepend,wrap:lt.wrap}),remove:y.constant({unwrap:dt.unwrap,remove:dt.remove}),create:y.constant({nu:nn.fromTag,clone:function(n){return nn.fromDom(n.dom().cloneNode(!1))},text:nn.fromText}),query:y.constant({comparePosition:function(n,e){return n.dom().compareDocumentPosition(e.dom())},prevSibling:se.prevSibling,nextSibling:se.nextSibling}),property:y.constant({children:se.children,name:we.name,parent:se.parent,isText:we.isText,isComment:we.isComment,isElement:we.isElement,getText:Ct.get,setText:Ct.set,isBoundary:function(n){return!!we.isElement(n)&&("body"===we.name(n)||P.contains(Mt,we.name(n)))},isEmptyTag:function(n){return!!we.isElement(n)&&P.contains(["br","img","hr","input"],we.name(n))}}),eq:te.eq,is:te.is}}var qt=V.immutable("left","right"),jt=function(n,e,t){var r=n.property().children(e);return P.findIndex(r,y.curry(n.eq,t)).map(function(n){return{before:y.constant(r.slice(0,n)),after:y.constant(r.slice(n+1))}})},_t=function(t,r,o){return jt(t,r,o).map(function(n){var e=t.create().clone(r);return t.insert().appendAll(e,n.before().concat([o])),t.insert().appendAll(r,n.after()),t.insert().before(r,e),qt(e,r)})},zt=function(t,r,n){return jt(t,r,n).map(function(n){var e=t.create().clone(r);return t.insert().appendAll(e,n.after()),t.insert().after(r,e),qt(r,e)})},Ht=function(i,n,u,a){var r=V.immutable("first","second","splits"),c=function(n,e,o){var t=r(n,x.none(),o);return u(n)?r(n,e,o):i.property().parent(n).bind(function(r){return a(i,r,n).map(function(n){var e=[{first:n.left,second:n.right}],t=u(r)?r:n.left();return c(t,x.some(n.right()),o.concat(e))}).getOr(t)})};return c(n,x.none(),[])},Ft=function(r,o,n,e){var t=o(r,n);return P.foldr(e,function(n,e){var t=o(r,e);return Ut(r,n,t)},t)},Ut=function(e,n,t){return n.bind(function(n){return t.filter(y.curry(e.eq,n))})},Vt=function(n,e,t){return 0<t.length?Ft(n,e,(r=t)[0],r.slice(1)):x.none();var r},Gt=function(n,e){return y.curry(n.eq,e)},Xt=function(e,n,t,r){var o=r!==undefined?r:y.constant(!1),i=[n].concat(e.up().all(n)),u=[t].concat(e.up().all(t)),a=function(e){return P.findIndex(e,o).fold(function(){return e},function(n){return e.slice(0,n+1)})},c=a(i),l=a(u),s=P.find(c,function(n){return P.exists(l,Gt(e,n))});return{firstpath:y.constant(c),secondpath:y.constant(l),shared:y.constant(s)}},Yt=function(e,n,t){var r=Xt(e,n,t);return r.shared().bind(function(n){return function(o,i,n,e){var u=o.property().children(i);if(o.eq(i,n[0]))return x.some([n[0]]);if(o.eq(i,e[0]))return x.some([e[0]]);var t=function(n){var e=P.reverse(n),t=P.findIndex(e,Gt(o,i)).getOr(-1),r=t<e.length-1?e[t+1]:e[t];return P.findIndex(u,Gt(o,r))},r=t(n),a=t(e);return r.bind(function(r){return a.map(function(n){var e=Math.min(r,n),t=Math.max(r,n);return u.slice(e,t+1)})})}(e,n,r.firstpath(),r.secondpath())})},Kt=Xt,$t=function(n,e,t){return Vt(n,e,t)},Jt=function(n,e,t){return Yt(n,e,t)},Qt=function(n,e,t,r){return Kt(n,e,t,r)},Zt=function(n,e,t){return _t(n,e,t)},nr=function(n,e,t){return zt(n,e,t)},er=function(n,e,t,r){return Ht(n,e,t,r)},tr=Lt(),rr={sharedOne:function(t,n){return $t(tr,function(n,e){return t(e)},n)},subset:function(n,e){return Jt(tr,n,e)},ancestors:function(n,e,t){return Qt(tr,n,e,t)},breakToLeft:function(n,e){return Zt(tr,n,e)},breakToRight:function(n,e){return nr(tr,n,e)},breakPath:function(n,e,r){return er(tr,n,e,function(n,e,t){return r(e,t)})}},or=function(n,e){return e.column()>=n.startCol()&&e.column()+e.colspan()-1<=n.finishCol()&&e.row()>=n.startRow()&&e.row()+e.rowspan()-1<=n.finishRow()},ir=function(n,e){var t=e.column(),r=e.column()+e.colspan()-1,o=e.row(),i=e.row()+e.rowspan()-1;return t<=n.finishCol()&&r>=n.startCol()&&o<=n.finishRow()&&i>=n.startRow()},ur=function(n,e){for(var t=!0,r=y.curry(or,e),o=e.startRow();o<=e.finishRow();o++)for(var i=e.startCol();i<=e.finishCol();i++)t=t&&Ze.getAt(n,o,i).exists(r);return t?x.some(e):x.none()},ar=function(n,e,t){var r=Ze.findItem(n,e,te.eq),o=Ze.findItem(n,t,te.eq);return r.bind(function(r){return o.map(function(n){return e=r,t=n,Q.bounds(Math.min(e.row(),t.row()),Math.min(e.column(),t.column()),Math.max(e.row()+e.rowspan()-1,t.row()+t.rowspan()-1),Math.max(e.column()+e.colspan()-1,t.column()+t.colspan()-1));var e,t})})},cr=ar,lr=function(e,n,t){return ar(e,n,t).bind(function(n){return ur(e,n)})},sr=function(r,n,o,i){return Ze.findItem(r,n,te.eq).bind(function(n){var e=0<o?n.row()+n.rowspan()-1:n.row(),t=0<i?n.column()+n.colspan()-1:n.column();return Ze.getAt(r,e+o,t+i).map(function(n){return n.element()})})},fr=function(t,n,e){return cr(t,n,e).map(function(n){var e=Ze.filterItems(t,y.curry(ir,n));return P.map(e,function(n){return n.element()})})},dr=function(n,e){return Ze.findItem(n,e,function(n,e){return te.contains(e,n)}).bind(function(n){return n.element()})},mr=function(n){var e=Ke(n);return Ze.generate(e)},gr=function(t,r,o){return Ye.table(t).bind(function(n){var e=mr(n);return sr(e,t,r,o)})},hr=function(n,e,t){var r=mr(n);return fr(r,e,t)},pr=function(n,e,t,r,o){var i=mr(n),u=te.eq(n,t)?e:dr(i,e),a=te.eq(n,o)?r:dr(i,r);return fr(i,u,a)},vr=function(n,e,t){var r=mr(n);return lr(r,e,t)},br=function(n,e){return He.ancestor(n,"table")},wr=V.immutableBag(["boxes","start","finish"],[]),yr=function(a,c,r){var l=function(e){return function(n){return r(n)||te.eq(n,e)}};return te.eq(a,c)?x.some(wr({boxes:x.some([a]),start:a,finish:c})):br(a).bind(function(u){return br(c).bind(function(i){if(te.eq(u,i))return x.some(wr({boxes:hr(u,a,c),start:a,finish:c}));if(te.contains(u,i)){var n=0<(e=Ne.ancestors(c,"td,th",l(u))).length?e[e.length-1]:c;return x.some(wr({boxes:pr(u,a,u,c,i),start:a,finish:n}))}if(te.contains(i,u)){var e,t=0<(e=Ne.ancestors(a,"td,th",l(i))).length?e[e.length-1]:a;return x.some(wr({boxes:pr(i,a,u,c,i),start:a,finish:t}))}return rr.ancestors(a,c).shared().bind(function(n){return He.closest(n,"table",r).bind(function(n){var e=Ne.ancestors(c,"td,th",l(n)),t=0<e.length?e[e.length-1]:c,r=Ne.ancestors(a,"td,th",l(n)),o=0<r.length?r[r.length-1]:a;return x.some(wr({boxes:pr(n,a,u,c,i),start:o,finish:t}))})})})})},xr=yr,Cr=function(n,e){var t=Ne.descendants(n,e);return 0<t.length?x.some(t):x.none()},Rr=function(n,e,t,r,o){return(i=n,u=o,P.find(i,function(n){return ln.is(n,u)})).bind(function(n){return gr(n,e,t).bind(function(n){return e=n,t=r,He.ancestor(e,"table").bind(function(n){return He.descendant(n,t).bind(function(n){return yr(n,e).bind(function(e){return e.boxes().map(function(n){return{boxes:y.constant(n),start:y.constant(e.start()),finish:y.constant(e.finish())}})})})});var e,t})});var i,u},Sr=function(n,e,r){return He.descendant(n,e).bind(function(t){return He.descendant(n,r).bind(function(e){return rr.sharedOne(br,[t,e]).map(function(n){return{first:y.constant(t),last:y.constant(e),table:y.constant(n)}})})})},Tr=function(n,e){return Cr(n,e)},Dr=function(o,n,e){return Sr(o,n,e).bind(function(t){var n=function(n){return te.eq(o,n)},e=He.ancestor(t.first(),"thead,tfoot,tbody,table",n),r=He.ancestor(t.last(),"thead,tfoot,tbody,table",n);return e.bind(function(e){return r.bind(function(n){return te.eq(e,n)?vr(t.table(),t.first(),t.last()):x.none()})})})},kr="data-mce-selected",Ar="data-mce-first-selected",Or="data-mce-last-selected",Nr={selected:y.constant(kr),selectedSelector:y.constant("td[data-mce-selected],th[data-mce-selected]"),attributeSelector:y.constant("[data-mce-selected]"),firstSelected:y.constant(Ar),firstSelectedSelector:y.constant("td[data-mce-first-selected],th[data-mce-first-selected]"),lastSelected:y.constant(Or),lastSelectedSelector:y.constant("td[data-mce-last-selected],th[data-mce-last-selected]")},Er=function(u){if(!p.isArray(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var a=[],t={};return P.each(u,function(n,r){var e=q.keys(n);if(1!==e.length)throw new Error("one and only one name per case");var o=e[0],i=n[o];if(t[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!p.isArray(i))throw new Error("case arguments must be an array");a.push(o),t[o]=function(){var n=arguments.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+n);for(var t=new Array(n),e=0;e<t.length;e++)t[e]=arguments[e];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[r].apply(null,t)},match:function(n){var e=q.keys(n);if(a.length!==e.length)throw new Error("Wrong number of arguments to match. Expected: "+a.join(",")+"\nActual: "+e.join(","));if(!P.forall(a,function(n){return P.contains(e,n)}))throw new Error("Not all branches were specified when using match. Specified: "+e.join(", ")+"\nRequired: "+a.join(", "));return n[o].apply(null,t)},log:function(n){console.log(n,{constructors:a,constructor:o,params:t})}}}}),t},Pr=Er([{none:[]},{multiple:["elements"]},{single:["selection"]}]),Br={cata:function(n,e,t,r){return n.fold(e,t,r)},none:Pr.none,multiple:Pr.multiple,single:Pr.single},Ir=function(n,e){return Br.cata(e.get(),y.constant([]),y.identity,y.constant([n]))},Wr=function(t,n){return Br.cata(n.get(),x.none,function(e,n){return 0===e.length?x.none():Dr(t,Nr.firstSelectedSelector(),Nr.lastSelectedSelector()).bind(function(n){return 1<e.length?x.some({bounds:y.constant(n),cells:y.constant(e)}):x.none()})},x.none)},Mr=function(n,e){var t=Ir(n,e);return 0<t.length&&P.forall(t,function(n){return Se.has(n,"rowspan")&&1<parseInt(Se.get(n,"rowspan"),10)||Se.has(n,"colspan")&&1<parseInt(Se.get(n,"colspan"),10)})?x.some(t):x.none()},Lr=Ir,qr=function(n){return{element:y.constant(n),mergable:x.none,unmergable:x.none,selection:y.constant([n])}},jr=V.immutable("element","clipboard","generators"),_r={noMenu:qr,forMenu:function(n,e,t){return{element:y.constant(t),mergable:y.constant(Wr(e,n)),unmergable:y.constant(Mr(t,n)),selection:y.constant(Lr(t,n))}},notCell:function(n){return qr(n)},paste:jr,pasteRows:function(n,e,t,r,o){return{element:y.constant(t),mergable:x.none,unmergable:x.none,selection:y.constant(Lr(t,n)),clipboard:y.constant(r),generators:y.constant(o)}}},zr=function(a,n,c,l){a.on("BeforeGetContent",function(t){!0===t.selection&&Br.cata(n.get(),y.noop,function(n){var e;t.preventDefault(),(e=n,Ye.table(e[0]).map(wt).map(function(n){return[gt(n,Nr.attributeSelector())]})).each(function(n){t.content=P.map(n,function(n){return e=n,a.selection.serializer.serialize(e.dom(),{});var e}).join("")})},y.noop)}),a.on("BeforeSetContent",function(u){!0===u.selection&&!0===u.paste&&x.from(a.dom.getParent(a.selection.getStart(),"th,td")).each(function(n){var i=nn.fromDom(n);Ye.table(i).bind(function(e){var n=P.filter(Wt(u.content),function(n){return"meta"!==we.name(n)});if(1===n.length&&"table"===we.name(n[0])){u.preventDefault();var t=nn.fromDom(a.getDoc()),r=It(t),o=_r.paste(i,n[0],r);c.pasteCells(e,o).each(function(n){a.selection.setRng(n),a.focus(),l.clear(e)})}})})})};function Hr(r,o){var n=function(n){var e=o(n);if(e<=0||null===e){var t=ut.get(n,r);return parseFloat(t)||0}return e},i=function(o,n){return P.foldl(n,function(n,e){var t=ut.get(o,e),r=t===undefined?0:parseInt(t,10);return isNaN(r)?n:n+r},0)};return{set:function(n,e){if(!p.isNumber(e)&&!e.match(/^[0-9]+$/))throw r+".set accepts only positive integer values. Value was "+e;var t=n.dom();nt(t)&&(t.style[r]=e+"px")},get:n,getOuter:n,aggregate:i,max:function(n,e,t){var r=i(n,t);return r<e?e-r:0}}}var Fr=Hr("height",function(n){return ke.inBody(n)?n.dom().getBoundingClientRect().height:n.dom().offsetHeight}),Ur=function(n){return Fr.get(n)},Vr=function(n){return Fr.getOuter(n)},Gr=Hr("width",function(n){return n.dom().offsetWidth}),Xr=function(n){return Gr.get(n)},Yr=function(n){return Gr.getOuter(n)},Kr=Zn.detect(),$r=function(n,e,t){return r=ut.get(n,e),o=t,i=parseFloat(r),isNaN(i)?o:i;var r,o,i},Jr=function(n){return Kr.browser.isIE()||Kr.browser.isEdge()?(t=$r(e=n,"padding-top",0),r=$r(e,"padding-bottom",0),o=$r(e,"border-top-width",0),i=$r(e,"border-bottom-width",0),u=e.dom().getBoundingClientRect().height,"border-box"===ut.get(e,"box-sizing")?u:u-t-r-(o+i)):$r(n,"height",Ur(n));var e,t,r,o,i,u},Qr=/(\d+(\.\d+)?)(\w|%)*/,Zr=/(\d+(\.\d+)?)%/,no=/(\d+(\.\d+)?)px|em/,eo=function(n,e){ut.set(n,"height",e+"px")},to=function(n,e,t,r){var o,i,u,a,c,l=parseInt(n,10);return Gn.endsWith(n,"%")&&"table"!==we.name(e)?(o=e,i=l,u=t,a=r,c=Ye.table(o).map(function(n){var e=u(n);return Math.floor(i/100*e)}).getOr(i),a(o,c),c):l},ro=function(n){var e,t=(e=n,ut.getRaw(e,"height").getOrThunk(function(){return Jr(e)+"px"}));return t?to(t,n,Ur,eo):Ur(n)},oo=function(n,e){return Se.has(n,e)?parseInt(Se.get(n,e),10):1},io=function(n){return ut.getRaw(n,"width").fold(function(){return x.from(Se.get(n,"width"))},function(n){return x.some(n)})},uo=function(n,e){return n/e.pixelWidth()*100},ao={percentageBasedSizeRegex:y.constant(Zr),pixelBasedSizeRegex:y.constant(no),setPixelWidth:function(n,e){ut.set(n,"width",e+"px")},setPercentageWidth:function(n,e){ut.set(n,"width",e+"%")},setHeight:eo,getPixelWidth:function(e,t){return io(e).fold(function(){var n=Xr(e);return parseInt(n,10)},function(n){return function(n,e,t){if(no.test(e)){var r=no.exec(e);return parseInt(r[1],10)}if(Zr.test(e)){var o=Zr.exec(e),i=parseFloat(o[1]);return i/100*t.pixelWidth()}var u=Xr(n);return parseInt(u,10)}(e,n,t)})},getPercentageWidth:function(t,r){return io(t).fold(function(){var n=Xr(t),e=parseInt(n,10);return uo(e,r)},function(n){return function(n,e,t){if(Zr.test(e)){var r=Zr.exec(e);return parseFloat(r[1])}var o=Xr(n),i=parseInt(o,10);return uo(i,t)}(t,n,r)})},getGenericWidth:function(n){return io(n).bind(function(n){if(Qr.test(n)){var e=Qr.exec(n);return x.some({width:y.constant(e[1]),unit:y.constant(e[3])})}return x.none()})},setGenericWidth:function(n,e,t){ut.set(n,"width",e+t)},getHeight:function(n){return t="rowspan",ro(e=n)/oo(e,t);var e,t},getRawWidth:io},co=function(t,r){ao.getGenericWidth(t).each(function(n){var e=n.width()/2;ao.setGenericWidth(t,e,n.unit()),ao.setGenericWidth(r,e,n.unit())})},lo=function(n,e){var t=e||nn.fromDom(document.documentElement);return _e.ancestor(n,y.curry(te.eq,t)).isSome()},so=function(n){var e=n.dom();return e===e.window?n:we.isDocument(n)?e.defaultView||e.parentWindow:null},fo=function(t,r){return{left:y.constant(t),top:y.constant(r),translate:function(n,e){return fo(t+n,r+e)}}},mo=function(n,e){return n!==undefined?n:e!==undefined?e:0},go=function(n){var e,t=n.dom(),r=t.ownerDocument,o=r.body,i=nn.fromDom(r.documentElement);return o===t?fo(o.offsetLeft,o.offsetTop):lo(n,i)?(e=t.getBoundingClientRect(),fo(e.left,e.top)):fo(0,0)},ho=function(n){var e=n.dom().ownerDocument,t=e.body,r=so(nn.fromDom(e)),o=e.documentElement,i=mo(r.pageYOffset,o.scrollTop),u=mo(r.pageXOffset,o.scrollLeft),a=mo(o.clientTop,t.clientTop),c=mo(o.clientLeft,t.clientLeft);return go(n).translate(u-c,i-a)},po=V.immutable("row","y"),vo=V.immutable("col","x"),bo=function(n){return ho(n).left()+Yr(n)},wo=function(n){return ho(n).left()},yo=function(n,e){return vo(n,wo(e))},xo=function(n,e){return vo(n,bo(e))},Co=function(n){return ho(n).top()},Ro=function(t,e,r){if(0===r.length)return[];var n=P.map(r.slice(1),function(n,e){return n.map(function(n){return t(e,n)})}),o=r[r.length-1].map(function(n){return e(r.length-1,n)});return n.concat([o])},So={delta:y.identity,positions:y.curry(Ro,function(n,e){return po(n,Co(e))},function(n,e){return po(n,Co(e)+Vr(e))}),edge:Co},To={delta:y.identity,edge:wo,positions:y.curry(Ro,yo,xo)},Do={height:So,rtl:{delta:function(n,e){return-n},edge:bo,positions:y.curry(Ro,xo,yo)},ltr:To},ko={ltr:Do.ltr,rtl:Do.rtl};function Ao(e){var t=function(n){return e(n).isRtl()?ko.rtl:ko.ltr};return{delta:function(n,e){return t(e).delta(n,e)},edge:function(n){return t(n).edge(n)},positions:function(n,e){return t(e).positions(n,e)}}}var Oo=function(n){var e=Ke(n);return Ze.generate(e).grid()},No=function(n){var e=n,t=function(){return e};return{get:t,set:function(n){e=n},clone:function(){return No(t())}}},Eo=function(n,e){return Po(n,e,{validate:p.isFunction,label:"function"})},Po=function(r,o,i){if(0===o.length)throw new Error("You must specify at least one required field.");return H("required",o),U(o),function(e){var t=q.keys(e);P.forall(o,function(n){return P.contains(t,n)})||_(o,t),r(o,t);var n=P.filter(o,function(n){return!i.validate(e[n],n)});return 0<n.length&&F(n,i.label),e}},Bo=y.noop,Io={exactly:y.curry(Eo,function(e,n){var t=P.filter(n,function(n){return!P.contains(e,n)});0<t.length&&z(t)}),ensure:y.curry(Eo,Bo),ensureWith:y.curry(Po,Bo)},Wo=function(n){var e=Se.has(n,"colspan")?parseInt(Se.get(n,"colspan"),10):1,t=Se.has(n,"rowspan")?parseInt(Se.get(n,"rowspan"),10):1;return{element:y.constant(n),colspan:y.constant(e),rowspan:y.constant(t)}},Mo=Io.exactly(["cell","row","replace","gap"]),Lo=function(r,n){Mo(r);var t=No(x.none()),o=n!==undefined?n:Wo,i=function(n){var e,t=o(n);return e=t,r.cell(e)},u=function(n){var e=i(n);return t.get().isNone()&&t.set(x.some(e)),a=x.some({item:n,replacement:e}),e},a=x.none();return{getOrInit:function(e,t){return a.fold(function(){return u(e)},function(n){return t(e,n.item)?n.replacement:u(e)})},cursor:t.get}},qo=function(o,a){return function(t){var r=No(x.none());Mo(t);var i=[],u=function(n){var e=t.replace(n,a,{scope:o});return i.push({item:n,sub:e}),r.get().isNone()&&r.set(x.some(e)),e};return{replaceOrInit:function(e,t){return(r=e,o=t,P.find(i,function(n){return o(n.item,r)})).fold(function(){return u(e)},function(n){return t(e,n.item)?n.sub:u(e)});var r,o},cursor:r.get}}},jo=function(t){Mo(t);var n=No(x.none());return{combine:function(e){return n.get().isNone()&&n.set(x.some(e)),function(){var n=t.cell({element:y.constant(e),colspan:y.constant(1),rowspan:y.constant(1)});return ut.remove(n,"width"),ut.remove(e,"width"),n}},cursor:n.get}},_o=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],zo=function(n,e){var t=n.property().name(e);return P.contains(_o,t)},Ho=function(n,e){return P.contains(["br","img","hr","input"],n.property().name(e))},Fo=zo,Uo=function(n,e){var t=n.property().name(e);return P.contains(["ol","ul"],t)},Vo=Ho,Go=Lt(),Xo=function(n){return Fo(Go,n)},Yo=function(n){return Uo(Go,n)},Ko=function(n){return Vo(Go,n)},$o=function(n){var e,i=function(n){return"br"===we.name(n)},r=function(o){return At.last(o).bind(function(t){var n,r=(n=t,se.nextSibling(n).map(function(n){return!!Xo(n)||(Ko(n)?"img"!==we.name(n):void 0)}).getOr(!1));return se.parent(t).map(function(n){return!0===r||(e=n,"li"===we.name(e)||_e.ancestor(e,Yo).isSome())||i(t)||Xo(n)&&!te.eq(o,n)?[]:[nn.fromTag("br")];var e})}).getOr([])},t=0===(e=P.bind(n,function(n){var e,t=se.children(n);return e=t,P.forall(e,function(n){return i(n)||we.isText(n)&&0===Ct.get(n).trim().length})?[]:t.concat(r(n))})).length?[nn.fromTag("br")]:e;dt.empty(n[0]),st.append(n[0],t)},Jo=function(u){return function(){for(var n=new Array(arguments.length),e=0;e<n.length;e++)n[e]=arguments[e];if(0===n.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<n.length;r++){var o=n[r];for(var i in o)o.hasOwnProperty(i)&&(t[i]=u(t[i],o[i]))}return t}},Qo=Jo(function(n,e){return p.isObject(n)&&p.isObject(e)?Qo(n,e):e}),Zo=Jo(function(n,e){return e}),ni={deepMerge:Qo,merge:Zo},ei=function(n){for(var e=[],t=function(n){e.push(n)},r=0;r<n.length;r++)n[r].each(t);return e},ti=function(n,e){for(var t=0;t<n.length;t++){var r=e(n[t],t);if(r.isSome())return r}return x.none()},ri=function(n,e){return Q.rowcells(e,n.section())},oi=function(n,e){return n.cells()[e]},ii={addCell:function(n,e,t){var r=n.cells(),o=r.slice(0,e),i=r.slice(e),u=o.concat([t]).concat(i);return ri(n,u)},setCells:ri,mutateCell:function(n,e,t){n.cells()[e]=t},getCell:oi,getCellElement:function(n,e){return oi(n,e).element()},mapCells:function(n,e){var t=n.cells(),r=P.map(t,e);return Q.rowcells(r,n.section())},cellLength:function(n){return n.cells().length}},ui=function(n,e){if(0===n.length)return 0;var t=n[0];return P.findIndex(n,function(n){return!e(t.element(),n.element())}).fold(function(){return n.length},function(n){return n})},ai=function(n,e,t,r){var o,i,u,a,c=(o=n,i=e,o[i]).cells().slice(t),l=ui(c,r),s=(u=n,a=t,P.map(u,function(n){return ii.getCell(n,a)})).slice(e),f=ui(s,r);return{colspan:y.constant(l),rowspan:y.constant(f)}},ci=function(o,i){var u=P.map(o,function(n,e){return P.map(n.cells(),function(n,e){return!1})});return P.map(o,function(n,r){var e=P.bind(n.cells(),function(n,e){if(!1===u[r][e]){var t=ai(o,r,e,i);return function(n,e,t,r){for(var o=n;o<n+t;o++)for(var i=e;i<e+r;i++)u[o][i]=!0}(r,e,t.rowspan(),t.colspan()),[Q.detailnew(n.element(),t.rowspan(),t.colspan(),n.isNew())]}return[]});return Q.rowdetails(e,n.section())})},li=function(n,e,t){for(var r=[],o=0;o<n.grid().rows();o++){for(var i=[],u=0;u<n.grid().columns();u++){var a=Ze.getAt(n,o,u).map(function(n){return Q.elementnew(n.element(),t)}).getOrThunk(function(){return Q.elementnew(e.gap(),!0)});i.push(a)}var c=Q.rowcells(i,n.all()[o].section());r.push(c)}return r},si=function(n,e,t,r){t===r?Se.remove(n,e):Se.set(n,e,t)},fi=function(o,n){var i=[],u=[],e=function(n,e){var t;0<n.length?function(n,e){var t=He.child(o,e).getOrThunk(function(){var n=nn.fromTag(e,se.owner(o).dom());return lt.append(o,n),n});dt.empty(t);var r=P.map(n,function(n){n.isNew()&&i.push(n.element());var e=n.element();return dt.empty(e),P.each(n.cells(),function(n){n.isNew()&&u.push(n.element()),si(n.element(),"colspan",n.colspan(),1),si(n.element(),"rowspan",n.rowspan(),1),lt.append(e,n.element())}),e});st.append(t,r)}(n,e):(t=e,He.child(o,t).bind(dt.remove))},t=[],r=[],a=[];return P.each(n,function(n){switch(n.section()){case"thead":t.push(n);break;case"tbody":r.push(n);break;case"tfoot":a.push(n)}}),e(t,"thead"),e(r,"tbody"),e(a,"tfoot"),{newRows:y.constant(i),newCells:y.constant(u)}},di=function(n){return P.map(n,function(n){var t=bt(n.element());return P.each(n.cells(),function(n){var e=wt(n.element());si(e,"colspan",n.colspan(),1),si(e,"rowspan",n.rowspan(),1),lt.append(t,e)}),t})},mi=function(n,e){for(var t=[],r=0;r<n;r++)t.push(e(r));return t},gi=function(n,e){for(var t=[],r=n;r<e;r++)t.push(r);return t},hi=function(e,t){if(t<0||t>=e.length-1)return x.none();var n=e[t].fold(function(){var n=P.reverse(e.slice(0,t));return ti(n,function(n,e){return n.map(function(n){return{value:n,delta:e+1}})})},function(n){return x.some({value:n,delta:0})}),r=e[t+1].fold(function(){var n=e.slice(t+1);return ti(n,function(n,e){return n.map(function(n){return{value:n,delta:e+1}})})},function(n){return x.some({value:n,delta:1})});return n.bind(function(t){return r.map(function(n){var e=n.delta+t.delta;return Math.abs(n.value-t.value)/e})})},pi=function(n,e,t){var r=n();return P.find(r,e).orThunk(function(){return x.from(r[0]).orThunk(t)}).map(function(n){return n.element()})},vi=function(t){var n=t.grid(),e=gi(0,n.columns()),r=gi(0,n.rows());return P.map(e,function(e){return pi(function(){return P.bind(r,function(n){return Ze.getAt(t,n,e).filter(function(n){return n.column()===e}).fold(y.constant([]),function(n){return[n]})})},function(n){return 1===n.colspan()},function(){return Ze.getAt(t,0,e)})})},bi=function(t){var n=t.grid(),e=gi(0,n.rows()),r=gi(0,n.columns());return P.map(e,function(e){return pi(function(){return P.bind(r,function(n){return Ze.getAt(t,e,n).filter(function(n){return n.row()===e}).fold(y.constant([]),function(n){return[n]})})},function(n){return 1===n.rowspan()},function(){return Ze.getAt(t,e,0)})})},wi=function(n,e,t,r,o){var i=nn.fromTag("div");return ut.setAll(i,{position:"absolute",left:e-r/2+"px",top:t+"px",height:o+"px",width:r+"px"}),Se.setAll(i,{"data-column":n,role:"presentation"}),i},yi=function(n,e,t,r,o){var i=nn.fromTag("div");return ut.setAll(i,{position:"absolute",left:e+"px",top:t-o/2+"px",height:o+"px",width:r+"px"}),Se.setAll(i,{"data-row":n,role:"presentation"}),i},xi=function(n){var e=n.replace(/\./g,"-");return{resolve:function(n){return e+"-"+n}}},Ci={resolve:xi("ephox-snooker").resolve},Ri=function(n,e){var t=Se.get(n,e);return t===undefined||""===t?[]:t.split(" ")},Si=Ri,Ti=function(n,e,t){var r=Ri(n,e).concat([t]);Se.set(n,e,r.join(" "))},Di=function(n,e,t){var r=P.filter(Ri(n,e),function(n){return n!==t});0<r.length?Se.set(n,e,r.join(" ")):Se.remove(n,e)},ki=function(n){return Si(n,"class")},Ai=function(n,e){return Ti(n,"class",e)},Oi=function(n,e){return Di(n,"class",e)},Ni=ki,Ei=Ai,Pi=Oi,Bi=function(n,e){P.contains(ki(n),e)?Oi(n,e):Ai(n,e)},Ii=function(n){return n.dom().classList!==undefined},Wi=function(n,e){return Ii(n)&&n.dom().classList.contains(e)},Mi={add:function(n,e){Ii(n)?n.dom().classList.add(e):Ei(n,e)},remove:function(n,e){var t;Ii(n)?n.dom().classList.remove(e):Pi(n,e),0===(Ii(t=n)?t.dom().classList:Ni(t)).length&&Se.remove(t,"class")},toggle:function(n,e){return Ii(n)?n.dom().classList.toggle(e):Bi(n,e)},toggler:function(n,e){var t,r,o,i,u,a,c=Ii(n),l=n.dom().classList;return t=function(){c?l.remove(e):Pi(n,e)},r=function(){c?l.add(e):Ei(n,e)},o=Wi(n,e),i=o||!1,{on:u=function(){r(),i=!0},off:a=function(){t(),i=!1},toggle:function(){(i?a:u)()},isOn:function(){return i}}},has:Wi},Li=Ci.resolve("resizer-bar"),qi=Ci.resolve("resizer-rows"),ji=Ci.resolve("resizer-cols"),_i=function(n){var e=Ne.descendants(n.parent(),"."+Li);P.each(e,dt.remove)},zi=function(t,n,r){var o=t.origin();P.each(n,function(n,e){n.each(function(n){var e=r(o,n);Mi.add(e,Li),lt.append(t.parent(),e)})})},Hi=function(n,e,t,r,o,i){var u,a,c,l,s=ho(e),f=0<t.length?o.positions(t,e):[];u=n,a=f,c=s,l=Yr(e),zi(u,a,function(n,e){var t=yi(e.row(),c.left()-n.left(),e.y()-n.top(),l,7);return Mi.add(t,qi),t});var d,m,g,h,p=0<r.length?i.positions(r,e):[];d=n,m=p,g=s,h=Vr(e),zi(d,m,function(n,e){var t=wi(e.col(),e.x()-n.left(),g.top()-n.top(),7,h);return Mi.add(t,ji),t})},Fi=function(n,e){var t=Ne.descendants(n.parent(),"."+Li);P.each(t,e)},Ui={refresh:function(n,e,t,r){_i(n);var o=Ke(e),i=Ze.generate(o),u=bi(i),a=vi(i);Hi(n,e,u,a,t,r)},hide:function(n){Fi(n,function(n){ut.set(n,"display","none")})},show:function(n){Fi(n,function(n){ut.set(n,"display","block")})},destroy:_i,isRowBar:function(n){return Mi.has(n,qi)},isColBar:function(n){return Mi.has(n,ji)}},Vi=function(n,r){return P.map(n,function(n){var e,t=(e=n.details(),ti(e,function(n){return se.parent(n.element()).map(function(n){var e=se.parent(n).isNone();return Q.elementnew(n,e)})}).getOrThunk(function(){return Q.elementnew(r.row(),!0)}));return Q.rowdatanew(t.element(),n.details(),n.section(),t.isNew())})},Gi=function(n,e){var t=ci(n,te.eq);return Vi(t,e)},Xi=function(n,e){var t=P.flatten(P.map(n.all(),function(n){return n.cells()}));return P.find(t,function(n){return te.eq(e,n.element())})},Yi=function(a,c,l,s,f){return function(t,r,n,o,i){var e=Ke(r),u=Ze.generate(e);return c(u,n).map(function(n){var e=li(u,o,!1),t=a(e,n,te.eq,f(o)),r=Gi(t.grid(),o);return{grid:y.constant(r),cursor:t.cursor}}).fold(function(){return x.none()},function(n){var e=fi(r,n.grid());return l(r,n.grid(),i),s(r),Ui.refresh(t,r,Do.height,i),x.some({cursor:n.cursor,newRows:e.newRows,newCells:e.newCells})})}},Ki=Gi,$i=function(e,n){return Ye.cell(n.element()).bind(function(n){return Xi(e,n)})},Ji=function(e,n){var t=P.map(n.selection(),function(n){return Ye.cell(n).bind(function(n){return Xi(e,n)})}),r=ei(t);return 0<r.length?x.some(r):x.none()},Qi=function(e,t){return Ye.cell(t.element()).bind(function(n){return Xi(e,n).map(function(n){return ni.merge(n,{generators:t.generators,clipboard:t.clipboard})})})},Zi=function(e,n){var t=P.map(n.selection(),function(n){return Ye.cell(n).bind(function(n){return Xi(e,n)})}),r=ei(t);return 0<r.length?x.some(ni.merge({cells:r},{generators:n.generators,clipboard:n.clipboard})):x.none()},nu=function(n,e){return e.mergable()},eu=function(n,e){return e.unmergable()},tu=function(t){return{is:function(n){return t===n},isValue:y.always,isError:y.never,getOr:y.constant(t),getOrThunk:y.constant(t),getOrDie:y.constant(t),or:function(n){return tu(t)},orThunk:function(n){return tu(t)},fold:function(n,e){return e(t)},map:function(n){return tu(n(t))},each:function(n){n(t)},bind:function(n){return n(t)},exists:function(n){return n(t)},forall:function(n){return n(t)},toOption:function(){return x.some(t)}}},ru=function(t){return{is:y.never,isValue:y.never,isError:y.always,getOr:y.identity,getOrThunk:function(n){return n()},getOrDie:function(){return y.die(String(t))()},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,e){return n(t)},map:function(n){return ru(t)},each:y.noop,bind:function(n){return ru(t)},exists:y.never,forall:y.always,toOption:x.none}},ou={value:tu,error:ru},iu=function(n,e){return P.map(n,function(){return Q.elementnew(e.cell(),!0)})},uu=function(e,n,t){return e.concat(mi(n,function(n){return ii.setCells(e[e.length-1],iu(e[e.length-1].cells(),t))}))},au=function(n,e,t){return P.map(n,function(n){return ii.setCells(n,n.cells().concat(iu(gi(0,e),t)))})},cu=function(n,e,t){if(n.row()>=e.length||n.column()>ii.cellLength(e[0]))return ou.error("invalid start address out of table bounds, row: "+n.row()+", column: "+n.column());var r=e.slice(n.row()),o=r[0].cells().slice(n.column()),i=ii.cellLength(t[0]),u=t.length;return ou.value({rowDelta:y.constant(r.length-u),colDelta:y.constant(o.length-i)})},lu=function(n,e){var t=ii.cellLength(n[0]),r=ii.cellLength(e[0]);return{rowDelta:y.constant(0),colDelta:y.constant(t-r)}},su=function(n,e,t){var r=e.colDelta()<0?au:y.identity;return(e.rowDelta()<0?uu:y.identity)(r(n,Math.abs(e.colDelta()),t),Math.abs(e.rowDelta()),t)},fu=function(n,e,t,r){if(0===n.length)return n;for(var o=e.startRow();o<=e.finishRow();o++)for(var i=e.startCol();i<=e.finishCol();i++)ii.mutateCell(n[o],i,Q.elementnew(r(),!1));return n},du=function(n,e,t,r){for(var o=!0,i=0;i<n.length;i++)for(var u=0;u<ii.cellLength(n[0]);u++){var a=t(ii.getCellElement(n[i],u),e);!0===a&&!1===o?ii.mutateCell(n[i],u,Q.elementnew(r(),!0)):!0===a&&(o=!1)}return n},mu=function(i,u,a,c){if(0<u&&u<i.length){var n=i[u-1].cells(),e=(t=n,r=a,P.foldl(t,function(n,e){return P.exists(n,function(n){return r(n.element(),e.element())})?n:n.concat([e])},[]));P.each(e,function(n){for(var e=x.none(),t=u;t<i.length;t++)for(var r=0;r<ii.cellLength(i[0]);r++){var o=i[t].cells()[r];a(o.element(),n.element())&&(e.isNone()&&(e=x.some(c())),e.each(function(n){ii.mutateCell(i[t],r,Q.elementnew(n,!0))}))}})}var t,r;return i},gu=function(t,r,o,i,u){return cu(t,r,o).map(function(n){var e=su(r,n,i);return function(n,e,t,r,o){for(var i,u,a,c,l,s,f,d=n.row(),m=n.column(),g=d+t.length,h=m+ii.cellLength(t[0]),p=d;p<g;p++)for(var v=m;v<h;v++){i=e,u=p,a=v,c=o,s=l=void 0,l=ii.getCell(i[u],a),s=y.curry(c,l.element()),f=i[u],1<i.length&&1<ii.cellLength(f)&&(0<a&&s(ii.getCellElement(f,a-1))||a<f.length-1&&s(ii.getCellElement(f,a+1))||0<u&&s(ii.getCellElement(i[u-1],a))||u<i.length-1&&s(ii.getCellElement(i[u+1],a)))&&du(e,ii.getCellElement(e[p],v),o,r.cell);var b=ii.getCellElement(t[p-d],v-m),w=r.replace(b);ii.mutateCell(e[p],v,Q.elementnew(w,!0))}return e}(t,e,o,i,u)})},hu=function(n,e,t,r,o){mu(e,n,o,r.cell);var i=lu(t,e),u=su(t,i,r),a=lu(e,u),c=su(e,a,r);return c.slice(0,n).concat(u).concat(c.slice(n,c.length))},pu=function(t,r,n,o,i){var e=t.slice(0,r),u=t.slice(r),a=ii.mapCells(t[n],function(n,e){return 0<r&&r<t.length&&o(ii.getCellElement(t[r-1],e),ii.getCellElement(t[r],e))?ii.getCell(t[r],e):Q.elementnew(i(n.element(),o),!0)});return e.concat([a]).concat(u)},vu=function(n,t,r,o,i){return P.map(n,function(n){var e=0<t&&t<ii.cellLength(n)&&o(ii.getCellElement(n,t-1),ii.getCellElement(n,t))?ii.getCell(n,t):Q.elementnew(i(ii.getCellElement(n,r),o),!0);return ii.addCell(n,t,e)})},bu=function(n,r,o,i,u){var a=o+1;return P.map(n,function(n,e){var t=e===r?Q.elementnew(u(ii.getCellElement(n,o),i),!0):ii.getCell(n,o);return ii.addCell(n,a,t)})},wu=function(n,e,t,r,o){var i=e+1,u=n.slice(0,i),a=n.slice(i),c=ii.mapCells(n[e],function(n,e){return e===t?Q.elementnew(o(n.element(),r),!0):n});return u.concat([c]).concat(a)},yu=function(n,e,t){return n.slice(0,e).concat(n.slice(t+1))},xu=function(n,t,r){var e=P.map(n,function(n){var e=n.cells().slice(0,t).concat(n.cells().slice(r+1));return Q.rowcells(e,n.section())});return P.filter(e,function(n){return 0<n.cells().length})},Cu=function(n,t,r,o){return P.map(n,function(n){return ii.mapCells(n,function(n){return e=n,P.exists(t,function(n){return r(e.element(),n.element())})?Q.elementnew(o(n.element(),r),!0):n;var e})})},Ru=function(n,e,t,r){return ii.getCellElement(n[e],t)!==undefined&&0<e&&r(ii.getCellElement(n[e-1],t),ii.getCellElement(n[e],t))},Su=function(n,e,t){return 0<e&&t(ii.getCellElement(n,e-1),ii.getCellElement(n,e))},Tu=function(t,r,o,n){var e=P.bind(t,function(n,e){return Ru(t,e,r,o)||Su(n,r,o)?[]:[ii.getCell(n,r)]});return Cu(t,e,o,n)},Du=function(t,r,o,n){var i=t[r],e=P.bind(i.cells(),function(n,e){return Ru(t,r,e,o)||Su(i,e,o)?[]:[n]});return Cu(t,e,o,n)},ku=function(n){return{fold:n}},Au=function(){return ku(function(n,e,t,r,o){return n()})},Ou=function(i){return ku(function(n,e,t,r,o){return e(i)})},Nu=function(i,u){return ku(function(n,e,t,r,o){return t(i,u)})},Eu=function(i,u,a){return ku(function(n,e,t,r,o){return r(i,u,a)})},Pu=function(i,u){return ku(function(n,e,t,r,o){return o(i,u)})},Bu=function(n,e,i,u){var t,r,a=n.slice(0),o=(r=e,0===(t=n).length?Au():1===t.length?Ou(0):0===r?Nu(0,1):r===t.length-1?Pu(r-1,r):0<r&&r<t.length-1?Eu(r-1,r,r+1):Au()),c=function(n){return P.map(n,y.constant(0))},l=y.constant(c(a)),s=function(n,e){if(0<=i){var t=Math.max(u.minCellWidth(),a[e]-i);return c(a.slice(0,n)).concat([i,t-a[e]]).concat(c(a.slice(e+1)))}var r=Math.max(u.minCellWidth(),a[n]+i),o=a[n]-r;return c(a.slice(0,n)).concat([r-a[n],o]).concat(c(a.slice(e+1)))},f=s;return o.fold(l,function(n){return u.singleColumnWidth(a[n],i)},f,function(n,e,t){return s(e,t)},function(n,e){if(0<=i)return c(a.slice(0,e)).concat([i]);var t=Math.max(u.minCellWidth(),a[e]+i);return c(a.slice(0,e)).concat([t-a[e]])})},Iu=function(n,e){return Se.has(n,e)&&1<parseInt(Se.get(n,e),10)},Wu={hasColspan:function(n){return Iu(n,"colspan")},hasRowspan:function(n){return Iu(n,"rowspan")},minWidth:y.constant(10),minHeight:y.constant(10),getInt:function(n,e){return parseInt(ut.get(n,e),10)}},Mu=function(n,e,t){return ut.getRaw(n,e).fold(function(){return t(n)+"px"},function(n){return n})},Lu=function(n){return Mu(n,"width",ao.getPixelWidth)},qu=function(n){return Mu(n,"height",ao.getHeight)},ju=function(n,e,t,r,o){var i=vi(n),u=P.map(i,function(n){return n.map(e.edge)});return P.map(i,function(n,e){return n.filter(y.not(Wu.hasColspan)).fold(function(){var n=hi(u,e);return r(n)},function(n){return t(n,o)})})},_u=function(n){return n.map(function(n){return n+"px"}).getOr("")},zu=function(n,e,t,r){var o=bi(n),i=P.map(o,function(n){return n.map(e.edge)});return P.map(o,function(n,e){return n.filter(y.not(Wu.hasRowspan)).fold(function(){var n=hi(i,e);return r(n)},function(n){return t(n)})})},Hu={getRawWidths:function(n,e){return ju(n,e,Lu,_u)},getPixelWidths:function(n,e,t){return ju(n,e,ao.getPixelWidth,function(n){return n.getOrThunk(t.minCellWidth)},t)},getPercentageWidths:function(n,e,t){return ju(n,e,ao.getPercentageWidth,function(n){return n.fold(function(){return t.minCellWidth()},function(n){return n/t.pixelWidth()*100})},t)},getPixelHeights:function(n,e){return zu(n,e,ao.getHeight,function(n){return n.getOrThunk(Wu.minHeight)})},getRawHeights:function(n,e){return zu(n,e,qu,_u)}},Fu=function(n,e,t){for(var r=0,o=n;o<e;o++)r+=t[o]!==undefined?t[o]:0;return r},Uu=function(n,t){var e=Ze.justCells(n);return P.map(e,function(n){var e=Fu(n.column(),n.column()+n.colspan(),t);return{element:n.element,width:y.constant(e),colspan:n.colspan}})},Vu=function(n,t){var e=Ze.justCells(n);return P.map(e,function(n){var e=Fu(n.row(),n.row()+n.rowspan(),t);return{element:n.element,height:y.constant(e),rowspan:n.rowspan}})},Gu=function(n,t){return P.map(n.all(),function(n,e){return{element:n.element,height:y.constant(t[e])}})},Xu=function(n){var e=parseInt(n,10),t=y.identity;return{width:y.constant(e),pixelWidth:y.constant(e),getWidths:Hu.getPixelWidths,getCellDelta:t,singleColumnWidth:function(n,e){return[Math.max(Wu.minWidth(),n+e)-n]},minCellWidth:Wu.minWidth,setElementWidth:ao.setPixelWidth,setTableWidth:function(n,e,t){var r=P.foldr(e,function(n,e){return n+e},0);ao.setPixelWidth(n,r)}}},Yu=function(n,e){if(ao.percentageBasedSizeRegex().test(e)){var t=ao.percentageBasedSizeRegex().exec(e);return o=t[1],i=n,u=parseFloat(o),a=Xr(i),{width:y.constant(u),pixelWidth:y.constant(a),getWidths:Hu.getPercentageWidths,getCellDelta:function(n){return n/a*100},singleColumnWidth:function(n,e){return[100-n]},minCellWidth:function(){return Wu.minWidth()/a*100},setElementWidth:ao.setPercentageWidth,setTableWidth:function(n,e,t){var r=u+t;ao.setPercentageWidth(n,r)}}}if(ao.pixelBasedSizeRegex().test(e)){var r=ao.pixelBasedSizeRegex().exec(e);return Xu(r[1])}var o,i,u,a,c=Xr(n);return Xu(c)},Ku=function(e){return ao.getRawWidth(e).fold(function(){var n=Xr(e);return Xu(n)},function(n){return Yu(e,n)})},$u=function(n){return Ze.generate(n)},Ju=function(n){var e=Ke(n);return $u(e)},Qu=function(n,e,t,r){var o=Ku(n),i=o.getCellDelta(e),u=Ju(n),a=o.getWidths(u,r,o),c=Bu(a,t,i,o),l=P.map(c,function(n,e){return n+a[e]}),s=Uu(u,l);P.each(s,function(n){o.setElementWidth(n.element(),n.width())}),t===u.grid().columns()-1&&o.setTableWidth(n,l,i)},Zu=function(n,t,r,e){var o=Ju(n),i=Hu.getPixelHeights(o,e),u=P.map(i,function(n,e){return r===e?Math.max(t+n,Wu.minHeight()):n}),a=Vu(o,u),c=Gu(o,u);P.each(c,function(n){ao.setHeight(n.element(),n.height())}),P.each(a,function(n){ao.setHeight(n.element(),n.height())});var l,s=(l=u,P.foldr(l,function(n,e){return n+e},0));ao.setHeight(n,s)},na=function(n,e,t){var r=Ku(n),o=$u(e),i=r.getWidths(o,t,r),u=Uu(o,i);P.each(u,function(n){r.setElementWidth(n.element(),n.width())});var a=P.foldr(i,function(n,e){return e+n},0);0<u.length&&r.setElementWidth(n,a)},ea=function(n){0===Ye.cells(n).length&&dt.remove(n)},ta=V.immutable("grid","cursor"),ra=function(n,e,t){return oa(n,e,t).orThunk(function(){return oa(n,0,0)})},oa=function(n,e,t){return x.from(n[e]).bind(function(n){return x.from(n.cells()[t]).bind(function(n){return x.from(n.element())})})},ia=function(n,e,t){return ta(n,oa(n,e,t))},ua=function(n){return P.foldl(n,function(n,e){return P.exists(n,function(n){return n.row()===e.row()})?n:n.concat([e])},[]).sort(function(n,e){return n.row()-e.row()})},aa=function(n){return P.foldl(n,function(n,e){return P.exists(n,function(n){return n.column()===e.column()})?n:n.concat([e])},[]).sort(function(n,e){return n.column()-e.column()})},ca=function(n,e,t){var r=$e(n,t),o=Ze.generate(r);return li(o,e,!0)},la=na,sa={insertRowBefore:Yi(function(n,e,t,r){var o=e.row(),i=e.row(),u=pu(n,i,o,t,r.getOrInit);return ia(u,i,e.column())},$i,y.noop,y.noop,Lo),insertRowsBefore:Yi(function(n,e,t,r){var o=e[0].row(),i=e[0].row(),u=ua(e),a=P.foldl(u,function(n,e){return pu(n,i,o,t,r.getOrInit)},n);return ia(a,i,e[0].column())},Ji,y.noop,y.noop,Lo),insertRowAfter:Yi(function(n,e,t,r){var o=e.row(),i=e.row()+e.rowspan(),u=pu(n,i,o,t,r.getOrInit);return ia(u,i,e.column())},$i,y.noop,y.noop,Lo),insertRowsAfter:Yi(function(n,e,t,r){var o=ua(e),i=o[o.length-1].row(),u=o[o.length-1].row()+o[o.length-1].rowspan(),a=P.foldl(o,function(n,e){return pu(n,u,i,t,r.getOrInit)},n);return ia(a,u,e[0].column())},Ji,y.noop,y.noop,Lo),insertColumnBefore:Yi(function(n,e,t,r){var o=e.column(),i=e.column(),u=vu(n,i,o,t,r.getOrInit);return ia(u,e.row(),i)},$i,la,y.noop,Lo),insertColumnsBefore:Yi(function(n,e,t,r){var o=aa(e),i=o[0].column(),u=o[0].column(),a=P.foldl(o,function(n,e){return vu(n,u,i,t,r.getOrInit)},n);return ia(a,e[0].row(),u)},Ji,la,y.noop,Lo),insertColumnAfter:Yi(function(n,e,t,r){var o=e.column(),i=e.column()+e.colspan(),u=vu(n,i,o,t,r.getOrInit);return ia(u,e.row(),i)},$i,la,y.noop,Lo),insertColumnsAfter:Yi(function(n,e,t,r){var o=e[e.length-1].column(),i=e[e.length-1].column()+e[e.length-1].colspan(),u=aa(e),a=P.foldl(u,function(n,e){return vu(n,i,o,t,r.getOrInit)},n);return ia(a,e[0].row(),i)},Ji,la,y.noop,Lo),splitCellIntoColumns:Yi(function(n,e,t,r){var o=bu(n,e.row(),e.column(),t,r.getOrInit);return ia(o,e.row(),e.column())},$i,la,y.noop,Lo),splitCellIntoRows:Yi(function(n,e,t,r){var o=wu(n,e.row(),e.column(),t,r.getOrInit);return ia(o,e.row(),e.column())},$i,y.noop,y.noop,Lo),eraseColumns:Yi(function(n,e,t,r){var o=aa(e),i=xu(n,o[0].column(),o[o.length-1].column()),u=ra(i,e[0].row(),e[0].column());return ta(i,u)},Ji,la,ea,Lo),eraseRows:Yi(function(n,e,t,r){var o=ua(e),i=yu(n,o[0].row(),o[o.length-1].row()),u=ra(i,e[0].row(),e[0].column());return ta(i,u)},Ji,y.noop,ea,Lo),makeColumnHeader:Yi(function(n,e,t,r){var o=Tu(n,e.column(),t,r.replaceOrInit);return ia(o,e.row(),e.column())},$i,y.noop,y.noop,qo("row","th")),unmakeColumnHeader:Yi(function(n,e,t,r){var o=Tu(n,e.column(),t,r.replaceOrInit);return ia(o,e.row(),e.column())},$i,y.noop,y.noop,qo(null,"td")),makeRowHeader:Yi(function(n,e,t,r){var o=Du(n,e.row(),t,r.replaceOrInit);return ia(o,e.row(),e.column())},$i,y.noop,y.noop,qo("col","th")),unmakeRowHeader:Yi(function(n,e,t,r){var o=Du(n,e.row(),t,r.replaceOrInit);return ia(o,e.row(),e.column())},$i,y.noop,y.noop,qo(null,"td")),mergeCells:Yi(function(n,e,t,r){var o=e.cells();$o(o);var i=fu(n,e.bounds(),t,y.constant(o[0]));return ta(i,x.from(o[0]))},nu,y.noop,y.noop,jo),unmergeCells:Yi(function(n,e,t,r){var o=P.foldr(e,function(n,e){return du(n,e,t,r.combine(e))},n);return ta(o,x.from(e[0]))},eu,la,y.noop,jo),pasteCells:Yi(function(n,t,e,r){var o,i,u,a,c=(o=t.clipboard(),i=t.generators(),u=Ke(o),a=Ze.generate(u),li(a,i,!0)),l=Q.address(t.row(),t.column());return gu(l,n,c,t.generators(),e).fold(function(){return ta(n,x.some(t.element()))},function(n){var e=ra(n,t.row(),t.column());return ta(n,e)})},Qi,la,y.noop,Lo),pasteRowsBefore:Yi(function(n,e,t,r){var o=n[e.cells[0].row()],i=e.cells[0].row(),u=ca(e.clipboard(),e.generators(),o),a=hu(i,n,u,e.generators(),t),c=ra(a,e.cells[0].row(),e.cells[0].column());return ta(a,c)},Zi,y.noop,y.noop,Lo),pasteRowsAfter:Yi(function(n,e,t,r){var o=n[e.cells[0].row()],i=e.cells[e.cells.length-1].row()+e.cells[e.cells.length-1].rowspan(),u=ca(e.clipboard(),e.generators(),o),a=hu(i,n,u,e.generators(),t),c=ra(a,e.cells[0].row(),e.cells[0].column());return ta(a,c)},Zi,y.noop,y.noop,Lo)},fa=function(n){return nn.fromDom(n.getBody())},da=function(n){return n.getBoundingClientRect().width},ma=function(n){return n.getBoundingClientRect().height},ga=function(e){return function(n){return te.eq(n,fa(e))}},ha=function(n){return/^[0-9]+$/.test(n)&&(n+="px"),n},pa=function(n){var e=Ne.descendants(n,"td[data-mce-style],th[data-mce-style]");Se.remove(n,"data-mce-style"),P.each(e,function(n){Se.remove(n,"data-mce-style")})},va=function(n){return"rtl"===ut.get(n,"direction")?"rtl":"ltr"},ba={onDirection:function(e,t){return function(n){return"rtl"===va(n)?t:e}},getDirection:va},wa={isRtl:y.constant(!1)},ya={isRtl:y.constant(!0)},xa={directionAt:function(n){return"rtl"===ba.getDirection(n)?ya:wa}},Ca=["tableprops","tabledelete","|","tableinsertrowbefore","tableinsertrowafter","tabledeleterow","|","tableinsertcolbefore","tableinsertcolafter","tabledeletecol"],Ra={"border-collapse":"collapse",width:"100%"},Sa={border:"1"},Ta=function(n){return n.getParam("table_cell_advtab",!0,"boolean")},Da=function(n){return n.getParam("table_row_advtab",!0,"boolean")},ka=function(n){return n.getParam("table_advtab",!0,"boolean")},Aa=function(n){return n.getParam("table_style_by_css",!1,"boolean")},Oa=function(n){return n.getParam("table_cell_class_list",[],"array")},Na=function(n){return n.getParam("table_row_class_list",[],"array")},Ea=function(n){return n.getParam("table_class_list",[],"array")},Pa=function(n){return!1===n.getParam("table_responsive_width")},Ba=function(n,e){return n.fire("newrow",{node:e})},Ia=function(n,e){return n.fire("newcell",{node:e})},Wa=function(n,e,t,r){n.fire("ObjectResizeStart",{target:e,width:t,height:r})},Ma=function(n,e,t,r){n.fire("ObjectResized",{target:e,width:t,height:r})},La=function(s,n){var e,t=function(n){return"table"===we.name(fa(n))},f=(e=s.getParam("table_clone_elements"),p.isString(e)?x.some(e.split(/[ ,]/)):Array.isArray(e)?x.some(e):x.none()),r=function(u,a,c,l){return function(n,e){pa(n);var t=l(),r=nn.fromDom(s.getDoc()),o=Ao(xa.directionAt),i=Bt(c,r,f);return a(n)?u(t,n,e,i,o).bind(function(n){return P.each(n.newRows(),function(n){Ba(s,n.dom())}),P.each(n.newCells(),function(n){Ia(s,n.dom())}),n.cursor().map(function(n){var e=s.dom.createRng();return e.setStart(n.dom(),0),e.setEnd(n.dom(),0),e})}):x.none()}};return{deleteRow:r(sa.eraseRows,function(n){var e=Oo(n);return!1===t(s)||1<e.rows()},y.noop,n),deleteColumn:r(sa.eraseColumns,function(n){var e=Oo(n);return!1===t(s)||1<e.columns()},y.noop,n),insertRowsBefore:r(sa.insertRowsBefore,y.always,y.noop,n),insertRowsAfter:r(sa.insertRowsAfter,y.always,y.noop,n),insertColumnsBefore:r(sa.insertColumnsBefore,y.always,co,n),insertColumnsAfter:r(sa.insertColumnsAfter,y.always,co,n),mergeCells:r(sa.mergeCells,y.always,y.noop,n),unmergeCells:r(sa.unmergeCells,y.always,y.noop,n),pasteRowsBefore:r(sa.pasteRowsBefore,y.always,y.noop,n),pasteRowsAfter:r(sa.pasteRowsAfter,y.always,y.noop,n),pasteCells:r(sa.pasteCells,y.always,y.noop,n)}},qa=function(n,e,r){var t=Ke(n),o=Ze.generate(t);return Ji(o,e).map(function(n){var e=li(o,r,!1).slice(n[0].row(),n[n.length-1].row()+n[n.length-1].rowspan()),t=Ki(e,r);return di(t)})},ja=tinymce.util.Tools.resolve("tinymce.util.Tools"),_a=function(n,e,t){t&&n.formatter.apply("align"+t,{},e)},za=function(n,e,t){t&&n.formatter.apply("valign"+t,{},e)},Ha=function(e,t){ja.each("left center right".split(" "),function(n){e.formatter.remove("align"+n,{},t)})},Fa=function(e,t){ja.each("top middle bottom".split(" "),function(n){e.formatter.remove("valign"+n,{},t)})},Ua=function(o,n,i){var e;return e=function(n,e){for(var t=0;t<e.length;t++){var r=o.getStyle(e[t],i);if(void 0===n&&(n=r),n!==r)return""}return n}(e,o.select("td,th",n))},Va=function(n,e){var t=n.dom,r=e.control.rootControl,o=r.toJSON(),i=t.parseStyle(o.style);"style"===e.control.name()?(r.find("#borderStyle").value(i["border-style"]||"")[0].fire("select"),r.find("#borderColor").value(i["border-color"]||"")[0].fire("change"),r.find("#backgroundColor").value(i["background-color"]||"")[0].fire("change"),r.find("#width").value(i.width||"").fire("change"),r.find("#height").value(i.height||"").fire("change")):(i["border-style"]=o.borderStyle,i["border-color"]=o.borderColor,i["background-color"]=o.backgroundColor,i.width=o.width?ha(o.width):"",i.height=o.height?ha(o.height):""),r.find("#style").value(t.serializeStyle(t.parseStyle(t.serializeStyle(i))))},Ga=function(t){var n=function(){var n=t.getParam("color_picker_callback");if(n)return function(e){return n.call(t,function(n){e.control.value(n).fire("change")},e.control.value())}};return{title:"Advanced",type:"form",defaults:{onchange:y.curry(Va,t)},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border style",type:"listbox",name:"borderStyle",width:90,onselect:y.curry(Va,t),values:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]},{label:"Border color",type:"colorbox",name:"borderColor",onaction:n()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:n()}]}]}},Xa=function(n,r,e){var o=function(n,t){return t=t||[],ja.each(n,function(n){var e={text:n.text||n.title};n.menu?e.menu=o(n.menu):(e.value=n.value,r&&r(e)),t.push(e)}),t};return o(n,e||[])},Ya=Va,Ka=function(n,e){var t=n.parseStyle(n.getAttrib(e,"style")),r={};return t["border-style"]&&(r.borderStyle=t["border-style"]),t["border-color"]&&(r.borderColor=t["border-color"]),t["background-color"]&&(r.backgroundColor=t["background-color"]),r.style=n.serializeStyle(t),r},$a=function(r,o,n){var i,u=r.dom;function a(n,e,t){t&&u.setAttrib(n,e,t)}function c(n,e,t){t&&u.setStyle(n,e,t)}Ya(r,n),i=n.control.rootControl.toJSON(),r.undoManager.transact(function(){ja.each(o,function(n){var e,t;a(n,"scope",i.scope),1===o.length?a(n,"style",i.style):(e=n,t=i.style,delete e.dataset.mceStyle,e.style.cssText+=";"+t),a(n,"class",i["class"]),c(n,"width",ha(i.width)),c(n,"height",ha(i.height)),i.type&&n.nodeName.toLowerCase()!==i.type&&(n=u.rename(n,i.type)),1===o.length&&(Ha(r,n),Fa(r,n)),i.align&&_a(r,n,i.align),i.valign&&za(r,n,i.valign)}),r.focus()})},Ja=function(e){var n,t,r,o=[];if(o=e.dom.select("td[data-mce-selected],th[data-mce-selected]"),n=e.dom.getParent(e.selection.getStart(),"td,th"),!o.length&&n&&o.push(n),n=n||o[0]){var i,u,a,c;1<o.length?t={width:"",height:"",scope:"","class":"",align:"",valign:"",style:"",type:n.nodeName.toLowerCase()}:(u=n,a=(i=e).dom,c={width:a.getStyle(u,"width")||a.getAttrib(u,"width"),height:a.getStyle(u,"height")||a.getAttrib(u,"height"),scope:a.getAttrib(u,"scope"),"class":a.getAttrib(u,"class"),type:u.nodeName.toLowerCase(),style:"",align:"",valign:""},ja.each("left center right".split(" "),function(n){i.formatter.matchNode(u,"align"+n)&&(c.align=n)}),ja.each("top middle bottom".split(" "),function(n){i.formatter.matchNode(u,"valign"+n)&&(c.valign=n)}),Ta(i)&&ja.extend(c,Ka(a,u)),t=c),0<Oa(e).length&&(r={name:"class",type:"listbox",label:"Class",values:Xa(Oa(e),function(n){n.value&&(n.textStyle=function(){return e.formatter.getCssText({block:"td",classes:[n.value]})})})});var l={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width",onchange:y.curry(Ya,e)},{label:"Height",name:"height",onchange:y.curry(Ya,e)},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},r]};Ta(e)?e.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:t,body:[{title:"General",type:"form",items:l},Ga(e)],onsubmit:y.curry($a,e,o)}):e.windowManager.open({title:"Cell properties",data:t,body:l,onsubmit:y.curry($a,e,o)})}};function Qa(s,n,f,e){var d=s.dom;function m(n,e,t){t&&d.setAttrib(n,e,t)}Ya(s,e);var g=e.control.rootControl.toJSON();s.undoManager.transact(function(){ja.each(n,function(n){var e,t,r,o,i,u,a,c,l;m(n,"scope",g.scope),m(n,"style",g.style),m(n,"class",g["class"]),e=n,t="height",(r=ha(g.height))&&d.setStyle(e,t,r),g.type!==n.parentNode.nodeName.toLowerCase()&&(o=s.dom,i=n,u=g.type,a=o.getParent(i,"table"),c=i.parentNode,(l=o.select(u,a)[0])||(l=o.create(u),a.firstChild?"CAPTION"===a.firstChild.nodeName?o.insertAfter(l,a.firstChild):a.insertBefore(l,a.firstChild):a.appendChild(l)),l.appendChild(i),c.hasChildNodes()||o.remove(c)),g.align!==f.align&&(Ha(s,n),_a(s,n,g.align))}),s.focus()})}var Za=function(e){var n,t,r,o,i,u,a,c,l,s,f=e.dom,d=[];n=f.getParent(e.selection.getStart(),"table"),t=f.getParent(e.selection.getStart(),"td,th"),ja.each(n.rows,function(e){ja.each(e.cells,function(n){if(f.getAttrib(n,"data-mce-selected")||n===t)return d.push(e),!1})}),(r=d[0])&&(1<d.length?i={height:"",scope:"",style:"","class":"",align:"",type:r.parentNode.nodeName.toLowerCase()}:(c=r,l=(a=e).dom,s={height:l.getStyle(c,"height")||l.getAttrib(c,"height"),scope:l.getAttrib(c,"scope"),"class":l.getAttrib(c,"class"),align:"",style:"",type:c.parentNode.nodeName.toLowerCase()},ja.each("left center right".split(" "),function(n){a.formatter.matchNode(c,"align"+n)&&(s.align=n)}),Da(a)&&ja.extend(s,Ka(l,c)),i=s),0<Na(e).length&&(o={name:"class",type:"listbox",label:"Class",values:Xa(Na(e),function(n){n.value&&(n.textStyle=function(){return e.formatter.getCssText({block:"tr",classes:[n.value]})})})}),u={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},o]},Da(e)?e.windowManager.open({title:"Row properties",data:i,bodyType:"tabpanel",body:[{title:"General",type:"form",items:u},Ga(e)],onsubmit:y.curry(Qa,e,d,i)}):e.windowManager.open({title:"Row properties",data:i,body:u,onsubmit:y.curry(Qa,e,d,i)}))},nc=tinymce.util.Tools.resolve("tinymce.Env"),ec={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},percentages:!0},tc=function(n,e,t,r,o){void 0===o&&(o=ec);var i=nn.fromTag("table");ut.setAll(i,o.styles),Se.setAll(i,o.attributes);var u=nn.fromTag("tbody");lt.append(i,u);for(var a=[],c=0;c<n;c++){for(var l=nn.fromTag("tr"),s=0;s<e;s++){var f=c<t||s<r?nn.fromTag("th"):nn.fromTag("td");s<r&&Se.set(f,"scope","row"),c<t&&Se.set(f,"scope","col"),lt.append(f,nn.fromTag("br")),o.percentages&&ut.set(f,"width",100/e+"%"),lt.append(l,f)}a.push(l)}return st.append(u,a),i},rc=function(n){return n.dom().innerHTML},oc=function(n){var e=nn.fromTag("div"),t=nn.fromDom(n.dom().cloneNode(!0));return lt.append(e,t),rc(e)},ic=function(n,e){n.selection.select(e.dom(),!0),n.selection.collapse(!0)},uc=function(i,n,e){var t,r,o=i.getParam("table_default_styles",Ra,"object"),u={styles:o,attributes:(r=i,r.getParam("table_default_attributes",Sa,"object")),percentages:(t=o.width,p.isString(t)&&-1!==t.indexOf("%")&&!Pa(i))},a=tc(e,n,0,0,u);Se.set(a,"data-mce-id","__mce");var c=oc(a);return i.insertContent(c),He.descendant(fa(i),'table[data-mce-id="__mce"]').map(function(n){var e,t,r,o;return Pa(i)&&ut.set(n,"width",ut.get(n,"width")),Se.remove(n,"data-mce-id"),e=i,t=n,P.each(Ne.descendants(t,"tr"),function(n){Ba(e,n.dom()),P.each(Ne.descendants(n,"th,td"),function(n){Ia(e,n.dom())})}),r=i,o=n,He.descendant(o,"td,th").each(y.curry(ic,r)),n.dom()}).getOr(null)};function ac(n,e,t,r){if("TD"===e.tagName||"TH"===e.tagName)n.setStyle(e,t,r);else if(e.children)for(var o=0;o<e.children.length;o++)ac(n,e.children[o],t,r)}var cc=function(n,e,t){var r,o,i=n.dom;Ya(n,t),!1===(o=t.control.rootControl.toJSON())["class"]&&delete o["class"],n.undoManager.transact(function(){e||(e=uc(n,o.cols||1,o.rows||1)),function(n,e,t){var r,o=n.dom,i={},u={};if(i["class"]=t["class"],u.height=ha(t.height),o.getAttrib(e,"width")&&!Aa(n)?i.width=(r=t.width)?r.replace(/px$/,""):"":u.width=ha(t.width),Aa(n)?(u["border-width"]=ha(t.border),u["border-spacing"]=ha(t.cellspacing),ja.extend(i,{"data-mce-border-color":t.borderColor,"data-mce-cell-padding":t.cellpadding,"data-mce-border":t.border})):ja.extend(i,{border:t.border,cellpadding:t.cellpadding,cellspacing:t.cellspacing}),Aa(n)&&e.children)for(var a=0;a<e.children.length;a++)ac(o,e.children[a],{"border-width":ha(t.border),"border-color":t.borderColor,padding:ha(t.cellpadding)});t.style?ja.extend(u,o.parseStyle(t.style)):u=ja.extend({},o.parseStyle(o.getAttrib(e,"style")),u),i.style=o.serializeStyle(u),o.setAttribs(e,i)}(n,e,o),(r=i.select("caption",e)[0])&&!o.caption&&i.remove(r),!r&&o.caption&&((r=i.create("caption")).innerHTML=nc.ie?"\xa0":'<br data-mce-bogus="1"/>',e.insertBefore(r,e.firstChild)),Ha(n,e),o.align&&_a(n,e,o.align),n.focus(),n.addVisual()})},lc=function(e,n){var t,r,o,i,u,a,c,l,s,f,d=e.dom,m={};!0===n?(t=d.getParent(e.selection.getStart(),"table"))&&(c=t,l=(a=e).dom,s={width:l.getStyle(c,"width")||l.getAttrib(c,"width"),height:l.getStyle(c,"height")||l.getAttrib(c,"height"),cellspacing:l.getStyle(c,"border-spacing")||l.getAttrib(c,"cellspacing"),cellpadding:l.getAttrib(c,"data-mce-cell-padding")||l.getAttrib(c,"cellpadding")||Ua(a.dom,c,"padding"),border:l.getAttrib(c,"data-mce-border")||l.getAttrib(c,"border")||Ua(a.dom,c,"border"),borderColor:l.getAttrib(c,"data-mce-border-color"),caption:!!l.select("caption",c)[0],"class":l.getAttrib(c,"class")},ja.each("left center right".split(" "),function(n){a.formatter.matchNode(c,"align"+n)&&(s.align=n)}),ka(a)&&ja.extend(s,Ka(l,c)),m=s):(r={label:"Cols",name:"cols"},o={label:"Rows",name:"rows"}),0<Ea(e).length&&(m["class"]&&(m["class"]=m["class"].replace(/\s*mce\-item\-table\s*/g,"")),i={name:"class",type:"listbox",label:"Class",values:Xa(Ea(e),function(n){n.value&&(n.textStyle=function(){return e.formatter.getCssText({block:"table",classes:[n.value]})})})}),u={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:(f=e,f.getParam("table_appearance_options",!0,"boolean")?[r,o,{label:"Width",name:"width",onchange:y.curry(Ya,e)},{label:"Height",name:"height",onchange:y.curry(Ya,e)},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[r,o,{label:"Width",name:"width",onchange:y.curry(Ya,e)},{label:"Height",name:"height",onchange:y.curry(Ya,e)}])},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},i]},ka(e)?e.windowManager.open({title:"Table properties",data:m,bodyType:"tabpanel",body:[{title:"General",type:"form",items:u},Ga(e)],onsubmit:y.curry(cc,e,t)}):e.windowManager.open({title:"Table properties",data:m,body:u,onsubmit:y.curry(cc,e,t)})},sc=ja.each,fc=function(a,e,c,l,t){var r=ga(a),s=function(){return nn.fromDom(a.dom.getParent(a.selection.getStart(),"th,td"))},f=function(n){return Ye.table(n,r)},d=function(n){return{width:da(n.dom()),height:da(n.dom())}},o=function(e){var t=s();f(t).each(function(i){var n=_r.forMenu(l,i,t),u=d(i);e(i,n).each(function(n){var e,t,r,o;e=a,t=u,o=d(r=i),t.width===o.width&&t.height===o.height||(Wa(e,r.dom(),t.width,t.height),Ma(e,r.dom(),o.width,o.height)),a.selection.setRng(n),a.focus(),c.clear(i),pa(i)})})},i=function(n){var o=s();return f(o).bind(function(n){var e=nn.fromDom(a.getDoc()),t=_r.forMenu(l,n,o),r=Bt(y.noop,e,x.none());return qa(n,t,r)})},u=function(u){t.get().each(function(n){var o=P.map(n,function(n){return wt(n)}),i=s();f(i).bind(function(e){var n=nn.fromDom(a.getDoc()),t=It(n),r=_r.pasteRows(l,e,i,o,t);u(e,r).each(function(n){a.selection.setRng(n),a.focus(),c.clear(e)})})})};sc({mceTableSplitCells:function(){o(e.unmergeCells)},mceTableMergeCells:function(){o(e.mergeCells)},mceTableInsertRowBefore:function(){o(e.insertRowsBefore)},mceTableInsertRowAfter:function(){o(e.insertRowsAfter)},mceTableInsertColBefore:function(){o(e.insertColumnsBefore)},mceTableInsertColAfter:function(){o(e.insertColumnsAfter)},mceTableDeleteCol:function(){o(e.deleteColumn)},mceTableDeleteRow:function(){o(e.deleteRow)},mceTableCutRow:function(n){t.set(i()),o(e.deleteRow)},mceTableCopyRow:function(n){t.set(i())},mceTablePasteRowBefore:function(n){u(e.pasteRowsBefore)},mceTablePasteRowAfter:function(n){u(e.pasteRowsAfter)},mceTableDelete:function(){var n=nn.fromDom(a.dom.getParent(a.selection.getStart(),"th,td"));Ye.table(n,r).filter(y.not(r)).each(function(n){var e=nn.fromText("");lt.after(n,e),dt.remove(n);var t=a.dom.createRng();t.setStart(e.dom(),0),t.setEnd(e.dom(),0),a.selection.setRng(t)})}},function(n,e){a.addCommand(e,n)}),sc({mceInsertTable:y.curry(lc,a),mceTableProps:y.curry(lc,a,!0),mceTableRowProps:y.curry(Za,a),mceTableCellProps:y.curry(Ja,a)},function(t,n){a.addCommand(n,function(n,e){t(e)})})},dc=function(n){var e=x.from(n.dom().documentElement).map(nn.fromDom).getOr(n);return{parent:y.constant(e),view:y.constant(n),origin:y.constant(fo(0,0))}},mc=function(n,e){return{parent:y.constant(e),view:y.constant(n),origin:y.constant(fo(0,0))}};function gc(n){var t=V.immutable.apply(null,n),r=[];return{bind:function(n){if(n===undefined)throw"Event bind error: undefined handler";r.push(n)},unbind:function(e){r=P.filter(r,function(n){return n!==e})},trigger:function(){var e=t.apply(null,arguments);P.each(r,function(n){n(e)})}}}var hc={create:function(n){return{registry:q.map(n,function(n){return{bind:n.bind,unbind:n.unbind}}),trigger:q.map(n,function(n){return n.trigger})}}},pc={mode:Io.exactly(["compare","extract","mutate","sink"]),sink:Io.exactly(["element","start","stop","destroy"]),api:Io.exactly(["forceDrop","drop","move","delayDrop"])},vc={resolve:xi("ephox-dragster").resolve},bc=function(m,g){return function(n){if(m(n)){var e,t,r,o,i,u,a,c=nn.fromDom(n.target),l=function(){n.stopPropagation()},s=function(){n.preventDefault()},f=y.compose(s,l),d=(e=c,t=n.clientX,r=n.clientY,o=l,i=s,u=f,a=n,{target:y.constant(e),x:y.constant(t),y:y.constant(r),stop:o,prevent:i,kill:u,raw:y.constant(a)});g(d)}}},wc=function(n,e,t,r,o){var i=bc(t,r);return n.dom().addEventListener(e,i,o),{unbind:y.curry(yc,n,e,i,o)}},yc=function(n,e,t,r){n.dom().removeEventListener(e,t,r)},xc=function(n,e,t,r){return wc(n,e,t,r,!1)},Cc=function(n,e,t,r){return wc(n,e,t,r,!0)},Rc=y.constant(!0),Sc={bind:function(n,e,t){return xc(n,e,Rc,t)},capture:function(n,e,t){return Cc(n,e,Rc,t)}},Tc=pc.mode({compare:function(n,e){return fo(e.left()-n.left(),e.top()-n.top())},extract:function(n){return x.some(fo(n.x(),n.y()))},sink:function(n,e){var t,r,o,i=(t=e,r=ni.merge({layerClass:vc.resolve("blocker")},t),o=nn.fromTag("div"),Se.set(o,"role","presentation"),ut.setAll(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Mi.add(o,vc.resolve("blocker")),Mi.add(o,r.layerClass),{element:function(){return o},destroy:function(){dt.remove(o)}}),u=Sc.bind(i.element(),"mousedown",n.forceDrop),a=Sc.bind(i.element(),"mouseup",n.drop),c=Sc.bind(i.element(),"mousemove",n.move),l=Sc.bind(i.element(),"mouseout",n.delayDrop);return pc.sink({element:i.element,start:function(n){lt.append(n,i.element())},stop:function(){dt.remove(i.element())},destroy:function(){i.destroy(),a.unbind(),c.unbind(),l.unbind(),u.unbind()}})},mutate:function(n,e){n.mutate(e.left(),e.top())}});function Dc(){var i=x.none(),u=hc.create({move:gc(["info"])});return{onEvent:function(n,o){o.extract(n).each(function(n){var e,t,r;(e=o,t=n,r=i.map(function(n){return e.compare(n,t)}),i=x.some(t),r).each(function(n){u.trigger.move(n)})})},reset:function(){i=x.none()},events:u.registry}}function kc(){var n={onEvent:function(n,e){},reset:y.noop},e=Dc(),t=n;return{on:function(){t.reset(),t=e},off:function(){t.reset(),t=n},isOn:function(){return t===e},onEvent:function(n,e){t.onEvent(n,e)},events:e.events}}var Ac=function(e,t){var r=null;return{cancel:function(){null!==r&&(clearTimeout(r),r=null)},throttle:function(){var n=arguments;null!==r&&clearTimeout(r),r=setTimeout(function(){e.apply(null,n),n=r=null},t)}}},Oc=function(e,t,n){var r=!1,o=hc.create({start:gc([]),stop:gc([])}),i=kc(),u=function(){l.stop(),i.isOn()&&(i.off(),o.trigger.stop())},a=Ac(u,200);i.events.move.bind(function(n){t.mutate(e,n.info())});var c=function(e){return function(){var n=Array.prototype.slice.call(arguments,0);if(r)return e.apply(null,n)}},l=t.sink(pc.api({forceDrop:u,drop:c(u),move:c(function(n,e){a.cancel(),i.onEvent(n,t)}),delayDrop:c(a.throttle)}),n);return{element:l.element,go:function(n){l.start(n),i.on(),o.trigger.start()},on:function(){r=!0},off:function(){r=!1},destroy:function(){l.destroy()},events:o.registry}},Nc={transform:function(n,e){var t=e!==undefined?e:{},r=t.mode!==undefined?t.mode:Tc;return Oc(n,r,e)}};function Ec(){var t,r=hc.create({drag:gc(["xDelta","yDelta","target"])}),o=x.none(),n={mutate:function(n,e){t.trigger.drag(n,e)},events:(t=hc.create({drag:gc(["xDelta","yDelta"])})).registry};return n.events.drag.bind(function(e){o.each(function(n){r.trigger.drag(e.xDelta(),e.yDelta(),n)})}),{assign:function(n){o=x.some(n)},get:function(){return o},mutate:n.mutate,events:r.registry}}var Pc={any:function(n){return He.first(n).isSome()},ancestor:function(n,e,t){return He.ancestor(n,e,t).isSome()},sibling:function(n,e){return He.sibling(n,e).isSome()},child:function(n,e){return He.child(n,e).isSome()},descendant:function(n,e){return He.descendant(n,e).isSome()},closest:function(n,e,t){return He.closest(n,e,t).isSome()}},Bc=Ci.resolve("resizer-bar-dragging");function Ic(n,t){var r=Do.height,e=function(o,e,i){var t=Ec(),r=Nc.transform(t,{}),u=x.none(),n=function(n,e){return x.from(Se.get(n,e))};t.events.drag.bind(function(t){n(t.target(),"data-row").each(function(n){var e=Wu.getInt(t.target(),"top");ut.set(t.target(),"top",e+t.yDelta()+"px")}),n(t.target(),"data-column").each(function(n){var e=Wu.getInt(t.target(),"left");ut.set(t.target(),"left",e+t.xDelta()+"px")})});var a=function(n,e){return Wu.getInt(n,e)-parseInt(Se.get(n,"data-initial-"+e),10)};r.events.stop.bind(function(){t.get().each(function(r){u.each(function(t){n(r,"data-row").each(function(n){var e=a(r,"top");Se.remove(r,"data-initial-top"),d.trigger.adjustHeight(t,e,parseInt(n,10))}),n(r,"data-column").each(function(n){var e=a(r,"left");Se.remove(r,"data-initial-left"),d.trigger.adjustWidth(t,e,parseInt(n,10))}),Ui.refresh(o,t,i,e)})})});var c=function(n,e){d.trigger.startAdjust(),t.assign(n),Se.set(n,"data-initial-"+e,parseInt(ut.get(n,e),10)),Mi.add(n,Bc),ut.set(n,"opacity","0.2"),r.go(o.parent())},l=Sc.bind(o.parent(),"mousedown",function(n){Ui.isRowBar(n.target())&&c(n.target(),"top"),Ui.isColBar(n.target())&&c(n.target(),"left")}),s=function(n){return te.eq(n,o.view())},f=Sc.bind(o.view(),"mouseover",function(n){"table"===we.name(n.target())||Pc.closest(n.target(),"table",s)?(u="table"===we.name(n.target())?x.some(n.target()):He.ancestor(n.target(),"table",s)).each(function(n){Ui.refresh(o,n,i,e)}):ke.inBody(n.target())&&Ui.destroy(o)}),d=hc.create({adjustHeight:gc(["table","delta","row"]),adjustWidth:gc(["table","delta","column"]),startAdjust:gc([])});return{destroy:function(){l.unbind(),f.unbind(),r.destroy(),Ui.destroy(o)},refresh:function(n){Ui.refresh(o,n,i,e)},on:r.on,off:r.off,hideBars:y.curry(Ui.hide,o),showBars:y.curry(Ui.show,o),events:d.registry}}(n,t,r),o=hc.create({beforeResize:gc(["table"]),afterResize:gc(["table"]),startDrag:gc([])});return e.events.adjustHeight.bind(function(n){o.trigger.beforeResize(n.table());var e=r.delta(n.delta(),n.table());Zu(n.table(),e,n.row(),r),o.trigger.afterResize(n.table())}),e.events.startAdjust.bind(function(n){o.trigger.startDrag()}),e.events.adjustWidth.bind(function(n){o.trigger.beforeResize(n.table());var e=t.delta(n.delta(),n.table());Qu(n.table(),e,n.column(),t),o.trigger.afterResize(n.table())}),{on:e.on,off:e.off,hideBars:e.hideBars,showBars:e.showBars,destroy:e.destroy,events:o.registry}}var Wc=function(n,e){return n.inline?mc(fa(n),(t=nn.fromTag("div"),ut.setAll(t,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),lt.append(ke.body(),t),t)):dc(nn.fromDom(n.getDoc()));var t},Mc=function(n,e){n.inline&&dt.remove(e.parent())},Lc=function(u){var a,c,o=x.none(),i=x.none(),l=x.none(),s=/(\d+(\.\d+)?)%/,f=function(n){return"TABLE"===n.nodeName};return u.on("init",function(){var n,e=Ao(xa.directionAt),t=Wc(u);if(l=x.some(t),("table"===(n=u.getParam("object_resizing",!0))||n)&&u.getParam("table_resize_bars",!0,"boolean")){var r=Ic(t,e);r.on(),r.events.startDrag.bind(function(n){o=x.some(u.selection.getRng())}),r.events.beforeResize.bind(function(n){var e=n.table().dom();Wa(u,e,da(e),ma(e))}),r.events.afterResize.bind(function(n){var e=n.table(),t=e.dom();pa(e),o.each(function(n){u.selection.setRng(n),u.focus()}),Ma(u,t,da(t),ma(t)),u.undoManager.add()}),i=x.some(r)}}),u.on("ObjectResizeStart",function(n){var e,t=n.target;f(t)&&(a=n.width,e=t,c=u.dom.getStyle(e,"width")||u.dom.getAttrib(e,"width"))}),u.on("ObjectResized",function(n){var e=n.target;if(f(e)){var t=e;if(s.test(c)){var r=parseFloat(s.exec(c)[1]),o=n.width*r/a;u.dom.setStyle(t,"width",o+"%")}else{var i=[];ja.each(t.rows,function(n){ja.each(n.cells,function(n){var e=u.dom.getStyle(n,"width",!0);i.push({cell:n,width:e})})}),ja.each(i,function(n){u.dom.setStyle(n.cell,"width",n.width),u.dom.setAttrib(n.cell,"width",null)})}}}),{lazyResize:function(){return i},lazyWire:function(){return l.getOr(dc(nn.fromDom(u.getBody())))},destroy:function(){i.each(function(n){n.destroy()}),l.each(function(n){Mc(u,n)})}}},qc=function(n){return{fold:n}},jc=function(o){return qc(function(n,e,t,r){return n(o)})},_c=function(o){return qc(function(n,e,t,r){return e(o)})},zc=function(o,i){return qc(function(n,e,t,r){return t(o,i)})},Hc=function(o){return qc(function(n,e,t,r){return r(o)})},Fc=function(t,n){return Ye.table(t,n).bind(function(n){var e=Ye.cells(n);return P.findIndex(e,function(n){return te.eq(t,n)}).map(function(n){return{index:y.constant(n),all:y.constant(e)}})})},Uc=function(e,n){return Fc(e,n).fold(function(){return jc(e)},function(n){return n.index()+1<n.all().length?zc(e,n.all()[n.index()+1]):Hc(e)})},Vc=function(e,n){return Fc(e,n).fold(function(){return jc()},function(n){return 0<=n.index()-1?zc(e,n.all()[n.index()-1]):_c(e)})},Gc=Er([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Xc={before:Gc.before,on:Gc.on,after:Gc.after,cata:function(n,e,t,r){return n.fold(e,t,r)},getStart:function(n){return n.fold(y.identity,y.identity,y.identity)}},Yc=Er([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Kc=V.immutable("start","soffset","finish","foffset"),$c={domRange:Yc.domRange,relative:Yc.relative,exact:Yc.exact,exactFromRange:function(n){return Yc.exact(n.start(),n.soffset(),n.finish(),n.foffset())},range:Kc,getWin:function(n){var e=n.match({domRange:function(n){return nn.fromDom(n.startContainer)},relative:function(n,e){return Xc.getStart(n)},exact:function(n,e,t,r){return n}});return se.defaultView(e)}},Jc=function(n,e,t,r){var o=se.owner(n).dom().createRange();return o.setStart(n.dom(),e),o.setEnd(t.dom(),r),o},Qc=function(n,e,t,r){var o=Jc(n,e,t,r),i=te.eq(n,t)&&e===r;return o.collapsed&&!i},Zc=function(n,e){n.selectNodeContents(e.dom())},nl=function(n){n.deleteContents()},el=function(n){return{left:y.constant(n.left),top:y.constant(n.top),right:y.constant(n.right),bottom:y.constant(n.bottom),width:y.constant(n.width),height:y.constant(n.height)}},tl={create:function(n){return n.document.createRange()},replaceWith:function(n,e){nl(n),n.insertNode(e.dom())},selectNodeContents:function(n,e){var t=n.document.createRange();return Zc(t,e),t},selectNodeContentsUsing:Zc,relativeToNative:function(n,e,t){var r,o,i=n.document.createRange();return r=i,e.fold(function(n){r.setStartBefore(n.dom())},function(n,e){r.setStart(n.dom(),e)},function(n){r.setStartAfter(n.dom())}),o=i,t.fold(function(n){o.setEndBefore(n.dom())},function(n,e){o.setEnd(n.dom(),e)},function(n){o.setEndAfter(n.dom())}),i},exactToNative:function(n,e,t,r,o){var i=n.document.createRange();return i.setStart(e.dom(),t),i.setEnd(r.dom(),o),i},deleteContents:nl,cloneFragment:function(n){var e=n.cloneContents();return nn.fromDom(e)},getFirstRect:function(n){var e=n.getClientRects(),t=0<e.length?e[0]:n.getBoundingClientRect();return 0<t.width||0<t.height?x.some(t).map(el):x.none()},getBounds:function(n){var e=n.getBoundingClientRect();return 0<e.width||0<e.height?x.some(e).map(el):x.none()},isWithin:function(n,e){return e.compareBoundaryPoints(n.END_TO_START,n)<1&&-1<e.compareBoundaryPoints(n.START_TO_END,n)},toString:function(n){return n.toString()}},rl=Er([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),ol=function(n,e,t){return e(nn.fromDom(t.startContainer),t.startOffset,nn.fromDom(t.endContainer),t.endOffset)},il=function(n,e){var o,t,r,i=(o=n,e.match({domRange:function(n){return{ltr:y.constant(n),rtl:x.none}},relative:function(n,e){return{ltr:bn(function(){return tl.relativeToNative(o,n,e)}),rtl:bn(function(){return x.some(tl.relativeToNative(o,e,n))})}},exact:function(n,e,t,r){return{ltr:bn(function(){return tl.exactToNative(o,n,e,t,r)}),rtl:bn(function(){return x.some(tl.exactToNative(o,t,r,n,e))})}}}));return(r=(t=i).ltr()).collapsed?t.rtl().filter(function(n){return!1===n.collapsed}).map(function(n){return rl.rtl(nn.fromDom(n.endContainer),n.endOffset,nn.fromDom(n.startContainer),n.startOffset)}).getOrThunk(function(){return ol(0,rl.ltr,r)}):ol(0,rl.ltr,r)},ul={ltr:rl.ltr,rtl:rl.rtl,diagnose:il,asLtrRange:function(i,n){return il(i,n).match({ltr:function(n,e,t,r){var o=i.document.createRange();return o.setStart(n.dom(),e),o.setEnd(t.dom(),r),o},rtl:function(n,e,t,r){var o=i.document.createRange();return o.setStart(t.dom(),r),o.setEnd(n.dom(),e),o}})}},al=function(n,e,t){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},cl=function(n,e,t,r,o){if(0===o)return 0;if(e===r)return o-1;for(var i=r,u=1;u<o;u++){var a=n(u),c=Math.abs(e-a.left);if(t>a.bottom);else{if(t<a.top||i<c)return u-1;i=c}}return 0},ll={locate:function(l,s,f,d){var n=l.dom().createRange();n.selectNode(s.dom());var e=n.getClientRects();return ti(e,function(n){return al(n,f,d)?x.some(n):x.none()}).map(function(n){return t=l,e=f,o=d,i=n,u=function(n){var e=t.dom().createRange();return e.setStart(r.dom(),n),e.collapse(!0),e},a=Ct.get(r=s).length,c=cl(function(n){return u(n).getBoundingClientRect()},e,o,i.right,a),u(c);var t,r,e,o,i,u,a,c})}},sl=function(e,n,t,r){var o=e.dom().createRange(),i=se.children(n);return ti(i,function(n){return o.selectNode(n.dom()),al(o.getBoundingClientRect(),t,r)?fl(e,n,t,r):x.none()})},fl=function(n,e,t,r){return(we.isText(e)?ll.locate:sl)(n,e,t,r)},dl=function(n,e,t,r){var o=n.dom().createRange();o.selectNode(e.dom());var i=o.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,t)),a=Math.max(i.top,Math.min(i.bottom,r));return fl(n,e,u,a)},ml=function(n,e){return e-n.left<n.right-e},gl=function(n,e,t){var r=n.dom().createRange();return r.selectNode(e.dom()),r.collapse(t),r},hl=function(e,n,t){var r=e.dom().createRange();r.selectNode(n.dom());var o=r.getBoundingClientRect(),i=ml(o,t);return(!0===i?At.first:At.last)(n).map(function(n){return gl(e,n,i)})},pl=function(n,e,t){var r=e.dom().getBoundingClientRect(),o=ml(r,t);return x.some(gl(n,e,o))},vl=function(n,e,t){return(0===se.children(e).length?pl:hl)(n,e,t)},bl=document.caretPositionFromPoint?function(t,n,e){return x.from(t.dom().caretPositionFromPoint(n,e)).bind(function(n){if(null===n.offsetNode)return x.none();var e=t.dom().createRange();return e.setStart(n.offsetNode,n.offset),e.collapse(),x.some(e)})}:document.caretRangeFromPoint?function(n,e,t){return x.from(n.dom().caretRangeFromPoint(e,t))}:function(t,r,o){return nn.fromPoint(t,r,o).bind(function(n){var e=function(){return vl(t,n,r)};return 0===se.children(n).length?e():function(n,e,t,r){var o=n.dom().createRange();o.selectNode(e.dom());var i=o.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,t)),a=Math.max(i.top,Math.min(i.bottom,r));return dl(n,e,u,a)}(t,n,r,o).orThunk(e)})},wl=function(n,e,t){var r=nn.fromDom(n.document);return bl(r,e,t).map(function(n){return $c.range(nn.fromDom(n.startContainer),n.startOffset,nn.fromDom(n.endContainer),n.endOffset)})},yl=function(n,e){var t=we.name(n);return"input"===t?Xc.after(n):P.contains(["br","img"],t)?0===e?Xc.before(n):Xc.after(n):Xc.on(n,e)},xl=function(n,e){var t=n.fold(Xc.before,yl,Xc.after),r=e.fold(Xc.before,yl,Xc.after);return $c.relative(t,r)},Cl=function(n,e,t,r){var o=yl(n,e),i=yl(t,r);return $c.relative(o,i)},Rl=function(n){return n.match({domRange:function(n){var e=nn.fromDom(n.startContainer),t=nn.fromDom(n.endContainer);return Cl(e,n.startOffset,t,n.endOffset)},relative:xl,exact:Cl})},Sl=xl,Tl=Cl,Dl=function(n,e){x.from(n.getSelection()).each(function(n){n.removeAllRanges(),n.addRange(e)})},kl=function(n,e,t,r,o){var i=tl.exactToNative(n,e,t,r,o);Dl(n,i)},Al=function(i,n){return ul.diagnose(i,n).match({ltr:function(n,e,t,r){kl(i,n,e,t,r)},rtl:function(n,e,t,r){var o=i.getSelection();o.setBaseAndExtent?o.setBaseAndExtent(n.dom(),e,t.dom(),r):o.extend?(o.collapse(n.dom(),e),o.extend(t.dom(),r)):kl(i,t,r,n,e)}})},Ol=function(n){var e=nn.fromDom(n.anchorNode),t=nn.fromDom(n.focusNode);return Qc(e,n.anchorOffset,t,n.focusOffset)?x.some($c.range(nn.fromDom(n.anchorNode),n.anchorOffset,nn.fromDom(n.focusNode),n.focusOffset)):function(n){if(0<n.rangeCount){var e=n.getRangeAt(0),t=n.getRangeAt(n.rangeCount-1);return x.some($c.range(nn.fromDom(e.startContainer),e.startOffset,nn.fromDom(t.endContainer),t.endOffset))}return x.none()}(n)},Nl=function(n){return x.from(n.getSelection()).filter(function(n){return 0<n.rangeCount}).bind(Ol)},El=function(n,e,t,r,o){var i=Tl(e,t,r,o);Al(n,i)},Pl=function(n){return Nl(n).map(function(n){return $c.exact(n.start(),n.soffset(),n.finish(),n.foffset())})},Bl=function(n,e,t){var r=Sl(e,t);Al(n,r)},Il=function(n){var o=$c.getWin(n).dom(),e=function(n,e,t,r){return tl.exactToNative(o,n,e,t,r)},t=Rl(n);return ul.diagnose(o,t).match({ltr:e,rtl:e})},Wl=function(n,e){var t=tl.selectNodeContents(n,e);Dl(n,t)},Ml=function(n){n.getSelection().removeAllRanges()},Ll=function(n,e){var t=ul.asLtrRange(n,e);return tl.getFirstRect(t)},ql=function(n,e,t){return wl(n,e,t)},jl=tinymce.util.Tools.resolve("tinymce.util.VK"),_l=function(n,e,t,r){return Fl(n,e,Uc(t),r)},zl=function(n,e,t,r){return Fl(n,e,Vc(t),r)},Hl=function(n,e){var t=$c.exact(e,0,e,0);return Il(t)},Fl=function(o,n,e,i,t){return e.fold(x.none,x.none,function(n,e){return At.first(e).map(function(n){return Hl(0,n)})},function(r){return Ye.table(r,n).bind(function(n){var e,t=_r.noMenu(r);return o.undoManager.transact(function(){i.insertRowsAfter(n,t)}),e=Ne.descendants(n,"tr"),P.last(e).bind(function(n){return He.descendant(n,"td,th").map(function(n){return Hl(0,n)})})})})},Ul=["table","li","dl"],Vl=function(e,t,r,o){if(e.keyCode===jl.TAB){var i=fa(t),u=function(n){var e=we.name(n);return te.eq(n,i)||P.contains(Ul,e)},n=t.selection.getRng();if(n.collapsed){var a=nn.fromDom(n.startContainer);Ye.cell(a,u).each(function(n){e.preventDefault(),(e.shiftKey?zl:_l)(t,u,n,r,o).each(function(n){t.selection.setRng(n)})})}}},Gl={response:V.immutable("selection","kill")},Xl=function(e){return function(n){return n===e}},Yl=Xl(38),Kl=Xl(40),$l={ltr:{isBackward:Xl(37),isForward:Xl(39)},rtl:{isBackward:Xl(39),isForward:Xl(37)},isUp:Yl,isDown:Kl,isNavigation:function(n){return 37<=n&&n<=40}},Jl=function(n,e){var t=ul.asLtrRange(n,e);return{start:y.constant(nn.fromDom(t.startContainer)),soffset:y.constant(t.startOffset),finish:y.constant(nn.fromDom(t.endContainer)),foffset:y.constant(t.endOffset)}},Ql=function(n,e,t,r){return{start:y.constant(Xc.on(n,e)),finish:y.constant(Xc.on(t,r))}},Zl=(Zn.detect().browser.isSafari(),function(n){var e=n!==undefined?n.dom():document,t=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return fo(t,r)}),ns=Zl,es=function(n,e,t){(t!==undefined?t.dom():document).defaultView.scrollBy(n,e)};function ts(i){return{elementFromPoint:function(n,e){return nn.fromPoint(nn.fromDom(i.document),n,e)},getRect:function(n){return n.dom().getBoundingClientRect()},getRangedRect:function(n,e,t,r){var o=$c.exact(n,e,t,r);return Ll(i,o).map(function(n){return q.map(n,y.apply)})},getSelection:function(){return Pl(i).map(function(n){return Jl(i,n)})},fromSitus:function(n){var e=$c.relative(n.start(),n.finish());return Jl(i,e)},situsFromPoint:function(n,e){return ql(i,n,e).map(function(n){return{start:y.constant(Xc.on(n.start(),n.soffset())),finish:y.constant(Xc.on(n.finish(),n.foffset()))}})},clearSelection:function(){Ml(i)},setSelection:function(n){El(i,n.start(),n.soffset(),n.finish(),n.foffset())},setRelativeSelection:function(n,e){Bl(i,n,e)},selectContents:function(n){Wl(i,n)},getInnerHeight:function(){return i.innerHeight},getScrollY:function(){return ns(nn.fromDom(i.document)).top()},scrollBy:function(n,e){es(n,e,nn.fromDom(i.document))}}}var rs=function(t,n,r,e,o){return te.eq(r,e)?x.none():xr(r,e,n).bind(function(n){var e=n.boxes().getOr([]);return 0<e.length?(o(t,e,n.start(),n.finish()),x.some(Gl.response(x.some(Ql(r,0,r,Tt(r))),!0))):x.none()})},os={sync:function(t,r,n,e,o,i,u){return te.eq(n,o)&&e===i?x.none():He.closest(n,"td,th",r).bind(function(e){return He.closest(o,"td,th",r).bind(function(n){return rs(t,r,e,n,u)})})},detect:rs,update:function(n,e,t,r,o){return Rr(r,n,e,o.firstSelectedSelector(),o.lastSelectedSelector()).map(function(n){return o.clear(t),o.selectRange(t,n.boxes(),n.start(),n.finish()),n.boxes()})}},is=V.immutableBag(["left","top","right","bottom"],[]),us={nu:is,moveUp:function(n,e){return is({left:n.left(),top:n.top()-e,right:n.right(),bottom:n.bottom()-e})},moveDown:function(n,e){return is({left:n.left(),top:n.top()+e,right:n.right(),bottom:n.bottom()+e})},moveBottomTo:function(n,e){var t=n.bottom()-n.top();return is({left:n.left(),top:e-t,right:n.right(),bottom:e})},moveTopTo:function(n,e){var t=n.bottom()-n.top();return is({left:n.left(),top:e,right:n.right(),bottom:e+t})},getTop:function(n){return n.top()},getBottom:function(n){return n.bottom()},translate:function(n,e,t){return is({left:n.left()+e,top:n.top()+t,right:n.right()+e,bottom:n.bottom()+t})},toString:function(n){return"("+n.left()+", "+n.top()+") -> ("+n.right()+", "+n.bottom()+")"}},as=function(n){return us.nu({left:n.left,top:n.top,right:n.right,bottom:n.bottom})},cs=function(n,e){return x.some(n.getRect(e))},ls=function(n,e,t){return we.isElement(e)?cs(n,e).map(as):we.isText(e)?(r=n,o=e,i=t,0<=i&&i<Tt(o)?r.getRangedRect(o,i,o,i+1):0<i?r.getRangedRect(o,i-1,o,i):x.none()).map(as):x.none();var r,o,i},ss=function(n,e){return we.isElement(e)?cs(n,e).map(as):we.isText(e)?n.getRangedRect(e,0,e,Tt(e)).map(as):x.none()},fs=V.immutable("item","mode"),ds=function(n,e,t,r){var o=r!==undefined?r:ms;return n.property().parent(e).map(function(n){return fs(n,o)})},ms=function(n,e,t,r){var o=r!==undefined?r:gs;return t.sibling(n,e).map(function(n){return fs(n,o)})},gs=function(n,e,t,r){var o=r!==undefined?r:gs,i=n.property().children(e);return t.first(i).map(function(n){return fs(n,o)})},hs=[{current:ds,next:ms,fallback:x.none()},{current:ms,next:gs,fallback:x.some(ds)},{current:gs,next:gs,fallback:x.some(ms)}],ps=function(e,t,r,o,n){return n=n!==undefined?n:hs,P.find(n,function(n){return n.current===r}).bind(function(n){return n.current(e,t,o,n.next).orThunk(function(){return n.fallback.bind(function(n){return ps(e,t,n,o)})})})},vs={backtrack:ds,sidestep:ms,advance:gs,go:ps},bs={left:function(){return{sibling:function(n,e){return n.query().prevSibling(e)},first:function(n){return 0<n.length?x.some(n[n.length-1]):x.none()}}},right:function(){return{sibling:function(n,e){return n.query().nextSibling(e)},first:function(n){return 0<n.length?x.some(n[0]):x.none()}}}},ws=function(e,n,t,r,o,i){return vs.go(e,n,r,o).bind(function(n){return i(n.item())?x.none():t(n.item())?x.some(n.item()):ws(e,n.item(),t,n.mode(),o,i)})},ys=function(n,e,t,r){return ws(n,e,t,vs.sidestep,bs.left(),r)},xs=function(n,e,t,r){return ws(n,e,t,vs.sidestep,bs.right(),r)},Cs=function(n,e){return 0===n.property().children(e).length},Rs=function(n,e,t,r){return ys(n,e,t,r)},Ss=function(n,e,t,r){return xs(n,e,t,r)},Ts={before:function(n,e,t){return Rs(n,e,y.curry(Cs,n),t)},after:function(n,e,t){return Ss(n,e,y.curry(Cs,n),t)},seekLeft:Rs,seekRight:Ss,walkers:function(){return{left:bs.left,right:bs.right}},walk:function(n,e,t,r,o){return vs.go(n,e,t,r,o)},backtrack:vs.backtrack,sidestep:vs.sidestep,advance:vs.advance},Ds=Lt(),ks={gather:function(n,e,t){return Ts.gather(Ds,n,e,t)},before:function(n,e){return Ts.before(Ds,n,e)},after:function(n,e){return Ts.after(Ds,n,e)},seekLeft:function(n,e,t){return Ts.seekLeft(Ds,n,e,t)},seekRight:function(n,e,t){return Ts.seekRight(Ds,n,e,t)},walkers:function(){return Ts.walkers()},walk:function(n,e,t,r){return Ts.walk(Ds,n,e,t,r)}},As=Er([{none:[]},{retry:["caret"]}]),Os=function(e,n,r){return _e.closest(n,Xo).fold(y.constant(!1),function(n){return ss(e,n).exists(function(n){return t=n,(e=r).left()<t.left()||Math.abs(t.right()-e.left())<1||e.left()>t.right();var e,t})})},Ns={point:us.getTop,adjuster:function(n,e,t,r,o){var i=us.moveUp(o,5);return Math.abs(t.top()-r.top())<1?As.retry(i):t.bottom()<o.top()?As.retry(i):t.bottom()===o.top()?As.retry(us.moveUp(o,1)):Os(n,e,o)?As.retry(us.translate(i,5,0)):As.none()},move:us.moveUp,gather:ks.before},Es={point:us.getBottom,adjuster:function(n,e,t,r,o){var i=us.moveDown(o,5);return Math.abs(t.bottom()-r.bottom())<1?As.retry(i):t.top()>o.bottom()?As.retry(i):t.top()===o.bottom()?As.retry(us.moveDown(o,1)):Os(n,e,o)?As.retry(us.translate(i,5,0)):As.none()},move:us.moveDown,gather:ks.after},Ps=function(t,r,o,i,u){return 0===u?x.some(i):(c=t,l=i.left(),s=r.point(i),c.elementFromPoint(l,s).filter(function(n){return"table"===we.name(n)}).isSome()?(e=i,a=u-1,Ps(t,n=r,o,n.move(e,5),a)):t.situsFromPoint(i.left(),r.point(i)).bind(function(n){return n.start().fold(x.none,function(e,n){return ss(t,e,n).bind(function(n){return r.adjuster(t,e,n,o,i).fold(x.none,function(n){return Ps(t,r,o,n,u-1)})}).orThunk(function(){return x.some(i)})},x.none)}));var n,e,a,c,l,s},Bs=function(e,t,n){var r,o,i,u=e.move(n,5),a=Ps(t,e,n,u,100).getOr(u);return(r=e,o=a,i=t,r.point(o)>i.getInnerHeight()?x.some(r.point(o)-i.getInnerHeight()):r.point(o)<0?x.some(-r.point(o)):x.none()).fold(function(){return t.situsFromPoint(a.left(),e.point(a))},function(n){return t.scrollBy(0,n),t.situsFromPoint(a.left(),e.point(a)-n)})},Is={tryUp:y.curry(Bs,Ns),tryDown:y.curry(Bs,Es),ieTryUp:function(n,e){return n.situsFromPoint(e.left(),e.top()-5)},ieTryDown:function(n,e){return n.situsFromPoint(e.left(),e.bottom()+5)},getJumpSize:y.constant(5)},Ws=Er([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Ms=function(n){return He.closest(n,"tr")},Ls={verify:function(a,n,e,t,r,c,o){return He.closest(t,"td,th",o).bind(function(u){return He.closest(n,"td,th",o).map(function(i){return te.eq(u,i)?te.eq(t,u)&&Tt(u)===r?c(i):Ws.none("in same cell"):rr.sharedOne(Ms,[u,i]).fold(function(){return e=i,t=u,r=(n=a).getRect(e),(o=n.getRect(t)).right>r.left&&o.left<r.right?Ws.success():c(i);var n,e,t,r,o},function(n){return c(i)})})}).getOr(Ws.none("default"))},cata:function(n,e,t,r,o){return n.fold(e,t,r,o)},adt:Ws},qs={point:V.immutable("element","offset"),delta:V.immutable("element","deltaOffset"),range:V.immutable("element","start","finish"),points:V.immutable("begin","end"),text:V.immutable("element","text")},js=(V.immutable("ancestor","descendants","element","index"),V.immutable("parent","children","element","index")),_s=function(n,e){return P.findIndex(n,y.curry(te.eq,e))},zs=function(r){return se.parent(r).bind(function(e){var t=se.children(e);return _s(t,r).map(function(n){return js(e,t,r,n)})})},Hs=function(n){return"br"===we.name(n)},Fs=function(n,e,t){return e(n,t).bind(function(n){return we.isText(n)&&0===Ct.get(n).trim().length?Fs(n,e,t):x.some(n)})},Us=function(e,n,t,r){return(o=n,i=t,se.child(o,i).filter(Hs).orThunk(function(){return se.child(o,i-1).filter(Hs)})).bind(function(n){return r.traverse(n).fold(function(){return Fs(n,r.gather,e).map(r.relative)},function(n){return zs(n).map(function(n){return Xc.on(n.parent(),n.index())})})});var o,i},Vs=function(n,e,t,r){var o,i,u;return(Hs(e)?(o=n,i=e,(u=r).traverse(i).orThunk(function(){return Fs(i,u.gather,o)}).map(u.relative)):Us(n,e,t,r)).map(function(n){return{start:y.constant(n),finish:y.constant(n)}})},Gs=function(n){return Ls.cata(n,function(n){return x.none()},function(){return x.none()},function(n){return x.some(qs.point(n,0))},function(n){return x.some(qs.point(n,Tt(n)))})},Xs=Zn.detect(),Ys=function(r,o,i,u,a,c){return 0===c?x.none():Js(r,o,i,u,a).bind(function(n){var e=r.fromSitus(n),t=Ls.verify(r,i,u,e.finish(),e.foffset(),a.failure,o);return Ls.cata(t,function(){return x.none()},function(){return x.some(n)},function(n){return te.eq(i,n)&&0===u?Ks(r,i,u,us.moveUp,a):Ys(r,o,n,0,a,c-1)},function(n){return te.eq(i,n)&&u===Tt(n)?Ks(r,i,u,us.moveDown,a):Ys(r,o,n,Tt(n),a,c-1)})})},Ks=function(e,n,t,r,o){return ls(e,n,t).bind(function(n){return $s(e,o,r(n,Is.getJumpSize()))})},$s=function(n,e,t){return Xs.browser.isChrome()||Xs.browser.isSafari()||Xs.browser.isFirefox()||Xs.browser.isEdge()?e.otherRetry(n,t):Xs.browser.isIE()?e.ieRetry(n,t):x.none()},Js=function(e,n,t,r,o){return ls(e,t,r).bind(function(n){return $s(e,o,n)})},Qs=function(e,t,r){return(o=e,i=t,u=r,o.getSelection().bind(function(r){return Vs(i,r.finish(),r.foffset(),u).fold(function(){return x.some(qs.point(r.finish(),r.foffset()))},function(n){var e=o.fromSitus(n),t=Ls.verify(o,r.finish(),r.foffset(),e.finish(),e.foffset(),u.failure,i);return Gs(t)})})).bind(function(n){return Ys(e,t,n.element(),n.offset(),r,20).map(e.fromSitus)});var o,i,u},Zs=function(n,e,t){return _e.ancestor(n,e,t).isSome()},nf=Zn.detect(),ef=function(r,o,i,n,u){return He.closest(n,"td,th",o).bind(function(t){return He.closest(t,"table",o).bind(function(n){return e=n,Zs(u,function(n){return se.parent(n).exists(function(n){return te.eq(n,e)})})?Qs(r,o,i).bind(function(e){return He.closest(e.finish(),"td,th",o).map(function(n){return{start:y.constant(t),finish:y.constant(n),range:y.constant(e)}})}):x.none();var e})})},tf=function(n,e,t,r,o,i){return nf.browser.isIE()?x.none():i(r,e).orThunk(function(){return ef(n,e,t,r,o).map(function(n){var e=n.range();return Gl.response(x.some(Ql(e.start(),e.soffset(),e.finish(),e.foffset())),!0)})})},rf=function(n,e,t,r,o,i,u){return ef(n,t,r,o,i).bind(function(n){return os.detect(e,t,n.start(),n.finish(),u)})},of=function(n,r){return He.closest(n,"tr",r).bind(function(t){return He.closest(t,"table",r).bind(function(n){var e=Ne.descendants(n,"tr");return te.eq(t,e[0])?ks.seekLeft(n,function(n){return At.last(n).isSome()},r).map(function(n){var e=Tt(n);return Gl.response(x.some(Ql(n,e,n,e)),!0)}):x.none()})})},uf=function(n,r){return He.closest(n,"tr",r).bind(function(t){return He.closest(t,"table",r).bind(function(n){var e=Ne.descendants(n,"tr");return te.eq(t,e[e.length-1])?ks.seekRight(n,function(n){return At.first(n).isSome()},r).map(function(n){return Gl.response(x.some(Ql(n,0,n,0)),!0)}):x.none()})})},af=function(n,e){return He.closest(n,"td,th",e)},cf={down:{traverse:se.nextSibling,gather:ks.after,relative:Xc.before,otherRetry:Is.tryDown,ieRetry:Is.ieTryDown,failure:Ls.adt.failedDown},up:{traverse:se.prevSibling,gather:ks.before,relative:Xc.before,otherRetry:Is.tryUp,ieRetry:Is.ieTryUp,failure:Ls.adt.failedUp}},lf=V.immutable("rows","cols"),sf={mouse:function(n,e,t,r){var o,i,u,a,c,l,s=ts(n),f=(o=s,i=e,u=t,a=r,c=x.none(),l=function(){c=x.none()},{mousedown:function(n){a.clear(i),c=af(n.target(),u)},mouseover:function(n){c.each(function(r){a.clear(i),af(n.target(),u).each(function(t){xr(r,t,u).each(function(n){var e=n.boxes().getOr([]);(1<e.length||1===e.length&&!te.eq(r,t))&&(a.selectRange(i,e,n.start(),n.finish()),o.selectContents(t))})})})},mouseup:function(){c.each(l)}});return{mousedown:f.mousedown,mouseover:f.mouseover,mouseup:f.mouseup}},keyboard:function(n,c,l,s){var f=ts(n),d=function(){return s.clear(c),x.none()};return{keydown:function(n,e,t,r,o,i){var u=n.raw().which,a=!0===n.raw().shiftKey;return Cr(c,s.selectedSelector()).fold(function(){return $l.isDown(u)&&a?y.curry(rf,f,c,l,cf.down,r,e,s.selectRange):$l.isUp(u)&&a?y.curry(rf,f,c,l,cf.up,r,e,s.selectRange):$l.isDown(u)?y.curry(tf,f,l,cf.down,r,e,uf):$l.isUp(u)?y.curry(tf,f,l,cf.up,r,e,of):x.none},function(e){var n=function(n){return function(){return ti(n,function(n){return os.update(n.rows(),n.cols(),c,e,s)}).fold(function(){return Sr(c,s.firstSelectedSelector(),s.lastSelectedSelector()).map(function(n){var e=$l.isDown(u)||i.isForward(u)?Xc.after:Xc.before;return f.setRelativeSelection(Xc.on(n.first(),0),e(n.table())),s.clear(c),Gl.response(x.none(),!0)})},function(n){return x.some(Gl.response(x.none(),!0))})}};return $l.isDown(u)&&a?n([lf(1,0)]):$l.isUp(u)&&a?n([lf(-1,0)]):i.isBackward(u)&&a?n([lf(0,-1),lf(-1,0)]):i.isForward(u)&&a?n([lf(0,1),lf(1,0)]):$l.isNavigation(u)&&!1===a?d:x.none})()},keyup:function(e,t,r,o,i){return Cr(c,s.selectedSelector()).fold(function(){var n=e.raw().which;return 0==(!0===e.raw().shiftKey)?x.none():$l.isNavigation(n)?os.sync(c,l,t,r,o,i,s.selectRange):x.none()},x.none)}}}},ff=function(e,n){P.each(n,function(n){Mi.remove(e,n)})},df=function(e){return function(n){Mi.add(n,e)}},mf=function(e){return function(n){ff(n,e)}},gf={byClass:function(o){var i=df(o.selected()),t=mf([o.selected(),o.lastSelected(),o.firstSelected()]),u=function(n){var e=Ne.descendants(n,o.selectedSelector());P.each(e,t)};return{clear:u,selectRange:function(n,e,t,r){u(n),P.each(e,i),Mi.add(t,o.firstSelected()),Mi.add(r,o.lastSelected())},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}},byAttr:function(o){var t=function(n){Se.remove(n,o.selected()),Se.remove(n,o.firstSelected()),Se.remove(n,o.lastSelected())},i=function(n){Se.set(n,o.selected(),"1")},u=function(n){var e=Ne.descendants(n,o.selectedSelector());P.each(e,t)};return{clear:u,selectRange:function(n,e,t,r){u(n),P.each(e,i),Se.set(t,o.firstSelected(),"1"),Se.set(r,o.lastSelected(),"1")},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}}},hf=function(n){return!1===Mi.has(nn.fromDom(n.target),"ephox-snooker-resizer-bar")};function pf(h,p){var v=V.immutableBag(["mousedown","mouseover","mouseup","keyup","keydown"],[]),b=x.none(),w=gf.byAttr(Nr);return h.on("init",function(n){var r=h.getWin(),o=fa(h),e=ga(h),t=sf.mouse(r,o,e,w),a=sf.keyboard(r,o,e,w),c=function(n,e){!0===n.raw().shiftKey&&(e.kill()&&n.kill(),e.selection().each(function(n){var e=$c.relative(n.start(),n.finish()),t=ul.asLtrRange(r,e);h.selection.setRng(t)}))},i=function(n){var e=s(n);if(e.raw().shiftKey&&$l.isNavigation(e.raw().which)){var t=h.selection.getRng(),r=nn.fromDom(t.startContainer),o=nn.fromDom(t.endContainer);a.keyup(e,r,t.startOffset,o,t.endOffset).each(function(n){c(e,n)})}},u=function(n){var e=s(n);p().each(function(n){n.hideBars()});var t=h.selection.getRng(),r=nn.fromDom(h.selection.getStart()),o=nn.fromDom(t.startContainer),i=nn.fromDom(t.endContainer),u=xa.directionAt(r).isRtl()?$l.rtl:$l.ltr;a.keydown(e,o,t.startOffset,i,t.endOffset,u).each(function(n){c(e,n)}),p().each(function(n){n.showBars()})},l=function(n){return n.hasOwnProperty("x")&&n.hasOwnProperty("y")},s=function(n){var e=nn.fromDom(n.target),t=function(){n.stopPropagation()},r=function(){n.preventDefault()},o=y.compose(r,t);return{target:y.constant(e),x:y.constant(l(n)?n.x:null),y:y.constant(l(n)?n.y:null),stop:t,prevent:r,kill:o,raw:y.constant(n)}},f=function(n){return 0===n.button},d=function(n){f(n)&&hf(n)&&t.mousedown(s(n))},m=function(n){var e;(e=n).buttons!==undefined&&0==(1&e.buttons)||!hf(n)||t.mouseover(s(n))},g=function(n){f(n)&&hf(n)&&t.mouseup(s(n))};h.on("mousedown",d),h.on("mouseover",m),h.on("mouseup",g),h.on("keyup",i),h.on("keydown",u),h.on("nodechange",function(){var n=h.selection,e=nn.fromDom(n.getStart()),t=nn.fromDom(n.getEnd());rr.sharedOne(Ye.table,[e,t]).fold(function(){w.clear(o)},y.noop)}),b=x.some(v({mousedown:d,mouseover:m,mouseup:g,keyup:i,keydown:u}))}),{clear:w.clear,destroy:function(){b.each(function(n){})}}}var vf=ja.each,bf=function(e){var t=[];function n(n){return function(){e.execCommand(n)}}vf("inserttable tableprops deletetable | cell row column".split(" "),function(n){"|"===n?t.push({text:"-"}):t.push(e.menuItems[n])}),e.addButton("table",{type:"menubutton",title:"Table",menu:t}),e.addButton("tableprops",{title:"Table properties",onclick:n("mceTableProps"),icon:"table"}),e.addButton("tabledelete",{title:"Delete table",onclick:n("mceTableDelete")}),e.addButton("tablecellprops",{title:"Cell properties",onclick:n("mceTableCellProps")}),e.addButton("tablemergecells",{title:"Merge cells",onclick:n("mceTableMergeCells")}),e.addButton("tablesplitcells",{title:"Split cell",onclick:n("mceTableSplitCells")}),e.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:n("mceTableInsertRowBefore")}),e.addButton("tableinsertrowafter",{title:"Insert row after",onclick:n("mceTableInsertRowAfter")}),e.addButton("tabledeleterow",{title:"Delete row",onclick:n("mceTableDeleteRow")}),e.addButton("tablerowprops",{title:"Row properties",onclick:n("mceTableRowProps")}),e.addButton("tablecutrow",{title:"Cut row",onclick:n("mceTableCutRow")}),e.addButton("tablecopyrow",{title:"Copy row",onclick:n("mceTableCopyRow")}),e.addButton("tablepasterowbefore",{title:"Paste row before",onclick:n("mceTablePasteRowBefore")}),e.addButton("tablepasterowafter",{title:"Paste row after",onclick:n("mceTablePasteRowAfter")}),e.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:n("mceTableInsertColBefore")}),e.addButton("tableinsertcolafter",{title:"Insert column after",onclick:n("mceTableInsertColAfter")}),e.addButton("tabledeletecol",{title:"Delete column",onclick:n("mceTableDeleteCol")})},wf=function(e){var n,t=""===(n=e.getParam("table_toolbar",Ca))||!1===n?[]:p.isString(n)?n.split(/[ ,]/):p.isArray(n)?n:[];0<t.length&&e.addContextToolbar(function(n){return e.dom.is(n,"table")&&e.getBody().contains(n)},t.join(" "))},yf=function(o,t){var r=x.none(),i=[],u=[],a=[],c=[],l=function(n){n.disabled(!0)},s=function(n){n.disabled(!1)},n=function(){var e=this;i.push(e),r.fold(function(){l(e)},function(n){s(e)})},e=function(){var e=this;u.push(e),r.fold(function(){l(e)},function(n){s(e)})};o.on("init",function(){o.on("nodechange",function(n){var e=x.from(o.dom.getParent(o.selection.getStart(),"th,td"));(r=e.bind(function(n){var e=nn.fromDom(n);return Ye.table(e).map(function(n){return _r.forMenu(t,n,e)})})).fold(function(){P.each(i,l),P.each(u,l),P.each(a,l),P.each(c,l)},function(e){P.each(i,s),P.each(u,s),P.each(a,function(n){n.disabled(e.mergable().isNone())}),P.each(c,function(n){n.disabled(e.unmergable().isNone())})})})});var f=function(n,e,t,r){var o,i,u,a,c,l=r.getEl().getElementsByTagName("table")[0],s=r.isRtl()||"tl-tr"===r.parent().rel;for(l.nextSibling.innerHTML=e+1+" x "+(t+1),s&&(e=9-e),i=0;i<10;i++)for(o=0;o<10;o++)a=l.rows[i].childNodes[o].firstChild,c=(s?e<=o:o<=e)&&i<=t,n.dom.toggleClass(a,"mce-active",c),c&&(u=a);return u.parentNode},d=!1===o.getParam("table_grid",!0,"boolean")?{text:"Table",icon:"table",context:"table",onclick:m("mceInsertTable")}:{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(n){n.aria&&(this.parent().hideAll(),n.stopImmediatePropagation(),o.execCommand("mceInsertTable"))},onshow:function(){f(o,0,0,this.menu.items()[0])},onhide:function(){var n=this.menu.items()[0].getEl().getElementsByTagName("a");o.dom.removeClass(n,"mce-active"),o.dom.addClass(n[0],"mce-active")},menu:[{type:"container",html:function(){var n="";n='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var e=0;e<10;e++){n+="<tr>";for(var t=0;t<10;t++)n+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*e+t)+'" href="#" data-mce-x="'+t+'" data-mce-y="'+e+'"></a></td>';n+="</tr>"}return n+="</table>",n+='<div class="mce-text-center" role="presentation">1 x 1</div>'}(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(n){var e,t,r=n.target;"A"===r.tagName.toUpperCase()&&(e=parseInt(r.getAttribute("data-mce-x"),10),t=parseInt(r.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"===this.parent().rel)&&(e=9-e),e===this.lastX&&t===this.lastY||(f(o,e,t,n.control),this.lastX=e,this.lastY=t))},onclick:function(n){var e=this;"A"===n.target.tagName.toUpperCase()&&(n.preventDefault(),n.stopPropagation(),e.parent().cancel(),o.undoManager.transact(function(){uc(o,e.lastX+1,e.lastY+1)}),o.addVisual())}}]};function m(n){return function(){o.execCommand(n)}}var g={text:"Table properties",context:"table",onPostRender:n,onclick:m("mceTableProps")},h={text:"Delete table",context:"table",onPostRender:n,cmd:"mceTableDelete"},p={text:"Row",context:"table",menu:[{text:"Insert row before",onclick:m("mceTableInsertRowBefore"),onPostRender:e},{text:"Insert row after",onclick:m("mceTableInsertRowAfter"),onPostRender:e},{text:"Delete row",onclick:m("mceTableDeleteRow"),onPostRender:e},{text:"Row properties",onclick:m("mceTableRowProps"),onPostRender:e},{text:"-"},{text:"Cut row",onclick:m("mceTableCutRow"),onPostRender:e},{text:"Copy row",onclick:m("mceTableCopyRow"),onPostRender:e},{text:"Paste row before",onclick:m("mceTablePasteRowBefore"),onPostRender:e},{text:"Paste row after",onclick:m("mceTablePasteRowAfter"),onPostRender:e}]},v={text:"Column",context:"table",menu:[{text:"Insert column before",onclick:m("mceTableInsertColBefore"),onPostRender:e},{text:"Insert column after",onclick:m("mceTableInsertColAfter"),onPostRender:e},{text:"Delete column",onclick:m("mceTableDeleteCol"),onPostRender:e}]},b={separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:m("mceTableCellProps"),onPostRender:e},{text:"Merge cells",onclick:m("mceTableMergeCells"),onPostRender:function(){var e=this;a.push(e),r.fold(function(){l(e)},function(n){e.disabled(n.mergable().isNone())})}},{text:"Split cell",onclick:m("mceTableSplitCells"),onPostRender:function(){var e=this;c.push(e),r.fold(function(){l(e)},function(n){e.disabled(n.unmergable().isNone())})}}]};o.addMenuItem("inserttable",d),o.addMenuItem("tableprops",g),o.addMenuItem("deletetable",h),o.addMenuItem("row",p),o.addMenuItem("column",v),o.addMenuItem("cell",b)},xf=function(t,o){return{insertTable:function(n,e){return uc(t,n,e)},setClipboardRows:function(n){return e=n,t=o,r=P.map(e,nn.fromDom),void t.set(x.from(r));var e,t,r},getClipboardRows:function(){return o.get().fold(function(){},function(n){return P.map(n,function(n){return n.dom()})})}}};u.add("table",function(e){var t,r=Lc(e),n=pf(e,r.lazyResize),o=La(e,r.lazyWire),i=(t=e,{get:function(){var n=fa(t);return Tr(n,Nr.selectedSelector()).fold(function(){return t.selection.getStart()===undefined?Br.none():Br.single(t.selection)},function(n){return Br.multiple(n)})}}),u=No(x.none());return fc(e,o,n,i,u),zr(e,i,o,n),yf(e,i),bf(e),wf(e),e.on("PreInit",function(){e.serializer.addTempAttr(Nr.firstSelected()),e.serializer.addTempAttr(Nr.lastSelected())}),e.getParam("table_tab_navigation",!0,"boolean")&&e.on("keydown",function(n){Vl(n,e,o,r.lazyWire)}),e.on("remove",function(){r.destroy(),n.destroy()}),xf(e,u)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return function(){return e}},n=(t(!1),t(!0),function(l){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var c=new Array(arguments.length-1),n=1;n<arguments.length;n++)c[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];var r=c.concat(n);return l.apply(null,r)}}),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=tinymce.util.Tools.resolve("tinymce.util.XHR"),a=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=function(e){return e.getParam("template_cdate_classes","cdate")},s=function(e){return e.getParam("template_mdate_classes","mdate")},u=function(e){return e.getParam("template_selected_content_classes","selcontent")},p=function(e){return e.getParam("template_preview_replace_values")},m=function(e){return e.getParam("template_replace_values")},r=function(e){return e.templates},d=function(e){return e.getParam("template_cdate_format",e.getLang("template.cdate_format"))},f=function(e){return e.getParam("template_mdate_format",e.getLang("template.mdate_format"))},g=function(e){return e.getParam("template_popup_width",600)},h=function(e){return Math.min(a.DOM.getViewPort().h,e.getParam("template_popup_height",500))},y=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},v=function(e,t,n){var a="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),c="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",y(n.getMonth()+1,2))).replace("%d",y(n.getDate(),2))).replace("%H",""+y(n.getHours(),2))).replace("%M",""+y(n.getMinutes(),2))).replace("%S",""+y(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(c[n.getMonth()]))).replace("%b",""+e.translate(l[n.getMonth()]))).replace("%A",""+e.translate(r[n.getDay()]))).replace("%a",""+e.translate(a[n.getDay()]))).replace("%%","%")},M=function(e,n,t){return o.each(t,function(e,t){"function"==typeof e&&(e=e(t)),n=n.replace(new RegExp("\\{\\$"+t+"\\}","g"),e)}),n},_=function(e,t){var a=e.dom,r=m(e);o.each(a.select("*",t),function(n){o.each(r,function(e,t){a.hasClass(n,t)&&"function"==typeof r[t]&&r[t](n)})})},b=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},l=function(t,n){return function(){var e=r(t);"function"!=typeof e?"string"==typeof e?c.send({url:e,success:function(e){n(JSON.parse(e))}}):n(e):e(n)}},T=M,x=_,P=function(t,e,n){var a,r,l=t.dom,c=t.selection.getContent();n=M(0,n,m(t)),a=l.create("div",null,n),(r=l.select(".mceTmpl",a))&&0<r.length&&(a=l.create("div",null)).appendChild(r[0].cloneNode(!0)),o.each(l.select("*",a),function(e){b(e,i(t).replace(/\s+/g,"|"))&&(e.innerHTML=v(t,d(t))),b(e,s(t).replace(/\s+/g,"|"))&&(e.innerHTML=v(t,f(t))),b(e,u(t).replace(/\s+/g,"|"))&&(e.innerHTML=c)}),_(t,a),t.execCommand("mceInsertContent",!1,a.innerHTML),t.addVisual()},S=function(e){e.addCommand("mceInsertTemplate",n(P,e))},w=function(a){a.on("PreProcess",function(e){var t=a.dom,n=f(a);o.each(t.select("div",e.node),function(e){t.hasClass(e,"mceTmpl")&&(o.each(t.select("*",e),function(e){t.hasClass(e,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(e.innerHTML=v(a,n))}),x(a,e))})})},D=function(t,e,n){if(-1===n.indexOf("<html>")){var a="";o.each(t.contentCSS,function(e){a+='<link type="text/css" rel="stylesheet" href="'+t.documentBaseURI.toAbsolute(e)+'">'});var r=t.settings.body_class||"";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_class","","hash"))[t.id]||""),n="<!DOCTYPE html><html><head>"+a+'</head><body class="'+r+'">'+n+"</body></html>"}n=T(t,n,p(t));var l=e.find("iframe")[0].getEl().contentWindow.document;l.open(),l.write(n),l.close()},H=function(n,e){var a,r,t=[];if(e&&0!==e.length)o.each(e,function(e){t.push({selected:!t.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),(a=n.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:t,onselect:function(e){var t=e.control.value();t.url?c.send({url:t.url,success:function(e){D(n,a,r=e)}}):(r=t.content,D(n,a,r)),a.find("#description")[0].text(e.control.value().description)}}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){P(n,!1,r)},minWidth:g(n),minHeight:h(n)})).find("listbox")[0].fire("select");else{var l=n.translate("No templates defined.");n.notificationManager.open({text:l,type:"info"})}},C=function(t){return function(e){H(t,e)}},A=function(e){e.addButton("template",{title:"Insert template",onclick:l(e.settings,C(e))}),e.addMenuItem("template",{text:"Template",onclick:l(e.settings,C(e)),icon:"template",context:"insert"})};e.add("template",function(e){A(e),S(e),w(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,o){var r;return t.dom.getParents(t.selection.getStart(),function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=e)}),r},g=function(t){var e,o=[];for(e=0;e<t.length;e+=2)o.push({text:t[e+1],color:"#"+t[e]});return o},r=function(t,e,o){t.undoManager.transact(function(){t.focus(),t.formatter.apply(e,{value:o}),t.nodeChanged()})},e=function(t,e){t.undoManager.transact(function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()})},o=function(o){o.addCommand("mceApplyTextcolor",function(t,e){r(o,t,e)}),o.addCommand("mceRemoveTextcolor",function(t){e(o,t)})},F=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],l=function(t){return t.getParam("textcolor_map",a)},c=function(t){return t.getParam("textcolor_rows",5)},u=function(t){return t.getParam("textcolor_cols",8)},m=function(t){return t.getParam("color_picker_callback",null)},s=function(t){return t.getParam("forecolor_map",l(t))},d=function(t){return t.getParam("backcolor_map",l(t))},f=function(t){return t.getParam("forecolor_rows",c(t))},b=function(t){return t.getParam("backcolor_rows",c(t))},p=function(t){return t.getParam("forecolor_cols",u(t))},C=function(t){return t.getParam("backcolor_cols",u(t))},y=m,v=function(t){return"function"==typeof m(t)},h=tinymce.util.Tools.resolve("tinymce.util.I18n"),P=function(t,e,o,r){var n,a,l,c,i,u,m,s=0,d=F.DOM.uniqueId("mcearia"),f=function(t,e){var o="transparent"===t;return'<td class="mce-grid-cell'+(o?" mce-colorbtn-trans":"")+'"><div id="'+d+"-"+s+++'" data-mce-color="'+(t||"")+'" role="option" tabIndex="-1" style="'+(t?"background-color: "+t:"")+'" title="'+h.translate(e)+'">'+(o?"×":"")+"</div></td>"};for((n=g(o)).push({text:h.translate("No color"),color:"transparent"}),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',c=n.length-1,u=0;u<e;u++){for(l+="<tr>",i=0;i<t;i++)l+=c<(m=u*t+i)?"<td></td>":f((a=n[m]).color,a.text);l+="</tr>"}if(r){for(l+='<tr><td colspan="'+t+'" class="mce-custom-color-btn"><div id="'+d+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+d+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+h.translate("Custom...")+"</button></div></td></tr>",l+="<tr>",i=0;i<t;i++)l+=f("","Custom color");l+="</tr>"}return l+="</tbody></table>"},k=function(t,e){t.style.background=e,t.setAttribute("data-mce-color",e)},x=function(o){return function(t){var e=t.control;e._color?o.execCommand("mceApplyTextcolor",e.settings.format,e._color):o.execCommand("mceRemoveTextcolor",e.settings.format)}},T=function(r,c){return function(t){var e,a=this.parent(),o=n(r,a.settings.format),l=function(t){r.execCommand("mceApplyTextcolor",a.settings.format,t),a.hidePanel(),a.color(t)};F.DOM.getParent(t.target,".mce-custom-color-btn")&&(a.hidePanel(),y(r).call(r,function(t){var e,o,r,n=a.panel.getEl().getElementsByTagName("table")[0];for(e=i.map(n.rows[n.rows.length-1].childNodes,function(t){return t.firstChild}),r=0;r<e.length&&(o=e[r]).getAttribute("data-mce-color");r++);if(r===c)for(r=0;r<c-1;r++)k(e[r],e[r+1].getAttribute("data-mce-color"));k(o,t),l(t)},o)),(e=t.target.getAttribute("data-mce-color"))?(this.lastId&&F.DOM.get(this.lastId).setAttribute("aria-selected","false"),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,"transparent"===e?(r.execCommand("mceRemoveTextcolor",a.settings.format),a.hidePanel(),a.resetColor()):l(e)):null!==e&&a.hidePanel()}},_=function(n,a){return function(){var t=a?p(n):C(n),e=a?f(n):b(n),o=a?s(n):d(n),r=v(n);return P(t,e,o,r)}},A=function(t){t.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!0),onclick:T(t,p(t))},onclick:x(t)}),t.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!1),onclick:T(t,C(t))},onclick:x(t)})};t.add("textcolor",function(t){o(t),A(t)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var r=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return r(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return{setPatterns:function(t){e.set(t)},getPatterns:function(){return e.get()}}},e=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"***",end:"***",format:["bold","italic"]},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],a=function(t){return t.textpattern_patterns!==undefined?t.textpattern_patterns:e},o=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=tinymce.util.Tools.resolve("tinymce.util.VK"),g=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=function(t,e){for(var n=0;n<t.length;n++)if(0===e.indexOf(t[n].start)&&(!t[n].end||e.lastIndexOf(t[n].end)===e.length-t[n].end.length))return t[n]},c=function(t,e,n,r){var a,o,i,s,d,f,l=t.sort(function(t,e){return t.start.length>e.start.length?-1:t.start.length<e.start.length?1:0});for(o=0;o<l.length;o++)if((a=l[o]).end!==undefined&&(s=a,d=n,f=r,e.substr(d-s.end.length-f,s.end.length)===s.end)&&0<n-r-(i=a).end.length-i.start.length)return a},s=function(t,e,n){if(!1!==e.collapsed){var r=e.startContainer,a=r.data,o=!0===n?1:0;if(3===r.nodeType){var i=c(t,a,e.startOffset,o);if(i!==undefined){var s=a.lastIndexOf(i.end,e.startOffset-o),d=a.lastIndexOf(i.start,s-i.end.length);if(s=a.indexOf(i.end,d+i.start.length),-1!==d){var f=document.createRange();f.setStart(r,d),f.setEnd(r,s+i.end.length);var l=m(t,f.toString());if(!(i===undefined||l!==i||r.data.length<=i.start.length+i.end.length))return{pattern:i,startOffset:d,endOffset:s}}}}}},d=function(t,e,n){var r=t.selection.getRng(!0),a=s(e,r,n);if(a)return function(a,o,i,t){var s=h.isArray(i.pattern.format)?i.pattern.format:[i.pattern.format];if(0!==h.grep(s,function(t){var e=a.formatter.get(t);return e&&e[0].inline}).length)return a.undoManager.transact(function(){var t,e,n,r;t=o,e=i.pattern,n=i.endOffset,r=i.startOffset,(t=0<r?t.splitText(r):t).splitText(n-r+e.end.length),t.deleteData(0,e.start.length),t.deleteData(t.data.length-e.end.length,e.end.length),o=t,s.forEach(function(t){a.formatter.apply(t,{},o)})}),o}(t,r.startContainer,a)},f=function(t,e){return d(t,e,!0)},l=function(t,e){return d(t,e,!1)},u=function(t,e){var n,r,a,o,i,s,d,f,l,c,u;if(n=t.selection,r=t.dom,n.isCollapsed()&&(d=r.getParent(n.getStart(),"p"))){for(l=new g(d,d);i=l.next();)if(3===i.nodeType){o=i;break}if(o){if(!(f=m(e,o.data)))return;if(a=(c=n.getRng(!0)).startContainer,u=c.startOffset,o===a&&(u=Math.max(0,u-f.start.length)),h.trim(o.data).length===f.start.length)return;f.format&&(s=t.formatter.get(f.format))&&s[0].block&&(o.deleteData(0,f.start.length),t.formatter.apply(f.format,{},o),c.setStart(a,u),c.collapse(!0),n.setRng(c)),f.cmd&&t.undoManager.transact(function(){o.deleteData(0,f.start.length),t.execCommand(f.cmd)})}}},p=function(t,e,n){for(var r=0;r<t.length;r++)if(n(t[r],e))return!0},y={handleEnter:function(t,e){var n,r;(n=l(t,e))&&((r=t.dom.createRng()).setStart(n,n.data.length),r.setEnd(n,n.data.length),t.selection.setRng(r)),u(t,e)},handleInlineKey:function(t,e){var n,r,a,o,i;(n=f(t,e))&&(i=t.dom,r=n.data.slice(-1),/[\u00a0 ]/.test(r)&&(n.deleteData(n.data.length-1,1),a=i.doc.createTextNode(r),i.insertAfter(a,n.parentNode),(o=i.createRng()).setStart(a,1),o.setEnd(a,1),t.selection.setRng(o)))},checkCharCode:function(t,e){return p(t,e,function(t,e){return t.charCodeAt(0)===e.charCode})},checkKeyCode:function(t,e){return p(t,e,function(t,e){return t===e.keyCode&&!1===i.modifierPressed(e)})}},v=function(e,n){var r=[",",".",";",":","!","?"],a=[32];e.on("keydown",function(t){13!==t.keyCode||i.modifierPressed(t)||y.handleEnter(e,n.get())},!0),e.on("keyup",function(t){y.checkKeyCode(a,t)&&y.handleInlineKey(e,n.get())}),e.on("keypress",function(t){y.checkCharCode(r,t)&&o.setEditorTimeout(e,function(){y.handleInlineKey(e,n.get())})})};t.add("textpattern",function(t){var e=r(a(t.settings));return v(t,e),n(e)})}();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){"use strict";var e,n,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.util.I18n"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("toc_class","mce-toc")},m=function(t){var e=t.getParam("toc_header","h2");return/^h[1-6]$/.test(e)?e:"h2"},c=function(t){var e=parseInt(t.getParam("toc_depth","3"),10);return 1<=e&&e<=9?e:3},a=(e="mcetoc_",n=0,function(){var t=(new Date).getTime().toString(32);return e+t+(n++).toString(32)}),v=function(n){var o=l(n),t=m(n),e=function(t){var e,n=[];for(e=1;e<=t;e++)n.push("h"+e);return n.join(",")}(c(n)),r=n.$(e);return r.length&&/^h[1-9]$/i.test(t)&&(r=r.filter(function(t,e){return!n.dom.hasClass(e.parentNode,o)})),i.map(r,function(t){return{id:t.id?t.id:a(),level:parseInt(t.nodeName.replace(/^H/i,""),10),title:n.$.text(t),element:t}})},d=function(t){var e,n,o,r,i,c,l,a="",d=v(t),u=function(t){var e,n=9;for(e=0;e<t.length;e++)if(t[e].level<n&&(n=t[e].level),1===n)return n;return n}(d)-1;if(!d.length)return"";for(a+=(i=m(t),c=f.translate("Table of Contents"),l="</"+i+">","<"+i+' contenteditable="true">'+s.DOM.encode(c)+l),e=0;e<d.length;e++){if((o=d[e]).element.id=o.id,r=d[e+1]&&d[e+1].level,u===o.level)a+="<li>";else for(n=u;n<o.level;n++)a+="<ul><li>";if(a+='<a href="#'+o.id+'">'+o.title+"</a>",r!==o.level&&r)for(n=o.level;r<n;n--)a+="</li></ul><li>";else a+="</li>",r||(a+="</ul>");u=o.level}return a},u=function(t){var e=l(t),n=t.$("."+e);n.length&&t.undoManager.transact(function(){n.html(d(t))})},o={hasHeaders:function(t){return 0<v(t).length},insertToc:function(t){var e,n,o,r,i=l(t),c=t.$("."+i);o=t,!(r=c).length||0<o.dom.getParents(r[0],".mce-offscreen-selection").length?t.insertContent((n=d(e=t),'<div class="'+e.dom.encode(l(e))+'" contenteditable="false">'+n+"</div>")):u(t)},updateToc:u},r=function(t){t.addCommand("mceInsertToc",function(){o.insertToc(t)}),t.addCommand("mceUpdateToc",function(){o.updateToc(t)})},h=function(t){var n=t.$,o=l(t);t.on("PreProcess",function(t){var e=n("."+o,t.node);e.length&&(e.removeAttr("contentEditable"),e.find("[contenteditable]").removeAttr("contentEditable"))}),t.on("SetContent",function(){var t=n("."+o);t.length&&(t.attr("contentEditable",!1),t.children(":first-child").attr("contentEditable",!0))})},g=function(n){return function(t){var e=t.control;n.on("LoadContent SetContent change",function(){e.disabled(n.readonly||!o.hasHeaders(n))})}},T=function(t){var e;t.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:g(t)}),t.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),t.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:g(t)}),t.addContextToolbar((e=t,function(t){return t&&e.dom.is(t,"."+l(e))&&e.getBody().contains(t)}),"tocupdate")};t.add("toc",function(t){r(t),T(t),h(t)})}();
|
@@ -0,0 +1,154 @@
|
|
1
|
+
.mce-visualblocks p {
|
2
|
+
padding-top: 10px;
|
3
|
+
border: 1px dashed #BBB;
|
4
|
+
margin-left: 3px;
|
5
|
+
background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
|
6
|
+
background-repeat: no-repeat;
|
7
|
+
}
|
8
|
+
|
9
|
+
.mce-visualblocks h1 {
|
10
|
+
padding-top: 10px;
|
11
|
+
border: 1px dashed #BBB;
|
12
|
+
margin-left: 3px;
|
13
|
+
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
|
14
|
+
background-repeat: no-repeat;
|
15
|
+
}
|
16
|
+
|
17
|
+
.mce-visualblocks h2 {
|
18
|
+
padding-top: 10px;
|
19
|
+
border: 1px dashed #BBB;
|
20
|
+
margin-left: 3px;
|
21
|
+
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
|
22
|
+
background-repeat: no-repeat;
|
23
|
+
}
|
24
|
+
|
25
|
+
.mce-visualblocks h3 {
|
26
|
+
padding-top: 10px;
|
27
|
+
border: 1px dashed #BBB;
|
28
|
+
margin-left: 3px;
|
29
|
+
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
|
30
|
+
background-repeat: no-repeat;
|
31
|
+
}
|
32
|
+
|
33
|
+
.mce-visualblocks h4 {
|
34
|
+
padding-top: 10px;
|
35
|
+
border: 1px dashed #BBB;
|
36
|
+
margin-left: 3px;
|
37
|
+
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
|
38
|
+
background-repeat: no-repeat;
|
39
|
+
}
|
40
|
+
|
41
|
+
.mce-visualblocks h5 {
|
42
|
+
padding-top: 10px;
|
43
|
+
border: 1px dashed #BBB;
|
44
|
+
margin-left: 3px;
|
45
|
+
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
|
46
|
+
background-repeat: no-repeat;
|
47
|
+
}
|
48
|
+
|
49
|
+
.mce-visualblocks h6 {
|
50
|
+
padding-top: 10px;
|
51
|
+
border: 1px dashed #BBB;
|
52
|
+
margin-left: 3px;
|
53
|
+
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
|
54
|
+
background-repeat: no-repeat;
|
55
|
+
}
|
56
|
+
|
57
|
+
.mce-visualblocks div:not([data-mce-bogus]) {
|
58
|
+
padding-top: 10px;
|
59
|
+
border: 1px dashed #BBB;
|
60
|
+
margin-left: 3px;
|
61
|
+
background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
|
62
|
+
background-repeat: no-repeat;
|
63
|
+
}
|
64
|
+
|
65
|
+
.mce-visualblocks section {
|
66
|
+
padding-top: 10px;
|
67
|
+
border: 1px dashed #BBB;
|
68
|
+
margin: 0 0 1em 3px;
|
69
|
+
background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
|
70
|
+
background-repeat: no-repeat;
|
71
|
+
}
|
72
|
+
|
73
|
+
.mce-visualblocks article {
|
74
|
+
padding-top: 10px;
|
75
|
+
border: 1px dashed #BBB;
|
76
|
+
margin: 0 0 1em 3px;
|
77
|
+
background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
|
78
|
+
background-repeat: no-repeat;
|
79
|
+
}
|
80
|
+
|
81
|
+
.mce-visualblocks blockquote {
|
82
|
+
padding-top: 10px;
|
83
|
+
border: 1px dashed #BBB;
|
84
|
+
background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
|
85
|
+
background-repeat: no-repeat;
|
86
|
+
}
|
87
|
+
|
88
|
+
.mce-visualblocks address {
|
89
|
+
padding-top: 10px;
|
90
|
+
border: 1px dashed #BBB;
|
91
|
+
margin: 0 0 1em 3px;
|
92
|
+
background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
|
93
|
+
background-repeat: no-repeat;
|
94
|
+
}
|
95
|
+
|
96
|
+
.mce-visualblocks pre {
|
97
|
+
padding-top: 10px;
|
98
|
+
border: 1px dashed #BBB;
|
99
|
+
margin-left: 3px;
|
100
|
+
background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
|
101
|
+
background-repeat: no-repeat;
|
102
|
+
}
|
103
|
+
|
104
|
+
.mce-visualblocks figure {
|
105
|
+
padding-top: 10px;
|
106
|
+
border: 1px dashed #BBB;
|
107
|
+
margin: 0 0 1em 3px;
|
108
|
+
background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
|
109
|
+
background-repeat: no-repeat;
|
110
|
+
}
|
111
|
+
|
112
|
+
.mce-visualblocks hgroup {
|
113
|
+
padding-top: 10px;
|
114
|
+
border: 1px dashed #BBB;
|
115
|
+
margin: 0 0 1em 3px;
|
116
|
+
background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
|
117
|
+
background-repeat: no-repeat;
|
118
|
+
}
|
119
|
+
|
120
|
+
.mce-visualblocks aside {
|
121
|
+
padding-top: 10px;
|
122
|
+
border: 1px dashed #BBB;
|
123
|
+
margin: 0 0 1em 3px;
|
124
|
+
background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
|
125
|
+
background-repeat: no-repeat;
|
126
|
+
}
|
127
|
+
|
128
|
+
.mce-visualblocks figcaption {
|
129
|
+
border: 1px dashed #BBB;
|
130
|
+
}
|
131
|
+
|
132
|
+
.mce-visualblocks ul {
|
133
|
+
padding-top: 10px;
|
134
|
+
border: 1px dashed #BBB;
|
135
|
+
margin: 0 0 1em 3px;
|
136
|
+
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
|
137
|
+
background-repeat: no-repeat;
|
138
|
+
}
|
139
|
+
|
140
|
+
.mce-visualblocks ol {
|
141
|
+
padding-top: 10px;
|
142
|
+
border: 1px dashed #BBB;
|
143
|
+
margin: 0 0 1em 3px;
|
144
|
+
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
|
145
|
+
background-repeat: no-repeat;
|
146
|
+
}
|
147
|
+
|
148
|
+
.mce-visualblocks dl {
|
149
|
+
padding-top: 10px;
|
150
|
+
border: 1px dashed #BBB;
|
151
|
+
margin: 0 0 1em 3px;
|
152
|
+
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
|
153
|
+
background-repeat: no-repeat;
|
154
|
+
}
|