diff --git a/README.md b/README.md index deffa2a5..08451b6d 100644 --- a/README.md +++ b/README.md @@ -2,33 +2,26 @@ Addons for Friendica ==================== This repository is a collection of addons for the [Friendica Social Communications Server](https://github.com/friendica/friendica). -You can add these addons to the /addon directory of your Friendica installation -do extend the functionality of your node. +You can add these addons to the /addon directory of your Friendica installation do extend the functionality of your node. -After uploading the addons to your server, you need to activate the desired addons -in the Admin panel. Addons not activated have no effect on your node. +After uploading the addons to your server, you need to activate the desired addons in the Admin panel. Addons not activated have no effect on your node. -You can find more addons in the [Friendica Addon listing](https://addons.friendo.ca) -in cases the addon developers have choosen not to include them here. +You can find more addons in the [Friendica Addon listing](https://addons.friendo.ca) in cases the addon developers have choosen not to include them here. -Connectors ----------- +## Connectors -Among these addons there are also the [connectors](https://github.com/friendica/friendica/blob/master/doc/Connectors.md) for various other networks -(e.g. Twitter, pump.io, Google+) that are needed for communication when the -protocoll is not supported by Friendica core (DFRN, OStatus and Diaspora). +Among these addons there are also the [connectors](https://github.com/friendica/friendica/blob/master/doc/Connectors.md) for various other networks (e.g. Twitter, pump.io, Google+) that are needed for communication when the protocol is not supported by Friendica core (DFRN, OStatus and Diaspora). -For communication with contacts in networks supporting those (e.g. GNU social, -Diaspora and red#matrix) you just need to access the page configuration in the -Admin panel and enable them. For networks where communication is only possible -the API access to a remote account, you need to activate the fitting connectors. +For communication with contacts in networks supporting those (e.g. GNU social, Diaspora and red#matrix) you just need to access the page configuration in the Admin panel and enable them. For networks where communication is only possible the API access to a remote account, you need to activate the fitting connectors. -Development ------------ +## Development -The addon interface of Friendica is very flexible and powerful, so if you are -missing functionality, your chances are high it may be added with an addon. -See the [documentation](https://github.com/friendica/friendica/blob/master/doc/Addons.md) for more informations on the addon development. +The addon interface of Friendica is very flexible and powerful, so if you are missing functionality, your chances are high it may be added with an addon. +See the [documentation](https://github.com/friendica/friendica/blob/master/doc/Addons.md) for more information on the addon development. -Addons can be translated like any other part of Friendica. Translations for the -addons included in this repository are done at the [Transifex project](https://www.transifex.com/projects/p/friendica/) for Friendica. +## Translation + +Addons can be translated like any other part of Friendica. +Translation for addons is done at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/). + +Read more about the workflow in the [Friendica translation documentation](https://github.com/friendica/friendica/blob/master/doc/translations.md#addon). diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php index 74728c04..a00f2f07 100644 --- a/advancedcontentfilter/advancedcontentfilter.php +++ b/advancedcontentfilter/advancedcontentfilter.php @@ -34,11 +34,13 @@ */ use Friendica\App; +use Friendica\BaseModule; use Friendica\Content\Text\Markdown; use Friendica\Core\Addon; use Friendica\Core\Cache; use Friendica\Core\L10n; -use Friendica\Core\System; +use Friendica\Core\Logger; +use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\Database\DBStructure; use Friendica\Model\Item; @@ -53,7 +55,6 @@ use Symfony\Component\ExpressionLanguage; require_once 'boot.php'; require_once 'include/conversation.php'; require_once 'include/dba.php'; -require_once 'include/security.php'; require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; @@ -65,7 +66,7 @@ function advancedcontentfilter_install() DBStructure::update(false, true); - logger("installed advancedcontentfilter"); + Logger::log("installed advancedcontentfilter"); } function advancedcontentfilter_uninstall() @@ -90,7 +91,7 @@ function advancedcontentfilter_dbstructure_definition(App $a, &$database) "expression" => ["type" => "mediumtext" , "not null" => "1", "comment" => "Expression text"], "serialized" => ["type" => "mediumtext" , "not null" => "1", "comment" => "Serialized parsed expression"], "active" => ["type" => "boolean" , "not null" => "1", "default" => "1", "comment" => "Whether the rule is active or not"], - "created" => ["type" => "datetime" , "not null" => "1", "default" => NULL_DATE, "comment" => "Creation date"], + "created" => ["type" => "datetime" , "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -207,8 +208,8 @@ function advancedcontentfilter_content(App $a) return $html; } else { - $t = get_markup_template('settings.tpl', 'addon/advancedcontentfilter/'); - return replace_macros($t, [ + $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/advancedcontentfilter/'); + return Renderer::replaceMacros($t, [ '$messages' => [ 'backtosettings' => L10n::t('Back to Addon Settings'), 'title' => L10n::t('Advanced Content Filter'), @@ -234,7 +235,7 @@ function advancedcontentfilter_content(App $a) ], '$current_theme' => $a->getCurrentTheme(), '$rules' => advancedcontentfilter_get_rules(), - '$form_security_token' => get_form_security_token() + '$form_security_token' => BaseModule::getFormSecurityToken() ]); } } @@ -322,7 +323,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request) throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method')); } - if (!check_form_security_token()) { + if (!BaseModule::checkFormSecurityToken()) { throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.')); } @@ -356,7 +357,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method')); } - if (!check_form_security_token()) { + if (!BaseModule::checkFormSecurityToken()) { throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.')); } @@ -385,7 +386,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method')); } - if (!check_form_security_token()) { + if (!BaseModule::checkFormSecurityToken()) { throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.')); } diff --git a/advancedcontentfilter/composer.json b/advancedcontentfilter/composer.json index 576bbce7..93b19cd5 100644 --- a/advancedcontentfilter/composer.json +++ b/advancedcontentfilter/composer.json @@ -5,7 +5,7 @@ "authors": [ { "name": "Hypolite Petovan", - "email": "mrpetovan@gmail.com", + "email": "hypolite@mrpetovan.com", "homepage": "https://friendica.mrpetovan.com/profile/hypolite", "role": "Developer" } diff --git a/advancedcontentfilter/lang/fr/messages.po b/advancedcontentfilter/lang/fr/messages.po new file mode 100644 index 00000000..0d76f672 --- /dev/null +++ b/advancedcontentfilter/lang/fr/messages.po @@ -0,0 +1,167 @@ +# ADDON advancedcontentfilter +# Copyright (C) +# This file is distributed under the same license as the Friendica advancedcontentfilter addon package. +# +# +# Translators: +# Marie Olive , 2018 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-17 04:04+0200\n" +"PO-Revision-Date: 2018-05-24 06:41+0000\n" +"Last-Translator: Marie Olive , 2018\n" +"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: advancedcontentfilter.php:134 +#, php-format +msgid "Filtered by rule: %s" +msgstr "Filtrer par règle:%s" + +#: advancedcontentfilter.php:147 advancedcontentfilter.php:204 +msgid "Advanced Content Filter" +msgstr "Filtre avancé de contenu" + +#: advancedcontentfilter.php:203 +msgid "Back to Addon Settings" +msgstr "Retour aux paramètres de l'extension" + +#: advancedcontentfilter.php:205 +msgid "Add a Rule" +msgstr "Ajouter une règle" + +#: advancedcontentfilter.php:206 +msgid "Help" +msgstr "Aide" + +#: advancedcontentfilter.php:207 +msgid "" +"Add and manage your personal content filter rules in this screen. Rules have" +" a name and an arbitrary expression that will be matched against post data. " +"For a complete reference of the available operations and variables, check " +"the help page." +msgstr "" + +#: advancedcontentfilter.php:208 +msgid "Your rules" +msgstr "Vos règles" + +#: advancedcontentfilter.php:209 +msgid "" +"You have no rules yet! Start adding one by clicking on the button above next" +" to the title." +msgstr "" + +#: advancedcontentfilter.php:210 +msgid "Disabled" +msgstr "" + +#: advancedcontentfilter.php:211 +msgid "Enabled" +msgstr "" + +#: advancedcontentfilter.php:212 +msgid "Disable this rule" +msgstr "" + +#: advancedcontentfilter.php:213 +msgid "Enable this rule" +msgstr "" + +#: advancedcontentfilter.php:214 +msgid "Edit this rule" +msgstr "" + +#: advancedcontentfilter.php:215 +msgid "Edit the rule" +msgstr "" + +#: advancedcontentfilter.php:216 +msgid "Save this rule" +msgstr "" + +#: advancedcontentfilter.php:217 +msgid "Delete this rule" +msgstr "" + +#: advancedcontentfilter.php:218 +msgid "Rule" +msgstr "" + +#: advancedcontentfilter.php:219 +msgid "Close" +msgstr "" + +#: advancedcontentfilter.php:220 +msgid "Add new rule" +msgstr "" + +#: advancedcontentfilter.php:221 +msgid "Rule Name" +msgstr "" + +#: advancedcontentfilter.php:222 +msgid "Rule Expression" +msgstr "" + +#: advancedcontentfilter.php:223 +msgid "" +"

Examples:

" +msgstr "" + +#: advancedcontentfilter.php:224 +msgid "Cancel" +msgstr "" + +#: advancedcontentfilter.php:290 advancedcontentfilter.php:301 +#: advancedcontentfilter.php:312 advancedcontentfilter.php:346 +#: advancedcontentfilter.php:375 advancedcontentfilter.php:396 +msgid "You must be logged in to use this method" +msgstr "" + +#: advancedcontentfilter.php:316 advancedcontentfilter.php:350 +#: advancedcontentfilter.php:379 +msgid "Invalid form security token, please refresh the page." +msgstr "" + +#: advancedcontentfilter.php:328 +msgid "The rule name and expression are required." +msgstr "" + +#: advancedcontentfilter.php:340 +msgid "Rule successfully added" +msgstr "" + +#: advancedcontentfilter.php:354 advancedcontentfilter.php:383 +msgid "Rule doesn't exist or doesn't belong to you." +msgstr "" + +#: advancedcontentfilter.php:369 +msgid "Rule successfully updated" +msgstr "" + +#: advancedcontentfilter.php:390 +msgid "Rule successfully deleted" +msgstr "" + +#: advancedcontentfilter.php:400 +msgid "Missing argument: guid." +msgstr "" + +#: advancedcontentfilter.php:406 +#, php-format +msgid "Unknown post with guid: %s" +msgstr "" + +#: src/middlewares.php:28 +msgid "Method not found" +msgstr "" diff --git a/advancedcontentfilter/lang/fr/strings.php b/advancedcontentfilter/lang/fr/strings.php new file mode 100644 index 00000000..5ff20251 --- /dev/null +++ b/advancedcontentfilter/lang/fr/strings.php @@ -0,0 +1,41 @@ + 1);; +}} +; +$a->strings["Filtered by rule: %s"] = "Filtrer par règle:%s"; +$a->strings["Advanced Content Filter"] = "Filtre avancé de contenu"; +$a->strings["Back to Addon Settings"] = "Retour aux paramètres de l'extension"; +$a->strings["Add a Rule"] = "Ajouter une règle"; +$a->strings["Help"] = "Aide"; +$a->strings["Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page."] = ""; +$a->strings["Your rules"] = "Vos règles"; +$a->strings["You have no rules yet! Start adding one by clicking on the button above next to the title."] = ""; +$a->strings["Disabled"] = ""; +$a->strings["Enabled"] = ""; +$a->strings["Disable this rule"] = ""; +$a->strings["Enable this rule"] = ""; +$a->strings["Edit this rule"] = ""; +$a->strings["Edit the rule"] = ""; +$a->strings["Save this rule"] = ""; +$a->strings["Delete this rule"] = ""; +$a->strings["Rule"] = ""; +$a->strings["Close"] = ""; +$a->strings["Add new rule"] = ""; +$a->strings["Rule Name"] = ""; +$a->strings["Rule Expression"] = ""; +$a->strings["

Examples:

"] = ""; +$a->strings["Cancel"] = ""; +$a->strings["You must be logged in to use this method"] = ""; +$a->strings["Invalid form security token, please refresh the page."] = ""; +$a->strings["The rule name and expression are required."] = ""; +$a->strings["Rule successfully added"] = ""; +$a->strings["Rule doesn't exist or doesn't belong to you."] = ""; +$a->strings["Rule successfully updated"] = ""; +$a->strings["Rule successfully deleted"] = ""; +$a->strings["Missing argument: guid."] = ""; +$a->strings["Unknown post with guid: %s"] = ""; +$a->strings["Method not found"] = ""; diff --git a/advancedcontentfilter/src/middlewares.php b/advancedcontentfilter/src/middlewares.php index 35153a21..32e8cb99 100644 --- a/advancedcontentfilter/src/middlewares.php +++ b/advancedcontentfilter/src/middlewares.php @@ -1,4 +1,5 @@ getContainer(); diff --git a/blackout/blackout.php b/blackout/blackout.php index 28e5567f..c0e0dc59 100644 --- a/blackout/blackout.php +++ b/blackout/blackout.php @@ -52,6 +52,8 @@ use Friendica\Core\Config; use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; +use Friendica\Core\Renderer; function blackout_install() { Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect'); @@ -84,8 +86,8 @@ function blackout_redirect ($a, $b) { $date2 = 0; } if (( $date1 <= $now ) && ( $now <= $date2 )) { - logger('redirecting user to blackout page'); - goaway($myurl); + Logger::log('redirecting user to blackout page'); + System::externalRedirect($myurl); } } @@ -96,9 +98,9 @@ function blackout_addon_admin(&$a, &$o) { if (! is_string($myend)) { $myend = "YYYY-MM-DD:hhmm"; } $myurl = Config::get('blackout','url'); if (! is_string($myurl)) { $myurl = "http://www.example.com"; } - $t = get_markup_template( "admin.tpl", "addon/blackout/" ); + $t = Renderer::getMarkupTemplate( "admin.tpl", "addon/blackout/" ); - $o = replace_macros($t, [ + $o = Renderer::replaceMacros($t, [ '$submit' => L10n::t('Save Settings'), '$rurl' => ["rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"], '$startdate' => ["startdate", "Begin of the Blackout
(YYYY-MM-DD hh:mm)", $mystart, "format is YYYY year, MM month, DD day, hh hour and mm minute"], diff --git a/blackout/lang/cs/messages.po b/blackout/lang/cs/messages.po index 1fa459af..a4a71e0d 100644 --- a/blackout/lang/cs/messages.po +++ b/blackout/lang/cs/messages.po @@ -4,24 +4,25 @@ # # # Translators: -# Michal Šupler , 2014 +# Aditoo, 2018 +# michal_s , 2014 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2014-07-02 15:28+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-09-02 17:54+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: blackout.php:99 msgid "Save Settings" -msgstr "Uložit Nastavení" +msgstr "Uložit nastavení" #: blackout.php:100 msgid "Redirect URL" @@ -49,4 +50,4 @@ msgstr "Konec odstávky" msgid "" "The end-date is prior to the start-date of the blackout, you should fix " "this." -msgstr "Datum konce odstávky je před datem zahájení odstávky prosím opravte to." +msgstr "Datum konce odstávky je před datem zahájení odstávky, prosím opravte to." diff --git a/blackout/lang/cs/strings.php b/blackout/lang/cs/strings.php index 6bca0c65..c1b8b66b 100644 --- a/blackout/lang/cs/strings.php +++ b/blackout/lang/cs/strings.php @@ -2,13 +2,14 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ - return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; + $n = intval($n); + return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; -$a->strings["Save Settings"] = "Uložit Nastavení"; +$a->strings["Save Settings"] = "Uložit nastavení"; $a->strings["Redirect URL"] = "URL Přesměrování"; $a->strings["all your visitors from the web will be redirected to this URL"] = "všichni vaši návštěvníci z webu budou přesměrování na tuto URL adresu"; $a->strings["Begin of the Blackout"] = "Zahájení odstávky"; $a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "formát je RRRR rok, MM měsíc, DD den, hh hodina a mm minuta"; $a->strings["End of the Blackout"] = "Konec odstávky"; -$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Datum konce odstávky je před datem zahájení odstávky prosím opravte to."; +$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Datum konce odstávky je před datem zahájení odstávky, prosím opravte to."; diff --git a/blackout/lang/fr/messages.po b/blackout/lang/fr/messages.po index b52d3809..8f241a71 100644 --- a/blackout/lang/fr/messages.po +++ b/blackout/lang/fr/messages.po @@ -5,14 +5,14 @@ # # Translators: # Damien Goutte-Gattat , 2015 -# Hypolite Petovan , 2016 +# Hypolite Petovan , 2016 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" "PO-Revision-Date: 2016-09-24 02:13+0000\n" -"Last-Translator: Hypolite Petovan \n" +"Last-Translator: Hypolite Petovan \n" "Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/blackout/lang/sv/messages.po b/blackout/lang/sv/messages.po index 2bb3aba4..af391856 100644 --- a/blackout/lang/sv/messages.po +++ b/blackout/lang/sv/messages.po @@ -4,14 +4,15 @@ # # # Translators: -# Jonatan Nyberg , 2017 +# Jonatan Nyberg, 2017 +# Tim Stahel , 2018 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2017-02-13 20:15+0000\n" -"Last-Translator: Jonatan Nyberg \n" +"PO-Revision-Date: 2018-11-13 12:35+0000\n" +"Last-Translator: Tim Stahel \n" "Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,28 +26,28 @@ msgstr "Spara inställningar" #: blackout.php:100 msgid "Redirect URL" -msgstr "" +msgstr "Omdirigera URL" #: blackout.php:100 msgid "all your visitors from the web will be redirected to this URL" -msgstr "" +msgstr "alla dina besökare från webben kommer omdirigeras till denna URL" #: blackout.php:101 msgid "Begin of the Blackout" -msgstr "" +msgstr "Start av blackouten" #: blackout.php:101 msgid "" "format is YYYY year, MM month, DD day, " "hh hour and mm minute" -msgstr "" +msgstr "format är ÅÅÅÅ år, MM månad, DD dag, hh timma och mm minut" #: blackout.php:102 msgid "End of the Blackout" -msgstr "" +msgstr "Slut av blackouten" #: blackout.php:108 msgid "" "The end-date is prior to the start-date of the blackout, you should fix " "this." -msgstr "" +msgstr "Slutdatumet är före startdatumet för blackouten, du borde fixa detta." diff --git a/blackout/lang/sv/strings.php b/blackout/lang/sv/strings.php index f467211a..2a008cca 100644 --- a/blackout/lang/sv/strings.php +++ b/blackout/lang/sv/strings.php @@ -2,13 +2,14 @@ if(! function_exists("string_plural_select_sv")) { function string_plural_select_sv($n){ + $n = intval($n); return ($n != 1);; }} ; $a->strings["Save Settings"] = "Spara inställningar"; -$a->strings["Redirect URL"] = ""; -$a->strings["all your visitors from the web will be redirected to this URL"] = ""; -$a->strings["Begin of the Blackout"] = ""; -$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = ""; -$a->strings["End of the Blackout"] = ""; -$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = ""; +$a->strings["Redirect URL"] = "Omdirigera URL"; +$a->strings["all your visitors from the web will be redirected to this URL"] = "alla dina besökare från webben kommer omdirigeras till denna URL"; +$a->strings["Begin of the Blackout"] = "Start av blackouten"; +$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "format är ÅÅÅÅ år, MM månad, DD dag, hh timma och mm minut"; +$a->strings["End of the Blackout"] = "Slut av blackouten"; +$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Slutdatumet är före startdatumet för blackouten, du borde fixa detta."; diff --git a/blockem/blockem.php b/blockem/blockem.php index c915cd6c..fbba29f4 100644 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -11,6 +11,7 @@ use Friendica\App; use Friendica\Core\Addon; use Friendica\Core\L10n; use Friendica\Core\PConfig; +use Friendica\Util\Strings; function blockem_install() { @@ -42,7 +43,7 @@ function blockem_addon_settings (App $a, &$s) } /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; $words = PConfig::get(local_user(), 'blockem', 'words'); @@ -100,7 +101,7 @@ function blockem_enotify_store(App $a, array &$b) continue; } - if (link_compare($b['url'], $word)) { + if (Strings::compareLink($b['url'], $word)) { $found = true; break; } @@ -133,7 +134,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data) $found = false; foreach ($profiles_array as $word) { - if (link_compare($hook_data['item']['author-link'], trim($word))) { + if (Strings::compareLink($hook_data['item']['author-link'], trim($word))) { $found = true; break; } @@ -147,7 +148,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data) function blockem_display_item(App $a, array &$b = null) { if (!empty($b['output']['body']) && strstr($b['output']['body'], 'id="blockem-wrap-')) { - $b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg"; + $b['output']['thumb'] = $a->getBaseURL() . "/images/person-80.jpg"; } } @@ -192,7 +193,7 @@ function blockem_item_photo_menu(App $a, array &$b) if (!empty($a->data['blockem'])) { foreach($a->data['blockem'] as $bloke) { - if (link_compare($bloke,$author)) { + if (Strings::compareLink($bloke,$author)) { $blocked = true; break; } @@ -231,7 +232,7 @@ function blockem_init(App $a) if (count($arr)) { foreach ($arr as $x) { - if (!link_compare(trim($x), trim($_GET['unblock']))) { + if (!Strings::compareLink(trim($x), trim($_GET['unblock']))) { $newarr[] = $x; } } diff --git a/blockem/lang/fr/messages.po b/blockem/lang/fr/messages.po new file mode 100644 index 00000000..a089b039 --- /dev/null +++ b/blockem/lang/fr/messages.po @@ -0,0 +1,61 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Hypolite Petovan , 2016 +# Marie Olive , 2018 +# StefOfficiel , 2015 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:23+0200\n" +"PO-Revision-Date: 2018-11-13 12:55+0000\n" +"Last-Translator: Marie Olive \n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: blockem.php:54 blockem.php:58 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:62 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Cache le contenu de l'utilisateur en contractant les publications. Remplace aussi leur avatar par une image générique." + +#: blockem.php:63 +msgid "Comma separated profile URLS:" +msgstr "URLs de profil séparées par des virgules:" + +#: blockem.php:67 +msgid "Save Settings" +msgstr "Sauvegarder les paramètres" + +#: blockem.php:81 +msgid "BLOCKEM Settings saved." +msgstr "Paramètres Blockem sauvegardés." + +#: blockem.php:143 +#, php-format +msgid "Filtered user: %s" +msgstr "Utilisateur filtré:%s" + +#: blockem.php:202 +msgid "Unblock Author" +msgstr "Débloquer l'Auteur" + +#: blockem.php:204 +msgid "Block Author" +msgstr "Bloquer l'Auteur" + +#: blockem.php:244 +msgid "blockem settings updated" +msgstr "Réglages Blockem mis à jour." diff --git a/blockem/lang/fr/strings.php b/blockem/lang/fr/strings.php index b9f31180..a4abe2da 100644 --- a/blockem/lang/fr/strings.php +++ b/blockem/lang/fr/strings.php @@ -1,10 +1,2 @@ -strings["\"Blockem\" Settings"] = "Réglages de Blockem"; -$a->strings["Comma separated profile URLS to block"] = "Liste d'URLS de profils à bloquer, séparés par des virgules"; -$a->strings["Submit"] = "Envoyer"; -$a->strings["BLOCKEM Settings saved."] = "Réglages Blockem sauvés."; -$a->strings["Blocked %s - Click to open/close"] = "Bloqué %s - Cliquez pour ouvrir/fermer"; -$a->strings["Unblock Author"] = "Débloquer l'auteur"; -$a->strings["Block Author"] = "Bloquer l'auteur"; -$a->strings["blockem settings updated"] = "Réglages blockem sauvés"; +page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ @@ -120,14 +124,29 @@ function blogger_settings(App $a, &$s) function blogger_settings_post(App $a, array &$b) { if (!empty($_POST['blogger-submit'])) { - PConfig::set(local_user(), 'blogger', 'post', intval($_POST['blogger'])); - PConfig::set(local_user(), 'blogger', 'post_by_default', intval($_POST['bl_bydefault'])); + PConfig::set(local_user(), 'blogger', 'post', defaults($_POST, 'blogger', false)); + PConfig::set(local_user(), 'blogger', 'post_by_default', defaults($_POST, 'bl_bydefault', false)); PConfig::set(local_user(), 'blogger', 'bl_username', trim($_POST['bl_username'])); PConfig::set(local_user(), 'blogger', 'bl_password', trim($_POST['bl_password'])); PConfig::set(local_user(), 'blogger', 'bl_blog', trim($_POST['bl_blog'])); } } +function blogger_hook_fork(App &$a, array &$b) +{ + if ($b['name'] != 'notifier_normal') { + return; + } + + $post = $b['data']; + + if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) || + !strstr($post['postopts'], 'blogger') || ($post['parent'] != $post['id'])) { + $b['execute'] = false; + return; + } +} + function blogger_post_local(App $a, array &$b) { // This can probably be changed to allow editing by pointing to a different API endpoint @@ -146,7 +165,7 @@ function blogger_post_local(App $a, array &$b) $bl_post = intval(PConfig::get(local_user(), 'blogger', 'post')); - $bl_enable = (($bl_post && x($_REQUEST, 'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0); + $bl_enable = (($bl_post && !empty($_REQUEST['blogger_enable'])) ? intval($_REQUEST['blogger_enable']) : 0); if ($b['api_source'] && intval(PConfig::get(local_user(), 'blogger', 'post_by_default'))) { $bl_enable = 1; @@ -177,14 +196,14 @@ function blogger_send(App $a, array &$b) return; } - $bl_username = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_username')); - $bl_password = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_password')); + $bl_username = XML::escape(PConfig::get($b['uid'], 'blogger', 'bl_username')); + $bl_password = XML::escape(PConfig::get($b['uid'], 'blogger', 'bl_password')); $bl_blog = PConfig::get($b['uid'], 'blogger', 'bl_blog'); if ($bl_username && $bl_password && $bl_blog) { $title = '' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . ''; $post = $title . BBCode::convert($b['body']); - $post = xmlify($post); + $post = XML::escape($post); $xml = <<< EOT @@ -202,12 +221,12 @@ function blogger_send(App $a, array &$b) EOT; - logger('blogger: data: ' . $xml, LOGGER_DATA); + Logger::log('blogger: data: ' . $xml, Logger::DATA); if ($bl_blog !== 'test') { - $x = Network::post($bl_blog, $xml); + $x = Network::post($bl_blog, $xml)->getBody(); } - logger('posted to blogger: ' . (($x) ? $x : ''), LOGGER_DEBUG); + Logger::log('posted to blogger: ' . (($x) ? $x : ''), Logger::DEBUG); } } diff --git a/blogger/lang/fr/messages.po b/blogger/lang/fr/messages.po index 497bf0be..119fcb56 100644 --- a/blogger/lang/fr/messages.po +++ b/blogger/lang/fr/messages.po @@ -4,14 +4,16 @@ # # # Translators: -# Nicola Spanti , 2015 +# Hypolite Petovan , 2016 +# Marie Olive , 2018 +# RyDroid , 2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2015-08-30 17:07+0000\n" -"Last-Translator: Nicola Spanti \n" +"PO-Revision-Date: 2018-11-13 12:44+0000\n" +"Last-Translator: Marie Olive \n" "Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,11 +27,11 @@ msgstr "Poster sur Blogger" #: blogger.php:74 blogger.php:78 msgid "Blogger Export" -msgstr "" +msgstr "Export Blogger" #: blogger.php:82 msgid "Enable Blogger Post Addon" -msgstr "Activer le connecteur Blogger" +msgstr "Activer l'extension de publication Blogger" #: blogger.php:87 msgid "Blogger username" @@ -45,7 +47,7 @@ msgstr "URL de l'API de Blogger" #: blogger.php:102 msgid "Post to Blogger by default" -msgstr "" +msgstr "Poster sur Blogger par défaut" #: blogger.php:108 msgid "Save Settings" @@ -53,4 +55,4 @@ msgstr "Sauvegarder les paramètres" #: blogger.php:178 msgid "Post from Friendica" -msgstr "" +msgstr "Publier depuis Friendica" diff --git a/blogger/lang/fr/strings.php b/blogger/lang/fr/strings.php index 89a429ae..a1500c11 100644 --- a/blogger/lang/fr/strings.php +++ b/blogger/lang/fr/strings.php @@ -2,15 +2,16 @@ if(! function_exists("string_plural_select_fr")) { function string_plural_select_fr($n){ + $n = intval($n); return ($n > 1);; }} ; $a->strings["Post to blogger"] = "Poster sur Blogger"; -$a->strings["Blogger Export"] = ""; -$a->strings["Enable Blogger Post Addon"] = "Activer le connecteur Blogger"; +$a->strings["Blogger Export"] = "Export Blogger"; +$a->strings["Enable Blogger Post Addon"] = "Activer l'extension de publication Blogger"; $a->strings["Blogger username"] = "Nom d'utilisateur Blogger"; $a->strings["Blogger password"] = "Mot de passe Blogger"; $a->strings["Blogger API URL"] = "URL de l'API de Blogger"; -$a->strings["Post to Blogger by default"] = ""; +$a->strings["Post to Blogger by default"] = "Poster sur Blogger par défaut"; $a->strings["Save Settings"] = "Sauvegarder les paramètres"; -$a->strings["Post from Friendica"] = ""; +$a->strings["Post from Friendica"] = "Publier depuis Friendica"; diff --git a/buffer/buffer.php b/buffer/buffer.php index 4fc45c85..385bdd5b 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -12,14 +12,18 @@ use Friendica\Content\Text\Plaintext; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Core\Protocol; +use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\Model\ItemContent; use Friendica\Util\Proxy as ProxyUtils; +use Friendica\Util\Strings; function buffer_install() { + Addon::registerHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork'); Addon::registerHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local'); Addon::registerHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send'); Addon::registerHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets'); @@ -29,6 +33,7 @@ function buffer_install() function buffer_uninstall() { + Addon::unregisterHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork'); Addon::unregisterHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local'); Addon::unregisterHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send'); Addon::unregisterHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets'); @@ -69,9 +74,9 @@ function buffer_content(App $a) function buffer_addon_admin(App $a, &$o) { - $t = get_markup_template("admin.tpl", "addon/buffer/"); + $t = Renderer::getMarkupTemplate("admin.tpl", "addon/buffer/"); - $o = replace_macros($t, [ + $o = Renderer::replaceMacros($t, [ '$submit' => L10n::t('Save Settings'), // name, label, value, help, [extra values] '$client_id' => ['client_id', L10n::t('Client ID'), Config::get('buffer', 'client_id'), ''], @@ -81,8 +86,8 @@ function buffer_addon_admin(App $a, &$o) function buffer_addon_admin_post(App $a) { - $client_id = ((!empty($_POST['client_id'])) ? notags(trim($_POST['client_id'])) : ''); - $client_secret = ((!empty($_POST['client_secret'])) ? notags(trim($_POST['client_secret'])) : ''); + $client_id = (!empty($_POST['client_id']) ? Strings::escapeTags(trim($_POST['client_id'])) : ''); + $client_secret = (!empty($_POST['client_secret']) ? Strings::escapeTags(trim($_POST['client_secret'])) : ''); Config::set('buffer', 'client_id' , $client_id); Config::set('buffer', 'client_secret', $client_secret); @@ -105,16 +110,16 @@ function buffer_connect(App $a) $client_secret = Config::get('buffer','client_secret'); // The callback URL is the script that gets called after the user authenticates with buffer - $callback_url = $a->get_baseurl()."/buffer/connect"; + $callback_url = $a->getBaseURL()."/buffer/connect"; $buffer = new BufferApp($client_id, $client_secret, $callback_url); if (!$buffer->ok) { $o .= 'Connect to Buffer!'; } else { - logger("buffer_connect: authenticated"); + Logger::log("buffer_connect: authenticated"); $o .= L10n::t("You are now authenticated to buffer. "); - $o .= '
' . L10n::t("return to the connector page") . ''; + $o .= '
' . L10n::t("return to the connector page") . ''; PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token); } @@ -145,7 +150,7 @@ function buffer_settings(App $a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ @@ -174,7 +179,7 @@ function buffer_settings(App $a, &$s) if ($access_token == "") { $s .= '
'; } else { $s .= '
'; @@ -193,7 +198,7 @@ function buffer_settings(App $a, &$s) $s .= '
'; // The callback URL is the script that gets called after the user authenticates with buffer - $callback_url = $a->get_baseurl() . '/buffer/connect'; + $callback_url = $a->getBaseURL() . '/buffer/connect'; $buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token); @@ -263,6 +268,21 @@ function buffer_post_local(App $a, array &$b) $b['postopts'] .= 'buffer'; } +function buffer_hook_fork(&$a, &$b) +{ + if ($b['name'] != 'notifier_normal') { + return; + } + + $post = $b['data']; + + if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) || + !strstr($post['postopts'], 'buffer') || ($post['parent'] != $post['id'])) { + $b['execute'] = false; + return; + } +} + function buffer_send(App $a, array &$b) { if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { @@ -298,7 +318,7 @@ function buffer_send(App $a, array &$b) $profiles = $buffer->go('/profiles'); if (is_array($profiles)) { - logger("Will send these parameter ".print_r($b, true), LOGGER_DEBUG); + Logger::log("Will send these parameter ".print_r($b, true), Logger::DEBUG); foreach ($profiles as $profile) { if (!$profile->default) @@ -357,7 +377,7 @@ function buffer_send(App $a, array &$b) } $post = ItemContent::getPlaintextPost($item, $limit, $includedlinks, $htmlmode); - logger("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG); + Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG); // The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures if (isset($post["image"])) { @@ -407,9 +427,9 @@ function buffer_send(App $a, array &$b) } //print_r($message); - logger("buffer_send: data for message " . $b["id"] . ": " . print_r($message, true), LOGGER_DEBUG); + Logger::log("buffer_send: data for message " . $b["id"] . ": " . print_r($message, true), Logger::DEBUG); $ret = $buffer->go('/updates/create', $message); - logger("buffer_send: send message " . $b["id"] . " result: " . print_r($ret, true), LOGGER_DEBUG); + Logger::log("buffer_send: send message " . $b["id"] . " result: " . print_r($ret, true), Logger::DEBUG); } } } diff --git a/buffer/bufferapp.php b/buffer/bufferapp.php index a222b23e..a9aeb49e 100644 --- a/buffer/bufferapp.php +++ b/buffer/bufferapp.php @@ -45,6 +45,7 @@ '403' => 'Permission denied.', '404' => 'Endpoint not found.', '405' => 'Method not allowed.', + '504' => 'Gateway timeout server response timeout.', '1000' => 'An unknown error occurred.', '1001' => 'Access token required.', '1002' => 'Not within application scope.', diff --git a/buffer/lang/cs/messages.po b/buffer/lang/cs/messages.po index e294425d..ce1d936b 100644 --- a/buffer/lang/cs/messages.po +++ b/buffer/lang/cs/messages.po @@ -4,15 +4,16 @@ # # # Translators: -# Lorem Ipsum , 2018 +# Aditoo, 2018 +# Aditoo, 2018 # michal_s , 2014 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2018-06-09 09:15+0000\n" -"Last-Translator: Lorem Ipsum \n" +"PO-Revision-Date: 2018-09-12 09:43+0000\n" +"Last-Translator: Aditoo\n" "Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -38,19 +39,19 @@ msgstr "Client Secret" #: buffer.php:67 msgid "Error when registering buffer connection:" -msgstr "Chyba při registraci buffer spojená" +msgstr "Chyba při registraci připojení na buffer:" #: buffer.php:86 msgid "You are now authenticated to buffer. " -msgstr "Nyní jste přihlášen k bufferu." +msgstr "Nyní jste přihlášen/a na buffer." #: buffer.php:87 msgid "return to the connector page" -msgstr "návrat ke stránce konektor" +msgstr "zpět ke stránce konektoru" #: buffer.php:103 msgid "Post to Buffer" -msgstr "Příspěvek na Buffer" +msgstr "Posílat na Buffer" #: buffer.php:128 buffer.php:132 msgid "Buffer Export" @@ -58,7 +59,7 @@ msgstr "Buffer Export" #: buffer.php:142 msgid "Authenticate your Buffer connection" -msgstr "Přihlásit ke spojení na Buffer" +msgstr "Autentikujte své připojení na Buffer" #: buffer.php:146 msgid "Enable Buffer Post Addon" @@ -66,12 +67,12 @@ msgstr "Povolit doplněk Buffer Post" #: buffer.php:151 msgid "Post to Buffer by default" -msgstr "Defaultně zaslat na Buffer" +msgstr "Ve výchozím stavu posílat na Buffer" #: buffer.php:156 msgid "Check to delete this preset" -msgstr "Zaškrtnout pro smazání tohoto nastavení" +msgstr "Zaškrtnutím smažete toto nastavení" #: buffer.php:165 msgid "Posts are going to all accounts that are enabled by default:" -msgstr "Příspěvky jsou zasílány na všechny účty, které jsou defaultně povoleny:" +msgstr "Příspěvky budou posílány na všechny účty, které jsou ve výchozím stavu povoleny:" diff --git a/buffer/lang/cs/strings.php b/buffer/lang/cs/strings.php index a3e7a329..971dbe9b 100644 --- a/buffer/lang/cs/strings.php +++ b/buffer/lang/cs/strings.php @@ -10,13 +10,13 @@ $a->strings["Permission denied."] = "Přístup odmítnut."; $a->strings["Save Settings"] = "Uložit Nastavení"; $a->strings["Client ID"] = "Client ID"; $a->strings["Client Secret"] = "Client Secret"; -$a->strings["Error when registering buffer connection:"] = "Chyba při registraci buffer spojená"; -$a->strings["You are now authenticated to buffer. "] = "Nyní jste přihlášen k bufferu."; -$a->strings["return to the connector page"] = "návrat ke stránce konektor"; -$a->strings["Post to Buffer"] = "Příspěvek na Buffer"; +$a->strings["Error when registering buffer connection:"] = "Chyba při registraci připojení na buffer:"; +$a->strings["You are now authenticated to buffer. "] = "Nyní jste přihlášen/a na buffer."; +$a->strings["return to the connector page"] = "zpět ke stránce konektoru"; +$a->strings["Post to Buffer"] = "Posílat na Buffer"; $a->strings["Buffer Export"] = "Buffer Export"; -$a->strings["Authenticate your Buffer connection"] = "Přihlásit ke spojení na Buffer"; +$a->strings["Authenticate your Buffer connection"] = "Autentikujte své připojení na Buffer"; $a->strings["Enable Buffer Post Addon"] = "Povolit doplněk Buffer Post"; -$a->strings["Post to Buffer by default"] = "Defaultně zaslat na Buffer"; -$a->strings["Check to delete this preset"] = "Zaškrtnout pro smazání tohoto nastavení"; -$a->strings["Posts are going to all accounts that are enabled by default:"] = "Příspěvky jsou zasílány na všechny účty, které jsou defaultně povoleny:"; +$a->strings["Post to Buffer by default"] = "Ve výchozím stavu posílat na Buffer"; +$a->strings["Check to delete this preset"] = "Zaškrtnutím smažete toto nastavení"; +$a->strings["Posts are going to all accounts that are enabled by default:"] = "Příspěvky budou posílány na všechny účty, které jsou ve výchozím stavu povoleny:"; diff --git a/buffer/lang/fr/messages.po b/buffer/lang/fr/messages.po index 5ba45daa..716f5397 100644 --- a/buffer/lang/fr/messages.po +++ b/buffer/lang/fr/messages.po @@ -4,16 +4,17 @@ # # # Translators: -# Hypolite Petovan , 2016 -# Nicola Spanti , 2015 +# Hypolite Petovan , 2016 +# Marie Olive , 2018 +# RyDroid , 2015 # StefOfficiel , 2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2016-09-24 03:03+0000\n" -"Last-Translator: Hypolite Petovan \n" +"PO-Revision-Date: 2018-11-13 12:56+0000\n" +"Last-Translator: Marie Olive \n" "Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -63,7 +64,7 @@ msgstr "Authentifier votre connexion à Buffer" #: buffer.php:146 msgid "Enable Buffer Post Addon" -msgstr "Activer le connecteur Buffer" +msgstr "Activer l'extension de publication Buffer" #: buffer.php:151 msgid "Post to Buffer by default" diff --git a/buffer/lang/fr/strings.php b/buffer/lang/fr/strings.php index f86822c5..f7d97493 100644 --- a/buffer/lang/fr/strings.php +++ b/buffer/lang/fr/strings.php @@ -2,6 +2,7 @@ if(! function_exists("string_plural_select_fr")) { function string_plural_select_fr($n){ + $n = intval($n); return ($n > 1);; }} ; @@ -15,7 +16,7 @@ $a->strings["return to the connector page"] = "revenir à la page du connecteur" $a->strings["Post to Buffer"] = "Publier sur Buffer"; $a->strings["Buffer Export"] = "Export Buffer"; $a->strings["Authenticate your Buffer connection"] = "Authentifier votre connexion à Buffer"; -$a->strings["Enable Buffer Post Addon"] = "Activer le connecteur Buffer"; +$a->strings["Enable Buffer Post Addon"] = "Activer l'extension de publication Buffer"; $a->strings["Post to Buffer by default"] = "Publier sur Buffer par défaut"; $a->strings["Check to delete this preset"] = "Cocher pour supprimer ce préréglage"; $a->strings["Posts are going to all accounts that are enabled by default:"] = "Les posts sont envoyés à tous les comptes activés par défault:"; diff --git a/catavatar/catavatar.php b/catavatar/catavatar.php index f84ae117..77dd1812 100644 --- a/catavatar/catavatar.php +++ b/catavatar/catavatar.php @@ -10,7 +10,9 @@ use Friendica\App; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; +use Friendica\Core\Renderer; use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\Model\Contact; @@ -28,7 +30,7 @@ function catavatar_install() Addon::registerHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings'); Addon::registerHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post'); - logger('registered catavatar'); + Logger::log('registered catavatar'); } /** @@ -40,7 +42,7 @@ function catavatar_uninstall() Addon::unregisterHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings'); Addon::unregisterHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post'); - logger('unregistered catavatar'); + Logger::log('unregistered catavatar'); } /** @@ -52,8 +54,8 @@ function catavatar_addon_settings(App $a, &$s) return; } - $t = get_markup_template('settings.tpl', 'addon/catavatar/'); - $s .= replace_macros ($t, [ + $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/catavatar/'); + $s .= Renderer::replaceMacros($t, [ '$postpost' => !empty($_POST['catavatar-morecat']) || !empty($_POST['catavatar-emailcat']), '$uncache' => time(), '$uid' => local_user(), @@ -82,7 +84,7 @@ function catavatar_addon_settings_post(App $a, &$s) $seed = PConfig::get(local_user(), 'catavatar', 'seed', md5(trim(strtolower($user['email'])))); if (!empty($_POST['catavatar-usecat'])) { - $url = $a->get_baseurl() . '/catavatar/' . local_user() . '?ts=' . time(); + $url = $a->getBaseURL() . '/catavatar/' . local_user() . '?ts=' . time(); $self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]); if (!DBA::isResult($self)) { @@ -109,7 +111,7 @@ function catavatar_addon_settings_post(App $a, &$s) Contact::updateSelfFromUserID(local_user(), true); // Update global directory in background - $url = $a->get_baseurl() . '/profile/' . $a->user['nickname']; + $url = $a->getBaseURL() . '/profile/' . $a->user['nickname']; if ($url && strlen(Config::get('system', 'directory'))) { Worker::add(PRIORITY_LOW, 'Directory', $url); } @@ -138,10 +140,10 @@ function catavatar_addon_settings_post(App $a, &$s) function catavatar_lookup(App $a, &$b) { $user = DBA::selectFirst('user', ['uid'], ['email' => $b['email']]); - $url = $a->get_baseurl() . '/catavatar/' . $user['uid']; + $url = $a->getBaseURL() . '/catavatar/' . $user['uid']; switch($b['size']) { - case 175: $url .= "/4"; break; + case 300: $url .= "/4"; break; case 80: $url .= "/5"; break; case 47: $url .= "/6"; break; } @@ -171,7 +173,7 @@ function catavatar_content(App $a) $size = intval($a->argv[2]); } - $condition = ['uid' => $uid, 'blocked' => false, + $condition = ['uid' => $uid, 'account_expired' => false, 'account_removed' => false]; $user = DBA::selectFirst('user', ['email'], $condition); @@ -245,7 +247,7 @@ function build_cat($seed = '', $size = 0) if ($size > 3 && $size < 7) { switch ($size) { case 4: - $size = 175; + $size = 300; break; case 5: $size = 80; diff --git a/curweather/curweather.php b/curweather/curweather.php index 044f5a15..9d4d42e7 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -17,6 +17,7 @@ use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\PConfig; +use Friendica\Core\Renderer; use Friendica\Util\Network; use Friendica\Util\Proxy as ProxyUtils; @@ -92,7 +93,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti ]; PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp()); - Cache::set('curweather'.md5($url), serialize($r), CACHE_HOUR); + Cache::set('curweather'.md5($url), serialize($r), Cache::HOUR); return $r; } @@ -103,7 +104,7 @@ function curweather_network_mod_init(App $a, &$b) return; } - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; // $rpt value is needed for location // $lang will be taken from the browser session to honour user settings @@ -117,7 +118,7 @@ function curweather_network_mod_init(App $a, &$b) $rpt = PConfig::get(local_user(), 'curweather', 'curweather_loc'); // Set the language to the browsers language or default and use metric units - $lang = (!empty($_SESSION['language']) ? $_SESSION['language'] : Config::get('system', 'language')); + $lang = defaults($_SESSION, 'language', Config::get('system', 'language')); $units = PConfig::get( local_user(), 'curweather', 'curweather_units'); $appid = Config::get('curweather', 'appid'); $cachetime = intval(Config::get('curweather', 'cachetime')); @@ -135,8 +136,8 @@ function curweather_network_mod_init(App $a, &$b) } if ($ok) { - $t = get_markup_template("widget.tpl", "addon/curweather/" ); - $curweather = replace_macros ($t, [ + $t = Renderer::getMarkupTemplate("widget.tpl", "addon/curweather/" ); + $curweather = Renderer::replaceMacros($t, [ '$title' => L10n::t("Current Weather"), '$icon' => ProxyUtils::proxifyUrl('http://openweathermap.org/img/w/'.$res['icon'].'.png'), '$city' => $res['city'], @@ -152,8 +153,8 @@ function curweather_network_mod_init(App $a, &$b) '$showonmap' => L10n::t('Show on map') ]); } else { - $t = get_markup_template('widget-error.tpl', 'addon/curweather/'); - $curweather = replace_macros( $t, [ + $t = Renderer::getMarkupTemplate('widget-error.tpl', 'addon/curweather/'); + $curweather = Renderer::replaceMacros( $t, [ '$problem' => L10n::t('There was a problem accessing the weather data. But have a look'), '$rpt' => $rpt, '$atOWM' => L10n::t('at OpenWeatherMap') @@ -197,9 +198,9 @@ function curweather_addon_settings(App $a, &$s) $enable_checked = (($enable) ? ' checked="checked" ' : ''); // load template and replace the macros - $t = get_markup_template("settings.tpl", "addon/curweather/" ); + $t = Renderer::getMarkupTemplate("settings.tpl", "addon/curweather/" ); - $s = replace_macros ($t, [ + $s = Renderer::replaceMacros($t, [ '$submit' => L10n::t('Save Settings'), '$header' => L10n::t('Current Weather').' '.L10n::t('Settings'), '$noappidtext' => $noappidtext, @@ -237,9 +238,9 @@ function curweather_addon_admin(App $a, &$o) $appid = Config::get('curweather', 'appid'); $cachetime = Config::get('curweather', 'cachetime'); - $t = get_markup_template("admin.tpl", "addon/curweather/" ); + $t = Renderer::getMarkupTemplate("admin.tpl", "addon/curweather/" ); - $o = replace_macros ($t, [ + $o = Renderer::replaceMacros($t, [ '$submit' => L10n::t('Save Settings'), '$cachetime' => [ 'cachetime', diff --git a/curweather/lang/fr/messages.po b/curweather/lang/fr/messages.po index c2330005..0518bb21 100644 --- a/curweather/lang/fr/messages.po +++ b/curweather/lang/fr/messages.po @@ -4,7 +4,7 @@ # # # Translators: -# Hypolite Petovan , 2016 +# Hypolite Petovan , 2016 # Nicola Spanti , 2015 # StefOfficiel , 2015 msgid "" @@ -13,7 +13,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-03-12 08:10+0100\n" "PO-Revision-Date: 2016-09-24 03:15+0000\n" -"Last-Translator: Hypolite Petovan \n" +"Last-Translator: Hypolite Petovan \n" "Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/diaspora/Diaspora_Connection.php b/diaspora/Diaspora_Connection.php index 8b8811ec..67bc63df 100644 --- a/diaspora/Diaspora_Connection.php +++ b/diaspora/Diaspora_Connection.php @@ -136,7 +136,7 @@ class Diaspora_Connection { } elseif (!empty($m[1])) { $token = $m[1]; } - return (!empty($token)) ? $token : false; + return !empty($token) ? $token : false; } private function readJsonResponse($response) { @@ -165,14 +165,14 @@ class Diaspora_Connection { $this->doHttpRequest('/bookmarklet'); $m = []; preg_match('/"aspects"\:(\[.+?\])/', $this->last_http_result->response, $m); - return (!empty($m[1])) ? json_decode($m[1]) : false; + return !empty($m[1]) ? json_decode($m[1]) : false; } public function getServices() { $this->doHttpRequest('/bookmarklet'); $m = []; preg_match('/"configured_services"\:(\[.+?\])/', $this->last_http_result->response, $m); - return (!empty($m[1])) ? json_decode($m[1]) : false; + return !empty($m[1]) ? json_decode($m[1]) : false; } public function getNotifications($notification_type = '', $show = '') { diff --git a/diaspora/diaspora.php b/diaspora/diaspora.php index a5472558..b36b2774 100644 --- a/diaspora/diaspora.php +++ b/diaspora/diaspora.php @@ -13,6 +13,7 @@ use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Core\Protocol; use Friendica\Database\DBA; @@ -20,6 +21,7 @@ use Friendica\Model\Queue; function diaspora_install() { + Addon::registerHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork'); Addon::registerHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local'); Addon::registerHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send'); Addon::registerHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets'); @@ -30,6 +32,7 @@ function diaspora_install() function diaspora_uninstall() { + Addon::unregisterHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork'); Addon::unregisterHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local'); Addon::unregisterHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send'); Addon::unregisterHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets'); @@ -57,7 +60,7 @@ function diaspora_jot_nets(App $a, &$b) } function diaspora_queue_hook(App $a, &$b) { - $hostname = $a->get_hostname(); + $hostname = $a->getHostName(); $qi = q("SELECT * FROM `queue` WHERE `network` = '%s'", DBA::escape(Protocol::DIASPORA2) @@ -72,7 +75,7 @@ function diaspora_queue_hook(App $a, &$b) { continue; } - logger('diaspora_queue: run'); + Logger::log('diaspora_queue: run'); $r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid` WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1", @@ -92,37 +95,37 @@ function diaspora_queue_hook(App $a, &$b) { $success = false; if ($handle && $password) { - logger('diaspora_queue: able to post for user '.$handle); + Logger::log('diaspora_queue: able to post for user '.$handle); $z = unserialize($x['content']); $post = $z['post']; - logger('diaspora_queue: post: '.$post, LOGGER_DATA); + Logger::log('diaspora_queue: post: '.$post, Logger::DATA); try { - logger('diaspora_queue: prepare', LOGGER_DEBUG); + Logger::log('diaspora_queue: prepare', Logger::DEBUG); $conn = new Diaspora_Connection($handle, $password); - logger('diaspora_queue: try to log in '.$handle, LOGGER_DEBUG); + Logger::log('diaspora_queue: try to log in '.$handle, Logger::DEBUG); $conn->logIn(); - logger('diaspora_queue: try to send '.$body, LOGGER_DEBUG); + Logger::log('diaspora_queue: try to send '.$body, Logger::DEBUG); $conn->provider = $hostname; $conn->postStatusMessage($post, $aspect); - logger('diaspora_queue: send '.$userdata['uid'].' success', LOGGER_DEBUG); + Logger::log('diaspora_queue: send '.$userdata['uid'].' success', Logger::DEBUG); $success = true; Queue::removeItem($x['id']); } catch (Exception $e) { - logger("diaspora_queue: Send ".$userdata['uid']." failed: ".$e->getMessage(), LOGGER_DEBUG); + Logger::log("diaspora_queue: Send ".$userdata['uid']." failed: ".$e->getMessage(), Logger::DEBUG); } } else { - logger('diaspora_queue: send '.$userdata['uid'].' missing username or password', LOGGER_DEBUG); + Logger::log('diaspora_queue: send '.$userdata['uid'].' missing username or password', Logger::DEBUG); } if (!$success) { - logger('diaspora_queue: delayed'); + Logger::log('diaspora_queue: delayed'); Queue::updateTime($x['id']); } } @@ -136,7 +139,7 @@ function diaspora_settings(App $a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ @@ -252,6 +255,21 @@ function diaspora_settings_post(App $a, &$b) } } +function diaspora_hook_fork(&$a, &$b) +{ + if ($b['name'] != 'notifier_normal') { + return; + } + + $post = $b['data']; + + if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) || + !strstr($post['postopts'], 'diaspora') || ($post['parent'] != $post['id'])) { + $b['execute'] = false; + return; + } +} + function diaspora_post_local(App $a, array &$b) { if ($b['edit']) { @@ -268,7 +286,7 @@ function diaspora_post_local(App $a, array &$b) $diaspora_post = intval(PConfig::get(local_user(),'diaspora','post')); - $diaspora_enable = (($diaspora_post && x($_REQUEST,'diaspora_enable')) ? intval($_REQUEST['diaspora_enable']) : 0); + $diaspora_enable = (($diaspora_post && !empty($_REQUEST['diaspora_enable'])) ? intval($_REQUEST['diaspora_enable']) : 0); if ($b['api_source'] && intval(PConfig::get(local_user(),'diaspora','post_by_default'))) { $diaspora_enable = 1; @@ -287,9 +305,9 @@ function diaspora_post_local(App $a, array &$b) function diaspora_send(App $a, array &$b) { - $hostname = $a->get_hostname(); + $hostname = $a->getHostName(); - logger('diaspora_send: invoked'); + Logger::log('diaspora_send: invoked'); if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { return; @@ -311,14 +329,14 @@ function diaspora_send(App $a, array &$b) return; } - logger('diaspora_send: prepare posting', LOGGER_DEBUG); + Logger::log('diaspora_send: prepare posting', Logger::DEBUG); $handle = PConfig::get($b['uid'],'diaspora','handle'); $password = PConfig::get($b['uid'],'diaspora','password'); $aspect = PConfig::get($b['uid'],'diaspora','aspect'); if ($handle && $password) { - logger('diaspora_send: all values seem to be okay', LOGGER_DEBUG); + Logger::log('diaspora_send: all values seem to be okay', Logger::DEBUG); $tag_arr = []; $tags = ''; @@ -363,20 +381,20 @@ function diaspora_send(App $a, array &$b) require_once "addon/diaspora/diasphp.php"; try { - logger('diaspora_send: prepare', LOGGER_DEBUG); + Logger::log('diaspora_send: prepare', Logger::DEBUG); $conn = new Diaspora_Connection($handle, $password); - logger('diaspora_send: try to log in '.$handle, LOGGER_DEBUG); + Logger::log('diaspora_send: try to log in '.$handle, Logger::DEBUG); $conn->logIn(); - logger('diaspora_send: try to send '.$body, LOGGER_DEBUG); + Logger::log('diaspora_send: try to send '.$body, Logger::DEBUG); $conn->provider = $hostname; $conn->postStatusMessage($body, $aspect); - logger('diaspora_send: success'); + Logger::log('diaspora_send: success'); } catch (Exception $e) { - logger("diaspora_send: Error submitting the post: " . $e->getMessage()); + Logger::log("diaspora_send: Error submitting the post: " . $e->getMessage()); - logger('diaspora_send: requeueing '.$b['uid'], LOGGER_DEBUG); + Logger::log('diaspora_send: requeueing '.$b['uid'], Logger::DEBUG); $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", $b['uid']); if (count($r)) diff --git a/diaspora/lang/cs/messages.po b/diaspora/lang/cs/messages.po index 68af6b73..44b1d4b4 100644 --- a/diaspora/lang/cs/messages.po +++ b/diaspora/lang/cs/messages.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 13:18+0200\n" -"PO-Revision-Date: 2018-08-16 10:10+0000\n" +"PO-Revision-Date: 2018-09-02 17:54+0000\n" "Last-Translator: Aditoo\n" "Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" @@ -23,7 +23,7 @@ msgstr "" #: diaspora.php:37 msgid "Post to Diaspora" -msgstr "Odeslat příspěvek na Diasporu" +msgstr "Odeslat na Diasporu" #: diaspora.php:142 msgid "" diff --git a/diaspora/lang/cs/strings.php b/diaspora/lang/cs/strings.php index 25323fd9..649b02c7 100644 --- a/diaspora/lang/cs/strings.php +++ b/diaspora/lang/cs/strings.php @@ -6,7 +6,7 @@ function string_plural_select_cs($n){ return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; -$a->strings["Post to Diaspora"] = "Odeslat příspěvek na Diasporu"; +$a->strings["Post to Diaspora"] = "Odeslat na Diasporu"; $a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Nelze se přihlásit na váš účet Diaspora. Prosím ověřte své uživatelské jméno a heslo a ujistěte se, že jste použili kompletní adresu (včetně http...)"; $a->strings["Diaspora Export"] = "Diaspora export"; $a->strings["Enable Diaspora Post Addon"] = "Povolit doplněk Diaspora Post"; diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 0174bf10..cceb3ca0 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -12,10 +12,12 @@ use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Database\DBA; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; +use Friendica\Util\XML; function dwpost_install() { @@ -60,7 +62,7 @@ function dwpost_settings(App $a, &$s) } /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ $enabled = PConfig::get(local_user(), 'dwpost', 'post'); @@ -135,7 +137,7 @@ function dwpost_post_local(App $a, array &$b) $dw_post = intval(PConfig::get(local_user(),'dwpost','post')); - $dw_enable = (($dw_post && x($_REQUEST,'dwpost_enable')) ? intval($_REQUEST['dwpost_enable']) : 0); + $dw_enable = (($dw_post && !empty($_REQUEST['dwpost_enable'])) ? intval($_REQUEST['dwpost_enable']) : 0); if ($b['api_source'] && intval(PConfig::get(local_user(),'dwpost','post_by_default'))) { $dw_enable = 1; @@ -188,7 +190,7 @@ function dwpost_send(App $a, array &$b) if ($dw_username && $dw_password && $dw_blog) { $title = $b['title']; $post = BBCode::convert($b['body']); - $post = xmlify($post); + $post = XML::escape($post); $tags = dwpost_get_tags($b['tag']); $date = DateTimeFormat::convert($b['created'], $tz); @@ -225,13 +227,13 @@ function dwpost_send(App $a, array &$b) EOT; - logger('dwpost: data: ' . $xml, LOGGER_DATA); + Logger::log('dwpost: data: ' . $xml, Logger::DATA); if ($dw_blog !== 'test') { - $x = Network::post($dw_blog, $xml, ["Content-Type: text/xml"]); + $x = Network::post($dw_blog, $xml, ["Content-Type: text/xml"])->getBody(); } - logger('posted to dreamwidth: ' . ($x) ? $x : '', LOGGER_DEBUG); + Logger::log('posted to dreamwidth: ' . ($x) ? $x : '', Logger::DEBUG); } } diff --git a/fortunate/fortunate.php b/fortunate/fortunate.php index ebece489..b92f6085 100644 --- a/fortunate/fortunate.php +++ b/fortunate/fortunate.php @@ -30,7 +30,7 @@ function fortunate_uninstall() function fortunate_fetch(&$a, &$b) { $a->page['htmlhead'] .= '' . "\r\n"; + . $a->getBaseURL() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n"; if (FORTUNATE_SERVER != 'hostname.com') { $s = Network::fetchUrl('http://' . FORTUNATE_SERVER . '/cookie.php?numlines=2&equal=1&rand=' . mt_rand()); diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php index 9f7dd877..0e2f0fe3 100644 --- a/forumdirectory/forumdirectory.php +++ b/forumdirectory/forumdirectory.php @@ -8,13 +8,16 @@ use Friendica\App; use Friendica\Content\Nav; +use Friendica\Content\Pager; use Friendica\Content\Widget; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\Model\Contact; use Friendica\Model\Profile; +use Friendica\Util\Strings; use Friendica\Util\Temporal; require_once 'boot.php'; @@ -43,9 +46,7 @@ function forumdirectory_app_menu(App $a, array &$b) function forumdirectory_init(App $a) { - $a->page['htmlhead'] .= ''; - - $a->set_pager_itemspage(60); + $a->page['htmlhead'] .= ''; if (local_user()) { $a->page['aside'] .= Widget::findPeople(); @@ -72,12 +73,12 @@ function forumdirectory_content(App $a) Nav::setSelected('directory'); if (!empty($a->data['search'])) { - $search = notags(trim($a->data['search'])); + $search = Strings::escapeTags(trim($a->data['search'])); } else { - $search = ((!empty($_GET['search'])) ? notags(trim(rawurldecode($_GET['search']))) : ''); + $search = (!empty($_GET['search']) ? Strings::escapeTags(trim(rawurldecode($_GET['search']))) : ''); } - $tpl = get_markup_template('directory_header.tpl'); + $tpl = Renderer::getMarkupTemplate('directory_header.tpl'); $globaldir = ''; $gdirpath = Config::get('system', 'directory'); @@ -88,7 +89,7 @@ function forumdirectory_content(App $a) $admin = ''; - $o .= replace_macros($tpl, [ + $o .= Renderer::replaceMacros($tpl, [ '$search' => $search, '$globaldir' => $globaldir, '$desc' => L10n::t('Find on this site'), @@ -107,19 +108,22 @@ function forumdirectory_content(App $a) $publish = Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 "; + $total = 0; $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`" . " WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra "); if (DBA::isResult($r)) { - $a->set_pager_total($r[0]['total']); + $total = $r[0]['total']; } + $pager = new Pager($a->query_string, 60); + $order = " ORDER BY `name` ASC "; $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags`" . " FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish" . " AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra $order LIMIT %d , %d ", - intval($a->pager['start']), - intval($a->pager['itemspage']) + $pager->getStart(), + $pager->getItemsPerPage() ); if (DBA::isResult($r)) { @@ -130,7 +134,7 @@ function forumdirectory_content(App $a) } foreach ($r as $rr) { - $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); + $profile_link = $a->getBaseURL() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); $pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '
' : ''); @@ -185,9 +189,9 @@ function forumdirectory_content(App $a) $homepage = !empty($profile['homepage']) ? L10n::t('Homepage:') : false; $about = !empty($profile['about']) ? L10n::t('About:') : false; - $tpl = get_markup_template('forumdirectory_item.tpl', 'addon/forumdirectory/'); + $tpl = Renderer::getMarkupTemplate('forumdirectory_item.tpl', 'addon/forumdirectory/'); - $entry = replace_macros($tpl, [ + $entry = Renderer::replaceMacros($tpl, [ '$id' => $rr['id'], '$profile_link' => $profile_link, '$photo' => $rr[$photo], @@ -208,7 +212,7 @@ function forumdirectory_content(App $a) } $o .= "
\r\n"; - $o .= paginate($a); + $o .= $pager->renderFull($total); } else { info(L10n::t("No entries \x28some entries may be hidden\x29.") . EOL); } diff --git a/forumdirectory/lang/cs/messages.po b/forumdirectory/lang/cs/messages.po index 7f7a8559..138c26f3 100644 --- a/forumdirectory/lang/cs/messages.po +++ b/forumdirectory/lang/cs/messages.po @@ -4,24 +4,25 @@ # # # Translators: -# Michal Šupler , 2014 +# Aditoo, 2018 +# michal_s , 2014 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2014-07-07 18:45+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-09-11 19:04+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: forumdirectory.php:22 msgid "Forum Directory" -msgstr "Adresář Fór" +msgstr "Adresář fór" #: forumdirectory.php:53 msgid "Public access denied." @@ -33,11 +34,11 @@ msgstr "Globální adresář" #: forumdirectory.php:79 msgid "Find on this site" -msgstr "Nalézt na tomto webu" +msgstr "Najít na tomto webu" #: forumdirectory.php:81 msgid "Finding: " -msgstr "Zjištění: " +msgstr "Hledání: " #: forumdirectory.php:82 msgid "Site Directory" @@ -57,7 +58,7 @@ msgstr "Pohlaví: " #: forumdirectory.php:156 msgid "Location:" -msgstr "Místo:" +msgstr "Poloha:" #: forumdirectory.php:158 msgid "Gender:" @@ -65,11 +66,11 @@ msgstr "Pohlaví:" #: forumdirectory.php:160 msgid "Status:" -msgstr "Status:" +msgstr "Stav:" #: forumdirectory.php:162 msgid "Homepage:" -msgstr "Domácí stránka:" +msgstr "Domovská stránka:" #: forumdirectory.php:164 msgid "About:" diff --git a/forumdirectory/lang/cs/strings.php b/forumdirectory/lang/cs/strings.php index 63178026..f438ade9 100644 --- a/forumdirectory/lang/cs/strings.php +++ b/forumdirectory/lang/cs/strings.php @@ -2,21 +2,22 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ - return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; + $n = intval($n); + return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; -$a->strings["Forum Directory"] = "Adresář Fór"; +$a->strings["Forum Directory"] = "Adresář fór"; $a->strings["Public access denied."] = "Veřejný přístup odepřen."; $a->strings["Global Directory"] = "Globální adresář"; -$a->strings["Find on this site"] = "Nalézt na tomto webu"; -$a->strings["Finding: "] = "Zjištění: "; +$a->strings["Find on this site"] = "Najít na tomto webu"; +$a->strings["Finding: "] = "Hledání: "; $a->strings["Site Directory"] = "Adresář serveru"; $a->strings["Find"] = "Najít"; $a->strings["Age: "] = "Věk: "; $a->strings["Gender: "] = "Pohlaví: "; -$a->strings["Location:"] = "Místo:"; +$a->strings["Location:"] = "Poloha:"; $a->strings["Gender:"] = "Pohlaví:"; -$a->strings["Status:"] = "Status:"; -$a->strings["Homepage:"] = "Domácí stránka:"; +$a->strings["Status:"] = "Stav:"; +$a->strings["Homepage:"] = "Domovská stránka:"; $a->strings["About:"] = "O mě:"; $a->strings["No entries (some entries may be hidden)."] = "Žádné záznamy (některé položky mohou být skryty)."; diff --git a/fromapp/fromapp.php b/fromapp/fromapp.php index afdb087b..e0ede735 100644 --- a/fromapp/fromapp.php +++ b/fromapp/fromapp.php @@ -8,6 +8,7 @@ */ use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; function fromapp_install() @@ -15,7 +16,7 @@ function fromapp_install() Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook'); Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings'); Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post'); - logger("installed fromapp"); + Logger::log("installed fromapp"); } @@ -24,12 +25,12 @@ function fromapp_uninstall() Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook'); Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings'); Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post'); - logger("removed fromapp"); + Logger::log("removed fromapp"); } function fromapp_settings_post($a, $post) { - if (!local_user() || (! x($_POST, 'fromapp-submit'))) { + if (!local_user() || empty($_POST['fromapp-submit'])) { return; } @@ -47,7 +48,7 @@ function fromapp_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/fromapp/lang/cs/messages.po b/fromapp/lang/cs/messages.po index 216c6db1..cac582fe 100644 --- a/fromapp/lang/cs/messages.po +++ b/fromapp/lang/cs/messages.po @@ -4,37 +4,38 @@ # # # Translators: -# Michal Šupler , 2014-2015 +# Aditoo, 2018 +# michal_s , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:41+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-09-11 19:01+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: fromapp.php:38 msgid "Fromapp settings updated." -msgstr "Fromapp nastavení aktualizováno." +msgstr "Nastavení FromApp aktualizována." #: fromapp.php:64 msgid "FromApp Settings" -msgstr "FromApp nastavení" +msgstr "Nastavení FromApp" #: fromapp.php:66 msgid "" "The application name you would like to show your posts originating from." -msgstr "Jméno zdrojové aplikace" +msgstr "Jméno aplikace, která má být zobrazena jako zdroj Vašich příspěvků." #: fromapp.php:70 msgid "Use this application name even if another application was used." -msgstr "Použij toto jméno aplikace i když byla použita jiná aplikace" +msgstr "Použít toto jméno aplikace, i když byla použita jiná aplikace" #: fromapp.php:77 msgid "Submit" diff --git a/fromapp/lang/cs/strings.php b/fromapp/lang/cs/strings.php index 39e85d33..8ade5ddd 100644 --- a/fromapp/lang/cs/strings.php +++ b/fromapp/lang/cs/strings.php @@ -2,11 +2,12 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ - return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; + $n = intval($n); + return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; -$a->strings["Fromapp settings updated."] = "Fromapp nastavení aktualizováno."; -$a->strings["FromApp Settings"] = "FromApp nastavení"; -$a->strings["The application name you would like to show your posts originating from."] = "Jméno zdrojové aplikace"; -$a->strings["Use this application name even if another application was used."] = "Použij toto jméno aplikace i když byla použita jiná aplikace"; +$a->strings["Fromapp settings updated."] = "Nastavení FromApp aktualizována."; +$a->strings["FromApp Settings"] = "Nastavení FromApp"; +$a->strings["The application name you would like to show your posts originating from."] = "Jméno aplikace, která má být zobrazena jako zdroj Vašich příspěvků."; +$a->strings["Use this application name even if another application was used."] = "Použít toto jméno aplikace, i když byla použita jiná aplikace"; $a->strings["Submit"] = "Odeslat"; diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 24ec46f3..35f90ac0 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -12,8 +12,10 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Core\Protocol; +use Friendica\Core\Renderer; use Friendica\Object\Image; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; @@ -87,9 +89,9 @@ function fromgplus_addon_settings_post(&$a,&$b) { if (!empty($_POST['fromgplus-submit'])) { PConfig::set(local_user(),'fromgplus','account',trim($_POST['fromgplus-account'])); - $enable = (x($_POST,'fromgplus-enable') ? intval($_POST['fromgplus-enable']) : 0); + $enable = (!empty($_POST['fromgplus-enable']) ? intval($_POST['fromgplus-enable']) : 0); PConfig::set(local_user(),'fromgplus','enable', $enable); - $keywords = (x($_POST, 'fromgplus-keywords') ? intval($_POST['fromgplus-keywords']) : 0); + $keywords = (!empty($_POST['fromgplus-keywords']) ? intval($_POST['fromgplus-keywords']) : 0); PConfig::set(local_user(),'fromgplus', 'keywords', $keywords); if (!$enable) @@ -101,9 +103,9 @@ function fromgplus_addon_settings_post(&$a,&$b) { function fromgplus_addon_admin(&$a, &$o) { - $t = get_markup_template("admin.tpl", "addon/fromgplus/"); + $t = Renderer::getMarkupTemplate("admin.tpl", "addon/fromgplus/"); - $o = replace_macros($t, [ + $o = Renderer::replaceMacros($t, [ '$submit' => L10n::t('Save Settings'), '$key' => ['key', L10n::t('Key'), trim(Config::get('fromgplus', 'key')), ''], ]); @@ -111,7 +113,7 @@ function fromgplus_addon_admin(&$a, &$o) function fromgplus_addon_admin_post(&$a) { - $key = ((x($_POST, 'key')) ? trim($_POST['key']) : ''); + $key = (!empty($_POST['key']) ? trim($_POST['key']) : ''); Config::set('fromgplus', 'key', $key); info(L10n::t('Settings updated.'). EOL); } @@ -126,25 +128,25 @@ function fromgplus_cron($a,$b) { if($last) { $next = $last + ($poll_interval * 60); if($next > time()) { - logger('fromgplus: poll intervall not reached'); + Logger::log('fromgplus: poll intervall not reached'); return; } } - logger('fromgplus: cron_start'); + Logger::log('fromgplus: cron_start'); $r = q("SELECT * FROM `pconfig` WHERE `cat` = 'fromgplus' AND `k` = 'enable' AND `v` = '1' ORDER BY RAND() "); if(count($r)) { foreach($r as $rr) { $account = PConfig::get($rr['uid'],'fromgplus','account'); if ($account) { - logger('fromgplus: fetching for user '.$rr['uid']); + Logger::log('fromgplus: fetching for user '.$rr['uid']); fromgplus_fetch($a, $rr['uid']); } } } - logger('fromgplus: cron_end'); + Logger::log('fromgplus: cron_end'); Config::set('fromgplus','last_poll', time()); } @@ -190,15 +192,15 @@ function fromgplus_post($a, $uid, $source, $body, $location, $coord, $id) { $_REQUEST['coord'] = $coord; if (($_REQUEST['title'] == "") && ($_REQUEST['body'] == "")) { - logger('fromgplus: empty post for user '.$uid." ".print_r($_REQUEST, true)); + Logger::log('fromgplus: empty post for user '.$uid." ".print_r($_REQUEST, true)); return; } require_once('mod/item.php'); //print_r($_REQUEST); - logger('fromgplus: posting for user '.$uid." ".print_r($_REQUEST, true)); + Logger::log('fromgplus: posting for user '.$uid." ".print_r($_REQUEST, true)); item_post($a); - logger('fromgplus: done for user '.$uid); + Logger::log('fromgplus: done for user '.$uid); } function fromgplus_html2bbcode($html) { @@ -472,7 +474,7 @@ function fromgplus_fetch($a, $uid) { // Don't publish items that are too young if (strtotime($item->published) > (time() - 3*60)) { - logger('fromgplus_fetch: item too new '.$item->published); + Logger::log('fromgplus_fetch: item too new '.$item->published); continue; } @@ -495,8 +497,9 @@ function fromgplus_fetch($a, $uid) { case "note": $post = fromgplus_html2bbcode($item->object->content); - if (is_array($item->object->attachments)) + if (!empty($item->object->attachments)) { $post .= fromgplus_handleattachments($a, $uid, $item, $item->object->content, false); + } $coord = ""; $location = ""; @@ -526,12 +529,12 @@ function fromgplus_fetch($a, $uid) { if (function_exists("share_header")) $post .= share_header($item->object->actor->displayName, $item->object->actor->url, $item->object->actor->image->url, "", - DateTimeFormat::utc($item->object->published),$item->object->url); + DateTimeFormat::utc($item->published),$item->object->url); else $post .= "[share author='".str_replace("'", "'",$item->object->actor->displayName). "' profile='".$item->object->actor->url. "' avatar='".$item->object->actor->image->url. - "' posted='".DateTimeFormat::utc($item->object->published). + "' posted='".DateTimeFormat::utc($item->published). "' link='".$item->object->url."']"; $post .= fromgplus_html2bbcode($item->object->content); diff --git a/geocoordinates/geocoordinates.php b/geocoordinates/geocoordinates.php index 89ccd883..abb33abb 100644 --- a/geocoordinates/geocoordinates.php +++ b/geocoordinates/geocoordinates.php @@ -9,7 +9,10 @@ use Friendica\Core\Addon; use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Logger; +use Friendica\Core\Renderer; use Friendica\Util\Network; +use Friendica\Util\Strings; function geocoordinates_install() { @@ -54,25 +57,25 @@ function geocoordinates_resolve_item(&$item) $s = Network::fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=".$coords[0].",".$coords[1]."&key=".$key."&language=".$language); if (!$s) { - logger("API could not be queried", LOGGER_DEBUG); + Logger::log("API could not be queried", Logger::DEBUG); return; } $data = json_decode($s); if ($data->status->code != "200") { - logger("API returned error ".$data->status->code." ".$data->status->message, LOGGER_DEBUG); + Logger::log("API returned error ".$data->status->code." ".$data->status->message, Logger::DEBUG); return; } if (($data->total_results == 0) || (count($data->results) == 0)) { - logger("No results found for coordinates ".$item["coord"], LOGGER_DEBUG); + Logger::log("No results found for coordinates ".$item["coord"], Logger::DEBUG); return; } $item["location"] = $data->results[0]->formatted; - logger("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], LOGGER_DEBUG); + Logger::log("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], Logger::DEBUG); if ($item["location"] != "") Cache::set("geocoordinates:".$language.":".$coords[0]."-".$coords[1], $item["location"]); @@ -86,9 +89,9 @@ function geocoordinates_post_hook($a, &$item) function geocoordinates_addon_admin(&$a, &$o) { - $t = get_markup_template("admin.tpl", "addon/geocoordinates/"); + $t = Renderer::getMarkupTemplate("admin.tpl", "addon/geocoordinates/"); - $o = replace_macros($t, [ + $o = Renderer::replaceMacros($t, [ '$submit' => L10n::t('Save Settings'), '$api_key' => ['api_key', L10n::t('API Key'), Config::get('geocoordinates', 'api_key'), ''], '$language' => ['language', L10n::t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''], @@ -97,10 +100,10 @@ function geocoordinates_addon_admin(&$a, &$o) function geocoordinates_addon_admin_post(&$a) { - $api_key = ((x($_POST, 'api_key')) ? notags(trim($_POST['api_key'])) : ''); + $api_key = (!empty($_POST['api_key']) ? Strings::escapeTags(trim($_POST['api_key'])) : ''); Config::set('geocoordinates', 'api_key', $api_key); - $language = ((x($_POST, 'language')) ? notags(trim($_POST['language'])) : ''); + $language = (!empty($_POST['language']) ? Strings::escapeTags(trim($_POST['language'])) : ''); Config::set('geocoordinates', 'language', $language); info(L10n::t('Settings updated.'). EOL); } diff --git a/geonames/README.md b/geonames/README.md index ba90dc5d..443ddf3f 100644 --- a/geonames/README.md +++ b/geonames/README.md @@ -7,9 +7,10 @@ Use Geonames service to resolve nearest populated location for given latitude, l ## Installation -Pre-requisite: Register a username at geonames.org and set in config/addon.ini.php +Pre-requisite: Register a username at geonames.org and set in `config/addon.config.php` - [geonames] - username = your_username + 'geonames' => [ + 'username' => 'your_username' + ], Also visit http://geonames.org/manageaccount and enable access to the free web services. \ No newline at end of file diff --git a/geonames/config/geonames.config.php b/geonames/config/geonames.config.php new file mode 100644 index 00000000..6af3634e --- /dev/null +++ b/geonames/config/geonames.config.php @@ -0,0 +1,12 @@ + [ + //username (String) + //The geonames.org API username + 'username' => '', + ], +]; diff --git a/geonames/config/geonames.ini.php b/geonames/config/geonames.ini.php deleted file mode 100644 index 280e7a93..00000000 --- a/geonames/config/geonames.ini.php +++ /dev/null @@ -1,12 +0,0 @@ -loadConfigFile(__DIR__. '/config/geonames.ini.php'); + $a->loadConfigFile(__DIR__. '/config/geonames.config.php'); } function geonames_post_hook($a, &$item) { @@ -91,7 +92,7 @@ function geonames_post_hook($a, &$item) { * */ - logger('geonames invoked'); + Logger::log('geonames invoked'); if(! local_user()) /* non-zero if this is a logged in user of this system */ return; @@ -132,7 +133,7 @@ function geonames_post_hook($a, &$item) { $item['location'] = $xml->geoname->name . ', ' . $xml->geoname->countryName; -// logger('geonames : ' . print_r($xml,true), LOGGER_DATA); +// Logger::log('geonames : ' . print_r($xml,true), Logger::DATA); return; } @@ -149,7 +150,7 @@ function geonames_post_hook($a, &$item) { */ function geonames_addon_admin_post($a,$post) { - if(! local_user() || (! x($_POST,'geonames-submit'))) + if(! local_user() || empty($_POST['geonames-submit'])) return; PConfig::set(local_user(),'geonames','enable',intval($_POST['geonames'])); @@ -178,7 +179,7 @@ function geonames_addon_admin(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/gnot/gnot.php b/gnot/gnot.php index c7678a21..f3a50705 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -9,6 +9,7 @@ */ use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; function gnot_install() { @@ -17,7 +18,7 @@ function gnot_install() { Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail'); - logger("installed gnot"); + Logger::log("installed gnot"); } @@ -28,7 +29,7 @@ function gnot_uninstall() { Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail'); - logger("removed gnot"); + Logger::log("removed gnot"); } @@ -43,7 +44,7 @@ function gnot_uninstall() { */ function gnot_settings_post($a,$post) { - if(! local_user() || (! x($_POST,'gnot-submit'))) + if(! local_user() || empty($_POST['gnot-submit'])) return; PConfig::set(local_user(),'gnot','enable',intval($_POST['gnot'])); @@ -67,7 +68,7 @@ function gnot_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/googlemaps/googlemaps.php b/googlemaps/googlemaps.php index e294c8e0..f9aeefd8 100644 --- a/googlemaps/googlemaps.php +++ b/googlemaps/googlemaps.php @@ -8,19 +8,20 @@ */ use Friendica\Core\Addon; use Friendica\Core\Cache; +use Friendica\Core\Logger; function googlemaps_install() { Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location'); - logger("installed googlemaps"); + Logger::log("installed googlemaps"); } function googlemaps_uninstall() { Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location'); - logger("removed googlemaps"); + Logger::log("removed googlemaps"); } function googlemaps_location($a, &$item) diff --git a/gravatar/README.md b/gravatar/README.md index b8ca8244..02b9bfd2 100644 --- a/gravatar/README.md +++ b/gravatar/README.md @@ -30,15 +30,19 @@ Gravatar lets users self-rate their images to be used at appropriate audiences. See more information at [Gravatar][1]. ## Alternative Configuration -Open the config/local.ini.php file and add "gravatar" to the list of activated addons: +Open the `config/local.config.php` file and add "gravatar" to the list of activated addons: - [system] - addon = ...,gravatar + 'system' => [ + ... + 'addon' => '...,gravatar' + ... + ] -You can add two configuration variables for the addon to the config/addon.ini.php file: +You can add two configuration variables for the addon to the `config/addon.config.php` file: - [gravatar] - default_avatar = identicon - rating = g + 'gravatar' => [ + 'default_avatar' => 'identicon', + 'rating' => 'g', + ], [1]: http://www.gravatar.com/site/implement/images/ "See documentation at Gravatar for more information" diff --git a/gravatar/config/gravatar.config.php b/gravatar/config/gravatar.config.php new file mode 100644 index 00000000..75bab4fc --- /dev/null +++ b/gravatar/config/gravatar.config.php @@ -0,0 +1,28 @@ + [ + // default_avatar (String) + // If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash. + // You can choose between these presets: + // - gravatar : default static Gravatar logo + // - mm : (mystery-man) a static image + // - identicon: a generated geometric pattern based on email hash + // - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash + // - wavatar : faces with different features and backgrounds based on email hash + // - retro : 8-bit arcade-styled pixelated faces based on email hash + 'default_avatar' => 'gravatar', + + // rating (String) + // Gravatar lets users self-rate their images to be used at appropriate audiences. + // Choose which are appropriate for your friendica site: + // - g : suitable for display on all wesites with any audience type + // - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence + // - r : may contain such things as harsh profanity, intense violence, nudity, or hard drug use + // - x : may contain hardcore sexual imagery or extremely disurbing violence + 'rating' => 'g', + ], +]; diff --git a/gravatar/config/gravatar.ini.php b/gravatar/config/gravatar.ini.php deleted file mode 100644 index a07005a3..00000000 --- a/gravatar/config/gravatar.ini.php +++ /dev/null @@ -1,28 +0,0 @@ -loadConfigFile(__DIR__. '/config/gravatar.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/gravatar.config.php'); } /** @@ -68,7 +73,7 @@ function gravatar_lookup($a, &$b) { * Display admin settings for this addon */ function gravatar_addon_admin (&$a, &$o) { - $t = get_markup_template( "admin.tpl", "addon/gravatar/" ); + $t = Renderer::getMarkupTemplate( "admin.tpl", "addon/gravatar/" ); $default_avatar = Config::get('gravatar', 'default_avatar'); $rating = Config::get('gravatar', 'rating'); @@ -103,8 +108,8 @@ function gravatar_addon_admin (&$a, &$o) { } // output Gravatar settings - $o .= ''; - $o .= replace_macros( $t, [ + $o .= ''; + $o .= Renderer::replaceMacros( $t, [ '$submit' => L10n::t('Save Settings'), '$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars], '$rating' => ['rating', L10n::t('Rating of images'), $rating, L10n::t('Select the appropriate avatar rating for your site. See README'), $ratings], @@ -115,10 +120,10 @@ function gravatar_addon_admin (&$a, &$o) { * Save admin settings */ function gravatar_addon_admin_post (&$a) { - check_form_security_token('gravatarsave'); + BaseModule::checkFormSecurityToken('gravatarsave'); - $default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon'); - $rating = ((x($_POST, 'rating')) ? notags(trim($_POST['rating'])) : 'g'); + $default_avatar = (!empty($_POST['avatar']) ? Strings::escapeTags(trim($_POST['avatar'])) : 'identicon'); + $rating = (!empty($_POST['rating']) ? Strings::escapeTags(trim($_POST['rating'])) : 'g'); Config::set('gravatar', 'default_avatar', $default_avatar); Config::set('gravatar', 'rating', $rating); info(L10n::t('Gravatar settings updated.') .EOL); diff --git a/gravatar/lang/fr/messages.po b/gravatar/lang/fr/messages.po index 8bc2f977..7df0f511 100644 --- a/gravatar/lang/fr/messages.po +++ b/gravatar/lang/fr/messages.po @@ -4,14 +4,15 @@ # # # Translators: -# Nicola Spanti , 2015 +# Marie Olive , 2018 +# RyDroid , 2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-08-30 17:12+0000\n" -"Last-Translator: Nicola Spanti \n" +"PO-Revision-Date: 2018-11-13 12:05+0000\n" +"Last-Translator: Marie Olive \n" "Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,7 +26,7 @@ msgstr "image de profil générique" #: gravatar.php:72 msgid "random geometric pattern" -msgstr "" +msgstr "Schéma géométrique aléatoire " #: gravatar.php:73 msgid "monster face" diff --git a/gravatar/lang/fr/strings.php b/gravatar/lang/fr/strings.php index 02d59c6a..bc062845 100644 --- a/gravatar/lang/fr/strings.php +++ b/gravatar/lang/fr/strings.php @@ -2,11 +2,12 @@ if(! function_exists("string_plural_select_fr")) { function string_plural_select_fr($n){ + $n = intval($n); return ($n > 1);; }} ; $a->strings["generic profile image"] = "image de profil générique"; -$a->strings["random geometric pattern"] = ""; +$a->strings["random geometric pattern"] = "Schéma géométrique aléatoire "; $a->strings["monster face"] = ""; $a->strings["computer generated face"] = "visage généré par ordinateur"; $a->strings["retro arcade style face"] = ""; diff --git a/group_text/group_text.php b/group_text/group_text.php index 4c0cb14a..cf56dbec 100644 --- a/group_text/group_text.php +++ b/group_text/group_text.php @@ -7,6 +7,7 @@ */ use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; function group_text_install() { @@ -14,7 +15,7 @@ function group_text_install() { Addon::registerHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings'); Addon::registerHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post'); - logger("installed group_text"); + Logger::log("installed group_text"); } @@ -24,7 +25,7 @@ function group_text_uninstall() { Addon::unregisterHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post'); - logger("removed group_text"); + Logger::log("removed group_text"); } @@ -39,7 +40,7 @@ function group_text_uninstall() { */ function group_text_settings_post($a,$post) { - if(! local_user() || (! x($_POST,'group_text-submit'))) + if(! local_user() || empty($_POST['group_text-submit'])) return; PConfig::set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text'])); @@ -63,7 +64,7 @@ function group_text_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/group_text/lang/cs/messages.po b/group_text/lang/cs/messages.po index 49980073..8b56b630 100644 --- a/group_text/lang/cs/messages.po +++ b/group_text/lang/cs/messages.po @@ -4,24 +4,25 @@ # # # Translators: -# Michal Šupler , 2014-2015 +# Aditoo, 2018 +# michal_s , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:40+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-09-12 09:47+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: group_text.php:46 msgid "Group Text settings updated." -msgstr "Nastavení textu skupiny aktualizováno." +msgstr "Nastavení Group Text aktualizována." #: group_text.php:76 msgid "Group Text" @@ -29,7 +30,7 @@ msgstr "Skupinový text" #: group_text.php:78 msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Použijte pouze textový (neobrázkový) výběr skupiny v menu editace skupin." +msgstr "Použijte pouze textový (bezobrázkový) výběr skupiny v menu úpravy skupin." #: group_text.php:84 msgid "Submit" diff --git a/group_text/lang/cs/strings.php b/group_text/lang/cs/strings.php index 33528314..c5055a29 100644 --- a/group_text/lang/cs/strings.php +++ b/group_text/lang/cs/strings.php @@ -2,10 +2,11 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ - return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; + $n = intval($n); + return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; -$a->strings["Group Text settings updated."] = "Nastavení textu skupiny aktualizováno."; +$a->strings["Group Text settings updated."] = "Nastavení Group Text aktualizována."; $a->strings["Group Text"] = "Skupinový text"; -$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "Použijte pouze textový (neobrázkový) výběr skupiny v menu editace skupin."; +$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "Použijte pouze textový (bezobrázkový) výběr skupiny v menu úpravy skupin."; $a->strings["Submit"] = "Odeslat"; diff --git a/highlightjs/asset/CHANGES.md b/highlightjs/asset/CHANGES.md new file mode 100644 index 00000000..05473a26 --- /dev/null +++ b/highlightjs/asset/CHANGES.md @@ -0,0 +1,1646 @@ +## Version 9.12.0 + +New language: + +- *MikroTik* RouterOS Scripting language by [Ivan Dementev][]. + +New style: + +- *VisualStudio 2015 Dark* by [Nicolas LLOBERA][] + +Improvements: + +- *Crystal* updated with new keywords and syntaxes by [Tsuyusato Kitsune][]. +- *Julia* updated to the modern definitions by [Alex Arslan][]. +- *julia-repl* added by [Morten Piibeleht][]. +- [Stanislav Belov][] wrote a new definition for *1C*, replacing the one that + has not been updated for more than 8 years. The new version supports syntax + for versions 7.7 and 8. +- [Nicolas LLOBERA][] improved C# definition fixing edge cases with function + titles detection and added highlighting of `[Attributes]`. +- [nnnik][] provided a few correctness fixes for *Autohotkey*. +- [Martin Clausen][] made annotation collections in *Clojure* to look + consistently with other kinds. +- [Alejandro Alonso][] updated *Swift* keywords. + +[Tsuyusato Kitsune]: https://github.com/MakeNowJust +[Alex Arslan]: https://github.com/ararslan +[Morten Piibeleht]: https://github.com/mortenpi +[Stanislav Belov]: https://github.com/4ppl +[Ivan Dementev]: https://github.com/DiVAN1x +[Nicolas LLOBERA]: https://github.com/Nicolas01 +[nnnik]: https://github.com/nnnik +[Martin Clausen]: https://github.com/maacl +[Alejandro Alonso]: https://github.com/Azoy + + +## Version 9.11.0 + +New languages: + +- *Shell* by [Tsuyusato Kitsune][] +- *jboss-cli* by [Raphaël Parrëe][] + +Improvements: + +- [Joël Porquet] has [greatly improved the definition of *makefile*][5b3e0e6]. +- *C++* class titles are now highlighted as in other languages with classes. +- [Jordi Petit][] added rarely used `or`, `and` and `not` keywords to *C++*. +- [Pieter Vantorre][] fixed highlighting of negative floating point values. + + +[Tsuyusato Kitsune]: https://github.com/MakeNowJust +[Jordi Petit]: https://github.com/jordi-petit +[Raphaël Parrëe]: https://github.com/rparree +[Pieter Vantorre]: https://github.com/NuclearCookie +[5b3e0e6]: https://github.com/isagalaev/highlight.js/commit/5b3e0e68bfaae282faff6697d6a490567fa9d44b + + +## Version 9.10.0 + +Apologies for missing the previous release cycle. Some thing just can't be +automated… Anyway, we're back! + +New languages: + +- *Hy* by [Sergey Sobko][] +- *Leaf* by [Hale Chan][] +- *N1QL* by [Andres Täht][] and [Rene Saarsoo][] + +Improvements: + +- *Rust* got updated with new keywords by [Kasper Andersen][] and then + significantly modernized even more by [Eduard-Mihai Burtescu][] (yes, @eddyb, + Rust core team member!) +- *Python* updated with f-literals by [Philipp A][]. +- *YAML* updated with unquoted strings support. +- *Gauss* updated with new keywords by [Matt Evans][]. +- *Lua* updated with new keywords by [Joe Blow][]. +- *Kotlin* updated with new keywords by [Philipp Hauer][]. +- *TypeScript* got highlighting of function params and updated keywords by + [Ike Ku][]. +- *Scheme* now correctly handles \`-quoted lists thanks to [Guannan Wei]. +- [Sam Wu][] fixed handling of `<<` in *C++* defines. + +[Philipp A]: https://github.com/flying-sheep +[Philipp Hauer]: https://github.com/phauer +[Sergey Sobko]: https://github.com/profitware +[Hale Chan]: https://github.com/halechan +[Matt Evans]: https://github.com/matthewevans +[Joe Blow]: https://github.com/mossarelli +[Kasper Andersen]: https://github.com/kasma1990 +[Eduard-Mihai Burtescu]: https://github.com/eddyb +[Andres Täht]: https://github.com/andrestaht +[Rene Saarsoo]: https://github.com/nene +[Philipp Hauer]: https://github.com/phauer +[Ike Ku]: https://github.com/dempfi +[Guannan Wei]: https://github.com/Kraks +[Sam Wu]: https://github.com/samsam2310 + + +## Version 9.9.0 + +New languages + +- *LLVM* by [Michael Rodler][] + +Improvements: + +- *TypeScript* updated with annotations and param lists inside constructors, by + [Raphael Parree][]. +- *CoffeeScript* updated with new keywords and fixed to recognize JavaScript + in \`\`\`, thanks to thanks to [Geoffrey Booth][]. +- Compiler directives in *Delphi* are now correctly highlighted as "meta". + +[Raphael Parree]: https://github.com/rparree +[Michael Rodler]: https://github.com/f0rki +[Geoffrey Booth]: https://github.com/GeoffreyBooth + + +## Version 9.8.0 "New York" + +This version is the second one that deserved a name. Because I'm in New York, +and the release isn't missing the deadline only because it's still Tuesday on +West Coast. + +New languages: + +- *Clean* by [Camil Staps][] +- *Flix* by [Magnus Madsen][] + +Improvements: + +- [Kenton Hamaluik][] did a comprehensive update for *Haxe*. +- New commands for *PowerShell* from [Nicolas Le Gall][]. +- [Jan T. Sott][] updated *NSIS*. +- *Java* and *Swift* support unicode characters in identifiers thanks to + [Alexander Lichter][]. + +[Camil Staps]: https://github.com/camilstaps +[Magnus Madsen]: https://github.com/magnus-madsen +[Kenton Hamaluik]: https://github.com/FuzzyWuzzie +[Nicolas Le Gall]: https://github.com/darkitty +[Jan T. Sott]: https://github.com/idleberg +[Alexander Lichter]: https://github.com/manniL + + +## Version 9.7.0 + +A comprehensive bugfix release. This is one of the best things about +highlight.js: even boring things keep getting better (even if slow). + +- VHDL updated with PSL keywords and uses more consistent styling. +- Nested C-style comments no longer break highlighting in many languages. +- JavaScript updated with `=>` functions, highlighted object attributes and + parsing within template string substitution blocks (`${...}`). +- Fixed another corner case with self-closing `` in JSX. +- Added `HEALTHCHECK` directive in Docker. +- Delphi updated with new Free Pascal keywords. +- Fixed digit separator parsing in C++. +- C# updated with new keywords and fixed to allow multiple identifiers within + generics `<...>`. +- Fixed another slow regex in Less. + + +## Version 9.6.0 + +New languages: + +- *ABNF* and *EBNF* by [Alex McKibben][] +- *Awk* by [Matthew Daly][] +- *SubUnit* by [Sergey Bronnikov][] + +New styles: + +- *Atom One* in both Dark and Light variants by [Daniel Gamage][] + +Plus, a few smaller updates for *Lasso*, *Elixir*, *C++* and *SQL*. + +[Alex McKibben]: https://github.com/mckibbenta +[Daniel Gamage]: https://github.com/danielgamage +[Matthew Daly]: https://github.com/matthewbdaly +[Sergey Bronnikov]: https://github.com/ligurio + + +## Version 9.5.0 + +New languages: + +- *Excel* by [Victor Zhou][] +- *Linden Scripting Language* by [Builder's Brewery][] +- *TAP* (Test Anything Protocol) by [Sergey Bronnikov][] +- *Pony* by [Joe Eli McIlvain][] +- *Coq* by [Stephan Boyer][] +- *dsconfig* and *LDIF* by [Jacob Childress][] + +New styles: + +- *Ocean Dark* by [Gavin Siu][] + +Notable changes: + +- [Minh Nguyễn][] added more built-ins to Objective C. +- [Jeremy Hull][] fixed corner cases in C++ preprocessor directives and Diff + comments. +- [Victor Zhou][] added support for digit separators in C++ numbers. + +[Gavin Siu]: https://github.com/gavsiu +[Builder's Brewery]: https://github.com/buildersbrewery +[Victor Zhou]: https://github.com/OiCMudkips +[Sergey Bronnikov]: https://github.com/ligurio +[Joe Eli McIlvain]: https://github.com/jemc +[Stephan Boyer]: https://github.com/boyers +[Jacob Childress]: https://github.com/braveulysses +[Minh Nguyễn]: https://github.com/1ec5 +[Jeremy Hull]: https://github.com/sourrust + + +## Version 9.4.0 + +New languages: + +- *PureBASIC* by [Tristano Ajmone][] +- *BNF* by [Oleg Efimov][] +- *Ada* by [Lars Schulna][] + +New styles: + +- *PureBASIC* by [Tristano Ajmone][] + +Improvements to existing languages and styles: + +- We now highlight function declarations in Go. +- [Taisuke Fujimoto][] contributed very convoluted rules for raw and + interpolated strings in C#. +- [Boone Severson][] updated Verilog to comply with IEEE 1800-2012 + SystemVerilog. +- [Victor Zhou][] improved rules for comments and strings in PowerShell files. +- [Janis Voigtländer][] updated the definition of Elm to version 0.17 of the + languages. Elm is now featured on the front page of . +- Special variable `$this` is highlighted as a keyword in PHP. +- `usize` and `isize` are now highlighted in Rust. +- Fixed labels and directives in x86 assembler. + +[Tristano Ajmone]: https://github.com/tajmone +[Taisuke Fujimoto]: https://github.com/temp-impl +[Oleg Efimov]: https://github.com/Sannis +[Boone Severson]: https://github.com/BooneJS +[Victor Zhou]: https://github.com/OiCMudkips +[Lars Schulna]: https://github.com/captain-hanuta +[Janis Voigtländer]: https://github.com/jvoigtlaender + + +## Version 9.3.0 + +New languages: + +- *Tagger Script* by [Philipp Wolfer][] +- *MoonScript* by [Billy Quith][] + +New styles: + +- *xt256* by [Herbert Shin][] + +Improvements to existing languages and styles: + +- More robust handling of unquoted HTML tag attributes +- Relevance tuning for QML which was unnecessary eager at seizing other + languages' code +- Improve GAMS language parsing +- Fixed a bunch of bugs around selectors in Less +- Kotlin's got a new definition for annotations, updated keywords and other + minor improvements +- Added `move` to Rust keywords +- Markdown now recognizes \`\`\`-fenced code blocks +- Improved detection of function declarations in C++ and C# + +[Philipp Wolfer]: https://github.com/phw +[Billy Quith]: https://github.com/billyquith +[Herbert Shin]: https://github.com/initbar + + +## Version 9.2.0 + +New languages: + +- *QML* by [John Foster][] +- *HTMLBars* by [Michael Johnston][] +- *CSP* by [Taras][] +- *Maxima* by [Robert Dodier][] + +New styles: + +- *Gruvbox* by [Qeole][] +- *Dracula* by [Denis Ciccale][] + +Improvements to existing languages and styles: + +- We now correctly handle JSX with arbitrary node tree depth. +- Argument list for `(lambda)` in Scheme is no longer highlighted as a function + call. +- Stylus syntax doesn't break on valid CSS. +- More correct handling of comments and strings and other improvements for + VimScript. +- More subtle work on the default style. +- We now use anonymous modules for AMD. +- `macro_rules!` is now recognized as a built-in in Rust. + +[John Foster]: https://github.com/jf990 +[Qeole]: https://github.com/Qeole +[Denis Ciccale]: https://github.com/dciccale +[Michael Johnston]: https://github.com/lastobelus +[Taras]: https://github.com/oxdef +[Robert Dodier]: https://github.com/robert-dodier + + +## Version 9.1.0 + +New languages: + +- *Stan* by [Brendan Rocks][] +- *BASIC* by [Raphaël Assénat][] +- *GAUSS* by [Matt Evans][] +- *DTS* by [Martin Braun][] +- *Arduino* by [Stefania Mellai][] + +New Styles: + +- *Arduino Light* by [Stefania Mellai][] + +Improvements to existing languages and styles: + +- Handle return type annotations in Python +- Allow shebang headers in Javascript +- Support strings in Rust meta +- Recognize `struct` as a class-level definition in Rust +- Recognize b-prefixed chars and strings in Rust +- Better numbers handling in Verilog + +[Brendan Rocks]: http://brendanrocks.com +[Raphaël Assénat]: https://github.com/raphnet +[Matt Evans]: https://github.com/matthewevans +[Martin Braun]: https://github.com/mbr0wn +[Stefania Mellai]: https://github.com/smellai + + +## Version 9.0.0 + +The new major version brings a reworked styling system. Highlight.js now defines +a limited set of highlightable classes giving a consistent result across all the +styles and languages. You can read a more detailed explanation and background in +the [tracking issue][#348] that started this long process back in May. + +This change is backwards incompatible for those who uses highlight.js with a +custom stylesheet. The [new style guide][sg] explains how to write styles +in this new world. + +Bundled themes have also suffered a significant amount of improvements and may +look different in places, but all the things now consistent and make more sense. +Among others, the Default style has got a refresh and will probably be tweaked +some more in next releases. Please do give your feedback in our +[issue tracker][issues]. + +New languages in this release: + +- *Caché Object Script* by [Nikita Savchenko][] +- *YAML* by [Stefan Wienert][] +- *MIPS Assembler* by [Nebuleon Fumika][] +- *HSP* by [prince][] + +Improvements to existing languages and styles: + +- ECMAScript 6 modules import now do not require closing semicolon. +- ECMAScript 6 classes constructors now highlighted. +- Template string support for Typescript, as for ECMAScript 6. +- Scala case classes params highlight fixed. +- Built-in names introduced in Julia v0.4 added by [Kenta Sato][]. +- Refreshed Default style. + +Other notable changes: + +- [Web workers support][webworkers] added bu [Jan Kühle][]. +- We now have tests for compressed browser builds as well. +- The building tool chain has been switched to node.js 4.x. and is now + shamelessly uses ES6 features all over the place, courtesy of [Jeremy Hull][]. +- License added to non-compressed browser build. + +[Jan Kühle]: https://github.com/frigus02 +[Stefan Wienert]: https://github.com/zealot128 +[Kenta Sato]: https://github.com/bicycle1885 +[Nikita Savchenko]: https://github.com/ZitRos +[webworkers]: https://github.com/isagalaev/highlight.js#web-workers +[Jeremy Hull]: https://github.com/sourrust +[#348]: https://github.com/isagalaev/highlight.js/issues/348 +[sg]: http://highlightjs.readthedocs.org/en/latest/style-guide.html +[issues]: https://github.com/isagalaev/highlight.js/issues +[Nebuleon Fumika]: https://github.com/Nebuleon +[prince]: https://github.com/prince-0203 + + +## Version 8.9.1 + +Some last-minute changes reverted due to strange bug with minified browser build: + +- Scala case classes params highlight fixed +- ECMAScript 6 modules import now do not require closing semicolon +- ECMAScript 6 classes constructors now highlighted +- Template string support for Typescript, as for ECMAScript 6 +- License added to not minified browser build + + +## Version 8.9.0 + +New languages: + +- *crmsh* by [Kristoffer Gronlund][] +- *SQF* by [Soren Enevoldsen][] + +[Kristoffer Gronlund]: https://github.com/krig +[Soren Enevoldsen]: https://github.com/senevoldsen90 + +Notable fixes and improvements to existing languages: + +- Added `abstract` and `namespace` keywords to TypeScript by [Daniel Rosenwasser][] +- Added `label` support to Dockerfile by [Ladislav Prskavec][] +- Crystal highlighting improved by [Tsuyusato Kitsune][] +- Missing Swift keywords added by [Nate Cook][] +- Improve detection of C block comments +- ~~Scala case classes params highlight fixed~~ +- ~~ECMAScript 6 modules import now do not require closing semicolon~~ +- ~~ECMAScript 6 classes constructors now highlighted~~ +- ~~Template string support for Typescript, as for ECMAScript 6~~ + +Other notable changes: + +- ~~License added to not minified browser build~~ + +[Kristoffer Gronlund]: https://github.com/krig +[Søren Enevoldsen]: https://github.com/senevoldsen90 +[Daniel Rosenwasser]: https://github.com/DanielRosenwasser +[Ladislav Prskavec]: https://github.com/abtris +[Tsuyusato Kitsune]: https://github.com/MakeNowJust +[Nate Cook]: https://github.com/natecook1000 + + +## Version 8.8.0 + +New languages: + +- *Golo* by [Philippe Charrière][] +- *GAMS* by [Stefan Bechert][] +- *IRPF90* by [Anthony Scemama][] +- *Access logs* by [Oleg Efimov][] +- *Crystal* by [Tsuyusato Kitsune][] + +Notable fixes and improvements to existing languages: + +- JavaScript highlighting no longer fails with ES6 default parameters +- Added keywords `async` and `await` to Python +- PHP heredoc support improved +- Allow preprocessor directives within C++ functions + +Other notable changes: + +- Change versions to X.Y.Z SemVer-compatible format +- Added ability to build all targets at once + +[Philippe Charrière]: https://github.com/k33g +[Stefan Bechert]: https://github.com/b-pos465 +[Anthony Scemama]: https://github.com/scemama +[Oleg Efimov]: https://github.com/Sannis +[Tsuyusato Kitsune]: https://github.com/MakeNowJust + + +## Version 8.7 + +New languages: + +- *Zephir* by [Oleg Efimov][] +- *Elm* by [Janis Voigtländer][] +- *XQuery* by [Dirk Kirsten][] +- *Mojolicious* by [Dotan Dimet][] +- *AutoIt* by Manh Tuan from [J2TeaM][] +- *Toml* (ini extension) by [Guillaume Gomez][] + +New styles: + +- *Hopscotch* by [Jan T. Sott][] +- *Grayscale* by [MY Sun][] + +Notable fixes and improvements to existing languages: + +- Fix encoding of images when copied over in certain builds +- Fix incorrect highlighting of the word "bug" in comments +- Treat decorators different from matrix multiplication in Python +- Fix traits inheritance highlighting in Rust +- Fix incorrect document +- Oracle keywords added to SQL language definition by [Vadimtro][] +- Postgres keywords added to SQL language definition by [Benjamin Auder][] +- Fix registers in x86asm being highlighted as a hex number +- Fix highlighting for numbers with a leading decimal point +- Correctly highlight numbers and strings inside of C/C++ macros +- C/C++ functions now support pointer, reference, and move returns + +[Oleg Efimov]: https://github.com/Sannis +[Guillaume Gomez]: https://github.com/GuillaumeGomez +[Janis Voigtländer]: https://github.com/jvoigtlaender +[Jan T. Sott]: https://github.com/idleberg +[Dirk Kirsten]: https://github.com/dirkk +[MY Sun]: https://github.com/simonmysun +[Vadimtro]: https://github.com/Vadimtro +[Benjamin Auder]: https://github.com/ghost +[Dotan Dimet]: https://github.com/dotandimet +[J2TeaM]: https://github.com/J2TeaM + + +## Version 8.6 + +New languages: + +- *C/AL* by [Kenneth Fuglsang][] +- *DNS zone file* by [Tim Schumacher][] +- *Ceylon* by [Lucas Werkmeister][] +- *OpenSCAD* by [Dan Panzarella][] +- *Inform7* by [Bruno Dias][] +- *armasm* by [Dan Panzarella][] +- *TP* by [Jay Strybis][] + +New styles: + +- *Atelier Cave*, *Atelier Estuary*, + *Atelier Plateau* and *Atelier Savanna* by [Bram de Haan][] +- *Github Gist* by [Louis Barranqueiro][] + +Notable fixes and improvements to existing languages: + +- Multi-line raw strings from C++11 are now supported +- Fix class names with dashes in HAML +- The `async` keyword from ES6/7 is now supported +- TypeScript functions handle type and parameter complexity better +- We unified phpdoc/javadoc/yardoc etc modes across all languages +- CSS .class selectors relevance was dropped to prevent wrong language detection +- Images is now included to CDN build +- Release process is now automated + +[Bram de Haan]: https://github.com/atelierbram +[Kenneth Fuglsang]: https://github.com/kfuglsang +[Louis Barranqueiro]: https://github.com/LouisBarranqueiro +[Tim Schumacher]: https://github.com/enko +[Lucas Werkmeister]: https://github.com/lucaswerkmeister +[Dan Panzarella]: https://github.com/pzl +[Bruno Dias]: https://github.com/sequitur +[Jay Strybis]: https://github.com/unreal + + +## Version 8.5 + +New languages: + +- *pf.conf* by [Peter Piwowarski][] +- *Julia* by [Kenta Sato][] +- *Prolog* by [Raivo Laanemets][] +- *Docker* by [Alexis Hénaut][] +- *Fortran* by [Anthony Scemama][] and [Thomas Applencourt][] +- *Kotlin* by [Sergey Mashkov][] + +New styles: + +- *Agate* by [Taufik Nurrohman][] +- *Darcula* by [JetBrains][] +- *Atelier Sulphurpool* by [Bram de Haan][] +- *Android Studio* by [Pedro Oliveira][] + +Notable fixes and improvements to existing languages: + +- ES6 features in JavaScript are better supported now by [Gu Yiling][]. +- Swift now recognizes body-less method definitions. +- Single expression functions `def foo, do: ... ` now work in Elixir. +- More uniform detection of built-in classes in Objective C. +- Fixes for number literals and processor directives in Rust. +- HTML ` + ``` + +- `tabReplace` and `useBR` that were used in different places are also unified + into the global options object and are to be set using `configure(options)`. + This function is documented in our [API docs][]. Also note that these + parameters are gone from `highlightBlock` and `fixMarkup` which are now also + rely on `configure`. + +- We removed public-facing (though undocumented) object `hljs.LANGUAGES` which + was used to register languages with the library in favor of two new methods: + `registerLanguage` and `getLanguage`. Both are documented in our [API docs][]. + +- Result returned from `highlight` and `highlightAuto` no longer contains two + separate attributes contributing to relevance score, `relevance` and + `keyword_count`. They are now unified in `relevance`. + +Another technically compatible change that nonetheless might need attention: + +- The structure of the NPM package was refactored, so if you had installed it + locally, you'll have to update your paths. The usual `require('highlight.js')` + works as before. This is contributed by [Dmitry Smolin][]. + +New features: + +- Languages now can be recognized by multiple names like "js" for JavaScript or + "html" for, well, HTML (which earlier insisted on calling it "xml"). These + aliases can be specified in the class attribute of the code container in your + HTML as well as in various API calls. For now there are only a few very common + aliases but we'll expand it in the future. All of them are listed in the + [class reference][cr]. + +- Language detection can now be restricted to a subset of languages relevant in + a given context — a web page or even a single highlighting call. This is + especially useful for node.js build that includes all the known languages. + Another example is a StackOverflow-style site where users specify languages + as tags rather than in the markdown-formatted code snippets. This is + documented in the [API reference][] (see methods `highlightAuto` and + `configure`). + +- Language definition syntax streamlined with [variants][] and + [beginKeywords][]. + +New languages and styles: + +- *Oxygene* by [Carlo Kok][] +- *Mathematica* by [Daniel Kvasnička][] +- *Autohotkey* by [Seongwon Lee][] +- *Atelier* family of styles in 10 variants by [Bram de Haan][] +- *Paraíso* styles by [Jan T. Sott][] + +Miscellaneous improvements: + +- Highlighting `=>` prompts in Clojure. +- [Jeremy Hull][] fixed a lot of styles for consistency. +- Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html]. +- Objective C and C# now properly highlight titles in method definition. +- Big overhaul of relevance counting for a number of languages. Please do report + bugs about mis-detection of non-trivial code snippets! + +[API reference]: http://highlightjs.readthedocs.org/en/latest/api.html + +[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html +[api docs]: http://highlightjs.readthedocs.org/en/latest/api.html +[variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion +[beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d +[php-html]: https://twitter.com/highlightjs/status/408890903017689088 + +[Carlo Kok]: https://github.com/carlokok +[Bram de Haan]: https://github.com/atelierbram +[Daniel Kvasnička]: https://github.com/dkvasnicka +[Dmitry Smolin]: https://github.com/dimsmol +[Jeremy Hull]: https://github.com/sourrust +[Seongwon Lee]: https://github.com/dlimpid +[Jan T. Sott]: https://github.com/idleberg + + +## Version 7.5 + +A catch-up release dealing with some of the accumulated contributions. This one +is probably will be the last before the 8.0 which will be slightly backwards +incompatible regarding some advanced use-cases. + +One outstanding change in this version is the addition of 6 languages to the +[hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and +Makefile. It now weighs about 6K more but we're going to keep it under 30K. + +New languages: + +- OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud] +- [LiveCode Server][lcs] by [Ralf Bitter][revig] +- Scilab by [Sylvestre Ledru][sylvestre] +- basic support for Makefile by [Ivan Sagalaev][isagalaev] + +Improvements: + +- Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}` + regexps. +- Clojure now allows a function call in the beginning of s-expressions + `(($filter "myCount") (arr 1 2 3 4 5))`. +- Haskell's got new keywords and now recognizes more things like pragmas, + preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep] + for the implementation and to [Jeremy Hull][sourrust] for guiding it. +- Miscellaneous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#. + +[mehdid]: https://github.com/mehdid +[nbraud]: https://github.com/nbraud +[revig]: https://github.com/revig +[lcs]: http://livecode.com/developers/guides/server/ +[sylvestre]: https://github.com/sylvestre +[isagalaev]: https://github.com/isagalaev +[treep]: https://github.com/treep +[sourrust]: https://github.com/sourrust +[d]: http://highlightjs.org/download/ + + +## New core developers + +The latest long period of almost complete inactivity in the project coincided +with growing interest to it led to a decision that now seems completely obvious: +we need more core developers. + +So without further ado let me welcome to the core team two long-time +contributors: [Jeremy Hull][] and [Oleg +Efimov][]. + +Hope now we'll be able to work through stuff faster! + +P.S. The historical commit is [here][1] for the record. + +[Jeremy Hull]: https://github.com/sourrust +[Oleg Efimov]: https://github.com/sannis +[1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f + + +## Version 7.4 + +This long overdue version is a snapshot of the current source tree with all the +changes that happened during the past year. Sorry for taking so long! + +Along with the changes in code highlight.js has finally got its new home at +, moving from its cradle on Software Maniacs which it +outgrew a long time ago. Be sure to report any bugs about the site to +. + +On to what's new… + +New languages: + +- Handlebars templates by [Robin Ward][] +- Oracle Rules Language by [Jason Jacobson][] +- F# by [Joans Follesø][] +- AsciiDoc and Haml by [Dan Allen][] +- Lasso by [Eric Knibbe][] +- SCSS by [Kurt Emch][] +- VB.NET by [Poren Chiang][] +- Mizar by [Kelley van Evert][] + +[Robin Ward]: https://github.com/eviltrout +[Jason Jacobson]: https://github.com/jayce7 +[Joans Follesø]: https://github.com/follesoe +[Dan Allen]: https://github.com/mojavelinux +[Eric Knibbe]: https://github.com/EricFromCanada +[Kurt Emch]: https://github.com/kemch +[Poren Chiang]: https://github.com/rschiang +[Kelley van Evert]: https://github.com/kelleyvanevert + +New style themes: + +- Monokai Sublime by [noformnocontent][] +- Railscasts by [Damien White][] +- Obsidian by [Alexander Marenin][] +- Docco by [Simon Madine][] +- Mono Blue by [Ivan Sagalaev][] (uses a single color hue for everything) +- Foundation by [Dan Allen][] + +[noformnocontent]: http://nn.mit-license.org/ +[Damien White]: https://github.com/visoft +[Alexander Marenin]: https://github.com/ioncreature +[Simon Madine]: https://github.com/thingsinjars +[Ivan Sagalaev]: https://github.com/isagalaev + +Other notable changes: + +- Corrected many corner cases in CSS. +- Dropped Python 2 version of the build tool. +- Implemented building for the AMD format. +- Updated Rust keywords (thanks to [Dmitry Medvinsky][]). +- Literal regexes can now be used in language definitions. +- CoffeeScript highlighting is now significantly more robust and rich due to + input from [Cédric Néhémie][]. + +[Dmitry Medvinsky]: https://github.com/dmedvinsky +[Cédric Néhémie]: https://github.com/abe33 + + +## Version 7.3 + +- Since this version highlight.js no longer works in IE version 8 and older. + It's made it possible to reduce the library size and dramatically improve code + readability and made it easier to maintain. Time to go forward! + +- New languages: AppleScript (by [Nathan Grigg][ng] and [Dr. Drang][dd]) and + Brainfuck (by [Evgeny Stepanischev][bolk]). + +- Improvements to existing languages: + + - interpreter prompt in Python (`>>>` and `...`) + - @-properties and classes in CoffeeScript + - E4X in JavaScript (by [Oleg Efimov][oe]) + - new keywords in Perl (by [Kirk Kimmel][kk]) + - big Ruby syntax update (by [Vasily Polovnyov][vast]) + - small fixes in Bash + +- Also Oleg Efimov did a great job of moving all the docs for language and style + developers and contributors from the old wiki under the source code in the + "docs" directory. Now these docs are nicely presented at + . + +[ng]: https://github.com/nathan11g +[dd]: https://github.com/drdrang +[bolk]: https://github.com/bolknote +[oe]: https://github.com/Sannis +[kk]: https://github.com/kimmel +[vast]: https://github.com/vast + + +## Version 7.2 + +A regular bug-fix release without any significant new features. Enjoy! + + +## Version 7.1 + +A Summer crop: + +- [Marc Fornos][mf] made the definition for Clojure along with the matching + style Rainbow (which, of course, works for other languages too). +- CoffeeScript support continues to improve getting support for regular + expressions. +- Yoshihide Jimbo ported to highlight.js [five Tomorrow styles][tm] from the + [project by Chris Kempson][tm0]. +- Thanks to [Casey Duncun][cd] the library can now be built in the popular + [AMD format][amd]. +- And last but not least, we've got a fair number of correctness and consistency + fixes, including a pretty significant refactoring of Ruby. + +[mf]: https://github.com/mfornos +[tm]: http://jmblog.github.com/color-themes-for-highlightjs/ +[tm0]: https://github.com/ChrisKempson/Tomorrow-Theme +[cd]: https://github.com/caseman +[amd]: http://requirejs.org/docs/whyamd.html + + +## Version 7.0 + +The reason for the new major version update is a global change of keyword syntax +which resulted in the library getting smaller once again. For example, the +hosted build is 2K less than at the previous version while supporting two new +languages. + +Notable changes: + +- The library now works not only in a browser but also with [node.js][]. It is + installable with `npm install highlight.js`. [API][] docs are available on our + wiki. + +- The new unique feature (apparently) among syntax highlighters is highlighting + *HTTP* headers and an arbitrary language in the request body. The most useful + languages here are *XML* and *JSON* both of which highlight.js does support. + Here's [the detailed post][p] about the feature. + +- Two new style themes: a dark "south" *[Pojoaque][]* by Jason Tate and an + emulation of*XCode* IDE by [Angel Olloqui][ao]. + +- Three new languages: *D* by [Aleksandar Ružičić][ar], *R* by [Joe Cheng][jc] + and *GLSL* by [Sergey Tikhomirov][st]. + +- *Nginx* syntax has become a million times smaller and more universal thanks to + remaking it in a more generic manner that doesn't require listing all the + directives in the known universe. + +- Function titles are now highlighted in *PHP*. + +- *Haskell* and *VHDL* were significantly reworked to be more rich and correct + by their respective maintainers [Jeremy Hull][sr] and [Igor Kalnitsky][ik]. + +And last but not least, many bugs have been fixed around correctness and +language detection. + +Overall highlight.js currently supports 51 languages and 20 style themes. + +[node.js]: http://nodejs.org/ +[api]: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api +[p]: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/ +[pojoaque]: http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html +[ao]: https://github.com/angelolloqui +[ar]: https://github.com/raleksandar +[jc]: https://github.com/jcheng5 +[st]: https://github.com/tikhomirov +[sr]: https://github.com/sourrust +[ik]: https://github.com/ikalnitsky + + +## Version 6.2 + +A lot of things happened in highlight.js since the last version! We've got nine +new contributors, the discussion group came alive, and the main branch on GitHub +now counts more than 350 followers. Here are most significant results coming +from all this activity: + +- 5 (five!) new languages: Rust, ActionScript, CoffeeScript, MatLab and + experimental support for markdown. Thanks go to [Andrey Vlasovskikh][av], + [Alexander Myadzel][am], [Dmytrii Nagirniak][dn], [Oleg Efimov][oe], [Denis + Bardadym][db] and [John Crepezzi][jc]. + +- 2 new style themes: Monokai by [Luigi Maselli][lm] and stylistic imitation of + another well-known highlighter Google Code Prettify by [Aahan Krish][ak]. + +- A vast number of [correctness fixes and code refactorings][log], mostly made + by [Oleg Efimov][oe] and [Evgeny Stepanischev][es]. + +[av]: https://github.com/vlasovskikh +[am]: https://github.com/myadzel +[dn]: https://github.com/dnagir +[oe]: https://github.com/Sannis +[db]: https://github.com/btd +[jc]: https://github.com/seejohnrun +[lm]: http://grigio.org/ +[ak]: https://github.com/geekpanth3r +[es]: https://github.com/bolknote +[log]: https://github.com/isagalaev/highlight.js/commits/ + + +## Version 6.1 — Solarized + +[Jeremy Hull][jh] has implemented my dream feature — a port of [Solarized][] +style theme famous for being based on the intricate color theory to achieve +correct contrast and color perception. It is now available for highlight.js in +both variants — light and dark. + +This version also adds a new original style Arta. Its author pumbur maintains a +[heavily modified fork of highlight.js][pb] on GitHub. + +[jh]: https://github.com/sourrust +[solarized]: http://ethanschoonover.com/solarized +[pb]: https://github.com/pumbur/highlight.js + + +## Version 6.0 + +New major version of the highlighter has been built on a significantly +refactored syntax. Due to this it's even smaller than the previous one while +supporting more languages! + +New languages are: + +- Haskell by [Jeremy Hull][sourrust] +- Erlang in two varieties — module and REPL — made collectively by [Nikolay + Zakharov][desh], [Dmitry Kovega][arhibot] and [Sergey Ignatov][ignatov] +- Objective C by [Valerii Hiora][vhbit] +- Vala by [Antono Vasiljev][antono] +- Go by [Stephan Kountso][steplg] + +[sourrust]: https://github.com/sourrust +[desh]: http://desh.su/ +[arhibot]: https://github.com/arhibot +[ignatov]: https://github.com/ignatov +[vhbit]: https://github.com/vhbit +[antono]: https://github.com/antono +[steplg]: https://github.com/steplg + +Also this version is marginally faster and fixes a number of small long-standing +bugs. + +Developer overview of the new language syntax is available in a [blog post about +recent beta release][beta]. + +[beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/ + +P.S. New version is not yet available on a Yandex CDN, so for now you have to +download [your own copy][d]. + +[d]: /soft/highlight/en/download/ + + +## Version 5.14 + +Fixed bugs in HTML/XML detection and relevance introduced in previous +refactoring. + +Also test.html now shows the second best result of language detection by +relevance. + + +## Version 5.13 + +Past weekend began with a couple of simple additions for existing languages but +ended up in a big code refactoring bringing along nice improvements for language +developers. + +### For users + +- Description of C++ has got new keywords from the upcoming [C++ 0x][] standard. +- Description of HTML has got new tags from [HTML 5][]. +- CSS-styles have been unified to use consistent padding and also have lost + pop-outs with names of detected languages. +- [Igor Kalnitsky][ik] has sent two new language descriptions: CMake & VHDL. + +This makes total number of languages supported by highlight.js to reach 35. + +Bug fixes: + +- Custom classes on `
` tags are not being overridden anymore
+- More correct highlighting of code blocks inside non-`
` containers:
+  highlighter now doesn't insist on replacing them with its own container and
+  just replaces the contents.
+- Small fixes in browser compatibility and heuristics.
+
+[c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
+[html 5]: http://en.wikipedia.org/wiki/HTML5
+[ik]: http://kalnitsky.org.ua/
+
+### For developers
+
+The most significant change is the ability to include language submodes right
+under `contains` instead of defining explicit named submodes in the main array:
+
+    contains: [
+      'string',
+      'number',
+      {begin: '\\n', end: hljs.IMMEDIATE_RE}
+    ]
+
+This is useful for auxiliary modes needed only in one place to define parsing.
+Note that such modes often don't have `className` and hence won't generate a
+separate `` in the resulting markup. This is similar in effect to
+`noMarkup: true`. All existing languages have been refactored accordingly.
+
+Test file test.html has at last become a real test. Now it not only puts the
+detected language name under the code snippet but also tests if it matches the
+expected one. Test summary is displayed right above all language snippets.
+
+
+## CDN
+
+Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
+[Link up][l]!
+
+[yandex]: http://yandex.com/
+[l]: http://softwaremaniacs.org/soft/highlight/en/download/
+
+
+## Version 5.10 — "Paris".
+
+Though I'm on a vacation in Paris, I decided to release a new version with a
+couple of small fixes:
+
+- Tomas Vitvar discovered that TAB replacement doesn't always work when used
+  with custom markup in code
+- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
+
+
+## Version 5.9
+
+A long-awaited version is finally released.
+
+New languages:
+
+- Andrew Fedorov made a definition for Lua
+- a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
+  Nginx config
+- [Vladimir Moskva][vm] made a definition for TeX
+
+[pl]: http://kung-fu-tzu.ru/
+[vm]: http://fulc.ru/
+
+Fixes for existing languages:
+
+- [Loren Segal][ls] reworked the Ruby definition and added highlighting for
+  [YARD][] inline documentation
+- the definition of SQL has become more solid and now it shouldn't be overly
+  greedy when it comes to language detection
+
+[ls]: http://gnuu.org/
+[yard]: http://yardoc.org/
+
+The highlighter has become more usable as a library allowing to do highlighting
+from initialization code of JS frameworks and in ajax methods (see.
+readme.eng.txt).
+
+Also this version drops support for the [WordPress][wp] plugin. Everyone is
+welcome to [pick up its maintenance][p] if needed.
+
+[wp]: http://wordpress.org/
+[p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
+
+
+## Version 5.8
+
+- Jan Berkel has contributed a definition for Scala. +1 to hotness!
+- All CSS-styles are rewritten to work only inside `
` tags to avoid
+  conflicts with host site styles.
+
+
+## Version 5.7.
+
+Fixed escaping of quotes in VBScript strings.
+
+
+## Version 5.5
+
+This version brings a small change: now .ini-files allow digits, underscores and
+square brackets in key names.
+
+
+## Version 5.4
+
+Fixed small but upsetting bug in the packer which caused incorrect highlighting
+of explicitly specified languages. Thanks to Andrew Fedorov for precise
+diagnostics!
+
+
+## Version 5.3
+
+The version to fulfil old promises.
+
+The most significant change is that highlight.js now preserves custom user
+markup in code along with its own highlighting markup. This means that now it's
+possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
+[initial proposal][1] and for making a proof-of-concept patch.
+
+Also in this version:
+
+- [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
+  support for CSS @-rules and Ruby symbols.
+- Yura Zaripov has sent two styles: Brown Paper and School Book.
+- Oleg Volchkov has sent a definition for [Parser 3][p3].
+
+[1]: http://softwaremaniacs.org/forum/highlightjs/6612/
+[p3]: http://www.parser.ru/
+[vp]: http://vasily.polovnyov.ru/
+[vd]: http://dolzhenko.blogspot.com/
+
+
+## Version 5.2
+
+- at last it's possible to replace indentation TABs with something sensible
+  (e.g. 2 or 4 spaces)
+- new keywords and built-ins for 1C by Sergey Baranov
+- a couple of small fixes to Apache highlighting
+
+
+## Version 5.1
+
+This is one of those nice version consisting entirely of new and shiny
+contributions!
+
+- [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
+- [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
+  original visual style for it is now available for all highlight.js languages
+  under the name "Magula".
+- [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
+  languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
+  the matter.
+
+[vooon]: http://vehq.ru/about/
+[rukeba]: http://rukeba.com/
+[drake]: http://drakeguan.org/
+[ke]: http://k-evdokimenko.moikrug.ru/
+
+
+## Version 5.0
+
+The main change in the new major version of highlight.js is a mechanism for
+packing several languages along with the library itself into a single compressed
+file. Now sites using several languages will load considerably faster because
+the library won't dynamically include additional files while loading.
+
+Also this version fixes a long-standing bug with Javascript highlighting that
+couldn't distinguish between regular expressions and division operations.
+
+And as usually there were a couple of minor correctness fixes.
+
+Great thanks to all contributors! Keep using highlight.js.
+
+
+## Version 4.3
+
+This version comes with two contributions from [Jason Diamond][jd]:
+
+- language definition for C# (yes! it was a long-missed thing!)
+- Visual Studio-like highlighting style
+
+Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
+
+[jd]: http://jason.diamond.name/weblog/
+
+
+## Version 4.2
+
+The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
+somewhat experimental meaning that for highlighting "keywords" it doesn't use
+any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
+in parentheses wherever it makes sense. I'd like to ask people programming in
+Lisp to confirm if it's a good idea and send feedback to [the forum][f].
+
+Other changes:
+
+- Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
+- [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
+  test.html
+- comments now allowed inside Ruby function definition
+- [MEL][] language from [Shuen-Huei Guan][drake]
+- whitespace now allowed between `
` and ``
+- better auto-detection of C++ and PHP
+- HTML allows embedded VBScript (`<% .. %>`)
+
+[f]: http://softwaremaniacs.org/forum/highlightjs/
+[voldmar]: http://voldmar.ya.ru/
+[mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
+[drake]: http://drakeguan.org/
+
+
+## Version 4.1
+
+Languages:
+
+- Bash from Vah
+- DOS bat-files from Alexander Makarov (Sam)
+- Diff files from Vasily Polovnyov
+- Ini files from myself though initial idea was from Sam
+
+Styles:
+
+- Zenburn from Vladimir Epifanov, this is an imitation of a
+  [well-known theme for Vim][zenburn].
+- Ascetic from myself, as a realization of ideals of non-flashy highlighting:
+  just one color in only three gradations :-)
+
+In other news. [One small bug][bug] was fixed, built-in keywords were added for
+Python and C++ which improved auto-detection for the latter (it was shame that
+[my wife's blog][alenacpp] had issues with it from time to time). And lastly
+thanks go to Sam for getting rid of my stylistic comments in code that were
+getting in the way of [JSMin][].
+
+[zenburn]: http://en.wikipedia.org/wiki/Zenburn
+[alenacpp]: http://alenacpp.blogspot.com/
+[bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
+[jsmin]: http://code.google.com/p/jsmin-php/
+
+
+## Version 4.0
+
+New major version is a result of vast refactoring and of many contributions.
+
+Visible new features:
+
+- Highlighting of embedded languages. Currently is implemented highlighting of
+  Javascript and CSS inside HTML.
+- Bundled 5 ready-made style themes!
+
+Invisible new features:
+
+- Highlight.js no longer pollutes global namespace. Only one object and one
+  function for backward compatibility.
+- Performance is further increased by about 15%.
+
+Changing of a major version number caused by a new format of language definition
+files. If you use some third-party language files they should be updated.
+
+
+## Version 3.5
+
+A very nice version in my opinion fixing a number of small bugs and slightly
+increased speed in a couple of corner cases. Thanks to everybody who reports
+bugs in he [forum][f] and by email!
+
+There is also a new language — XML. A custom XML formerly was detected as HTML
+and didn't highlight custom tags. In this version I tried to make custom XML to
+be detected and highlighted by its own rules. Which by the way include such
+things as CDATA sections and processing instructions (``).
+
+[f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
+
+
+## Version 3.3
+
+[Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
+File export.html contains a little program that shows and allows to copy and
+paste an HTML code generated by the highlighter for any code snippet. This can
+be useful in situations when one can't use the script itself on a site.
+
+
+[xonix]: http://xonixx.blogspot.com/
+
+
+## Version 3.2 consists completely of contributions:
+
+- Vladimir Gubarkov has described SmallTalk
+- Yuri Ivanov has described 1C
+- Peter Leonov has packaged the highlighter as a Firefox extension
+- Vladimir Ermakov has compiled a mod for phpBB
+
+Many thanks to you all!
+
+
+## Version 3.1
+
+Three new languages are available: Django templates, SQL and Axapta. The latter
+two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
+SQL definition but I'd never started it be it from the ground up :-)
+
+The engine itself has got a long awaited feature of grouping keywords
+("keyword", "built-in function", "literal"). No more hacks!
+
+[1]: http://roudakov.ru/
+
+
+## Version 3.0
+
+It is major mainly because now highlight.js has grown large and has become
+modular. Now when you pass it a list of languages to highlight it will
+dynamically load into a browser only those languages.
+
+Also:
+
+- Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
+  RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
+  languages!
+- Heuristics for C++ and HTML got better.
+- I've implemented (at last) a correct handling of backslash escapes in C-like
+  languages.
+
+There is also a small backwards incompatible change in the new version. The
+function initHighlighting that was used to initialize highlighting instead of
+initHighlightingOnLoad a long time ago no longer works. If you by chance still
+use it — replace it with the new one.
+
+[RibKit]: http://ribkit.sourceforge.net/
+
+
+## Version 2.9
+
+Highlight.js is a parser, not just a couple of regular expressions. That said
+I'm glad to announce that in the new version 2.9 has support for:
+
+- in-string substitutions for Ruby -- `#{...}`
+- strings from from numeric symbol codes (like #XX) for Delphi
+
+
+## Version 2.8
+
+A maintenance release with more tuned heuristics. Fully backwards compatible.
+
+
+## Version 2.7
+
+- Nikita Ledyaev presents highlighting for VBScript, yay!
+- A couple of bugs with escaping in strings were fixed thanks to Mickle
+- Ongoing tuning of heuristics
+
+Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
+
+
+## Version 2.4
+
+- Peter Leonov provides another improved highlighting for Perl
+- Javascript gets a new kind of keywords — "literals". These are the words
+  "true", "false" and "null"
+
+Also highlight.js homepage now lists sites that use the library. Feel free to
+add your site by [dropping me a message][mail] until I find the time to build a
+submit form.
+
+[mail]: mailto:Maniac@SoftwareManiacs.Org
+
+
+## Version 2.3
+
+This version fixes IE breakage in previous version. My apologies to all who have
+already downloaded that one!
+
+
+## Version 2.2
+
+- added highlighting for Javascript
+- at last fixed parsing of Delphi's escaped apostrophes in strings
+- in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
+  Perl
+
+
+## Version 2.0
+
+- Ruby support by [Anton Kovalyov][ak]
+- speed increased by orders of magnitude due to new way of parsing
+- this same way allows now correct highlighting of keywords in some tricky
+  places (like keyword "End" at the end of Delphi classes)
+
+[ak]: http://anton.kovalyov.net/
+
+
+## Version 1.0
+
+Version 1.0 of javascript syntax highlighter is released!
+
+It's the first version available with English description. Feel free to post
+your comments and question to [highlight.js forum][forum]. And don't be afraid
+if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
+
+[forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6
diff --git a/highlightjs/asset/LICENSE b/highlightjs/asset/LICENSE
new file mode 100644
index 00000000..422deb73
--- /dev/null
+++ b/highlightjs/asset/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of highlight.js nor the names of its contributors 
+      may be used to endorse or promote products derived from this software 
+      without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/highlightjs/asset/README.md b/highlightjs/asset/README.md
new file mode 100644
index 00000000..9f76e6bd
--- /dev/null
+++ b/highlightjs/asset/README.md
@@ -0,0 +1,150 @@
+# Highlight.js
+
+[![Build Status](https://travis-ci.org/isagalaev/highlight.js.svg?branch=master)](https://travis-ci.org/isagalaev/highlight.js)
+
+Highlight.js is a syntax highlighter written in JavaScript. It works in
+the browser as well as on the server. It works with pretty much any
+markup, doesn’t depend on any framework and has automatic language
+detection.
+
+## Getting Started
+
+The bare minimum for using highlight.js on a web page is linking to the
+library along with one of the styles and calling
+[`initHighlightingOnLoad`][1]:
+
+```html
+
+
+
+```
+
+This will find and highlight code inside of `
` tags; it tries
+to detect the language automatically. If automatic detection doesn’t
+work for you, you can specify the language in the `class` attribute:
+
+```html
+
...
+``` + +The list of supported language classes is available in the [class +reference][2]. Classes can also be prefixed with either `language-` or +`lang-`. + +To disable highlighting altogether use the `nohighlight` class: + +```html +
...
+``` + +## Custom Initialization + +When you need a bit more control over the initialization of +highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4] +functions. This allows you to control *what* to highlight and *when*. + +Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using +jQuery: + +```javascript +$(document).ready(function() { + $('pre code').each(function(i, block) { + hljs.highlightBlock(block); + }); +}); +``` + +You can use any tags instead of `
` to mark up your code. If
+you don't use a container that preserve line breaks you will need to
+configure highlight.js to use the `
` tag: + +```javascript +hljs.configure({useBR: true}); + +$('div.code').each(function(i, block) { + hljs.highlightBlock(block); +}); +``` + +For other options refer to the documentation for [`configure`][4]. + + +## Web Workers + +You can run highlighting inside a web worker to avoid freezing the browser +window while dealing with very big chunks of code. + +In your main script: + +```javascript +addEventListener('load', function() { + var code = document.querySelector('#code'); + var worker = new Worker('worker.js'); + worker.onmessage = function(event) { code.innerHTML = event.data; } + worker.postMessage(code.textContent); +}) +``` + +In worker.js: + +```javascript +onmessage = function(event) { + importScripts('/highlight.pack.js'); + var result = self.hljs.highlightAuto(event.data); + postMessage(result.value); +} +``` + + +## Getting the Library + +You can get highlight.js as a hosted, or custom-build, browser script or +as a server module. Right out of the box the browser script supports +both AMD and CommonJS, so if you wish you can use RequireJS or +Browserify without having to build from source. The server module also +works perfectly fine with Browserify, but there is the option to use a +build specific to browsers rather than something meant for a server. +Head over to the [download page][5] for all the options. + +**Don't link to GitHub directly.** The library is not supposed to work straight +from the source, it requires building. If none of the pre-packaged options +work for you refer to the [building documentation][6]. + +**The CDN-hosted package doesn't have all the languages.** Otherwise it'd be +too big. If you don't see the language you need in the ["Common" section][5], +it can be added manually: + +```html + +``` + +**On Almond.** You need to use the optimizer to give the module a name. For +example: + +``` +r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js +``` + + +## License + +Highlight.js is released under the BSD License. See [LICENSE][7] file +for details. + +## Links + +The official site for the library is at . + +Further in-depth documentation for the API and other topics is at +. + +Authors and contributors are listed in the [AUTHORS.en.txt][8] file. + +[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload +[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html +[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block +[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options +[5]: https://highlightjs.org/download/ +[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html +[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE +[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt diff --git a/highlightjs/asset/README.ru.md b/highlightjs/asset/README.ru.md new file mode 100644 index 00000000..ac481d07 --- /dev/null +++ b/highlightjs/asset/README.ru.md @@ -0,0 +1,142 @@ +# Highlight.js + +Highlight.js — это инструмент для подсветки синтаксиса, написанный на JavaScript. Он работает +и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не +зависит от каких-либо фреймворков и умеет автоматически определять язык. + + +## Начало работы + +Минимум, что нужно сделать для использования highlight.js на веб-странице — это +подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]: + +```html + + + +``` + +Библиотека найдёт и раскрасит код внутри тегов `
`, попытавшись
+автоматически определить язык. Когда автоопределение не срабатывает, можно явно
+указать язык в атрибуте class:
+
+```html
+
...
+``` + +Список поддерживаемых классов языков доступен в [справочнике по классам][2]. +Класс также можно предварить префиксами `language-` или `lang-`. + +Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`: + +```html +
...
+``` + +## Инициализация вручную + +Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете +использовать функции [`highlightBlock`][3] и [`configure`][4]. Таким образом +можно управлять тем, *что* и *когда* подсвечивать. + +Вот пример инициализации, эквивалентной вызову [`initHighlightingOnLoad`][1], но +с использованием jQuery: + +```javascript +$(document).ready(function() { + $('pre code').each(function(i, block) { + hljs.highlightBlock(block); + }); +}); +``` + +Вы можете использовать любые теги разметки вместо `
`. Если
+используете контейнер, не сохраняющий переводы строк, вам нужно сказать
+highlight.js использовать для них тег `
`: + +```javascript +hljs.configure({useBR: true}); + +$('div.code').each(function(i, block) { + hljs.highlightBlock(block); +}); +``` + +Другие опции можно найти в документации функции [`configure`][4]. + + +## Web Workers + +Подсветку можно запустить внутри web worker'а, чтобы окно +браузера не подтормаживало при работе с большими кусками кода. + +В основном скрипте: + +```javascript +addEventListener('load', function() { + var code = document.querySelector('#code'); + var worker = new Worker('worker.js'); + worker.onmessage = function(event) { code.innerHTML = event.data; } + worker.postMessage(code.textContent); +}) +``` + +В worker.js: + +```javascript +onmessage = function(event) { + importScripts('/highlight.pack.js'); + var result = self.hljs.highlightAuto(event.data); + postMessage(result.value); +} +``` + + +## Установка библиотеки + +Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать +индивидуальную сборку, а также установив модуль на сервере. На +[странице загрузки][5] подробно описаны все варианты. + +**Не подключайте GitHub напрямую.** Библиотека не предназначена для +использования в виде исходного кода, а требует отдельной сборки. Если вам не +подходит ни один из готовых вариантов, читайте [документацию по сборке][6]. + +**Файл на CDN содержит не все языки.** Иначе он будет слишком большого размера. +Если нужного вам языка нет в [категории "Common"][5], можно дообавить его +вручную: + +```html + +``` + +**Про Almond.** Нужно задать имя модуля в оптимизаторе, например: + +``` +r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js +``` + + +## Лицензия + +Highlight.js распространяется под лицензией BSD. Подробнее читайте файл +[LICENSE][7]. + + +## Ссылки + +Официальный сайт билиотеки расположен по адресу . + +Более подробная документация по API и другим темам расположена на +. + +Авторы и контрибьюторы перечислены в файле [AUTHORS.ru.txt][8] file. + +[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload +[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html +[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block +[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options +[5]: https://highlightjs.org/download/ +[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html +[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE +[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt diff --git a/highlightjs/asset/highlight.pack.js b/highlightjs/asset/highlight.pack.js new file mode 100644 index 00000000..9a5bb0f1 --- /dev/null +++ b/highlightjs/asset/highlight.pack.js @@ -0,0 +1,2 @@ +/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */ +!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&").replace(//g,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){s+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"
":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("java",function(e){var a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t=a+"(<"+a+"(\\s*,\\s*"+a+")*>)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:s,r:0};return{aliases:["jsp"],k:r,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},i=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{sL:"javascript",eB:!0,eE:!0,v:[{b:"```",e:"```"},{b:"`",e:"`"}]}];r.c=i;var s=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(i)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:i.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[s,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[s]},s]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",k:"unless",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",w=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b://,c:["self"]},t.TM]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("shell",function(s){return{aliases:["console"],c:[{cN:"meta",b:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{e:"$",sL:"bash"}}]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:_,l:i,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:i,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("makefile",function(e){var i={cN:"variable",v:[{b:"\\$\\("+e.UIR+"\\)",c:[e.BE]},{b:/\$[@%>>|\.\.\.) /},c={cN:"subst",b:/\{/,e:/\}/,k:r,i:/#/},a={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[b],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[b],r:10},{b:/(fr|rf|f)'''/,e:/'''/,c:[b,c]},{b:/(fr|rf|f)"""/,e:/"""/,c:[b,c]},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},{b:/(fr|rf|f)'/,e:/'/,c:[c]},{b:/(fr|rf|f)"/,e:/"/,c:[c]},e.ASM,e.QSM]},s={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},i={cN:"params",b:/\(/,e:/\)/,c:["self",b,s,a]};return c.c=[a,s,b],{aliases:["py","gyp"],k:r,i:/(<\/|->|\?)|=>/,c:[b,s,a,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,i,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},t={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},r=e.inherit(t,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},c=e.inherit(a,{i:/\n/}),n={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,c]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},c]});a.c=[s,n,t,e.ASM,e.QSM,e.CNM,e.CBCM],c.c=[o,n,r,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,n,t,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{cN:"meta",b:"^\\s*\\[",eB:!0,e:"\\]",eE:!0,c:[{cN:"meta-string",b:/"/,e:/"/}]},{bK:"new return throw await else",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"meta",b:/<\?(php)?|\?>/},t={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[i]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},i,{cN:"keyword",b:/\$this\b/},c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,t,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},t,a]}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}}); \ No newline at end of file diff --git a/highlightjs/asset/styles/agate.css b/highlightjs/asset/styles/agate.css new file mode 100644 index 00000000..8d64547c --- /dev/null +++ b/highlightjs/asset/styles/agate.css @@ -0,0 +1,108 @@ +/*! + * Agate by Taufik Nurrohman + * ---------------------------------------------------- + * + * #ade5fc + * #a2fca2 + * #c6b4f0 + * #d36363 + * #fcc28c + * #fc9b9b + * #ffa + * #fff + * #333 + * #62c8f3 + * #888 + * + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #333; + color: white; +} + +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-code, +.hljs-emphasis { + font-style: italic; +} + +.hljs-tag { + color: #62c8f3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-selector-class { + color: #ade5fc; +} + +.hljs-string, +.hljs-bullet { + color: #a2fca2; +} + +.hljs-type, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-quote, +.hljs-built_in, +.hljs-builtin-name { + color: #ffa; +} + +.hljs-number, +.hljs-symbol, +.hljs-bullet { + color: #d36363; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color: #fcc28c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-code { + color: #888; +} + +.hljs-regexp, +.hljs-link { + color: #c6b4f0; +} + +.hljs-meta { + color: #fc9b9b; +} + +.hljs-deletion { + background-color: #fc9b9b; + color: #333; +} + +.hljs-addition { + background-color: #a2fca2; + color: #333; +} + +.hljs a { + color: inherit; +} + +.hljs a:focus, +.hljs a:hover { + color: inherit; + text-decoration: underline; +} diff --git a/highlightjs/asset/styles/androidstudio.css b/highlightjs/asset/styles/androidstudio.css new file mode 100644 index 00000000..bc8e473b --- /dev/null +++ b/highlightjs/asset/styles/androidstudio.css @@ -0,0 +1,66 @@ +/* +Date: 24 Fev 2015 +Author: Pedro Oliveira +*/ + +.hljs { + color: #a9b7c6; + background: #282b2e; + display: block; + overflow-x: auto; + padding: 0.5em; +} + +.hljs-number, +.hljs-literal, +.hljs-symbol, +.hljs-bullet { + color: #6897BB; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-deletion { + color: #cc7832; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-link { + color: #629755; +} + +.hljs-comment, +.hljs-quote { + color: #808080; +} + +.hljs-meta { + color: #bbb529; +} + +.hljs-string, +.hljs-attribute, +.hljs-addition { + color: #6A8759; +} + +.hljs-section, +.hljs-title, +.hljs-type { + color: #ffc66d; +} + +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e8bf6a; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/arduino-light.css b/highlightjs/asset/styles/arduino-light.css new file mode 100644 index 00000000..4b8b7fd3 --- /dev/null +++ b/highlightjs/asset/styles/arduino-light.css @@ -0,0 +1,88 @@ +/* + +Arduino® Light Theme - Stefania Mellai + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #FFFFFF; +} + +.hljs, +.hljs-subst { + color: #434f54; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-doctag, +.hljs-name { + color: #00979D; +} + +.hljs-built_in, +.hljs-literal, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #D35400; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #00979D; +} + +.hljs-type, +.hljs-string, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #005C5F; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-comment { + color: rgba(149,165,166,.8); +} + +.hljs-meta-keyword { + color: #728E00; +} + +.hljs-meta { + color: #728E00; + color: #434f54; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-function { + color: #728E00; +} + +.hljs-number { + color: #8A7B52; +} diff --git a/highlightjs/asset/styles/arta.css b/highlightjs/asset/styles/arta.css new file mode 100644 index 00000000..75ef3a9e --- /dev/null +++ b/highlightjs/asset/styles/arta.css @@ -0,0 +1,73 @@ +/* +Date: 17.V.2011 +Author: pumbur +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; +} + +.hljs, +.hljs-subst { + color: #aaa; +} + +.hljs-section { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #444; +} + +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-regexp { + color: #ffcc33; +} + +.hljs-number, +.hljs-addition { + color: #00cc66; +} + +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-template-variable, +.hljs-attribute, +.hljs-link { + color: #32aaee; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #6644aa; +} + +.hljs-title, +.hljs-variable, +.hljs-deletion, +.hljs-template-tag { + color: #bb1166; +} + +.hljs-section, +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/ascetic.css b/highlightjs/asset/styles/ascetic.css new file mode 100644 index 00000000..48397e88 --- /dev/null +++ b/highlightjs/asset/styles/ascetic.css @@ -0,0 +1,45 @@ +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-symbol, +.hljs-bullet, +.hljs-section, +.hljs-addition, +.hljs-attribute, +.hljs-link { + color: #888; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta, +.hljs-deletion { + color: #ccc; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-name, +.hljs-type, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/atelier-cave-dark.css b/highlightjs/asset/styles/atelier-cave-dark.css new file mode 100644 index 00000000..65428f3b --- /dev/null +++ b/highlightjs/asset/styles/atelier-cave-dark.css @@ -0,0 +1,83 @@ +/* Base16 Atelier Cave Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Cave Comment */ +.hljs-comment, +.hljs-quote { + color: #7e7887; +} + +/* Atelier-Cave Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-regexp, +.hljs-link, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #be4678; +} + +/* Atelier-Cave Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #aa573c; +} + +/* Atelier-Cave Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #2a9292; +} + +/* Atelier-Cave Blue */ +.hljs-title, +.hljs-section { + color: #576ddb; +} + +/* Atelier-Cave Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #955ae7; +} + +.hljs-deletion, +.hljs-addition { + color: #19171c; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #be4678; +} + +.hljs-addition { + background-color: #2a9292; +} + +.hljs { + display: block; + overflow-x: auto; + background: #19171c; + color: #8b8792; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-cave-light.css b/highlightjs/asset/styles/atelier-cave-light.css new file mode 100644 index 00000000..b419f9fd --- /dev/null +++ b/highlightjs/asset/styles/atelier-cave-light.css @@ -0,0 +1,85 @@ +/* Base16 Atelier Cave Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Cave Comment */ +.hljs-comment, +.hljs-quote { + color: #655f6d; +} + +/* Atelier-Cave Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #be4678; +} + +/* Atelier-Cave Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #aa573c; +} + +/* Atelier-Cave Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #2a9292; +} + +/* Atelier-Cave Blue */ +.hljs-title, +.hljs-section { + color: #576ddb; +} + +/* Atelier-Cave Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #955ae7; +} + +.hljs-deletion, +.hljs-addition { + color: #19171c; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #be4678; +} + +.hljs-addition { + background-color: #2a9292; +} + +.hljs { + display: block; + overflow-x: auto; + background: #efecf4; + color: #585260; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-dune-dark.css b/highlightjs/asset/styles/atelier-dune-dark.css new file mode 100644 index 00000000..1684f522 --- /dev/null +++ b/highlightjs/asset/styles/atelier-dune-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #999580; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #20201d; + color: #a6a28c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-dune-light.css b/highlightjs/asset/styles/atelier-dune-light.css new file mode 100644 index 00000000..547719de --- /dev/null +++ b/highlightjs/asset/styles/atelier-dune-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Dune Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #7d7a68; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fefbec; + color: #6e6b5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-estuary-dark.css b/highlightjs/asset/styles/atelier-estuary-dark.css new file mode 100644 index 00000000..a5e50718 --- /dev/null +++ b/highlightjs/asset/styles/atelier-estuary-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Estuary Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Estuary Comment */ +.hljs-comment, +.hljs-quote { + color: #878573; +} + +/* Atelier-Estuary Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ba6236; +} + +/* Atelier-Estuary Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ae7313; +} + +/* Atelier-Estuary Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7d9726; +} + +/* Atelier-Estuary Blue */ +.hljs-title, +.hljs-section { + color: #36a166; +} + +/* Atelier-Estuary Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #5f9182; +} + +.hljs-deletion, +.hljs-addition { + color: #22221b; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ba6236; +} + +.hljs-addition { + background-color: #7d9726; +} + +.hljs { + display: block; + overflow-x: auto; + background: #22221b; + color: #929181; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-estuary-light.css b/highlightjs/asset/styles/atelier-estuary-light.css new file mode 100644 index 00000000..1daee5d9 --- /dev/null +++ b/highlightjs/asset/styles/atelier-estuary-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Estuary Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Estuary Comment */ +.hljs-comment, +.hljs-quote { + color: #6c6b5a; +} + +/* Atelier-Estuary Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ba6236; +} + +/* Atelier-Estuary Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ae7313; +} + +/* Atelier-Estuary Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7d9726; +} + +/* Atelier-Estuary Blue */ +.hljs-title, +.hljs-section { + color: #36a166; +} + +/* Atelier-Estuary Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #5f9182; +} + +.hljs-deletion, +.hljs-addition { + color: #22221b; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ba6236; +} + +.hljs-addition { + background-color: #7d9726; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4f3ec; + color: #5f5e4e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-forest-dark.css b/highlightjs/asset/styles/atelier-forest-dark.css new file mode 100644 index 00000000..0ef4fae3 --- /dev/null +++ b/highlightjs/asset/styles/atelier-forest-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Forest Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Forest Comment */ +.hljs-comment, +.hljs-quote { + color: #9c9491; +} + +/* Atelier-Forest Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #f22c40; +} + +/* Atelier-Forest Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #df5320; +} + +/* Atelier-Forest Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7b9726; +} + +/* Atelier-Forest Blue */ +.hljs-title, +.hljs-section { + color: #407ee7; +} + +/* Atelier-Forest Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6666ea; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b1918; + color: #a8a19f; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-forest-light.css b/highlightjs/asset/styles/atelier-forest-light.css new file mode 100644 index 00000000..bbedde18 --- /dev/null +++ b/highlightjs/asset/styles/atelier-forest-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Forest Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Forest Comment */ +.hljs-comment, +.hljs-quote { + color: #766e6b; +} + +/* Atelier-Forest Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #f22c40; +} + +/* Atelier-Forest Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #df5320; +} + +/* Atelier-Forest Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #7b9726; +} + +/* Atelier-Forest Blue */ +.hljs-title, +.hljs-section { + color: #407ee7; +} + +/* Atelier-Forest Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6666ea; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f1efee; + color: #68615e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-heath-dark.css b/highlightjs/asset/styles/atelier-heath-dark.css new file mode 100644 index 00000000..fe01ff72 --- /dev/null +++ b/highlightjs/asset/styles/atelier-heath-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Heath Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Heath Comment */ +.hljs-comment, +.hljs-quote { + color: #9e8f9e; +} + +/* Atelier-Heath Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca402b; +} + +/* Atelier-Heath Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #a65926; +} + +/* Atelier-Heath Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #918b3b; +} + +/* Atelier-Heath Blue */ +.hljs-title, +.hljs-section { + color: #516aec; +} + +/* Atelier-Heath Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7b59c0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b181b; + color: #ab9bab; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-heath-light.css b/highlightjs/asset/styles/atelier-heath-light.css new file mode 100644 index 00000000..ee43786d --- /dev/null +++ b/highlightjs/asset/styles/atelier-heath-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Heath Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Heath Comment */ +.hljs-comment, +.hljs-quote { + color: #776977; +} + +/* Atelier-Heath Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca402b; +} + +/* Atelier-Heath Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #a65926; +} + +/* Atelier-Heath Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #918b3b; +} + +/* Atelier-Heath Blue */ +.hljs-title, +.hljs-section { + color: #516aec; +} + +/* Atelier-Heath Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #7b59c0; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f7f3f7; + color: #695d69; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-lakeside-dark.css b/highlightjs/asset/styles/atelier-lakeside-dark.css new file mode 100644 index 00000000..a937d3bf --- /dev/null +++ b/highlightjs/asset/styles/atelier-lakeside-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Lakeside Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Lakeside Comment */ +.hljs-comment, +.hljs-quote { + color: #7195a8; +} + +/* Atelier-Lakeside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d22d72; +} + +/* Atelier-Lakeside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #935c25; +} + +/* Atelier-Lakeside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #568c3b; +} + +/* Atelier-Lakeside Blue */ +.hljs-title, +.hljs-section { + color: #257fad; +} + +/* Atelier-Lakeside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6b6bb8; +} + +.hljs { + display: block; + overflow-x: auto; + background: #161b1d; + color: #7ea2b4; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-lakeside-light.css b/highlightjs/asset/styles/atelier-lakeside-light.css new file mode 100644 index 00000000..6c7e8f9e --- /dev/null +++ b/highlightjs/asset/styles/atelier-lakeside-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Lakeside Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Lakeside Comment */ +.hljs-comment, +.hljs-quote { + color: #5a7b8c; +} + +/* Atelier-Lakeside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d22d72; +} + +/* Atelier-Lakeside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #935c25; +} + +/* Atelier-Lakeside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #568c3b; +} + +/* Atelier-Lakeside Blue */ +.hljs-title, +.hljs-section { + color: #257fad; +} + +/* Atelier-Lakeside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6b6bb8; +} + +.hljs { + display: block; + overflow-x: auto; + background: #ebf8ff; + color: #516d7b; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-plateau-dark.css b/highlightjs/asset/styles/atelier-plateau-dark.css new file mode 100644 index 00000000..3bb05269 --- /dev/null +++ b/highlightjs/asset/styles/atelier-plateau-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Plateau Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Plateau Comment */ +.hljs-comment, +.hljs-quote { + color: #7e7777; +} + +/* Atelier-Plateau Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca4949; +} + +/* Atelier-Plateau Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b45a3c; +} + +/* Atelier-Plateau Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #4b8b8b; +} + +/* Atelier-Plateau Blue */ +.hljs-title, +.hljs-section { + color: #7272ca; +} + +/* Atelier-Plateau Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8464c4; +} + +.hljs-deletion, +.hljs-addition { + color: #1b1818; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ca4949; +} + +.hljs-addition { + background-color: #4b8b8b; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1b1818; + color: #8a8585; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-plateau-light.css b/highlightjs/asset/styles/atelier-plateau-light.css new file mode 100644 index 00000000..5f0222be --- /dev/null +++ b/highlightjs/asset/styles/atelier-plateau-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Plateau Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Plateau Comment */ +.hljs-comment, +.hljs-quote { + color: #655d5d; +} + +/* Atelier-Plateau Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #ca4949; +} + +/* Atelier-Plateau Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b45a3c; +} + +/* Atelier-Plateau Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #4b8b8b; +} + +/* Atelier-Plateau Blue */ +.hljs-title, +.hljs-section { + color: #7272ca; +} + +/* Atelier-Plateau Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8464c4; +} + +.hljs-deletion, +.hljs-addition { + color: #1b1818; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #ca4949; +} + +.hljs-addition { + background-color: #4b8b8b; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4ecec; + color: #585050; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-savanna-dark.css b/highlightjs/asset/styles/atelier-savanna-dark.css new file mode 100644 index 00000000..38f83143 --- /dev/null +++ b/highlightjs/asset/styles/atelier-savanna-dark.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Savanna Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Savanna Comment */ +.hljs-comment, +.hljs-quote { + color: #78877d; +} + +/* Atelier-Savanna Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #b16139; +} + +/* Atelier-Savanna Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #9f713c; +} + +/* Atelier-Savanna Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #489963; +} + +/* Atelier-Savanna Blue */ +.hljs-title, +.hljs-section { + color: #478c90; +} + +/* Atelier-Savanna Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #55859b; +} + +.hljs-deletion, +.hljs-addition { + color: #171c19; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #b16139; +} + +.hljs-addition { + background-color: #489963; +} + +.hljs { + display: block; + overflow-x: auto; + background: #171c19; + color: #87928a; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-savanna-light.css b/highlightjs/asset/styles/atelier-savanna-light.css new file mode 100644 index 00000000..1ccd7c68 --- /dev/null +++ b/highlightjs/asset/styles/atelier-savanna-light.css @@ -0,0 +1,84 @@ +/* Base16 Atelier Savanna Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Savanna Comment */ +.hljs-comment, +.hljs-quote { + color: #5f6d64; +} + +/* Atelier-Savanna Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #b16139; +} + +/* Atelier-Savanna Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #9f713c; +} + +/* Atelier-Savanna Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #489963; +} + +/* Atelier-Savanna Blue */ +.hljs-title, +.hljs-section { + color: #478c90; +} + +/* Atelier-Savanna Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #55859b; +} + +.hljs-deletion, +.hljs-addition { + color: #171c19; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #b16139; +} + +.hljs-addition { + background-color: #489963; +} + +.hljs { + display: block; + overflow-x: auto; + background: #ecf4ee; + color: #526057; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-seaside-dark.css b/highlightjs/asset/styles/atelier-seaside-dark.css new file mode 100644 index 00000000..df29949c --- /dev/null +++ b/highlightjs/asset/styles/atelier-seaside-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Seaside Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Seaside Comment */ +.hljs-comment, +.hljs-quote { + color: #809980; +} + +/* Atelier-Seaside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e6193c; +} + +/* Atelier-Seaside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #87711d; +} + +/* Atelier-Seaside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #29a329; +} + +/* Atelier-Seaside Blue */ +.hljs-title, +.hljs-section { + color: #3d62f5; +} + +/* Atelier-Seaside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ad2bee; +} + +.hljs { + display: block; + overflow-x: auto; + background: #131513; + color: #8ca68c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-seaside-light.css b/highlightjs/asset/styles/atelier-seaside-light.css new file mode 100644 index 00000000..9d960f29 --- /dev/null +++ b/highlightjs/asset/styles/atelier-seaside-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Seaside Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Seaside Comment */ +.hljs-comment, +.hljs-quote { + color: #687d68; +} + +/* Atelier-Seaside Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #e6193c; +} + +/* Atelier-Seaside Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #87711d; +} + +/* Atelier-Seaside Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #29a329; +} + +/* Atelier-Seaside Blue */ +.hljs-title, +.hljs-section { + color: #3d62f5; +} + +/* Atelier-Seaside Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ad2bee; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f4fbf4; + color: #5e6e5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-sulphurpool-dark.css b/highlightjs/asset/styles/atelier-sulphurpool-dark.css new file mode 100644 index 00000000..c2ab7938 --- /dev/null +++ b/highlightjs/asset/styles/atelier-sulphurpool-dark.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Sulphurpool Dark - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Sulphurpool Comment */ +.hljs-comment, +.hljs-quote { + color: #898ea4; +} + +/* Atelier-Sulphurpool Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #c94922; +} + +/* Atelier-Sulphurpool Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #c76b29; +} + +/* Atelier-Sulphurpool Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #ac9739; +} + +/* Atelier-Sulphurpool Blue */ +.hljs-title, +.hljs-section { + color: #3d8fd1; +} + +/* Atelier-Sulphurpool Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6679cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #202746; + color: #979db4; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atelier-sulphurpool-light.css b/highlightjs/asset/styles/atelier-sulphurpool-light.css new file mode 100644 index 00000000..96c47d08 --- /dev/null +++ b/highlightjs/asset/styles/atelier-sulphurpool-light.css @@ -0,0 +1,69 @@ +/* Base16 Atelier Sulphurpool Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Sulphurpool Comment */ +.hljs-comment, +.hljs-quote { + color: #6b7394; +} + +/* Atelier-Sulphurpool Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #c94922; +} + +/* Atelier-Sulphurpool Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #c76b29; +} + +/* Atelier-Sulphurpool Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #ac9739; +} + +/* Atelier-Sulphurpool Blue */ +.hljs-title, +.hljs-section { + color: #3d8fd1; +} + +/* Atelier-Sulphurpool Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #6679cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f5f7ff; + color: #5e6687; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/atom-one-dark.css b/highlightjs/asset/styles/atom-one-dark.css new file mode 100644 index 00000000..1616aafe --- /dev/null +++ b/highlightjs/asset/styles/atom-one-dark.css @@ -0,0 +1,96 @@ +/* + +Atom One Dark by Daniel Gamage +Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax + +base: #282c34 +mono-1: #abb2bf +mono-2: #818896 +mono-3: #5c6370 +hue-1: #56b6c2 +hue-2: #61aeee +hue-3: #c678dd +hue-4: #98c379 +hue-5: #e06c75 +hue-5-2: #be5046 +hue-6: #d19a66 +hue-6-2: #e6c07b + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #abb2bf; + background: #282c34; +} + +.hljs-comment, +.hljs-quote { + color: #5c6370; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #c678dd; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e06c75; +} + +.hljs-literal { + color: #56b6c2; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #98c379; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #e6c07b; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #d19a66; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #61aeee; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/highlightjs/asset/styles/atom-one-light.css b/highlightjs/asset/styles/atom-one-light.css new file mode 100644 index 00000000..d5bd1d2a --- /dev/null +++ b/highlightjs/asset/styles/atom-one-light.css @@ -0,0 +1,96 @@ +/* + +Atom One Light by Daniel Gamage +Original One Light Syntax theme from https://github.com/atom/one-light-syntax + +base: #fafafa +mono-1: #383a42 +mono-2: #686b77 +mono-3: #a0a1a7 +hue-1: #0184bb +hue-2: #4078f2 +hue-3: #a626a4 +hue-4: #50a14f +hue-5: #e45649 +hue-5-2: #c91243 +hue-6: #986801 +hue-6-2: #c18401 + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #383a42; + background: #fafafa; +} + +.hljs-comment, +.hljs-quote { + color: #a0a1a7; + font-style: italic; +} + +.hljs-doctag, +.hljs-keyword, +.hljs-formula { + color: #a626a4; +} + +.hljs-section, +.hljs-name, +.hljs-selector-tag, +.hljs-deletion, +.hljs-subst { + color: #e45649; +} + +.hljs-literal { + color: #0184bb; +} + +.hljs-string, +.hljs-regexp, +.hljs-addition, +.hljs-attribute, +.hljs-meta-string { + color: #50a14f; +} + +.hljs-built_in, +.hljs-class .hljs-title { + color: #c18401; +} + +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-type, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-number { + color: #986801; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-meta, +.hljs-selector-id, +.hljs-title { + color: #4078f2; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/highlightjs/asset/styles/bootstrap.css b/highlightjs/asset/styles/bootstrap.css new file mode 100644 index 00000000..4191e46e --- /dev/null +++ b/highlightjs/asset/styles/bootstrap.css @@ -0,0 +1,98 @@ +/* + +Original highlight.js style (c) Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + background: transparent; +} + + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/brown-paper.css b/highlightjs/asset/styles/brown-paper.css new file mode 100644 index 00000000..f0197b92 --- /dev/null +++ b/highlightjs/asset/styles/brown-paper.css @@ -0,0 +1,64 @@ +/* + +Brown Paper style from goldblog.com.ua (c) Zaripov Yura + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background:#b7a68e url(./brown-papersq.png); +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color:#005599; + font-weight:bold; +} + +.hljs, +.hljs-subst { + color: #363c69; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable, +.hljs-link, +.hljs-name { + color: #2c009f; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta, +.hljs-deletion { + color: #802022; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/brown-papersq.png b/highlightjs/asset/styles/brown-papersq.png new file mode 100644 index 00000000..3813903d Binary files /dev/null and b/highlightjs/asset/styles/brown-papersq.png differ diff --git a/highlightjs/asset/styles/codepen-embed.css b/highlightjs/asset/styles/codepen-embed.css new file mode 100644 index 00000000..195c4a07 --- /dev/null +++ b/highlightjs/asset/styles/codepen-embed.css @@ -0,0 +1,60 @@ +/* + codepen.io Embed Theme + Author: Justin Perry + Original theme - https://github.com/chriskempson/tomorrow-theme +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #222; + color: #fff; +} + +.hljs-comment, +.hljs-quote { + color: #777; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-regexp, +.hljs-meta, +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-params, +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-deletion { + color: #ab875d; +} + +.hljs-section, +.hljs-title, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-type, +.hljs-attribute { + color: #9b869b; +} + +.hljs-string, +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #8f9c6c; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/color-brewer.css b/highlightjs/asset/styles/color-brewer.css new file mode 100644 index 00000000..7934d986 --- /dev/null +++ b/highlightjs/asset/styles/color-brewer.css @@ -0,0 +1,71 @@ +/* + +Colorbrewer theme +Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock +Ported by Fabrício Tavares de Oliveira + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; +} + +.hljs, +.hljs-subst { + color: #000; +} + +.hljs-string, +.hljs-meta, +.hljs-symbol, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #756bb1; +} + +.hljs-comment, +.hljs-quote { + color: #636363; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-bullet, +.hljs-link { + color: #31a354; +} + +.hljs-deletion, +.hljs-variable { + color: #88f; +} + + + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-doctag, +.hljs-type, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-strong { + color: #3182bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-attribute { + color: #e6550d; +} diff --git a/highlightjs/asset/styles/darcula.css b/highlightjs/asset/styles/darcula.css new file mode 100644 index 00000000..be182d0b --- /dev/null +++ b/highlightjs/asset/styles/darcula.css @@ -0,0 +1,77 @@ +/* + +Darcula color scheme from the JetBrains family of IDEs + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #2b2b2b; +} + +.hljs { + color: #bababa; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-link, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #6896ba; +} + +.hljs-code, +.hljs-selector-class { + color: #a6e22e; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-attribute, +.hljs-name, +.hljs-variable { + color: #cb7832; +} + +.hljs-params { + color: #b9b9b9; +} + +.hljs-string { + color: #6a8759; +} + +.hljs-subst, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-symbol, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #e0c46c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #7f7f7f; +} diff --git a/highlightjs/asset/styles/dark.css b/highlightjs/asset/styles/dark.css new file mode 100644 index 00000000..b4724f5f --- /dev/null +++ b/highlightjs/asset/styles/dark.css @@ -0,0 +1,63 @@ +/* + +Dark style from softwaremaniacs.org (c) Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #444; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-section, +.hljs-link { + color: white; +} + +.hljs, +.hljs-subst { + color: #ddd; +} + +.hljs-string, +.hljs-title, +.hljs-name, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #d88; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #777; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/darkula.css b/highlightjs/asset/styles/darkula.css new file mode 100644 index 00000000..f4646c3c --- /dev/null +++ b/highlightjs/asset/styles/darkula.css @@ -0,0 +1,6 @@ +/* + Deprecated due to a typo in the name and left here for compatibility purpose only. + Please use darcula.css instead. +*/ + +@import url('darcula.css'); diff --git a/highlightjs/asset/styles/default.css b/highlightjs/asset/styles/default.css new file mode 100644 index 00000000..f1bfade3 --- /dev/null +++ b/highlightjs/asset/styles/default.css @@ -0,0 +1,99 @@ +/* + +Original highlight.js style (c) Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} + + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/docco.css b/highlightjs/asset/styles/docco.css new file mode 100644 index 00000000..db366be3 --- /dev/null +++ b/highlightjs/asset/styles/docco.css @@ -0,0 +1,97 @@ +/* +Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #000; + background: #f8f8ff; +} + +.hljs-comment, +.hljs-quote { + color: #408080; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-subst { + color: #954121; +} + +.hljs-number { + color: #40a070; +} + +.hljs-string, +.hljs-doctag { + color: #219161; +} + +.hljs-selector-id, +.hljs-selector-class, +.hljs-section, +.hljs-type { + color: #19469d; +} + +.hljs-params { + color: #00f; +} + +.hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-variable, +.hljs-template-variable { + color: #008080; +} + +.hljs-regexp, +.hljs-link { + color: #b68; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/dracula.css b/highlightjs/asset/styles/dracula.css new file mode 100644 index 00000000..d591db68 --- /dev/null +++ b/highlightjs/asset/styles/dracula.css @@ -0,0 +1,76 @@ +/* + +Dracula Theme v1.2.0 + +https://github.com/zenorocha/dracula-theme + +Copyright 2015, All rights reserved + +Code licensed under the MIT license +http://zenorocha.mit-license.org + +@author Éverton Ribeiro +@author Zeno Rocha + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282a36; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-section, +.hljs-link { + color: #8be9fd; +} + +.hljs-function .hljs-keyword { + color: #ff79c6; +} + +.hljs, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-string, +.hljs-title, +.hljs-name, +.hljs-type, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #f1fa8c; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #6272a4; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/far.css b/highlightjs/asset/styles/far.css new file mode 100644 index 00000000..2b3f87b5 --- /dev/null +++ b/highlightjs/asset/styles/far.css @@ -0,0 +1,71 @@ +/* + +FAR Style (c) MajestiC + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000080; +} + +.hljs, +.hljs-subst { + color: #0ff; +} + +.hljs-string, +.hljs-attribute, +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition { + color: #ff0; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-variable { + color: #fff; +} + +.hljs-comment, +.hljs-quote, +.hljs-doctag, +.hljs-deletion { + color: #888; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-link { + color: #0f0; +} + +.hljs-meta { + color: #008080; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/foundation.css b/highlightjs/asset/styles/foundation.css new file mode 100644 index 00000000..f1fe64b3 --- /dev/null +++ b/highlightjs/asset/styles/foundation.css @@ -0,0 +1,88 @@ +/* +Description: Foundation 4 docs style for highlight.js +Author: Dan Allen +Website: http://foundation.zurb.com/docs/ +Version: 1.0 +Date: 2013-04-02 +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #eee; color: black; +} + +.hljs-link, +.hljs-emphasis, +.hljs-attribute, +.hljs-addition { + color: #070; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong, +.hljs-string, +.hljs-deletion { + color: #d14; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-quote, +.hljs-comment { + color: #998; + font-style: italic; +} + +.hljs-section, +.hljs-title { + color: #900; +} + +.hljs-class .hljs-title, +.hljs-type { + color: #458; +} + +.hljs-variable, +.hljs-template-variable { + color: #336699; +} + +.hljs-bullet { + color: #997700; +} + +.hljs-meta { + color: #3344bb; +} + +.hljs-code, +.hljs-number, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag { + color: #099; +} + +.hljs-regexp { + background-color: #fff0ff; + color: #880088; +} + +.hljs-symbol { + color: #990073; +} + +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #007700; +} diff --git a/highlightjs/asset/styles/github-gist.css b/highlightjs/asset/styles/github-gist.css new file mode 100644 index 00000000..155f0b91 --- /dev/null +++ b/highlightjs/asset/styles/github-gist.css @@ -0,0 +1,71 @@ +/** + * GitHub Gist Theme + * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro + */ + +.hljs { + display: block; + background: white; + padding: 0.5em; + color: #333333; + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #a71d5d; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-title, +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #795da3; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/highlightjs/asset/styles/github.css b/highlightjs/asset/styles/github.css new file mode 100644 index 00000000..791932b8 --- /dev/null +++ b/highlightjs/asset/styles/github.css @@ -0,0 +1,99 @@ +/* + +github.com style (c) Vasily Polovnyov + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #998; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: #008080; +} + +.hljs-string, +.hljs-doctag { + color: #d14; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #900; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; + font-weight: bold; +} + +.hljs-tag, +.hljs-name, +.hljs-attribute { + color: #000080; + font-weight: normal; +} + +.hljs-regexp, +.hljs-link { + color: #009926; +} + +.hljs-symbol, +.hljs-bullet { + color: #990073; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + background: #fdd; +} + +.hljs-addition { + background: #dfd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/googlecode.css b/highlightjs/asset/styles/googlecode.css new file mode 100644 index 00000000..884ad635 --- /dev/null +++ b/highlightjs/asset/styles/googlecode.css @@ -0,0 +1,89 @@ +/* + +Google Code style (c) Aahan Krish + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-comment, +.hljs-quote { + color: #800; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-section, +.hljs-title, +.hljs-name { + color: #008; +} + +.hljs-variable, +.hljs-template-variable { + color: #660; +} + +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-regexp { + color: #080; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-meta, +.hljs-number, +.hljs-link { + color: #066; +} + +.hljs-title, +.hljs-doctag, +.hljs-type, +.hljs-attr, +.hljs-built_in, +.hljs-builtin-name, +.hljs-params { + color: #606; +} + +.hljs-attribute, +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #9B703F +} + +.hljs-addition { + background-color: #baeeba; +} + +.hljs-deletion { + background-color: #ffc8bd; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/grayscale.css b/highlightjs/asset/styles/grayscale.css new file mode 100644 index 00000000..5376f340 --- /dev/null +++ b/highlightjs/asset/styles/grayscale.css @@ -0,0 +1,101 @@ +/* + +grayscale style (c) MY Sun + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #fff; +} + +.hljs-comment, +.hljs-quote { + color: #777; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { + color: #333; + font-weight: bold; +} + +.hljs-number, +.hljs-literal { + color: #777; +} + +.hljs-string, +.hljs-doctag, +.hljs-formula { + color: #333; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat; +} + +.hljs-title, +.hljs-section, +.hljs-selector-id { + color: #000; + font-weight: bold; +} + +.hljs-subst { + font-weight: normal; +} + +.hljs-class .hljs-title, +.hljs-type, +.hljs-name { + color: #333; + font-weight: bold; +} + +.hljs-tag { + color: #333; +} + +.hljs-regexp { + color: #333; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #000; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat; +} + +.hljs-built_in, +.hljs-builtin-name { + color: #000; + text-decoration: underline; +} + +.hljs-meta { + color: #999; + font-weight: bold; +} + +.hljs-deletion { + color: #fff; + background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat; +} + +.hljs-addition { + color: #000; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/gruvbox-dark.css b/highlightjs/asset/styles/gruvbox-dark.css new file mode 100644 index 00000000..f563811a --- /dev/null +++ b/highlightjs/asset/styles/gruvbox-dark.css @@ -0,0 +1,108 @@ +/* + +Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282828; +} + +.hljs, +.hljs-subst { + color: #ebdbb2; +} + +/* Gruvbox Red */ +.hljs-deletion, +.hljs-formula, +.hljs-keyword, +.hljs-link, +.hljs-selector-tag { + color: #fb4934; +} + +/* Gruvbox Blue */ +.hljs-built_in, +.hljs-emphasis, +.hljs-name, +.hljs-quote, +.hljs-strong, +.hljs-title, +.hljs-variable { + color: #83a598; +} + +/* Gruvbox Yellow */ +.hljs-attr, +.hljs-params, +.hljs-template-tag, +.hljs-type { + color: #fabd2f; +} + +/* Gruvbox Purple */ +.hljs-builtin-name, +.hljs-doctag, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +/* Gruvbox Orange */ +.hljs-code, +.hljs-meta, +.hljs-regexp, +.hljs-selector-id, +.hljs-template-variable { + color: #fe8019; +} + +/* Gruvbox Green */ +.hljs-addition, +.hljs-meta-string, +.hljs-section, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-string, +.hljs-symbol { + color: #b8bb26; +} + +/* Gruvbox Aqua */ +.hljs-attribute, +.hljs-bullet, +.hljs-class, +.hljs-function, +.hljs-function .hljs-keyword, +.hljs-meta-keyword, +.hljs-selector-pseudo, +.hljs-tag { + color: #8ec07c; +} + +/* Gruvbox Gray */ +.hljs-comment { + color: #928374; +} + +/* Gruvbox Purple */ +.hljs-link_label, +.hljs-literal, +.hljs-number { + color: #d3869b; +} + +.hljs-comment, +.hljs-emphasis { + font-style: italic; +} + +.hljs-section, +.hljs-strong, +.hljs-tag { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/gruvbox-light.css b/highlightjs/asset/styles/gruvbox-light.css new file mode 100644 index 00000000..ff45468e --- /dev/null +++ b/highlightjs/asset/styles/gruvbox-light.css @@ -0,0 +1,108 @@ +/* + +Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fbf1c7; +} + +.hljs, +.hljs-subst { + color: #3c3836; +} + +/* Gruvbox Red */ +.hljs-deletion, +.hljs-formula, +.hljs-keyword, +.hljs-link, +.hljs-selector-tag { + color: #9d0006; +} + +/* Gruvbox Blue */ +.hljs-built_in, +.hljs-emphasis, +.hljs-name, +.hljs-quote, +.hljs-strong, +.hljs-title, +.hljs-variable { + color: #076678; +} + +/* Gruvbox Yellow */ +.hljs-attr, +.hljs-params, +.hljs-template-tag, +.hljs-type { + color: #b57614; +} + +/* Gruvbox Purple */ +.hljs-builtin-name, +.hljs-doctag, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +/* Gruvbox Orange */ +.hljs-code, +.hljs-meta, +.hljs-regexp, +.hljs-selector-id, +.hljs-template-variable { + color: #af3a03; +} + +/* Gruvbox Green */ +.hljs-addition, +.hljs-meta-string, +.hljs-section, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-string, +.hljs-symbol { + color: #79740e; +} + +/* Gruvbox Aqua */ +.hljs-attribute, +.hljs-bullet, +.hljs-class, +.hljs-function, +.hljs-function .hljs-keyword, +.hljs-meta-keyword, +.hljs-selector-pseudo, +.hljs-tag { + color: #427b58; +} + +/* Gruvbox Gray */ +.hljs-comment { + color: #928374; +} + +/* Gruvbox Purple */ +.hljs-link_label, +.hljs-literal, +.hljs-number { + color: #8f3f71; +} + +.hljs-comment, +.hljs-emphasis { + font-style: italic; +} + +.hljs-section, +.hljs-strong, +.hljs-tag { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/hopscotch.css b/highlightjs/asset/styles/hopscotch.css new file mode 100644 index 00000000..32e60d23 --- /dev/null +++ b/highlightjs/asset/styles/hopscotch.css @@ -0,0 +1,83 @@ +/* + * Hopscotch + * by Jan T. Sott + * https://github.com/idleberg/Hopscotch + * + * This work is licensed under the Creative Commons CC0 1.0 Universal License + */ + +/* Comment */ +.hljs-comment, +.hljs-quote { + color: #989498; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-deletion { + color: #dd464c; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #fd8b19; +} + +/* Yellow */ +.hljs-class .hljs-title { + color: #fdcc59; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #8fc13e; +} + +/* Aqua */ +.hljs-meta { + color: #149b93; +} + +/* Blue */ +.hljs-function, +.hljs-section, +.hljs-title { + color: #1290bf; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #c85e7c; +} + +.hljs { + display: block; + background: #322931; + color: #b9b5b8; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/hybrid.css b/highlightjs/asset/styles/hybrid.css new file mode 100644 index 00000000..29735a18 --- /dev/null +++ b/highlightjs/asset/styles/hybrid.css @@ -0,0 +1,102 @@ +/* + +vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) + +*/ + +/*background color*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1d1f21; +} + +/*selection color*/ +.hljs::selection, +.hljs span::selection { + background: #373b41; +} + +.hljs::-moz-selection, +.hljs span::-moz-selection { + background: #373b41; +} + +/*foreground color*/ +.hljs { + color: #c5c8c6; +} + +/*color: fg_yellow*/ +.hljs-title, +.hljs-name { + color: #f0c674; +} + +/*color: fg_comment*/ +.hljs-comment, +.hljs-meta, +.hljs-meta .hljs-keyword { + color: #707880; +} + +/*color: fg_red*/ +.hljs-number, +.hljs-symbol, +.hljs-literal, +.hljs-deletion, +.hljs-link { + color: #cc6666 +} + +/*color: fg_green*/ +.hljs-string, +.hljs-doctag, +.hljs-addition, +.hljs-regexp, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #b5bd68; +} + +/*color: fg_purple*/ +.hljs-attribute, +.hljs-code, +.hljs-selector-id { + color: #b294bb; +} + +/*color: fg_blue*/ +.hljs-keyword, +.hljs-selector-tag, +.hljs-bullet, +.hljs-tag { + color: #81a2be; +} + +/*color: fg_aqua*/ +.hljs-subst, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8abeb7; +} + +/*color: fg_orange*/ +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-quote, +.hljs-section, +.hljs-selector-class { + color: #de935f; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/idea.css b/highlightjs/asset/styles/idea.css new file mode 100644 index 00000000..3bf1892b --- /dev/null +++ b/highlightjs/asset/styles/idea.css @@ -0,0 +1,97 @@ +/* + +Intellij Idea-like styling (c) Vasily Polovnyov + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #000; + background: #fff; +} + +.hljs-subst, +.hljs-title { + font-weight: normal; + color: #000; +} + +.hljs-comment, +.hljs-quote { + color: #808080; + font-style: italic; +} + +.hljs-meta { + color: #808000; +} + +.hljs-tag { + background: #efefef; +} + +.hljs-section, +.hljs-name, +.hljs-literal, +.hljs-keyword, +.hljs-selector-tag, +.hljs-type, +.hljs-selector-id, +.hljs-selector-class { + font-weight: bold; + color: #000080; +} + +.hljs-attribute, +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: bold; + color: #0000ff; +} + +.hljs-number, +.hljs-regexp, +.hljs-link { + font-weight: normal; +} + +.hljs-string { + color: #008000; + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-formula { + color: #000; + background: #d0eded; + font-style: italic; +} + +.hljs-doctag { + text-decoration: underline; +} + +.hljs-variable, +.hljs-template-variable { + color: #660e7a; +} + +.hljs-addition { + background: #baeeba; +} + +.hljs-deletion { + background: #ffc8bd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/ir-black.css b/highlightjs/asset/styles/ir-black.css new file mode 100644 index 00000000..bd4c755e --- /dev/null +++ b/highlightjs/asset/styles/ir-black.css @@ -0,0 +1,73 @@ +/* + IR_Black style (c) Vasily Mikhailitchenko +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000; + color: #f8f8f8; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #7c7c7c; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-tag, +.hljs-name { + color: #96cbfe; +} + +.hljs-attribute, +.hljs-selector-id { + color: #ffffb6; +} + +.hljs-string, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition { + color: #a8ff60; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp, +.hljs-link { + color: #e9c062; +} + +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-doctag { + color: #ffffb6; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-variable, +.hljs-template-variable, +.hljs-literal { + color: #c6c5fe; +} + +.hljs-number, +.hljs-deletion { + color:#ff73fd; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/kimbie.dark.css b/highlightjs/asset/styles/kimbie.dark.css new file mode 100644 index 00000000..d139cb5d --- /dev/null +++ b/highlightjs/asset/styles/kimbie.dark.css @@ -0,0 +1,74 @@ +/* + Name: Kimbie (dark) + Author: Jan T. Sott + License: Creative Commons Attribution-ShareAlike 4.0 Unported License + URL: https://github.com/idleberg/Kimbie-highlight.js +*/ + +/* Kimbie Comment */ +.hljs-comment, +.hljs-quote { + color: #d6baad; +} + +/* Kimbie Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-meta { + color: #dc3958; +} + +/* Kimbie Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion, +.hljs-link { + color: #f79a32; +} + +/* Kimbie Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #f06431; +} + +/* Kimbie Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #889b4a; +} + +/* Kimbie Purple */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-function { + color: #98676a; +} + +.hljs { + display: block; + overflow-x: auto; + background: #221a0f; + color: #d3af86; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/kimbie.light.css b/highlightjs/asset/styles/kimbie.light.css new file mode 100644 index 00000000..04ff6ed3 --- /dev/null +++ b/highlightjs/asset/styles/kimbie.light.css @@ -0,0 +1,74 @@ +/* + Name: Kimbie (light) + Author: Jan T. Sott + License: Creative Commons Attribution-ShareAlike 4.0 Unported License + URL: https://github.com/idleberg/Kimbie-highlight.js +*/ + +/* Kimbie Comment */ +.hljs-comment, +.hljs-quote { + color: #a57a4c; +} + +/* Kimbie Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-meta { + color: #dc3958; +} + +/* Kimbie Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion, +.hljs-link { + color: #f79a32; +} + +/* Kimbie Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #f06431; +} + +/* Kimbie Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #889b4a; +} + +/* Kimbie Purple */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-function { + color: #98676a; +} + +.hljs { + display: block; + overflow-x: auto; + background: #fbebd4; + color: #84613d; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/magula.css b/highlightjs/asset/styles/magula.css new file mode 100644 index 00000000..44dee5e8 --- /dev/null +++ b/highlightjs/asset/styles/magula.css @@ -0,0 +1,70 @@ +/* +Description: Magula style for highligh.js +Author: Ruslan Keba +Website: http://rukeba.com/ +Version: 1.0 +Date: 2009-01-03 +Music: Aphex Twin / Xtal +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background-color: #f4f4f4; +} + +.hljs, +.hljs-subst { + color: black; +} + +.hljs-string, +.hljs-title, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #050; +} + +.hljs-comment, +.hljs-quote { + color: #777; +} + +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-type, +.hljs-link { + color: #800; +} + +.hljs-deletion, +.hljs-meta { + color: #00e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-tag, +.hljs-name { + font-weight: bold; + color: navy; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/mono-blue.css b/highlightjs/asset/styles/mono-blue.css new file mode 100644 index 00000000..884c97c7 --- /dev/null +++ b/highlightjs/asset/styles/mono-blue.css @@ -0,0 +1,59 @@ +/* + Five-color theme from a single blue hue. +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #eaeef3; +} + +.hljs { + color: #00193a; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-comment { + color: #738191; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-literal, +.hljs-type, +.hljs-addition, +.hljs-tag, +.hljs-quote, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #0048ab; +} + +.hljs-meta, +.hljs-subst, +.hljs-symbol, +.hljs-regexp, +.hljs-attribute, +.hljs-deletion, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-bullet { + color: #4c81c9; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/monokai-sublime.css b/highlightjs/asset/styles/monokai-sublime.css new file mode 100644 index 00000000..2864170d --- /dev/null +++ b/highlightjs/asset/styles/monokai-sublime.css @@ -0,0 +1,83 @@ +/* + +Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #23241f; +} + +.hljs, +.hljs-tag, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal, +.hljs-link { + color: #ae81ff; +} + +.hljs-code, +.hljs-title, +.hljs-section, +.hljs-selector-class { + color: #a6e22e; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-name, +.hljs-attr { + color: #f92672; +} + +.hljs-symbol, +.hljs-attribute { + color: #66d9ef; +} + +.hljs-params, +.hljs-class .hljs-title { + color: #f8f8f2; +} + +.hljs-string, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-variable { + color: #e6db74; +} + +.hljs-comment, +.hljs-deletion, +.hljs-meta { + color: #75715e; +} diff --git a/highlightjs/asset/styles/monokai.css b/highlightjs/asset/styles/monokai.css new file mode 100644 index 00000000..775d53f9 --- /dev/null +++ b/highlightjs/asset/styles/monokai.css @@ -0,0 +1,70 @@ +/* +Monokai style - ported by Luigi Maselli - http://grigio.org +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #272822; color: #ddd; +} + +.hljs-tag, +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-strong, +.hljs-name { + color: #f92672; +} + +.hljs-code { + color: #66d9ef; +} + +.hljs-class .hljs-title { + color: white; +} + +.hljs-attribute, +.hljs-symbol, +.hljs-regexp, +.hljs-link { + color: #bf79db; +} + +.hljs-string, +.hljs-bullet, +.hljs-subst, +.hljs-title, +.hljs-section, +.hljs-emphasis, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #a6e22e; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #75715e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-selector-id { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/obsidian.css b/highlightjs/asset/styles/obsidian.css new file mode 100644 index 00000000..356630fa --- /dev/null +++ b/highlightjs/asset/styles/obsidian.css @@ -0,0 +1,88 @@ +/** + * Obsidian style + * ported by Alexander Marenin (http://github.com/ioncreature) + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282b2e; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-selector-id { + color: #93c763; +} + +.hljs-number { + color: #ffcd22; +} + +.hljs { + color: #e0e2e4; +} + +.hljs-attribute { + color: #668bb0; +} + +.hljs-code, +.hljs-class .hljs-title, +.hljs-section { + color: white; +} + +.hljs-regexp, +.hljs-link { + color: #d39745; +} + +.hljs-meta { + color: #557182; +} + +.hljs-tag, +.hljs-name, +.hljs-bullet, +.hljs-subst, +.hljs-emphasis, +.hljs-type, +.hljs-built_in, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8cbbad; +} + +.hljs-string, +.hljs-symbol { + color: #ec7600; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion { + color: #818e96; +} + +.hljs-selector-class { + color: #A082BD +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/ocean.css b/highlightjs/asset/styles/ocean.css new file mode 100644 index 00000000..5901581b --- /dev/null +++ b/highlightjs/asset/styles/ocean.css @@ -0,0 +1,74 @@ +/* Ocean Dark Theme */ +/* https://github.com/gavsiu */ +/* Original theme - https://github.com/chriskempson/base16 */ + +/* Ocean Comment */ +.hljs-comment, +.hljs-quote { + color: #65737e; +} + +/* Ocean Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #bf616a; +} + +/* Ocean Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #d08770; +} + +/* Ocean Yellow */ +.hljs-attribute { + color: #ebcb8b; +} + +/* Ocean Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #a3be8c; +} + +/* Ocean Blue */ +.hljs-title, +.hljs-section { + color: #8fa1b3; +} + +/* Ocean Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b48ead; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2b303b; + color: #c0c5ce; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/paraiso-dark.css b/highlightjs/asset/styles/paraiso-dark.css new file mode 100644 index 00000000..e7292401 --- /dev/null +++ b/highlightjs/asset/styles/paraiso-dark.css @@ -0,0 +1,72 @@ +/* + Paraíso (dark) + Created by Jan T. Sott (http://github.com/idleberg) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) +*/ + +/* Paraíso Comment */ +.hljs-comment, +.hljs-quote { + color: #8d8687; +} + +/* Paraíso Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-meta { + color: #ef6155; +} + +/* Paraíso Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion { + color: #f99b15; +} + +/* Paraíso Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #fec418; +} + +/* Paraíso Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #48b685; +} + +/* Paraíso Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #815ba4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2f1e2e; + color: #a39e9b; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/paraiso-light.css b/highlightjs/asset/styles/paraiso-light.css new file mode 100644 index 00000000..944857cd --- /dev/null +++ b/highlightjs/asset/styles/paraiso-light.css @@ -0,0 +1,72 @@ +/* + Paraíso (light) + Created by Jan T. Sott (http://github.com/idleberg) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) +*/ + +/* Paraíso Comment */ +.hljs-comment, +.hljs-quote { + color: #776e71; +} + +/* Paraíso Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-link, +.hljs-meta { + color: #ef6155; +} + +/* Paraíso Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-deletion { + color: #f99b15; +} + +/* Paraíso Yellow */ +.hljs-title, +.hljs-section, +.hljs-attribute { + color: #fec418; +} + +/* Paraíso Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #48b685; +} + +/* Paraíso Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #815ba4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #e7e9db; + color: #4f424c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/pojoaque.css b/highlightjs/asset/styles/pojoaque.css new file mode 100644 index 00000000..2e07847b --- /dev/null +++ b/highlightjs/asset/styles/pojoaque.css @@ -0,0 +1,83 @@ +/* + +Pojoaque Style by Jason Tate +http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html +Based on Solarized Style from http://ethanschoonover.com/solarized + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #dccf8f; + background: url(./pojoaque.jpg) repeat scroll left top #181914; +} + +.hljs-comment, +.hljs-quote { + color: #586e75; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-addition { + color: #b64926; +} + +.hljs-number, +.hljs-string, +.hljs-doctag, +.hljs-regexp { + color: #468966; +} + +.hljs-title, +.hljs-section, +.hljs-built_in, +.hljs-name { + color: #ffb03b; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type, +.hljs-tag { + color: #b58900; +} + +.hljs-attribute { + color: #b89859; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link, +.hljs-subst, +.hljs-meta { + color: #cb4b16; +} + +.hljs-deletion { + color: #dc322f; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #d3a60c; +} + +.hljs-formula { + background: #073642; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/pojoaque.jpg b/highlightjs/asset/styles/pojoaque.jpg new file mode 100644 index 00000000..9c07d4ab Binary files /dev/null and b/highlightjs/asset/styles/pojoaque.jpg differ diff --git a/highlightjs/asset/styles/purebasic.css b/highlightjs/asset/styles/purebasic.css new file mode 100644 index 00000000..5ce9b9e0 --- /dev/null +++ b/highlightjs/asset/styles/purebasic.css @@ -0,0 +1,96 @@ +/* + +PureBASIC native IDE style ( version 1.0 - April 2016 ) + +by Tristano Ajmone + +Public Domain + +NOTE_1: PureBASIC code syntax highlighting only applies the following classes: + .hljs-comment + .hljs-function + .hljs-keywords + .hljs-string + .hljs-symbol + + Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style. + If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by + a "--- used for PureBASIC ... ---" comment on same line. + +NOTE_2: Color names provided in comments were derived using "Name that Color" online tool: + http://chir.ag/projects/name-that-color +*/ + +.hljs { /* Common set of rules required by highlight.js (don'r remove!) */ + display: block; + overflow-x: auto; + padding: 0.5em; + background: #FFFFDF; /* Half and Half (approx.) */ +/* --- Uncomment to add PureBASIC native IDE styled font! + font-family: Consolas; +*/ +} + +.hljs, /* --- used for PureBASIC base color --- */ +.hljs-type, /* --- used for PureBASIC Procedures return type --- */ +.hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */ +.hljs-name, +.hljs-number, +.hljs-attr, +.hljs-params, +.hljs-subst { + color: #000000; /* Black */ +} + +.hljs-comment, /* --- used for PureBASIC Comments --- */ +.hljs-regexp, +.hljs-section, +.hljs-selector-pseudo, +.hljs-addition { + color: #00AAAA; /* Persian Green (approx.) */ +} + +.hljs-title, /* --- used for PureBASIC Procedures Names --- */ +.hljs-tag, +.hljs-variable, +.hljs-code { + color: #006666; /* Blue Stone (approx.) */ +} + +.hljs-keyword, /* --- used for PureBASIC Keywords --- */ +.hljs-class, +.hljs-meta-keyword, +.hljs-selector-class, +.hljs-built_in, +.hljs-builtin-name { + color: #006666; /* Blue Stone (approx.) */ + font-weight: bold; +} + +.hljs-string, /* --- used for PureBASIC Strings --- */ +.hljs-selector-attr { + color: #0080FF; /* Azure Radiance (approx.) */ +} + +.hljs-symbol, /* --- used for PureBASIC Constants --- */ +.hljs-link, +.hljs-deletion, +.hljs-attribute { + color: #924B72; /* Cannon Pink (approx.) */ +} + +.hljs-meta, +.hljs-literal, +.hljs-selector-id { + color: #924B72; /* Cannon Pink (approx.) */ + font-weight: bold; +} + +.hljs-strong, +.hljs-name { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/qtcreator_dark.css b/highlightjs/asset/styles/qtcreator_dark.css new file mode 100644 index 00000000..7aa56a36 --- /dev/null +++ b/highlightjs/asset/styles/qtcreator_dark.css @@ -0,0 +1,83 @@ +/* + +Qt Creator dark color scheme + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000000; +} + +.hljs, +.hljs-subst, +.hljs-tag, +.hljs-title { + color: #aaaaaa; +} + +.hljs-strong, +.hljs-emphasis { + color: #a8a8a2; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #ff55ff; +} + +.hljs-code +.hljs-selector-class { + color: #aaaaff; +} + +.hljs-emphasis, +.hljs-stronge, +.hljs-type { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-function, +.hljs-section, +.hljs-symbol, +.hljs-name { + color: #ffff55; +} + +.hljs-attribute { + color: #ff5555; +} + +.hljs-variable, +.hljs-params, +.hljs-class .hljs-title { + color: #8888ff; +} + +.hljs-string, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition, +.hljs-link { + color: #ff55ff; +} + +.hljs-comment, +.hljs-meta, +.hljs-deletion { + color: #55ffff; +} diff --git a/highlightjs/asset/styles/qtcreator_light.css b/highlightjs/asset/styles/qtcreator_light.css new file mode 100644 index 00000000..1efa2c66 --- /dev/null +++ b/highlightjs/asset/styles/qtcreator_light.css @@ -0,0 +1,83 @@ +/* + +Qt Creator light color scheme + +*/ + + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #ffffff; +} + +.hljs, +.hljs-subst, +.hljs-tag, +.hljs-title { + color: #000000; +} + +.hljs-strong, +.hljs-emphasis { + color: #000000; +} + +.hljs-bullet, +.hljs-quote, +.hljs-number, +.hljs-regexp, +.hljs-literal { + color: #000080; +} + +.hljs-code +.hljs-selector-class { + color: #800080; +} + +.hljs-emphasis, +.hljs-stronge, +.hljs-type { + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-function, +.hljs-section, +.hljs-symbol, +.hljs-name { + color: #808000; +} + +.hljs-attribute { + color: #800000; +} + +.hljs-variable, +.hljs-params, +.hljs-class .hljs-title { + color: #0055AF; +} + +.hljs-string, +.hljs-selector-id, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-template-tag, +.hljs-template-variable, +.hljs-addition, +.hljs-link { + color: #008000; +} + +.hljs-comment, +.hljs-meta, +.hljs-deletion { + color: #008000; +} diff --git a/highlightjs/asset/styles/railscasts.css b/highlightjs/asset/styles/railscasts.css new file mode 100644 index 00000000..008cdc5b --- /dev/null +++ b/highlightjs/asset/styles/railscasts.css @@ -0,0 +1,106 @@ +/* + +Railscasts-like style (c) Visoft, Inc. (Damien White) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #232323; + color: #e6e1dc; +} + +.hljs-comment, +.hljs-quote { + color: #bc9458; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag { + color: #c26230; +} + +.hljs-string, +.hljs-number, +.hljs-regexp, +.hljs-variable, +.hljs-template-variable { + color: #a5c261; +} + +.hljs-subst { + color: #519f50; +} + +.hljs-tag, +.hljs-name { + color: #e8bf6a; +} + +.hljs-type { + color: #da4939; +} + + +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-attr, +.hljs-link { + color: #6d9cbe; +} + +.hljs-params { + color: #d0d0ff; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #9b859d; +} + +.hljs-title, +.hljs-section { + color: #ffc66d; +} + +.hljs-addition { + background-color: #144212; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} diff --git a/highlightjs/asset/styles/rainbow.css b/highlightjs/asset/styles/rainbow.css new file mode 100644 index 00000000..905eb8ef --- /dev/null +++ b/highlightjs/asset/styles/rainbow.css @@ -0,0 +1,85 @@ +/* + +Style with support for rainbow parens + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #474949; + color: #d1d9e1; +} + + +.hljs-comment, +.hljs-quote { + color: #969896; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-type, +.hljs-addition { + color: #cc99cc; +} + +.hljs-number, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #f99157; +} + +.hljs-string, +.hljs-doctag, +.hljs-regexp { + color: #8abeb7; +} + +.hljs-title, +.hljs-name, +.hljs-section, +.hljs-built_in { + color: #b5bd68; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-class .hljs-title { + color: #ffcc66; +} + +.hljs-section, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-link { + color: #f99157; +} + +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #eee8d5; +} + +.hljs-attr, +.hljs-attribute { + color: #81a2be; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/routeros.css b/highlightjs/asset/styles/routeros.css new file mode 100644 index 00000000..ebe23990 --- /dev/null +++ b/highlightjs/asset/styles/routeros.css @@ -0,0 +1,108 @@ +/* + + highlight.js style for Microtik RouterOS script + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} + +/* Base color: saturation 0; */ + +.hljs, +.hljs-subst { + color: #444; +} + +.hljs-comment { + color: #888888; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} + +.hljs-attribute { + color: #0E9A00; +} + +.hljs-function { + color: #99069A; +} + +.hljs-builtin-name { + color: #99069A; +} + +/* User color: hue: 0 */ + +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} + +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} + +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} + + +/* Language color: hue: 90; */ + +.hljs-literal { + color: #78A960; +} + +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #0C9A9A; +} + + +/* Meta color: hue: 200 */ + +.hljs-meta { + color: #1f7199; +} + +.hljs-meta-string { + color: #4d99bf; +} + + +/* Misc effects */ + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/school-book.css b/highlightjs/asset/styles/school-book.css new file mode 100644 index 00000000..964b51d8 --- /dev/null +++ b/highlightjs/asset/styles/school-book.css @@ -0,0 +1,72 @@ +/* + +School Book style from goldblog.com.ua (c) Zaripov Yura + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 15px 0.5em 0.5em 30px; + font-size: 11px; + line-height:16px; +} + +pre{ + background:#f6f6ae url(./school-book.png); + border-top: solid 2px #d2e8b9; + border-bottom: solid 1px #d2e8b9; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color:#005599; + font-weight:bold; +} + +.hljs, +.hljs-subst { + color: #3e5915; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute, +.hljs-built_in, +.hljs-builtin-name, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable, +.hljs-link { + color: #2c009f; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion, +.hljs-meta { + color: #e60415; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-doctag, +.hljs-title, +.hljs-section, +.hljs-type, +.hljs-name, +.hljs-selector-id, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/school-book.png b/highlightjs/asset/styles/school-book.png new file mode 100644 index 00000000..956e9790 Binary files /dev/null and b/highlightjs/asset/styles/school-book.png differ diff --git a/highlightjs/asset/styles/solarized-dark.css b/highlightjs/asset/styles/solarized-dark.css new file mode 100644 index 00000000..b4c0da1f --- /dev/null +++ b/highlightjs/asset/styles/solarized-dark.css @@ -0,0 +1,84 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #002b36; + color: #839496; +} + +.hljs-comment, +.hljs-quote { + color: #586e75; +} + +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} + +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} + +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} + +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} + +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} + +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #073642; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/solarized-light.css b/highlightjs/asset/styles/solarized-light.css new file mode 100644 index 00000000..fdcfcc72 --- /dev/null +++ b/highlightjs/asset/styles/solarized-light.css @@ -0,0 +1,84 @@ +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fdf6e3; + color: #657b83; +} + +.hljs-comment, +.hljs-quote { + color: #93a1a1; +} + +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} + +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} + +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} + +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} + +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} + +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} + +.hljs-formula { + background: #eee8d5; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/sunburst.css b/highlightjs/asset/styles/sunburst.css new file mode 100644 index 00000000..f56dd5e9 --- /dev/null +++ b/highlightjs/asset/styles/sunburst.css @@ -0,0 +1,102 @@ +/* + +Sunburst-like style (c) Vasily Polovnyov + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #000; + color: #f8f8f8; +} + +.hljs-comment, +.hljs-quote { + color: #aeaeae; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-type { + color: #e28964; +} + +.hljs-string { + color: #65b042; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp, +.hljs-link { + color: #e9c062; +} + +.hljs-title, +.hljs-section, +.hljs-tag, +.hljs-name { + color: #89bdff; +} + +.hljs-class .hljs-title, +.hljs-doctag { + text-decoration: underline; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-number { + color: #3387cc; +} + +.hljs-params, +.hljs-variable, +.hljs-template-variable { + color: #3e87e3; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #8996a8; +} + +.hljs-formula { + background-color: #0e2231; + color: #f8f8f8; + font-style: italic; +} + +.hljs-addition { + background-color: #253b22; + color: #f8f8f8; +} + +.hljs-deletion { + background-color: #420e09; + color: #f8f8f8; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/tomorrow-night-blue.css b/highlightjs/asset/styles/tomorrow-night-blue.css new file mode 100644 index 00000000..78e59cc8 --- /dev/null +++ b/highlightjs/asset/styles/tomorrow-night-blue.css @@ -0,0 +1,75 @@ +/* Tomorrow Night Blue Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #7285b7; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #ff9da4; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #ffc58f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #ffeead; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #d1f1a9; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #bbdaff; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #ebbbff; +} + +.hljs { + display: block; + overflow-x: auto; + background: #002451; + color: white; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/tomorrow-night-bright.css b/highlightjs/asset/styles/tomorrow-night-bright.css new file mode 100644 index 00000000..e05af8ae --- /dev/null +++ b/highlightjs/asset/styles/tomorrow-night-bright.css @@ -0,0 +1,74 @@ +/* Tomorrow Night Bright Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #d54e53; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #e78c45; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #e7c547; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #b9ca4a; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #7aa6da; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #c397d8; +} + +.hljs { + display: block; + overflow-x: auto; + background: black; + color: #eaeaea; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/tomorrow-night-eighties.css b/highlightjs/asset/styles/tomorrow-night-eighties.css new file mode 100644 index 00000000..08fd51c7 --- /dev/null +++ b/highlightjs/asset/styles/tomorrow-night-eighties.css @@ -0,0 +1,74 @@ +/* Tomorrow Night Eighties Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #999999; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #f2777a; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f99157; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #ffcc66; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #99cc99; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #6699cc; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #cc99cc; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2d2d2d; + color: #cccccc; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/tomorrow-night.css b/highlightjs/asset/styles/tomorrow-night.css new file mode 100644 index 00000000..ddd270a4 --- /dev/null +++ b/highlightjs/asset/styles/tomorrow-night.css @@ -0,0 +1,75 @@ +/* Tomorrow Night Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #cc6666; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #de935f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #f0c674; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #b5bd68; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #81a2be; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b294bb; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1d1f21; + color: #c5c8c6; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/tomorrow.css b/highlightjs/asset/styles/tomorrow.css new file mode 100644 index 00000000..026a62fe --- /dev/null +++ b/highlightjs/asset/styles/tomorrow.css @@ -0,0 +1,72 @@ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment, +.hljs-quote { + color: #8e908c; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #c82829; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #f5871f; +} + +/* Tomorrow Yellow */ +.hljs-attribute { + color: #eab700; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #718c00; +} + +/* Tomorrow Blue */ +.hljs-title, +.hljs-section { + color: #4271ae; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #8959a8; +} + +.hljs { + display: block; + overflow-x: auto; + background: white; + color: #4d4d4c; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/vs.css b/highlightjs/asset/styles/vs.css new file mode 100644 index 00000000..c5d07d31 --- /dev/null +++ b/highlightjs/asset/styles/vs.css @@ -0,0 +1,68 @@ +/* + +Visual Studio-like style based on original C# coloring by Jason Diamond + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: white; + color: black; +} + +.hljs-comment, +.hljs-quote, +.hljs-variable { + color: #008000; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-built_in, +.hljs-name, +.hljs-tag { + color: #00f; +} + +.hljs-string, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-literal, +.hljs-template-tag, +.hljs-template-variable, +.hljs-type, +.hljs-addition { + color: #a31515; +} + +.hljs-deletion, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-meta { + color: #2b91af; +} + +.hljs-doctag { + color: #808080; +} + +.hljs-attr { + color: #f00; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #00b0e8; +} + + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/asset/styles/vs2015.css b/highlightjs/asset/styles/vs2015.css new file mode 100644 index 00000000..d1d9be3c --- /dev/null +++ b/highlightjs/asset/styles/vs2015.css @@ -0,0 +1,115 @@ +/* + * Visual Studio 2015 dark style + * Author: Nicolas LLOBERA + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1E1E1E; + color: #DCDCDC; +} + +.hljs-keyword, +.hljs-literal, +.hljs-symbol, +.hljs-name { + color: #569CD6; +} +.hljs-link { + color: #569CD6; + text-decoration: underline; +} + +.hljs-built_in, +.hljs-type { + color: #4EC9B0; +} + +.hljs-number, +.hljs-class { + color: #B8D7A3; +} + +.hljs-string, +.hljs-meta-string { + color: #D69D85; +} + +.hljs-regexp, +.hljs-template-tag { + color: #9A5334; +} + +.hljs-subst, +.hljs-function, +.hljs-title, +.hljs-params, +.hljs-formula { + color: #DCDCDC; +} + +.hljs-comment, +.hljs-quote { + color: #57A64A; + font-style: italic; +} + +.hljs-doctag { + color: #608B4E; +} + +.hljs-meta, +.hljs-meta-keyword, +.hljs-tag { + color: #9B9B9B; +} + +.hljs-variable, +.hljs-template-variable { + color: #BD63C5; +} + +.hljs-attr, +.hljs-attribute, +.hljs-builtin-name { + color: #9CDCFE; +} + +.hljs-section { + color: gold; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +/*.hljs-code { + font-family:'Monospace'; +}*/ + +.hljs-bullet, +.hljs-selector-tag, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #D7BA7D; +} + +.hljs-addition { + background-color: #144212; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + display: inline-block; + width: 100%; +} diff --git a/highlightjs/asset/styles/xcode.css b/highlightjs/asset/styles/xcode.css new file mode 100644 index 00000000..43dddad8 --- /dev/null +++ b/highlightjs/asset/styles/xcode.css @@ -0,0 +1,93 @@ +/* + +XCode style (c) Angel Garcia + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #fff; + color: black; +} + +.hljs-comment, +.hljs-quote { + color: #006a00; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color: #aa0d91; +} + +.hljs-name { + color: #008; +} + +.hljs-variable, +.hljs-template-variable { + color: #660; +} + +.hljs-string { + color: #c41a16; +} + +.hljs-regexp, +.hljs-link { + color: #080; +} + +.hljs-title, +.hljs-tag, +.hljs-symbol, +.hljs-bullet, +.hljs-number, +.hljs-meta { + color: #1c00cf; +} + +.hljs-section, +.hljs-class .hljs-title, +.hljs-type, +.hljs-attr, +.hljs-built_in, +.hljs-builtin-name, +.hljs-params { + color: #5c2699; +} + +.hljs-attribute, +.hljs-subst { + color: #000; +} + +.hljs-formula { + background-color: #eee; + font-style: italic; +} + +.hljs-addition { + background-color: #baeeba; +} + +.hljs-deletion { + background-color: #ffc8bd; +} + +.hljs-selector-id, +.hljs-selector-class { + color: #9b703f; +} + +.hljs-doctag, +.hljs-strong { + font-weight: bold; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/highlightjs/asset/styles/xt256.css b/highlightjs/asset/styles/xt256.css new file mode 100644 index 00000000..58df82cb --- /dev/null +++ b/highlightjs/asset/styles/xt256.css @@ -0,0 +1,92 @@ + +/* + xt256.css + + Contact: initbar [at] protonmail [dot] ch + : github.com/initbar +*/ + +.hljs { + display: block; + overflow-x: auto; + color: #eaeaea; + background: #000; + padding: 0.5; +} + +.hljs-subst { + color: #eaeaea; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-builtin-name, +.hljs-type { + color: #eaeaea; +} + +.hljs-params { + color: #da0000; +} + +.hljs-literal, +.hljs-number, +.hljs-name { + color: #ff0000; + font-weight: bolder; +} + +.hljs-comment { + color: #969896; +} + +.hljs-selector-id, +.hljs-quote { + color: #00ffff; +} + +.hljs-template-variable, +.hljs-variable, +.hljs-title { + color: #00ffff; + font-weight: bold; +} + +.hljs-selector-class, +.hljs-keyword, +.hljs-symbol { + color: #fff000; +} + +.hljs-string, +.hljs-bullet { + color: #00ff00; +} + +.hljs-tag, +.hljs-section { + color: #000fff; +} + +.hljs-selector-tag { + color: #000fff; + font-weight: bold; +} + +.hljs-attribute, +.hljs-built_in, +.hljs-regexp, +.hljs-link { + color: #ff00ff; +} + +.hljs-meta { + color: #fff; + font-weight: bolder; +} diff --git a/highlightjs/asset/styles/zenburn.css b/highlightjs/asset/styles/zenburn.css new file mode 100644 index 00000000..07be5020 --- /dev/null +++ b/highlightjs/asset/styles/zenburn.css @@ -0,0 +1,80 @@ +/* + +Zenburn style from voldmar.ru (c) Vladimir Epifanov +based on dark.css by Ivan Sagalaev + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #3f3f3f; + color: #dcdcdc; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-tag { + color: #e3ceab; +} + +.hljs-template-tag { + color: #dcdcdc; +} + +.hljs-number { + color: #8cd0d3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-attribute { + color: #efdcbc; +} + +.hljs-literal { + color: #efefaf; +} + +.hljs-subst { + color: #8f8f8f; +} + +.hljs-title, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-section, +.hljs-type { + color: #efef8f; +} + +.hljs-symbol, +.hljs-bullet, +.hljs-link { + color: #dca3a3; +} + +.hljs-deletion, +.hljs-string, +.hljs-built_in, +.hljs-builtin-name { + color: #cc9393; +} + +.hljs-addition, +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #7f9f7f; +} + + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/highlightjs/highlightjs.js b/highlightjs/highlightjs.js new file mode 100644 index 00000000..b198c705 --- /dev/null +++ b/highlightjs/highlightjs.js @@ -0,0 +1,6 @@ +hljs.initHighlightingOnLoad(); + +document.addEventListener('postprocess_liveupdate', function () { + var blocks = document.querySelectorAll('pre code:not(.hljs)'); + Array.prototype.forEach.call(blocks, hljs.highlightBlock); +}); diff --git a/highlightjs/highlightjs.php b/highlightjs/highlightjs.php new file mode 100644 index 00000000..8d05453b --- /dev/null +++ b/highlightjs/highlightjs.php @@ -0,0 +1,39 @@ + + */ + +use Friendica\App; +use Friendica\Core\Addon; + +function highlightjs_install() +{ + Addon::registerHook('head' , __FILE__, 'highlightjs_head'); + Addon::registerHook('footer', __FILE__, 'highlightjs_footer'); +} + +function highlightjs_uninstall() +{ + Addon::unregisterHook('head' , __FILE__, 'highlightjs_head'); + Addon::unregisterHook('footer', __FILE__, 'highlightjs_footer'); +} + +function highlightjs_head(App $a, &$b) +{ + if ($a->getCurrentTheme() == 'frio') { + $style = 'bootstrap'; + } else { + $style = 'default'; + } + + $a->registerStylesheet(__DIR__ . '/asset/styles/' . $style . '.css'); +} + +function highlightjs_footer(App $a, &$b) +{ + $a->registerFooterScript(__DIR__ . '/asset/highlight.pack.js'); + $a->registerFooterScript(__DIR__ . '/highlightjs.js'); +} diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php index 55f46091..50fa119c 100644 --- a/ifttt/ifttt.php +++ b/ifttt/ifttt.php @@ -13,10 +13,12 @@ require_once 'include/text.php'; use Friendica\App; use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Core\Protocol; use Friendica\Database\DBA; use Friendica\Model\Item; +use Friendica\Util\Strings; function ifttt_install() { @@ -49,7 +51,7 @@ function ifttt_settings(App $a, &$s) $key = PConfig::get(local_user(), 'ifttt', 'key'); if (!$key) { - $key = random_string(20); + $key = Strings::getRandomHex(20); PConfig::set(local_user(), 'ifttt', 'key', $key); } @@ -64,7 +66,7 @@ function ifttt_settings(App $a, &$s) $s .= '
'; $s .= '

' . L10n::t('Create an account at IFTTT. Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '

'; $s .= '

URL

'; - $s .= '

' . $a->get_baseurl() . '/ifttt/' . $a->user['nickname'] . '

'; + $s .= '

' . $a->getBaseURL() . '/ifttt/' . $a->user['nickname'] . '

'; $s .= '

Method

'; $s .= '

POST

'; $s .= '

Content Type

'; @@ -88,7 +90,7 @@ function ifttt_settings(App $a, &$s) function ifttt_settings_post() { - if (x($_POST, 'ifttt-submit') && isset($_POST['ifttt-rekey'])) { + if (!empty($_POST['ifttt-submit']) && isset($_POST['ifttt-rekey'])) { PConfig::delete(local_user(), 'ifttt', 'key'); } } @@ -103,16 +105,16 @@ function ifttt_post(App $a) $user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname]); if (!DBA::isResult($user)) { - logger('User ' . $nickname . ' not found.', LOGGER_DEBUG); + Logger::log('User ' . $nickname . ' not found.', Logger::DEBUG); return; } $uid = $user['uid']; - logger('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true), LOGGER_DEBUG); + Logger::log('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true), Logger::DEBUG); if (!isset($_REQUEST['key'])) { - logger('No key found.'); + Logger::log('No key found.'); return; } @@ -120,7 +122,7 @@ function ifttt_post(App $a) // Check the key if ($key != PConfig::get($uid, 'ifttt', 'key')) { - logger('Invalid key for user ' . $uid, LOGGER_DEBUG); + Logger::log('Invalid key for user ' . $uid, Logger::DEBUG); return; } @@ -131,7 +133,7 @@ function ifttt_post(App $a) } if (!in_array($item['type'], ['status', 'link', 'photo'])) { - logger('Unknown item type ' . $item['type'], LOGGER_DEBUG); + Logger::log('Unknown item type ' . $item['type'], Logger::DEBUG); return; } @@ -180,7 +182,7 @@ function ifttt_message($uid, $item) //$_REQUEST['date'] = $item['date']; //$_REQUEST['uri'] = $item['url']; - if (strstr($item['url'], 'facebook.com')) { + if (!empty($item['url']) && strstr($item['url'], 'facebook.com')) { $hash = hash('ripemd128', $item['url']); $_REQUEST['extid'] = Protocol::FACEBOOK; $_REQUEST['message_id'] = Item::newURI($uid, Protocol::FACEBOOK . ':' . $hash); diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 8d529085..dcb8f4bf 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -11,155 +11,159 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; +use Friendica\Util\XML; -function ijpost_install() { - Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local'); - Addon::registerHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send'); - Addon::registerHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets'); - Addon::registerHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings'); - Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post'); - -} -function ijpost_uninstall() { - Addon::unregisterHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local'); - Addon::unregisterHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send'); - Addon::unregisterHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets'); - Addon::unregisterHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings'); - Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post'); - +function ijpost_install() +{ + Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local'); + Addon::registerHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send'); + Addon::registerHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets'); + Addon::registerHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings'); + Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post'); } - -function ijpost_jot_nets(&$a,&$b) { - if(! local_user()) - return; - - $ij_post = PConfig::get(local_user(),'ijpost','post'); - if(intval($ij_post) == 1) { - $ij_defpost = PConfig::get(local_user(),'ijpost','post_by_default'); - $selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : ''); - $b .= '
' - . L10n::t('Post to Insanejournal') . '
'; - } +function ijpost_uninstall() +{ + Addon::unregisterHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local'); + Addon::unregisterHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send'); + Addon::unregisterHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets'); + Addon::unregisterHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings'); + Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post'); } +function ijpost_jot_nets(&$a, &$b) +{ + if (!local_user()) { + return; + } -function ijpost_settings(&$a,&$s) { + $ij_post = PConfig::get(local_user(), 'ijpost', 'post'); + if (intval($ij_post) == 1) { + $ij_defpost = PConfig::get(local_user(), 'ijpost', 'post_by_default'); + $selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : ''); + $b .= '
' + . L10n::t('Post to Insanejournal') . '
'; + } +} - if(! local_user()) - return; +function ijpost_settings(&$a, &$s) +{ + if (!local_user()) { + return; + } - /* Add our stylesheet to the page so we can make our settings look nice */ + /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; - /* Get the current state of our config variables */ + /* Get the current state of our config variables */ - $enabled = PConfig::get(local_user(),'ijpost','post'); + $enabled = PConfig::get(local_user(), 'ijpost', 'post'); - $checked = (($enabled) ? ' checked="checked" ' : ''); + $checked = (($enabled) ? ' checked="checked" ' : ''); - $def_enabled = PConfig::get(local_user(),'ijpost','post_by_default'); + $def_enabled = PConfig::get(local_user(), 'ijpost', 'post_by_default'); - $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); + $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); $ij_username = PConfig::get(local_user(), 'ijpost', 'ij_username'); $ij_password = PConfig::get(local_user(), 'ijpost', 'ij_password'); + /* Add some HTML to the existing form */ + $s .= ''; + $s .= '

'. L10n::t("InsaneJournal Export").'

'; + $s .= '
'; + $s .= ''; } - -function ijpost_settings_post(&$a,&$b) { - - if(x($_POST,'ijpost-submit')) { - - PConfig::set(local_user(),'ijpost','post',intval($_POST['ijpost'])); - PConfig::set(local_user(),'ijpost','post_by_default',intval($_POST['ij_bydefault'])); - PConfig::set(local_user(),'ijpost','ij_username',trim($_POST['ij_username'])); - PConfig::set(local_user(),'ijpost','ij_password',trim($_POST['ij_password'])); - +function ijpost_settings_post(&$a, &$b) +{ + if (!empty($_POST['ijpost-submit'])) { + PConfig::set(local_user(), 'ijpost', 'post', intval($_POST['ijpost'])); + PConfig::set(local_user(), 'ijpost', 'post_by_default', intval($_POST['ij_bydefault'])); + PConfig::set(local_user(), 'ijpost', 'ij_username', trim($_POST['ij_username'])); + PConfig::set(local_user(), 'ijpost', 'ij_password', trim($_POST['ij_password'])); } - } -function ijpost_post_local(&$a,&$b) { - +function ijpost_post_local(&$a, &$b) +{ // This can probably be changed to allow editing by pointing to a different API endpoint - if($b['edit']) + if ($b['edit']) { return; + } - if((! local_user()) || (local_user() != $b['uid'])) + if (!local_user() || (local_user() != $b['uid'])) { return; + } - if($b['private'] || $b['parent']) + if ($b['private'] || $b['parent']) { return; + } - $ij_post = intval(PConfig::get(local_user(),'ijpost','post')); + $ij_post = intval(PConfig::get(local_user(), 'ijpost', 'post')); - $ij_enable = (($ij_post && x($_REQUEST,'ijpost_enable')) ? intval($_REQUEST['ijpost_enable']) : 0); + $ij_enable = (($ij_post && !empty($_REQUEST['ijpost_enable'])) ? intval($_REQUEST['ijpost_enable']) : 0); - if($_REQUEST['api_source'] && intval(PConfig::get(local_user(),'ijpost','post_by_default'))) + if ($b['api_source'] && intval(PConfig::get(local_user(), 'ijpost', 'post_by_default'))) { $ij_enable = 1; + } - if(! $ij_enable) - return; + if (!$ij_enable) { + return; + } - if(strlen($b['postopts'])) - $b['postopts'] .= ','; - $b['postopts'] .= 'ijpost'; + if (strlen($b['postopts'])) { + $b['postopts'] .= ','; + } + + $b['postopts'] .= 'ijpost'; } +function ijpost_send(&$a, &$b) +{ + if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { + return; + } + if (!strstr($b['postopts'], 'ijpost')) { + return; + } - -function ijpost_send(&$a,&$b) { - - if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) - return; - - if(! strstr($b['postopts'],'ijpost')) - return; - - if($b['parent'] != $b['id']) - return; + if ($b['parent'] != $b['id']) { + return; + } // insanejournal post in the LJ user's timezone. // Hopefully the person's Friendica account @@ -170,17 +174,19 @@ function ijpost_send(&$a,&$b) { $x = q("select timezone from user where uid = %d limit 1", intval($b['uid']) ); - if($x && strlen($x[0]['timezone'])) - $tz = $x[0]['timezone']; - $ij_username = PConfig::get($b['uid'],'ijpost','ij_username'); - $ij_password = PConfig::get($b['uid'],'ijpost','ij_password'); + if ($x && strlen($x[0]['timezone'])) { + $tz = $x[0]['timezone']; + } + + $ij_username = PConfig::get($b['uid'], 'ijpost', 'ij_username'); + $ij_password = PConfig::get($b['uid'], 'ijpost', 'ij_password'); $ij_blog = 'http://www.insanejournal.com/interface/xmlrpc'; - if($ij_username && $ij_password && $ij_blog) { + if ($ij_username && $ij_password && $ij_blog) { $title = $b['title']; $post = BBCode::convert($b['body']); - $post = xmlify($post); + $post = XML::escape($post); $tags = ijpost_get_tags($b['tag']); $date = DateTimeFormat::convert($b['created'], $tz); @@ -217,19 +223,18 @@ function ijpost_send(&$a,&$b) { EOT; - logger('ijpost: data: ' . $xml, LOGGER_DATA); + Logger::log('ijpost: data: ' . $xml, Logger::DATA); - if($ij_blog !== 'test') { - $x = Network::post($ij_blog, $xml, ["Content-Type: text/xml"]); + if ($ij_blog !== 'test') { + $x = Network::post($ij_blog, $xml, ["Content-Type: text/xml"])->getBody(); } - logger('posted to insanejournal: ' . ($x) ? $x : '', LOGGER_DEBUG); - + Logger::log('posted to insanejournal: ' . $x ? $x : '', Logger::DEBUG); } } function ijpost_get_tags($post) { - preg_match_all("/\]([^\[#]+)\[/",$post,$matches); - $tags = implode(', ',$matches[1]); + preg_match_all("/\]([^\[#]+)\[/", $post, $matches); + $tags = implode(', ', $matches[1]); return $tags; } diff --git a/ijpost/lang/cs/messages.po b/ijpost/lang/cs/messages.po index dd273de4..33705d1e 100644 --- a/ijpost/lang/cs/messages.po +++ b/ijpost/lang/cs/messages.po @@ -4,44 +4,45 @@ # # # Translators: -# Michal Šupler , 2014-2015 +# Aditoo, 2018 +# michal_s , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:40+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-09-12 09:49+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: ijpost.php:39 msgid "Post to Insanejournal" -msgstr "Odeslat na Insanejournal" +msgstr "Posílat na InsaneJournal" #: ijpost.php:70 msgid "InsaneJournal Post Settings" -msgstr "Nastavení příspěvků pro InsaneJournal" +msgstr "Nastavení InsaneJournal Post" #: ijpost.php:72 msgid "Enable InsaneJournal Post Addon" -msgstr "Povolit Insanejournal addon" +msgstr "Povolit doplněk InsaneJournal Post" #: ijpost.php:77 msgid "InsaneJournal username" -msgstr "Insanejournal uživatelské jméno" +msgstr "Uživatelské jméno InsaneJournal" #: ijpost.php:82 msgid "InsaneJournal password" -msgstr "Insanejournal heslo" +msgstr "Heslo InsaneJournal" #: ijpost.php:87 msgid "Post to InsaneJournal by default" -msgstr "Defaultně zasílat příspěvky na InsaneJournal" +msgstr "Ve výchozím stavu posílat příspěvky na InsaneJournal" #: ijpost.php:93 msgid "Submit" diff --git a/ijpost/lang/cs/strings.php b/ijpost/lang/cs/strings.php index 4f4fec36..c9ef7978 100644 --- a/ijpost/lang/cs/strings.php +++ b/ijpost/lang/cs/strings.php @@ -2,13 +2,14 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ - return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; + $n = intval($n); + return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; -$a->strings["Post to Insanejournal"] = "Odeslat na Insanejournal"; -$a->strings["InsaneJournal Post Settings"] = "Nastavení příspěvků pro InsaneJournal"; -$a->strings["Enable InsaneJournal Post Addon"] = "Povolit Insanejournal addon"; -$a->strings["InsaneJournal username"] = "Insanejournal uživatelské jméno"; -$a->strings["InsaneJournal password"] = "Insanejournal heslo"; -$a->strings["Post to InsaneJournal by default"] = "Defaultně zasílat příspěvky na InsaneJournal"; +$a->strings["Post to Insanejournal"] = "Posílat na InsaneJournal"; +$a->strings["InsaneJournal Post Settings"] = "Nastavení InsaneJournal Post"; +$a->strings["Enable InsaneJournal Post Addon"] = "Povolit doplněk InsaneJournal Post"; +$a->strings["InsaneJournal username"] = "Uživatelské jméno InsaneJournal"; +$a->strings["InsaneJournal password"] = "Heslo InsaneJournal"; +$a->strings["Post to InsaneJournal by default"] = "Ve výchozím stavu posílat příspěvky na InsaneJournal"; $a->strings["Submit"] = "Odeslat"; diff --git a/impressum/README.md b/impressum/README.md index 0d0aa51c..ca78d9a0 100644 --- a/impressum/README.md +++ b/impressum/README.md @@ -16,13 +16,14 @@ Simply fill in the fields in the impressium settings page in the addons area of Manual Configuration -------------------- -If you for any reason you prefer to use a configuration file instead, you can set the following variables in the config/addon.ini.php file +If you for any reason you prefer to use a configuration file instead, you can set the following variables in the `config/addon.config.php` file - [impressum] - owner = this is the Name of the Operator - ownerprofile = this is an optional Friendica account where the above owner name will link to - email = a contact email address (optional) - will be displayed slightly obfuscated as name(at)example(dot)com - postal = should contain a postal address where you can be reached at (optional) - notes = additional informations that should be displayed in the Impressum block - footer_text = Text that will be displayed at the bottom of the pages. + 'impressum' => [ + 'owner' => '', This is the Name of the Operator + 'ownerprofile' => '', This is an optional Friendica account where the above owner name will link to + 'email' => '', A contact email address (optional) + Will be displayed slightly obfuscated as name(at)example(dot)com + 'postal' => '', Should contain a postal address where you can be reached at (optional) + 'notes' => '', Additional informations that should be displayed in the Impressum block + 'footer_text' => '', Text that will be displayed at the bottom of the pages. + ], diff --git a/impressum/config/impressum.config.php b/impressum/config/impressum.config.php new file mode 100644 index 00000000..9fe672fc --- /dev/null +++ b/impressum/config/impressum.config.php @@ -0,0 +1,33 @@ + [ + // owner (String) + // This is the Name of the Operator + 'owner' => '', + + // ownerprofile (String) + // This is an optional Friendica account where the above owner name will link to + 'ownerprofile' => '', + + // email (String) + // A contact email address (optional) + // Will be displayed slightly obfuscated as name(at)example(dot)com + 'email' => '', + + // postal (String) + // Should contain a postal address where you can be reached at (optional) + 'postal' => '', + + // notes (String) + // Additional informations that should be displayed in the Impressum block + 'notes' => '', + + // footer_text (String) + // Text that will be displayed at the bottom of the pages. + 'footer_text' => '', + ], +]; diff --git a/impressum/config/impressum.ini.php b/impressum/config/impressum.ini.php deleted file mode 100644 index 1de4468c..00000000 --- a/impressum/config/impressum.ini.php +++ /dev/null @@ -1,33 +0,0 @@ -internalRedirect('friendica/'); } function obfuscate_email ($s) { @@ -43,7 +46,7 @@ function impressum_footer($a, &$b) { $text = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum','footer_text'))); if (! $text == '') { - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''; $b .= '
'; $b .= ''; } @@ -51,7 +54,7 @@ function impressum_footer($a, &$b) { function impressum_load_config(\Friendica\App $a) { - $a->loadConfigFile(__DIR__. '/config/impressum.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/impressum.config.php'); } function impressum_show($a,&$b) { @@ -84,12 +87,12 @@ function impressum_show($a,&$b) { } function impressum_addon_admin_post (&$a) { - $owner = ((x($_POST, 'owner')) ? notags(trim($_POST['owner'])) : ''); - $ownerprofile = ((x($_POST, 'ownerprofile')) ? notags(trim($_POST['ownerprofile'])) : ''); - $postal = ((x($_POST, 'postal')) ? (trim($_POST['postal'])) : ''); - $notes = ((x($_POST, 'notes')) ? (trim($_POST['notes'])) : ''); - $email = ((x($_POST, 'email')) ? notags(trim($_POST['email'])) : ''); - $footer_text = ((x($_POST, 'footer_text')) ? (trim($_POST['footer_text'])) : ''); + $owner = (!empty($_POST['owner']) ? Strings::escapeTags(trim($_POST['owner'])) : ''); + $ownerprofile = (!empty($_POST['ownerprofile']) ? Strings::escapeTags(trim($_POST['ownerprofile'])) : ''); + $postal = (!empty($_POST['postal']) ? (trim($_POST['postal'])) : ''); + $notes = (!empty($_POST['notes']) ? (trim($_POST['notes'])) : ''); + $email = (!empty($_POST['email']) ? Strings::escapeTags(trim($_POST['email'])) : ''); + $footer_text = (!empty($_POST['footer_text']) ? (trim($_POST['footer_text'])) : ''); Config::set('impressum','owner',strip_tags($owner)); Config::set('impressum','ownerprofile',strip_tags($ownerprofile)); Config::set('impressum','postal',strip_tags($postal)); @@ -99,8 +102,8 @@ function impressum_addon_admin_post (&$a) { info(L10n::t('Settings updated.'). EOL ); } function impressum_addon_admin (&$a, &$o) { - $t = get_markup_template( "admin.tpl", "addon/impressum/" ); - $o = replace_macros($t, [ + $t = Renderer::getMarkupTemplate( "admin.tpl", "addon/impressum/" ); + $o = Renderer::replaceMacros($t, [ '$submit' => L10n::t('Save Settings'), '$owner' => ['owner', L10n::t('Site Owner'), Config::get('impressum','owner'), L10n::t('The page operators name.')], '$ownerprofile' => ['ownerprofile', L10n::t('Site Owners Profile'), Config::get('impressum','ownerprofile'), L10n::t('Profile address of the operator.')], diff --git a/impressum/lang/cs/messages.po b/impressum/lang/cs/messages.po index 04297ff4..1f49f2a7 100644 --- a/impressum/lang/cs/messages.po +++ b/impressum/lang/cs/messages.po @@ -4,20 +4,21 @@ # # # Translators: -# Michal Šupler , 2014-2015 +# Aditoo, 2018 +# michal_s , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:41+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-09-12 09:51+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: impressum.php:37 msgid "Impressum" @@ -25,7 +26,7 @@ msgstr "Impressum" #: impressum.php:50 impressum.php:52 impressum.php:84 msgid "Site Owner" -msgstr "Vlastník webu" +msgstr "Majitel webu" #: impressum.php:50 impressum.php:88 msgid "Email Address" @@ -40,11 +41,11 @@ msgid "" "The impressum addon needs to be configured!
Please add at least the " "owner variable to your config file. For other variables please " "refer to the README file of the addon." -msgstr "Doplněk Impressum musí být nakonfigurován!
Prosím, přidejte alespoň proměnnou owner do konfiguračního souboru. Pro nastavení ostatních proměnných se seznamte s nápovědou v souboru README tohoto doplňku." +msgstr "Doplněk Impressum musí být nakonfigurován!
Prosím, přidejte alespoň proměnnou owner do konfiguračního souboru. Pro nastavení ostatních proměnných se seznamte s nápovědou v souboru README tohoto doplňku." #: impressum.php:78 msgid "Settings updated." -msgstr "Nastavení aktualizováno." +msgstr "Nastavení aktualizována." #: impressum.php:83 msgid "Submit" @@ -60,7 +61,7 @@ msgstr "Profil majitele webu" #: impressum.php:85 msgid "Profile address of the operator." -msgstr "Profilová addresa operátora." +msgstr "Profilová adresa operátora." #: impressum.php:86 msgid "How to contact the operator via snail mail. You can use BBCode here." @@ -78,7 +79,7 @@ msgstr "Další poznámky, které jsou zobrazeny pod kontaktními informacemi. Z #: impressum.php:88 msgid "How to contact the operator via email. (will be displayed obfuscated)" -msgstr "Jak konktaktovat operátora přes mail. (bude zobrazen \"zmateně\")" +msgstr "Jak konktaktovat operátora přes mail. (bude zobrazeno \"obfuskovaně\")" #: impressum.php:89 msgid "Footer note" diff --git a/impressum/lang/cs/strings.php b/impressum/lang/cs/strings.php index 16f45aa5..9e49b43a 100644 --- a/impressum/lang/cs/strings.php +++ b/impressum/lang/cs/strings.php @@ -2,22 +2,23 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ - return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; + $n = intval($n); + return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; $a->strings["Impressum"] = "Impressum"; -$a->strings["Site Owner"] = "Vlastník webu"; +$a->strings["Site Owner"] = "Majitel webu"; $a->strings["Email Address"] = "E-mailová adresa"; $a->strings["Postal Address"] = "Poštovní adresa"; -$a->strings["The impressum addon needs to be configured!
Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon."] = "Doplněk Impressum musí být nakonfigurován!
Prosím, přidejte alespoň proměnnou owner do konfiguračního souboru. Pro nastavení ostatních proměnných se seznamte s nápovědou v souboru README tohoto doplňku."; -$a->strings["Settings updated."] = "Nastavení aktualizováno."; +$a->strings["The impressum addon needs to be configured!
Please add at least the owner variable to your config file. For other variables please refer to the README file of the addon."] = "Doplněk Impressum musí být nakonfigurován!
Prosím, přidejte alespoň proměnnou owner do konfiguračního souboru. Pro nastavení ostatních proměnných se seznamte s nápovědou v souboru README tohoto doplňku."; +$a->strings["Settings updated."] = "Nastavení aktualizována."; $a->strings["Submit"] = "Odeslat"; $a->strings["The page operators name."] = "Jméno operátora stránky."; $a->strings["Site Owners Profile"] = "Profil majitele webu"; -$a->strings["Profile address of the operator."] = "Profilová addresa operátora."; +$a->strings["Profile address of the operator."] = "Profilová adresa operátora."; $a->strings["How to contact the operator via snail mail. You can use BBCode here."] = "Jak kontaktovat operátora prostřednictvím klasické pošty. Zde můžete použít BBCode."; $a->strings["Notes"] = "Poznámky"; $a->strings["Additional notes that are displayed beneath the contact information. You can use BBCode here."] = "Další poznámky, které jsou zobrazeny pod kontaktními informacemi. Zde můžete použít BBCode."; -$a->strings["How to contact the operator via email. (will be displayed obfuscated)"] = "Jak konktaktovat operátora přes mail. (bude zobrazen \"zmateně\")"; +$a->strings["How to contact the operator via email. (will be displayed obfuscated)"] = "Jak konktaktovat operátora přes mail. (bude zobrazeno \"obfuskovaně\")"; $a->strings["Footer note"] = "Poznámka v zápatí"; $a->strings["Text for the footer. You can use BBCode here."] = "Text pro zápatí. Zde můžete použít BBCode."; diff --git a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php index e92d3440..3106a2fe 100644 --- a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php +++ b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php @@ -32,13 +32,13 @@ function infiniteimprobabilitydrive_module() function infiniteimprobabilitydrive_content(&$a) { - $baseurl = $a->get_baseurl() . '/addon/infiniteimprobabilitydrive'; + $baseurl = $a->getBaseURL() . '/addon/infiniteimprobabilitydrive'; $o = ''; - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''; - $baseurl = $a->get_baseurl(); + $baseurl = $a->getBaseURL(); $o .= <<< EOT diff --git a/irc/irc.php b/irc/irc.php index 6aeacbe6..2677dc75 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -10,6 +10,7 @@ use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\PConfig; +use Friendica\Core\Renderer; function irc_install() { Addon::registerHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu'); @@ -30,14 +31,14 @@ function irc_addon_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ -// $a->page['htmlhead'] .= '' . "\r\n"; +// $a->page['htmlhead'] .= '' . "\r\n"; /* setting popular channels, auto connect channels */ $sitechats = PConfig::get( local_user(), 'irc','sitechats'); /* popular channels */ $autochans = PConfig::get( local_user(), 'irc','autochans'); /* auto connect chans */ - $t = get_markup_template( "settings.tpl", "addon/irc/" ); - $s .= replace_macros($t, [ + $t = Renderer::getMarkupTemplate( "settings.tpl", "addon/irc/" ); + $s .= Renderer::replaceMacros($t, [ '$header' => L10n::t('IRC Settings'), '$info' => L10n::t('Here you can change the system wide settings for the channels to automatically join and access via the side bar. Note the changes you do here, only effect the channel selection if you are logged in.'), '$submit' => L10n::t('Save Settings'), @@ -74,7 +75,7 @@ function irc_module() { function irc_content(&$a) { - $baseurl = $a->get_baseurl() . '/addon/irc'; + $baseurl = $a->getBaseURL() . '/addon/irc'; $o = ''; /* set the list of popular channels */ @@ -93,7 +94,7 @@ function irc_content(&$a) { $a->page['aside'] .= '

' . L10n::t('Popular Channels') . '

'; @@ -108,7 +109,7 @@ function irc_content(&$a) { if($autochans) $channels = $autochans; else - $channels = ((x($_GET,'channels')) ? $_GET['channels'] : 'friendica'); + $channels = defaults($_GET, 'channels', 'friendica'); /* add the chatroom frame and some html */ $o .= <<< EOT @@ -135,8 +136,8 @@ function irc_addon_admin_post (&$a) { function irc_addon_admin (&$a, &$o) { $sitechats = Config::get('irc','sitechats'); /* popular channels */ $autochans = Config::get('irc','autochans'); /* auto connect chans */ - $t = get_markup_template( "admin.tpl", "addon/irc/" ); - $o = replace_macros($t, [ + $t = Renderer::getMarkupTemplate( "admin.tpl", "addon/irc/" ); + $o = Renderer::replaceMacros($t, [ '$submit' => L10n::t('Save Settings'), '$autochans' => [ 'autochans', L10n::t('Channel(s) to auto connect (comma separated)'), $autochans, L10n::t('List of channels that shall automatically connected to when the app is launched.')], '$sitechats' => [ 'sitechats', L10n::t('Popular Channels (comma separated)'), $sitechats, L10n::t('List of popular channels, will be displayed at the side and hotlinked for easy joining.') ] diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php index ad25b6f9..e2ef01d2 100644 --- a/jappixmini/jappixmini.php +++ b/jappixmini/jappixmini.php @@ -66,6 +66,7 @@ use Friendica\App; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Core\Protocol; use Friendica\Database\DBA; @@ -323,10 +324,10 @@ function jappixmini_settings(App $a, &$s) if (!$activate) { // load scripts if not yet activated so that password can be saved - $a->page['htmlhead'] .= '' . "\r\n"; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; } $s .= ''; @@ -489,10 +490,10 @@ function jappixmini_script(App $a) return; } - $a->page['htmlhead'] .= '' . "\r\n"; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; $username = PConfig::get(local_user(), 'jappixmini', 'username'); $username = str_replace("'", "\\'", $username); @@ -513,7 +514,7 @@ function jappixmini_script(App $a) // set proxy if necessary $use_proxy = Config::get('jappixmini', 'bosh_proxy'); if ($use_proxy) { - $proxy = $a->get_baseurl() . '/addon/jappixmini/proxy.php'; + $proxy = $a->getBaseURL() . '/addon/jappixmini/proxy.php'; } else { $proxy = ""; } @@ -568,10 +569,10 @@ function jappixmini_login(App $a, &$o) { // create client secret on login to be able to encrypt jabber passwords // for setDB and str_sha1, needed by jappixmini_addon_set_client_secret - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; // for jappixmini_addon_set_client_secret - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; // save hash of password $o = str_replace("
get_baseurl() . '/addon/jappixmini/jappix/AUTHORS">Jappix authors and is distributed under the terms of the GNU Affero General Public License.

'; - $b .= '

You can download the source code of the addon. The rest of Friendica is distributed under compatible licenses and can be retrieved from https://github.com/friendica/friendica and https://github.com/friendica/friendica-addons

'; + $b .= '

This site uses the jappixmini addon, which includes Jappix Mini by the Jappix authors and is distributed under the terms of the GNU Affero General Public License.

'; + $b .= '

You can download the source code of the addon. The rest of Friendica is distributed under compatible licenses and can be retrieved from https://github.com/friendica/friendica and https://github.com/friendica/friendica-addons

'; } diff --git a/jappixmini/lang/cs/messages.po b/jappixmini/lang/cs/messages.po index 332a5e85..6db4e459 100644 --- a/jappixmini/lang/cs/messages.po +++ b/jappixmini/lang/cs/messages.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2018-08-16 10:11+0000\n" +"PO-Revision-Date: 2018-09-12 12:50+0000\n" "Last-Translator: Aditoo\n" "Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" @@ -36,7 +36,7 @@ msgstr "Nevkládejte Jappixmini Chat-Widget do webového rozhraní" #: jappixmini.php:274 msgid "Jabber username" -msgstr "Jabber uživatelské jméno" +msgstr "Uživatelské jméno Jabber" #: jappixmini.php:277 msgid "Jabber server" @@ -48,11 +48,11 @@ msgstr "Jabber BOSH host" #: jappixmini.php:285 msgid "Jabber password" -msgstr "Jabber heslo" +msgstr "Heslo Jabber" #: jappixmini.php:290 msgid "Encrypt Jabber password with Friendica password (recommended)" -msgstr "Zašifrovat Jabber heslo s heslem Friendica (doporučeno)" +msgstr "Zašifrovat heslo Jabber heslem Friendica (doporučeno)" #: jappixmini.php:293 msgid "Friendica password" @@ -60,11 +60,11 @@ msgstr "Heslo Friendica" #: jappixmini.php:296 msgid "Approve subscription requests from Friendica contacts automatically" -msgstr "Automaticky schválit požadavek na členství od kontaktů Friendica." +msgstr "Automaticky schválit požadavek o odběr od kontaktů Friendica." #: jappixmini.php:299 msgid "Subscribe to Friendica contacts automatically" -msgstr "Automaticky zaslat požadavek na členství kontaktům Friendica." +msgstr "Automaticky odebírat od kontaktů Friendica." #: jappixmini.php:302 msgid "Purge internal list of jabber addresses of contacts" diff --git a/jappixmini/lang/cs/strings.php b/jappixmini/lang/cs/strings.php index 154c5019..4fe5d352 100644 --- a/jappixmini/lang/cs/strings.php +++ b/jappixmini/lang/cs/strings.php @@ -9,14 +9,14 @@ function string_plural_select_cs($n){ $a->strings["Jappix Mini addon settings"] = "Nastavení rozšíření Jappix Mini"; $a->strings["Activate addon"] = "Aktivovat doplněk"; $a->strings["Do not insert the Jappixmini Chat-Widget into the webinterface"] = "Nevkládejte Jappixmini Chat-Widget do webového rozhraní"; -$a->strings["Jabber username"] = "Jabber uživatelské jméno"; +$a->strings["Jabber username"] = "Uživatelské jméno Jabber"; $a->strings["Jabber server"] = "Jabber server"; $a->strings["Jabber BOSH host"] = "Jabber BOSH host"; -$a->strings["Jabber password"] = "Jabber heslo"; -$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "Zašifrovat Jabber heslo s heslem Friendica (doporučeno)"; +$a->strings["Jabber password"] = "Heslo Jabber"; +$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "Zašifrovat heslo Jabber heslem Friendica (doporučeno)"; $a->strings["Friendica password"] = "Heslo Friendica"; -$a->strings["Approve subscription requests from Friendica contacts automatically"] = "Automaticky schválit požadavek na členství od kontaktů Friendica."; -$a->strings["Subscribe to Friendica contacts automatically"] = "Automaticky zaslat požadavek na členství kontaktům Friendica."; +$a->strings["Approve subscription requests from Friendica contacts automatically"] = "Automaticky schválit požadavek o odběr od kontaktů Friendica."; +$a->strings["Subscribe to Friendica contacts automatically"] = "Automaticky odebírat od kontaktů Friendica."; $a->strings["Purge internal list of jabber addresses of contacts"] = "Očistit interní seznam jabber adres kontaktů"; $a->strings["Submit"] = "Odeslat"; $a->strings["Add contact"] = "Přidat kontakt"; diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php index 28903f87..2203c9bf 100644 --- a/js_upload/js_upload.php +++ b/js_upload/js_upload.php @@ -17,6 +17,7 @@ use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Logger; function js_upload_install() { Addon::registerHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form'); @@ -38,8 +39,8 @@ function js_upload_form(&$a,&$b) { $b['default_upload'] = false; - $b['addon_text'] .= ''; - $b['addon_text'] .= ''; + $b['addon_text'] .= ''; + $b['addon_text'] .= ''; $upload_msg = L10n::t('Select files for upload'); $drop_msg = L10n::t('Drop files here to upload'); @@ -159,7 +160,7 @@ function js_upload_post_init(&$a,&$b) { $a->data['upload_jsonresponse'] = htmlspecialchars(json_encode($result), ENT_NOQUOTES); if(isset($result['error'])) { - logger('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'] , 'LOGGER_DEBUG'); + Logger::log('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'] , Logger::DEBUG); echo json_encode($result); killme(); } @@ -181,8 +182,8 @@ function js_upload_post_file(&$a,&$b) { function js_upload_post_end(&$a,&$b) { -logger('upload_post_end'); - if(x($a->data,'upload_jsonresponse')) { +Logger::log('upload_post_end'); + if(!empty($a->data['upload_jsonresponse'])) { echo $a->data['upload_jsonresponse']; killme(); } diff --git a/krynn/krynn.php b/krynn/krynn.php index 47372926..97871c3a 100644 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -11,6 +11,7 @@ */ use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; function krynn_install() { @@ -35,7 +36,7 @@ function krynn_install() { Addon::registerHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings'); Addon::registerHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); - logger("installed krynn"); + Logger::log("installed krynn"); } @@ -54,7 +55,7 @@ function krynn_uninstall() { Addon::unregisterHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); - logger("removed krynn"); + Logger::log("removed krynn"); } @@ -70,7 +71,7 @@ function krynn_post_hook($a, &$item) { * */ - logger('krynn invoked'); + Logger::log('krynn invoked'); if(! local_user()) /* non-zero if this is a logged in user of this system */ return; @@ -141,7 +142,7 @@ function krynn_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index b89c32df..512ac840 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -12,6 +12,7 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\L10n; use Friendica\Core\PConfig; +use Friendica\Core\Renderer; /* Define the hooks we want to use * that is, we have settings, we need to save the settings and we want @@ -50,8 +51,8 @@ function langfilter_addon_settings(App $a, &$s) $minconfidence = PConfig::get(local_user(), 'langfilter', 'minconfidence') * 100; $minlength = PConfig::get(local_user(), 'langfilter', 'minlength'); - $t = get_markup_template("settings.tpl", "addon/langfilter/"); - $s .= replace_macros($t, [ + $t = Renderer::getMarkupTemplate("settings.tpl", "addon/langfilter/"); + $s .= Renderer::replaceMacros($t, [ '$title' => L10n::t("Language Filter"), '$intro' => L10n::t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them.'), '$enabled' => ['langfilter_enable', L10n::t('Use the language filter'), $enable_checked, ''], @@ -78,7 +79,7 @@ function langfilter_addon_settings_post(App $a, &$b) if (!empty($_POST['langfilter-settings-submit'])) { PConfig::set(local_user(), 'langfilter', 'languages', trim($_POST['langfilter_languages'])); - $enable = (x($_POST, 'langfilter_enable') ? intval($_POST['langfilter_enable']) : 0); + $enable = (!empty($_POST['langfilter_enable']) ? intval($_POST['langfilter_enable']) : 0); $disable = 1 - $enable; PConfig::set(local_user(), 'langfilter', 'disable', $disable); $minconfidence = 0 + $_POST['langfilter_minconfidence']; @@ -121,7 +122,7 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data) // Never filter own messages // TODO: find a better way to extract this - $logged_user_profile = $a->get_baseurl() . '/profile/' . $a->user['nickname']; + $logged_user_profile = $a->getBaseURL() . '/profile/' . $a->user['nickname']; if ($logged_user_profile == $hook_data['item']['author-link']) { return; } @@ -163,6 +164,10 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data) break; } + if (empty($iso2)) { + return; + } + $lang = Text_LanguageDetect_ISO639::code2ToName($iso2); } else { $opts = $hook_data['item']['postopts']; diff --git a/ldapauth/README b/ldapauth/README deleted file mode 100644 index 03e8b0d4..00000000 --- a/ldapauth/README +++ /dev/null @@ -1,38 +0,0 @@ -Authenticate a user against an LDAP directory -Useful for Windows Active Directory and other LDAP-based organisations -to maintain a single password across the organisation. -Optionally authenticates only if a member of a given group in the directory. - -By default, the person must have registered with Friendica using the normal registration -procedures in order to have a Friendica user record, contact, and profile. -However, it's possible with an option to automate the creation of a Friendica basic account. - -Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site -ldap.conf file to the signing cert for your LDAP server. - -The configuration options for this module may be set in the config/addon.ini.php file -e.g.: - - [ldapauth] - // ldap hostname server - required - ldap_server = host.example.com - // dn to search users - required - ldap_searchdn = ou=users,dc=example,dc=com - // attribute to find username - required - ldap_userattr = uid - - // admin dn - optional - only if ldap server dont have anonymous access - ldap_binddn = cn=admin,dc=example,dc=com - // admin password - optional - only if ldap server dont have anonymous access - ldap_bindpw = password - - // for create Friendica account if user exist in ldap - // required an email and a simple (beautiful) nickname on user ldap object - // active account creation - optional - default none - ldap_autocreateaccount = true - // attribute to get email - optional - default : 'mail' - ldap_autocreateaccount_emailattribute = mail - // attribute to get nickname - optional - default : 'givenName' - ldap_autocreateaccount_nameattribute = givenName - -...etc. diff --git a/ldapauth/README.md b/ldapauth/README.md new file mode 100644 index 00000000..f37bb9d5 --- /dev/null +++ b/ldapauth/README.md @@ -0,0 +1,49 @@ +Authenticate a user against an LDAP directory +=== + +Useful for Windows Active Directory and other LDAP-based organisations +to maintain a single password across the organisation. +Optionally authenticates only if a member of a given group in the directory. + +By default, the person must have registered with Friendica using the normal registration +procedures in order to have a Friendica user record, contact, and profile. +However, it's possible with an option to automate the creation of a Friendica basic account. + +Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site +ldap.conf file to the signing cert for your LDAP server. + +The configuration options for this module may be set in the `config/addon.config.php` file +e.g.: + + 'ldapauth' => [ + // ldap hostname server - required + 'ldap_server' => '', + + // admin dn - optional - only if ldap server dont have anonymous access + 'ldap_binddn' => '', + + // admin password - optional - only if ldap server dont have anonymous access + 'ldap_bindpw' => '', + + // dn to search users - required + 'ldap_searchdn' => '', + + // attribute to find username - required + 'ldap_userattr' => '', + + // DN of the group whose member can auth on Friendica - optional + 'ldap_group' => '', + + // To create Friendica account if user exists in ldap + // Requires an email and a simple (beautiful) nickname on user ldap object + // active account creation - optional - default true + 'ldap_autocreateaccount' => true, + + // attribute to get email - optional - default : 'mail' + 'ldap_autocreateaccount_emailattribute' => 'mail', + + // attribute to get nickname - optional - default : 'givenName' + 'ldap_autocreateaccount_nameattribute' => 'givenName', + ], + +...etc. diff --git a/ldapauth/config/ldapauth.config.php b/ldapauth/config/ldapauth.config.php new file mode 100644 index 00000000..e89a2b55 --- /dev/null +++ b/ldapauth/config/ldapauth.config.php @@ -0,0 +1,50 @@ + [ + // ldap_server (String) + // ldap hostname server - required + // Example: ldap_server = host.example.com + 'ldap_server' => '', + + // ldap_binddn (String) + // admin dn - optional - only if ldap server dont have anonymous access + // Example: ldap_binddn = cn=admin,dc=example,dc=com + 'ldap_binddn' => '', + + // ldap_bindpw (String) + // admin password - optional - only if ldap server dont have anonymous access + 'ldap_bindpw' => '', + + // ldap_searchdn (String) + // dn to search users - required + // Example: ldap_searchdn = ou=users,dc=example,dc=com + 'ldap_searchdn' => '', + + // ldap_userattr (String) + // attribute to find username - required + // Example: ldap_userattr = uid + 'ldap_userattr' => '', + + // ldap_group (String) + // DN of the group whose member can auth on Friendica - optional + 'ldap_group' => '', + + // ldap_autocreateaccount (Boolean) + // To create Friendica account if user exists in ldap + // Requires an email and a simple (beautiful) nickname on user ldap object + // active account creation - optional - default true + 'ldap_autocreateaccount' => true, + + // ldap_autocreateaccount_emailattribute (String) + // attribute to get email - optional - default : 'mail' + 'ldap_autocreateaccount_emailattribute' => 'mail', + + // ldap_autocreateaccount_nameattribute (String) + // attribute to get nickname - optional - default : 'givenName' + 'ldap_autocreateaccount_nameattribute' => 'givenName', + ], +]; diff --git a/ldapauth/config/ldapauth.ini.php b/ldapauth/config/ldapauth.ini.php deleted file mode 100644 index d707550b..00000000 --- a/ldapauth/config/ldapauth.ini.php +++ /dev/null @@ -1,50 +0,0 @@ -loadConfigFile(__DIR__. '/config/ldapauth.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/ldapauth.config.php'); } function ldapauth_hook_authenticate($a, &$b) @@ -99,28 +100,28 @@ function ldapauth_authenticate($username, $password) $ldap_autocreateaccount_nameattribute = Config::get('ldapauth', 'ldap_autocreateaccount_nameattribute'); if (!(strlen($password) && function_exists('ldap_connect') && strlen($ldap_server))) { - logger("ldapauth: not configured or missing php-ldap module"); + Logger::log("ldapauth: not configured or missing php-ldap module"); return false; } $connect = @ldap_connect($ldap_server); if ($connect === false) { - logger("ldapauth: could not connect to $ldap_server"); + Logger::log("ldapauth: could not connect to $ldap_server"); return false; } @ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3); @ldap_set_option($connect, LDAP_OPT_REFERRALS, 0); if ((@ldap_bind($connect, $ldap_binddn, $ldap_bindpw)) === false) { - logger("ldapauth: could not bind $ldap_server as $ldap_binddn"); + Logger::log("ldapauth: could not bind $ldap_server as $ldap_binddn"); return false; } $res = @ldap_search($connect, $ldap_searchdn, $ldap_userattr . '=' . $username); if (!$res) { - logger("ldapauth: $ldap_userattr=$username,$ldap_searchdn not found"); + Logger::log("ldapauth: $ldap_userattr=$username,$ldap_searchdn not found"); return false; } @@ -161,13 +162,13 @@ function ldapauth_authenticate($username, $password) @ldap_close($connect); if ($eno === 32) { - logger("ldapauth: access control group Does Not Exist"); + Logger::log("ldapauth: access control group Does Not Exist"); return false; } elseif ($eno === 16) { - logger('ldapauth: membership attribute does not exist in access control group'); + Logger::log('ldapauth: membership attribute does not exist in access control group'); return false; } else { - logger('ldapauth: error: ' . $err); + Logger::log('ldapauth: error: ' . $err); return false; } } elseif ($r === false) { @@ -189,12 +190,12 @@ function ldap_autocreateaccount($ldap_autocreateaccount, $username, $password, $ try { User::create($arr); - logger("ldapauth: account " . $username . " created"); + Logger::log("ldapauth: account " . $username . " created"); } catch (Exception $ex) { - logger("ldapauth: account " . $username . " was not created ! : " . $ex->getMessage()); + Logger::log("ldapauth: account " . $username . " was not created ! : " . $ex->getMessage()); } } else { - logger("ldapauth: unable to create account, no email or nickname found"); + Logger::log("ldapauth: unable to create account, no email or nickname found"); } } } diff --git a/leistungsschutzrecht/leistungsschutzrecht.php b/leistungsschutzrecht/leistungsschutzrecht.php index c0625ccb..020c3af3 100644 --- a/leistungsschutzrecht/leistungsschutzrecht.php +++ b/leistungsschutzrecht/leistungsschutzrecht.php @@ -7,6 +7,7 @@ */ use Friendica\Core\Addon; use Friendica\Core\Config; +use Friendica\Core\Logger; use Friendica\Util\Network; function leistungsschutzrecht_install() { @@ -163,7 +164,7 @@ function leistungsschutzrecht_cron($a,$b) { if($last) { $next = $last + 86400; if($next > time()) { - logger('poll intervall not reached'); + Logger::log('poll intervall not reached'); return; } } diff --git a/libertree/libertree.php b/libertree/libertree.php index 7fce4b4e..d5aa97e5 100644 --- a/libertree/libertree.php +++ b/libertree/libertree.php @@ -6,29 +6,34 @@ * Author: Tony Baldwin */ +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Database\DBA; use Friendica\Util\Network; -function libertree_install() { - Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local'); - Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send'); - Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets'); - Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings'); - Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post'); - -} -function libertree_uninstall() { - Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local'); - Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send'); - Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets'); - Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings'); - Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post'); +function libertree_install() +{ + Addon::registerHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork'); + Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local'); + Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send'); + Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets'); + Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings'); + Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post'); } +function libertree_uninstall() +{ + Addon::unregisterHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork'); + Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local'); + Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send'); + Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets'); + Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings'); + Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post'); +} function libertree_jot_nets(&$a,&$b) { if(! local_user()) @@ -51,7 +56,7 @@ function libertree_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ @@ -106,7 +111,7 @@ function libertree_settings(&$a,&$s) { function libertree_settings_post(&$a,&$b) { - if(x($_POST,'libertree-submit')) { + if(!empty($_POST['libertree-submit'])) { PConfig::set(local_user(),'libertree','post',intval($_POST['libertree'])); PConfig::set(local_user(),'libertree','post_by_default',intval($_POST['libertree_bydefault'])); @@ -117,6 +122,21 @@ function libertree_settings_post(&$a,&$b) { } +function libertree_hook_fork(App &$a, array &$b) +{ + if ($b['name'] != 'notifier_normal') { + return; + } + + $post = $b['data']; + + if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) || + !strstr($post['postopts'], 'libertree') || ($post['parent'] != $post['id'])) { + $b['execute'] = false; + return; + } +} + function libertree_post_local(&$a,&$b) { // This can probably be changed to allow editing by pointing to a different API endpoint @@ -135,7 +155,7 @@ function libertree_post_local(&$a,&$b) { $ltree_post = intval(PConfig::get(local_user(),'libertree','post')); - $ltree_enable = (($ltree_post && x($_REQUEST,'libertree_enable')) ? intval($_REQUEST['libertree_enable']) : 0); + $ltree_enable = (($ltree_post && !empty($_REQUEST['libertree_enable'])) ? intval($_REQUEST['libertree_enable']) : 0); if ($b['api_source'] && intval(PConfig::get(local_user(),'libertree','post_by_default'))) { $ltree_enable = 1; @@ -157,7 +177,7 @@ function libertree_post_local(&$a,&$b) { function libertree_send(&$a,&$b) { - logger('libertree_send: invoked'); + Logger::log('libertree_send: invoked'); if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { return; @@ -181,7 +201,7 @@ function libertree_send(&$a,&$b) { $ltree_api_token = PConfig::get($b['uid'],'libertree','libertree_api_token'); $ltree_url = PConfig::get($b['uid'],'libertree','libertree_url'); $ltree_blog = "$ltree_url/api/v1/posts/create/?token=$ltree_api_token"; - $ltree_source = $a->get_hostname(); + $ltree_source = $a->getHostName(); if ($b['app'] != "") $ltree_source .= " (".$b['app'].")"; @@ -231,7 +251,7 @@ function libertree_send(&$a,&$b) { // 'token' => $ltree_api_token ]; - $result = Network::post($ltree_blog, $params); - logger('libertree: ' . $result); + $result = Network::post($ltree_blog, $params)->getBody(); + Logger::log('libertree: ' . $result); } } diff --git a/libravatar/README.md b/libravatar/README.md index 33c3679c..bcc0f824 100644 --- a/libravatar/README.md +++ b/libravatar/README.md @@ -23,14 +23,18 @@ If no avatar was found for an email Libravatar can create some pseudo-random gen See examples at [Libravatar][1]. ## Alternative Configuration -Open the config/local.ini.php file and add "libravatar" to the list of activated addons: +Open the `config/local.config.php` file and add "libravatar" to the list of activated addons: - [system] - addon = ...,libravatar + 'system' => [ + ... + 'addon' => '...,libravatar' + ... + ] -You can add one configuration variables for the addon to the config/addon.ini.php file: +You can add one configuration variables for the addon to the `config/addon.config.php` file: - [libravatar] - default_avatar = identicon + 'libravatar' => [ + 'default_avatar' => 'identicon', + ], [1]: http://wiki.libravatar.org/api/ "See API documentation at Libravatar for more information" diff --git a/libravatar/config/libravatar.config.php b/libravatar/config/libravatar.config.php new file mode 100644 index 00000000..7f4f50f6 --- /dev/null +++ b/libravatar/config/libravatar.config.php @@ -0,0 +1,18 @@ + [ + // default_avatar (String) + // If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash. + // You can choose between these presets: + // - mm : (mystery-man) a static image + // - identicon: a generated geometric pattern based on email hash + // - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash + // - wavatar : faces with different features and backgrounds based on email hash + // - retro : 8-bit arcade-styled pixelated faces based on email hash + 'default_avatar' => 'identicon', + ], +]; diff --git a/libravatar/config/libravatar.ini.php b/libravatar/config/libravatar.ini.php deleted file mode 100644 index e3631204..00000000 --- a/libravatar/config/libravatar.ini.php +++ /dev/null @@ -1,18 +0,0 @@ -, 2014-2015 +# Aditoo, 2018 +# michal_s , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:41+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-09-12 12:54+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: libravatar.php:14 msgid "Could NOT install Libravatar successfully.
It requires PHP >= 5.3" -msgstr "Libravatar není možné úspěšně nainstalovat .
Vyžaduje PHP >= 5.3" +msgstr "Libravatar NENÍ možné úspěšně nainstalovat.
Vyžaduje PHP >= 5.3" #: libravatar.php:73 msgid "generic profile image" @@ -45,16 +46,16 @@ msgstr "tvář v retro arkádovém stylu" #: libravatar.php:82 msgid "Warning" -msgstr "Omezení" +msgstr "Varování" #: libravatar.php:83 #, php-format msgid "Your PHP version %s is lower than the required PHP >= 5.3." -msgstr "Vaše PHP verze %s je nižší než požadovaná PHP >= 5.3." +msgstr "Vaše verze PHP %s je nižší než požadovaná: PHP >= 5.3." #: libravatar.php:84 msgid "This addon is not functional on your server." -msgstr "Tento doplněk není funkční na Vašem serveru." +msgstr "Tento doplněk není na Vašem serveru funkční." #: libravatar.php:93 msgid "Information" @@ -65,7 +66,7 @@ msgid "" "Gravatar addon is installed. Please disable the Gravatar addon.
The " "Libravatar addon will fall back to Gravatar if nothing was found at " "Libravatar." -msgstr "Gravatar doplněk je nainstalován. Prosím zakažte doplněk Gravatar.
Libravatar doplněk se vrátí k doplňku Gravatar, pokud na Libravataru nebude nic nalezeno." +msgstr "Doplněk Gravatar je nainstalován. Prosím zakažte doplněk Gravatar.
Doplněk Libravatar se přepne na Gravatar, pokud na Libravataru nebude nic nalezeno." #: libravatar.php:99 msgid "Submit" @@ -73,11 +74,11 @@ msgstr "Odeslat" #: libravatar.php:100 msgid "Default avatar image" -msgstr "Defaultní obrázek avataru" +msgstr "Výchozí avatarový obrázek" #: libravatar.php:100 msgid "Select default avatar image if none was found. See README" -msgstr "Vyberte defaultní avatar obrázek pokud nebyl žádný nalezen. Více viz. soubor README." +msgstr "Nastavte výchozí avatarový obrázek, pokud není žádný nalezen. Více viz. soubor README." #: libravatar.php:112 msgid "Libravatar settings updated." diff --git a/libravatar/lang/cs/strings.php b/libravatar/lang/cs/strings.php index e8ad7931..9d47c544 100644 --- a/libravatar/lang/cs/strings.php +++ b/libravatar/lang/cs/strings.php @@ -2,21 +2,22 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ - return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; + $n = intval($n); + return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; -$a->strings["Could NOT install Libravatar successfully.
It requires PHP >= 5.3"] = "Libravatar není možné úspěšně nainstalovat .
Vyžaduje PHP >= 5.3"; +$a->strings["Could NOT install Libravatar successfully.
It requires PHP >= 5.3"] = "Libravatar NENÍ možné úspěšně nainstalovat.
Vyžaduje PHP >= 5.3"; $a->strings["generic profile image"] = "generický profilový obrázek"; $a->strings["random geometric pattern"] = "náhodný geometrický vzor"; $a->strings["monster face"] = "tvář příšery"; $a->strings["computer generated face"] = "počítačově generovaná tvář"; $a->strings["retro arcade style face"] = "tvář v retro arkádovém stylu"; -$a->strings["Warning"] = "Omezení"; -$a->strings["Your PHP version %s is lower than the required PHP >= 5.3."] = "Vaše PHP verze %s je nižší než požadovaná PHP >= 5.3."; -$a->strings["This addon is not functional on your server."] = "Tento doplněk není funkční na Vašem serveru."; +$a->strings["Warning"] = "Varování"; +$a->strings["Your PHP version %s is lower than the required PHP >= 5.3."] = "Vaše verze PHP %s je nižší než požadovaná: PHP >= 5.3."; +$a->strings["This addon is not functional on your server."] = "Tento doplněk není na Vašem serveru funkční."; $a->strings["Information"] = "Informace"; -$a->strings["Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "Gravatar doplněk je nainstalován. Prosím zakažte doplněk Gravatar.
Libravatar doplněk se vrátí k doplňku Gravatar, pokud na Libravataru nebude nic nalezeno."; +$a->strings["Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "Doplněk Gravatar je nainstalován. Prosím zakažte doplněk Gravatar.
Doplněk Libravatar se přepne na Gravatar, pokud na Libravataru nebude nic nalezeno."; $a->strings["Submit"] = "Odeslat"; -$a->strings["Default avatar image"] = "Defaultní obrázek avataru"; -$a->strings["Select default avatar image if none was found. See README"] = "Vyberte defaultní avatar obrázek pokud nebyl žádný nalezen. Více viz. soubor README."; +$a->strings["Default avatar image"] = "Výchozí avatarový obrázek"; +$a->strings["Select default avatar image if none was found. See README"] = "Nastavte výchozí avatarový obrázek, pokud není žádný nalezen. Více viz. soubor README."; $a->strings["Libravatar settings updated."] = "Nastavení Libravatar aktualizováno."; diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index ee283f0c..d6ccb718 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -7,10 +7,15 @@ */ use Friendica\App; +use Friendica\BaseModule; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Logger; +use Friendica\Core\Renderer; use Friendica\Database\DBA; +use Friendica\Util\Security; +use Friendica\Util\Strings; /** * Installs the addon hook @@ -19,7 +24,7 @@ function libravatar_install() { Addon::registerHook('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config'); Addon::registerHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup'); - logger("registered libravatar in avatar_lookup hook"); + Logger::log("registered libravatar in avatar_lookup hook"); } /** @@ -29,12 +34,12 @@ function libravatar_uninstall() { Addon::unregisterHook('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config'); Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup'); - logger("unregistered libravatar in avatar_lookup hook"); + Logger::log("unregistered libravatar in avatar_lookup hook"); } function libravatar_load_config(App $a) { - $a->loadConfigFile(__DIR__. '/config/libravatar.ini.php'); + $a->loadConfigFile(__DIR__ . '/config/libravatar.config.php'); } /** @@ -71,7 +76,7 @@ function libravatar_lookup($a, &$b) */ function libravatar_addon_admin(&$a, &$o) { - $t = get_markup_template("admin.tpl", "addon/libravatar"); + $t = Renderer::getMarkupTemplate("admin.tpl", "addon/libravatar"); $default_avatar = Config::get('libravatar', 'default_avatar'); @@ -106,8 +111,8 @@ function libravatar_addon_admin(&$a, &$o) } // output Libravatar settings - $o .= ''; - $o .= replace_macros( $t, [ + $o .= ''; + $o .= Renderer::replaceMacros( $t, [ '$submit' => L10n::t('Save Settings'), '$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found. See README'), $default_avatars], ]); @@ -118,9 +123,9 @@ function libravatar_addon_admin(&$a, &$o) */ function libravatar_addon_admin_post(&$a) { - check_form_security_token('libravatarrsave'); + BaseModule::checkFormSecurityToken('libravatarrsave'); - $default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon'); + $default_avatar = (!empty($_POST['avatar']) ? Strings::escapeTags(trim($_POST['avatar'])) : 'identicon'); Config::set('libravatar', 'default_avatar', $default_avatar); info(L10n::t('Libravatar settings updated.') .EOL); } diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 669788fd..dc0c0fd6 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -11,9 +11,11 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; +use Friendica\Util\XML; function ljpost_install() { Addon::registerHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); @@ -54,7 +56,7 @@ function ljpost_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ @@ -103,7 +105,7 @@ function ljpost_settings(&$a,&$s) { function ljpost_settings_post(&$a,&$b) { - if(x($_POST,'ljpost-submit')) { + if(!empty($_POST['ljpost-submit'])) { PConfig::set(local_user(),'ljpost','post',intval($_POST['ljpost'])); PConfig::set(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault'])); @@ -129,7 +131,7 @@ function ljpost_post_local(&$a,&$b) { $lj_post = intval(PConfig::get(local_user(),'ljpost','post')); - $lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0); + $lj_enable = (($lj_post && !empty($_REQUEST['ljpost_enable'])) ? intval($_REQUEST['ljpost_enable']) : 0); if($b['api_source'] && intval(PConfig::get(local_user(),'ljpost','post_by_default'))) $lj_enable = 1; @@ -168,20 +170,20 @@ function ljpost_send(&$a,&$b) { if($x && strlen($x[0]['timezone'])) $tz = $x[0]['timezone']; - $lj_username = xmlify(PConfig::get($b['uid'],'ljpost','lj_username')); - $lj_password = xmlify(PConfig::get($b['uid'],'ljpost','lj_password')); - $lj_journal = xmlify(PConfig::get($b['uid'],'ljpost','lj_journal')); + $lj_username = XML::escape(PConfig::get($b['uid'],'ljpost','lj_username')); + $lj_password = XML::escape(PConfig::get($b['uid'],'ljpost','lj_password')); + $lj_journal = XML::escape(PConfig::get($b['uid'],'ljpost','lj_journal')); // if(! $lj_journal) // $lj_journal = $lj_username; - $lj_blog = xmlify(PConfig::get($b['uid'],'ljpost','lj_blog')); + $lj_blog = XML::escape(PConfig::get($b['uid'],'ljpost','lj_blog')); if(! strlen($lj_blog)) - $lj_blog = xmlify('http://www.livejournal.com/interface/xmlrpc'); + $lj_blog = XML::escape('http://www.livejournal.com/interface/xmlrpc'); if($lj_username && $lj_password && $lj_blog) { - $title = xmlify($b['title']); + $title = XML::escape($b['title']); $post = BBCode::convert($b['body']); - $post = xmlify($post); + $post = XML::escape($post); $tags = ljpost_get_tags($b['tag']); $date = DateTimeFormat::convert($b['created'], $tz); @@ -231,12 +233,12 @@ function ljpost_send(&$a,&$b) { EOT; - logger('ljpost: data: ' . $xml, LOGGER_DATA); + Logger::log('ljpost: data: ' . $xml, Logger::DATA); if ($lj_blog !== 'test') { - $x = Network::post($lj_blog, $xml, ["Content-Type: text/xml"]); + $x = Network::post($lj_blog, $xml, ["Content-Type: text/xml"])->getBody(); } - logger('posted to livejournal: ' . ($x) ? $x : '', LOGGER_DEBUG); + Logger::log('posted to livejournal: ' . ($x) ? $x : '', Logger::DEBUG); } } diff --git a/mahjongg/mahjongg.php b/mahjongg/mahjongg.php index 3567792b..6d772a93 100644 --- a/mahjongg/mahjongg.php +++ b/mahjongg/mahjongg.php @@ -26,7 +26,7 @@ function mahjongg_module() {} function mahjongg_content(&$a) { -$baseurl = $a->get_baseurl() . '/addon/mahjongg'; +$baseurl = $a->getBaseURL() . '/addon/mahjongg'; $o .= <<< EOT

diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index 7aad5861..6b693f6c 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -10,7 +10,9 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; +use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\Util\Network; use Friendica\Model\Item; @@ -73,28 +75,28 @@ function mailstream_module() {} function mailstream_addon_admin(&$a,&$o) { $frommail = Config::get('mailstream', 'frommail'); - $template = get_markup_template('admin.tpl', 'addon/mailstream/'); + $template = Renderer::getMarkupTemplate('admin.tpl', 'addon/mailstream/'); $config = ['frommail', L10n::t('From Address'), $frommail, L10n::t('Email address that stream items will appear to be from.')]; - $o .= replace_macros($template, [ + $o .= Renderer::replaceMacros($template, [ '$frommail' => $config, '$submit' => L10n::t('Save Settings')]); } function mailstream_addon_admin_post ($a) { - if (x($_POST, 'frommail')) { + if (!empty($_POST['frommail'])) { Config::set('mailstream', 'frommail', $_POST['frommail']); } } function mailstream_generate_id($a, $uri) { // http://www.jwz.org/doc/mid.html - $host = $a->get_hostname(); + $host = $a->getHostName(); $resource = hash('md5', $uri); $message_id = "<" . $resource . "@" . $host . ">"; - logger('mailstream: Generated message ID ' . $message_id . ' for URI ' . $uri, LOGGER_DEBUG); + Logger::log('mailstream: Generated message ID ' . $message_id . ' for URI ' . $uri, Logger::DEBUG); return $message_id; } @@ -123,16 +125,16 @@ function mailstream_post_hook(&$a, &$item) { intval($item['contact-id']), DBA::escape($item['uri']), DBA::escape($message_id)); $r = q('SELECT * FROM `mailstream_item` WHERE `uid` = %d AND `contact-id` = %d AND `uri` = "%s"', intval($item['uid']), intval($item['contact-id']), DBA::escape($item['uri'])); if (count($r) != 1) { - logger('mailstream_post_remote_hook: Unexpected number of items returned from mailstream_item', LOGGER_INFO); + Logger::log('mailstream_post_remote_hook: Unexpected number of items returned from mailstream_item', Logger::INFO); return; } $ms_item = $r[0]; - logger('mailstream_post_remote_hook: created mailstream_item ' + Logger::log('mailstream_post_remote_hook: created mailstream_item ' . $ms_item['id'] . ' for item ' . $item['uri'] . ' ' - . $item['uid'] . ' ' . $item['contact-id'], LOGGER_DATA); + . $item['uid'] . ' ' . $item['contact-id'], Logger::DATA); $user = mailstream_get_user($item['uid']); if (!$user) { - logger('mailstream_post_remote_hook: no user ' . $item['uid'], LOGGER_INFO); + Logger::log('mailstream_post_remote_hook: no user ' . $item['uid'], Logger::INFO); return; } mailstream_send($a, $ms_item['message-id'], $item, $user); @@ -141,7 +143,7 @@ function mailstream_post_hook(&$a, &$item) { function mailstream_get_user($uid) { $r = q('SELECT * FROM `user` WHERE `uid` = %d', intval($uid)); if (count($r) != 1) { - logger('mailstream_post_remote_hook: Unexpected number of users returned', LOGGER_INFO); + Logger::log('mailstream_post_remote_hook: Unexpected number of users returned', Logger::INFO); return; } return $r[0]; @@ -152,7 +154,7 @@ function mailstream_do_images($a, &$item, &$attachments) { return; } $attachments = []; - $baseurl = $a->get_baseurl(); + $baseurl = $a->getBaseURL(); preg_match_all("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", $item["body"], $matches1); preg_match_all("/\[img\](.*?)\[\/img\]/ism", $item["body"], $matches2); foreach (array_merge($matches1[3], $matches2[1]) as $url) { @@ -287,10 +289,10 @@ function mailstream_send($a, $message_id, $item, $user) { } $mail->IsHTML(true); $mail->CharSet = 'utf-8'; - $template = get_markup_template('mail.tpl', 'addon/mailstream/'); + $template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/'); $item['body'] = BBCode::convert($item['body']); - $item['url'] = $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item['id']; - $mail->Body = replace_macros($template, [ + $item['url'] = $a->getBaseURL() . '/display/' . $user['nickname'] . '/' . $item['id']; + $mail->Body = Renderer::replaceMacros($template, [ '$upstream' => L10n::t('Upstream'), '$local' => L10n::t('Local'), '$item' => $item]); @@ -298,11 +300,11 @@ function mailstream_send($a, $message_id, $item, $user) { if (!$mail->Send()) { throw new Exception($mail->ErrorInfo); } - logger('mailstream_send sent message ' . $mail->MessageID . ' ' . $mail->Subject, LOGGER_DEBUG); + Logger::log('mailstream_send sent message ' . $mail->MessageID . ' ' . $mail->Subject, Logger::DEBUG); } catch (phpmailerException $e) { - logger('mailstream_send PHPMailer exception sending message ' . $message_id . ': ' . $e->errorMessage(), LOGGER_INFO); + Logger::log('mailstream_send PHPMailer exception sending message ' . $message_id . ': ' . $e->errorMessage(), Logger::INFO); } catch (Exception $e) { - logger('mailstream_send exception sending message ' . $message_id . ': ' . $e->getMessage(), LOGGER_INFO); + Logger::log('mailstream_send exception sending message ' . $message_id . ': ' . $e->getMessage(), Logger::INFO); } // In case of failure, still set the item to completed. Otherwise // we'll just try to send it over and over again and it'll fail @@ -331,10 +333,10 @@ function mailstream_cron($a, $b) { // mailstream_post_remote_hook fails for some reason will this get // used, and in that case it's worth holding off a bit anyway. $ms_item_ids = q("SELECT `mailstream_item`.`message-id`, `mailstream_item`.`uri`, `item`.`id` FROM `mailstream_item` JOIN `item` ON (`mailstream_item`.`uid` = `item`.`uid` AND `mailstream_item`.`uri` = `item`.`uri` AND `mailstream_item`.`contact-id` = `item`.`contact-id`) WHERE `mailstream_item`.`completed` IS NULL AND `mailstream_item`.`created` < DATE_SUB(NOW(), INTERVAL 1 HOUR) AND `item`.`visible` = 1 ORDER BY `mailstream_item`.`created` LIMIT 100"); - logger('mailstream_cron processing ' . count($ms_item_ids) . ' items', LOGGER_DEBUG); + Logger::log('mailstream_cron processing ' . count($ms_item_ids) . ' items', Logger::DEBUG); foreach ($ms_item_ids as $ms_item_id) { if (!$ms_item_id['message-id'] || !strlen($ms_item_id['message-id'])) { - logger('mailstream_cron: Item ' . $ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id', LOGGER_INFO); + Logger::log('mailstream_cron: Item ' . $ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id', Logger::INFO); } $item = Item::selectFirst([], ['id' => $ms_item_id['id']]); $users = q("SELECT * FROM `user` WHERE `uid` = %d", intval($item['uid'])); @@ -343,7 +345,7 @@ function mailstream_cron($a, $b) { mailstream_send($a, $ms_item_id['message-id'], $item, $user); } else { - logger('mailstream_cron: Unable to find item ' . $ms_item_id['id'], LOGGER_INFO); + Logger::log('mailstream_cron: Unable to find item ' . $ms_item_id['id'], Logger::INFO); q("UPDATE `mailstream_item` SET `completed` = now() WHERE `message-id` = %d", intval($ms_item['message-id'])); } } @@ -355,8 +357,8 @@ function mailstream_addon_settings(&$a,&$s) { $address = PConfig::get(local_user(), 'mailstream', 'address'); $nolikes = PConfig::get(local_user(), 'mailstream', 'nolikes'); $attachimg= PConfig::get(local_user(), 'mailstream', 'attachimg'); - $template = get_markup_template('settings.tpl', 'addon/mailstream/'); - $s .= replace_macros($template, [ + $template = Renderer::getMarkupTemplate('settings.tpl', 'addon/mailstream/'); + $s .= Renderer::replaceMacros($template, [ '$enabled' => [ 'mailstream_enabled', L10n::t('Enabled'), @@ -412,5 +414,5 @@ function mailstream_tidy() { foreach ($r as $rr) { q('DELETE FROM mailstream_item WHERE id = %d', intval($rr['id'])); } - logger('mailstream_tidy: deleted ' . count($r) . ' old items', LOGGER_DEBUG); + Logger::log('mailstream_tidy: deleted ' . count($r) . ' old items', Logger::DEBUG); } diff --git a/mastodoncustomemojis/mastodoncustomemojis.php b/mastodoncustomemojis/mastodoncustomemojis.php index 6ba96f11..1da12dc8 100644 --- a/mastodoncustomemojis/mastodoncustomemojis.php +++ b/mastodoncustomemojis/mastodoncustomemojis.php @@ -6,6 +6,7 @@ * Version: 1.0 * Author: Hypolite Petovan * Author: Roland Haeder + * Status: Unsupported */ use Friendica\App; @@ -54,8 +55,8 @@ HTML; function mastodoncustomemojis_put_item_in_cache(App $a, array &$hook_data) { - // Mastodon uses OStatus, skipping other network protocols - if (empty($hook_data['item']['author-link']) || ($hook_data['item']['network'] != Protocol::OSTATUS)) { + // Mastodon uses OStatus and ActivityPub, skipping other network protocols + if (empty($hook_data['item']['author-link']) || !in_array($hook_data['item']['network'], [Protocol::OSTATUS, Protocol::ACTIVITYPUB])) { return; } @@ -77,7 +78,7 @@ function mastodoncustomemojis_get_custom_emojis_for_author($author_link) if (empty($return) || Config::get('system', 'ignore_cache')) { $return = mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url); - Cache::set($cache_key, $return, empty($return['texts']) ? Cache::HALF_HOUR : Cache::WEEK); + Cache::set($cache_key, $return, empty($return['texts']) ? Cache::QUARTER_HOUR : Cache::HOUR); } return $return; @@ -89,15 +90,17 @@ function mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url) $api_url = $api_base_url . '/api/v1/custom_emojis'; - $ret = Network::fetchUrlFull($api_url); + $fetchResult = Network::fetchUrlFull($api_url); - if ($ret['success']) { - $emojis_array = json_decode($ret['body'], true); + if ($fetchResult->isSuccess()) { + $emojis_array = json_decode($fetchResult->getBody(), true); if (is_array($emojis_array) && count($emojis_array)) { foreach ($emojis_array as $emoji) { - $return['texts'][] = ':' . $emoji['shortcode'] . ':'; - $return['icons'][] = ':' . $emoji['shortcode'] . ':'; + if (!empty($emoji['shortcode']) && !empty($emoji['static_url'])) { + $return['texts'][] = ':' . $emoji['shortcode'] . ':'; + $return['icons'][] = ':' . $emoji['shortcode'] . ':'; + } } } } diff --git a/mathjax/README.md b/mathjax/README.md index 19407e86..f5a0388f 100644 --- a/mathjax/README.md +++ b/mathjax/README.md @@ -21,15 +21,19 @@ In case you want to use the CDN you can try the following URL as a quick start http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML In case you don't want or can use the admin panel of Friendica you can activate -the addon by adding _mathjax_ to the list in your config/local.ini.php file +the addon by adding _mathjax_ to the list in your `config/local.config.php` file - [system] - addon = ...,mathjax + 'system' => [ + ... + 'addon' => '...,mathjax' + ... + ] -and then providing the base URL after that in the config/addon.ini.php file +and then providing the base URL after that in the `config/addon.config.php` file - [mathjax] - baseurl = [the URL to your MathJax installation]; + 'mathjax' => [ + 'baseurl' => '[the URL to your MathJax installation]', + ], Usage ===== diff --git a/mathjax/asset/.gitignore b/mathjax/asset/.gitignore new file mode 100644 index 00000000..bc986116 --- /dev/null +++ b/mathjax/asset/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +docs/build/html-mathjax-site +config/local/*.js +!config/local/local.js +unpacked/config/local/*.js +!unpacked/config/local/local.js diff --git a/mathjax/asset/.npmignore b/mathjax/asset/.npmignore new file mode 100644 index 00000000..5caebfb7 --- /dev/null +++ b/mathjax/asset/.npmignore @@ -0,0 +1,7 @@ +.DS_Store +docs/build/html-mathjax-site +config/local/*.js +!config/local/local.js +unpacked/config/local/*.js +!unpacked/config/local/local.js +fonts/HTML-CSS/TeX/png diff --git a/mathjax/asset/.travis.yml b/mathjax/asset/.travis.yml new file mode 100644 index 00000000..f7f8b6e5 --- /dev/null +++ b/mathjax/asset/.travis.yml @@ -0,0 +1,17 @@ +language: node_js +node_js: +- stable +sudo: false +script: +- npm install +- npm test +branches: + only: + - "/^\\d+\\.\\d+/" +deploy: + provider: npm + email: manager@mathjax.org + api_key: + secure: cTkds6AqvCrkE9lAbBBjyDy7swjQEsGTCvLcjEyJemWH7ciNmtbwQ+Mzpk5bsL1i734CS29fTUBY05bPdwhBXB19yC0LzDfuNd2OKd1GhKa5OUig3d3+iNZEb/bhlEL/N2pM3pNBLT3+HDWBWVPPzDOCgSHYf355WmNlFIxrUtWbQQ7w5cX1d6ZKHVDkO0s9cl9eIQkX5aIKpsQM/N/tfkqPlF3OZuseTg7TU1wL+g6zqtsa0a1uhjXiCSRfDzgi4e2FUg9OBJHInbRho7MoZ9c8NrgCDTqwh1xJVAgi50HZpFAlhw3bBvWMzWLESLKUgmDOQc1/jzq6EhdUY1HMmryHPtvFIlyj0mWH88lZjUOqsCntG+t874ONYGkHF7I5q9VsX5LJNiZzASeXMymA1BP3fC33s/vGXen1H90JpdlGQXQvIXn6ZIQ9UiI1/bONuxVEUghnVRZHLTe2Nhy7s2s0OHTN23PmDVPHSzuM1FjEXXFaza/dGgOfi0ACRBPcqopQ2wxuCVDlmrrL+3r2o4Tp5F3f49KIrqNwO/GSnWX5H7GgxHKSh7CK1rUwqcpTumwYfY1Do/xdlu2D3I/IjZXO9TzDtZYJG1ye0BVTh44cECfBgBIZVmRH56Yjo5MvKEQwSSFfETKW4PKWoahbZIC4V99YWhoRqYqtb+OT0ow= + on: + tags: true diff --git a/mathjax/asset/CONTRIBUTING.md b/mathjax/asset/CONTRIBUTING.md new file mode 100644 index 00000000..a803fc9e --- /dev/null +++ b/mathjax/asset/CONTRIBUTING.md @@ -0,0 +1,259 @@ +# Contributing to MathJax + +You are interested in giving us a hand? That's awesome! We've put together some brief guidelines that should help you get started quickly and easily. + +There are lots and lots of ways to get involved, this document covers: + +* [reporting an issue](#reporting-an-issue) + * [bug reports](#bug-reports) + * [feature requests](#feature-requests) + * [change requests](#change-requests) +* [working on MathJax core](#working-on-mathjax-core) + * [key branches and tags](#key-branches--tags) + * [submitting pull requests](#submitting-pull-requests) + * [testing and quality assurance](#testing-and-quality-assurance) + * [writing documentation](#writing-documentation) + * [translation](#translation) +* [Conduct](#conduct) + + +## Reporting An Issue + +If you're about to raise an issue because you think you've found a +problem with MathJax, or you'd like to make a request for a new +feature in the codebase, or any other reason… please read this first. + +The GitHub issue tracker is the preferred channel for [bug reports](#bug-reports), +[feature requests](#feature-requests), [change requests](#change-requests) and [submitting pull +requests](#submitting-pull-requests), but please respect the following restrictions: + +* Please **search for existing issues**. Help us keep duplicate issues + to a minimum by checking to see if someone has already reported your + problem or requested your idea. + +* Please **do not** use the issue tracker for personal support + requests (use [the MathJax User Group](https://groups.google.com/forum/#!forum/mathjax-users)). + +* Please **be civil**. Keep the discussion on topic and respect the + opinions of others. See also our [Conduct Guidelines](#conduct) + +### Bug Reports + +A bug is a _demonstrable problem_ that is caused by the code in the repository. +Good bug reports are extremely helpful - thank you! + +Guidelines for bug reports: + +1. **Use the GitHub issue search** — check if the issue has already been + reported. + +2. **Check if the issue has been fixed** — look for [closed issues in the + current milestone](https://github.com/MathJax/MathJax/issues?&page=1&state=closed) or try to reproduce it + using the latest `develop` branch. Please note that we only pack MathJax for releases, so on the `develop` branch you have to use `/unpacked/MathJax.js` etc. to test. + +3. **Share a live sample of the problem** — without a live page it is usually impossible to debug problems; see also the Bug Report Template below. + +4. **Isolate the problem** — a live sample is a starting point but if you want to speed things up create a [reduced test + case](http://css-tricks.com/6263-reduced-test-cases/). Be specific about your setup (browser, OS versions etc). Use services like [jsbin](http://jsbin.com), [CodePen](http://codepen.io), [JSfiddle](http://jsfiddle.com) to make collaboration on minimal test cases easier for everyone. Use the unpacked copy of MathJax (`[...]/unpacked/MathJax.js` etc.) for better debugging. + +5. **Include a screenshot/cast as a last resort** — Is your issue about a layout + or design feature / bug but hard to reproduce or isolate? Then please provide a screenshot or screencast. Tools like [LICEcap](http://www.cockos.com/licecap/) or [SauceLabs](http://www.saucelabs.com) allow you to quickly and easily record a screencasts. Make it an animated gif, embed it directly into your GitHub issue -- kapow! + +6. Use the Bug Report template below or [click this + link](https://github.com/MathJax/MathJax/issues/new?title=Bug%3A&body=%23%23%23%20Issue%20Summary%0A%0A%23%23%23%20Steps%20to%20Reproduce%0A%0A1.%20This%20is%20the%20first%20step%0A%0AThis%20is%20a%20bug%20because...%0A%0A%23%23%23%20Technical%20details%0A%0A*%20MathJax%20Version%3A%20master%20-%20latest%20commit%3A%20%20INSERT%20COMMIT%20REF%0A*%20Client%20OS%3A%20%0A*%20Browser%3A%20%0A*%20) + to start creating a bug report with the template automatically. + +A good bug report shouldn't leave others needing to chase you up for +more information. Be sure to include the details of your environment. + +Here is a [real example](https://github.com/mathjax/MathJax/issues/820) + +Template Example ([click to use](https://github.com/MathJax/MathJax/issues/new?title=Bug%3A&body=%23%23%23%20Issue%20Summary%0A%0A%23%23%23%20Steps%20to%20Reproduce%0A%0A1.%20This%20is%20the%20first%20step%0A%0AThis%20is%20a%20bug%20because...%0A%0A%23%23%23%20Technical%20details%0A%0A*%20MathJax%20Version%3A%20master%20-%20latest%20commit%3A%20%20INSERT%20COMMIT%20REF%0A*%20Client%20OS%3A%20%0A*%20Browser%3A%20%0A*%20)): +``` +Short and descriptive example bug report title + +### Issue Summary + +A summary of the issue and the browser/OS environment in which it occurs. If +suitable, include the steps required to reproduce the bug. + +### Steps to Reproduce + +1. This is the first step +2. This is the second step +3. Further steps, etc. + +Any other information you want to share that is relevant to the issue +being reported. Especially, why do you consider this to be a bug? What +do you expect to happen instead? + +### Technical details: + +* MathJax Version: 2.3 (latest commit: f3aaf3a2a3e964df2770dc4aaaa9c87ce5f47e2c) +* Client OS: Mac OS X 10.8.4 +* Browser: Chrome 29.0.1547.57 +``` + + +### Feature Requests + +Feature requests are welcome. Before you submit one be sure to have: + +1. Read the + [Roadmaps](https://github.com/mathjax/MathJax/wiki/Mathjax-roadmap), + **use the GitHub search** and check the feature hasn't already been + requested. +2. Take a moment to think about whether your idea fits with the scope + and aims of the project, or if it might better fit being a [custom + extension](https://github.com/mathjax/MathJax-third-party-extensions). +3. Remember, it's up to *you* to make a strong case to convince the + project's leaders of the merits of this feature. Please provide as + much detail and context as possible, this means explaining the use + case and why it is likely to be common. +4. Clearly indicate whether this is a feature request for MathJax + core, input & output jax, or extensions. + + +### Change Requests + +Change requests cover both architectural and functional changes to how +MathJax works. If you have an idea for a new or different dependency, +a refactor, or an improvement to a feature, etc - please be sure to: + +1. **Use the GitHub search** and check someone else didn't get there first +2. Take a moment to think about the best way to make a case for, and + explain what you're thinking. Are you sure this shouldn't really be + a [bug report](#bug-reports) or a [feature + request](#feature-requests)? Is it really one idea or is it many? + What's the context? What problem are you solving? Why is what you + are suggesting better than what's already there? Does it fit with + the Roadmap? + +## Working on MathJax core + +You want to contribute code? Fantastic! Let's get you started. + +### Key Branches & Tags + +To get it out of the way: + +- **[develop](https://github.com/MathJax/MathJax/tree/develop)** is + the development branch. All work on the next release happens here so + you should generally branch off `develop`. Do **NOT** use this branch + for a production site. +- **[master](https://github.com/MathJax/MathJax)** contains the latest + release of MathJax. This branch may be used in production. Do + **NOT** use this branch to work on MathJax's source. + +### Submitting Pull Requests + +Pull requests are awesome. If you're looking to raise a PR for +something which doesn't have an open issue, please think carefully +about [raising an issue](#reporting-an-issue) which your PR can close, +especially if you're fixing a bug. This makes it more likely that +there will be enough information available for your PR to be properly +tested and merged. + +##### Need Help? + +If you're not completely clear on how to submit / update / *do* Pull +Requests, please check out our [source control +policies](https://github.com/mathjax/MathJax/wiki/Source-control-policies). For +more insights, chech the excellent in depth [Git Workflow +guide](https://github.com/TryGhost/Ghost/wiki/Git-Workflow) from +Ghost, in particular + +* [Ghost Workflow guide: commit messages](https://github.com/TryGhost/Ghost/wiki/Git-workflow#commit-messages) + +### Testing and Quality Assurance + +Never underestimate just how useful quality assurance is. If you're +looking to get involved with the code base and don't know where to +start, checking out and testing a pull request is one of the most +useful things you could do. + +If you want to get involved with testing MathJax, there is a set of QA +Documentation [in our testing +framework](https://github.com/MathJax/MathJax-test). + +Essentially though, [check out the latest develop +branch](#working-on-mathJax-core), take it for a spin, and if you find +anything odd, please follow the [bug report guidelines](#bug-reports) +and let us know! + +#### Checking out a Pull Request + +These are some [excellent +instructions](https://gist.github.com/piscisaureus/3342247) on +configuring your GitHub repository to allow you to checkout pull +requests in the same way as branches: +. + + +### Writing documentation + +MathJax's main documentation can be found at [docs.mathjax.org](http://docs.mathjax.org). +The source of the docs is hosted in the +[mathjax/mathjax-docs](http://github.com/mathjax/mathjax-docs) repo here on GitHub. + +The documentation is generated using [Sphinx-doc](http://sphinx-doc.org/) and hosted on +[Read the docs](http://readthedocs.org). +You can clone the repo and submit pull requests following the +[pull-request](#submitting-pull-requests) guidelines. + + +### Translation + +If you wish to add or update translations of MathJax, please do it on +[TranslateWiki.net](https://translatewiki.net/w/i.php?title=Special:Translate&group=out-mathjax-0-all) +(and while you're there you can help other open source projects, +too, because you're awesome!). + +For bug reports and other questions that don't fit on +TranslateWiki.net, head over to the +[mathjax/mathjax-i18n](https://github.com/mathjax/MathJax-i18n) +repository. + +## Conduct + +We are committed to providing a friendly, safe and welcoming environment for +all, regardless of gender, sexual orientation, disability, ethnicity, religion, +or similar personal characteristic. + +Please be kind and courteous. There's no need to be mean or rude. +Respect that people have differences of opinion and that every design or +implementation choice carries a trade-off and numerous costs. There is seldom +a right answer, merely an optimal answer given a set of values and +circumstances. + +Please keep unstructured critique to a minimum. If you have solid ideas you +want to experiment with, make a fork and see how it works. + +We will exclude you from interaction if you insult, demean or harass anyone. +That is not welcome behaviour. We interpret the term "harassment" as +including the definition in the +[Citizen Code of Conduct](http://citizencodeofconduct.org/); +if you have any lack of clarity about what might be included in that concept, +please read their definition. In particular, we don't tolerate behavior that +excludes people in socially marginalized groups. + +Private harassment is also unacceptable. No matter who you are, if you feel +you have been or are being harassed or made uncomfortable by a community +member, please contact one of the channel ops or any of the +[MathJax](https://github.com/MathJax/MathJax) core team +immediately. Whether you're a regular contributor or a newcomer, we care about +making this community a safe place for you and we've got your back. + +Likewise any spamming, trolling, flaming, baiting or other attention-stealing +behaviour is not welcome. + +We also suggest to read [discourse's +rules](http://blog.discourse.org/2013/03/the-universal-rules-of-civilized-discourse/) + +## References + +* We heavily borrowed from Mozilla and Ghost -- thank you! + * https://github.com/TryGhost/Ghost/blob/master/CONTRIBUTING.md + * https://github.com/mozilla/rust/wiki/Note-development-policy +* https://github.com/jden/CONTRIBUTING.md/blob/master/CONTRIBUTING.md +* http://blog.discourse.org/2013/03/the-universal-rules-of-civilized-discourse/ diff --git a/mathjax/asset/LICENSE b/mathjax/asset/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/mathjax/asset/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/mathjax/asset/MathJax.js b/mathjax/asset/MathJax.js new file mode 100644 index 00000000..c54a1ed2 --- /dev/null +++ b/mathjax/asset/MathJax.js @@ -0,0 +1,19 @@ +/* + * /MathJax.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if(document.getElementById&&document.childNodes&&document.createElement){if(!(window.MathJax&&MathJax.Hub)){if(window.MathJax){window.MathJax={AuthorConfig:window.MathJax}}else{window.MathJax={}}MathJax.isPacked=true;MathJax.version="2.7.5";MathJax.fileversion="2.7.5";MathJax.cdnVersion="2.7.5";MathJax.cdnFileVersions={};(function(d){var b=window[d];if(!b){b=window[d]={}}var e=[];var c=function(f){var g=f.constructor;if(!g){g=function(){}}for(var h in f){if(h!=="constructor"&&f.hasOwnProperty(h)){g[h]=f[h]}}return g};var a=function(){return function(){return arguments.callee.Init.call(this,arguments)}};b.Object=c({constructor:a(),Subclass:function(f,h){var g=a();g.SUPER=this;g.Init=this.Init;g.Subclass=this.Subclass;g.Augment=this.Augment;g.protoFunction=this.protoFunction;g.can=this.can;g.has=this.has;g.isa=this.isa;g.prototype=new this(e);g.prototype.constructor=g;g.Augment(f,h);return g},Init:function(f){var g=this;if(f.length===1&&f[0]===e){return g}if(!(g instanceof f.callee)){g=new f.callee(e)}return g.Init.apply(g,f)||g},Augment:function(f,g){var h;if(f!=null){for(h in f){if(f.hasOwnProperty(h)){this.protoFunction(h,f[h])}}if(f.toString!==this.prototype.toString&&f.toString!=={}.toString){this.protoFunction("toString",f.toString)}}if(g!=null){for(h in g){if(g.hasOwnProperty(h)){this[h]=g[h]}}}return this},protoFunction:function(g,f){this.prototype[g]=f;if(typeof f==="function"){f.SUPER=this.SUPER.prototype}},prototype:{Init:function(){},SUPER:function(f){return f.callee.SUPER},can:function(f){return typeof(this[f])==="function"},has:function(f){return typeof(this[f])!=="undefined"},isa:function(f){return(f instanceof Object)&&(this instanceof f)}},can:function(f){return this.prototype.can.call(this,f)},has:function(f){return this.prototype.has.call(this,f)},isa:function(g){var f=this;while(f){if(f===g){return true}else{f=f.SUPER}}return false},SimpleSUPER:c({constructor:function(f){return this.SimpleSUPER.define(f)},define:function(f){var h={};if(f!=null){for(var g in f){if(f.hasOwnProperty(g)){h[g]=this.wrap(g,f[g])}}if(f.toString!==this.prototype.toString&&f.toString!=={}.toString){h.toString=this.wrap("toString",f.toString)}}return h},wrap:function(i,h){if(typeof(h)!=="function"||!h.toString().match(/\.\s*SUPER\s*\(/)){return h}var g=function(){this.SUPER=g.SUPER[i];try{var f=h.apply(this,arguments)}catch(j){delete this.SUPER;throw j}delete this.SUPER;return f};g.toString=function(){return h.toString.apply(h,arguments)};return g}})});b.Object.isArray=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"};b.Object.Array=Array})("MathJax");(function(BASENAME){var BASE=window[BASENAME];if(!BASE){BASE=window[BASENAME]={}}var isArray=BASE.Object.isArray;var CALLBACK=function(data){var cb=function(){return arguments.callee.execute.apply(arguments.callee,arguments)};for(var id in CALLBACK.prototype){if(CALLBACK.prototype.hasOwnProperty(id)){if(typeof(data[id])!=="undefined"){cb[id]=data[id]}else{cb[id]=CALLBACK.prototype[id]}}}cb.toString=CALLBACK.prototype.toString;return cb};CALLBACK.prototype={isCallback:true,hook:function(){},data:[],object:window,execute:function(){if(!this.called||this.autoReset){this.called=!this.autoReset;return this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)))}},reset:function(){delete this.called},toString:function(){return this.hook.toString.apply(this.hook,arguments)}};var ISCALLBACK=function(f){return(typeof(f)==="function"&&f.isCallback)};var EVAL=function(code){return eval.call(window,code)};var TESTEVAL=function(){EVAL("var __TeSt_VaR__ = 1");if(window.__TeSt_VaR__){try{delete window.__TeSt_VaR__}catch(error){window.__TeSt_VaR__=null}}else{if(window.execScript){EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";window.execScript(code);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}else{EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";var head=(document.getElementsByTagName("head"))[0];if(!head){head=document.body}var script=document.createElement("script");script.appendChild(document.createTextNode(code));head.appendChild(script);head.removeChild(script);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}}TESTEVAL=null};var USING=function(args,i){if(arguments.length>1){if(arguments.length===2&&!(typeof arguments[0]==="function")&&arguments[0] instanceof Object&&typeof arguments[1]==="number"){args=[].slice.call(args,i)}else{args=[].slice.call(arguments,0)}}if(isArray(args)&&args.length===1&&typeof(args[0])==="function"){args=args[0]}if(typeof args==="function"){if(args.execute===CALLBACK.prototype.execute){return args}return CALLBACK({hook:args})}else{if(isArray(args)){if(typeof(args[0])==="string"&&args[1] instanceof Object&&typeof args[1][args[0]]==="function"){return CALLBACK({hook:args[1][args[0]],object:args[1],data:args.slice(2)})}else{if(typeof args[0]==="function"){return CALLBACK({hook:args[0],data:args.slice(1)})}else{if(typeof args[1]==="function"){return CALLBACK({hook:args[1],object:args[0],data:args.slice(2)})}}}}else{if(typeof(args)==="string"){if(TESTEVAL){TESTEVAL()}return CALLBACK({hook:EVAL,data:[args]})}else{if(args instanceof Object){return CALLBACK(args)}else{if(typeof(args)==="undefined"){return CALLBACK({})}}}}}throw Error("Can't make callback from given data")};var DELAY=function(time,callback){callback=USING(callback);callback.timeout=setTimeout(callback,time);return callback};var WAITFOR=function(callback,signal){callback=USING(callback);if(!callback.called){WAITSIGNAL(callback,signal);signal.pending++}};var WAITEXECUTE=function(){var signals=this.signal;delete this.signal;this.execute=this.oldExecute;delete this.oldExecute;var result=this.execute.apply(this,arguments);if(ISCALLBACK(result)&&!result.called){WAITSIGNAL(result,signals)}else{for(var i=0,m=signals.length;i0&&priority=0;i--){this.hooks.splice(i,1)}this.remove=[]}});var EXECUTEHOOKS=function(hooks,data,reset){if(!hooks){return null}if(!isArray(hooks)){hooks=[hooks]}if(!isArray(data)){data=(data==null?[]:[data])}var handler=HOOKS(reset);for(var i=0,m=hooks.length;ig){g=document.styleSheets.length}if(!i){i=document.head||((document.getElementsByTagName("head"))[0]);if(!i){i=document.body}}return i};var f=[];var c=function(){for(var k=0,j=f.length;k=this.timeout){i(this.STATUS.ERROR);return 1}return 0},file:function(j,i){if(i<0){a.Ajax.loadTimeout(j)}else{a.Ajax.loadComplete(j)}},execute:function(){this.hook.call(this.object,this,this.data[0],this.data[1])},checkSafari2:function(i,j,k){if(i.time(k)){return}if(document.styleSheets.length>j&&document.styleSheets[j].cssRules&&document.styleSheets[j].cssRules.length){k(i.STATUS.OK)}else{setTimeout(i,i.delay)}},checkLength:function(i,l,n){if(i.time(n)){return}var m=0;var j=(l.sheet||l.styleSheet);try{if((j.cssRules||j.rules||[]).length>0){m=1}}catch(k){if(k.message.match(/protected variable|restricted URI/)){m=1}else{if(k.message.match(/Security error/)){m=1}}}if(m){setTimeout(a.Callback([n,i.STATUS.OK]),0)}else{setTimeout(i,i.delay)}}},loadComplete:function(i){i=this.fileURL(i);var j=this.loading[i];if(j&&!j.preloaded){a.Message.Clear(j.message);clearTimeout(j.timeout);if(j.script){if(f.length===0){setTimeout(c,0)}f.push(j.script)}this.loaded[i]=j.status;delete this.loading[i];this.addHook(i,j.callback)}else{if(j){delete this.loading[i]}this.loaded[i]=this.STATUS.OK;j={status:this.STATUS.OK}}if(!this.loadHooks[i]){return null}return this.loadHooks[i].Execute(j.status)},loadTimeout:function(i){if(this.loading[i].timeout){clearTimeout(this.loading[i].timeout)}this.loading[i].status=this.STATUS.ERROR;this.loadError(i);this.loadComplete(i)},loadError:function(i){a.Message.Set(["LoadFailed","File failed to load: %1",i],null,2000);a.Hub.signal.Post(["file load error",i])},Styles:function(k,l){var i=this.StyleString(k);if(i===""){l=a.Callback(l);l()}else{var j=document.createElement("style");j.type="text/css";this.head=h(this.head);this.head.appendChild(j);if(j.styleSheet&&typeof(j.styleSheet.cssText)!=="undefined"){j.styleSheet.cssText=i}else{j.appendChild(document.createTextNode(i))}l=this.timer.create.call(this,l,j)}return l},StyleString:function(n){if(typeof(n)==="string"){return n}var k="",o,m;for(o in n){if(n.hasOwnProperty(o)){if(typeof n[o]==="string"){k+=o+" {"+n[o]+"}\n"}else{if(a.Object.isArray(n[o])){for(var l=0;l="0"&&q<="9"){f[j]=p[f[j]-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{if(q==="{"){q=f[j].substr(1);if(q>="0"&&q<="9"){f[j]=p[f[j].substr(1,f[j].length-2)-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{var k=f[j].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);if(k){if(k[1]==="plural"){var d=p[k[2]-1];if(typeof d==="undefined"){f[j]="???"}else{d=this.plural(d)-1;var h=k[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uEFEF").split(/\|/);if(d>=0&&d=3){c.push([f[0],f[1],this.processSnippet(g,f[2])])}else{c.push(e[d])}}}}else{c.push(e[d])}}return c},markdownPattern:/(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,processMarkdown:function(b,h,d){var j=[],e;var c=b.split(this.markdownPattern);var g=c[0];for(var f=1,a=c.length;f1?d[1]:""));f=null}if(e&&(!b.preJax||d)){c.nodeValue=c.nodeValue.replace(b.postJax,(e.length>1?e[1]:""))}if(f&&!f.nodeValue.match(/\S/)){f=f.previousSibling}}if(b.preRemoveClass&&f&&f.className===b.preRemoveClass){a.MathJax.preview=f}a.MathJax.checked=1},processInput:function(a){var b,i=MathJax.ElementJax.STATE;var h,e,d=a.scripts.length;try{while(a.ithis.processUpdateTime&&a.i1){d.jax[a.outputJax].push(b)}b.MathJax.state=c.OUTPUT},prepareOutput:function(c,f){while(c.jthis.processUpdateTime&&h.i=0;q--){if((b[q].src||"").match(f)){s.script=b[q].innerHTML;if(RegExp.$2){var t=RegExp.$2.substr(1).split(/\&/);for(var p=0,l=t.length;p=parseInt(y[z])}}return true},Select:function(j){var i=j[d.Browser];if(i){return i(d.Browser)}return null}};var e=k.replace(/^Mozilla\/(\d+\.)+\d+ /,"").replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"").replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,"");d.Browser=d.Insert(d.Insert(new String("Unknown"),{version:"0.0"}),a);for(var v in a){if(a.hasOwnProperty(v)){if(a[v]&&v.substr(0,2)==="is"){v=v.slice(2);if(v==="Mac"||v==="PC"){continue}d.Browser=d.Insert(new String(v),a);var r=new RegExp(".*(Version/| Trident/.*; rv:)((?:\\d+\\.)+\\d+)|.*("+v+")"+(v=="MSIE"?" ":"/")+"((?:\\d+\\.)*\\d+)|(?:^|\\(| )([a-z][-a-z0-9._: ]+|(?:Apple)?WebKit)/((?:\\d+\\.)+\\d+)");var u=r.exec(e)||["","","","unknown","0.0"];d.Browser.name=(u[1]!=""?v:(u[3]||u[5]));d.Browser.version=u[2]||u[4]||u[6];break}}}try{d.Browser.Select({Safari:function(j){var i=parseInt((String(j.version).split("."))[0]);if(i>85){j.webkit=j.version}if(i>=538){j.version="8.0"}else{if(i>=537){j.version="7.0"}else{if(i>=536){j.version="6.0"}else{if(i>=534){j.version="5.1"}else{if(i>=533){j.version="5.0"}else{if(i>=526){j.version="4.0"}else{if(i>=525){j.version="3.1"}else{if(i>500){j.version="3.0"}else{if(i>400){j.version="2.0"}else{if(i>85){j.version="1.0"}}}}}}}}}}j.webkit=(navigator.appVersion.match(/WebKit\/(\d+)\./))[1];j.isMobile=(navigator.appVersion.match(/Mobile/i)!=null);j.noContextMenu=j.isMobile},Firefox:function(j){if((j.version==="0.0"||k.match(/Firefox/)==null)&&navigator.product==="Gecko"){var m=k.match(/[\/ ]rv:(\d+\.\d.*?)[\) ]/);if(m){j.version=m[1]}else{var i=(navigator.buildID||navigator.productSub||"0").substr(0,8);if(i>="20111220"){j.version="9.0"}else{if(i>="20111120"){j.version="8.0"}else{if(i>="20110927"){j.version="7.0"}else{if(i>="20110816"){j.version="6.0"}else{if(i>="20110621"){j.version="5.0"}else{if(i>="20110320"){j.version="4.0"}else{if(i>="20100121"){j.version="3.6"}else{if(i>="20090630"){j.version="3.5"}else{if(i>="20080617"){j.version="3.0"}else{if(i>="20061024"){j.version="2.0"}}}}}}}}}}}}j.isMobile=(navigator.appVersion.match(/Android/i)!=null||k.match(/ Fennec\//)!=null||k.match(/Mobile/)!=null)},Chrome:function(i){i.noContextMenu=i.isMobile=!!navigator.userAgent.match(/ Mobile[ \/]/)},Opera:function(i){i.version=opera.version()},Edge:function(i){i.isMobile=!!navigator.userAgent.match(/ Phone/)},MSIE:function(j){j.isMobile=!!navigator.userAgent.match(/ Phone/);j.isIE9=!!(document.documentMode&&(window.performance||window.msPerformance));MathJax.HTML.setScriptBug=!j.isIE9||document.documentMode<9;MathJax.Hub.msieHTMLCollectionBug=(document.documentMode<9);if(document.documentMode<10&&!s.params.NoMathPlayer){try{new ActiveXObject("MathPlayer.Factory.1");j.hasMathPlayer=true}catch(m){}try{if(j.hasMathPlayer){var i=document.createElement("object");i.id="mathplayer";i.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";g.appendChild(i);document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");j.mpNamespace=true;if(document.readyState&&(document.readyState==="loading"||document.readyState==="interactive")){document.write('');j.mpImported=true}}else{document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink")}}catch(m){}}}})}catch(c){console.error(c.message)}d.Browser.Select(MathJax.Message.browsers);if(h.AuthorConfig&&typeof h.AuthorConfig.AuthorInit==="function"){h.AuthorConfig.AuthorInit()}d.queue=h.Callback.Queue();d.queue.Push(["Post",s.signal,"Begin"],["Config",s],["Cookie",s],["Styles",s],["Message",s],function(){var i=h.Callback.Queue(s.Jax(),s.Extensions());return i.Push({})},["Menu",s],s.onLoad(),function(){MathJax.isReady=true},["Typeset",s],["Hash",s],["MenuZoom",s],["Post",s.signal,"End"])})("MathJax")}}; diff --git a/mathjax/asset/README.md b/mathjax/asset/README.md new file mode 100644 index 00000000..7ca6f7e4 --- /dev/null +++ b/mathjax/asset/README.md @@ -0,0 +1,53 @@ +# MathJax + +## Beautiful math in all browsers + +MathJax is an open-source JavaScript display engine for LaTeX, MathML, and +AsciiMath notation that works in all modern browsers. It was designed with +the goal of consolidating the recent advances in web technologies into a +single, definitive, math-on-the-web platform supporting the major browsers +and operating systems. It requires no setup on the part of the user (no +plugins to download or software to install), so the page author can write +web documents that include mathematics and be confident that users will be +able to view it naturally and easily. Simply include MathJax and some +mathematics in a web page, and MathJax does the rest. + +Some of the main features of MathJax include: + +- High-quality display of LaTeX, MathML, and AsciiMath notation in HTML pages + +- Supported in most browsers with no plug-ins, extra fonts, or special + setup for the reader + +- Easy for authors, flexible for publishers, extensible for developers + +- Supports math accessibility, cut-and-paste interoperability, and other + advanced functionality + +- Powerful API for integration with other web applications + +See for additional details. + + +## Installation and Usage + +The MathJax installation and usage documentation is available in a +separate GitHub repository at . +The HTML versions can now be viewed at , +where it is possible for you to submit corrections and modifications +directly to the documentation on line. + + +## Community + +The main MathJax website is , and it includes +announcements and other important information. MathJax is maintained and +distributed on GitHub at . A user forum +for asking questions and getting assistance is hosted at Google, and the +bug tracker is hosted at GitHub: + +Bug tracker: +MathJax-Users Group: + +Before reporting a bug, please check that it has not already been reported. +Also, please use the bug tracker for reporting bugs rather than the help forum. diff --git a/mathjax/asset/bower.json b/mathjax/asset/bower.json new file mode 100644 index 00000000..6b214b93 --- /dev/null +++ b/mathjax/asset/bower.json @@ -0,0 +1,11 @@ +{ + "name": "MathJax", + "main": "./MathJax.js", + "homepage": "http://www.mathjax.org/", + "ignore": [ + "**/.*", + "node_modules", + "components" + ], + "keywords": ["math", "js", "LaTeX", "MathML", "AsciiMath"] +} diff --git a/mathjax/asset/composer.json b/mathjax/asset/composer.json new file mode 100644 index 00000000..b1b9d27a --- /dev/null +++ b/mathjax/asset/composer.json @@ -0,0 +1,14 @@ +{ + "name": "mathjax/mathjax", + "type": "library", + "description": "MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.", + "keywords": ["math", "js", "LaTeX", "MathML", "AsciiMath"], + "homepage": "http://www.mathjax.org/", + "license": "Apache-2.0", + "authors": [ + { + "name": "MathJax Consortium", + "homepage": "https://github.com/mathjax" + } + ] +} diff --git a/mathjax/asset/config/Safe.js b/mathjax/asset/config/Safe.js new file mode 100644 index 00000000..a76efe4e --- /dev/null +++ b/mathjax/asset/config/Safe.js @@ -0,0 +1,19 @@ +/* + * /MathJax/config/Safe.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Hub.Register.StartupHook("End Config",function(){if(!MathJax.Hub.config.extensions){MathJax.Hub.config.extensions=[]}MathJax.Hub.config.extensions.push("Safe.js")});MathJax.Ajax.loadComplete("[MathJax]/config/Safe.js"); diff --git a/mathjax/asset/config/TeX-MML-AM_CHTML.js b/mathjax/asset/config/TeX-MML-AM_CHTML.js new file mode 100644 index 00000000..5b6f4db7 --- /dev/null +++ b/mathjax/asset/config/TeX-MML-AM_CHTML.js @@ -0,0 +1,69 @@ +/* + * /MathJax/config/TeX-MML-AM_CHTML.js + * + * Copyright (c) 2010-2018 The MathJax Consortium + * + * Part of the MathJax library. + * See http://www.mathjax.org for details. + * + * Licensed under the Apache License, Version 2.0; + * you may not use this file except in compliance with the License. + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +MathJax.Ajax.Preloading( + "[MathJax]/jax/input/TeX/config.js", + "[MathJax]/jax/input/MathML/config.js", + "[MathJax]/jax/input/AsciiMath/config.js", + "[MathJax]/jax/output/CommonHTML/config.js", + "[MathJax]/jax/output/PreviewHTML/config.js", + "[MathJax]/extensions/tex2jax.js", + "[MathJax]/extensions/mml2jax.js", + "[MathJax]/extensions/asciimath2jax.js", + "[MathJax]/extensions/MathEvents.js", + "[MathJax]/extensions/MathZoom.js", + "[MathJax]/extensions/MathMenu.js", + "[MathJax]/jax/element/mml/jax.js", + "[MathJax]/extensions/toMathML.js", + "[MathJax]/extensions/TeX/noErrors.js", + "[MathJax]/extensions/TeX/noUndefined.js", + "[MathJax]/jax/input/TeX/jax.js", + "[MathJax]/extensions/TeX/AMSmath.js", + "[MathJax]/extensions/TeX/AMSsymbols.js", + "[MathJax]/jax/input/MathML/jax.js", + "[MathJax]/jax/input/AsciiMath/jax.js", + "[MathJax]/jax/output/PreviewHTML/jax.js", + "[MathJax]/extensions/fast-preview.js", + "[MathJax]/extensions/AssistiveMML.js", + "[MathJax]/extensions/a11y/accessibility-menu.js" +); + +MathJax.Hub.Config({ + extensions: ['[a11y]/accessibility-menu.js'] +}); + +MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.7.5",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/\s/g,"_")},formatURL:function(b,a){return a+"#"+encodeURIComponent(b)},useLabelIds:true}},resetEquationNumbers:function(){}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js"); +MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"2.7.5",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js"); +MathJax.InputJax.AsciiMath=MathJax.InputJax({id:"AsciiMath",version:"2.7.5",directory:MathJax.InputJax.directory+"/AsciiMath",extensionDir:MathJax.InputJax.extensionDir+"/AsciiMath",config:{fixphi:true,useMathMLspacing:true,displaystyle:true,decimalsign:"."}});MathJax.InputJax.AsciiMath.Register("math/asciimath");MathJax.InputJax.AsciiMath.loadComplete("config.js"); +MathJax.OutputJax.CommonHTML=MathJax.OutputJax({id:"CommonHTML",version:"2.7.5",directory:MathJax.OutputJax.directory+"/CommonHTML",extensionDir:MathJax.OutputJax.extensionDir+"/CommonHTML",autoloadDir:MathJax.OutputJax.directory+"/CommonHTML/autoload",fontDir:MathJax.OutputJax.directory+"/CommonHTML/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{matchFontHeight:true,scale:100,minScaleAdjust:50,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Cambria Math','Arial Unicode MS',serif",EqnChunk:(MathJax.Hub.Browser.isMobile?20:100),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.CommonHTML.Register("jax/mml")}MathJax.OutputJax.CommonHTML.loadComplete("config.js"); +MathJax.OutputJax.PreviewHTML=MathJax.OutputJax({id:"PreviewHTML",version:"2.7.5",directory:MathJax.OutputJax.directory+"/PreviewHTML",extensionDir:MathJax.OutputJax.extensionDir+"/PreviewHTML",noFastPreview:true,config:{scale:100,minScaleAdjust:50,mtextFontInherit:false,linebreaks:{automatic:false,width:"container"}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.PreviewHTML.Register("jax/mml")}MathJax.OutputJax.PreviewHTML.loadComplete("config.js"); +MathJax.Extension.tex2jax={version:"2.7.5",config:{inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],skipTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",processEscapes:false,processEnvironments:true,processRefs:true,preview:"TeX"},ignoreTags:{br:(MathJax.Hub.Browser.isMSIE&&document.documentMode<9?"\n":" "),wbr:"","#comment":""},PreProcess:function(a){if(!this.configured){this.config=MathJax.Hub.CombineConfig("tex2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}if(typeof(this.config.previewTeX)!=="undefined"&&!this.config.previewTeX){this.config.preview="none"}this.configured=true}if(typeof(a)==="string"){a=document.getElementById(a)}if(!a){a=document.body}if(this.createPatterns()){this.scanElement(a,a.nextSibling)}},createPatterns:function(){var d=[],e=[],c,a,b=this.config;this.match={};for(c=0,a=b.inlineMath.length;c0)},patternQuote:function(a){return a.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},endPattern:function(a){return new RegExp(this.patternQuote(a)+"|\\\\.|[{}]","g")},sortLength:function(d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d/i,"").replace(/<\?xml:namespace .*?\/>/i,"");b=b.replace(/ /g," ")}MathJax.HTML.setScript(a,b);d.removeChild(e)}else{var c=MathJax.HTML.Element("span");c.appendChild(e);MathJax.HTML.setScript(a,c.innerHTML)}if(this.config.preview!=="none"){this.createPreview(e,a)}},ProcessMathFlattened:function(f){var d=f.parentNode;if(!d||d.className===MathJax.Hub.config.preRemoveClass){return}var b=document.createElement("script");b.type="math/mml";d.insertBefore(b,f);var c="",e,a=f;while(f&&f.nodeName!=="/MATH"){e=f;f=f.nextSibling;c+=this.NodeHTML(e);e.parentNode.removeChild(e)}if(f&&f.nodeName==="/MATH"){f.parentNode.removeChild(f)}b.text=c+"";if(this.config.preview!=="none"){this.createPreview(a,b)}},NodeHTML:function(e){var c,b,a;if(e.nodeName==="#text"){c=this.quoteHTML(e.nodeValue)}else{if(e.nodeName==="#comment"){c=""}else{c="<"+e.nodeName.toLowerCase();for(b=0,a=e.attributes.length;b";if(e.outerHTML!=null&&e.outerHTML.match(/(.<\/[A-Z]+>|\/>)$/)){for(b=0,a=e.childNodes.length;b"}}}return c},OuterHTML:function(d){if(d.nodeName.charAt(0)==="#"){return this.NodeHTML(d)}if(!this.AttributeBug){return d.outerHTML}var c=this.NodeHTML(d);for(var b=0,a=d.childNodes.length;b";return c},quoteHTML:function(a){if(a==null){a=""}return a.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""")},createPreview:function(g,f){var e=this.config.preview;if(e==="none"){return}var i=false;var c=MathJax.Hub.config.preRemoveClass;if((f.previousSibling||{}).className===c){return}if(e==="mathml"){i=true;if(this.MathTagBug){e="alttext"}else{e=g.cloneNode(true)}}if(e==="alttext"||e==="altimg"){i=true;var d=this.filterPreview(g.getAttribute("alttext"));if(e==="alttext"){if(d!=null){e=MathJax.HTML.TextNode(d)}else{e=null}}else{var a=g.getAttribute("altimg");if(a!=null){var b={width:g.getAttribute("altimg-width"),height:g.getAttribute("altimg-height")};e=MathJax.HTML.Element("img",{src:a,alt:d,style:b})}else{e=null}}}if(e){var h;if(i){h=MathJax.HTML.Element("span",{className:c});h.appendChild(e)}else{h=MathJax.HTML.Element("span",{className:c},e)}f.parentNode.insertBefore(h,f)}},filterPreview:function(a){return a},InitBrowser:function(){var b=MathJax.HTML.Element("span",{id:"<",className:"mathjax",innerHTML:"x"});var a=b.outerHTML||"";this.AttributeBug=a!==""&&!(a.match(/id="<"/)&&a.match(/class="mathjax"/)&&a.match(/<\/math>/));this.MathTagBug=b.childNodes.length>1;this.CleanupHTML=MathJax.Hub.Browser.isMSIE}};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.mml2jax],5);MathJax.Ajax.loadComplete("[MathJax]/extensions/mml2jax.js"); +MathJax.Extension.asciimath2jax={version:"2.7.5",config:{delimiters:[["`","`"]],skipTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],ignoreClass:"asciimath2jax_ignore",processClass:"asciimath2jax_process",preview:"AsciiMath"},ignoreTags:{br:(MathJax.Hub.Browser.isMSIE&&document.documentMode<9?"\n":" "),wbr:"","#comment":""},PreProcess:function(a){if(!this.configured){this.config=MathJax.Hub.CombineConfig("asciimath2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}this.configured=true}if(typeof(a)==="string"){a=document.getElementById(a)}if(!a){a=document.body}if(this.createPatterns()){this.scanElement(a,a.nextSibling)}},createPatterns:function(){var d=[],c,a,b=this.config;this.match={};if(b.delimiters.length===0){return false}for(c=0,a=b.delimiters.length;c0){this.HoverFadeTimer(q,q.hover.inc);return}s.parentNode.removeChild(s);if(r){r.parentNode.removeChild(r)}if(q.hover.remove){clearTimeout(q.hover.remove)}delete q.hover},HoverFadeTimer:function(q,s,r){q.hover.inc=s;if(!q.hover.timer){q.hover.timer=setTimeout(g(["HoverFade",this,q]),(r||o.fadeDelay))}},HoverMenu:function(q){if(!q){q=window.event}return b[this.jax].ContextMenu(q,this.math,true)},ClearHover:function(q){if(q.hover.remove){clearTimeout(q.hover.remove)}if(q.hover.timer){clearTimeout(q.hover.timer)}f.ClearHoverTimer();delete q.hover},Px:function(q){if(Math.abs(q)<0.006){return"0px"}return q.toFixed(2).replace(/\.?0+$/,"")+"px"},getImages:function(){if(k.discoverable){var q=new Image();q.src=o.button.src}}};var a=c.Touch={last:0,delay:500,start:function(r){var q=new Date().getTime();var s=(q-a.lastt){z.style.height=t+"px";z.style.width=(x.zW+this.scrollSize)+"px"}if(z.offsetWidth>l){z.style.width=l+"px";z.style.height=(x.zH+this.scrollSize)+"px"}}if(this.operaPositionBug){z.style.width=Math.min(l,x.zW)+"px"}if(z.offsetWidth>m&&z.offsetWidth-m=9);h.msiePositionBug=!m;h.msieSizeBug=l.versionAtLeast("7.0")&&(!document.documentMode||n===7||n===8);h.msieZIndexBug=(n<=7);h.msieInlineBlockAlignBug=(n<=7);h.msieTrapEventBug=!window.addEventListener;if(document.compatMode==="BackCompat"){h.scrollSize=52}if(m){delete i.styles["#MathJax_Zoom"].filter}},Opera:function(l){h.operaPositionBug=true;h.operaRefreshBug=true}});h.topImg=(h.msieInlineBlockAlignBug?d.Element("img",{style:{width:0,height:0,position:"relative"},src:"about:blank"}):d.Element("span",{style:{width:0,height:0,display:"inline-block"}}));if(h.operaPositionBug||h.msieTopBug){h.topImg.style.border="1px solid"}MathJax.Callback.Queue(["StartupHook",MathJax.Hub.Register,"Begin Styles",{}],["Styles",f,i.styles],["Post",a.Startup.signal,"MathZoom Ready"],["loadComplete",f,"[MathJax]/extensions/MathZoom.js"])})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax["HTML-CSS"],MathJax.OutputJax.NativeMML); +(function(f,o,q,e,r){var p="2.7.5";var d=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:d};var t=function(u){return MathJax.Localization._.apply(MathJax.Localization,[["MathMenu",u]].concat([].slice.call(arguments,1)))};var i=MathJax.Object.isArray;var a=f.Browser.isPC,l=f.Browser.isMSIE,m=((document.documentMode||0)>8);var j=(a?null:"5px");var s=f.CombineConfig("MathMenu",{delay:150,showRenderer:true,showMathPlayer:true,showFontMenu:false,showContext:false,showDiscoverable:false,showLocale:true,showLocaleURL:false,semanticsAnnotations:{TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]},windowSettings:{status:"no",toolbar:"no",locationbar:"no",menubar:"no",directories:"no",personalbar:"no",resizable:"yes",scrollbars:"yes",width:400,height:300,left:Math.round((screen.width-400)/2),top:Math.round((screen.height-300)/3)},styles:{"#MathJax_About":{position:"fixed",left:"50%",width:"auto","text-align":"center",border:"3px outset",padding:"1em 2em","background-color":"#DDDDDD",color:"black",cursor:"default","font-family":"message-box","font-size":"120%","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":"15px","-webkit-border-radius":"15px","-moz-border-radius":"15px","-khtml-border-radius":"15px","box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},"#MathJax_About.MathJax_MousePost":{outline:"none"},".MathJax_Menu":{position:"absolute","background-color":"white",color:"black",width:"auto",padding:(a?"2px":"5px 0px"),border:"1px solid #CCCCCC",margin:0,cursor:"default",font:"menu","text-align":"left","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":j,"-webkit-border-radius":j,"-moz-border-radius":j,"-khtml-border-radius":j,"box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},".MathJax_MenuItem":{padding:(a?"2px 2em":"1px 2em"),background:"transparent"},".MathJax_MenuArrow":{position:"absolute",right:".5em","padding-top":".25em",color:"#666666","font-family":(l?"'Arial unicode MS'":null),"font-size":".75em"},".MathJax_MenuActive .MathJax_MenuArrow":{color:"white"},".MathJax_MenuArrow.RTL":{left:".5em",right:"auto"},".MathJax_MenuCheck":{position:"absolute",left:".7em","font-family":(l?"'Arial unicode MS'":null)},".MathJax_MenuCheck.RTL":{right:".7em",left:"auto"},".MathJax_MenuRadioCheck":{position:"absolute",left:(a?"1em":".7em")},".MathJax_MenuRadioCheck.RTL":{right:(a?"1em":".7em"),left:"auto"},".MathJax_MenuLabel":{padding:(a?"2px 2em 4px 1.33em":"1px 2em 3px 1.33em"),"font-style":"italic"},".MathJax_MenuRule":{"border-top":(a?"1px solid #CCCCCC":"1px solid #DDDDDD"),margin:(a?"4px 1px 0px":"4px 3px")},".MathJax_MenuDisabled":{color:"GrayText"},".MathJax_MenuActive":{"background-color":(a?"Highlight":"#606872"),color:(a?"HighlightText":"white")},".MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus":{"background-color":"#E8E8E8"},".MathJax_ContextMenu:focus":{outline:"none"},".MathJax_ContextMenu .MathJax_MenuItem:focus":{outline:"none"},"#MathJax_AboutClose":{top:".2em",right:".2em"},".MathJax_Menu .MathJax_MenuClose":{top:"-10px",left:"-10px"},".MathJax_MenuClose":{position:"absolute",cursor:"pointer",display:"inline-block",border:"2px solid #AAA","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","font-family":"'Courier New',Courier","font-size":"24px",color:"#F0F0F0"},".MathJax_MenuClose span":{display:"block","background-color":"#AAA",border:"1.5px solid","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","line-height":0,padding:"8px 0 6px"},".MathJax_MenuClose:hover":{color:"white!important",border:"2px solid #CCC!important"},".MathJax_MenuClose:hover span":{"background-color":"#CCC!important"},".MathJax_MenuClose:hover:focus":{outline:"none"}}});var n,k,b;f.Register.StartupHook("MathEvents Ready",function(){n=MathJax.Extension.MathEvents.Event.False;k=MathJax.Extension.MathEvents.Hover;b=MathJax.Extension.MathEvents.Event.KEY});var h=MathJax.Object.Subclass({Keydown:function(u,v){switch(u.keyCode){case b.ESCAPE:this.Remove(u,v);break;case b.RIGHT:this.Right(u,v);break;case b.LEFT:this.Left(u,v);break;case b.UP:this.Up(u,v);break;case b.DOWN:this.Down(u,v);break;case b.RETURN:case b.SPACE:this.Space(u,v);break;default:return;break}return n(u)},Escape:function(u,v){},Right:function(u,v){},Left:function(u,v){},Up:function(u,v){},Down:function(u,v){},Space:function(u,v){}},{});var g=MathJax.Menu=h.Subclass({version:p,items:[],posted:false,title:null,margin:5,Init:function(u){this.items=[].slice.call(arguments,0)},With:function(u){if(u){f.Insert(this,u)}return this},Post:function(M,E,B){if(!M){M=window.event||{}}var I=document.getElementById("MathJax_MenuFrame");if(!I){I=g.Background(this);delete c.lastItem;delete c.lastMenu;delete g.skipUp;d.Post(["post",g.jax]);g.isRTL=(MathJax.Localization.fontDirection()==="rtl")}var v=o.Element("div",{onmouseup:g.Mouseup,ondblclick:n,ondragstart:n,onselectstart:n,oncontextmenu:n,menuItem:this,className:"MathJax_Menu",onkeydown:g.Keydown,role:"menu"});if(M.type==="contextmenu"||M.type==="mouseover"){v.className+=" MathJax_ContextMenu"}if(!B){MathJax.Localization.setCSS(v)}for(var N=0,K=this.items.length;NA-this.margin){H=A-v.offsetWidth-this.margin}if(g.isMobile){H=Math.max(5,H-Math.floor(v.offsetWidth/2));F-=20}g.skipUp=M.isContextMenu}else{var z="left",J=E.offsetWidth;H=(g.isMobile?30:J-2);F=0;while(E&&E!==I){H+=E.offsetLeft;F+=E.offsetTop;E=E.parentNode}if(!g.isMobile){if((g.isRTL&&H-J-v.offsetWidth>this.margin)||(!g.isRTL&&H+v.offsetWidth>A-this.margin)){z="right";H=Math.max(this.margin,H-J-v.offsetWidth+6)}}if(!a){v.style["borderRadiusTop"+z]=0;v.style["WebkitBorderRadiusTop"+z]=0;v.style["MozBorderRadiusTop"+z]=0;v.style["KhtmlBorderRadiusTop"+z]=0}}v.style.left=H+"px";v.style.top=F+"px";if(document.selection&&document.selection.empty){document.selection.empty()}var G=window.pageXOffset||document.documentElement.scrollLeft;var D=window.pageYOffset||document.documentElement.scrollTop;g.Focus(v);if(M.type==="keydown"){g.skipMouseoverFromKey=true;setTimeout(function(){delete g.skipMouseoverFromKey},s.delay)}window.scrollTo(G,D);return n(M)},Remove:function(u,v){d.Post(["unpost",g.jax]);var w=document.getElementById("MathJax_MenuFrame");if(w){w.parentNode.removeChild(w);if(this.msieFixedPositionBug){detachEvent("onresize",g.Resize)}}if(g.jax.hover){delete g.jax.hover.nofade;k.UnHover(g.jax)}g.Unfocus(v);if(u.type==="mousedown"){g.CurrentNode().blur()}return n(u)},Find:function(u){return this.FindN(1,u,[].slice.call(arguments,1))},FindId:function(u){return this.FindN(0,u,[].slice.call(arguments,1))},FindN:function(y,v,x){for(var w=0,u=this.items.length;w0){u.oldTabIndex=u.tabIndex}u.tabIndex=-1}},SetTabIndex:function(){var v=g.AllNodes();for(var w=0,u;u=v[w];w++){if(u.oldTabIndex!==undefined){u.tabIndex=u.oldTabIndex;delete u.oldTabIndex}else{u.tabIndex=f.getTabOrder(u)}}},Mod:function(u,v){return((u%v)+v)%v},IndexOf:(Array.prototype.indexOf?function(u,v,w){return u.indexOf(v,w)}:function(u,x,y){for(var w=(y||0),v=u.length;w=0&&c.GetMenuNode(w).menuItem!==v[u].menuItem){v[u].menuItem.posted=false;v[u].parentNode.removeChild(v[u]);u--}},Touchstart:function(u,v){return this.TouchEvent(u,v,"Mousedown")},Touchend:function(u,v){return this.TouchEvent(u,v,"Mouseup")},TouchEvent:function(v,w,u){if(this!==c.lastItem){if(c.lastMenu){g.Event(v,c.lastMenu,"Mouseout")}g.Event(v,w,"Mouseover",true);c.lastItem=this;c.lastMenu=w}if(this.nativeTouch){return null}g.Event(v,w,u);return false},Remove:function(u,v){v=v.parentNode.menuItem;return v.Remove(u,v)},With:function(u){if(u){f.Insert(this,u)}return this},isRTL:function(){return g.isRTL},rtlClass:function(){return(this.isRTL()?" RTL":"")}},{GetMenuNode:function(u){return u.parentNode}});g.ENTRY=g.ITEM.Subclass({role:"menuitem",Attributes:function(u){u=f.Insert({onmouseover:g.Mouseover,onmouseout:g.Mouseout,onmousedown:g.Mousedown,onkeydown:g.Keydown,"aria-disabled":!!this.disabled},u);u=this.SUPER(arguments).Attributes.call(this,u);if(this.disabled){u.className+=" MathJax_MenuDisabled"}return u},MoveVertical:function(u,E,w){var x=c.GetMenuNode(E);var D=[];for(var z=0,C=x.menuItem.items,y;y=C[z];z++){if(!y.hidden){D.push(y)}}var B=g.IndexOf(D,this);if(B===-1){return}var A=D.length;var v=x.childNodes;do{B=g.Mod(w(B),A)}while(D[B].hidden||!v[B].role||v[B].role==="separator");this.Deactivate(E);D[B].Activate(u,v[B])},Up:function(v,u){this.MoveVertical(v,u,function(w){return w-1})},Down:function(v,u){this.MoveVertical(v,u,function(w){return w+1})},Right:function(v,u){this.MoveHorizontal(v,u,g.Right,!this.isRTL())},Left:function(v,u){this.MoveHorizontal(v,u,g.Left,this.isRTL())},MoveHorizontal:function(A,z,u,B){var x=c.GetMenuNode(z);if(x.menuItem===g.menu&&A.shiftKey){u(A,z)}if(B){return}if(x.menuItem!==g.menu){this.Deactivate(z)}var v=x.previousSibling.childNodes;var y=v.length;while(y--){var w=v[y];if(w.menuItem.submenu&&w.menuItem.submenu===x.menuItem){g.Focus(w);break}}this.RemoveSubmenus(z)},Space:function(u,v){this.Mouseup(u,v)},Activate:function(u,v){this.Deactivate(v);if(!this.disabled){v.className+=" MathJax_MenuActive"}this.DeactivateSubmenus(v);g.Focus(v)},Deactivate:function(u){u.className=u.className.replace(/ MathJax_MenuActive/,"")}});g.ITEM.COMMAND=g.ENTRY.Subclass({action:function(){},Init:function(u,w,v){if(!i(u)){u=[u,u]}this.name=u;this.action=w;this.With(v)},Label:function(u,v){return[this.Name()]},Mouseup:function(u,v){if(!this.disabled){this.Remove(u,v);d.Post(["command",this]);this.action.call(this,u)}return n(u)}});g.ITEM.SUBMENU=g.ENTRY.Subclass({submenu:null,marker:"\u25BA",markerRTL:"\u25C4",Attributes:function(u){u=f.Insert({"aria-haspopup":"true"},u);u=this.SUPER(arguments).Attributes.call(this,u);return u},Init:function(u,w){if(!i(u)){u=[u,u]}this.name=u;var v=1;if(!(w instanceof g.ITEM)){this.With(w),v++}this.submenu=g.apply(g,[].slice.call(arguments,v))},Label:function(u,v){this.submenu.posted=false;return[this.Name()+" ",["span",{className:"MathJax_MenuArrow"+this.rtlClass()},[this.isRTL()?this.markerRTL:this.marker]]]},Timer:function(u,v){this.ClearTimer();u={type:u.type,clientX:u.clientX,clientY:u.clientY};this.timer=setTimeout(e(["Mouseup",this,u,v]),s.delay)},ClearTimer:function(){if(this.timer){clearTimeout(this.timer)}},Touchend:function(v,x){var w=this.submenu.posted;var u=this.SUPER(arguments).Touchend.apply(this,arguments);if(w){this.Deactivate(x);delete c.lastItem;delete c.lastMenu}return u},Mouseout:function(u,v){if(!this.submenu.posted){this.Deactivate(v)}this.ClearTimer()},Mouseover:function(u,v){this.Activate(u,v)},Mouseup:function(u,v){if(!this.disabled){if(!this.submenu.posted){this.ClearTimer();this.submenu.Post(u,v,this.ltr);g.Focus(v)}else{this.DeactivateSubmenus(v)}}return n(u)},Activate:function(u,v){if(!this.disabled){this.Deactivate(v);v.className+=" MathJax_MenuActive"}if(!this.submenu.posted){this.DeactivateSubmenus(v);if(!g.isMobile){this.Timer(u,v)}}g.Focus(v)},MoveVertical:function(w,v,u){this.ClearTimer();this.SUPER(arguments).MoveVertical.apply(this,arguments)},MoveHorizontal:function(w,y,v,x){if(!x){this.SUPER(arguments).MoveHorizontal.apply(this,arguments);return}if(this.disabled){return}if(!this.submenu.posted){this.Activate(w,y);return}var u=c.GetMenuNode(y).nextSibling.childNodes;if(u.length>0){this.submenu.items[0].Activate(w,u[0])}}});g.ITEM.RADIO=g.ENTRY.Subclass({variable:null,marker:(a?"\u25CF":"\u2713"),role:"menuitemradio",Attributes:function(v){var u=s.settings[this.variable]===this.value?"true":"false";v=f.Insert({"aria-checked":u},v);v=this.SUPER(arguments).Attributes.call(this,v);return v},Init:function(v,u,w){if(!i(v)){v=[v,v]}this.name=v;this.variable=u;this.With(w);if(this.value==null){this.value=this.name[0]}},Label:function(v,w){var u={className:"MathJax_MenuRadioCheck"+this.rtlClass()};if(s.settings[this.variable]!==this.value){u={style:{display:"none"}}}return[["span",u,[this.marker]]," "+this.Name()]},Mouseup:function(x,y){if(!this.disabled){var z=y.parentNode.childNodes;for(var v=0,u=z.length;v/g,">");var y=t("EqSource","MathJax Equation Source");if(g.isMobile){u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("
");u.document.write("");u.document.close()}else{u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("");u.document.close();var v=u.document.body.firstChild;setTimeout(function(){var B=(u.outerHeight-u.innerHeight)||30,A=(u.outerWidth-u.innerWidth)||30,w,E;A=Math.max(140,Math.min(Math.floor(0.5*screen.width),v.offsetWidth+A+25));B=Math.max(40,Math.min(Math.floor(0.5*screen.height),v.offsetHeight+B+25));if(g.prototype.msieHeightBug){B+=35}u.resizeTo(A,B);var D;try{D=x.screenX}catch(C){}if(x&&D!=null){w=Math.max(0,Math.min(x.screenX-Math.floor(A/2),screen.width-A-20));E=Math.max(0,Math.min(x.screenY-Math.floor(B/2),screen.height-B-20));u.moveTo(w,E)}},50)}};g.Scale=function(){var z=["CommonHTML","HTML-CSS","SVG","NativeMML","PreviewHTML"],u=z.length,y=100,w,v;for(w=0;w7;g.Augment({margin:20,msieBackgroundBug:((document.documentMode||0)<9),msieFixedPositionBug:(v||!w),msieAboutBug:v,msieHeightBug:((document.documentMode||0)<9)});if(m){delete s.styles["#MathJax_About"].filter;delete s.styles[".MathJax_Menu"].filter}},Firefox:function(u){g.skipMouseover=u.isMobile&&u.versionAtLeast("6.0");g.skipMousedown=u.isMobile}});g.isMobile=f.Browser.isMobile;g.noContextMenu=f.Browser.noContextMenu;g.CreateLocaleMenu=function(){if(!g.menu){return}var z=g.menu.Find("Language").submenu,w=z.items;var v=[],B=MathJax.Localization.strings;for(var A in B){if(B.hasOwnProperty(A)){v.push(A)}}v=v.sort();z.items=[];for(var x=0,u=v.length;x0||this.Get("scriptlevel")>0)&&g>=0){return""}return this.TEXSPACELENGTH[Math.abs(g)]},TEXSPACELENGTH:["",a.LENGTH.THINMATHSPACE,a.LENGTH.MEDIUMMATHSPACE,a.LENGTH.THICKMATHSPACE],TEXSPACE:[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]],autoDefault:function(e){return""},isSpacelike:function(){return false},isEmbellished:function(){return false},Core:function(){return this},CoreMO:function(){return this},childIndex:function(g){if(g==null){return}for(var f=0,e=this.data.length;f=55296&&e.charCodeAt(0)<56320)?a.VARIANT.ITALIC:a.VARIANT.NORMAL)}return""},setTeXclass:function(f){this.getPrevClass(f);var e=this.data.join("");if(e.length>1&&e.match(/^[a-z][a-z0-9]*$/i)&&this.texClass===a.TEXCLASS.ORD){this.texClass=a.TEXCLASS.OP;this.autoOP=true}return this}});a.mn=a.mbase.Subclass({type:"mn",isToken:true,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT}});a.mo=a.mbase.Subclass({type:"mo",isToken:true,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,form:a.AUTO,fence:a.AUTO,separator:a.AUTO,lspace:a.AUTO,rspace:a.AUTO,stretchy:a.AUTO,symmetric:a.AUTO,maxsize:a.AUTO,minsize:a.AUTO,largeop:a.AUTO,movablelimits:a.AUTO,accent:a.AUTO,linebreak:a.LINEBREAK.AUTO,lineleading:a.INHERIT,linebreakstyle:a.AUTO,linebreakmultchar:a.INHERIT,indentalign:a.INHERIT,indentshift:a.INHERIT,indenttarget:a.INHERIT,indentalignfirst:a.INHERIT,indentshiftfirst:a.INHERIT,indentalignlast:a.INHERIT,indentshiftlast:a.INHERIT,texClass:a.AUTO},defaultDef:{form:a.FORM.INFIX,fence:false,separator:false,lspace:a.LENGTH.THICKMATHSPACE,rspace:a.LENGTH.THICKMATHSPACE,stretchy:false,symmetric:false,maxsize:a.SIZE.INFINITY,minsize:"0em",largeop:false,movablelimits:false,accent:false,linebreak:a.LINEBREAK.AUTO,lineleading:"1ex",linebreakstyle:"before",indentalign:a.INDENTALIGN.AUTO,indentshift:"0",indenttarget:"",indentalignfirst:a.INDENTALIGN.INDENTALIGN,indentshiftfirst:a.INDENTSHIFT.INDENTSHIFT,indentalignlast:a.INDENTALIGN.INDENTALIGN,indentshiftlast:a.INDENTSHIFT.INDENTSHIFT,texClass:a.TEXCLASS.REL},SPACE_ATTR:{lspace:1,rspace:2},useMMLspacing:3,hasMMLspacing:function(){if(this.useMMLspacing){return true}return this.form&&(this.OPTABLE[this.form]||{})[this.data.join("")]},autoDefault:function(g,n){var l=this.def;if(!l){if(g==="form"){return this.getForm()}var k=this.data.join("");var f=[this.Get("form"),a.FORM.INFIX,a.FORM.POSTFIX,a.FORM.PREFIX];for(var h=0,e=f.length;h=55296&&k<56320){k=(((k-55296)<<10)+(j.charCodeAt(1)-56320))+65536}for(var g=0,e=this.RANGES.length;g=0;e--){if(this.data[0]&&!this.data[e].isSpacelike()){return this.data[e]}}return null},Core:function(){if(!(this.isEmbellished())||typeof(this.core)==="undefined"){return this}return this.data[this.core]},CoreMO:function(){if(!(this.isEmbellished())||typeof(this.core)==="undefined"){return this}return this.data[this.core].CoreMO()},toString:function(){if(this.inferred){return"["+this.data.join(",")+"]"}return this.SUPER(arguments).toString.call(this)},setTeXclass:function(g){var f,e=this.data.length;if((this.open||this.close)&&(!g||!g.fnOP)){this.getPrevClass(g);g=null;for(f=0;f0){e++}return e},adjustChild_texprimestyle:function(e){if(e==this.den){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.msqrt=a.mbase.Subclass({type:"msqrt",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD,setTeXclass:a.mbase.setSeparateTeXclasses,adjustChild_texprimestyle:function(e){return true}});a.mroot=a.mbase.Subclass({type:"mroot",linebreakContainer:true,texClass:a.TEXCLASS.ORD,adjustChild_displaystyle:function(e){if(e===1){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f===1){e+=2}return e},adjustChild_texprimestyle:function(e){if(e===0){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.mstyle=a.mbase.Subclass({type:"mstyle",isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,inferRow:true,defaults:{scriptlevel:a.INHERIT,displaystyle:a.INHERIT,scriptsizemultiplier:Math.sqrt(1/2),scriptminsize:"8pt",mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,infixlinebreakstyle:a.LINEBREAKSTYLE.BEFORE,decimalseparator:"."},adjustChild_scriptlevel:function(g){var f=this.scriptlevel;if(f==null){f=this.Get("scriptlevel")}else{if(String(f).match(/^ *[-+]/)){var e=this.Get("scriptlevel",null,true);f=e+parseInt(f)}}return f},inheritFromMe:true,noInherit:{mpadded:{width:true,height:true,depth:true,lspace:true,voffset:true},mtable:{width:true,height:true,depth:true,align:true}},getRemoved:{fontfamily:"fontFamily",fontweight:"fontWeight",fontstyle:"fontStyle",fontsize:"fontSize"},setTeXclass:a.mbase.setChildTeXclass});a.merror=a.mbase.Subclass({type:"merror",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD});a.mpadded=a.mbase.Subclass({type:"mpadded",inferRow:true,isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,width:"",height:"",depth:"",lspace:0,voffset:0},setTeXclass:a.mbase.setChildTeXclass});a.mphantom=a.mbase.Subclass({type:"mphantom",texClass:a.TEXCLASS.ORD,inferRow:true,isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,setTeXclass:a.mbase.setChildTeXclass});a.mfenced=a.mbase.Subclass({type:"mfenced",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,open:"(",close:")",separators:","},addFakeNodes:function(){var f=this.getValues("open","close","separators");f.open=f.open.replace(/[ \t\n\r]/g,"");f.close=f.close.replace(/[ \t\n\r]/g,"");f.separators=f.separators.replace(/[ \t\n\r]/g,"");if(f.open!==""){this.SetData("open",a.mo(f.open).With({fence:true,form:a.FORM.PREFIX,texClass:a.TEXCLASS.OPEN}))}if(f.separators!==""){while(f.separators.length0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f>0){e++}return e},adjustChild_texprimestyle:function(e){if(e===this.sub){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setBaseTeXclasses});a.msub=a.msubsup.Subclass({type:"msub"});a.msup=a.msubsup.Subclass({type:"msup",sub:2,sup:1});a.mmultiscripts=a.msubsup.Subclass({type:"mmultiscripts",adjustChild_texprimestyle:function(e){if(e%2===1){return true}return this.Get("texprimestyle")}});a.mprescripts=a.mbase.Subclass({type:"mprescripts"});a.none=a.mbase.Subclass({type:"none"});a.munderover=a.mbase.Subclass({type:"munderover",base:0,under:1,over:2,sub:1,sup:2,ACCENTS:["","accentunder","accent"],linebreakContainer:true,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,accent:a.AUTO,accentunder:a.AUTO,align:a.ALIGN.CENTER,texClass:a.AUTO,subscriptshift:"",superscriptshift:""},autoDefault:function(e){if(e==="texClass"){return(this.isEmbellished()?this.CoreMO().Get(e):a.TEXCLASS.ORD)}if(e==="accent"&&this.data[this.over]){return this.data[this.over].CoreMO().Get("accent")}if(e==="accentunder"&&this.data[this.under]){return this.data[this.under].CoreMO().Get("accent")}return false},adjustChild_displaystyle:function(e){if(e>0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");var e=(this.data[this.base]&&!this.Get("displaystyle")&&this.data[this.base].CoreMO().Get("movablelimits"));if(g==this.under&&(e||!this.Get("accentunder"))){f++}if(g==this.over&&(e||!this.Get("accent"))){f++}return f},adjustChild_texprimestyle:function(e){if(e===this.base&&this.data[this.over]){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setBaseTeXclasses});a.munder=a.munderover.Subclass({type:"munder"});a.mover=a.munderover.Subclass({type:"mover",over:1,under:2,sup:1,sub:2,ACCENTS:["","accent","accentunder"]});a.mtable=a.mbase.Subclass({type:"mtable",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,align:a.ALIGN.AXIS,rowalign:a.ALIGN.BASELINE,columnalign:a.ALIGN.CENTER,groupalign:"{left}",alignmentscope:true,columnwidth:a.WIDTH.AUTO,width:a.WIDTH.AUTO,rowspacing:"1ex",columnspacing:".8em",rowlines:a.LINES.NONE,columnlines:a.LINES.NONE,frame:a.LINES.NONE,framespacing:"0.4em 0.5ex",equalrows:false,equalcolumns:false,displaystyle:false,side:a.SIDE.RIGHT,minlabelspacing:"0.8em",texClass:a.TEXCLASS.ORD,useHeight:1},adjustChild_displaystyle:function(){return(this.displaystyle!=null?this.displaystyle:this.defaults.displaystyle)},inheritFromMe:true,noInherit:{mover:{align:true},munder:{align:true},munderover:{align:true},mtable:{align:true,rowalign:true,columnalign:true,groupalign:true,alignmentscope:true,columnwidth:true,width:true,rowspacing:true,columnspacing:true,rowlines:true,columnlines:true,frame:true,framespacing:true,equalrows:true,equalcolumns:true,displaystyle:true,side:true,minlabelspacing:true,texClass:true,useHeight:1}},linebreakContainer:true,Append:function(){for(var f=0,e=arguments.length;f>10)+55296)+String.fromCharCode((e&1023)+56320)}});a.xml=a.mbase.Subclass({type:"xml",Init:function(){this.div=document.createElement("div");return this.SUPER(arguments).Init.apply(this,arguments)},Append:function(){for(var f=0,e=arguments.length;f":d.REL,"?":[1,1,b.CLOSE],"\\":d.ORD,"^":d.ORD11,_:d.ORD11,"|":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}],"#":d.ORD,"$":d.ORD,"\u002E":[0,3,b.PUNCT,{separator:true}],"\u02B9":d.ORD,"\u0300":d.ACCENT,"\u0301":d.ACCENT,"\u0303":d.WIDEACCENT,"\u0304":d.ACCENT,"\u0306":d.ACCENT,"\u0307":d.ACCENT,"\u0308":d.ACCENT,"\u030C":d.ACCENT,"\u0332":d.WIDEACCENT,"\u0338":d.REL4,"\u2015":[0,0,b.ORD,{stretchy:true}],"\u2017":[0,0,b.ORD,{stretchy:true}],"\u2020":d.BIN3,"\u2021":d.BIN3,"\u20D7":d.ACCENT,"\u2111":d.ORD,"\u2113":d.ORD,"\u2118":d.ORD,"\u211C":d.ORD,"\u2205":d.ORD,"\u221E":d.ORD,"\u2305":d.BIN3,"\u2306":d.BIN3,"\u2322":d.REL4,"\u2323":d.REL4,"\u2329":d.OPEN,"\u232A":d.CLOSE,"\u23AA":d.ORD,"\u23AF":[0,0,b.ORD,{stretchy:true}],"\u23B0":d.OPEN,"\u23B1":d.CLOSE,"\u2500":d.ORD,"\u25EF":d.BIN3,"\u2660":d.ORD,"\u2661":d.ORD,"\u2662":d.ORD,"\u2663":d.ORD,"\u3008":d.OPEN,"\u3009":d.CLOSE,"\uFE37":d.WIDEACCENT,"\uFE38":d.WIDEACCENT}}},{OPTYPES:d});var c=a.mo.prototype.OPTABLE;c.infix["^"]=d.WIDEREL;c.infix._=d.WIDEREL;c.prefix["\u2223"]=d.OPEN;c.prefix["\u2225"]=d.OPEN;c.postfix["\u2223"]=d.CLOSE;c.postfix["\u2225"]=d.CLOSE})(MathJax.ElementJax.mml);MathJax.ElementJax.mml.loadComplete("jax.js"); +MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function(){var c="2.7.5";var a=MathJax.ElementJax.mml,b=MathJax.Hub.config.menuSettings;a.mbase.Augment({toMathML:function(l){var h=(this.inferred&&this.parent.inferRow);if(l==null){l=""}var f=this.type,e=this.toMathMLattributes();if(f==="mspace"){return l+"<"+f+e+" />"}var k=[],j=(this.isToken?"":l+(h?"":" "));for(var g=0,d=this.data.length;g")}}}if(this.isToken||this.isChars){return l+"<"+f+e+">"+k.join("")+""}if(h){return k.join("\n")}if(k.length===0||(k.length===1&&k[0]==="")){return l+"<"+f+e+" />"}return l+"<"+f+e+">\n"+k.join("\n")+"\n"+l+""},toMathMLattributes:function(){var j=(this.type==="mstyle"?a.math.prototype.defaults:this.defaults);var h=(this.attrNames||a.copyAttributeNames),g=a.skipAttributes,l=a.copyAttributes;var e=[];if(this.type==="math"&&(!this.attr||!("xmlns" in this.attr))){e.push('xmlns="http://www.w3.org/1998/Math/MathML"')}if(!this.attrNames){for(var k in j){if(!g[k]&&!l[k]&&j.hasOwnProperty(k)){if(this[k]!=null&&this[k]!==j[k]){if(this.Get(k,null,1)!==this[k]){e.push(k+'="'+this.toMathMLattribute(this[k])+'"')}}}}}for(var f=0,d=h.length;f126||(k<32&&k!==10&&k!==13&&k!==9)){f[g]="&#x"+k.toString(16).toUpperCase()+";"}else{var j={"&":"&","<":"<",">":">",'"':"""}[f[g]];if(j){f[g]=j}}}else{if(g+11);var p=this.type,k=this.toMathMLattributes();var j=[],o=d+(g?" "+(n?" ":""):"")+" ";for(var h=0,f=this.data.length;h")}}if(j.length===0||(j.length===1&&j[0]==="")){if(!g){return"<"+p+k+" />"}j.push(o+"")}if(g){if(n){j.unshift(d+" ");j.push(d+" ")}j.unshift(d+" ");var l=e.originalText.replace(/[&<>]/g,function(i){return{">":">","<":"<","&":"&"}[i]});j.push(d+' '+l+"");j.push(d+" ")}return d+"<"+p+k+">\n"+j.join("\n")+"\n"+d+""}});a.msubsup.Augment({toMathML:function(j){var f=this.type;if(this.data[this.sup]==null){f="msub"}if(this.data[this.sub]==null){f="msup"}var e=this.toMathMLattributes();delete this.data[0].inferred;var h=[];for(var g=0,d=this.data.length;g\n"+h.join("\n")+"\n"+j+""}});a.munderover.Augment({toMathML:function(k){var f=this.type;var j=this.data[this.base];if(j&&j.isa(a.TeXAtom)&&j.movablelimits&&!j.Get("displaystyle")){type="msubsup";if(this.data[this.under]==null){f="msup"}if(this.data[this.over]==null){f="msub"}}else{if(this.data[this.under]==null){f="mover"}if(this.data[this.over]==null){f="munder"}}var e=this.toMathMLattributes();delete this.data[0].inferred;var h=[];for(var g=0,d=this.data.length;g\n"+h.join("\n")+"\n"+k+""}});a.TeXAtom.Augment({toMathML:function(e){var d=this.toMathMLattributes();if(!d&&this.data[0].data.length===1){return e.substr(2)+this.data[0].toMathML(e)}return e+"\n"+this.data[0].toMathML(e+" ")+"\n"+e+""}});a.chars.Augment({toMathML:function(d){return(d||"")+this.toMathMLquote(this.toString())}});a.entity.Augment({toMathML:function(d){return(d||"")+"&"+this.toMathMLquote(this.data[0])+";"}});a.xml.Augment({toMathML:function(d){return(d||"")+this.toString()}});MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function(){a.TeXmathchoice.Augment({toMathML:function(d){return this.Core().toMathML(d)}})});MathJax.Hub.Startup.signal.Post("toMathML Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/toMathML.js"); +(function(b,e){var d="2.7.5";var a=b.CombineConfig("TeX.noErrors",{disabled:false,multiLine:true,inlineDelimiters:["",""],style:{"font-size":"90%","text-align":"left",color:"black",padding:"1px 3px",border:"1px solid"}});var c="\u00A0";MathJax.Extension["TeX/noErrors"]={version:d,config:a};b.Register.StartupHook("TeX Jax Ready",function(){var f=MathJax.InputJax.TeX.formatError;MathJax.InputJax.TeX.Augment({formatError:function(j,i,k,g){if(a.disabled){return f.apply(this,arguments)}var h=j.message.replace(/\n.*/,"");b.signal.Post(["TeX Jax - parse error",h,i,k,g]);var m=a.inlineDelimiters;var l=(k||a.multiLine);if(!k){i=m[0]+i+m[1]}if(l){i=i.replace(/ /g,c)}else{i=i.replace(/\n/g," ")}return MathJax.ElementJax.mml.merror(i).With({isError:true,multiLine:l})}})});b.Register.StartupHook("HTML-CSS Jax Config",function(){b.Config({"HTML-CSS":{styles:{".MathJax .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("HTML-CSS Jax Ready",function(){var g=MathJax.ElementJax.mml;var h=MathJax.OutputJax["HTML-CSS"];var f=g.math.prototype.toHTML,i=g.merror.prototype.toHTML;g.math.Augment({toHTML:function(j,k){var l=this.data[0];if(l&&l.data[0]&&l.data[0].isError){j.style.fontSize="";j=this.HTMLcreateSpan(j);j.bbox=l.data[0].toHTML(j).bbox}else{j=f.apply(this,arguments)}return j}});g.merror.Augment({toHTML:function(p){if(!this.isError){return i.apply(this,arguments)}p=this.HTMLcreateSpan(p);p.className="noError";if(this.multiLine){p.style.display="inline-block"}var r=this.data[0].data[0].data.join("").split(/\n/);for(var o=0,l=r.length;o1){var n=(q.h+q.d)/2,j=h.TeX.x_height/2;p.parentNode.style.verticalAlign=h.Em(q.d+(j-n));q.h=j+n;q.d=n-j}p.bbox={h:q.h,d:q.d,w:k,lw:0,rw:k};return p}})});b.Register.StartupHook("SVG Jax Config",function(){b.Config({SVG:{styles:{".MathJax_SVG .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("SVG Jax Ready",function(){var g=MathJax.ElementJax.mml;var f=g.math.prototype.toSVG,h=g.merror.prototype.toSVG;g.math.Augment({toSVG:function(i,j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){i=k.data[0].toSVG(i)}else{i=f.apply(this,arguments)}return i}});g.merror.Augment({toSVG:function(n){if(!this.isError||this.Parent().type!=="math"){return h.apply(this,arguments)}n=e.addElement(n,"span",{className:"noError",isMathJax:true});if(this.multiLine){n.style.display="inline-block"}var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,j=o.length;l1){var k=n.offsetHeight/2;n.style.verticalAlign=(-k+(k/j))+"px"}return n}})});b.Register.StartupHook("NativeMML Jax Ready",function(){var h=MathJax.ElementJax.mml;var g=MathJax.Extension["TeX/noErrors"].config;var f=h.math.prototype.toNativeMML,i=h.merror.prototype.toNativeMML;h.math.Augment({toNativeMML:function(j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){j=k.data[0].toNativeMML(j)}else{j=f.apply(this,arguments)}return j}});h.merror.Augment({toNativeMML:function(n){if(!this.isError){return i.apply(this,arguments)}n=n.appendChild(document.createElement("span"));var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,k=o.length;l1){n.style.verticalAlign="middle"}}for(var p in g.style){if(g.style.hasOwnProperty(p)){var j=p.replace(/-./g,function(m){return m.charAt(1).toUpperCase()});n.style[j]=g.style[p]}}return n}})});b.Register.StartupHook("PreviewHTML Jax Config",function(){b.Config({PreviewHTML:{styles:{".MathJax_PHTML .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("PreviewHTML Jax Ready",function(){var f=MathJax.ElementJax.mml;var h=MathJax.HTML;var g=f.merror.prototype.toPreviewHTML;f.merror.Augment({toPreviewHTML:function(l){if(!this.isError){return g.apply(this,arguments)}l=this.PHTMLcreateSpan(l);l.className="noError";if(this.multiLine){l.style.display="inline-block"}var n=this.data[0].data[0].data.join("").split(/\n/);for(var k=0,j=n.length;k1){var l=1.2*j/2;o.h=l+0.25;o.d=l-0.25;n.style.verticalAlign=g.Em(0.45-l)}else{o.h=1;o.d=0.2+2/g.em}return n}})});b.Startup.signal.Post("TeX noErrors Ready")})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noErrors.js"); +MathJax.Extension["TeX/noUndefined"]={version:"2.7.5",config:MathJax.Hub.CombineConfig("TeX.noUndefined",{disabled:false,attributes:{mathcolor:"red"}})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.Extension["TeX/noUndefined"].config;var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX.Parse.prototype.csUndefined;MathJax.InputJax.TeX.Parse.Augment({csUndefined:function(d){if(b.disabled){return c.apply(this,arguments)}MathJax.Hub.signal.Post(["TeX Jax - undefined control sequence",d]);this.Push(a.mtext(d).With(b.attributes))}});MathJax.Hub.Startup.signal.Post("TeX noUndefined Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noUndefined.js"); +(function(d,c,j){var i,h="\u00A0";var k=function(m){return MathJax.Localization._.apply(MathJax.Localization,[["TeX",m]].concat([].slice.call(arguments,1)))};var f=MathJax.Object.isArray;var e=MathJax.Object.Subclass({Init:function(n,m){this.global={isInner:m};this.data=[b.start(this.global)];if(n){this.data[0].env=n}this.env=this.data[0].env},Push:function(){var o,n,p,q;for(o=0,n=arguments.length;o":"27E9","\\lt":"27E8","\\gt":"27E9","/":"/","|":["|",{texClass:i.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"23B0","\\rmoustache":"23B1","\\lgroup":"27EE","\\rgroup":"27EF","\\arrowvert":"23D0","\\Arrowvert":"2016","\\bracevert":"23AA","\\Vert":["2016",{texClass:i.TEXCLASS.ORD}],"\\|":["2016",{texClass:i.TEXCLASS.ORD}],"\\vert":["|",{texClass:i.TEXCLASS.ORD}],"\\uparrow":"2191","\\downarrow":"2193","\\updownarrow":"2195","\\Uparrow":"21D1","\\Downarrow":"21D3","\\Updownarrow":"21D5","\\backslash":"\\","\\rangle":"27E9","\\langle":"27E8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"2309","\\lceil":"2308","\\rfloor":"230B","\\lfloor":"230A","\\lbrack":"[","\\rbrack":"]"},macros:{displaystyle:["SetStyle","D",true,0],textstyle:["SetStyle","T",false,0],scriptstyle:["SetStyle","S",false,1],scriptscriptstyle:["SetStyle","SS",false,2],rm:["SetFont",i.VARIANT.NORMAL],mit:["SetFont",i.VARIANT.ITALIC],oldstyle:["SetFont",i.VARIANT.OLDSTYLE],cal:["SetFont",i.VARIANT.CALIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",i.VARIANT.BOLD],bbFont:["SetFont",i.VARIANT.DOUBLESTRUCK],scr:["SetFont",i.VARIANT.SCRIPT],frak:["SetFont",i.VARIANT.FRAKTUR],sf:["SetFont",i.VARIANT.SANSSERIF],tt:["SetFont",i.VARIANT.MONOSPACE],tiny:["SetSize",0.5],Tiny:["SetSize",0.6],scriptsize:["SetSize",0.7],small:["SetSize",0.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:["NamedFn"],arccos:["NamedFn"],arctan:["NamedFn"],arg:["NamedFn"],cos:["NamedFn"],cosh:["NamedFn"],cot:["NamedFn"],coth:["NamedFn"],csc:["NamedFn"],deg:["NamedFn"],det:"NamedOp",dim:["NamedFn"],exp:["NamedFn"],gcd:"NamedOp",hom:["NamedFn"],inf:"NamedOp",ker:["NamedFn"],lg:["NamedFn"],lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:["NamedFn"],log:["NamedFn"],max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:["NamedFn"],sin:["NamedFn"],sinh:["NamedFn"],sup:"NamedOp",tan:["NamedFn"],tanh:["NamedFn"],limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","00AF",null,1],underline:["UnderOver","005F"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"Middle",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",i.LENGTH.THINMATHSPACE],":":["Spacer",i.LENGTH.MEDIUMMATHSPACE],">":["Spacer",i.LENGTH.MEDIUMMATHSPACE],";":["Spacer",i.LENGTH.THICKMATHSPACE],"!":["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],enspace:["Spacer",".5em"],quad:["Spacer","1em"],qquad:["Spacer","2em"],thinspace:["Spacer",i.LENGTH.THINMATHSPACE],negthinspace:["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],big:["MakeBig",i.TEXCLASS.ORD,0.85],Big:["MakeBig",i.TEXCLASS.ORD,1.15],bigg:["MakeBig",i.TEXCLASS.ORD,1.45],Bigg:["MakeBig",i.TEXCLASS.ORD,1.75],bigl:["MakeBig",i.TEXCLASS.OPEN,0.85],Bigl:["MakeBig",i.TEXCLASS.OPEN,1.15],biggl:["MakeBig",i.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",i.TEXCLASS.OPEN,1.75],bigr:["MakeBig",i.TEXCLASS.CLOSE,0.85],Bigr:["MakeBig",i.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",i.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",i.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",i.TEXCLASS.REL,0.85],Bigm:["MakeBig",i.TEXCLASS.REL,1.15],biggm:["MakeBig",i.TEXCLASS.REL,1.45],Biggm:["MakeBig",i.TEXCLASS.REL,1.75],mathord:["TeXAtom",i.TEXCLASS.ORD],mathop:["TeXAtom",i.TEXCLASS.OP],mathopen:["TeXAtom",i.TEXCLASS.OPEN],mathclose:["TeXAtom",i.TEXCLASS.CLOSE],mathbin:["TeXAtom",i.TEXCLASS.BIN],mathrel:["TeXAtom",i.TEXCLASS.REL],mathpunct:["TeXAtom",i.TEXCLASS.PUNCT],mathinner:["TeXAtom",i.TEXCLASS.INNER],vcenter:["TeXAtom",i.TEXCLASS.VCENTER],mathchoice:["Extension","mathchoice"],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,true],eqalign:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:"Cr",hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],mathcal:["Macro","{\\cal #1}",1],mathscr:["Macro","{\\scr #1}",1],mathrm:["Macro","{\\rm #1}",1],mathbf:["Macro","{\\bf #1}",1],mathbb:["Macro","{\\bbFont #1}",1],Bbb:["Macro","{\\bbFont #1}",1],mathit:["Macro","{\\it #1}",1],mathfrak:["Macro","{\\frak #1}",1],mathsf:["Macro","{\\sf #1}",1],mathtt:["Macro","{\\tt #1}",1],textrm:["Macro","\\mathord{\\rm\\text{#1}}",1],textit:["Macro","\\mathord{\\it\\text{#1}}",1],textbf:["Macro","\\mathord{\\bf\\text{#1}}",1],textsf:["Macro","\\mathord{\\sf\\text{#1}}",1],texttt:["Macro","\\mathord{\\tt\\text{#1}}",1],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde","\u00A0":"Tilde",begin:"BeginEnd",end:"BeginEnd",newcommand:["Extension","newcommand"],renewcommand:["Extension","newcommand"],newenvironment:["Extension","newcommand"],renewenvironment:["Extension","newcommand"],def:["Extension","newcommand"],let:["Extension","newcommand"],verb:["Extension","verb"],boldsymbol:["Extension","boldsymbol"],tag:["Extension","AMSmath"],notag:["Extension","AMSmath"],label:["Extension","AMSmath"],ref:["Extension","AMSmath"],eqref:["Extension","AMSmath"],nonumber:["Macro","\\notag"],unicode:["Extension","unicode"],color:"Color",href:["Extension","HTML"],"class":["Extension","HTML"],style:["Extension","HTML"],cssId:["Extension","HTML"],bbox:["Extension","bbox"],mmlToken:"MmlToken",require:"Require"},environment:{array:["AlignedArray"],matrix:["Array",null,null,null,"c"],pmatrix:["Array",null,"(",")","c"],bmatrix:["Array",null,"[","]","c"],Bmatrix:["Array",null,"\\{","\\}","c"],vmatrix:["Array",null,"\\vert","\\vert","c"],Vmatrix:["Array",null,"\\Vert","\\Vert","c"],cases:["Array",null,"\\{",".","ll",null,".2em","T"],equation:[null,"Equation"],"equation*":[null,"Equation"],eqnarray:["ExtensionEnv",null,"AMSmath"],"eqnarray*":["ExtensionEnv",null,"AMSmath"],align:["ExtensionEnv",null,"AMSmath"],"align*":["ExtensionEnv",null,"AMSmath"],aligned:["ExtensionEnv",null,"AMSmath"],multline:["ExtensionEnv",null,"AMSmath"],"multline*":["ExtensionEnv",null,"AMSmath"],split:["ExtensionEnv",null,"AMSmath"],gather:["ExtensionEnv",null,"AMSmath"],"gather*":["ExtensionEnv",null,"AMSmath"],gathered:["ExtensionEnv",null,"AMSmath"],alignat:["ExtensionEnv",null,"AMSmath"],"alignat*":["ExtensionEnv",null,"AMSmath"],alignedat:["ExtensionEnv",null,"AMSmath"]},p_height:1.2/0.85});if(this.config.Macros){var m=this.config.Macros;for(var n in m){if(m.hasOwnProperty(n)){if(typeof(m[n])==="string"){g.macros[n]=["Macro",m[n]]}else{g.macros[n]=["Macro"].concat(m[n])}g.macros[n].isUser=true}}}};var a=MathJax.Object.Subclass({Init:function(n,o){this.string=n;this.i=0;this.macroCount=0;var m;if(o){m={};for(var p in o){if(o.hasOwnProperty(p)){m[p]=o[p]}}}this.stack=d.Stack(m,!!o);this.Parse();this.Push(b.stop())},Parse:function(){var o,m;while(this.i=55296&&m<56320){o+=this.string.charAt(this.i++)}if(g.special.hasOwnProperty(o)){this[g.special[o]](o)}else{if(g.letter.test(o)){this.Variable(o)}else{if(g.digit.test(o)){this.Number(o)}else{this.Other(o)}}}}},Push:function(){this.stack.Push.apply(this.stack,arguments)},mml:function(){if(this.stack.Top().type!=="mml"){return null}return this.stack.Top().data[0]},mmlToken:function(m){return m},ControlSequence:function(p){var m=this.GetCS(),o=this.csFindMacro(m);if(o){if(!f(o)){o=[o]}var n=o[0];if(!(n instanceof Function)){n=this[n]}n.apply(this,[p+m].concat(o.slice(1)))}else{if(g.mathchar0mi.hasOwnProperty(m)){this.csMathchar0mi(m,g.mathchar0mi[m])}else{if(g.mathchar0mo.hasOwnProperty(m)){this.csMathchar0mo(m,g.mathchar0mo[m])}else{if(g.mathchar7.hasOwnProperty(m)){this.csMathchar7(m,g.mathchar7[m])}else{if(g.delimiter.hasOwnProperty("\\"+m)){this.csDelimiter(m,g.delimiter["\\"+m])}else{this.csUndefined(p+m)}}}}}},csFindMacro:function(m){return(g.macros.hasOwnProperty(m)?g.macros[m]:null)},csMathchar0mi:function(m,o){var n={mathvariant:i.VARIANT.ITALIC};if(f(o)){n=o[1];o=o[0]}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csMathchar0mo:function(m,o){var n={stretchy:false};if(f(o)){n=o[1];n.stretchy=false;o=o[0]}this.Push(this.mmlToken(i.mo(i.entity("#x"+o)).With(n)))},csMathchar7:function(m,o){var n={mathvariant:i.VARIANT.NORMAL};if(f(o)){n=o[1];o=o[0]}if(this.stack.env.font){n.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csDelimiter:function(m,o){var n={};if(f(o)){n=o[1];o=o[0]}if(o.length===4){o=i.entity("#x"+o)}else{o=i.chars(o)}this.Push(this.mmlToken(i.mo(o).With({fence:false,stretchy:false}).With(n)))},csUndefined:function(m){d.Error(["UndefinedControlSequence","Undefined control sequence %1",m])},Variable:function(n){var m={};if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.chars(n)).With(m)))},Number:function(p){var m,o=this.string.slice(this.i-1).match(g.number);if(o){m=i.mn(o[0].replace(/[{}]/g,""));this.i+=o[0].length-1}else{m=i.mo(i.chars(p))}if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(m))},Open:function(m){this.Push(b.open())},Close:function(m){this.Push(b.close())},Tilde:function(m){this.Push(i.mtext(i.chars(h)))},Space:function(m){},Superscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sup;if((o.type==="msubsup"&&o.data[o.sup])||(o.type==="munderover"&&o.data[o.over]&&!o.subsupOK)){d.Error(["DoubleExponent","Double exponent: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.over]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.over}else{o=i.msubsup(o,null,null);m=o.sup}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},Subscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sub;if((o.type==="msubsup"&&o.data[o.sub])||(o.type==="munderover"&&o.data[o.under]&&!o.subsupOK)){d.Error(["DoubleSubscripts","Double subscripts: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.under]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.under}else{o=i.msubsup(o,null,null);m=o.sub}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},PRIME:"\u2032",SMARTQUOTE:"\u2019",Prime:function(o){var n=this.stack.Prev();if(!n){n=i.mi()}if(n.type==="msubsup"&&n.data[n.sup]){d.Error(["DoubleExponentPrime","Prime causes double exponent: use braces to clarify"])}var m="";this.i--;do{m+=this.PRIME;this.i++,o=this.GetNext()}while(o==="'"||o===this.SMARTQUOTE);m=["","\u2032","\u2033","\u2034","\u2057"][m.length]||m;this.Push(b.prime(n,this.mmlToken(i.mo(m))))},mi2mo:function(m){var n=i.mo();n.Append.apply(n,m.data);var o;for(o in n.defaults){if(n.defaults.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}for(o in i.copyAttributes){if(i.copyAttributes.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}n.lspace=n.rspace="0";n.useMMLspacing&=~(n.SPACE_ATTR.lspace|n.SPACE_ATTR.rspace);return n},Comment:function(m){while(this.id.config.MAXMACROS){d.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},Matrix:function(n,p,v,r,u,o,m,w,t){var s=this.GetNext();if(s===""){d.Error(["MissingArgFor","Missing argument for %1",n])}if(s==="{"){this.i++}else{this.string=s+"}"+this.string.slice(this.i+1);this.i=0}var q=b.array().With({requireClose:true,arraydef:{rowspacing:(o||"4pt"),columnspacing:(u||"1em")}});if(w){q.isCases=true}if(t){q.isNumbered=true;q.arraydef.side=t}if(p||v){q.open=p;q.close=v}if(m==="D"){q.arraydef.displaystyle=true}if(r!=null){q.arraydef.columnalign=r}this.Push(q)},Entry:function(p){this.Push(b.cell().With({isEntry:true,name:p}));if(this.stack.Top().isCases){var o=this.string;var t=0,s=-1,q=this.i,n=o.length;while(qd.config.MAXMACROS){d.Error(["MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?"])}if(q[0]&&this[q[0]]){n=this[q[0]].apply(this,[n].concat(q.slice(2)))}}this.Push(n)},envFindName:function(m){return(g.environment.hasOwnProperty(m)?g.environment[m]:null)},Equation:function(m,n){return n},ExtensionEnv:function(n,m){this.Extension(n.name,m,"environment")},Array:function(n,p,u,s,t,o,m,q){if(!s){s=this.GetArgument("\\begin{"+n.name+"}")}var v=("c"+s).replace(/[^clr|:]/g,"").replace(/[^|:]([|:])+/g,"$1");s=s.replace(/[^clr]/g,"").split("").join(" ");s=s.replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center");var r=b.array().With({arraydef:{columnalign:s,columnspacing:(t||"1em"),rowspacing:(o||"4pt")}});if(v.match(/[|:]/)){if(v.charAt(0).match(/[|:]/)){r.frame.push("left");r.frame.dashed=v.charAt(0)===":"}if(v.charAt(v.length-1).match(/[|:]/)){r.frame.push("right")}v=v.substr(1,v.length-2);r.arraydef.columnlines=v.split("").join(" ").replace(/[^|: ]/g,"none").replace(/\|/g,"solid").replace(/:/g,"dashed")}if(p){r.open=this.convertDelimiter(p)}if(u){r.close=this.convertDelimiter(u)}if(m==="D"){r.arraydef.displaystyle=true}else{if(m){r.arraydef.displaystyle=false}}if(m==="S"){r.arraydef.scriptlevel=1}if(q){r.arraydef.useHeight=false}this.Push(n);return r},AlignedArray:function(m){var n=this.GetBrackets("\\begin{"+m.name+"}");return this.setArrayAlign(this.Array.apply(this,arguments),n)},setArrayAlign:function(n,m){m=this.trimSpaces(m||"");if(m==="t"){n.arraydef.align="baseline 1"}else{if(m==="b"){n.arraydef.align="baseline -1"}else{if(m==="c"){n.arraydef.align="center"}else{if(m){n.arraydef.align=m}}}}return n},convertDelimiter:function(m){if(m){m=(g.delimiter.hasOwnProperty(m)?g.delimiter[m]:null)}if(m==null){return null}if(f(m)){m=m[0]}if(m.length===4){m=String.fromCharCode(parseInt(m,16))}return m},trimSpaces:function(n){if(typeof(n)!="string"){return n}var m=n.replace(/^\s+|\s+$/g,"");if(m.match(/\\$/)&&n.match(/ $/)){m+=" "}return m},nextIsSpace:function(){return this.string.charAt(this.i).match(/\s/)},GetNext:function(){while(this.nextIsSpace()){this.i++}return this.string.charAt(this.i)},GetCS:function(){var m=this.string.slice(this.i).match(/^([a-z]+|.) ?/i);if(m){this.i+=m[1].length;return m[1]}else{this.i++;return" "}},GetArgument:function(n,o){switch(this.GetNext()){case"":if(!o){d.Error(["MissingArgFor","Missing argument for %1",n])}return null;case"}":if(!o){d.Error(["ExtraCloseMissingOpen","Extra close brace or missing open brace"])}return null;case"\\":this.i++;return"\\"+this.GetCS();case"{":var m=++this.i,p=1;while(this.i1){n=[i.mrow.apply(i,n)]}}return n},InternalText:function(n,m){n=n.replace(/^\s+/,h).replace(/\s+$/,h);return i.mtext(i.chars(n)).With(m)},setDef:function(m,n){n.isUser=true;g.macros[m]=n},setEnv:function(m,n){n.isUser=true;g.environment[m]=n},SubstituteArgs:function(n,m){var q="";var p="";var r;var o=0;while(on.length){d.Error(["IllegalMacroParam","Illegal macro parameter reference"])}p=this.AddArgs(this.AddArgs(p,q),n[r-1]);q=""}}else{q+=r}}}return this.AddArgs(p,q)},AddArgs:function(n,m){if(m.match(/^[a-z]/i)&&n.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)){n+=" "}if(n.length+m.length>d.config.MAXBUFFER){d.Error(["MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?"])}return n+m}});d.Augment({Stack:e,Parse:a,Definitions:g,Startup:l,config:{MAXMACROS:10000,MAXBUFFER:5*1024},sourceMenuTitle:["TeXCommands","TeX Commands"],annotationEncoding:"application/x-tex",prefilterHooks:MathJax.Callback.Hooks(true),postfilterHooks:MathJax.Callback.Hooks(true),Config:function(){this.SUPER(arguments).Config.apply(this,arguments);if(this.config.equationNumbers.autoNumber!=="none"){if(!this.config.extensions){this.config.extensions=[]}this.config.extensions.push("AMSmath.js")}},Translate:function(m){var n,o=false,q=MathJax.HTML.getScript(m);var s=(m.type.replace(/\n/g," ").match(/(;|\s|\n)mode\s*=\s*display(;|\s|\n|$)/)!=null);var r={math:q,display:s,script:m};var t=this.prefilterHooks.Execute(r);if(t){return t}q=r.math;try{n=d.Parse(q).mml()}catch(p){if(!p.texError){throw p}n=this.formatError(p,q,s,m);o=true}if(n.isa(i.mtable)&&n.displaystyle==="inherit"){n.displaystyle=s}if(n.inferred){n=i.apply(MathJax.ElementJax,n.data)}else{n=i(n)}if(s){n.root.display="block"}if(o){n.texError=true}r.math=n;return this.postfilterHooks.Execute(r)||r.math},prefilterMath:function(n,o,m){return n},postfilterMath:function(n,o,m){this.combineRelations(n.root);return n},formatError:function(p,o,q,m){var n=p.message.replace(/\n.*/,"");c.signal.Post(["TeX Jax - parse error",n,o,q,m]);return i.Error(n)},Error:function(m){if(f(m)){m=k.apply(k,m)}throw c.Insert(Error(m),{texError:true})},Macro:function(m,n,o){g.macros[m]=["Macro"].concat([].slice.call(arguments,1));g.macros[m].isUser=true},fenced:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.INNER});m.Append(i.mo(o).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.OPEN}));if(n.type==="mrow"&&n.inferred){m.Append.apply(m,n.data)}else{m.Append(n)}m.Append(i.mo(p).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.CLOSE}));return m},fixedFence:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.ORD});if(o){m.Append(this.mathPalette(o,"l"))}if(n.type==="mrow"){m.Append.apply(m,n.data)}else{m.Append(n)}if(p){m.Append(this.mathPalette(p,"r"))}return m},mathPalette:function(p,n){if(p==="{"||p==="}"){p="\\"+p}var o="{\\bigg"+n+" "+p+"}",m="{\\big"+n+" "+p+"}";return d.Parse("\\mathchoice"+o+m+m+m,{}).mml()},combineRelations:function(q){var r,n,p,o;for(r=0,n=q.data.length;r0){p+="rl";o.push("0em 0em");q--}o=o.join(" ");if(i){return this.AMSarray(l,j,i,p,o)}var m=this.AMSarray(l,j,i,p,o);return this.setArrayAlign(m,k)},EquationBegin:function(i,j){this.checkEqnEnv();this.stack.global.forcetag=(j&&a.autoNumber!=="none");return i},EquationStar:function(i,j){this.stack.global.tagged=true;return j},checkEqnEnv:function(){if(this.stack.global.eqnenv){h.Error(["ErroneousNestingEq","Erroneous nesting of equation structures"])}this.stack.global.eqnenv=true},MultiIntegral:function(j,m){var l=this.GetNext();if(l==="\\"){var k=this.i;l=this.GetArgument(j);this.i=k;if(l==="\\limits"){if(j==="\\idotsint"){m="\\!\\!\\mathop{\\,\\,"+m+"}"}else{m="\\!\\!\\!\\mathop{\\,\\,\\,"+m+"}"}}}this.string=m+" "+this.string.slice(this.i);this.i=0},xArrow:function(k,o,n,i){var m={width:"+"+(n+i)+"mu",lspace:n+"mu"};var p=this.GetBrackets(k),q=this.ParseArg(k);var s=b.mo(b.chars(String.fromCharCode(o))).With({stretchy:true,texClass:b.TEXCLASS.REL});var j=b.munderover(s);j.SetData(j.over,b.mpadded(q).With(m).With({voffset:".15em"}));if(p){p=h.Parse(p,this.stack.env).mml();j.SetData(j.under,b.mpadded(p).With(m).With({voffset:"-.24em"}))}this.Push(j.With({subsupOK:true}))},GetDelimiterArg:function(i){var j=this.trimSpaces(this.GetArgument(i));if(j==""){return null}if(j in d.delimiter){return j}h.Error(["MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",i])},GetStar:function(){var i=(this.GetNext()==="*");if(i){this.i++}return i}});f.Augment({autoTag:function(){var j=this.global;if(!j.notag){g.number++;j.tagID=a.formatNumber(g.number.toString());var i=h.Parse("\\text{"+a.formatTag(j.tagID)+"}",{}).mml();j.tag=b.mtd(i).With({id:a.formatID(j.tagID)})}},getTag:function(){var m=this.global,k=m.tag;m.tagged=true;if(m.label){if(a.useLabelIds){k.id=a.formatID(m.label)}g.eqlabels[m.label]={tag:m.tagID,id:k.id}}if(document.getElementById(k.id)||g.IDs[k.id]||g.eqIDs[k.id]){var l=0,j;do{l++;j=k.id+"_"+l}while(document.getElementById(j)||g.IDs[j]||g.eqIDs[j]);k.id=j;if(m.label){g.eqlabels[m.label].id=j}}g.eqIDs[k.id]=1;this.clearTag();return k},clearTag:function(){var i=this.global;delete i.tag;delete i.tagID;delete i.label},fixInitialMO:function(l){for(var k=0,j=l.length;k element, not %1","<"+j.firstChild.nodeName+">"])}var i={math:j.firstChild,script:e};c.DOMfilterHooks.Execute(i);this.mml=this.MakeMML(i.math)},MakeMML:function(h){var i=String(h.getAttribute("class")||"");var f,g=h.nodeName.toLowerCase().replace(/^[a-z]+:/,"");var e=(i.match(/(^| )MJX-TeXAtom-([^ ]*)/));if(e){f=this.TeXAtom(e[2],e[2]==="OP"&&!i.match(/MJX-fixedlimits/))}else{if(!(a[g]&&a[g].isa&&a[g].isa(a.mbase))){MathJax.Hub.signal.Post(["MathML Jax - unknown node type",g]);return a.Error(b("UnknownNodeType","Unknown node type: %1",g))}else{f=a[g]()}}this.AddAttributes(f,h);this.CheckClass(f,f["class"]);this.AddChildren(f,h);if(c.config.useMathMLspacing){f.useMMLspacing=8}return f},TeXAtom:function(g,f){var e=a.TeXAtom().With({texClass:a.TEXCLASS[g]});if(f){e.movesupsub=e.movablelimits=true}return e},CheckClass:function(f,h){h=(h||"").split(/ /);var j=[];for(var g=0,e=h.length;g=2){var l=e.data[0],n=e.data[e.data.length-1];if(l.type==="mo"&&l.Get("fence")&&n.type==="mo"&&n.Get("fence")){if(l.data[0]){e.open=l.data.join("")}if(n.data[0]){e.close=n.data.join("")}}}},preProcessMath:function(f){if(f.match(/^<[a-z]+:/i)&&!f.match(/^<[^<>]* xmlns:/)){f=f.replace(/^<([a-z]+)(:math)/i,'<$1$2 xmlns:$1="http://www.w3.org/1998/Math/MathML"')}var e=f.match(/^(])+)>)/i);if(e&&e[2].match(/ (?!xmlns=)[a-z]+=\"http:/i)){f=e[1].replace(/ (?!xmlns=)([a-z]+=(['"])http:.*?\2)/ig," xmlns:$1 $1")+f.substr(e[0].length)}if(f.match(/^]/i)&&!f.match(/^<[^<>]* xmlns=/)){f=f.replace(/^<(math)/i,'\s*$/,"$2");return f.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity)},trimSpace:function(e){return e.replace(/[\t\n\r]/g," ").replace(/^ +/,"").replace(/ +$/,"").replace(/ +/g," ")},replaceEntity:function(g,f){if(f.match(/^(lt|amp|quot)$/)){return g}if(c.Parse.Entity[f]){return c.Parse.Entity[f]}var h=f.charAt(0).toLowerCase();var e=f.match(/^[a-zA-Z](fr|scr|opf)$/);if(e){h=e[1]}if(!c.Parse.loaded[h]){c.Parse.loaded[h]=true;MathJax.Hub.RestartAfter(MathJax.Ajax.Require(c.entityDir+"/"+h+".js"))}return g}},{loaded:[]});c.Augment({sourceMenuTitle:["OriginalMathML","Original MathML"],prefilterHooks:MathJax.Callback.Hooks(true),DOMfilterHooks:MathJax.Callback.Hooks(true),postfilterHooks:MathJax.Callback.Hooks(true),Translate:function(e){if(!this.ParseXML){this.ParseXML=this.createParser()}var f,h,i={script:e};if(e.firstChild&&e.firstChild.nodeName.toLowerCase().replace(/^[a-z]+:/,"")==="math"){i.math=e.firstChild}else{h=MathJax.HTML.getScript(e);if(d.isMSIE){h=h.replace(/( )+$/,"")}i.math=h}var j=this.prefilterHooks.Execute(i);if(j){return j}h=i.math;try{f=c.Parse(h,e).mml}catch(g){if(!g.mathmlError){throw g}f=this.formatError(g,h,e)}i.math=a(f);return this.postfilterHooks.Execute(i)||i.math},prefilterMath:function(f,e){return f},prefilterMathML:function(f,e){return f},formatError:function(h,g,e){var f=h.message.replace(/\n.*/,"");MathJax.Hub.signal.Post(["MathML Jax - parse error",f,g,e]);return a.Error(f)},Error:function(e){if(MathJax.Object.isArray(e)){e=b.apply(b,e)}throw MathJax.Hub.Insert(Error(e),{mathmlError:true})},parseDOM:function(e){return this.parser.parseFromString(e,"text/xml")},parseMS:function(e){return(this.parser.loadXML(e)?this.parser:null)},parseDIV:function(e){this.div.innerHTML="
"+e.replace(/<([a-z]+)([^>]*)\/>/g,"<$1$2>")+"
";var f=this.div.firstChild;this.div.innerHTML="";return f},parseError:function(e){return null},createMSParser:function(){var j=null;var f=["MSXML2.DOMDocument.6.0","MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument.2.0","Microsoft.XMLDOM"];for(var g=0,e=f.length;g=ab-1){this.lastChild=ae}this.childNodes[ad]=ae;ae.nextSibling=ac.nextSibling;ac.nextSibling=ac.parent=null;return ac},hasChildNodes:function(ab){return(this.childNodes.length>0)},toString:function(){return"{"+this.childNodes.join("")+"}"}});var x=function(){g=MathJax.ElementJax.mml;var ab=g.mbase.prototype.Init;g.mbase.Augment({firstChild:null,lastChild:null,nodeValue:null,nextSibling:null,Init:function(){var ac=ab.apply(this,arguments)||this;ac.childNodes=ac.data;ac.nodeName=ac.type;return ac},appendChild:function(af){if(af.parent){af.parent.removeChild(af)}var ad=arguments;if(af.isa(X)){ad=af.childNodes;af.data=af.childNodes=[];af.firstChild=af.lastChild=null}for(var ae=0,ac=ad.length;ae=ac-1){this.lastChild=af}this.SetData(ae,af);af.nextSibling=ad.nextSibling;ad.nextSibling=ad.parent=null;return ad},hasChildNodes:function(ac){return(this.childNodes.length>0)},setAttribute:function(ac,ad){this[ac]=ad}})};var Q={};var e={getElementById:true,createElementNS:function(ac,ab){var ad=g[ab]();if(ab==="mo"&&aa.config.useMathMLspacing){ad.useMMLspacing=128}return ad},createTextNode:function(ab){return g.chars(ab).With({nodeValue:ab})},createDocumentFragment:function(){return X()}};var J={appName:"MathJax"};var C="blue";var o=true;var v=true;var d=".";var f=true;var l=(J.appName.slice(0,9)=="Microsoft");function E(ab){if(l){return e.createElement(ab)}else{return e.createElementNS("http://www.w3.org/1999/xhtml",ab)}}var W="http://www.w3.org/1998/Math/MathML";function P(ab){if(l){return e.createElement("m:"+ab)}else{return e.createElementNS(W,ab)}}function O(ab,ad){var ac;if(l){ac=e.createElement("m:"+ab)}else{ac=e.createElementNS(W,ab)}if(ad){ac.appendChild(ad)}return ac}function u(ab,ac){z.push({input:ab,tag:"mo",output:ac,tex:null,ttype:V});B()}function r(ab){z.push(ab);B()}var D=["\uD835\uDC9C","\u212C","\uD835\uDC9E","\uD835\uDC9F","\u2130","\u2131","\uD835\uDCA2","\u210B","\u2110","\uD835\uDCA5","\uD835\uDCA6","\u2112","\u2133","\uD835\uDCA9","\uD835\uDCAA","\uD835\uDCAB","\uD835\uDCAC","\u211B","\uD835\uDCAE","\uD835\uDCAF","\uD835\uDCB0","\uD835\uDCB1","\uD835\uDCB2","\uD835\uDCB3","\uD835\uDCB4","\uD835\uDCB5","\uD835\uDCB6","\uD835\uDCB7","\uD835\uDCB8","\uD835\uDCB9","\u212F","\uD835\uDCBB","\u210A","\uD835\uDCBD","\uD835\uDCBE","\uD835\uDCBF","\uD835\uDCC0","\uD835\uDCC1","\uD835\uDCC2","\uD835\uDCC3","\u2134","\uD835\uDCC5","\uD835\uDCC6","\uD835\uDCC7","\uD835\uDCC8","\uD835\uDCC9","\uD835\uDCCA","\uD835\uDCCB","\uD835\uDCCC","\uD835\uDCCD","\uD835\uDCCE","\uD835\uDCCF"];var H=["\uD835\uDD04","\uD835\uDD05","\u212D","\uD835\uDD07","\uD835\uDD08","\uD835\uDD09","\uD835\uDD0A","\u210C","\u2111","\uD835\uDD0D","\uD835\uDD0E","\uD835\uDD0F","\uD835\uDD10","\uD835\uDD11","\uD835\uDD12","\uD835\uDD13","\uD835\uDD14","\u211C","\uD835\uDD16","\uD835\uDD17","\uD835\uDD18","\uD835\uDD19","\uD835\uDD1A","\uD835\uDD1B","\uD835\uDD1C","\u2128","\uD835\uDD1E","\uD835\uDD1F","\uD835\uDD20","\uD835\uDD21","\uD835\uDD22","\uD835\uDD23","\uD835\uDD24","\uD835\uDD25","\uD835\uDD26","\uD835\uDD27","\uD835\uDD28","\uD835\uDD29","\uD835\uDD2A","\uD835\uDD2B","\uD835\uDD2C","\uD835\uDD2D","\uD835\uDD2E","\uD835\uDD2F","\uD835\uDD30","\uD835\uDD31","\uD835\uDD32","\uD835\uDD33","\uD835\uDD34","\uD835\uDD35","\uD835\uDD36","\uD835\uDD37"];var w=["\uD835\uDD38","\uD835\uDD39","\u2102","\uD835\uDD3B","\uD835\uDD3C","\uD835\uDD3D","\uD835\uDD3E","\u210D","\uD835\uDD40","\uD835\uDD41","\uD835\uDD42","\uD835\uDD43","\uD835\uDD44","\u2115","\uD835\uDD46","\u2119","\u211A","\u211D","\uD835\uDD4A","\uD835\uDD4B","\uD835\uDD4C","\uD835\uDD4D","\uD835\uDD4E","\uD835\uDD4F","\uD835\uDD50","\u2124","\uD835\uDD52","\uD835\uDD53","\uD835\uDD54","\uD835\uDD55","\uD835\uDD56","\uD835\uDD57","\uD835\uDD58","\uD835\uDD59","\uD835\uDD5A","\uD835\uDD5B","\uD835\uDD5C","\uD835\uDD5D","\uD835\uDD5E","\uD835\uDD5F","\uD835\uDD60","\uD835\uDD61","\uD835\uDD62","\uD835\uDD63","\uD835\uDD64","\uD835\uDD65","\uD835\uDD66","\uD835\uDD67","\uD835\uDD68","\uD835\uDD69","\uD835\uDD6A","\uD835\uDD6B"];var c=0,A=1,U=2,i=3,b=4,h=5,a=6,L=7,V=8,m=9,Y=10,K=15;var k={input:'"',tag:"mtext",output:"mbox",tex:null,ttype:Y};var z=[{input:"alpha",tag:"mi",output:"\u03B1",tex:null,ttype:c},{input:"beta",tag:"mi",output:"\u03B2",tex:null,ttype:c},{input:"chi",tag:"mi",output:"\u03C7",tex:null,ttype:c},{input:"delta",tag:"mi",output:"\u03B4",tex:null,ttype:c},{input:"Delta",tag:"mo",output:"\u0394",tex:null,ttype:c},{input:"epsi",tag:"mi",output:"\u03B5",tex:"epsilon",ttype:c},{input:"varepsilon",tag:"mi",output:"\u025B",tex:null,ttype:c},{input:"eta",tag:"mi",output:"\u03B7",tex:null,ttype:c},{input:"gamma",tag:"mi",output:"\u03B3",tex:null,ttype:c},{input:"Gamma",tag:"mo",output:"\u0393",tex:null,ttype:c},{input:"iota",tag:"mi",output:"\u03B9",tex:null,ttype:c},{input:"kappa",tag:"mi",output:"\u03BA",tex:null,ttype:c},{input:"lambda",tag:"mi",output:"\u03BB",tex:null,ttype:c},{input:"Lambda",tag:"mo",output:"\u039B",tex:null,ttype:c},{input:"lamda",tag:"mi",output:"\u03BB",tex:null,ttype:c},{input:"Lamda",tag:"mo",output:"\u039B",tex:null,ttype:c},{input:"mu",tag:"mi",output:"\u03BC",tex:null,ttype:c},{input:"nu",tag:"mi",output:"\u03BD",tex:null,ttype:c},{input:"omega",tag:"mi",output:"\u03C9",tex:null,ttype:c},{input:"Omega",tag:"mo",output:"\u03A9",tex:null,ttype:c},{input:"phi",tag:"mi",output:f?"\u03D5":"\u03C6",tex:null,ttype:c},{input:"varphi",tag:"mi",output:f?"\u03C6":"\u03D5",tex:null,ttype:c},{input:"Phi",tag:"mo",output:"\u03A6",tex:null,ttype:c},{input:"pi",tag:"mi",output:"\u03C0",tex:null,ttype:c},{input:"Pi",tag:"mo",output:"\u03A0",tex:null,ttype:c},{input:"psi",tag:"mi",output:"\u03C8",tex:null,ttype:c},{input:"Psi",tag:"mi",output:"\u03A8",tex:null,ttype:c},{input:"rho",tag:"mi",output:"\u03C1",tex:null,ttype:c},{input:"sigma",tag:"mi",output:"\u03C3",tex:null,ttype:c},{input:"Sigma",tag:"mo",output:"\u03A3",tex:null,ttype:c},{input:"tau",tag:"mi",output:"\u03C4",tex:null,ttype:c},{input:"theta",tag:"mi",output:"\u03B8",tex:null,ttype:c},{input:"vartheta",tag:"mi",output:"\u03D1",tex:null,ttype:c},{input:"Theta",tag:"mo",output:"\u0398",tex:null,ttype:c},{input:"upsilon",tag:"mi",output:"\u03C5",tex:null,ttype:c},{input:"xi",tag:"mi",output:"\u03BE",tex:null,ttype:c},{input:"Xi",tag:"mo",output:"\u039E",tex:null,ttype:c},{input:"zeta",tag:"mi",output:"\u03B6",tex:null,ttype:c},{input:"*",tag:"mo",output:"\u22C5",tex:"cdot",ttype:c},{input:"**",tag:"mo",output:"\u2217",tex:"ast",ttype:c},{input:"***",tag:"mo",output:"\u22C6",tex:"star",ttype:c},{input:"//",tag:"mo",output:"/",tex:null,ttype:c},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:c},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:c},{input:"xx",tag:"mo",output:"\u00D7",tex:"times",ttype:c},{input:"|><",tag:"mo",output:"\u22C9",tex:"ltimes",ttype:c},{input:"><|",tag:"mo",output:"\u22CA",tex:"rtimes",ttype:c},{input:"|><|",tag:"mo",output:"\u22C8",tex:"bowtie",ttype:c},{input:"-:",tag:"mo",output:"\u00F7",tex:"div",ttype:c},{input:"divide",tag:"mo",output:"-:",tex:null,ttype:V},{input:"@",tag:"mo",output:"\u2218",tex:"circ",ttype:c},{input:"o+",tag:"mo",output:"\u2295",tex:"oplus",ttype:c},{input:"ox",tag:"mo",output:"\u2297",tex:"otimes",ttype:c},{input:"o.",tag:"mo",output:"\u2299",tex:"odot",ttype:c},{input:"sum",tag:"mo",output:"\u2211",tex:null,ttype:L},{input:"prod",tag:"mo",output:"\u220F",tex:null,ttype:L},{input:"^^",tag:"mo",output:"\u2227",tex:"wedge",ttype:c},{input:"^^^",tag:"mo",output:"\u22C0",tex:"bigwedge",ttype:L},{input:"vv",tag:"mo",output:"\u2228",tex:"vee",ttype:c},{input:"vvv",tag:"mo",output:"\u22C1",tex:"bigvee",ttype:L},{input:"nn",tag:"mo",output:"\u2229",tex:"cap",ttype:c},{input:"nnn",tag:"mo",output:"\u22C2",tex:"bigcap",ttype:L},{input:"uu",tag:"mo",output:"\u222A",tex:"cup",ttype:c},{input:"uuu",tag:"mo",output:"\u22C3",tex:"bigcup",ttype:L},{input:"!=",tag:"mo",output:"\u2260",tex:"ne",ttype:c},{input:":=",tag:"mo",output:":=",tex:null,ttype:c},{input:"lt",tag:"mo",output:"<",tex:null,ttype:c},{input:"<=",tag:"mo",output:"\u2264",tex:"le",ttype:c},{input:"lt=",tag:"mo",output:"\u2264",tex:"leq",ttype:c},{input:"gt",tag:"mo",output:">",tex:null,ttype:c},{input:">=",tag:"mo",output:"\u2265",tex:"ge",ttype:c},{input:"gt=",tag:"mo",output:"\u2265",tex:"geq",ttype:c},{input:"-<",tag:"mo",output:"\u227A",tex:"prec",ttype:c},{input:"-lt",tag:"mo",output:"\u227A",tex:null,ttype:c},{input:">-",tag:"mo",output:"\u227B",tex:"succ",ttype:c},{input:"-<=",tag:"mo",output:"\u2AAF",tex:"preceq",ttype:c},{input:">-=",tag:"mo",output:"\u2AB0",tex:"succeq",ttype:c},{input:"in",tag:"mo",output:"\u2208",tex:null,ttype:c},{input:"!in",tag:"mo",output:"\u2209",tex:"notin",ttype:c},{input:"sub",tag:"mo",output:"\u2282",tex:"subset",ttype:c},{input:"sup",tag:"mo",output:"\u2283",tex:"supset",ttype:c},{input:"sube",tag:"mo",output:"\u2286",tex:"subseteq",ttype:c},{input:"supe",tag:"mo",output:"\u2287",tex:"supseteq",ttype:c},{input:"-=",tag:"mo",output:"\u2261",tex:"equiv",ttype:c},{input:"~=",tag:"mo",output:"\u2245",tex:"cong",ttype:c},{input:"~~",tag:"mo",output:"\u2248",tex:"approx",ttype:c},{input:"prop",tag:"mo",output:"\u221D",tex:"propto",ttype:c},{input:"and",tag:"mtext",output:"and",tex:null,ttype:a},{input:"or",tag:"mtext",output:"or",tex:null,ttype:a},{input:"not",tag:"mo",output:"\u00AC",tex:"neg",ttype:c},{input:"=>",tag:"mo",output:"\u21D2",tex:"implies",ttype:c},{input:"if",tag:"mo",output:"if",tex:null,ttype:a},{input:"<=>",tag:"mo",output:"\u21D4",tex:"iff",ttype:c},{input:"AA",tag:"mo",output:"\u2200",tex:"forall",ttype:c},{input:"EE",tag:"mo",output:"\u2203",tex:"exists",ttype:c},{input:"_|_",tag:"mo",output:"\u22A5",tex:"bot",ttype:c},{input:"TT",tag:"mo",output:"\u22A4",tex:"top",ttype:c},{input:"|--",tag:"mo",output:"\u22A2",tex:"vdash",ttype:c},{input:"|==",tag:"mo",output:"\u22A8",tex:"models",ttype:c},{input:"(",tag:"mo",output:"(",tex:"left(",ttype:b},{input:")",tag:"mo",output:")",tex:"right)",ttype:h},{input:"[",tag:"mo",output:"[",tex:"left[",ttype:b},{input:"]",tag:"mo",output:"]",tex:"right]",ttype:h},{input:"{",tag:"mo",output:"{",tex:null,ttype:b},{input:"}",tag:"mo",output:"}",tex:null,ttype:h},{input:"|",tag:"mo",output:"|",tex:null,ttype:m},{input:":|:",tag:"mo",output:"|",tex:null,ttype:c},{input:"|:",tag:"mo",output:"|",tex:null,ttype:b},{input:":|",tag:"mo",output:"|",tex:null,ttype:h},{input:"(:",tag:"mo",output:"\u2329",tex:"langle",ttype:b},{input:":)",tag:"mo",output:"\u232A",tex:"rangle",ttype:h},{input:"<<",tag:"mo",output:"\u2329",tex:null,ttype:b},{input:">>",tag:"mo",output:"\u232A",tex:null,ttype:h},{input:"{:",tag:"mo",output:"{:",tex:null,ttype:b,invisible:true},{input:":}",tag:"mo",output:":}",tex:null,ttype:h,invisible:true},{input:"int",tag:"mo",output:"\u222B",tex:null,ttype:c},{input:"dx",tag:"mi",output:"{:d x:}",tex:null,ttype:V},{input:"dy",tag:"mi",output:"{:d y:}",tex:null,ttype:V},{input:"dz",tag:"mi",output:"{:d z:}",tex:null,ttype:V},{input:"dt",tag:"mi",output:"{:d t:}",tex:null,ttype:V},{input:"oint",tag:"mo",output:"\u222E",tex:null,ttype:c},{input:"del",tag:"mo",output:"\u2202",tex:"partial",ttype:c},{input:"grad",tag:"mo",output:"\u2207",tex:"nabla",ttype:c},{input:"+-",tag:"mo",output:"\u00B1",tex:"pm",ttype:c},{input:"O/",tag:"mo",output:"\u2205",tex:"emptyset",ttype:c},{input:"oo",tag:"mo",output:"\u221E",tex:"infty",ttype:c},{input:"aleph",tag:"mo",output:"\u2135",tex:null,ttype:c},{input:"...",tag:"mo",output:"...",tex:"ldots",ttype:c},{input:":.",tag:"mo",output:"\u2234",tex:"therefore",ttype:c},{input:":'",tag:"mo",output:"\u2235",tex:"because",ttype:c},{input:"/_",tag:"mo",output:"\u2220",tex:"angle",ttype:c},{input:"/_\\",tag:"mo",output:"\u25B3",tex:"triangle",ttype:c},{input:"'",tag:"mo",output:"\u2032",tex:"prime",ttype:c},{input:"tilde",tag:"mover",output:"~",tex:null,ttype:A,acc:true},{input:"\\ ",tag:"mo",output:"\u00A0",tex:null,ttype:c},{input:"frown",tag:"mo",output:"\u2322",tex:null,ttype:c},{input:"quad",tag:"mo",output:"\u00A0\u00A0",tex:null,ttype:c},{input:"qquad",tag:"mo",output:"\u00A0\u00A0\u00A0\u00A0",tex:null,ttype:c},{input:"cdots",tag:"mo",output:"\u22EF",tex:null,ttype:c},{input:"vdots",tag:"mo",output:"\u22EE",tex:null,ttype:c},{input:"ddots",tag:"mo",output:"\u22F1",tex:null,ttype:c},{input:"diamond",tag:"mo",output:"\u22C4",tex:null,ttype:c},{input:"square",tag:"mo",output:"\u25A1",tex:null,ttype:c},{input:"|__",tag:"mo",output:"\u230A",tex:"lfloor",ttype:c},{input:"__|",tag:"mo",output:"\u230B",tex:"rfloor",ttype:c},{input:"|~",tag:"mo",output:"\u2308",tex:"lceiling",ttype:c},{input:"~|",tag:"mo",output:"\u2309",tex:"rceiling",ttype:c},{input:"CC",tag:"mo",output:"\u2102",tex:null,ttype:c},{input:"NN",tag:"mo",output:"\u2115",tex:null,ttype:c},{input:"QQ",tag:"mo",output:"\u211A",tex:null,ttype:c},{input:"RR",tag:"mo",output:"\u211D",tex:null,ttype:c},{input:"ZZ",tag:"mo",output:"\u2124",tex:null,ttype:c},{input:"f",tag:"mi",output:"f",tex:null,ttype:A,func:true},{input:"g",tag:"mi",output:"g",tex:null,ttype:A,func:true},{input:"lim",tag:"mo",output:"lim",tex:null,ttype:L},{input:"Lim",tag:"mo",output:"Lim",tex:null,ttype:L},{input:"sin",tag:"mo",output:"sin",tex:null,ttype:A,func:true},{input:"cos",tag:"mo",output:"cos",tex:null,ttype:A,func:true},{input:"tan",tag:"mo",output:"tan",tex:null,ttype:A,func:true},{input:"sinh",tag:"mo",output:"sinh",tex:null,ttype:A,func:true},{input:"cosh",tag:"mo",output:"cosh",tex:null,ttype:A,func:true},{input:"tanh",tag:"mo",output:"tanh",tex:null,ttype:A,func:true},{input:"cot",tag:"mo",output:"cot",tex:null,ttype:A,func:true},{input:"sec",tag:"mo",output:"sec",tex:null,ttype:A,func:true},{input:"csc",tag:"mo",output:"csc",tex:null,ttype:A,func:true},{input:"arcsin",tag:"mo",output:"arcsin",tex:null,ttype:A,func:true},{input:"arccos",tag:"mo",output:"arccos",tex:null,ttype:A,func:true},{input:"arctan",tag:"mo",output:"arctan",tex:null,ttype:A,func:true},{input:"coth",tag:"mo",output:"coth",tex:null,ttype:A,func:true},{input:"sech",tag:"mo",output:"sech",tex:null,ttype:A,func:true},{input:"csch",tag:"mo",output:"csch",tex:null,ttype:A,func:true},{input:"exp",tag:"mo",output:"exp",tex:null,ttype:A,func:true},{input:"abs",tag:"mo",output:"abs",tex:null,ttype:A,rewriteleftright:["|","|"]},{input:"norm",tag:"mo",output:"norm",tex:null,ttype:A,rewriteleftright:["\u2225","\u2225"]},{input:"floor",tag:"mo",output:"floor",tex:null,ttype:A,rewriteleftright:["\u230A","\u230B"]},{input:"ceil",tag:"mo",output:"ceil",tex:null,ttype:A,rewriteleftright:["\u2308","\u2309"]},{input:"log",tag:"mo",output:"log",tex:null,ttype:A,func:true},{input:"ln",tag:"mo",output:"ln",tex:null,ttype:A,func:true},{input:"det",tag:"mo",output:"det",tex:null,ttype:A,func:true},{input:"dim",tag:"mo",output:"dim",tex:null,ttype:c},{input:"mod",tag:"mo",output:"mod",tex:null,ttype:c},{input:"gcd",tag:"mo",output:"gcd",tex:null,ttype:A,func:true},{input:"lcm",tag:"mo",output:"lcm",tex:null,ttype:A,func:true},{input:"lub",tag:"mo",output:"lub",tex:null,ttype:c},{input:"glb",tag:"mo",output:"glb",tex:null,ttype:c},{input:"min",tag:"mo",output:"min",tex:null,ttype:L},{input:"max",tag:"mo",output:"max",tex:null,ttype:L},{input:"Sin",tag:"mo",output:"Sin",tex:null,ttype:A,func:true},{input:"Cos",tag:"mo",output:"Cos",tex:null,ttype:A,func:true},{input:"Tan",tag:"mo",output:"Tan",tex:null,ttype:A,func:true},{input:"Arcsin",tag:"mo",output:"Arcsin",tex:null,ttype:A,func:true},{input:"Arccos",tag:"mo",output:"Arccos",tex:null,ttype:A,func:true},{input:"Arctan",tag:"mo",output:"Arctan",tex:null,ttype:A,func:true},{input:"Sinh",tag:"mo",output:"Sinh",tex:null,ttype:A,func:true},{input:"Cosh",tag:"mo",output:"Cosh",tex:null,ttype:A,func:true},{input:"Tanh",tag:"mo",output:"Tanh",tex:null,ttype:A,func:true},{input:"Cot",tag:"mo",output:"Cot",tex:null,ttype:A,func:true},{input:"Sec",tag:"mo",output:"Sec",tex:null,ttype:A,func:true},{input:"Csc",tag:"mo",output:"Csc",tex:null,ttype:A,func:true},{input:"Log",tag:"mo",output:"Log",tex:null,ttype:A,func:true},{input:"Ln",tag:"mo",output:"Ln",tex:null,ttype:A,func:true},{input:"Abs",tag:"mo",output:"abs",tex:null,ttype:A,notexcopy:true,rewriteleftright:["|","|"]},{input:"uarr",tag:"mo",output:"\u2191",tex:"uparrow",ttype:c},{input:"darr",tag:"mo",output:"\u2193",tex:"downarrow",ttype:c},{input:"rarr",tag:"mo",output:"\u2192",tex:"rightarrow",ttype:c},{input:"->",tag:"mo",output:"\u2192",tex:"to",ttype:c},{input:">->",tag:"mo",output:"\u21A3",tex:"rightarrowtail",ttype:c},{input:"->>",tag:"mo",output:"\u21A0",tex:"twoheadrightarrow",ttype:c},{input:">->>",tag:"mo",output:"\u2916",tex:"twoheadrightarrowtail",ttype:c},{input:"|->",tag:"mo",output:"\u21A6",tex:"mapsto",ttype:c},{input:"larr",tag:"mo",output:"\u2190",tex:"leftarrow",ttype:c},{input:"harr",tag:"mo",output:"\u2194",tex:"leftrightarrow",ttype:c},{input:"rArr",tag:"mo",output:"\u21D2",tex:"Rightarrow",ttype:c},{input:"lArr",tag:"mo",output:"\u21D0",tex:"Leftarrow",ttype:c},{input:"hArr",tag:"mo",output:"\u21D4",tex:"Leftrightarrow",ttype:c},{input:"sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:A},{input:"root",tag:"mroot",output:"root",tex:null,ttype:U},{input:"frac",tag:"mfrac",output:"/",tex:null,ttype:U},{input:"/",tag:"mfrac",output:"/",tex:null,ttype:i},{input:"stackrel",tag:"mover",output:"stackrel",tex:null,ttype:U},{input:"overset",tag:"mover",output:"stackrel",tex:null,ttype:U},{input:"underset",tag:"munder",output:"stackrel",tex:null,ttype:U},{input:"_",tag:"msub",output:"_",tex:null,ttype:i},{input:"^",tag:"msup",output:"^",tex:null,ttype:i},{input:"hat",tag:"mover",output:"\u005E",tex:null,ttype:A,acc:true},{input:"bar",tag:"mover",output:"\u00AF",tex:"overline",ttype:A,acc:true},{input:"vec",tag:"mover",output:"\u2192",tex:null,ttype:A,acc:true},{input:"dot",tag:"mover",output:".",tex:null,ttype:A,acc:true},{input:"ddot",tag:"mover",output:"..",tex:null,ttype:A,acc:true},{input:"overarc",tag:"mover",output:"\u23DC",tex:"overparen",ttype:A,acc:true},{input:"ul",tag:"munder",output:"\u0332",tex:"underline",ttype:A,acc:true},{input:"ubrace",tag:"munder",output:"\u23DF",tex:"underbrace",ttype:K,acc:true},{input:"obrace",tag:"mover",output:"\u23DE",tex:"overbrace",ttype:K,acc:true},{input:"text",tag:"mtext",output:"text",tex:null,ttype:Y},{input:"mbox",tag:"mtext",output:"mbox",tex:null,ttype:Y},{input:"color",tag:"mstyle",ttype:U},{input:"id",tag:"mrow",ttype:U},{input:"class",tag:"mrow",ttype:U},{input:"cancel",tag:"menclose",output:"cancel",tex:null,ttype:A},k,{input:"bb",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"bb",tex:null,ttype:A},{input:"mathbf",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"mathbf",tex:null,ttype:A},{input:"sf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"sf",tex:null,ttype:A},{input:"mathsf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"mathsf",tex:null,ttype:A},{input:"bbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"bbb",tex:null,ttype:A,codes:w},{input:"mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"mathbb",tex:null,ttype:A,codes:w},{input:"cc",tag:"mstyle",atname:"mathvariant",atval:"script",output:"cc",tex:null,ttype:A,codes:D},{input:"mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",output:"mathcal",tex:null,ttype:A,codes:D},{input:"tt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"tt",tex:null,ttype:A},{input:"mathtt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"mathtt",tex:null,ttype:A},{input:"fr",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"fr",tex:null,ttype:A,codes:H},{input:"mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"mathfrak",tex:null,ttype:A,codes:H}];function T(ac,ab){if(ac.input>ab.input){return 1}else{return -1}}var S=[];function n(){var ac;var ab=z.length;for(ac=0;ac>1;if(ac[ab]=S[ab]}s=y;if(af!=""){y=z[ae].ttype;return z[ae]}y=c;ab=1;ak=ah.slice(0,1);var ai=true;while("0"<=ak&&ak<="9"&&ab<=ah.length){ak=ah.slice(ab,ab+1);ab++}if(ak==d){ak=ah.slice(ab,ab+1);if("0"<=ak&&ak<="9"){ai=false;ab++;while("0"<=ak&&ak<="9"&&ab<=ah.length){ak=ah.slice(ab,ab+1);ab++}}}if((ai&&ab>1)||ab>2){ak=ah.slice(0,ab-1);aj="mn"}else{ab=2;ak=ah.slice(0,1);aj=(("A">ak||ak>"Z")&&("a">ak||ak>"z")?"mo":"mi")}if(ak=="-"&&s==i){y=i;return{input:ak,tag:aj,output:ak,ttype:A,func:true}}return{input:ak,tag:aj,output:ak,ttype:c}}function R(ac){var ab;if(!ac.hasChildNodes()){return}if(ac.firstChild.hasChildNodes()&&(ac.nodeName=="mrow"||ac.nodeName=="M:MROW")){ab=ac.firstChild.firstChild.nodeValue;if(ab=="("||ab=="["||ab=="{"){ac.removeChild(ac.firstChild)}}if(ac.lastChild.hasChildNodes()&&(ac.nodeName=="mrow"||ac.nodeName=="M:MROW")){ab=ac.lastChild.firstChild.nodeValue;if(ab==")"||ab=="]"||ab=="}"){ac.removeChild(ac.lastChild)}}}var F,s,y;function G(ai){var ad,ac,al,af,ak,ag=e.createDocumentFragment();ai=p(ai,0);ad=j(ai);if(ad==null||ad.ttype==h&&F>0){return[null,ai]}if(ad.ttype==V){ai=ad.output+p(ai,ad.input.length);ad=j(ai)}switch(ad.ttype){case L:case c:ai=p(ai,ad.input.length);return[O(ad.tag,e.createTextNode(ad.output)),ai];case b:F++;ai=p(ai,ad.input.length);al=q(ai,true);F--;if(typeof ad.invisible=="boolean"&&ad.invisible){ac=O("mrow",al[0])}else{ac=O("mo",e.createTextNode(ad.output));ac=O("mrow",ac);ac.appendChild(al[0])}return[ac,al[1]];case Y:if(ad!=k){ai=p(ai,ad.input.length)}if(ai.charAt(0)=="{"){af=ai.indexOf("}")}else{if(ai.charAt(0)=="("){af=ai.indexOf(")")}else{if(ai.charAt(0)=="["){af=ai.indexOf("]")}else{if(ad==k){af=ai.slice(1).indexOf('"')+1}else{af=0}}}}if(af==-1){af=ai.length}ak=ai.slice(1,af);if(ak.charAt(0)==" "){ac=O("mspace");ac.setAttribute("width","1ex");ag.appendChild(ac)}ag.appendChild(O(ad.tag,e.createTextNode(ak)));if(ak.charAt(ak.length-1)==" "){ac=O("mspace");ac.setAttribute("width","1ex");ag.appendChild(ac)}ai=p(ai,af+1);return[O("mrow",ag),ai];case K:case A:ai=p(ai,ad.input.length);al=G(ai);if(al[0]==null){return[O(ad.tag,e.createTextNode(ad.output)),ai]}if(typeof ad.func=="boolean"&&ad.func){ak=ai.charAt(0);if(ak=="^"||ak=="_"||ak=="/"||ak=="|"||ak==","||(ad.input.length==1&&ad.input.match(/\w/)&&ak!="(")){return[O(ad.tag,e.createTextNode(ad.output)),ai]}else{ac=O("mrow",O(ad.tag,e.createTextNode(ad.output)));ac.appendChild(al[0]);return[ac,al[1]]}}R(al[0]);if(ad.input=="sqrt"){return[O(ad.tag,al[0]),al[1]]}else{if(typeof ad.rewriteleftright!="undefined"){ac=O("mrow",O("mo",e.createTextNode(ad.rewriteleftright[0])));ac.appendChild(al[0]);ac.appendChild(O("mo",e.createTextNode(ad.rewriteleftright[1])));return[ac,al[1]]}else{if(ad.input=="cancel"){ac=O(ad.tag,al[0]);ac.setAttribute("notation","updiagonalstrike");return[ac,al[1]]}else{if(typeof ad.acc=="boolean"&&ad.acc){ac=O(ad.tag,al[0]);var ah=O("mo",e.createTextNode(ad.output));if(ad.input=="vec"&&((al[0].nodeName=="mrow"&&al[0].childNodes.length==1&&al[0].firstChild.firstChild.nodeValue!==null&&al[0].firstChild.firstChild.nodeValue.length==1)||(al[0].firstChild.nodeValue!==null&&al[0].firstChild.nodeValue.length==1))){ah.setAttribute("stretchy",false)}ac.appendChild(ah);return[ac,al[1]]}else{if(!l&&typeof ad.codes!="undefined"){for(af=0;af64&&ak.charCodeAt(ae)<91){aj=aj+ad.codes[ak.charCodeAt(ae)-65]}else{if(ak.charCodeAt(ae)>96&&ak.charCodeAt(ae)<123){aj=aj+ad.codes[ak.charCodeAt(ae)-71]}else{aj=aj+ak.charAt(ae)}}}if(al[0].nodeName=="mi"){al[0]=O("mo").appendChild(e.createTextNode(aj))}else{al[0].replaceChild(O("mo").appendChild(e.createTextNode(aj)),al[0].childNodes[af])}}}}ac=O(ad.tag,al[0]);ac.setAttribute(ad.atname,ad.atval);return[ac,al[1]]}}}}case U:ai=p(ai,ad.input.length);al=G(ai);if(al[0]==null){return[O("mo",e.createTextNode(ad.input)),ai]}R(al[0]);var ab=G(al[1]);if(ab[0]==null){return[O("mo",e.createTextNode(ad.input)),ai]}R(ab[0]);if(["color","class","id"].indexOf(ad.input)>=0){if(ai.charAt(0)=="{"){af=ai.indexOf("}")}else{if(ai.charAt(0)=="("){af=ai.indexOf(")")}else{if(ai.charAt(0)=="["){af=ai.indexOf("]")}}}ak=ai.slice(1,af);ac=O(ad.tag,ab[0]);if(ad.input==="color"){ac.setAttribute("mathcolor",ak)}else{if(ad.input==="class"){ac.setAttribute("class",ak)}else{if(ad.input==="id"){ac.setAttribute("id",ak)}}}return[ac,ab[1]]}if(ad.input=="root"||ad.output=="stackrel"){ag.appendChild(ab[0])}ag.appendChild(al[0]);if(ad.input=="frac"){ag.appendChild(ab[0])}return[O(ad.tag,ag),ab[1]];case i:ai=p(ai,ad.input.length);return[O("mo",e.createTextNode(ad.output)),ai];case a:ai=p(ai,ad.input.length);ac=O("mspace");ac.setAttribute("width","1ex");ag.appendChild(ac);ag.appendChild(O(ad.tag,e.createTextNode(ad.output)));ac=O("mspace");ac.setAttribute("width","1ex");ag.appendChild(ac);return[O("mrow",ag),ai];case m:F++;ai=p(ai,ad.input.length);al=q(ai,false);F--;ak="";if(al[0].lastChild!=null){ak=al[0].lastChild.firstChild.nodeValue}if(ak=="|"&&ai.charAt(0)!==","){ac=O("mo",e.createTextNode(ad.output));ac=O("mrow",ac);ac.appendChild(al[0]);return[ac,al[1]]}else{ac=O("mo",e.createTextNode("\u2223"));ac=O("mrow",ac);return[ac,ai]}default:ai=p(ai,ad.input.length);return[O(ad.tag,e.createTextNode(ad.output)),ai]}}function t(ah){var af,ai,ag,ae,ab,ad;ah=p(ah,0);ai=j(ah);ab=G(ah);ae=ab[0];ah=ab[1];af=j(ah);if(af.ttype==i&&af.input!="/"){ah=p(ah,af.input.length);ab=G(ah);if(ab[0]==null){ab[0]=O("mo",e.createTextNode("\u25A1"))}else{R(ab[0])}ah=ab[1];ad=(ai.ttype==L||ai.ttype==K);if(af.input=="_"){ag=j(ah);if(ag.input=="^"){ah=p(ah,ag.input.length);var ac=G(ah);R(ac[0]);ah=ac[1];ae=O((ad?"munderover":"msubsup"),ae);ae.appendChild(ab[0]);ae.appendChild(ac[0]);ae=O("mrow",ae)}else{ae=O((ad?"munder":"msub"),ae);ae.appendChild(ab[0])}}else{if(af.input=="^"&&ad){ae=O("mover",ae);ae.appendChild(ab[0])}else{ae=O(af.tag,ae);ae.appendChild(ab[0])}}if(typeof ai.func!="undefined"&&ai.func){ag=j(ah);if(ag.ttype!=i&&ag.ttype!=h){ab=t(ah);ae=O("mrow",ae);ae.appendChild(ab[0]);ah=ab[1]}}}return[ae,ah]}function q(ak,aj){var ao,al,ag,ar,ah=e.createDocumentFragment();do{ak=p(ak,0);ag=t(ak);al=ag[0];ak=ag[1];ao=j(ak);if(ao.ttype==i&&ao.input=="/"){ak=p(ak,ao.input.length);ag=t(ak);if(ag[0]==null){ag[0]=O("mo",e.createTextNode("\u25A1"))}else{R(ag[0])}ak=ag[1];R(al);al=O(ao.tag,al);al.appendChild(ag[0]);ah.appendChild(al);ao=j(ak)}else{if(al!=undefined){ah.appendChild(al)}}}while((ao.ttype!=h&&(ao.ttype!=m||aj)||F==0)&&ao!=null&&ao.output!="");if(ao.ttype==h||ao.ttype==m){var at=ah.childNodes.length;if(at>0&&ah.childNodes[at-1].nodeName=="mrow"&&ah.childNodes[at-1].lastChild&&ah.childNodes[at-1].lastChild.firstChild){var av=ah.childNodes[at-1].lastChild.firstChild.nodeValue;if(av==")"||av=="]"){var ac=ah.childNodes[at-1].firstChild.firstChild.nodeValue;if(ac=="("&&av==")"&&ao.output!="}"||ac=="["&&av=="]"){var ad=[];var ap=true;var am=ah.childNodes.length;for(ar=0;ap&&ar1){ap=ad[ar].length==ad[ar-2].length}}ap=ap&&(ad.length>1||ad[0].length>0);var af=[];if(ap){var ae,ab,ai,an,au=e.createDocumentFragment();for(ar=0;ar2){ah.removeChild(ah.firstChild);ah.removeChild(ah.firstChild)}au.appendChild(O("mtr",ae))}al=O("mtable",au);al.setAttribute("columnlines",af.join(" "));if(typeof ao.invisible=="boolean"&&ao.invisible){al.setAttribute("columnalign","left")}ah.replaceChild(al,ah.firstChild)}}}}ak=p(ak,ao.input.length);if(typeof ao.invisible!="boolean"||!ao.invisible){al=O("mo",e.createTextNode(ao.output));ah.appendChild(al)}}return[ah,ak]}function M(ad,ac){var ae,ab;F=0;ad=ad.replace(/ /g,"");ad=ad.replace(/>/g,">");ad=ad.replace(/</g,"<");ae=q(ad.replace(/^\s+/g,""),false)[0];ab=O("mstyle",ae);if(C!=""){ab.setAttribute("mathcolor",C)}if(mathfontsize!=""){ab.setAttribute("fontsize",mathfontsize);ab.setAttribute("mathsize",mathfontsize)}if(mathfontfamily!=""){ab.setAttribute("fontfamily",mathfontfamily);ab.setAttribute("mathvariant",mathfontfamily)}if(o){ab.setAttribute("displaystyle","true")}ab=O("math",ab);if(v){ab.setAttribute("title",ad.replace(/\s+/g," "))}return ab}v=false;mathfontfamily="";C="";mathfontsize="";(function(){for(var ac=0,ab=z.length;ac *":{display:"table-row!important"},".MJXp-surd":{"vertical-align":"top"},".MJXp-surd > *":{display:"block!important"},".MJXp-script-box > * ":{display:"table!important",height:"50%"},".MJXp-script-box > * > *":{display:"table-cell!important","vertical-align":"top"},".MJXp-script-box > *:last-child > *":{"vertical-align":"bottom"},".MJXp-script-box > * > * > *":{display:"block!important"},".MJXp-mphantom":{visibility:"hidden"},".MJXp-munderover, .MJXp-munder":{display:"inline-table!important"},".MJXp-over":{display:"inline-block!important","text-align":"center"},".MJXp-over > *":{display:"block!important"},".MJXp-munderover > *, .MJXp-munder > *":{display:"table-row!important"},".MJXp-mtable":{"vertical-align":".25em",margin:"0 .125em"},".MJXp-mtable > *":{display:"inline-table!important","vertical-align":"middle"},".MJXp-mtr":{display:"table-row!important"},".MJXp-mtd":{display:"table-cell!important","text-align":"center",padding:".5em 0 0 .5em"},".MJXp-mtr > .MJXp-mtd:first-child":{"padding-left":0},".MJXp-mtr:first-child > .MJXp-mtd":{"padding-top":0},".MJXp-mlabeledtr":{display:"table-row!important"},".MJXp-mlabeledtr > .MJXp-mtd:first-child":{"padding-left":0},".MJXp-mlabeledtr:first-child > .MJXp-mtd":{"padding-top":0},".MJXp-merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"}};(function(){for(var n=0;n<10;n++){var o="scaleX(."+n+")";m[".MJXp-scale"+n]={"-webkit-transform":o,"-moz-transform":o,"-ms-transform":o,"-o-transform":o,transform:o}}})();var k=1000000;var c="V",l="H";g.Augment({settings:b.config.menuSettings,config:{styles:m},hideProcessedMath:false,maxStretchyParts:1000,Config:function(){if(!this.require){this.require=[]}this.SUPER(arguments).Config.call(this);var n=this.settings;if(n.scale){this.config.scale=n.scale}this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){j=MathJax.Extension.MathEvents.Event;a=MathJax.Extension.MathEvents.Touch;d=MathJax.Extension.MathEvents.Hover;this.ContextMenu=j.ContextMenu;this.Mousedown=j.AltContextMenu;this.Mouseover=d.Mouseover;this.Mouseout=d.Mouseout;this.Mousemove=d.Mousemove;var n=e.addElement(document.body,"div",{style:{width:"5in"}});this.pxPerInch=n.offsetWidth/5;n.parentNode.removeChild(n);return i.Styles(this.config.styles,["InitializePHTML",this])},InitializePHTML:function(){},preTranslate:function(p){var s=p.jax[this.id],t,q=s.length,u,r,v,o,n;for(t=0;tthis.PHTML.h){this.PHTML.h=q.PHTML.h}if(q.PHTML.d>this.PHTML.d){this.PHTML.d=q.PHTML.d}if(q.PHTML.t>this.PHTML.t){this.PHTML.t=q.PHTML.t}if(q.PHTML.b>this.PHTML.b){this.PHTML.b=q.PHTML.b}}}else{if(n.forceChild){e.addElement(p,"span")}}},PHTMLstretchChild:function(q,p,s){var r=this.data[q];if(r&&r.PHTMLcanStretch("Vertical",p,s)){var t=this.PHTML,o=r.PHTML,n=o.w;r.PHTMLstretchV(p,s);t.w+=o.w-n;if(o.h>t.h){t.h=o.h}if(o.d>t.d){t.d=o.d}}},PHTMLcreateSpan:function(n){if(!this.PHTML){this.PHTML={}}this.PHTML={w:0,h:0,d:0,l:0,r:0,t:0,b:0};if(this.inferred){return n}if(this.type==="mo"&&this.data.join("")==="\u222B"){g.lastIsInt=true}else{if(this.type!=="mspace"||this.width!=="negativethinmathspace"){g.lastIsInt=false}}if(!this.PHTMLspanID){this.PHTMLspanID=g.GetID()}var o=(this.id||"MJXp-Span-"+this.PHTMLspanID);return e.addElement(n,"span",{className:"MJXp-"+this.type,id:o})},PHTMLspanElement:function(){if(!this.PHTMLspanID){return null}return document.getElementById(this.id||"MJXp-Span-"+this.PHTMLspanID)},PHTMLhandleToken:function(o){var n=this.getValues("mathvariant");if(n.mathvariant!==h.VARIANT.NORMAL){o.className+=" "+g.VARIANT[n.mathvariant]}},PHTMLhandleStyle:function(n){if(this.style){n.style.cssText=this.style}},PHTMLhandleColor:function(n){if(this.mathcolor){n.style.color=this.mathcolor}if(this.mathbackground){n.style.backgroundColor=this.mathbackground}},PHTMLhandleScriptlevel:function(n){var o=this.Get("scriptlevel");if(o){n.className+=" MJXp-script"}},PHTMLhandleText:function(y,A){var v,p;var z=0,o=0,q=0;for(var s=0,r=A.length;s=55296&&p<56319){s++;p=(((p-55296)<<10)+(A.charCodeAt(s)-56320))+65536}var t=0.7,u=0.22,x=0.5;if(p<127){if(v.match(/[A-Za-ehik-or-xz0-9]/)){u=0}if(v.match(/[A-HK-Z]/)){x=0.67}else{if(v.match(/[IJ]/)){x=0.36}}if(v.match(/[acegm-su-z]/)){t=0.45}else{if(v.match(/[ij]/)){t=0.75}}if(v.match(/[ijlt]/)){x=0.28}}if(g.DELIMITERS[v]){x=g.DELIMITERS[v].w||0.4}if(t>z){z=t}if(u>o){o=u}q+=x}if(!this.CHML){this.PHTML={}}this.PHTML={h:0.9,d:0.3,w:q,l:0,r:0,t:z,b:o};e.addText(y,A)},PHTMLbboxFor:function(o){if(this.data[o]&&this.data[o].PHTML){return this.data[o].PHTML}return{w:0,h:0,d:0,l:0,r:0,t:0,b:0}},PHTMLcanStretch:function(q,o,p){if(this.isEmbellished()){var n=this.Core();if(n&&n!==this){return n.PHTMLcanStretch(q,o,p)}}return false},PHTMLstretchV:function(n,o){},PHTMLstretchH:function(n){},CoreParent:function(){var n=this;while(n&&n.isEmbellished()&&n.CoreMO()===this&&!n.isa(h.math)){n=n.Parent()}return n},CoreText:function(n){if(!n){return""}if(n.isEmbellished()){return n.CoreMO().data.join("")}while((n.isa(h.mrow)||n.isa(h.TeXAtom)||n.isa(h.mstyle)||n.isa(h.mphantom))&&n.data.length===1&&n.data[0]){n=n.data[0]}if(!n.isToken){return""}else{return n.data.join("")}}});h.chars.Augment({toPreviewHTML:function(n){var o=this.toString().replace(/[\u2061-\u2064]/g,"");this.PHTMLhandleText(n,o)}});h.entity.Augment({toPreviewHTML:function(n){var o=this.toString().replace(/[\u2061-\u2064]/g,"");this.PHTMLhandleText(n,o)}});h.math.Augment({toPreviewHTML:function(n){n=this.PHTMLdefaultSpan(n);if(this.Get("display")==="block"){n.className+=" MJXp-display"}return n}});h.mo.Augment({toPreviewHTML:function(o){o=this.PHTMLdefaultSpan(o);this.PHTMLadjustAccent(o);var n=this.getValues("lspace","rspace","scriptlevel","displaystyle","largeop");if(n.scriptlevel===0){this.PHTML.l=g.length2em(n.lspace);this.PHTML.r=g.length2em(n.rspace);o.style.marginLeft=g.Em(this.PHTML.l);o.style.marginRight=g.Em(this.PHTML.r)}else{this.PHTML.l=0.15;this.PHTML.r=0.1}if(n.displaystyle&&n.largeop){var p=e.Element("span",{className:"MJXp-largeop"});p.appendChild(o.firstChild);o.appendChild(p);this.PHTML.h*=1.2;this.PHTML.d*=1.2;if(this.data.join("")==="\u222B"){p.className+=" MJXp-int"}}return o},PHTMLadjustAccent:function(p){var o=this.CoreParent();if(o&&o.isa(h.munderover)&&this.CoreText(o.data[o.base]).length===1){var q=o.data[o.over],n=o.data[o.under];var s=this.data.join(""),r;if(q&&this===q.CoreMO()&&o.Get("accent")){r=g.REMAPACCENT[s]}else{if(n&&this===n.CoreMO()&&o.Get("accentunder")){r=g.REMAPACCENTUNDER[s]}}if(r){s=p.innerHTML=r}if(s.match(/[\u02C6-\u02DC\u00A8]/)){this.PHTML.acc=-0.52}else{if(s==="\u2192"){this.PHTML.acc=-0.15;this.PHTML.vec=true}}}},PHTMLcanStretch:function(q,o,p){if(!this.Get("stretchy")){return false}var r=this.data.join("");if(r.length>1){return false}r=g.DELIMITERS[r];var n=(r&&r.dir===q.substr(0,1));if(n){n=(this.PHTML.h!==o||this.PHTML.d!==p||(this.Get("minsize",true)||this.Get("maxsize",true)))}return n},PHTMLstretchV:function(p,u){var o=this.PHTMLspanElement(),t=this.PHTML;var n=this.getValues("symmetric","maxsize","minsize");if(n.symmetric){l=2*Math.max(p-0.25,u+0.25)}else{l=p+u}n.maxsize=g.length2em(n.maxsize,t.h+t.d);n.minsize=g.length2em(n.minsize,t.h+t.d);l=Math.max(n.minsize,Math.min(n.maxsize,l));var s=l/(t.h+t.d-0.3);var q=e.Element("span",{style:{"font-size":g.Em(s)}});if(s>1.25){var r=Math.ceil(1.25/s*10);q.className="MJXp-right MJXp-scale"+r;q.style.marginLeft=g.Em(t.w*(r/10-1)+0.07);t.w*=s*r/10}q.appendChild(o.firstChild);o.appendChild(q);if(n.symmetric){o.style.verticalAlign=g.Em(0.25*(1-s))}}});h.mspace.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q);var o=this.getValues("height","depth","width");var n=g.length2em(o.width),p=g.length2em(o.height),s=g.length2em(o.depth);var r=this.PHTML;r.w=n;r.h=p;r.d=s;if(n<0){if(!g.lastIsInt){q.style.marginLeft=g.Em(n)}n=0}q.style.width=g.Em(n);q.style.height=g.Em(p+s);if(s){q.style.verticalAlign=g.Em(-s)}return q}});h.mpadded.Augment({toPreviewHTML:function(u){u=this.PHTMLdefaultSpan(u,{childSpans:true,className:"MJXp-box",forceChild:true});var o=u.firstChild;var v=this.getValues("width","height","depth","lspace","voffset");var s=this.PHTMLdimen(v.lspace);var q=0,n=0,t=s.len,r=-s.len,p=0;if(v.width!==""){s=this.PHTMLdimen(v.width,"w",0);if(s.pm){r+=s.len}else{u.style.width=g.Em(s.len)}}if(v.height!==""){s=this.PHTMLdimen(v.height,"h",0);if(!s.pm){q+=-this.PHTMLbboxFor(0).h}q+=s.len}if(v.depth!==""){s=this.PHTMLdimen(v.depth,"d",0);if(!s.pm){n+=-this.PHTMLbboxFor(0).d;p+=-s.len}n+=s.len}if(v.voffset!==""){s=this.PHTMLdimen(v.voffset);q-=s.len;n+=s.len;p+=s.len}if(q){o.style.marginTop=g.Em(q)}if(n){o.style.marginBottom=g.Em(n)}if(t){o.style.marginLeft=g.Em(t)}if(r){o.style.marginRight=g.Em(r)}if(p){u.style.verticalAlign=g.Em(p)}return u},PHTMLdimen:function(q,r,n){if(n==null){n=-k}q=String(q);var o=q.match(/width|height|depth/);var p=(o?this.PHTML[o[0].charAt(0)]:(r?this.PHTML[r]:0));return{len:g.length2em(q,p)||0,pm:!!q.match(/^[-+]/)}}});h.munderover.Augment({toPreviewHTML:function(r){var t=this.getValues("displaystyle","accent","accentunder","align");var n=this.data[this.base];if(!t.displaystyle&&n!=null&&(n.movablelimits||n.CoreMO().Get("movablelimits"))){r=h.msubsup.prototype.toPreviewHTML.call(this,r);r.className=r.className.replace(/munderover/,"msubsup");return r}r=this.PHTMLdefaultSpan(r,{childSpans:true,className:"",noBBox:true});var p=this.PHTMLbboxFor(this.over),v=this.PHTMLbboxFor(this.under),u=this.PHTMLbboxFor(this.base),s=this.PHTML,o=p.acc;if(this.data[this.over]){if(r.lastChild.firstChild){r.lastChild.firstChild.style.marginLeft=p.l=r.lastChild.firstChild.style.marginRight=p.r=0}var q=e.Element("span",{},[["span",{className:"MJXp-over"}]]);q.firstChild.appendChild(r.lastChild);if(r.childNodes.length>(this.data[this.under]?1:0)){q.firstChild.appendChild(r.firstChild)}this.data[this.over].PHTMLhandleScriptlevel(q.firstChild.firstChild);if(o!=null){if(p.vec){q.firstChild.firstChild.firstChild.style.fontSize="60%";p.h*=0.6;p.d*=0.6;p.w*=0.6}o=o-p.d+0.1;if(u.t!=null){o+=u.t-u.h}q.firstChild.firstChild.style.marginBottom=g.Em(o)}if(r.firstChild){r.insertBefore(q,r.firstChild)}else{r.appendChild(q)}}if(this.data[this.under]){if(r.lastChild.firstChild){r.lastChild.firstChild.style.marginLeft=v.l=r.lastChild.firstChild.marginRight=v.r=0}this.data[this.under].PHTMLhandleScriptlevel(r.lastChild)}s.w=Math.max(0.8*p.w,0.8*v.w,u.w);s.h=0.8*(p.h+p.d+(o||0))+u.h;s.d=u.d+0.8*(v.h+v.d);return r}});h.msubsup.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q,{noBBox:true});if(!this.data[this.base]){if(q.firstChild){q.insertBefore(e.Element("span"),q.firstChild)}else{q.appendChild(e.Element("span"))}}var s=this.data[this.base],p=this.data[this.sub],n=this.data[this.sup];if(!s){s={bbox:{h:0.8,d:0.2}}}q.firstChild.style.marginRight=".05em";var o=Math.max(0.4,s.PHTML.h-0.4),u=Math.max(0.2,s.PHTML.d+0.1);var t=this.PHTML;if(n&&p){var r=e.Element("span",{className:"MJXp-script-box",style:{height:g.Em(o+n.PHTML.h*0.8+u+p.PHTML.d*0.8),"vertical-align":g.Em(-u-p.PHTML.d*0.8)}},[["span",{},[["span",{},[["span",{style:{"margin-bottom":g.Em(-(n.PHTML.d-0.05))}}]]]]],["span",{},[["span",{},[["span",{style:{"margin-top":g.Em(-(n.PHTML.h-0.05))}}]]]]]]);p.PHTMLhandleScriptlevel(r.firstChild);n.PHTMLhandleScriptlevel(r.lastChild);r.firstChild.firstChild.firstChild.appendChild(q.lastChild);r.lastChild.firstChild.firstChild.appendChild(q.lastChild);q.appendChild(r);t.h=Math.max(s.PHTML.h,n.PHTML.h*0.8+o);t.d=Math.max(s.PHTML.d,p.PHTML.d*0.8+u);t.w=s.PHTML.w+Math.max(n.PHTML.w,p.PHTML.w)+0.07}else{if(n){q.lastChild.style.verticalAlign=g.Em(o);n.PHTMLhandleScriptlevel(q.lastChild);t.h=Math.max(s.PHTML.h,n.PHTML.h*0.8+o);t.d=Math.max(s.PHTML.d,n.PHTML.d*0.8-o);t.w=s.PHTML.w+n.PHTML.w+0.07}else{if(p){q.lastChild.style.verticalAlign=g.Em(-u);p.PHTMLhandleScriptlevel(q.lastChild);t.h=Math.max(s.PHTML.h,p.PHTML.h*0.8-u);t.d=Math.max(s.PHTML.d,p.PHTML.d*0.8+u);t.w=s.PHTML.w+p.PHTML.w+0.07}}}return q}});h.mfrac.Augment({toPreviewHTML:function(r){r=this.PHTMLdefaultSpan(r,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});var o=this.getValues("linethickness","displaystyle");if(!o.displaystyle){if(this.data[0]){this.data[0].PHTMLhandleScriptlevel(r.firstChild)}if(this.data[1]){this.data[1].PHTMLhandleScriptlevel(r.lastChild)}}var n=e.Element("span",{className:"MJXp-box"},[["span",{className:"MJXp-denom"},[["span",{},[["span",{className:"MJXp-rule",style:{height:"1em"}}]]],["span"]]]]);n.firstChild.lastChild.appendChild(r.lastChild);r.appendChild(n);var s=this.PHTMLbboxFor(0),p=this.PHTMLbboxFor(1),v=this.PHTML;v.w=Math.max(s.w,p.w)*0.8;v.h=s.h+s.d+0.1+0.25;v.d=p.h+p.d-0.25;v.l=v.r=0.125;o.linethickness=Math.max(0,g.length2em(o.linethickness||"0",0));if(o.linethickness){var u=n.firstChild.firstChild.firstChild;var q=g.Em(o.linethickness);u.style.borderTop="none";u.style.borderBottom=(o.linethickness<0.15?"1px":q)+" solid";u.style.margin=q+" 0";q=o.linethickness;n.style.marginTop=g.Em(3*q-1.2);r.style.verticalAlign=g.Em(1.5*q+0.1);v.h+=1.5*q-0.1;v.d+=1.5*q}else{n.style.marginTop="-.7em"}return r}});h.msqrt.Augment({toPreviewHTML:function(n){n=this.PHTMLdefaultSpan(n,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});this.PHTMLlayoutRoot(n,n.firstChild);return n},PHTMLlayoutRoot:function(u,n){var v=this.PHTMLbboxFor(0);var q=Math.ceil((v.h+v.d+0.14)*100),w=g.Em(14/q);var r=e.Element("span",{className:"MJXp-surd"},[["span",{style:{"font-size":q+"%","margin-top":w}},["\u221A"]]]);var s=e.Element("span",{className:"MJXp-root"},[["span",{className:"MJXp-rule",style:{"border-top":".08em solid"}}]]);var p=(1.2/2.2)*q/100;if(q>150){var o=Math.ceil(150/q*10);r.firstChild.className="MJXp-right MJXp-scale"+o;r.firstChild.style.marginLeft=g.Em(p*(o/10-1)/q*100);p=p*o/10;s.firstChild.style.borderTopWidth=g.Em(0.08/Math.sqrt(o/10))}s.appendChild(n);u.appendChild(r);u.appendChild(s);this.PHTML.h=v.h+0.18;this.PHTML.d=v.d;this.PHTML.w=v.w+p;return u}});h.mroot.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});var p=this.PHTMLbboxFor(1),n=q.removeChild(q.lastChild);var t=this.PHTMLlayoutRoot(e.Element("span"),q.firstChild);n.className="MJXp-script";var u=parseInt(t.firstChild.firstChild.style.fontSize);var o=0.55*(u/120)+p.d*0.8,s=-0.6*(u/120);if(u>150){s*=0.95*Math.ceil(150/u*10)/10}n.style.marginRight=g.Em(s);n.style.verticalAlign=g.Em(o);if(-s>p.w*0.8){n.style.marginLeft=g.Em(-s-p.w*0.8)}q.appendChild(n);q.appendChild(t);this.PHTML.w+=Math.max(0,p.w*0.8+s);this.PHTML.h=Math.max(this.PHTML.h,p.h*0.8+o);return q},PHTMLlayoutRoot:h.msqrt.prototype.PHTMLlayoutRoot});h.mfenced.Augment({toPreviewHTML:function(q){q=this.PHTMLcreateSpan(q);this.PHTMLhandleStyle(q);this.PHTMLhandleColor(q);this.addFakeNodes();this.PHTMLaddChild(q,"open",{});for(var p=0,n=this.data.length;ps){s=x.w}}}var o=this.PHTML;o.w=s;o.h=y/2+0.25;o.d=y/2-0.25;o.l=o.r=0.125;return E}});h.mlabeledtr.Augment({PHTMLdefaultSpan:function(q,o){if(!o){o={}}q=this.PHTMLcreateSpan(q);this.PHTMLhandleStyle(q);this.PHTMLhandleColor(q);if(this.isToken){this.PHTMLhandleToken(q)}for(var p=1,n=this.data.length;p/g,"")}catch(k){if(!k.restart){throw k}return MathJax.Callback.After(["HandleMML",this,l],k.restart)}n.setAttribute("data-mathml",i);j=f.addElement(n,"span",{isMathJax:true,unselectable:"on",className:"MJX_Assistive_MathML"+(h.root.Get("display")==="block"?" MJX_Assistive_MathML_Block":"")});try{j.innerHTML=i}catch(k){}n.style.position="relative";n.setAttribute("role","presentation");n.firstChild.setAttribute("aria-hidden","true");j.setAttribute("role","presentation")}l.i++}l.callback()}};b.Startup.signal.Post("AssistiveMML Ready")})(MathJax.Ajax,MathJax.Callback,MathJax.Hub,MathJax.HTML);MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/toMathML.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/AssistiveMML.js"],function(){MathJax.Hub.Register.StartupHook("End Config",["Config",MathJax.Extension.AssistiveMML])}); +!function(a,b){var c,d,e=a.config.menuSettings,f=Function.prototype.bind?function(a,b){return a.bind(b)}:function(a,b){return function(){a.apply(b,arguments)}},g=Object.keys||function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},h=MathJax.Ajax.config.path;h.a11y||(h.a11y=a.config.root+"/extensions/a11y");var i=b["accessibility-menu"]={version:"1.5.0",prefix:"",defaults:{},modules:[],MakeOption:function(a){return i.prefix+a},GetOption:function(a){return e[i.MakeOption(a)]},AddDefaults:function(){for(var a,b=g(i.defaults),c=0;a=b[c];c++){var d=i.MakeOption(a);void 0===e[d]&&(e[d]=i.defaults[a])}},AddMenu:function(){for(var a,b=Array(this.modules.length),e=0;a=this.modules[e];e++)b[e]=a.placeHolder;var f=d.FindId("Accessibility");if(f)b.unshift(c.RULE()),f.submenu.items.push.apply(f.submenu.items,b);else{var g=(d.FindId("Settings","Renderer")||{}).submenu;g&&(b.unshift(c.RULE()),b.unshift(g.items.pop()),b.unshift(g.items.pop())),b.unshift("Accessibility");var f=c.SUBMENU.apply(c.SUBMENU,b),h=d.IndexOfId("Locale");h?d.items.splice(h,0,f):d.items.push(c.RULE(),f)}},Register:function(a){i.defaults[a.option]=!1,i.modules.push(a)},Startup:function(){c=MathJax.Menu.ITEM,d=MathJax.Menu.menu;for(var a,b=0;a=this.modules[b];b++)a.CreateMenu();this.AddMenu()},LoadExtensions:function(){for(var b,c=[],d=0;b=this.modules[d];d++)e[b.option]&&c.push(b.module);return c.length?a.Startup.loadArray(c):null}},j=MathJax.Extension.ModuleLoader=MathJax.Object.Subclass({option:"",name:["",""],module:"",placeHolder:null,submenu:!1,extension:null,Init:function(a,b,c,d,e){this.option=a,this.name=[b.replace(/ /g,""),b],this.module=c,this.extension=d,this.submenu=e||!1},CreateMenu:function(){var a=f(this.Load,this);this.submenu?this.placeHolder=c.SUBMENU(this.name,c.CHECKBOX(["Activate","Activate"],i.MakeOption(this.option),{action:a}),c.RULE(),c.COMMAND(["OptionsWhenActive","(Options when Active)"],null,{disabled:!0})):this.placeHolder=c.CHECKBOX(this.name,i.MakeOption(this.option),{action:a})},Load:function(){a.Queue(["Require",MathJax.Ajax,this.module,["Enable",this]])},Enable:function(a){var b=MathJax.Extension[this.extension];b&&(b.Enable(!0,!0),MathJax.Menu.saveCookie())}});i.Register(j("collapsible","Collapsible Math","[a11y]/collapsible.js","collapsible")),i.Register(j("autocollapse","Auto Collapse","[a11y]/auto-collapse.js","auto-collapse")),i.Register(j("explorer","Explorer","[a11y]/explorer.js","explorer",!0)),i.AddDefaults(),a.Register.StartupHook("End Extensions",function(){a.Register.StartupHook("MathMenu Ready",function(){i.Startup(),a.Startup.signal.Post("Accessibility Menu Ready")},5)},5),MathJax.Hub.Register.StartupHook("End Cookie",function(){MathJax.Callback.Queue(["LoadExtensions",i],["loadComplete",MathJax.Ajax,"[a11y]/accessibility-menu.js"])})}(MathJax.Hub,MathJax.Extension);MathJax.Ajax.loadComplete("[MathJax]/config/TeX-MML-AM_CHTML.js"); diff --git a/mathjax/asset/config/default.js b/mathjax/asset/config/default.js new file mode 100644 index 00000000..a4120d48 --- /dev/null +++ b/mathjax/asset/config/default.js @@ -0,0 +1,1104 @@ +/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ + +/************************************************************* + * + * MathJax/config/default.js + * + * This configuration file is loaded when you load MathJax + * via + * + * Use it to customize the MathJax settings. See comments below. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* + * This file lists most, but not all, of the options that can be set for + * MathJax and its various components. Some additional options are + * available, however, and are listed in the various links at: + * + * http://www.mathjax.org/resources/docs/?configuration.html#configuration-options-by-component + * + * You can add these to the configuration object below if you + * want to change them from their default values. + */ + +MathJax.Hub.Config({ + + // + // A comma-separated list of configuration files to load + // when MathJax starts up. E.g., to define local macros, etc. + // The default directory is the MathJax/config directory. + // + // Example: config: ["local/local.js"], + // Example: config: ["local/local.js","MMLtoHTML.js"], + // + config: [], + + // + // A comma-separated list of CSS stylesheet files to be loaded + // when MathJax starts up. The default directory is the + // MathJax/config directory. + // + // Example: styleSheets: ["MathJax.css"], + // + styleSheets: [], + + // + // Styles to be defined dynamically at startup time. + // + // Example: + // styles: { + // ".MathJax_Preview": { + // color: "#888" + // } + // }, + // + styles: {}, + + // + // A comma-separated list of input and output jax to initialize at startup. + // Their main code is loaded only when they are actually used, so it is not + // inefficient to include jax that may not actually be used on the page. These + // are found in the MathJax/jax directory. The choices include + // + // input/TeX + // input/MathML + // input/AsciiMath + // + // output/HTML-CSS + // output/NativeMML + // output/SVG + // + // If you change the input jax, you may need to include the appropriate + // preprocessor in the extensions array below. + // + jax: ["input/TeX", "output/HTML-CSS"], + + // + // A comma-separated list of extensions to load at startup. The default + // directory is MathJax/extensions. + // + // Example: extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"], + // + // You may wish to include "mml2jax.js" if you are using "input/MathML" in the + // jax array above, and "asciimath2jax.js" if you using "input/AsciiMath". + // Include "jsmath2jax.js" if you are converting from using jsMath to MathJax. + // + extensions: ["tex2jax.js"], + + // + // Patterns to remove from before and after math script tags. If you are not + // using one of the preprocessors (e.g., tex2jax), you need to insert something + // extra into your HTML file in order to avoid a bug in Internet Explorer. IE + // removes spaces from the DOM that it thinks are redundent, and since a SCRIPT + // tag usually doesn't add content to the page, if there is a space before and after + // a MathJax SCRIPT tag, IE will remove the first space. When MathJax inserts + // the typeset mathematics, this means there will be no space before it and the + // preceding text. In order to avoid this, you should include some "guard characters" + // before or after the math SCRIPT tag; define the patterns you want to use below. + // Note that these are used as regular expressions, so you will need to quote + // special characters. Furthermore, since they are javascript strings, you must + // quote javascript special characters as well. So to obtain a backslash, you must + // use \\ (doubled for javascript). For example, "\\[" is the pattern \[ in the + // regular expression. That means that if you want an actual backslash in your + // guard characters, you need to use "\\\\" in order to get \\ in the regular + // expression, and \ in the actual text. If both preJax and postJax are defined, + // both must be present in order to be removed. + // + // See also the preRemoveClass comments below. + // + // Example: + // preJax: "\\\\\\\\", // makes a double backslash the preJax text + // or + // preJax: "\\[\\[", // jax scripts must be enclosed in double brackets + // postJax: "\\]\\]", + // + preJax: null, + postJax: null, + + // + // The CSS class for a math preview to be removed preceding a MathJax + // SCRIPT tag. If the tag just before the MathJax SCRIPT tag is of this + // class, its contents are removed when MathJax processes the SCRIPT + // tag. This allows you to include a math preview in a form that will + // be displayed prior to MathJax performing its typesetting. It also + // avoids the Internet Explorer space-removal bug, and can be used in + // place of preJax and postJax if that is more convenient. + // + // For example + // + // [math] + // + // would display "[math]" in place of the math until MathJax is able to typeset it. + // + preRemoveClass: "MathJax_Preview", + + // + // This value controls whether the "Processing Math: nn%" message are displayed + // in the lower left-hand corner. Set to "false" to prevent those messages (though + // file loading and other messages will still be shown). + // + showProcessingMessages: true, + + // + // This value controls the verbosity of the messages in the lower left-hand corner. + // Set it to "none" to eliminate all messages, or set it to "simple" to show + // "Loading..." and "Processing..." rather than showing the full file name and the + // percentage of the mathematics processed. + // + messageStyle: "normal", + + // + // These two parameters control the alignment and shifting of displayed equations. + // The first can be "left", "center", or "right", and determines the alignment of + // displayed equations. When the alignment is not "center", the second determines + // an indentation from the left or right side for the displayed equations. When + // the alignment is "center", the indent allows you to shift the center to the right + // or left (negative is left). + // + displayAlign: "center", + displayIndent: "0", + + // + // Normally MathJax will perform its starup commands (loading of + // configuration, styles, jax, and so on) as soon as it can. If you + // expect to be doing additional configuration on the page, however, you + // may want to have it wait until the page's onload hander is called. If so, + // set this to "onload". + // + delayStartupUntil: "none", + + // + // Normally MathJax will typeset the mathematics on the page as soon as + // the page is loaded. If you want to delay that process, in which case + // you will need to call MathJax.Hub.Typeset() yourself by hand, set + // this value to true. + // + skipStartupTypeset: false, + + // + // A list of element ID's that are the ones to process for mathematics + // when any of the Hub typesetting calls (Typeset, Process, Update, etc) + // are called with no element specified. This lets you restrict the + // processing to particular containers rather than scanning the entire + // document for mathematics. If none are supplied, the entire document + // is processed. + // + elements: [], + + // + // Since typesetting usually changes the vertical dimensions of the + // page, if the URL contains an anchor position you may no longer be + // positioned at the correct position on the page, so MathJax can + // reposition to that location after it completes its initial + // typesetting of the page. This value controls whether MathJax will + // reposition the browser to the #hash location from the page URL after + // typesetting for the page. + // + positionToHash: true, + + // + // These control whether to attach the MathJax contextual menu to the + // expressions typeset by MathJax. Since the code for handling + // MathPlayer in Internet Explorer is somewhat delicate, it is + // controlled separately via (showMathMenuMSIE). The latter is now + // deprecated in favor of the MathJax contextual menu settings for + // MathPlayer. + // + // These values used to be listed in the separate output jax, but + // have been moved to this more central location since they are shared + // by all output jax. + // + showMathMenu: true, + showMathMenuMSIE: true, + + + // + // The default settings for the MathJax contextual menu (overridden by + // the MathJax cookie when users change the menu settings). + // + menuSettings: { + zoom: "None", // when to do MathZoom + CTRL: false, // require CTRL for MathZoom? + ALT: false, // require Alt or Option? + CMD: false, // require CMD? + Shift: false, // require Shift? + discoverable: false, // make math menu discoverable on hover? + zscale: "200%", // the scaling factor for MathZoom + renderer: null, // set when Jax are loaded + font: "Auto", // what font HTML-CSS should use + context: "MathJax", // or "Browser" for pass-through to browser menu + locale: null, // the language to use for messages + mpContext: false, // true means pass menu events to MathPlayer in IE + mpMouse: false, // true means pass mouse events to MathPlayer in IE + texHints: true, // include class names for TeXAtom elements + FastPreview: null, // use PreviewHTML output as preview? + assistiveMML: null, // include hidden MathML for screen readers? + inTabOrder: true, // set to true if math elements should be included in the tabindex + semantics: false // add semantics tag with original form in MathML output + }, + + // + // The message and style for when there is a processing error handling + // the mathematics (something has gone wrong with the input or output + // jax that prevents it from operating properly). + // + errorSettings: { + message: ["[",["MathProcessingError","Math Processing Error"],"]"], + style: {color: "#CC0000", "font-style":"italic"} // style for message + }, + + + //============================================================================ + // + // These parameters control the tex2jax preprocessor (when you have included + // "tex2jax.js" in the extensions list above). + // + tex2jax: { + + // + // The delimiters that surround in-line math expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // Comment out any that you don't want, but be sure there is no extra + // comma at the end of the last item in the list -- some browsers won't + // be able to handle that. + // + inlineMath: [ +// ['$','$'], // uncomment this for standard TeX math delimiters + ['\\(','\\)'] + ], + + // + // The delimiters that surround displayed math expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // Comment out any that you don't want, but be sure there is no extra + // comma at the end of the last item in the list -- some browsers won't + // be able to handle that. + // + displayMath: [ + ['$$','$$'], + ['\\[','\\]'] + ], + + // + // This array lists the names of the tags whose contents should not be + // processed by tex2jax (other than to look for ignore/process classes + // as listed below). You can add to (or remove from) this list to prevent + // MathJax from processing mathematics in specific contexts. + // + skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"], + + // + // This is the class name used to mark elements whose contents should + // not be processed by tex2jax (other than to look for the + // processClass pattern below). Note that this is a regular + // expression, and so you need to be sure to quote any regexp special + // characters. The pattern is automatically preceded by '(^| )(' and + // followed by ')( |$)', so your pattern will have to match full words + // in the class name. Assigning an element this class name will + // prevent `tex2jax` from processing its contents. + // + ignoreClass: "tex2jax_ignore", + + // + // This is the class name used to mark elements whose contents SHOULD + // be processed by tex2jax. This is used to turn on processing within + // tags that have been marked as ignored or skipped above. Note that + // this is a regular expression, and so you need to be sure to quote + // any regexp special characters. The pattern is automatically + // preceded by '(^| )(' and followed by ')( |$)', so your pattern + // will have to match full words in the class name. Use this to + // restart processing within an element that has been marked as + // ignored above. + // + processClass: "tex2jax_process", + + // + // Set to "true" to allow \$ to produce a dollar without starting in-line + // math mode. If you uncomment the ['$','$'] line above, you should change + // this to true so that you can insert plain dollar signs into your documents + // + processEscapes: false, + + // + // Controls whether tex2jax processes LaTeX environments outside of math + // mode. Set to "false" to prevent processing of environments except within + // math mode. + // + processEnvironments: true, + + // + // Controls whether tex2jax processes \ref{...} commands outside + // of math mode. Set to "false" to prevent processing of \ref + // except within math mode. + // + processRefs: true, + + // + // Controls whether tex2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates in-line + // and display mathetics on the page. The default is "TeX", which + // means use the TeX code as the preview (until it is processed by + // MathJax). Set to "none" to prevent the previews from being + // inserted (the math will simply disappear until it is typeset). Set + // to an array containing the description of an HTML snippet in order + // to use the same preview for all equations on the page (e.g., you + // could have it say "[math]" or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "TeX" + + }, + + //============================================================================ + // + // These parameters control the asciimath2jax preprocessor (when you have included + // "asciimath2jax.js" in the extensions list above). + // + asciimath2jax: { + + // + // The delimiters that surround asciimath expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // + delimiters: [ + ['`','`'] + ], + + // + // This array lists the names of the tags whose contents should not be + // processed by asciimath2jax (other than to look for ignore/process classes + // as listed below). You can add to (or remove from) this list to prevent + // MathJax from processing mathematics in specific contexts. + // + skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"], + + // + // This is the class name used to mark elements whose contents should + // not be processed by asciimath2jax (other than to look for the + // processClass pattern below). Note that this is a regular + // expression, and so you need to be sure to quote any regexp special + // characters. The pattern is automatically preceded by '(^| )(' and + // followed by ')( |$)', so your pattern will have to match full words + // in the class name. Assigning an element this class name will + // prevent `asciimath2jax` from processing its contents. + // + ignoreClass: "asciimath2jax_ignore", + + // + // This is the class name used to mark elements whose contents SHOULD + // be processed by asciimath2jax. This is used to turn on processing + // within tags that have been marked as ignored or skipped above. + // Note that this is a regular expression, and so you need to be sure + // to quote any regexp special characters. The pattern is + // automatically preceded by '(^| )(' and followed by ')( |$)', so + // your pattern will have to match full words in the class name. Use + // this to restart processing within an element that has been marked + // as ignored above. + // + processClass: "asciimath2jax_process", + + // Controls whether asciimath2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates in-line + // and display mathetics on the page. The default is "AsciiMath", which + // means use the AsciiMath code as the preview (until it is processed by + // MathJax). Set to "none" to prevent the previews from being + // inserted (the math will simply disappear until it is typeset). Set + // to an array containing the description of an HTML snippet in order + // to use the same preview for all equations on the page (e.g., you + // could have it say "[math]" or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "AsciiMath" + + }, + + //============================================================================ + // + // These parameters control the mml2jax preprocessor (when you have included + // "mml2jax.js" in the extensions list above). + // + mml2jax: { + + // + // Controls whether mml2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates + // mathematics on the page. The default is "mathml" which means use + // the tag as the preview (until it is processed by MathJax). + // Set to "alttext", to use the tag's alttext attribute as the + // preview, if the tag has one. Set to "none" to + // prevent the previews from being inserted (the math will simply + // disappear until it is typeset). Set to "altimg" to use an image + // described by the altimg* attributes of the element. + // Set to an array containing the + // description of an HTML snippet in order to use the same preview for + // all equations on the page (e.g., you could have it say "[math]" or + // load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "mathml" + + }, + + //============================================================================ + // + // These parameters control the jsMath2jax preprocessor (when you have included + // "jsMath2jax.js" in the extensions list above). + // + jsMath2jax: { + + // + // Controls whether jsMath2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates + // mathematics on the page. The default is "TeX", which means use the + // TeX code as the preview (until it is processed by MathJax). Set to + // "none" to prevent the previews from being inserted (the math will + // simply disappear until it is typeset). Set to an array containing + // the description of an HTML snippet in order to use the same preview + // for all equations on the page (e.g., you could have it say "[math]" + // or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "TeX" + + }, + + //============================================================================ + // + // These parameters control the TeX input jax. + // + TeX: { + + // + // This specifies the side on which \tag{} macros will place the tags. + // Set to "left" to place on the left-hand side. + // + TagSide: "right", + + // + // This is the amound of indentation (from right or left) for the tags. + // + TagIndent: "0.8em", + + // + // This is the width to use for the multline environment + // + MultLineWidth: "85%", + + // + // List of macros to define. These are of the form + // name: value + // where 'value' is the replacement text for the macro \name. + // The 'value' can also be [value,n] where 'value' is the replacement + // text and 'n' is the number of parameters for the macro. + // Note that backslashes must be doubled in the replacement string. + // + // E.g., + // + // Macros: { + // RR: '{\\bf R}', + // bold: ['{\\bf #1}', 1] + // } + // + Macros: {}, + + // + // Equation numbering parameters. + // + equationNumbers: { + autoNumber: "none", // "AMS" for standard AMS environment numbering, + // or "all" to number all displayed equations +// formatNumber: function (n) {return n}, // format for equation number n +// formatTag: function (n) {return '('+n+')'}, // format for \tag and \eqref +// formatID: function (n) {return 'mjx-eqn-'+String(n).replace(/\s/g,"_")}, +// // element ID to use for reference +// formatURL: function (id,base) {return base+'#'+encodeURIComponent(id)}, +// // URL to use for references + useLabelIds: true // make element ID's use \label name rather than equation number + }, + + // + // Controls the TeX/noErrors extension + // + noErrors: { + disabled: false, // set to true to return to original error messages + multiLine: true, // false to not include original line breaks + inlineDelimiters: ["",""], // or use ["$","$"] or ["\\(","\\)"] to put back delimiters + style: { + "font-size": "90%", + "text-align": "left", + "color": "black", + "padding": "1px 3px", + "border": "1px solid" + } + }, + + // + // Controls the TeX/noUndefined extension + // + noUndefined: { + disabled: false, // set to true to return to original error messages + attributes: { // attributes to set for the undefined control sequence + mathcolor: "red" + } + }, + + // + // Controls the TeX/unicode extension + unicode: { + fonts: "STIXGeneral,'Arial Unicode MS'" // the default font list for unknown characters + } + + }, + + //============================================================================ + // + // These parameters control the AsciiMath input jax. + // + AsciiMath: { + // + // Determines whether the unicode positions for phi and varphi are + // to be swapped or not. (Unicode originally had these reversed, and + // many fonts have them reversed as well.) When set to true, phi + // and varphi will correspond to the LaTeX macros of the same name. + // + fixphi: true, + + // + // Determines whether the MathML should be marked so that the HTML-CSS + // and SVG output jax will use MathML spacing rules rather than TeX + // spacing rules. Since AsciiMath was designed for MathML output, the + // MathML rules are used by default. + // + useMathMLspacing: true, + + // + // Determines whether limits are placed above and below operators, + // or next to them. (AsciiMath doesn't have separate in-line and + // display modes like TeX and MathML do, so this is the only control + // you have over its output) + // + displaystyle: true, + + // + // The character to use for decimal places when scanning for a number. + // If you change it to ",", beware of things like "(1,2)" which would need + // to be changed to "(1, 2)" to be parsed correctly. + // + decimal: "." + }, + + //============================================================================ + // + // These parameters control the MathML input jax. + // + MathML: { + // + // This specifies whether to use TeX spacing or MathML spacing when the + // HTML-CSS output jax is used. + // + useMathMLspacing: false + }, + + //============================================================================ + // + // These parameters control the HTML-CSS output jax. + // + "HTML-CSS": { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // + // This is a list of the fonts to look for on a user's computer in + // preference to using MathJax's web-based fonts. These must + // correspond to directories available in the jax/output/HTML-CSS/fonts + // directory, where MathJax stores data about the characters available + // in the fonts. Set this to ["TeX"], for example, to prevent the + // use of the STIX fonts, or set it to an empty list, [], if + // you want to force MathJax to use web-based or image fonts. + // + availableFonts: ["STIX","TeX"], + + // + // This is the preferred font to use when more than one of those + // listed above is available. + // + preferredFont: "TeX", + + // + // This is the web-based font to use when none of the fonts listed + // above are available on the user's computer. Note that currently + // only the TeX font is available in a web-based form. Set this to + // + // webFont: null, + // + // if you want to prevent the use of web-based fonts. + // + webFont: "TeX", + + // + // This is the font to use for image fallback mode (when none of the + // fonts listed above are available and the browser doesn't support + // web-fonts via the @font-face CSS directive). Note that currently + // only the TeX font is available as an image font. Set this to + // + // imageFont: null, + // + // if you want to prevent the use of image fonts (e.g., you have not + // installed the image fonts on your server). In this case, only + // browsers that support web-based fonts will be able to view your pages + // without having the fonts installed on the client computer. The browsers + // that support web-based fonts include: IE6 and later, Chrome, Safari3.1 + // and above, Firefox3.5 and later, and Opera10 and later. Note that + // Firefox3.0 is NOT on this list, so without image fonts, FF3.0 users + // will be required to to download and install either the STIX fonts or the + // MathJax TeX fonts. + // + imageFont: "TeX", + + // + // This is the font-family CSS value used for characters that are not + // in the selected font (e.g., for web-based fonts, this is where to + // look for characters not included in the MathJax_* fonts). IE will + // stop looking after the first font that exists on the system (even + // if it doesn't contain the needed character), so order these carefully. + // + undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif", + + // + // This setting controls whether elements will be typeset + // using the math fonts or the font of the surrounding text. When + // false, the mathvariant="normal" font will be used; when true, + // the font will be inherited from the surrounding paragraph. + // + mtextFontInherit: false, + + // + // These values control how "chunky" the display of mathematical + // expressions will be. + // + // EqnChunk is the number of equations that will be typeset before + // they appear on screen. Larger values make for less visual flicker + // as the equations are drawn, but also mean longer delays before the + // reader sees anything. + // + // EqChunkFactor is the factor by which the EqnChunk will grow after each + // chunk is displayed. + // + // EqChunkDelay is the time (in milliseconds) to delay between chunks + // (to allow the browser to respond to other user interaction). + // + // Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get + // the behavior from MathJax v1.1 and below. + // + EqnChunk: 50, + EqnChunkFactor: 1.5, + EqnChunkDelay: 100, + + // + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + // + matchFontHeight: true, + + // + // When true, MathJax will not measure the widths or heights of the + // subexpressions as it creates its output, but instead will rely on + // its internal calculations based on the bounding boxes of the + // characters it uses, and will only take measurements when it + // absolutely has to. Since measurements cause display reflows, they + // slows down MathJax considerably, so without them MathJax runs + // faster, but can produce slightly less accurate character placements, + // especially in width fractions or roots. + // + noReflows: true, + + + // + // These settings control automatic line breaking. It is off by + // default, so only explicit line breaks are performed (via + // linebreak="newline" attributes on and elements). To + // perform automatic line breaking on line expressions, set + // 'automatic' to 'true' below. The line breaks will be applied via a + // penalty-based heuristic, which does well, but isn't perfect. You + // might need to use linebreak="goodbreak" or linebreak="badbreak" by + // hand in order to get better effects. It is also possible to modify + // the penalty values; contact the MathJax user's forum for details. + // + linebreaks: { + + // + // This controls the automatic breaking of expressions: + // when false, only process linebreak="newline", + // when true, line breaks are inserted automatically in long expressions. + // + automatic: false, + + // + // This controls how wide the lines of mathematics can be + // + // Use an explicit width like "30em" for a fixed width. + // Use "container" to compute the size from the containing element. + // Use "nn% container" for a portion of the container. + // Use "nn%" for a portion of the window size. + // + // The container-based widths may be slower, and may not produce the + // expected results if the layout width changes due to the removal + // of previews or inclusion of mathematics during typesetting. + // + width: "container" + }, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax .merror": { + // color: "#CC0000", + // border: "1px solid #CC0000" + // } + // } + // + styles: {}, + + // + // Configuration for tooltips + // (see also the #MathJax_Tooltip CSS in MathJax/jax/output/HTML-CSS/config.js, + // which can be overridden using the styles values above). + // + tooltip: { + delayPost: 600, // milliseconds delay before tooltip is posted after mouseover + delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout + offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position + } + }, + + //============================================================================ + // + // These parameters control the NativeMML output jax. + // + NativeMML: { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + matchFontHeight: true, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax_MathML": { + // color: "red" // MathML is in red + // } + // } + // + styles: {} + }, + + //============================================================================ + // + // These parameters control the SVG output jax. + // + "SVG": { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // + // This specifies the font to use for SVG output (currently the only + // one available) + // + font: "TeX", + + // + // This is the stroke width to use for all character paths (1em = 1000 + // units). This is a cheap way of getting slightly lighter or darker + // characters + // + blacker: 10, + + // + // This is the font-family CSS value used for characters that are not + // in the selected font. IE will stop looking after the first font + // that exists on the system (even if it doesn't contain the needed + // character), so order these carefully. + // + undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif", + + // + // This setting controls whether elements will be typeset + // using the math fonts or the font of the surrounding text. When + // false, the mathvariant="normal" font will be used; when true, + // the font will be inherited from the surrounding paragraph. + // + mtextFontInherit: false, + + // + // This controls whether the MathML structure is retained and CSS + // classes are added to mark the original MathML elements (as in the + // HTML-CSS output). By default, the SVG output jax removes unneeded + // nesting in order to produce a more efficient markup, but if you + // want to use CSS to style the elements as if they were MathML, you + // might need to set this to true. + // + addMMLclasses: false, + + // + // These values control how "chunky" the display of mathematical + // expressions will be. + // + // EqnChunk is the number of equations that will be typeset before + // they appear on screen. Larger values make for less visual flicker + // as the equations are drawn, but also mean longer delays before the + // reader sees anything. + // + // EqChunkFactor is the factor by which the EqnChunk will grow after each + // chunk is displayed. + // + // EqChunkDelay is the time (in milliseconds) to delay between chunks + // (to allow the browser to respond to other user interaction). + // + // Set EqnChunk to 1, EqnChunkFactor to 1, and EwnChunkDelay to 10 to get + // the behavior from MathJax v1.1 and below. + // + EqnChunk: 50, + EqnChunkFactor: 1.5, + EqnChunkDelay: 100, + + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + matchFontHeight: true, + + // + // These settings control automatic line breaking. It is off by + // default, so only explicit line breaks are performed (via + // linebreak="newline" attributes on and elements). To + // perform automatic line breaking on line expressions, set + // 'automatic' to 'true' below. The line breaks will be applied via a + // penalty-based heuristic, which does well, but isn't perfect. You + // might need to use linebreak="goodbreak" or linebreak="badbreak" by + // hand in order to get better effects. It is also possible to modify + // the penalty values; contact the MathJax user's forum for details. + // + linebreaks: { + + // + // This controls the automatic breaking of expressions: + // when false, only process linebreak="newline", + // when true, line breaks are inserted automatically in long expressions. + // + automatic: false, + + // + // This controls how wide the lines of mathematics can be + // + // Use an explicit width like "30em" for a fixed width. + // Use "container" to compute the size from the containing element. + // Use "nn% container" for a portion of the container. + // Use "nn%" for a portion of the window size. + // + // The container-based widths may be slower, and may not produce the + // expected results if the layout width changes due to the removal + // of previews or inclusion of mathematics during typesetting. + // + width: "container" + }, + + // + // These are the styles used for merror elements in SVG output. Note + // that only a limited number of style attributes are supported by + // SVG, but you can at least change the colors and borders. + // + // + merrorStyle: { + fontSize:"90%", color:"#C00", background:"#FF8", + border: "1px solid #C00", padding:"3px" + }, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax .merror": { + // color: "#CC0000", + // border: "1px solid #CC0000" + // } + // } + // + styles: {}, + + // + // Configuration for tooltips + // (see also the #MathJax_Tooltip CSS in MathJax/jax/output/SVG/config.js, + // which can be overridden using the styles values above). + // + tooltip: { + delayPost: 600, // milliseconds delay before tooltip is posted after mouseover + delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout + offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position + } + }, + + //============================================================================ + // + // These parameters control the contextual menus that are available on the + // mathematics within the page (provided the showMathMenu value is true above). + // + MathMenu: { + // + // This is the hover delay for the display of submenus in the + // contextual menu. When the mouse is still over a submenu label for + // this long, the menu will appear. (The menu also will appear if you + // click on the label.) It is in milliseconds. + // + delay: 150, + + // + // This is the URL for the MathJax Help menu item. + // + helpURL: "http://www.mathjax.org/help-v2/user/", + + // + // These control whether the "Math Renderer", "MathPlayer", "Font + // Preferences", "Contextual Menu", and "Discoverable" menu items will + // be displayed or not. + // + showRenderer: true, + showMathPlayer: true, + showFontMenu: false, + showContext: false, + showDiscoverable: false, + + // + // These are the settings for the Annotation menu. If the root has + // a child that contains one of the following annotation + // formats, the source will be available via the "Show Math As" menu. + // Each format has a list of possible encodings. + // + semanticsAnnotations: { + "TeX": ["TeX", "LaTeX", "application/x-tex"], + "StarMath": ["StarMath 5.0"], + "Maple": ["Maple"], + "ContentMathML": ["MathML-Content", "application/mathml-content+xml"], + "OpenMath": ["OpenMath"] + }, + + // + // These are the settings for the Show Source window. The initial + // width and height will be reset after the source is shown in an + // attempt to make the window fit the output better. + // + windowSettings: { + status: "no", toolbar: "no", locationbar: "no", menubar: "no", + directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes", + width: 100, height: 50 + }, + + // + // This allows you to change the CSS that controls the menu + // appearance. See the extensions/MathMenu.js file for details + // of the default settings. + // + styles: {} + + }, + + //============================================================================ + // + // These parameters control the contextual menus that are available on the + // mathematics within the page (provided the showMathMenu value is true above). + // + MathEvents: { + // + // This is the time required for the mouse to be held still over a + // typeset equation in order for it to count as a hover (used when the + // zoom trigger is "Hover"). It is in milliseconds. + // + hover: 500 + }, + + //============================================================================ + // + // These parameters control the MMLorHTML configuration file. + // NOTE: if you add MMLorHTML.js to the config array above, + // you must REMOVE the output jax from the jax array. + // + MMLorHTML: { + // + // The output jax that is to be preferred when both are possible + // (set to "MML" for native MathML, "HTML" for MathJax's HTML-CSS output jax). + // + prefer: { + MSIE: "MML", + Firefox: "HTML", + Opera: "HTML", + Safari: "HTML", + Chrome: "HTML", + other: "HTML" + } + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/config/default.js"); diff --git a/mathjax/asset/config/local/local.js b/mathjax/asset/config/local/local.js new file mode 100644 index 00000000..cf2c6780 --- /dev/null +++ b/mathjax/asset/config/local/local.js @@ -0,0 +1,40 @@ +/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ + +/************************************************************* + * + * MathJax/config/local/local.js + * + * Include changes and configuration local to your installation + * in this file. For example, common macros can be defined here + * (see below). To use this file, add "local/local.js" to the + * config array in MathJax.js or your MathJax.Hub.Config() call. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { + var TEX = MathJax.InputJax.TeX; + + // place macros here. E.g.: + // TEX.Macro("R","{\\bf R}"); + // TEX.Macro("op","\\mathop{\\rm #1}",1); // a macro with 1 parameter + +}); + +MathJax.Ajax.loadComplete("[MathJax]/config/local/local.js"); diff --git a/mathjax/asset/extensions/AssistiveMML.js b/mathjax/asset/extensions/AssistiveMML.js new file mode 100644 index 00000000..935fcc62 --- /dev/null +++ b/mathjax/asset/extensions/AssistiveMML.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/AssistiveMML.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(a,e,b,f){var c=b.config.menuSettings;var d=MathJax.Extension.AssistiveMML={version:"2.7.5",config:b.CombineConfig("AssistiveMML",{disabled:false,styles:{".MJX_Assistive_MathML":{position:"absolute!important",top:0,left:0,clip:(b.Browser.isMSIE&&(document.documentMode||0)<8?"rect(1px 1px 1px 1px)":"rect(1px, 1px, 1px, 1px)"),padding:"1px 0 0 0!important",border:"0!important",height:"1px!important",width:"1px!important",overflow:"hidden!important",display:"block!important","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},".MJX_Assistive_MathML.MJX_Assistive_MathML_Block":{width:"100%!important"}}}),Config:function(){if(!this.config.disabled&&c.assistiveMML==null){b.Config({menuSettings:{assistiveMML:true}})}a.Styles(this.config.styles);b.Register.MessageHook("End Math",function(g){if(c.assistiveMML){return d.AddAssistiveMathML(g[1])}})},AddAssistiveMathML:function(g){var h={jax:b.getAllJax(g),i:0,callback:MathJax.Callback({})};this.HandleMML(h);return h.callback},RemoveAssistiveMathML:function(k){var h=b.getAllJax(k),l;for(var j=0,g=h.length;j/g,"")}catch(k){if(!k.restart){throw k}return MathJax.Callback.After(["HandleMML",this,l],k.restart)}n.setAttribute("data-mathml",i);j=f.addElement(n,"span",{isMathJax:true,unselectable:"on",className:"MJX_Assistive_MathML"+(h.root.Get("display")==="block"?" MJX_Assistive_MathML_Block":"")});try{j.innerHTML=i}catch(k){}n.style.position="relative";n.setAttribute("role","presentation");n.firstChild.setAttribute("aria-hidden","true");j.setAttribute("role","presentation")}l.i++}l.callback()}};b.Startup.signal.Post("AssistiveMML Ready")})(MathJax.Ajax,MathJax.Callback,MathJax.Hub,MathJax.HTML);MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/toMathML.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/AssistiveMML.js"],function(){MathJax.Hub.Register.StartupHook("End Config",["Config",MathJax.Extension.AssistiveMML])}); diff --git a/mathjax/asset/extensions/CHTML-preview.js b/mathjax/asset/extensions/CHTML-preview.js new file mode 100644 index 00000000..bd602093 --- /dev/null +++ b/mathjax/asset/extensions/CHTML-preview.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/CHTML-preview.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/fast-preview.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/CHTML-preview.js"]); diff --git a/mathjax/asset/extensions/FontWarnings.js b/mathjax/asset/extensions/FontWarnings.js new file mode 100644 index 00000000..baac3656 --- /dev/null +++ b/mathjax/asset/extensions/FontWarnings.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/FontWarnings.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(b,d){var i="2.7.5";var a="http://www.stixfonts.org/";var f="https://github.com/mathjax/MathJax/tree/master/fonts/HTML-CSS/TeX/otf";var h=b.CombineConfig("FontWarnings",{messageStyle:{position:"fixed",bottom:"4em",left:"3em",width:"40em",border:"3px solid #880000","background-color":"#E0E0E0",color:"black",padding:"1em","font-size":"small","white-space":"normal","border-radius":".75em","-webkit-border-radius":".75em","-moz-border-radius":".75em","-khtml-border-radius":".75em","box-shadow":"4px 4px 10px #AAAAAA","-webkit-box-shadow":"4px 4px 10px #AAAAAA","-moz-box-shadow":"4px 4px 10px #AAAAAA","-khtml-box-shadow":"4px 4px 10px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=3, OffY=3, Color='gray', Positive='true')"},Message:{webFont:[["closeBox"],["webFont","MathJax is using web-based fonts to display the mathematics on this page. These take time to download, so the page would render faster if you installed math fonts directly in your system's font folder."],["fonts"]],imageFonts:[["closeBox"],["imageFonts","MathJax is using its image fonts rather than local or web-based fonts. This will render slower than usual, and the mathematics may not print at the full resolution of your printer."],["fonts"],["webFonts"]],noFonts:[["closeBox"],["noFonts","MathJax is unable to locate a font to use to display its mathematics, and image fonts are not available, so it is falling back on generic unicode characters in hopes that your browser will be able to display them. Some characters may not show up properly, or possibly not at all."],["fonts"],["webFonts"]]},HTML:{closeBox:[["div",{style:{position:"absolute",overflow:"hidden",top:".1em",right:".1em",border:"1px outset",width:"1em",height:"1em","text-align":"center",cursor:"pointer","background-color":"#EEEEEE",color:"#606060","border-radius":".5em","-webkit-border-radius":".5em","-moz-border-radius":".5em","-khtml-border-radius":".5em"},onclick:function(){if(c.div&&c.fade===0){if(c.timer){clearTimeout(c.timer)}c.div.style.display="none"}}},[["span",{style:{position:"relative",bottom:".2em"}},["x"]]]]],webFonts:[["p"],["webFonts","Most modern browsers allow for fonts to be downloaded over the web. Updating to a more recent version of your browser (or changing browsers) could improve the quality of the mathematics on this page."]],fonts:[["p"],["fonts","MathJax can use either the [STIX fonts](%1) or the [MathJax TeX fonts](%2). Download and install one of those fonts to improve your MathJax experience.",a,f]],STIXfonts:[["p"],["STIXPage","This page is designed to use the [STIX fonts](%1). Download and install those fonts to improve your MathJax experience.",a]],TeXfonts:[["p"],["TeXPage","This page is designed to use the [MathJax TeX fonts](%1). Download and install those fonts to improve your MathJax experience.",f]]},removeAfter:12*1000,fadeoutSteps:10,fadeoutTime:1.5*1000});if(MathJax.Hub.Browser.isIE9&&document.documentMode>=9){delete h.messageStyle.filter}var c={div:null,fade:0};var e=function(m){if(c.div){return}var j=MathJax.OutputJax["HTML-CSS"],n=document.body;if(b.Browser.isMSIE){if(h.messageStyle.position==="fixed"){MathJax.Message.Init();n=document.getElementById("MathJax_MSIE_Frame")||n;if(n!==document.body){h.messageStyle.position="absolute"}}}else{delete h.messageStyle.filter}h.messageStyle.maxWidth=(document.body.clientWidth-75)+"px";var k=0;while(k1?z/h:1);C=Math.floor(Math.max(this.config.minScaleAdjust/100,C)*this.config.scale);if(C/100!==g.scale){o.push([v.style,C])}g.scale=C/100;g.fontScale=C+"%";g.ex=z;g.mex=h}if("scrollWidth" in g&&(r||g.scrollWidth!==k.firstChild.scrollWidth)){g.scrollWidth=k.firstChild.scrollWidth;t.push([k.parentNode.style,g.scrollWidth/g.ex/g.scale])}if(k.MathJaxMtds){for(var u=0,p=k.MathJaxMtds.length;u0){this.HoverFadeTimer(q,q.hover.inc);return}s.parentNode.removeChild(s);if(r){r.parentNode.removeChild(r)}if(q.hover.remove){clearTimeout(q.hover.remove)}delete q.hover},HoverFadeTimer:function(q,s,r){q.hover.inc=s;if(!q.hover.timer){q.hover.timer=setTimeout(g(["HoverFade",this,q]),(r||o.fadeDelay))}},HoverMenu:function(q){if(!q){q=window.event}return b[this.jax].ContextMenu(q,this.math,true)},ClearHover:function(q){if(q.hover.remove){clearTimeout(q.hover.remove)}if(q.hover.timer){clearTimeout(q.hover.timer)}f.ClearHoverTimer();delete q.hover},Px:function(q){if(Math.abs(q)<0.006){return"0px"}return q.toFixed(2).replace(/\.?0+$/,"")+"px"},getImages:function(){if(k.discoverable){var q=new Image();q.src=o.button.src}}};var a=c.Touch={last:0,delay:500,start:function(r){var q=new Date().getTime();var s=(q-a.last=0){h=a.cloneNode(h,true)}var i=a.cloneNode(h);for(var g=0,f=h.childNodes.length;g1){a.applyTransform(o,p[0],g)}a.appendToken(o,"mo",f);if(p.length>0){var q=p[(p.length===1)?0:1];a.applyTransform(o,q,g)}if(k){a.appendToken(o,"mo",")")}n.appendChild(o)}},infix:function(f,g){return function(r,k,o,t,i,p,h){var s=a.createElement("mrow");var n=h>g;if(n){a.appendToken(s,"mo","(")}for(var q=0,m=t.length;q0){a.appendToken(s,"mo",f)}a.applyTransform(s,t[q],g)}if(n){a.appendToken(s,"mo",")")}r.appendChild(s)}},iteration:function(f,g){return function(q,y,C,l,h,u,m){var t=a.createElement("mrow");var x=a.createElement("mo");a.setTextContent(x,f);var o=a.createElement("munderover");o.appendChild(x);var k=a.createElement("mrow");var A,w,v,B,n,s,z,r;for(A=0,v=u.length;A0){a.appendToken(y,"mo",",")}n=a.getChildren(t);if(n.length){a.applyTransform(y,n[0],0)}}var x=a.createElement("mrow");var A=false;for(v=0,p=s.length;v0){a.appendToken(n,"mo",",")}a.applyTransform(n,s[p],0)}if(o.length){a.appendToken(n,"mo","|");for(p=0,k=o.length;p",1),lt:a.transforms.infix("<",1),geq:a.transforms.infix("\u2265",1),leq:a.transforms.infix("\u2264",1),equivalent:a.transforms.infix("\u2261",1),approx:a.transforms.infix("\u2248",1),subset:a.transforms.infix("\u2286",2),prsubset:a.transforms.infix("\u2282",2),cartesianproduct:a.transforms.infix("\u00D7",2),cartesian_product:a.transforms.infix("\u00D7",2),vectorproduct:a.transforms.infix("\u00D7",2),scalarproduct:a.transforms.infix(".",2),outerproduct:a.transforms.infix("\u2297",2),sum:a.transforms.iteration("\u2211","="),product:a.transforms.iteration("\u220F","="),forall:a.transforms.bind("\u2200",".",","),exists:a.transforms.bind("\u2203",".",","),lambda:a.transforms.bind("\u03BB",".",","),limit:a.transforms.iteration("lim","\u2192"),sdev:a.transforms.fn("\u03c3"),determinant:a.transforms.fn("det"),max:a.transforms.minmax("max"),min:a.transforms.minmax("min"),real:a.transforms.fn("\u211b"),imaginary:a.transforms.fn("\u2111"),set:a.transforms.set("{","}"),list:a.transforms.set("(",")"),exp:function(h,k,g,j,i,m,f){var l=a.createElement("msup");a.appendToken(l,"mi","e");a.applyTransform(l,j[0],0);h.appendChild(l)},union:function(h,k,g,j,i,l,f){if(i.length){a.transforms.iteration("\u22C3","=")(h,k,g,j,i,l,f)}else{a.transforms.infix("\u222A",2)(h,k,g,j,i,l,f)}},intersect:function(q,i,n,s,g,o,f){if(g.length){a.transforms.iteration("\u22C2","=")(q,i,n,s,g,o,f)}else{var r=a.createElement("mrow");var m=f>2;if(m){a.appendToken(r,"mo","(")}for(var p=0,k=s.length;p0){a.appendToken(r,"mo","\u2229");if(s[p].nodeName==="apply"){var h=a.getChildren(s[p])[0];t=h.nodeName==="union"}}if(t){a.appendToken(r,"mo","(")}a.applyTransform(r,s[p],2);if(t){a.appendToken(r,"mo",")")}}if(m){a.appendToken(r,"mo",")")}q.appendChild(r)}},floor:function(h,l,g,k,j,m,f){var i=a.createElement("mrow");a.appendToken(i,"mo","\u230a");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","\u230b");h.appendChild(i)},conjugate:function(h,l,g,k,j,m,f){var i=a.createElement("mover");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","\u00af");h.appendChild(i)},abs:function(h,l,g,k,j,m,f){var i=a.createElement("mrow");a.appendToken(i,"mo","|");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","|");h.appendChild(i)},and:function(h,k,g,j,i,l,f){if(i.length||l.length){a.transforms.iteration("\u22c0","=")(h,k,g,j,i,l,4)}else{a.transforms.infix("\u2227",2)(h,k,g,j,i,l,f)}},or:function(h,k,g,j,i,l,f){if(i.length||l.length){a.transforms.iteration("\u22c1","=")(h,k,g,j,i,l,4)}else{a.transforms.infix("\u2228",2)(h,k,g,j,i,l,f)}},xor:function(h,k,g,j,i,l,f){if(i.length||l.length){a.transforms.iteration("xor","=")(h,k,g,j,i,l,4)}else{a.transforms.infix("xor",2)(h,k,g,j,i,l,f)}},card:function(h,l,g,k,j,m,f){var i=a.createElement("mrow");a.appendToken(i,"mo","|");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","|");h.appendChild(i)},mean:function(h,l,g,k,j,m,f){if(k.length===1){var i=a.createElement("mover");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","\u00af");h.appendChild(i)}else{h.appendChild(a.createmfenced(k,"\u27e8","\u27e9"))}},moment:function(s,k,o,w,g,p,f){var n,v,h,r,q,m;for(r=0,m=p.length;r1){y.appendChild(a.createmfenced(w,"(",")"))}else{a.applyTransform(y,w[0],0)}if(n){var x=a.createElement("msup");x.appendChild(y);h=a.getChildren(n);for(q=0,m=h.length;q3;if(k){a.appendToken(q,"mo","(")}for(var o=0,i=r.length;o0){a.appendToken(q,"mo",(r[o].nodeName==="cn")?"\u00D7":"\u2062")}a.applyTransform(q,r[o],3)}if(k){a.appendToken(q,"mo",")")}p.appendChild(q)},plus:function(s,k,p,u,g,q,f){var t=a.createElement("mrow");var o=f>2;if(o){a.appendToken(t,"mo","(")}for(var r=0,m=u.length;r0){var i;if(a.settings.collapsePlusMinus){if(v.nodeName==="cn"&&!(h.length)&&(i=Number(a.getTextContent(v)))<0){a.appendToken(t,"mo","\u2212");a.appendToken(t,"mn",-i)}else{if(v.nodeName==="apply"&&h.length===2&&h[0].nodeName==="minus"){a.appendToken(t,"mo","\u2212");a.applyTransform(t,h[1],2)}else{if(v.nodeName==="apply"&&h.length>2&&h[0].nodeName==="times"&&h[1].nodeName==="cn"&&(i=Number(a.getTextContent(h[1])))<0){a.appendToken(t,"mo","\u2212");h[1].textContent=-i;a.applyTransform(t,v,2)}else{a.appendToken(t,"mo","+");a.applyTransform(t,v,2)}}}}else{a.appendToken(t,"mo","+");a.applyTransform(t,v,2)}}else{a.applyTransform(t,v,2)}}if(o){a.appendToken(t,"mo",")")}s.appendChild(t)},transpose:function(h,k,g,j,i,m,f){var l=a.createElement("msup");a.applyTransform(l,j[0],f);a.appendToken(l,"mi","T");h.appendChild(l)},power:function(h,k,g,j,i,m,f){var l=a.createElement("msup");a.applyTransform(l,j[0],3);a.applyTransform(l,j[1],f);h.appendChild(l)},selector:function(p,h,k,s,g,n,f){var r=a.createElement("msub");var q=s?s[0]:a.createElement("mrow");a.applyTransform(r,q,0);var m=a.createElement("mrow");for(var o=1,j=s.length;o1){a.applyTransform(i,k[1],0)}}a.appendToken(i,"mo","\u230B");h.appendChild(i)},factorial:function(h,l,g,k,j,m,f){var i=a.createElement("mrow");a.applyTransform(i,k[0],4);a.appendToken(i,"mo","!");h.appendChild(i)},root:function(p,j,m,q,h,n,f){var g;if(m.nodeName==="root"&&(n.length===0||(n[0].nodeName==="degree"&&a.getTextContent(n[0])==="2"))){g=a.createElement("msqrt");for(var o=0,k=q.length;o1){var i=a.createElement("msup");a.applyTransform(i,j,0);a.appendToken(i,"mn",l);M.appendChild(i)}else{a.applyTransform(M,j,0)}}for(K=0,F=z.length;K0){if(x){a.appendToken(s,"mo","+")}a.appendToken(s,"mn",m)}}if(g.length){L=g[0]}for(K=0,F=f.length;K ltr ) ( ] [ } { ) ( ] [ } { \ )(}{>< top right 0 decimalpoint decimalpoint . decimalpoint * 0.1em 0.15em 0.2em 0.15em 0 ) ( / : = top ) ';var b;if(window.XSLTProcessor){if(!d.ParseXML){d.ParseXML=d.createParser()}d.mml3XSLT=new XSLTProcessor();d.mml3XSLT.importStylesheet(d.ParseXML(e))}else{if(MathJax.Hub.Browser.isMSIE){if(MathJax.Hub.Browser.versionAtLeast("9.0")||(document.documentMode||0)>=9){b=new ActiveXObject("Msxml2.FreeThreadedDOMDocument");b.loadXML(e);var a=new ActiveXObject("Msxml2.XSLTemplate");a.stylesheet=b;d.mml3XSLT={mml3:a.createProcessor(),transformToDocument:function(h){this.mml3.input=h;this.mml3.transform();return this.mml3.output}}}else{b=d.createMSParser();b.async=false;b.loadXML(e);d.mml3XSLT={mml3:b,transformToDocument:function(h){return h.documentElement.transformNode(this.mml3)}}}}else{d.mml3XSLT=null}}MathJax.Ajax.Styles({".MathJax .mi, .MathJax .mo, .MathJax .mn, .MathJax .mtext":{direction:"ltr",display:"inline-block"},".MathJax .ms, .MathJax .mspace, .MathJax .mglyph":{direction:"ltr",display:"inline-block"}});MathJax.Hub.Startup.signal.Post("MathML mml3.js Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/MathML/mml3.js"); diff --git a/mathjax/asset/extensions/MathMenu.js b/mathjax/asset/extensions/MathMenu.js new file mode 100644 index 00000000..0018b80c --- /dev/null +++ b/mathjax/asset/extensions/MathMenu.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/MathMenu.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(f,o,q,e,r){var p="2.7.5";var d=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:d};var t=function(u){return MathJax.Localization._.apply(MathJax.Localization,[["MathMenu",u]].concat([].slice.call(arguments,1)))};var i=MathJax.Object.isArray;var a=f.Browser.isPC,l=f.Browser.isMSIE,m=((document.documentMode||0)>8);var j=(a?null:"5px");var s=f.CombineConfig("MathMenu",{delay:150,showRenderer:true,showMathPlayer:true,showFontMenu:false,showContext:false,showDiscoverable:false,showLocale:true,showLocaleURL:false,semanticsAnnotations:{TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]},windowSettings:{status:"no",toolbar:"no",locationbar:"no",menubar:"no",directories:"no",personalbar:"no",resizable:"yes",scrollbars:"yes",width:400,height:300,left:Math.round((screen.width-400)/2),top:Math.round((screen.height-300)/3)},styles:{"#MathJax_About":{position:"fixed",left:"50%",width:"auto","text-align":"center",border:"3px outset",padding:"1em 2em","background-color":"#DDDDDD",color:"black",cursor:"default","font-family":"message-box","font-size":"120%","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":"15px","-webkit-border-radius":"15px","-moz-border-radius":"15px","-khtml-border-radius":"15px","box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},"#MathJax_About.MathJax_MousePost":{outline:"none"},".MathJax_Menu":{position:"absolute","background-color":"white",color:"black",width:"auto",padding:(a?"2px":"5px 0px"),border:"1px solid #CCCCCC",margin:0,cursor:"default",font:"menu","text-align":"left","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":j,"-webkit-border-radius":j,"-moz-border-radius":j,"-khtml-border-radius":j,"box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},".MathJax_MenuItem":{padding:(a?"2px 2em":"1px 2em"),background:"transparent"},".MathJax_MenuArrow":{position:"absolute",right:".5em","padding-top":".25em",color:"#666666","font-family":(l?"'Arial unicode MS'":null),"font-size":".75em"},".MathJax_MenuActive .MathJax_MenuArrow":{color:"white"},".MathJax_MenuArrow.RTL":{left:".5em",right:"auto"},".MathJax_MenuCheck":{position:"absolute",left:".7em","font-family":(l?"'Arial unicode MS'":null)},".MathJax_MenuCheck.RTL":{right:".7em",left:"auto"},".MathJax_MenuRadioCheck":{position:"absolute",left:(a?"1em":".7em")},".MathJax_MenuRadioCheck.RTL":{right:(a?"1em":".7em"),left:"auto"},".MathJax_MenuLabel":{padding:(a?"2px 2em 4px 1.33em":"1px 2em 3px 1.33em"),"font-style":"italic"},".MathJax_MenuRule":{"border-top":(a?"1px solid #CCCCCC":"1px solid #DDDDDD"),margin:(a?"4px 1px 0px":"4px 3px")},".MathJax_MenuDisabled":{color:"GrayText"},".MathJax_MenuActive":{"background-color":(a?"Highlight":"#606872"),color:(a?"HighlightText":"white")},".MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus":{"background-color":"#E8E8E8"},".MathJax_ContextMenu:focus":{outline:"none"},".MathJax_ContextMenu .MathJax_MenuItem:focus":{outline:"none"},"#MathJax_AboutClose":{top:".2em",right:".2em"},".MathJax_Menu .MathJax_MenuClose":{top:"-10px",left:"-10px"},".MathJax_MenuClose":{position:"absolute",cursor:"pointer",display:"inline-block",border:"2px solid #AAA","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","font-family":"'Courier New',Courier","font-size":"24px",color:"#F0F0F0"},".MathJax_MenuClose span":{display:"block","background-color":"#AAA",border:"1.5px solid","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","line-height":0,padding:"8px 0 6px"},".MathJax_MenuClose:hover":{color:"white!important",border:"2px solid #CCC!important"},".MathJax_MenuClose:hover span":{"background-color":"#CCC!important"},".MathJax_MenuClose:hover:focus":{outline:"none"}}});var n,k,b;f.Register.StartupHook("MathEvents Ready",function(){n=MathJax.Extension.MathEvents.Event.False;k=MathJax.Extension.MathEvents.Hover;b=MathJax.Extension.MathEvents.Event.KEY});var h=MathJax.Object.Subclass({Keydown:function(u,v){switch(u.keyCode){case b.ESCAPE:this.Remove(u,v);break;case b.RIGHT:this.Right(u,v);break;case b.LEFT:this.Left(u,v);break;case b.UP:this.Up(u,v);break;case b.DOWN:this.Down(u,v);break;case b.RETURN:case b.SPACE:this.Space(u,v);break;default:return;break}return n(u)},Escape:function(u,v){},Right:function(u,v){},Left:function(u,v){},Up:function(u,v){},Down:function(u,v){},Space:function(u,v){}},{});var g=MathJax.Menu=h.Subclass({version:p,items:[],posted:false,title:null,margin:5,Init:function(u){this.items=[].slice.call(arguments,0)},With:function(u){if(u){f.Insert(this,u)}return this},Post:function(M,E,B){if(!M){M=window.event||{}}var I=document.getElementById("MathJax_MenuFrame");if(!I){I=g.Background(this);delete c.lastItem;delete c.lastMenu;delete g.skipUp;d.Post(["post",g.jax]);g.isRTL=(MathJax.Localization.fontDirection()==="rtl")}var v=o.Element("div",{onmouseup:g.Mouseup,ondblclick:n,ondragstart:n,onselectstart:n,oncontextmenu:n,menuItem:this,className:"MathJax_Menu",onkeydown:g.Keydown,role:"menu"});if(M.type==="contextmenu"||M.type==="mouseover"){v.className+=" MathJax_ContextMenu"}if(!B){MathJax.Localization.setCSS(v)}for(var N=0,K=this.items.length;NA-this.margin){H=A-v.offsetWidth-this.margin}if(g.isMobile){H=Math.max(5,H-Math.floor(v.offsetWidth/2));F-=20}g.skipUp=M.isContextMenu}else{var z="left",J=E.offsetWidth;H=(g.isMobile?30:J-2);F=0;while(E&&E!==I){H+=E.offsetLeft;F+=E.offsetTop;E=E.parentNode}if(!g.isMobile){if((g.isRTL&&H-J-v.offsetWidth>this.margin)||(!g.isRTL&&H+v.offsetWidth>A-this.margin)){z="right";H=Math.max(this.margin,H-J-v.offsetWidth+6)}}if(!a){v.style["borderRadiusTop"+z]=0;v.style["WebkitBorderRadiusTop"+z]=0;v.style["MozBorderRadiusTop"+z]=0;v.style["KhtmlBorderRadiusTop"+z]=0}}v.style.left=H+"px";v.style.top=F+"px";if(document.selection&&document.selection.empty){document.selection.empty()}var G=window.pageXOffset||document.documentElement.scrollLeft;var D=window.pageYOffset||document.documentElement.scrollTop;g.Focus(v);if(M.type==="keydown"){g.skipMouseoverFromKey=true;setTimeout(function(){delete g.skipMouseoverFromKey},s.delay)}window.scrollTo(G,D);return n(M)},Remove:function(u,v){d.Post(["unpost",g.jax]);var w=document.getElementById("MathJax_MenuFrame");if(w){w.parentNode.removeChild(w);if(this.msieFixedPositionBug){detachEvent("onresize",g.Resize)}}if(g.jax.hover){delete g.jax.hover.nofade;k.UnHover(g.jax)}g.Unfocus(v);if(u.type==="mousedown"){g.CurrentNode().blur()}return n(u)},Find:function(u){return this.FindN(1,u,[].slice.call(arguments,1))},FindId:function(u){return this.FindN(0,u,[].slice.call(arguments,1))},FindN:function(y,v,x){for(var w=0,u=this.items.length;w0){u.oldTabIndex=u.tabIndex}u.tabIndex=-1}},SetTabIndex:function(){var v=g.AllNodes();for(var w=0,u;u=v[w];w++){if(u.oldTabIndex!==undefined){u.tabIndex=u.oldTabIndex;delete u.oldTabIndex}else{u.tabIndex=f.getTabOrder(u)}}},Mod:function(u,v){return((u%v)+v)%v},IndexOf:(Array.prototype.indexOf?function(u,v,w){return u.indexOf(v,w)}:function(u,x,y){for(var w=(y||0),v=u.length;w=0&&c.GetMenuNode(w).menuItem!==v[u].menuItem){v[u].menuItem.posted=false;v[u].parentNode.removeChild(v[u]);u--}},Touchstart:function(u,v){return this.TouchEvent(u,v,"Mousedown")},Touchend:function(u,v){return this.TouchEvent(u,v,"Mouseup")},TouchEvent:function(v,w,u){if(this!==c.lastItem){if(c.lastMenu){g.Event(v,c.lastMenu,"Mouseout")}g.Event(v,w,"Mouseover",true);c.lastItem=this;c.lastMenu=w}if(this.nativeTouch){return null}g.Event(v,w,u);return false},Remove:function(u,v){v=v.parentNode.menuItem;return v.Remove(u,v)},With:function(u){if(u){f.Insert(this,u)}return this},isRTL:function(){return g.isRTL},rtlClass:function(){return(this.isRTL()?" RTL":"")}},{GetMenuNode:function(u){return u.parentNode}});g.ENTRY=g.ITEM.Subclass({role:"menuitem",Attributes:function(u){u=f.Insert({onmouseover:g.Mouseover,onmouseout:g.Mouseout,onmousedown:g.Mousedown,onkeydown:g.Keydown,"aria-disabled":!!this.disabled},u);u=this.SUPER(arguments).Attributes.call(this,u);if(this.disabled){u.className+=" MathJax_MenuDisabled"}return u},MoveVertical:function(u,E,w){var x=c.GetMenuNode(E);var D=[];for(var z=0,C=x.menuItem.items,y;y=C[z];z++){if(!y.hidden){D.push(y)}}var B=g.IndexOf(D,this);if(B===-1){return}var A=D.length;var v=x.childNodes;do{B=g.Mod(w(B),A)}while(D[B].hidden||!v[B].role||v[B].role==="separator");this.Deactivate(E);D[B].Activate(u,v[B])},Up:function(v,u){this.MoveVertical(v,u,function(w){return w-1})},Down:function(v,u){this.MoveVertical(v,u,function(w){return w+1})},Right:function(v,u){this.MoveHorizontal(v,u,g.Right,!this.isRTL())},Left:function(v,u){this.MoveHorizontal(v,u,g.Left,this.isRTL())},MoveHorizontal:function(A,z,u,B){var x=c.GetMenuNode(z);if(x.menuItem===g.menu&&A.shiftKey){u(A,z)}if(B){return}if(x.menuItem!==g.menu){this.Deactivate(z)}var v=x.previousSibling.childNodes;var y=v.length;while(y--){var w=v[y];if(w.menuItem.submenu&&w.menuItem.submenu===x.menuItem){g.Focus(w);break}}this.RemoveSubmenus(z)},Space:function(u,v){this.Mouseup(u,v)},Activate:function(u,v){this.Deactivate(v);if(!this.disabled){v.className+=" MathJax_MenuActive"}this.DeactivateSubmenus(v);g.Focus(v)},Deactivate:function(u){u.className=u.className.replace(/ MathJax_MenuActive/,"")}});g.ITEM.COMMAND=g.ENTRY.Subclass({action:function(){},Init:function(u,w,v){if(!i(u)){u=[u,u]}this.name=u;this.action=w;this.With(v)},Label:function(u,v){return[this.Name()]},Mouseup:function(u,v){if(!this.disabled){this.Remove(u,v);d.Post(["command",this]);this.action.call(this,u)}return n(u)}});g.ITEM.SUBMENU=g.ENTRY.Subclass({submenu:null,marker:"\u25BA",markerRTL:"\u25C4",Attributes:function(u){u=f.Insert({"aria-haspopup":"true"},u);u=this.SUPER(arguments).Attributes.call(this,u);return u},Init:function(u,w){if(!i(u)){u=[u,u]}this.name=u;var v=1;if(!(w instanceof g.ITEM)){this.With(w),v++}this.submenu=g.apply(g,[].slice.call(arguments,v))},Label:function(u,v){this.submenu.posted=false;return[this.Name()+" ",["span",{className:"MathJax_MenuArrow"+this.rtlClass()},[this.isRTL()?this.markerRTL:this.marker]]]},Timer:function(u,v){this.ClearTimer();u={type:u.type,clientX:u.clientX,clientY:u.clientY};this.timer=setTimeout(e(["Mouseup",this,u,v]),s.delay)},ClearTimer:function(){if(this.timer){clearTimeout(this.timer)}},Touchend:function(v,x){var w=this.submenu.posted;var u=this.SUPER(arguments).Touchend.apply(this,arguments);if(w){this.Deactivate(x);delete c.lastItem;delete c.lastMenu}return u},Mouseout:function(u,v){if(!this.submenu.posted){this.Deactivate(v)}this.ClearTimer()},Mouseover:function(u,v){this.Activate(u,v)},Mouseup:function(u,v){if(!this.disabled){if(!this.submenu.posted){this.ClearTimer();this.submenu.Post(u,v,this.ltr);g.Focus(v)}else{this.DeactivateSubmenus(v)}}return n(u)},Activate:function(u,v){if(!this.disabled){this.Deactivate(v);v.className+=" MathJax_MenuActive"}if(!this.submenu.posted){this.DeactivateSubmenus(v);if(!g.isMobile){this.Timer(u,v)}}g.Focus(v)},MoveVertical:function(w,v,u){this.ClearTimer();this.SUPER(arguments).MoveVertical.apply(this,arguments)},MoveHorizontal:function(w,y,v,x){if(!x){this.SUPER(arguments).MoveHorizontal.apply(this,arguments);return}if(this.disabled){return}if(!this.submenu.posted){this.Activate(w,y);return}var u=c.GetMenuNode(y).nextSibling.childNodes;if(u.length>0){this.submenu.items[0].Activate(w,u[0])}}});g.ITEM.RADIO=g.ENTRY.Subclass({variable:null,marker:(a?"\u25CF":"\u2713"),role:"menuitemradio",Attributes:function(v){var u=s.settings[this.variable]===this.value?"true":"false";v=f.Insert({"aria-checked":u},v);v=this.SUPER(arguments).Attributes.call(this,v);return v},Init:function(v,u,w){if(!i(v)){v=[v,v]}this.name=v;this.variable=u;this.With(w);if(this.value==null){this.value=this.name[0]}},Label:function(v,w){var u={className:"MathJax_MenuRadioCheck"+this.rtlClass()};if(s.settings[this.variable]!==this.value){u={style:{display:"none"}}}return[["span",u,[this.marker]]," "+this.Name()]},Mouseup:function(x,y){if(!this.disabled){var z=y.parentNode.childNodes;for(var v=0,u=z.length;v/g,">");var y=t("EqSource","MathJax Equation Source");if(g.isMobile){u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("
");u.document.write("");u.document.close()}else{u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("");u.document.close();var v=u.document.body.firstChild;setTimeout(function(){var B=(u.outerHeight-u.innerHeight)||30,A=(u.outerWidth-u.innerWidth)||30,w,E;A=Math.max(140,Math.min(Math.floor(0.5*screen.width),v.offsetWidth+A+25));B=Math.max(40,Math.min(Math.floor(0.5*screen.height),v.offsetHeight+B+25));if(g.prototype.msieHeightBug){B+=35}u.resizeTo(A,B);var D;try{D=x.screenX}catch(C){}if(x&&D!=null){w=Math.max(0,Math.min(x.screenX-Math.floor(A/2),screen.width-A-20));E=Math.max(0,Math.min(x.screenY-Math.floor(B/2),screen.height-B-20));u.moveTo(w,E)}},50)}};g.Scale=function(){var z=["CommonHTML","HTML-CSS","SVG","NativeMML","PreviewHTML"],u=z.length,y=100,w,v;for(w=0;w7;g.Augment({margin:20,msieBackgroundBug:((document.documentMode||0)<9),msieFixedPositionBug:(v||!w),msieAboutBug:v,msieHeightBug:((document.documentMode||0)<9)});if(m){delete s.styles["#MathJax_About"].filter;delete s.styles[".MathJax_Menu"].filter}},Firefox:function(u){g.skipMouseover=u.isMobile&&u.versionAtLeast("6.0");g.skipMousedown=u.isMobile}});g.isMobile=f.Browser.isMobile;g.noContextMenu=f.Browser.noContextMenu;g.CreateLocaleMenu=function(){if(!g.menu){return}var z=g.menu.Find("Language").submenu,w=z.items;var v=[],B=MathJax.Localization.strings;for(var A in B){if(B.hasOwnProperty(A)){v.push(A)}}v=v.sort();z.items=[];for(var x=0,u=v.length;xt){z.style.height=t+"px";z.style.width=(x.zW+this.scrollSize)+"px"}if(z.offsetWidth>l){z.style.width=l+"px";z.style.height=(x.zH+this.scrollSize)+"px"}}if(this.operaPositionBug){z.style.width=Math.min(l,x.zW)+"px"}if(z.offsetWidth>m&&z.offsetWidth-m=9);h.msiePositionBug=!m;h.msieSizeBug=l.versionAtLeast("7.0")&&(!document.documentMode||n===7||n===8);h.msieZIndexBug=(n<=7);h.msieInlineBlockAlignBug=(n<=7);h.msieTrapEventBug=!window.addEventListener;if(document.compatMode==="BackCompat"){h.scrollSize=52}if(m){delete i.styles["#MathJax_Zoom"].filter}},Opera:function(l){h.operaPositionBug=true;h.operaRefreshBug=true}});h.topImg=(h.msieInlineBlockAlignBug?d.Element("img",{style:{width:0,height:0,position:"relative"},src:"about:blank"}):d.Element("span",{style:{width:0,height:0,display:"inline-block"}}));if(h.operaPositionBug||h.msieTopBug){h.topImg.style.border="1px solid"}MathJax.Callback.Queue(["StartupHook",MathJax.Hub.Register,"Begin Styles",{}],["Styles",f,i.styles],["Post",a.Startup.signal,"MathZoom Ready"],["loadComplete",f,"[MathJax]/extensions/MathZoom.js"])})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax["HTML-CSS"],MathJax.OutputJax.NativeMML); diff --git a/mathjax/asset/extensions/Safe.js b/mathjax/asset/extensions/Safe.js new file mode 100644 index 00000000..34c7d741 --- /dev/null +++ b/mathjax/asset/extensions/Safe.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/Safe.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(d,c){var f="2.7.5";var a=MathJax.Hub.CombineConfig("Safe",{allow:{URLs:"safe",classes:"safe",cssIDs:"safe",styles:"safe",fontsize:"all",require:"safe"},sizeMin:0.7,sizeMax:1.44,lengthMax:3,safeProtocols:{http:true,https:true,file:true,javascript:false},safeStyles:{color:true,backgroundColor:true,border:true,cursor:true,margin:true,padding:true,textShadow:true,fontFamily:true,fontSize:true,fontStyle:true,fontWeight:true,opacity:true,outline:true},safeRequire:{action:true,amscd:true,amsmath:true,amssymbols:true,autobold:false,"autoload-all":false,bbox:true,begingroup:true,boldsymbol:true,cancel:true,color:true,enclose:true,extpfeil:true,HTML:true,mathchoice:true,mhchem:true,newcommand:true,noErrors:false,noUndefined:false,unicode:true,verb:true},styleParts:{border:true,padding:true,margin:true,outline:true},styleLengths:{borderTop:"borderTopWidth",borderRight:"borderRightWidth",borderBottom:"borderBottomWidth",borderLeft:"borderLeftWidth",paddingTop:true,paddingRight:true,paddingBottom:true,paddingLeft:true,marginTop:true,marginRight:true,marginBottom:true,marginLeft:true,outlineTop:true,outlineRight:true,outlineBottom:true,outlineLeft:true,fontSize:[0.7,1.44]}});var e=a.allow;if(e.fontsize!=="all"){a.safeStyles.fontSize=false}var b=MathJax.Extension.Safe={version:f,config:a,div1:document.createElement("div"),div2:document.createElement("div"),filter:{href:"filterURL",src:"filterURL",altimg:"filterURL","class":"filterClass",style:"filterStyles",id:"filterID",fontsize:"filterFontSize",mathsize:"filterFontSize",scriptminsize:"filterFontSize",scriptsizemultiplier:"filterSizeMultiplier",scriptlevel:"filterScriptLevel"},filterURL:function(g){var h=(g.match(/^\s*([a-z]+):/i)||[null,""])[1].toLowerCase();if(e.URLs==="none"||(e.URLs!=="all"&&!a.safeProtocols[h])){g=null}return g},filterClass:function(g){if(e.classes==="none"||(e.classes!=="all"&&!g.match(/^MJX-[-a-zA-Z0-9_.]+$/))){g=null}return g},filterID:function(g){if(e.cssIDs==="none"||(e.cssIDs!=="all"&&!g.match(/^MJX-[-a-zA-Z0-9_.]+$/))){g=null}return g},filterStyles:function(l){if(e.styles==="all"){return l}if(e.styles==="none"){return null}try{var k=this.div1.style,j=this.div2.style,m;k.cssText=l;j.cssText="";for(var g in a.safeStyles){if(a.safeStyles.hasOwnProperty(g)){if(a.styleParts[g]){for(var h=0;h<4;h++){var o=g+["Top","Right","Bottom","Left"][h];m=this.filterStyle(o,k);if(m){j[o]=m}}}else{m=this.filterStyle(g,k);if(m){j[g]=m}}}}l=j.cssText}catch(n){l=null}return l},filterStyle:function(g,h){var i=h[g];if(typeof i!=="string"||i===""){return null}if(i.match(/^\s*expression/)){return null}if(i.match(/javascript:/)){return null}var j=g.replace(/Top|Right|Left|Bottom/,"");if(!a.safeStyles[g]&&!a.safeStyles[j]){return null}if(!a.styleLengths[g]){return i}return(this.filterStyleLength(g,i,h)?i:null)},filterStyleLength:function(g,i,h){if(typeof a.styleLengths[g]==="string"){i=h[a.styleLengths[g]]}i=this.length2em(i);if(i==null){return false}var j=[-a.lengthMax,a.lengthMax];if(MathJax.Object.isArray(a.styleLengths[g])){j=a.styleLengths[g]}return(i>=j[0]&&i<=j[1])},unit2em:{em:1,ex:0.5,ch:0.5,rem:1,px:1/16,mm:96/25.4/16,cm:96/2.54/16,"in":96/16,pt:96/72/16,pc:96/6/16},length2em:function(h){var g=h.match(/(.+)(em|ex|ch|rem|px|mm|cm|in|pt|pc)/);if(!g){return null}return parseFloat(g[1])*this.unit2em[g[2]]},filterSize:function(g){if(e.fontsize==="none"){return null}if(e.fontsize!=="all"){g=Math.min(Math.max(g,a.sizeMin),a.sizeMax)}return g},filterFontSize:function(g){return(e.fontsize==="all"?g:null)},filterSizeMultiplier:function(g){if(e.fontsize==="none"){g=null}else{if(e.fontsize!=="all"){g=Math.min(1,Math.max(0.6,g)).toString()}}return g},filterScriptLevel:function(g){if(e.fontsize==="none"){g=null}else{if(e.fontsize!=="all"){g=Math.max(0,g).toString()}}return g},filterRequire:function(g){if(e.require==="none"||(e.require!=="all"&&!a.safeRequire[g.toLowerCase()])){g=null}return g}};d.Register.StartupHook("TeX HTML Ready",function(){var g=MathJax.InputJax.TeX;g.Parse.Augment({HREF_attribute:function(j){var i=b.filterURL(this.GetArgument(j)),h=this.GetArgumentMML(j);if(i){h.With({href:i})}this.Push(h)},CLASS_attribute:function(i){var j=b.filterClass(this.GetArgument(i)),h=this.GetArgumentMML(i);if(j){if(h["class"]!=null){j=h["class"]+" "+j}h.With({"class":j})}this.Push(h)},STYLE_attribute:function(i){var j=b.filterStyles(this.GetArgument(i)),h=this.GetArgumentMML(i);if(j){if(h.style!=null){if(j.charAt(j.length-1)!==";"){j+=";"}j=h.style+" "+j}h.With({style:j})}this.Push(h)},ID_attribute:function(j){var i=b.filterID(this.GetArgument(j)),h=this.GetArgumentMML(j);if(i){h.With({id:i})}this.Push(h)}})});d.Register.StartupHook("TeX Jax Ready",function(){var i=MathJax.InputJax.TeX,h=i.Parse,g=b.filter;h.Augment({Require:function(j){var k=this.GetArgument(j).replace(/.*\//,"").replace(/[^a-z0-9_.-]/ig,"");k=b.filterRequire(k);if(k){this.Extension(null,k)}},MmlFilterAttribute:function(j,k){if(g[j]){k=b[g[j]](k)}return k},SetSize:function(j,k){k=b.filterSize(k);if(k){this.stack.env.size=k;this.Push(i.Stack.Item.style().With({styles:{mathsize:k+"em"}}))}}})});d.Register.StartupHook("TeX bbox Ready",function(){var g=MathJax.InputJax.TeX;g.Parse.Augment({BBoxStyle:function(h){return b.filterStyles(h)},BBoxPadding:function(i){var h=b.filterStyles("padding: "+i);return(h?i:0)}})});d.Register.StartupHook("MathML Jax Ready",function(){var h=MathJax.InputJax.MathML.Parse,g=b.filter;h.Augment({filterAttribute:function(i,j){if(g[i]){j=b[g[i]](j)}return j}})});d.Startup.signal.Post("Safe Extension Ready");c.loadComplete("[MathJax]/extensions/Safe.js")})(MathJax.Hub,MathJax.Ajax); diff --git a/mathjax/asset/extensions/TeX/AMScd.js b/mathjax/asset/extensions/TeX/AMScd.js new file mode 100644 index 00000000..3a30fdc2 --- /dev/null +++ b/mathjax/asset/extensions/TeX/AMScd.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/AMScd.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/AMScd"]={version:"2.7.5",config:MathJax.Hub.CombineConfig("TeX.CD",{colspace:"5pt",rowspace:"5pt",harrowsize:"2.75em",varrowsize:"1.75em",hideHorizontalLabels:false})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.ElementJax.mml,e=MathJax.InputJax.TeX,d=e.Stack.Item,c=e.Definitions,a=MathJax.Extension["TeX/AMScd"].config;c.environment.CD="CD_env";c.special["@"]="CD_arrow";c.macros.minCDarrowwidth="CD_minwidth";c.macros.minCDarrowheight="CD_minheight";e.Parse.Augment({CD_env:function(f){this.Push(f);return d.array().With({arraydef:{columnalign:"center",columnspacing:a.colspace,rowspacing:a.rowspace,displaystyle:true},minw:this.stack.env.CD_minw||a.harrowsize,minh:this.stack.env.CD_minh||a.varrowsize})},CD_arrow:function(g){var l=this.string.charAt(this.i);if(!l.match(/[>":"\u2192","<":"\u2190",V:"\u2193",A:"\u2191"}[l];var p=this.GetUpTo(g+l,l),m=this.GetUpTo(g+l,l);if(l===">"||l==="<"){h=b.mo(r).With(f);if(!p){p="\\kern "+o.minw}if(p||m){var j={width:"+11mu",lspace:"6mu"};h=b.munderover(this.mmlToken(h));if(p){p=e.Parse(p,this.stack.env).mml();h.SetData(h.over,b.mpadded(p).With(j).With({voffset:".1em"}))}if(m){m=e.Parse(m,this.stack.env).mml();h.SetData(h.under,b.mpadded(m).With(j))}if(a.hideHorizontalLabels){h=b.mpadded(h).With({depth:0,height:".67em"})}}}else{h=r=this.mmlToken(b.mo(r).With(k));if(p||m){h=b.mrow();if(p){h.Append(e.Parse("\\scriptstyle\\llap{"+p+"}",this.stack.env).mml())}h.Append(r.With({texClass:b.TEXCLASS.ORD}));if(m){h.Append(e.Parse("\\scriptstyle\\rlap{"+m+"}",this.stack.env).mml())}}}}}}if(h){this.Push(h)}this.CD_cell(g)},CD_cell:function(f){var g=this.stack.Top();if((g.table||[]).length%2===0&&(g.row||[]).length===0){this.Push(b.mpadded().With({height:"8.5pt",depth:"2pt"}))}this.Push(d.cell().With({isEntry:true,name:f}))},CD_minwidth:function(f){this.stack.env.CD_minw=this.GetDimen(f)},CD_minheight:function(f){this.stack.env.CD_minh=this.GetDimen(f)}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/AMScd.js"); diff --git a/mathjax/asset/extensions/TeX/AMSmath.js b/mathjax/asset/extensions/TeX/AMSmath.js new file mode 100644 index 00000000..2504c5cb --- /dev/null +++ b/mathjax/asset/extensions/TeX/AMSmath.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/AMSmath.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/AMSmath"]={version:"2.7.5",number:0,startNumber:0,IDs:{},eqIDs:{},labels:{},eqlabels:{},refs:[]};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.ElementJax.mml,h=MathJax.InputJax.TeX,g=MathJax.Extension["TeX/AMSmath"];var d=h.Definitions,f=h.Stack.Item,a=h.config.equationNumbers;var c=function(k){var n=[];for(var l=0,j=k.length;l0){p+="rl";o.push("0em 0em");q--}o=o.join(" ");if(i){return this.AMSarray(l,j,i,p,o)}var m=this.AMSarray(l,j,i,p,o);return this.setArrayAlign(m,k)},EquationBegin:function(i,j){this.checkEqnEnv();this.stack.global.forcetag=(j&&a.autoNumber!=="none");return i},EquationStar:function(i,j){this.stack.global.tagged=true;return j},checkEqnEnv:function(){if(this.stack.global.eqnenv){h.Error(["ErroneousNestingEq","Erroneous nesting of equation structures"])}this.stack.global.eqnenv=true},MultiIntegral:function(j,m){var l=this.GetNext();if(l==="\\"){var k=this.i;l=this.GetArgument(j);this.i=k;if(l==="\\limits"){if(j==="\\idotsint"){m="\\!\\!\\mathop{\\,\\,"+m+"}"}else{m="\\!\\!\\!\\mathop{\\,\\,\\,"+m+"}"}}}this.string=m+" "+this.string.slice(this.i);this.i=0},xArrow:function(k,o,n,i){var m={width:"+"+(n+i)+"mu",lspace:n+"mu"};var p=this.GetBrackets(k),q=this.ParseArg(k);var s=b.mo(b.chars(String.fromCharCode(o))).With({stretchy:true,texClass:b.TEXCLASS.REL});var j=b.munderover(s);j.SetData(j.over,b.mpadded(q).With(m).With({voffset:".15em"}));if(p){p=h.Parse(p,this.stack.env).mml();j.SetData(j.under,b.mpadded(p).With(m).With({voffset:"-.24em"}))}this.Push(j.With({subsupOK:true}))},GetDelimiterArg:function(i){var j=this.trimSpaces(this.GetArgument(i));if(j==""){return null}if(j in d.delimiter){return j}h.Error(["MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",i])},GetStar:function(){var i=(this.GetNext()==="*");if(i){this.i++}return i}});f.Augment({autoTag:function(){var j=this.global;if(!j.notag){g.number++;j.tagID=a.formatNumber(g.number.toString());var i=h.Parse("\\text{"+a.formatTag(j.tagID)+"}",{}).mml();j.tag=b.mtd(i).With({id:a.formatID(j.tagID)})}},getTag:function(){var m=this.global,k=m.tag;m.tagged=true;if(m.label){if(a.useLabelIds){k.id=a.formatID(m.label)}g.eqlabels[m.label]={tag:m.tagID,id:k.id}}if(document.getElementById(k.id)||g.IDs[k.id]||g.eqIDs[k.id]){var l=0,j;do{l++;j=k.id+"_"+l}while(document.getElementById(j)||g.IDs[j]||g.eqIDs[j]);k.id=j;if(m.label){g.eqlabels[m.label].id=j}}g.eqIDs[k.id]=1;this.clearTag();return k},clearTag:function(){var i=this.global;delete i.tag;delete i.tagID;delete i.label},fixInitialMO:function(l){for(var k=0,j=l.length;k0){this.stack[i].Undef(e,f);i--}if(!MathJax.Object.isArray(h)){h=[h]}if(this.isEqn){h.global=true}}this.stack[i].Def(e,h,f)},Push:function(e){this.stack.push(e);this.top=this.stack.length},Pop:function(){var e;if(this.top>1){e=this.stack[--this.top];if(this.isEqn){this.stack.pop()}}else{if(this.isEqn){this.Clear()}}return e},Find:function(e,g){for(var f=this.top-1;f>=0;f--){var h=this.stack[f].Find(e,g);if(h){return h}}return null},Merge:function(e){e.stack[0].MergeGlobals(this);this.stack[this.top-1].Merge(e.stack[0]);var f=[this.top,this.stack.length-this.top].concat(e.stack.slice(1));this.stack.splice.apply(this.stack,f);this.top=this.stack.length},Reset:function(){this.top=this.stack.length},Clear:function(e){this.stack=[this.stack[0].Clear()];this.top=this.stack.length}},{nsFrame:a});b.Add({macros:{begingroup:"BeginGroup",endgroup:"EndGroup",global:"Global",gdef:["Macro","\\global\\def"]}},null,true);d.Parse.Augment({BeginGroup:function(e){d.eqnStack.Push(a())},EndGroup:function(e){if(d.eqnStack.top>1){d.eqnStack.Pop()}else{if(d.rootStack.top===1){d.Error(["ExtraEndMissingBegin","Extra %1 or missing \\begingroup",e])}else{d.eqnStack.Clear();d.rootStack.Pop()}}},csFindMacro:function(e){return(d.eqnStack.Find(e,"macros")||d.rootStack.Find(e,"macros"))},envFindName:function(e){return(d.eqnStack.Find(e,"environments")||d.rootStack.Find(e,"environments"))},setDef:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"macros",this.stack.env.isGlobal);delete this.stack.env.isGlobal},setEnv:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"environments")},Global:function(e){var f=this.i;var g=this.GetCSname(e);this.i=f;if(g!=="let"&&g!=="def"&&g!=="newcommand"&&g!=="DeclareMathOperator"&&g!=="Newextarrow"){d.Error(["GlobalNotFollowedBy","%1 not followed by \\let, \\def, or \\newcommand",e])}this.stack.env.isGlobal=true}});d.rootStack=c();d.eqnStack=c(true);d.prefilterHooks.Add(function(){d.rootStack.Reset();d.eqnStack.Clear(true)});d.postfilterHooks.Add(function(){d.rootStack.Merge(d.eqnStack)});MathJax.Hub.Startup.signal.Post("TeX begingroup Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.js"); diff --git a/mathjax/asset/extensions/TeX/boldsymbol.js b/mathjax/asset/extensions/TeX/boldsymbol.js new file mode 100644 index 00000000..b3a5dbaf --- /dev/null +++ b/mathjax/asset/extensions/TeX/boldsymbol.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/boldsymbol.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/boldsymbol"]={version:"2.7.5"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;var c={};c[a.VARIANT.NORMAL]=a.VARIANT.BOLD;c[a.VARIANT.ITALIC]=a.VARIANT.BOLDITALIC;c[a.VARIANT.FRAKTUR]=a.VARIANT.BOLDFRAKTUR;c[a.VARIANT.SCRIPT]=a.VARIANT.BOLDSCRIPT;c[a.VARIANT.SANSSERIF]=a.VARIANT.BOLDSANSSERIF;c["-tex-caligraphic"]="-tex-caligraphic-bold";c["-tex-oldstyle"]="-tex-oldstyle-bold";b.Add({macros:{boldsymbol:"Boldsymbol"}},null,true);d.Parse.Augment({mmlToken:function(f){if(this.stack.env.boldsymbol){var e=f.Get("mathvariant");if(e==null){f.mathvariant=a.VARIANT.BOLD}else{f.mathvariant=(c[e]||e)}}return f},Boldsymbol:function(h){var e=this.stack.env.boldsymbol,f=this.stack.env.font;this.stack.env.boldsymbol=true;this.stack.env.font=null;var g=this.ParseArg(h);this.stack.env.font=f;this.stack.env.boldsymbol=e;this.Push(g)}});MathJax.Hub.Startup.signal.Post("TeX boldsymbol Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/boldsymbol.js"); diff --git a/mathjax/asset/extensions/TeX/cancel.js b/mathjax/asset/extensions/TeX/cancel.js new file mode 100644 index 00000000..2b8424e6 --- /dev/null +++ b/mathjax/asset/extensions/TeX/cancel.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/cancel.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/cancel"]={version:"2.7.5",ALLOWED:{color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/cancel"];b.setAttributes=function(h,e){if(e!==""){e=e.replace(/ /g,"").split(/,/);for(var g=0,d=e.length;g1){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","rgb",0,1])}d=Math.floor(d*255).toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_RGB:function(b){b=b.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s*,\s*/);var a="#";if(b.length!==3){this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","RGB"])}for(var c=0;c<3;c++){if(!b[c].match(/^\d+$/)){this.TEX.Error(["InvalidNumber","Invalid number"])}var d=parseInt(b[c]);if(d>255){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","RGB",0,255])}d=d.toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_gray:function(a){if(!a.match(/^\s*(\d+(\.\d*)?|\.\d+)\s*$/)){this.TEX.Error(["InvalidDecimalNumber","Invalid decimal number"])}var b=parseFloat(a);if(b<0||b>1){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","gray",0,1])}b=Math.floor(b*255).toString(16);if(b.length<2){b="0"+b}return"#"+b+b+b},get_named:function(a){if(this.colors.hasOwnProperty(a)){return this.colors[a]}return a},padding:function(){var c="+"+this.config.padding;var a=this.config.padding.replace(/^.*?([a-z]*)$/,"$1");var b="+"+(2*parseFloat(c))+a;return{width:b,height:c,depth:c,lspace:this.config.padding}}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;var c=d.Stack.Item;var b=MathJax.Extension["TeX/color"];b.TEX=d;d.Definitions.Add({macros:{color:"Color",textcolor:"TextColor",definecolor:"DefineColor",colorbox:"ColorBox",fcolorbox:"fColorBox"}},null,true);d.Parse.Augment({Color:function(h){var g=this.GetBrackets(h),e=this.GetArgument(h);e=b.getColor(g,e);var f=c.style().With({styles:{mathcolor:e}});this.stack.env.color=e;this.Push(f)},TextColor:function(h){var g=this.GetBrackets(h),f=this.GetArgument(h);f=b.getColor(g,f);var e=this.stack.env.color;this.stack.env.color=f;var i=this.ParseArg(h);if(e){this.stack.env.color}else{delete this.stack.env.color}this.Push(a.mstyle(i).With({mathcolor:f}))},DefineColor:function(g){var f=this.GetArgument(g),e=this.GetArgument(g),h=this.GetArgument(g);b.colors[f]=b.getColor(e,h)},ColorBox:function(g){var f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f)}).With(b.padding()))},fColorBox:function(g){var h=this.GetArgument(g),f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f),style:"border: "+b.config.border+" solid "+b.getColor("named",h)}).With(b.padding()))}});MathJax.Hub.Startup.signal.Post("TeX color Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/color.js"); diff --git a/mathjax/asset/extensions/TeX/enclose.js b/mathjax/asset/extensions/TeX/enclose.js new file mode 100644 index 00000000..38273a23 --- /dev/null +++ b/mathjax/asset/extensions/TeX/enclose.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/enclose.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/enclose"]={version:"2.7.5",ALLOWED:{arrow:1,color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/enclose"].ALLOWED;c.Definitions.Add({macros:{enclose:"Enclose"}},null,true);c.Parse.Augment({Enclose:function(g){var k=this.GetArgument(g),e=this.GetBrackets(g),j=this.ParseArg(g);var l={notation:k.replace(/,/g," ")};if(e){e=e.replace(/ /g,"").split(/,/);for(var h=0,d=e.length;h0){f=Math.min(3,e.scriptlevel+1)}else{f=(e.displaystyle?0:1)}var g=this.inherit;while(g&&g.type!=="math"){g=g.inherit}if(g){this.selection=f}this.choosing=false;return f},selected:function(){return this.data[this.choice()]},setTeXclass:function(e){return this.selected().setTeXclass(e)},isSpacelike:function(){return this.selected().isSpacelike()},isEmbellished:function(){return this.selected().isEmbellished()},Core:function(){return this.selected()},CoreMO:function(){return this.selected().CoreMO()},toHTML:function(e){e=this.HTMLcreateSpan(e);e.bbox=this.Core().toHTML(e).bbox;if(e.firstChild&&e.firstChild.style.marginLeft){e.style.marginLeft=e.firstChild.style.marginLeft;e.firstChild.style.marginLeft=""}return e},toSVG:function(){var e=this.Core().toSVG();this.SVGsaveData(e);return e},toCommonHTML:function(e){e=this.CHTMLcreateNode(e);this.CHTMLhandleStyle(e);this.CHTMLhandleColor(e);this.CHTMLaddChild(e,this.choice(),{});return e},toPreviewHTML:function(e){e=this.PHTMLcreateSpan(e);this.PHTMLhandleStyle(e);this.PHTMLhandleColor(e);this.PHTMLaddChild(e,this.choice(),{});return e}});MathJax.Hub.Startup.signal.Post("TeX mathchoice Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mathchoice.js"); diff --git a/mathjax/asset/extensions/TeX/mediawiki-texvc.js b/mathjax/asset/extensions/TeX/mediawiki-texvc.js new file mode 100644 index 00000000..7318577b --- /dev/null +++ b/mathjax/asset/extensions/TeX/mediawiki-texvc.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/mediawiki-texvc.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/mediawiki-texvc"]={version:"2.7.5"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){MathJax.InputJax.TeX.Definitions.Add({macros:{AA:["Macro","\u00c5"],alef:["Macro","\\aleph"],alefsym:["Macro","\\aleph"],Alpha:["Macro","\\mathrm{A}"],and:["Macro","\\land"],ang:["Macro","\\angle"],Bbb:["Macro","\\mathbb"],Beta:["Macro","\\mathrm{B}"],bold:["Macro","\\mathbf"],bull:["Macro","\\bullet"],C:["Macro","\\mathbb{C}"],Chi:["Macro","\\mathrm{X}"],clubs:["Macro","\\clubsuit"],cnums:["Macro","\\mathbb{C}"],Complex:["Macro","\\mathbb{C}"],coppa:["Macro","\u03D9"],Coppa:["Macro","\u03D8"],Dagger:["Macro","\\ddagger"],Digamma:["Macro","\u03DC"],darr:["Macro","\\downarrow"],dArr:["Macro","\\Downarrow"],Darr:["Macro","\\Downarrow"],dashint:["Macro","\\unicodeInt{x2A0D}"],ddashint:["Macro","\\unicodeInt{x2A0E}"],diamonds:["Macro","\\diamondsuit"],empty:["Macro","\\emptyset"],Epsilon:["Macro","\\mathrm{E}"],Eta:["Macro","\\mathrm{H}"],euro:["Macro","\u20AC"],exist:["Macro","\\exists"],geneuro:["Macro","\u20AC"],geneuronarrow:["Macro","\u20AC"],geneurowide:["Macro","\u20AC"],H:["Macro","\\mathbb{H}"],hAar:["Macro","\\Leftrightarrow"],harr:["Macro","\\leftrightarrow"],Harr:["Macro","\\Leftrightarrow"],hearts:["Macro","\\heartsuit"],image:["Macro","\\Im"],infin:["Macro","\\infty"],Iota:["Macro","\\mathrm{I}"],isin:["Macro","\\in"],Kappa:["Macro","\\mathrm{K}"],koppa:["Macro","\u03DF"],Koppa:["Macro","\u03DE"],lang:["Macro","\\langle"],larr:["Macro","\\leftarrow"],Larr:["Macro","\\Leftarrow"],lArr:["Macro","\\Leftarrow"],lrarr:["Macro","\\leftrightarrow"],Lrarr:["Macro","\\Leftrightarrow"],lrArr:["Macro","\\Leftrightarrow"],Mu:["Macro","\\mathrm{M}"],N:["Macro","\\mathbb{N}"],natnums:["Macro","\\mathbb{N}"],Nu:["Macro","\\mathrm{N}"],O:["Macro","\\emptyset"],oint:["Macro","\\unicodeInt{x222E}"],oiint:["Macro","\\unicodeInt{x222F}"],oiiint:["Macro","\\unicodeInt{x2230}"],ointctrclockwise:["Macro","\\unicodeInt{x2233}"],officialeuro:["Macro","\u20AC"],Omicron:["Macro","\\mathrm{O}"],or:["Macro","\\lor"],P:["Macro","\u00B6"],pagecolor:["Macro","",1],part:["Macro","\\partial"],plusmn:["Macro","\\pm"],Q:["Macro","\\mathbb{Q}"],R:["Macro","\\mathbb{R}"],rang:["Macro","\\rangle"],rarr:["Macro","\\rightarrow"],Rarr:["Macro","\\Rightarrow"],rArr:["Macro","\\Rightarrow"],real:["Macro","\\Re"],reals:["Macro","\\mathbb{R}"],Reals:["Macro","\\mathbb{R}"],Rho:["Macro","\\mathrm{P}"],sdot:["Macro","\\cdot"],sampi:["Macro","\u03E1"],Sampi:["Macro","\u03E0"],sect:["Macro","\\S"],spades:["Macro","\\spadesuit"],stigma:["Macro","\u03DB"],Stigma:["Macro","\u03DA"],sub:["Macro","\\subset"],sube:["Macro","\\subseteq"],supe:["Macro","\\supseteq"],Tau:["Macro","\\mathrm{T}"],textvisiblespace:["Macro","\u2423"],thetasym:["Macro","\\vartheta"],uarr:["Macro","\\uparrow"],uArr:["Macro","\\Uparrow"],Uarr:["Macro","\\Uparrow"],unicodeInt:["Macro","\\mathop{\\vcenter{\\mathchoice{\\huge\\unicode{#1}\\,}{\\unicode{#1}}{\\unicode{#1}}{\\unicode{#1}}}\\,}\\nolimits",1],varcoppa:["Macro","\u03D9"],varstigma:["Macro","\u03DB"],varointclockwise:["Macro","\\unicodeInt{x2232}"],vline:["Macro","\\smash{\\large\\lvert}",0],weierp:["Macro","\\wp"],Z:["Macro","\\mathbb{Z}"],Zeta:["Macro","\\mathrm{Z}"]}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mediawiki-texvc.js"); diff --git a/mathjax/asset/extensions/TeX/mhchem.js b/mathjax/asset/extensions/TeX/mhchem.js new file mode 100644 index 00000000..672d1fdc --- /dev/null +++ b/mathjax/asset/extensions/TeX/mhchem.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/mhchem.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +if(MathJax.Extension["TeX/mhchem"]){MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mhchem.js")}else{MathJax.Extension["TeX/mhchem"]={version:"2.7.5",config:MathJax.Hub.CombineConfig("TeX.mhchem",{legacy:true})};if(!MathJax.Extension["TeX/mhchem"].config.legacy){if(!MathJax.Ajax.config.path.mhchem){MathJax.Ajax.config.path.mhchem=MathJax.Hub.config.root+"/extensions/TeX/mhchem3"}MathJax.Callback.Queue(["Require",MathJax.Ajax,"[mhchem]/mhchem.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/TeX/mhchem.js"])}else{MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX;var a=MathJax.Object.Subclass({string:"",i:0,tex:"",TEX:"",atom:false,sup:"",sub:"",presup:"",presub:"",Init:function(c){this.string=c},ParseTable:{"-":"Minus","+":"Plus","(":"Open",")":"Close","[":"Open","]":"Close","<":"Less","^":"Superscript",_:"Subscript","*":"Dot",".":"Dot","=":"Equal","#":"Pound","$":"Math","\\":"Macro"," ":"Space"},Arrows:{"->":"rightarrow","<-":"leftarrow","<->":"leftrightarrow","<=>":"rightleftharpoons","<=>>":"Rightleftharpoons","<<=>":"Leftrightharpoons","^":"uparrow",v:"downarrow"},Bonds:{"-":"-","=":"=","#":"\\equiv","~":"\\tripledash","~-":"\\begin{CEstack}{}\\tripledash\\\\-\\end{CEstack}","~=":"\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}","~--":"\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}","-~-":"\\raise2mu{\\begin{CEstack}{}-\\\\\\tripledash\\\\-\\end{CEstack}}","...":"{\\cdot}{\\cdot}{\\cdot}","....":"{\\cdot}{\\cdot}{\\cdot}{\\cdot}","->":"\\rightarrow","<-":"\\leftarrow","??":"\\text{??}"},Parse:function(){this.tex="";this.atom=false;while(this.i"){this.i+=2;this.AddArrow("->");return}else{this.tex+="{-}"}}this.i++},ParsePlus:function(d){if(this.atom){this.sup+=d}else{this.FinishAtom();this.tex+=d}this.i++},ParseDot:function(d){this.FinishAtom();this.tex+="\\cdot ";this.i++},ParseEqual:function(d){this.FinishAtom();this.tex+="{=}";this.i++},ParsePound:function(d){this.FinishAtom();this.tex+="{\\equiv}";this.i++},ParseOpen:function(e){this.FinishAtom();var d=this.Match(/^\([v^]\)/);if(d){this.tex+="{\\"+this.Arrows[d.charAt(1)]+"}"}else{this.tex+="{"+e;this.i++}},ParseClose:function(d){this.FinishAtom();this.atom=true;this.tex+=d+"}";this.i++},ParseLess:function(e){this.FinishAtom();var d=this.Match(/^(<->?|<=>>?|<<=>)/);if(!d){this.tex+=e;this.i++}else{this.AddArrow(d)}},ParseSuperscript:function(f){f=this.string.charAt(++this.i);if(f==="{"){this.i++;var d=this.Find("}");if(d==="-."){this.sup+="{-}{\\cdot}"}else{if(d){this.sup+=a(d).Parse().replace(/^\{-\}/,"-")}}}else{if(f===" "||f===""){this.tex+="{\\"+this.Arrows["^"]+"}";this.i++}else{var e=this.Match(/^(\d+|-\.)/);if(e){this.sup+=e}}}},ParseSubscript:function(e){if(this.string.charAt(++this.i)=="{"){this.i++;this.sub+=a(this.Find("}")).Parse().replace(/^\{-\}/,"-")}else{var d=this.Match(/^\d+/);if(d){this.sub+=d}}},ParseMath:function(d){this.FinishAtom();this.i++;this.tex+=this.Find(d)},ParseMacro:function(f){this.FinishAtom();this.i++;var d=this.Match(/^([a-z]+|.)/i)||" ";if(d==="sbond"){this.tex+="{-}"}else{if(d==="dbond"){this.tex+="{=}"}else{if(d==="tbond"){this.tex+="{\\equiv}"}else{if(d==="bond"){var e=(this.Match(/^\{.*?\}/)||"");e=e.substr(1,e.length-2);this.tex+="{"+(this.Bonds[e]||"\\text{??}")+"}"}else{if(d==="{"){this.tex+="{\\{"}else{if(d==="}"){this.tex+="\\}}";this.atom=true}else{this.tex+=f+d}}}}}}},ParseSpace:function(d){this.FinishAtom();this.i++},ParseOther:function(d){this.FinishAtom();this.tex+=d;this.i++},AddArrow:function(e){var g=this.Match(/^[CT]\[/);if(g){this.i--;g=g.charAt(0)}var d=this.GetBracket(g),f=this.GetBracket(g);e=this.Arrows[e];if(d||f){if(f){e+="["+f+"]"}e+="{"+d+"}";e="\\mathrel{\\x"+e+"}"}else{e="\\long"+e+" "}this.tex+=e},FinishAtom:function(c){if(this.sup||this.sub||this.presup||this.presub){if(!c&&!this.atom){if(this.tex===""&&!this.sup&&!this.sub){return}if(!this.presup&&!this.presub&&(this.tex===""||this.tex==="{"||(this.tex==="}"&&this.TEX.substr(-1)==="{"))){this.presup=this.sup,this.presub=this.sub;this.sub=this.sup="";this.TEX+=this.tex;this.tex="";return}}if(this.sub&&!this.sup){this.sup="\\Space{0pt}{0pt}{.2em}"}if((this.presup||this.presub)&&this.tex!=="{"){if(!this.presup&&!this.sup){this.presup="\\Space{0pt}{0pt}{.2em}"}this.tex="\\CEprescripts{"+(this.presub||"\\CEnone")+"}{"+(this.presup||"\\CEnone")+"}{"+(this.tex!=="}"?this.tex:"")+"}{"+(this.sub||"\\CEnone")+"}{"+(this.sup||"\\CEnone")+"}"+(this.tex==="}"?"}":"");this.presub=this.presup=""}else{if(this.sup){this.tex+="^{"+this.sup+"}"}if(this.sub){this.tex+="_{"+this.sub+"}"}}this.sup=this.sub=""}this.TEX+=this.tex;this.tex="";this.atom=false},GetBracket:function(e){if(this.string.charAt(this.i)!=="["){return""}this.i++;var d=this.Find("]");if(e==="C"){d="\\ce{"+d+"}"}else{if(e==="T"){if(!d.match(/^\{.*\}$/)){d="{"+d+"}"}d="\\text"+d}}return d},Match:function(d){var c=d.exec(this.string.substr(this.i));if(c){c=c[0];this.i+=c.length}return c},Find:function(h){var d=this.string.length,e=this.i,g=0;while(this.i0))return i;if(c.s||(n=f.t),!c.u)break n}}}if(u<=0)throw["MhchemBugU","mhchem bug U. Please report."]}}, +t.j= +function(n,r){return r?n?n.concat(r):[].concat(r):n},t.w={"~C":/^$/,"~A":/^./,"~B":/^./,"%m":/^\s/,"%l":/^\s(?=[A-Z\\$])/,"~@":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,"~M":/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"@z":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"~P":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"@%":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"~O":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,"~u":/^[0-9]+/,"@h":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"@g":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"%T": +function(n){var r=n.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return r&&r[0]?{h:r.splice(1),t:n.substr(r[0].length)}:null},aj: +function(n){var r=n.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return r&&r[0]?{h:r.splice(1),t:n.substr(r[0].length)}:null},"%n": +function(n){var r=this["@W"](n,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(r&&r.t.match(/^($|[\s,;\)\]\}])/))return r;var t=n.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return t?{h:t[0],t:n.substr(t[0].length)}:null},ae:/^_\{(\([a-z]{1,3}\))\}/,"@K":/^(?:\\\{|\[|\()/,"@c":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"@i":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"@P": +function(n){return this["@W"](n,"^{","","","}")},"@L": +function(n){return this["@W"](n,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"@O": +function(n){return this["@W"](n,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"@N": +function(n){return this["@W"](n,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"%U":/^\^(-?\d+)/,"'":/^'/,"@Y": +function(n){return this["@W"](n,"_{","","","}")},"@Q": +function(n){return this["@W"](n,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"@T": +function(n){return this["@W"](n,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"@S": +function(n){return this["@W"](n,"_",/^\\[a-zA-Z]+\{/,"}","")},"@R":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"%B": +function(n){return this["@W"](n,"","{","}","")},"%A": +function(n){return this["@W"](n,"{","","","}")},"@~": +function(n){return this["@W"](n,"","$","$","")},"@a": +function(n){return this["@W"](n,"${","","","}$")},"@@": +function(n){return this["@W"](n,"$","","","$")},"%D":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]\/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"@f":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,ai:/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,"~Q":/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,"~c":/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"@r": +function(n){return this["@W"](n,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,"@m":/^[CMT](?=\[)/,"@o": +function(n){return this["@W"](n,"[","","","]")},al:/^(&|@q|\\hline)\s*/,"@p":/^(?:\\[,\ ;:])/,"@G": +function(n){return this["@W"](n,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"@F": +function(n){return this["@W"](n,"",/^\\[a-zA-Z]+\{/,"}","")},"@t":/^\\ca(?:\s+|(?![a-zA-Z]))/,"@E":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,"~R":/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,"~S":/^[\/~|]/,"@y": +function(n){return this["@W"](n,"\\frac{","","","}","{","","","}")},"@A": +function(n){return this["@W"](n,"\\overset{","","","}","{","","","}")},"@C": +function(n){return this["@W"](n,"\\underset{","","","}","{","","","}")},"@B": +function(n){return this["@W"](n,"\\underbrace{","","","}_","{","","","}")},"@w": +function(n){return this["@W"](n,"\\color{","","","}")},"@x": +function(n){return this["@W"](n,"\\color{","","","}","{","","","}")},"@v": +function(n){return this["@W"](n,"\\color","\\","",/^(?=\{)/,"{","","","}")},"@u": +function(n){return this["@W"](n,"\\ce{","","","}")},"~Z":/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"a~":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"%d":/^[IVX]+/,"@j":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,"~%": +function(n){var r;if(r=n.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{h:r[0],t:n.substr(r[0].length)};var t=this["@W"](n,"","$","$","");return t&&(r=t.h.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{h:r[0],t:n.substr(r[0].length)}:null},"~a": +function(n){return this["~%"](n)},"@b":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,"~E": +function(n){if(n.match(/^\([a-z]+\)$/))return null;var r=n.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return r?{h:r[0],t:n.substr(r[0].length)}:null},"%z":/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*\*\s*/,"@W": +function(n,r,t,o,e,a,u,i,s,l){var h=this["@V"](n,r);if(null===h)return null;if(n=n.substr(h.length),h=this["@V"](n,t),null===h)return null;var p=this["@U"](n,h.length,o||e);if(null===p)return null;var c=n.substring(0,o?p.y:p.z);if(a||u){var f=this["@W"](n.substr(p.y),a,u,i,s);if(null===f)return null;var m=[c,f.h];return l&&(m=m.join("")),{h:m,t:f.t}}return{h:c,t:n.substr(p.y)}}, +"@V": +function(n,r){if("string"==typeof r)return 0!==n.indexOf(r)?null:r;var t=n.match(r);return t?t[0]:null},"@U": +function(n,r,t){for(var o=0;r":{"0|1|2|3":{k:"r=",n:"r"},"a|as":{k:["~T","r="],n:"r"},"*":{k:["~T","r="],n:"r"}}, +"+":{o:{k:"~t",n:"d"},"d|D":{k:"d=",n:"d"},q:{k:"d=",n:"qd"},"qd|qD":{k:"d=",n:"qd"},dq:{k:["~T","d="],n:"d"},3:{k:["%j","~T","~Q"],n:"0"}}, +"~%":{"0|2":{k:"a=",n:"a"}}, +ai:{"0|1|2|a|as":{k:["%j","~T",{l:"~Q",m:"\\pm"}],n:"0"}}, +"~Q":{"0|1|2|a|as":{k:["%j","~T","~Q"],n:"0"}}, +"-$":{"o|q":{k:["~g","~T"],n:"qd"},d:{k:"d=",n:"d"},D:{k:["~T",{l:"~f",m:"-"}],n:"3"},q:{k:"d=",n:"qd"},qd:{k:"d=",n:"qd"},"qD|dq":{k:["~T",{l:"~f",m:"-"}],n:"3"}}, +"-9":{"3|o":{k:["~T",{l:"~J",m:"~I"}],n:"3"}}, +"@f":{o:{k:{l:"@e",m:!0},n:"2"},d:{k:{l:"@d",m:!0},n:"2"}}, +"-":{"0|1|2":{k:[{l:"~T",m:1},"%E",{l:"~f",m:"-"}],n:"3"},3:{k:{l:"~f",m:"-"}}, +a:{k:["~T",{l:"~J",m:"~I"}],n:"2"},as:{k:[{l:"~T",m:2},{l:"~f",m:"-"}],n:"3"},b:{k:"b="},o:{k:"@e",n:"2"},q:{k:"@e",n:"2"},"d|qd|dq":{k:"@d",n:"2"},"D|qD|p":{k:["~T",{l:"~f",m:"-"}],n:"3"}}, +"~a":{"1|3":{k:"a=",n:"a"}}, +"~M":{"0|1|2|3|a|as|b|p|bp|o":{k:"o=",n:"o"},"q|dq":{k:["~T","o="],n:"o"},"d|D|qd|qD":{k:"~N",n:"o"}}, +"~u":{o:{k:"q=",n:"q"},"d|D":{k:"q=",n:"dq"},q:{k:["~T","o="],n:"o"},a:{k:"o=",n:"o"}}, +"%l":{"b|p|bp":{}}, +"%m":{a:{n:"as"},0:{k:"%j"},"1|2":{k:"%k"},"r|rt|rd|%i|%h":{k:"~T",n:"0"},"*":{k:["~T","%k"],n:"1"}}, +al:{"1|2":{k:["~T",{l:"~K",m:"al"}]}, +"*":{k:["~T",{l:"~K",m:"al"}],n:"0"}}, +"@o":{"r|rt":{k:"%a",n:"rd"},"rd|%i":{k:"%f",n:"%h"}}, +"@i":{"o|d|D|dq|qd|qD":{k:["~T",{l:"~f",m:"..."}],n:"3"},"*":{k:[{l:"~T",m:1},{l:"~J",m:"~z"}],n:"1"}}, +". |* ":{"*":{k:["~T",{l:"~J",m:"~~"}],n:"1"}}, +"%n":{"*":{k:["~T","%p"],n:"1"}}, +"@K":{"a|as|o":{k:["o=","~T","%G"],n:"2"},"0|1|2|3":{k:["o=","~T","%G"],n:"2"},"*":{k:["~T","o=","~T","%G"],n:"2"}}, +"@c":{"0|1|2|3|b|p|bp|o":{k:["o=","%H"],n:"o"},"a|as|d|D|q|qd|qD|dq":{k:["~T","o=","%H"],n:"o"}}, +", ":{"*":{k:["~T","~q"],n:"0"}}, +"^_":{"*":{}}, +"@P|@L":{"0|1|2|as":{k:"b=",n:"b"},p:{k:"b=",n:"bp"},"3|o":{k:"~t",n:"D"},q:{k:"d=",n:"qD"},"d|D|qd|qD|dq":{k:["~T","d="],n:"D"}}, +"^a|@O|@N|^\\x|'":{"0|1|2|as":{k:"b=",n:"b"},p:{k:"b=",n:"bp"},"3|o":{k:"~t",n:"d"},q:{k:"d=",n:"qd"},"d|qd|D|qD":{k:"d="},dq:{k:["~T","d="],n:"d"}}, +ae:{"d|D|q|qd|qD|dq":{k:["~T","q="],n:"q"}}, +"@Y|@Q|_9|@T|@S|@R":{"0|1|2|as":{k:"p=",n:"p"},b:{k:"p=",n:"bp"},"3|o":{k:"q=",n:"q"},"d|D":{k:"q=",n:"dq"},"q|qd|qD|dq":{k:["~T","q="],n:"q"}}, +"%D":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{k:[{l:"~T",m:2},"~f"],n:"3"}}, +"#":{"0|1|2|3|a|as|o":{k:[{l:"~T",m:2},{l:"~f",m:"#"}],n:"3"}}, +"{}":{"*":{k:{l:"~T",m:1},n:"1"}}, +"%B":{"0|1|2|3|a|as|b|p|bp":{k:"o=",n:"o"},"o|d|D|q|qd|qD|dq":{k:["~T","o="],n:"o"}}, +"@~":{a:{k:"a="},"0|1|2|3|as|b|p|bp|o":{k:"o=",n:"o"},"as|o":{k:"o="},"q|d|D|qd|qD|dq":{k:["~T","o="],n:"o"}}, +"@r":{"*":{k:[{l:"~T",m:2},"~f"],n:"3"}}, +"@y":{"*":{k:[{l:"~T",m:1},"~H"],n:"3"}}, +"@A":{"*":{k:[{l:"~T",m:2},"~X"],n:"3"}}, +"@C":{"*":{k:[{l:"~T",m:2},"%y"],n:"3"}}, +"@B":{"*":{k:[{l:"~T",m:2},"%w"],n:"3"}}, +"@x|@v":{"*":{k:[{l:"~T",m:2},"~k"],n:"3"}}, +"@w":{"*":{k:[{l:"~T",m:2},"~m"]}}, +"@u":{"*":{k:[{l:"~T",m:2},"ce"],n:"3"}}, +"@p":{"*":{k:[{l:"~T",m:1},"~s"],n:"1"}}, +"@G|@F|@E":{"0|1|2|3|a|as|b|p|bp|o|c0":{k:["o=","~T"],n:"3"},"*":{k:["~T","o=","~T"],n:"3"}}, +"~S":{"*":{k:[{l:"~T",m:1},"~s"],n:"3"}}, +"~B":{a:{k:"@Z",n:"o",s:!0},as:{k:[{l:"~T"},"%k"],n:"1",s:!0},"r|rt|rd|%i|%h":{k:["~T"],n:"0",s:!0},"*":{k:["~T","~s"],n:"3"}}}),g:{"~N": +function(n,r){var o;if(n.d.match(/^[0-9]+$/)){var e=n.d;n.d=void 0,o=this["~T"](n),n.b=e}else o=this["~T"](n);return t.g["o="](n,r),o},"~t": +function(n,r){n.d=r,n["%I"]="kv"},"~g": +function(n,r){if(n.yB){var o=t.j(o,this["~T"](n));return o=t.j(o,t.g["~f"](n,r,"-"))}n.d=r},"@e": +function(n,r,o){var e=o||this["@X"](n,r),a=t.j(null,this["~T"](n,r));return a=e?t.j(a,{l:"~I"}):t.j(a,t.g["~f"](n,r,"-"))},"@d": +function(n,r,o){var e,a=o||this["@X"](n,r);if(a)e=t.j(e,this["~T"](n,r)),e=t.j(e,{l:"~I"});else{var u=t.h("~u",n.d||"");u&&""===u.t?(e=t.j(null,t.g["d="](n,r)),e=t.j(e,this["~T"](n))):(e=t.j(e,this["~T"](n,r)),e=t.j(e,t.g["~f"](n,r,"-")))}return e},"@X": +function(n,r){var o=t.h("~R",n.o||""),e=t.h("~O",n.o||""),a=t.h("~P",n.o||""),u=t.h("@%",n.o||""),i="-"===r&&(o&&""===o.t||e||a||u);return!i||n.a||n.b||n.p||n.d||n.q||o||!a||(n.o="$"+n.o+"$"),i},"@Z": +function(n,r){n.o=n.a,n.a=void 0},"%k": +function(n,r){n.sb=!0},"%j": +function(n,r){n.sb=!1},"%E": +function(n,r){n.yB=!0},"%F": +function(n,r){n.yB=!1},"%G": +function(n,r){n.pL++},"%H": +function(n,r){n.pL--},"%p": +function(n,r){return r=t.go(r,"o"),{l:"%p",p1:r}}, +"~q": +function(n,r){var t=r.replace(/\s*$/,""),o=t!==r;return o&&0===n.pL?{l:"~n",p1:t}:{l:"~o",p1:t}}, +"~T": +function(n,r,o){var e;n.r?("M"===n.rdt?n.rd=t.go(n.rd,"%r"):"T"===n.rdt?n.rd=[{l:"%s",p1:n.rd}]:n.rd=t.go(n.rd),"M"===n.rqt?n.rq=t.go(n.rq,"%r"):"T"===n.rqt?n.rq=[{l:"%s",p1:n.rq}]:n.rq=t.go(n.rq),e={l:"~b",r:n.r,rd:n.rd,rq:n.rq}):(e=[],n.a||n.b||n.p||n.o||n.q||n.d||o?(n.sb&&e.push({l:"~D"}),n.o||n.q||n.d||n.b||n.p||2===o?n.o||n.q||n.d||!n.b&&!n.p?n.o&&"kv"===n["%I"]&&t.h("a~",n.d||"")?n["%I"]="~Y":n.o&&"kv"===n["%I"]&&!n.q&&(n["%I"]=void 0):(n.o=n.a,n.d=n.b,n.q=n.p,n.a=n.b=n.p=void 0):(n.o=n.a,n.a=void 0),n.a=t.go(n.a,"a"),n.b=t.go(n.b,"bd"),n.p=t.go(n.p,"pq"),n.o=t.go(n.o,"o"),"~Y"===n["%I"]?n.d=t.go(n.d,"~Y"):n.d=t.go(n.d,"bd"),n.q=t.go(n.q,"pq"),e.push({l:"~h",a:n.a,b:n.b,p:n.p,o:n.o,q:n.q,d:n.d,"%I":n["%I"]})):e=null);for(var a in n)"pL"!==a&&"yB"!==a&&delete n[a];return e},"a%": +function(n,r){var o=["{"];return o=t.j(o,t.go(r,"~Y")),o=o.concat(["}"])},"~H": +function(n,r){return{l:"~G",p1:t.go(r[0]),p2:t.go(r[1])}}, +"~X": +function(n,r){return{l:"~W",p1:t.go(r[0]),p2:t.go(r[1])}}, +"%y": +function(n,r){return{l:"%x",p1:t.go(r[0]),p2:t.go(r[1])}}, +"%w": +function(n,r){return{l:"%v",p1:t.go(r[0]),p2:t.go(r[1])}}, +"~k": +function(n,r){return{l:"~j",F:r[0],G:t.go(r[1])}}, +"r=": +function(n,r){n.r=(n.r||"")+r},"%b": +function(n,r){n.rdt=(n.rdt||"")+r},"%a": +function(n,r){n.rd=(n.rd||"")+r},"%g": +function(n,r){n.rqt=(n.rqt||"")+r},"%f": +function(n,r){n.rq=(n.rq||"")+r},"~Q": +function(n,r,t){return{l:"~Q",A:t||r}}}}, +t.c.a={e:t.C({"~C":{"*":{}}, +"@j":{0:{k:"@k"}}, +"~A":{0:{n:"1",s:!0}}, +"@@":{"*":{k:"%q",n:"1"}}, +",":{"*":{k:{l:"~J",m:"~r"}}}, +"~B":{"*":{k:"~s"}}}),g:{}}, +t.c.o={e:t.C({"~C":{"*":{}}, +"@j":{0:{k:"@k"}}, +"~A":{0:{n:"1",s:!0}}, +"~M":{"*":{k:"rm"}}, +"@t":{"*":{k:{l:"~J",m:"~i"}}}, +"@G|@F|@E":{"*":{k:"~s"}}, +"@a|@@":{"*":{k:"%r"}}, +"%A":{"*":{k:"%C"}}, +"~B":{"*":{k:"~s"}}}),g:{}}, +t.c["%s"]={e:t.C({"~C":{"*":{k:"~T"}}, +"%B":{"*":{k:"%t"}}, +"@a|@@":{"*":{k:"%r"}}, +"@z":{"*":{k:["~T","rm"]}}, +"@p|@G|@F|@E":{"*":{k:["~T","~s"]}}, +"~A":{"*":{k:"%t"}}}),g:{"~T": +function(n,r){if(n.text){var t={l:"%s",p1:n.text};for(var o in n)delete n[o];return t}return null}}}, +t.c.pq={e:t.C({"~C":{"*":{}}, +"%n":{"*":{k:"%p"}}, +i$:{0:{n:"!f",s:!0}}, +"@b":{0:{k:"rm",n:"0"}}, +"~E":{0:{n:"f",s:!0}}, +"@j":{0:{k:"@k"}}, +"~A":{0:{n:"!f",s:!0}}, +"@a|@@":{"*":{k:"%r"}}, +"%A":{"*":{k:"%s"}}, +"~@":{f:{k:"%r"}}, +"~M":{"*":{k:"rm"}}, +"@h":{"*":{k:"@l"}}, +",":{"*":{k:{l:"~K",m:"~p"}}}, +"@x|@v":{"*":{k:"~k"}}, +"@w":{"*":{k:"~m"}}, +"@u":{"*":{k:"ce"}}, +"@p|@G|@F|@E":{"*":{k:"~s"}}, +"~B":{"*":{k:"~s"}}}),g:{"%p": +function(n,r){return r=t.go(r,"o"),{l:"%K",p1:r}}, +"~k": +function(n,r){return{l:"~j",F:r[0],G:t.go(r[1],"pq")}}}}, +t.c.bd={e:t.C({"~C":{"*":{}}, +x$:{0:{n:"!f",s:!0}}, +"~E":{0:{n:"f",s:!0}}, +"~A":{0:{n:"!f",s:!0}}, +"@g":{"*":{k:"@l"}}, +".":{"*":{k:{l:"~J",m:"~y"}}}, +"~@":{f:{k:"%r"}}, +x:{"*":{k:{l:"~J",m:"@n"}}}, +"~M":{"*":{k:"rm"}}, +"'":{"*":{k:{l:"~J",m:"%%"}}}, +"@a|@@":{"*":{k:"%r"}}, +"%A":{"*":{k:"%s"}}, +"@x|@v":{"*":{k:"~k"}}, +"@w":{"*":{k:"~m"}}, +"@u":{"*":{k:"ce"}}, +"@p|@G|@F|@E":{"*":{k:"~s"}}, +"~B":{"*":{k:"~s"}}}),g:{"~k": +function(n,r){return{l:"~j",F:r[0],G:t.go(r[1],"bd")}}}}, +t.c["~Y"]={e:t.C({"~C":{"*":{}}, +"%d":{"*":{k:"%e"}}, +"@a|@@":{"*":{k:"%r"}}, +"~A":{"*":{k:"~s"}}}),g:{"%e": +function(n,r){return{l:"%d",p1:r}}}}, +t.c["%r"]={e:t.C({"~C":{"*":{k:"~T"}}, +"@u":{"*":{k:["~T","ce"]}}, +"%B|@p|@G|@F|@E":{"*":{k:"o="}}, +"~A":{"*":{k:"o="}}}),g:{"~T": +function(n,r){if(n.o){var t={l:"%r",p1:n.o};for(var o in n)delete n[o];return t}return null}}}, +t.c["%q"]={e:t.C({"~C":{"*":{k:"~T"}}, +"@u":{"*":{k:["~T","ce"]}}, +"%B|@p|@G|@F|@E":{"*":{k:"o="}}, +"-|+":{"*":{k:"%u"}}, +"~A":{"*":{k:"o="}}}),g:{"%u": +function(n,r){n.o=(n.o||"")+"{"+r+"}"},"~T": +function(n,r){if(n.o){var t={l:"%r",p1:n.o};for(var o in n)delete n[o];return t}return null}}}, +t.c["@l"]={e:t.C({"~C":{"*":{}}, +",":{"*":{k:"~q"}}, +"~A":{"*":{k:"~s"}}}),g:{"~q": +function(n,r){return{l:"~r"}}}}, +t.c.pu={e:t.C({"~C":{"*":{k:"~T"}}, +"@K|@c":{"0|a":{k:"~s"}}, +aj:{0:{k:"ak",n:"a"}}, +"%T":{0:{k:"%Z",n:"a"}}, +"%m":{"0|a":{}}, +ai:{"0|a":{k:{l:"~Q",m:"\\pm"},n:"0"}}, +"~Q":{"0|a":{k:"~s",n:"0"}}, +"//":{d:{k:"o=",n:"/"}}, +"/":{d:{k:"o=",n:"/"}}, +"%B|~A":{"0|d":{k:"d=",n:"d"},a:{k:["%m","d="],n:"d"},"/|q":{k:"q=",n:"q"}}}),g:{"%Z": +function(n,r){var o=[];return"+-"===r[0]||"+/-"===r[0]?o.push("\\pm "):r[0]&&o.push(r[0]),r[1]&&(o=t.j(o,t.go(r[1],"%X")),r[2]&&(r[2].match(/[,.]/)?o=t.j(o,t.go(r[2],"%X")):o.push(r[2])),r[3]=r[4]||r[3],r[3]&&(r[3]=r[3].trim(),"e"===r[3]||"*"===r[3].substr(0,1)?o.push({l:"%N"}):o.push({l:"%P"}))),r[3]&&o.push("10^{"+r[5]+"}"),o},ak: +function(n,r){var o=[];return"+-"===r[0]||"+/-"===r[0]?o.push("\\pm "):r[0]&&o.push(r[0]),o=t.j(o,t.go(r[1],"%X")),o.push("^{"+r[2]+"}"),o},"~Q": +function(n,r,t){return{l:"~Q",A:t||r}}, +"%m": +function(n,r){return{l:"%Q"}}, +"~T": +function(n,r){var o,e=t.h("%A",n.d||"");e&&""===e.t&&(n.d=e.h);var a=t.h("%A",n.q||"");a&&""===a.t&&(n.q=a.h),n.d&&(n.d=n.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),n.d=n.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),n.q?(n.d=t.go(n.d,"pu"),n.q=n.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),n.q=n.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F"),n.q=t.go(n.q,"pu"),"//"===n.o?o={l:"%S",p1:n.d,p2:n.q}:(o=n.d,o=n.d.length>1||n.q.length>1?t.j(o,{l:"%V"}):t.j(o,{l:"/"}),o=t.j(o,n.q))):o=t.go(n.d,"%R");for(var u in n)delete n[u];return o}}}, +t.c["%R"]={e:t.C({"~C":{"*":{k:"~T"}}, +"*":{"*":{k:["~T","%N"],n:"0"}}, +"@E":{"*":{k:"%c"},n:"1"},"%m":{"*":{k:["~T","%m"],n:"0"}}, +"@P|%U":{1:{k:"%U"}}, +"@h":{0:{k:"%c",n:"0"},1:{k:"%U",n:"0"}}, +"%B|~A":{"*":{k:"%c",n:"1"}}}),g:{"%N": +function(n,r){return{l:"%O"}}, +"%U": +function(n,r){n.rm+="^{"+r+"}"},"%m": +function(n,r){return{l:"ah"}}, +"~T": +function(n,r){var o;if(n.rm){var e=t.h("%A",n.rm||"");o=e&&""===e.t?t.go(e.h,"pu"):{l:"rm",p1:n.rm}}for(var a in n)delete n[a];return o}}}, +t.c["%X"]={e:t.C({"~C":{0:{k:"~U"},o:{k:"~V"}}, +",":{0:{k:["~U","~q"],n:"o"}}, +".":{0:{k:["~U","~s"],n:"o"}}, +"~A":{"*":{k:"%t"}}}),g:{"~q": +function(n,r){return{l:"~r"}}, +"~U": +function(n,r){var t=[];if(n.text.length>4){var o=n.text.length%3;0===o&&(o=3);for(var e=n.text.length-3;e>0;e-=3)t.push(n.text.substr(e,3)),t.push({l:"%W"});t.push(n.text.substr(0,o)),t.reverse()}else t.push(n.text);for(var a in n)delete n[a];return t},"~V": +function(n,r){var t=[];if(n.text.length>4){for(var o=n.text.length-3,e=0;e"===n.r||"<=>>"===n.r||"<<=>"===n.r||"<-->"===n.r?(r="\\long"+r,n.rd&&(r="\\overset{"+n.rd+"}{"+r+"}"),n.rq&&(r="\\underset{\\lower7mu{"+n.rq+"}}{"+r+"}"),r=" {}\\mathrel{"+r+"}{} "):(n.rq&&(r+="[{"+n.rq+"}]"),r+="{"+n.rd+"}",r=" {}\\mathrel{\\x"+r+"}{} "):r=" {}\\mathrel{\\long"+r+"}{} ",r},"~Q": +function(n){return o.K[n.A]}}, +J:{"->":"rightarrow","\u2192":"rightarrow","\u27f6":"rightarrow","<-":"leftarrow","<->":"leftrightarrow","<-->":"leftrightarrows","<=>":"rightleftharpoons","\u21cc":"rightleftharpoons","<=>>":"Rightleftharpoons","<<=>":"Leftrightharpoons"},I:{"-":"{-}",1:"{-}","=":"{=}",2:"{=}","#":"{\\equiv}",3:"{\\equiv}","~":"{\\tripledash}","~-":"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}","~=":"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}","~--":"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}","-~-":"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}","...":"{{\\cdot}{\\cdot}{\\cdot}}","....":"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}","->":"{\\rightarrow}","<-":"{\\leftarrow}","<":"{<}",">":"{>}"},L:{"%m":" ","~D":"~","%Q":"~",ah:"\\mkern3mu ","%W":"\\mkern2mu ","~r":"{,}","~n":"{{0}}\\mkern6mu ","~o":"{{0}}\\mkern3mu ","~p":"{{0}}\\mkern1mu ","~I":"\\text{-}","~~":"\\,{\\cdot}\\,","~y":"\\mkern1mu \\bullet\\mkern1mu ","@n":"{\\times}","%%":"\\prime ","%N":"\\cdot ","%O":"\\mkern1mu{\\cdot}\\mkern1mu ","%P":"\\times ","~i":"{\\sim}","^":"uparrow",v:"downarrow","~z":"\\ldots ","/":"/","%V":"\\,/\\,",al:"{0} "},K:{"+":" {}+{} ","-":" {}-{} ","=":" {}={} ","<":" {}<{} ",">":" {}>{} ","<<":" {}\\ll{} ",">>":" {}\\gg{} ","\\pm":" {}\\pm{} ","\\approx":" {}\\approx{} ","$\\approx$":" {}\\approx{} ",v:" \\downarrow{} ","(v)":" \\downarrow{} ","^":" \\uparrow{} ","(^)":" \\uparrow{} "},go: +function(n,r){if(!n)return n;for(var t="",o=!1,e=0;e0){return[h,g]}else{return h}}}this.i++}b.Error(["MissingReplacementString","Missing replacement string for definition of %1",f])},MacroWithTemplate:function(d,g,h,f){if(h){var c=[];this.GetNext();if(f[0]&&!this.MatchParam(f[0])){b.Error(["MismatchUseDef","Use of %1 doesn't match its definition",d])}for(var e=0;eb.config.MAXMACROS){b.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},BeginEnv:function(g,k,c,j,h){if(j){var e=[];if(h!=null){var d=this.GetBrackets("\\begin{"+name+"}");e.push(d==null?h:d)}for(var f=e.length;f1){var n=(q.h+q.d)/2,j=h.TeX.x_height/2;p.parentNode.style.verticalAlign=h.Em(q.d+(j-n));q.h=j+n;q.d=n-j}p.bbox={h:q.h,d:q.d,w:k,lw:0,rw:k};return p}})});b.Register.StartupHook("SVG Jax Config",function(){b.Config({SVG:{styles:{".MathJax_SVG .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("SVG Jax Ready",function(){var g=MathJax.ElementJax.mml;var f=g.math.prototype.toSVG,h=g.merror.prototype.toSVG;g.math.Augment({toSVG:function(i,j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){i=k.data[0].toSVG(i)}else{i=f.apply(this,arguments)}return i}});g.merror.Augment({toSVG:function(n){if(!this.isError||this.Parent().type!=="math"){return h.apply(this,arguments)}n=e.addElement(n,"span",{className:"noError",isMathJax:true});if(this.multiLine){n.style.display="inline-block"}var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,j=o.length;l1){var k=n.offsetHeight/2;n.style.verticalAlign=(-k+(k/j))+"px"}return n}})});b.Register.StartupHook("NativeMML Jax Ready",function(){var h=MathJax.ElementJax.mml;var g=MathJax.Extension["TeX/noErrors"].config;var f=h.math.prototype.toNativeMML,i=h.merror.prototype.toNativeMML;h.math.Augment({toNativeMML:function(j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){j=k.data[0].toNativeMML(j)}else{j=f.apply(this,arguments)}return j}});h.merror.Augment({toNativeMML:function(n){if(!this.isError){return i.apply(this,arguments)}n=n.appendChild(document.createElement("span"));var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,k=o.length;l1){n.style.verticalAlign="middle"}}for(var p in g.style){if(g.style.hasOwnProperty(p)){var j=p.replace(/-./g,function(m){return m.charAt(1).toUpperCase()});n.style[j]=g.style[p]}}return n}})});b.Register.StartupHook("PreviewHTML Jax Config",function(){b.Config({PreviewHTML:{styles:{".MathJax_PHTML .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("PreviewHTML Jax Ready",function(){var f=MathJax.ElementJax.mml;var h=MathJax.HTML;var g=f.merror.prototype.toPreviewHTML;f.merror.Augment({toPreviewHTML:function(l){if(!this.isError){return g.apply(this,arguments)}l=this.PHTMLcreateSpan(l);l.className="noError";if(this.multiLine){l.style.display="inline-block"}var n=this.data[0].data[0].data.join("").split(/\n/);for(var k=0,j=n.length;k1){var l=1.2*j/2;o.h=l+0.25;o.d=l-0.25;n.style.verticalAlign=g.Em(0.45-l)}else{o.h=1;o.d=0.2+2/g.em}return n}})});b.Startup.signal.Post("TeX noErrors Ready")})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noErrors.js"); diff --git a/mathjax/asset/extensions/TeX/noUndefined.js b/mathjax/asset/extensions/TeX/noUndefined.js new file mode 100644 index 00000000..b0fb0dfe --- /dev/null +++ b/mathjax/asset/extensions/TeX/noUndefined.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/noUndefined.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/noUndefined"]={version:"2.7.5",config:MathJax.Hub.CombineConfig("TeX.noUndefined",{disabled:false,attributes:{mathcolor:"red"}})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.Extension["TeX/noUndefined"].config;var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX.Parse.prototype.csUndefined;MathJax.InputJax.TeX.Parse.Augment({csUndefined:function(d){if(b.disabled){return c.apply(this,arguments)}MathJax.Hub.signal.Post(["TeX Jax - undefined control sequence",d]);this.Push(a.mtext(d).With(b.attributes))}});MathJax.Hub.Startup.signal.Post("TeX noUndefined Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noUndefined.js"); diff --git a/mathjax/asset/extensions/TeX/unicode.js b/mathjax/asset/extensions/TeX/unicode.js new file mode 100644 index 00000000..4d77d451 --- /dev/null +++ b/mathjax/asset/extensions/TeX/unicode.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/unicode.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/unicode"]={version:"2.7.5",unicode:{},config:MathJax.Hub.CombineConfig("TeX.unicode",{fonts:"STIXGeneral,'Arial Unicode MS'"})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX;var a=MathJax.ElementJax.mml;var b=MathJax.Extension["TeX/unicode"].unicode;c.Definitions.Add({macros:{unicode:"Unicode"}},null,true);c.Parse.Augment({Unicode:function(e){var i=this.GetBrackets(e),d;if(i){if(i.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)){i=i.replace(/ /g,"").split(/,/);d=this.GetBrackets(e)}else{d=i;i=null}}var j=this.trimSpaces(this.GetArgument(e)).replace(/^0x/,"x");if(!j.match(/^(x[0-9A-Fa-f]+|[0-9]+)$/)){c.Error(["BadUnicode","Argument to \\unicode must be a number"])}var h=parseInt(j.match(/^x/)?"0"+j:j);if(!b[h]){b[h]=[800,200,d,h]}else{if(!d){d=b[h][2]}}if(i){b[h][0]=Math.floor(i[0]*1000);b[h][1]=Math.floor(i[1]*1000)}var f=this.stack.env.font,g={};if(d){b[h][2]=g.fontfamily=d.replace(/"/g,"'");if(f){if(f.match(/bold/)){g.fontweight="bold"}if(f.match(/italic|-mathit/)){g.fontstyle="italic"}}}else{if(f){g.mathvariant=f}}g.unicode=[].concat(b[h]);this.Push(a.mtext(a.entity("#"+j)).With(g))}});MathJax.Hub.Startup.signal.Post("TeX unicode Ready")});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.HTMLgetVariant;a.mbase.Augment({HTMLgetVariant:function(){var d=b.apply(this,arguments);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.defaultFont){d=MathJax.Hub.Insert({},d);d.defaultFont={family:c}}var e=this.unicode[2];if(e){e+=","+c}else{e=c}d.defaultFont[this.unicode[3]]=[this.unicode[0],this.unicode[1],500,0,500,{isUnknown:true,isUnicode:true,font:e}];return d}})});MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.SVGgetVariant;a.mbase.Augment({SVGgetVariant:function(){var d=b.call(this);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.forceFamily){d=MathJax.Hub.Insert({},d)}d.defaultFamily=c;d.noRemap=true;d.h=this.unicode[0];d.d=this.unicode[1];return d}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/unicode.js"); diff --git a/mathjax/asset/extensions/TeX/verb.js b/mathjax/asset/extensions/TeX/verb.js new file mode 100644 index 00000000..9c2939fd --- /dev/null +++ b/mathjax/asset/extensions/TeX/verb.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/verb.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.Extension["TeX/verb"]={version:"2.7.5"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX;var b=c.Definitions;b.Add({macros:{verb:"Verb"}},null,true);c.Parse.Augment({Verb:function(d){var g=this.GetNext();var f=++this.i;if(g==""){c.Error(["MissingArgFor","Missing argument for %1",d])}while(this.i=0;f--){var g=this.dependents[f];g.Disable&&g.Disable(!1,e)}d&&a.Queue(["Rerender",a])},Dependent:function(a){this.dependents.push(a)},Startup:function(){var b=MathJax.Extension.collapsible;b&&b.Dependent(this),a.postInputHooks.Add(["Filter",e],150),a.Queue(function(){return e.CollapseWideMath()}),window.addEventListener?window.addEventListener("resize",e.resizeHandler,!1):window.attachEvent?window.attachEvent("onresize",e.resizeHandler):window.onresize=e.resizeHandler},Filter:function(a,b,c){a.enriched&&!this.config.disabled&&("block"===a.root.Get("display")||c.parentNode.childNodes.length<=3)&&(a.root.SRE={action:this.Actions(a.root)})},Actions:function(a){var b=[];return this.getActions(a,0,b),this.sortActions(b)},getActions:function(a,b,c){if(!a.isToken&&a.data){b++;for(var d=0,e=a.data.length;db?1:0},CollapseWideMath:function(b){if(!this.config.disabled){this.GetContainerWidths(b);var c=a.getAllJax(b),d={collapse:[],jax:c,m:c.length,i:0,changed:!1};return this.collapseState(d)}},collapseState:function(b){for(var c=b.collapse;b.ie.M)){var f=this.getActionWidths(d,b);if(f)return f;this.collapseActions(e,b),b.changed&&c.push(d.SourceElement())}b.i++}if(0!==c.length)return 1===c.length&&(c=c[0]),a.Rerender(c)},collapseActions:function(a,b){for(var c=a.width,d=c,e=1e6,f=a.action.length-1;f>=0;f--){var g=a.action[f],h=g.selection;c>a.cwidth?(g.selection=1,d=g.SREwidth,e=c):g.selection=2,c=g.SREwidth,a.DOMupdate?document.getElementById(g.id).setAttribute("selection",g.selection):g.selection!==h&&(b.changed=!0)}a.m=d,a.M=e},getActionWidths:function(a,b){if(!a.root.SRE.actionWidths){MathJax.OutputJax[a.outputJax].getMetrics(a);try{this.computeActionWidths(a)}catch(a){if(!a.restart)throw a;return MathJax.Callback.After(["collapseState",this,b],a.restart)}b.changed=!0}return null},computeActionWidths:function(a){var b,c=a.root.SRE,d=c.action,e={};for(c.width=a.sreGetRootWidth(e),b=d.length-1;b>=0;b--)d[b].selection=2;for(b=d.length-1;b>=0;b--){var f=d[b];null==f.SREwidth&&(f.selection=1,f.SREwidth=a.sreGetActionWidth(e,f))}c.actionWidths=!0},GetContainerWidths:function(b){var c,d,e,f,g,h=a.getAllJax(b),i=MathJax.HTML.Element("span",{style:{display:"block"}}),j=[];for(c=0,d=h.length;c=0;f--){var g=this.dependents[f];g.Disable&&g.Disable(!1,e)}b&&a.Queue(["Reprocess",a])},Dependent:function(a){this.dependents.push(a)},Startup:function(){b=MathJax.ElementJax.mml;var c=MathJax.Extension["semantic-enrich"];c&&c.Dependent(this),a.postInputHooks.Add(["Filter",g],100)},Filter:function(a,b,c){a.enriched&&!this.config.disabled&&(a.root=a.root.Collapse(),a.root.inputID=c.id)},Marker:function(a){return b.mtext("\u25c2"+a+"\u25b8").With({mathcolor:"blue",attr:{},attrNames:[]})},MakeAction:function(a,c){var d=b.maction(a).With({id:this.getActionID(),actiontype:"toggle",complexity:a.getComplexity(),collapsible:!0,attrNames:["id","actiontype","selection",e],attr:{},selection:2});if(d.attr[e]=d.complexity,"math"===c.type){var f=b.mrow().With({complexity:c.complexity,attrNames:[],attr:{}});f.Append.apply(f,c.data);for(var g,h=c.attrNames.length-1;g=c.attrNames[h];h--)"data-semantic-"===g.substr(0,14)&&(f.attr[g]=c.attr[g],f.attrNames.push(g),delete c.attr[g],c.attrNames.splice(h,1));f.complexity=c.complexity,d.Append(f),c.data=[],c.Append(d),c.complexity=d.complexity,d=c}else d.Append(c);return d},actionID:1,getActionID:function(){return"MJX-Collapse-"+this.actionID++},Collapse:function(a){a.getComplexity();var b=(a.attr||{})["data-semantic-type"];if(b)if(this["Collapse_"+b])a=this["Collapse_"+b](a);else if(this.COLLAPSE[b]&&this.MARKER[b]){var c=a.attr["data-semantic-role"],d=this.COLLAPSE[b];if("number"!=typeof d&&(d=d[c]||d.value),a.complexity>d){var e=this.MARKER[b];"string"!=typeof e&&(e=e[c]||e.value),a=this.MakeAction(this.Marker(e),a)}}return a},UncollapseChild:function(a,b,c){if(null==c&&(c=1),this.SplitAttribute(a,"children").length===c){var d=1===a.data.length&&a.data[0].inferred?a.data[0]:a;if(d&&d.data[b]&&d.data[b].collapsible)return d.SetData(b,d.data[b].data[1]),a.complexity=d.complexity=null,a.getComplexity(),1}return 0},FindChildText:function(a,b){var c=this.FindChild(a,b);return c?(c.CoreMO()||c).data.join(""):"?"},FindChild:function(a,b){if(a){if(a.attr&&a.attr["data-semantic-id"]===b)return a;if(!a.isToken)for(var c=0,d=a.data.length;cthis.COLLAPSE.fenced&&"leftright"===a.attr["data-semantic-role"]){var b=a.data[0].data.join("")+a.data[a.data.length-1].data.join("");a=this.MakeAction(this.Marker(b),a)}return a},Collapse_appl:function(a){if(this.UncollapseChild(a,2,2)){var b=this.MARKER.appl;b=b[a.attr["data-semantic-role"]]||b.value,a=this.MakeAction(this.Marker(b),a)}return a},Collapse_sqrt:function(a){return this.UncollapseChild(a,0),a.complexity>this.COLLAPSE.sqrt&&(a=this.MakeAction(this.Marker(this.MARKER.sqrt),a)),a},Collapse_root:function(a){return this.UncollapseChild(a,0),a.complexity>this.COLLAPSE.sqrt&&(a=this.MakeAction(this.Marker(this.MARKER.sqrt),a)),a},Collapse_enclose:function(a){if(1===this.SplitAttribute(a,"children").length){var b=1===a.data.length&&a.data[0].inferred?a.data[0]:a;if(b.data[0]&&b.data[0].collapsible){var c=b.data[0];b.SetData(0,c.data[1]),c.SetData(1,a),a=c}}return a},Collapse_bigop:function(a){if(a.complexity>this.COLLAPSE.bigop||"mo"!==a.data[0].type){var b=this.SplitAttribute(a,"content").pop(),c=g.FindChildText(a,b);a=this.MakeAction(this.Marker(c),a)}return a},Collapse_integral:function(a){if(a.complexity>this.COLLAPSE.integral||"mo"!==a.data[0].type){var b=this.SplitAttribute(a,"content")[0],c=g.FindChildText(a,b);a=this.MakeAction(this.Marker(c),a)}return a},Collapse_relseq:function(a){if(a.complexity>this.COLLAPSE.relseq){var b=this.SplitAttribute(a,"content"),c=g.FindChildText(a,b[0]);b.length>1&&(c+="\u22ef"),a=this.MakeAction(this.Marker(c),a)}return a},Collapse_multirel:function(a){if(a.complexity>this.COLLAPSE.multirel){var b=this.SplitAttribute(a,"content"),c=g.FindChildText(a,b[0])+"\u22ef";a=this.MakeAction(this.Marker(c),a)}return a},Collapse_superscript:function(a){return this.UncollapseChild(a,0,2),a.complexity>this.COLLAPSE.superscript&&(a=this.MakeAction(this.Marker(this.MARKER.superscript),a)),a},Collapse_subscript:function(a){return this.UncollapseChild(a,0,2),a.complexity>this.COLLAPSE.subscript&&(a=this.MakeAction(this.Marker(this.MARKER.subscript),a)),a},Collapse_subsup:function(a){return this.UncollapseChild(a,0,3),a.complexity>this.COLLAPSE.subsup&&(a=this.MakeAction(this.Marker(this.MARKER.subsup),a)),a}};a.Register.StartupHook("End Extensions",function(){null==c.collapsible?c.collapsible=!g.config.disabled:g.config.disabled=!c.collapsible,a.Register.StartupHook("MathMenu Ready",function(){d=MathJax.Menu.cookie;var a,b=function(a){g[c.collapsible?"Enable":"Disable"](!0,!0),MathJax.Menu.saveCookie()},e=MathJax.Menu.ITEM,f=MathJax.Menu.menu,h=e.CHECKBOX(["CollapsibleMath","Collapsible Math"],"collapsible",{action:b}),i=(f.FindId("Accessibility")||{}).submenu;i?(a=i.IndexOfId("CollapsibleMath"),null!==a?i.items[a]=h:i.items.push(e.RULE(),h)):(a=f.IndexOfId("About"),f.items.splice(a,0,h,e.RULE()))},15)},15)}(MathJax.Hub),MathJax.Ajax.Require("[a11y]/semantic-enrich.js"),MathJax.Hub.Register.StartupHook("Semantic Enrich Ready",function(){var a=MathJax.ElementJax.mml,b=MathJax.Extension.collapsible,c=b.COMPLEXITY,d=b.COMPLEXATTR;b.Startup(),a.mbase.Augment({Collapse:function(){return b.Collapse(this)},getComplexity:function(){if(null==this.complexity){var a=0;if(this.isToken)a=c.TEXT*this.data.join("").length+c.TOKEN;else{for(var b=0,e=this.data.length;b1&&(a+=e*c.CHILD)}!this.attrNames||"complexity"in this||this.attrNames.push(d),this.attr&&(this.attr[d]=a),this.complexity=a}return this.complexity},reportComplexity:function(){!this.attr||!this.attrNames||d in this.attr||(this.attrNames.push(d),this.attr[d]=this.complexity)}}),a.mfrac.Augment({getComplexity:function(){return null==this.complexity&&(this.SUPER(arguments).getComplexity.call(this),this.complexity*=c.SCRIPT,this.complexity+=c.FRACTION,this.attr[d]=this.complexity),this.complexity}}),a.msqrt.Augment({getComplexity:function(){return null==this.complexity&&(this.SUPER(arguments).getComplexity.call(this),this.complexity+=c.SQRT,this.attr[d]=this.complexity),this.complexity}}),a.mroot.Augment({getComplexity:function(){return null==this.complexity&&(this.SUPER(arguments).getComplexity.call(this),this.complexity-=(1-c.SCRIPT)*this.data[1].getComplexity(),this.complexity+=c.SQRT,this.attr[d]=this.complexity),this.complexity}}),a.msubsup.Augment({getComplexity:function(){if(null==this.complexity){var a=0;this.data[this.sub]&&(a=this.data[this.sub].getComplexity()+c.CHILD),this.data[this.sup]&&(a=Math.max(this.data[this.sup].getComplexity(),a)),a*=c.SCRIPT,this.data[this.sub]&&(a+=c.CHILD),this.data[this.sup]&&(a+=c.CHILD),this.data[this.base]&&(a+=this.data[this.base].getComplexity()+c.CHILD),this.complexity=a+c.SUBSUP,this.reportComplexity()}return this.complexity}}),a.munderover.Augment({getComplexity:function(){if(null==this.complexity){var a=0;this.data[this.sub]&&(a=this.data[this.sub].getComplexity()+c.CHILD),this.data[this.sup]&&(a=Math.max(this.data[this.sup].getComplexity(),a)),a*=c.SCRIPT,this.data[this.base]&&(a=Math.max(this.data[this.base].getComplexity(),a)),this.data[this.sub]&&(a+=c.CHILD),this.data[this.sup]&&(a+=c.CHILD),this.data[this.base]&&(a+=c.CHILD),this.complexity=a+c.UNDEROVER,this.reportComplexity()}return this.complexity}}),a.mphantom.Augment({getComplexity:function(){return this.complexity=c.PHANTOM,this.reportComplexity(),this.complexity}}),a.ms.Augment({getComplexity:function(){return this.SUPER(arguments).getComplexity.call(this),this.complexity+=this.Get("lquote").length*c.TEXT,this.complexity+=this.Get("rquote").length*c.TEXT,this.attr[d]=this.complexity,this.complexity}}),a.menclose.Augment({getComplexity:function(){return null==this.complexity&&(this.SUPER(arguments).getComplexity.call(this),this.complexity+=c.ACTION,this.attr[d]=this.complexity),this.complexity}}),a.maction.Augment({getComplexity:function(){return this.complexity=(this.collapsible?this.data[0]:this.selected()).getComplexity(),this.reportComplexity(),this.complexity}}),a.semantics.Augment({getComplexity:function(){return null==this.complexity&&(this.complexity=this.data[0]?this.data[0].getComplexity():0,this.reportComplexity()),this.complexity}}),a["annotation-xml"].Augment({getComplexity:function(){return this.complexity=c.XML,this.reportComplexity(),this.complexity}}),a.annotation.Augment({getComplexity:function(){return this.complexity=c.XML,this.reportComplexity(),this.complexity}}),a.mglyph.Augment({getComplexity:function(){return this.complexity=c.GLYPH,this.reportComplexity(),this.complexity}}),MathJax.Hub.Startup.signal.Post("Collapsible Ready"),MathJax.Ajax.loadComplete("[a11y]/collapsible.js")}); \ No newline at end of file diff --git a/mathjax/asset/extensions/a11y/explorer.js b/mathjax/asset/extensions/a11y/explorer.js new file mode 100644 index 00000000..5478cce7 --- /dev/null +++ b/mathjax/asset/extensions/a11y/explorer.js @@ -0,0 +1 @@ +MathJax.Hub.Register.StartupHook("Sre Ready",function(){var a,b,c=MathJax.Hub.config.menuSettings,d={};MathJax.Hub.Register.StartupHook("MathEvents Ready",function(){a=MathJax.Extension.MathEvents.Event.False,b=MathJax.Extension.MathEvents.Event.KEY});var e=MathJax.Extension.explorer={version:"1.5.0",dependents:[],defaults:{walker:"table",highlight:"none",background:"blue",foreground:"black",speech:!0,generation:"lazy",subtitle:!1,ruleset:"mathspeak-default"},eagerComplexity:80,prefix:"Assistive-",hook:null,locHook:null,oldrules:null,addMenuOption:function(a,b){c[e.prefix+a]=b},addDefaults:function(){for(var a,b=MathJax.Hub.CombineConfig("explorer",e.defaults),d=Object.keys(b),f=0;a=d[f];f++)void 0===c[e.prefix+a]&&e.addMenuOption(a,b[a]);e.setSpeechOption(),h.Reset()},setOption:function(a,b){c[e.prefix+a]!==b&&(e.addMenuOption(a,b),h.Reset())},getOption:function(a){return c[e.prefix+a]},speechOption:function(a){e.oldrules!==a.value&&(e.setSpeechOption(),h.Regenerate())},setSpeechOption:function(){var a=c[e.prefix+"ruleset"],b=a.split("-");sre.System.getInstance().setupEngine({locale:MathJax.Localization.locale,domain:e.Domain(b[0]),style:b[1],rules:e.RuleSet(b[0])}),e.oldrules=a},Domain:function(a){switch(a){case"chromevox":return"default";case"mathspeak":default:return"mathspeak"}},RuleSet:function(a){switch(a){case"chromevox":return["AbstractionRules","SemanticTreeRules"];case"mathspeak":default:return["AbstractionRules","AbstractionSpanish","MathspeakRules","MathspeakSpanish"]}},hook:null,locHook:null,Enable:function(a,b){c.explorer=!0,b&&(d.explorer=!0),MathJax.Extension.collapsible.Enable(!1,b),MathJax.Extension.AssistiveMML&&(MathJax.Extension.AssistiveMML.config.disabled=!0,c.assistiveMML=!1,b&&(d.assistiveMML=!1)),this.DisableMenus(!1),this.hook||(this.hook=MathJax.Hub.Register.MessageHook("New Math",["Register",this.Explorer])),this.locHook||(this.locHook=MathJax.Hub.Register.MessageHook("Locale Reset",["RemoveSpeech",this.Explorer])),a&&MathJax.Hub.Queue(["Reprocess",MathJax.Hub])},Disable:function(a,b){c.explorer=!1,b&&(d.explorer=!1),this.DisableMenus(!0),this.hook&&(MathJax.Hub.UnRegister.MessageHook(this.hook),this.hook=null);for(var e=this.dependents.length-1;e>=0;e--){var f=this.dependents[e];f.Disable&&f.Disable(!1,b)}},DisableMenus:function(a){if(MathJax.Menu){var b=MathJax.Menu.menu.FindId("Accessibility","Explorer");if(b){b=b.submenu;for(var d,f=b.items,g=2;d=f[g];g++)d.disabled=a;a||!b.FindId("SpeechOutput")||c[e.prefix+"speech"]||(b.FindId("Subtitles").disabled=!0)}}},Dependent:function(a){this.dependents.push(a)}},f=MathJax.Object.Subclass({div:null,inner:null,Init:function(){this.div=f.Create("assertive"),this.inner=MathJax.HTML.addElement(this.div,"div")},Add:function(){f.added||(document.body.appendChild(this.div),f.added=!0)},Show:function(a,b){this.div.classList.add("MJX_LiveRegion_Show");var c=a.getBoundingClientRect(),d=c.bottom+10+window.pageYOffset,e=c.left+window.pageXOffset;this.div.style.top=d+"px",this.div.style.left=e+"px";var f=b.colorString();this.inner.style.backgroundColor=f.background,this.inner.style.color=f.foreground},Hide:function(a){this.div.classList.remove("MJX_LiveRegion_Show")},Clear:function(){this.Update(""),this.inner.style.top="",this.inner.style.backgroundColor=""},Update:function(a){e.getOption("speech")&&f.Update(this.inner,a)}},{ANNOUNCE:"Navigatable Math in page. Explore with shift space and arrow keys. Expand or collapse elements hitting enter.",announced:!1,added:!1,styles:{".MJX_LiveRegion":{position:"absolute",top:"0",height:"1px",width:"1px",padding:"1px",overflow:"hidden"},".MJX_LiveRegion_Show":{top:"0",position:"absolute",width:"auto",height:"auto",padding:"0px 0px",opacity:1,"z-index":"202",left:0,right:0,margin:"0 auto","background-color":"white","box-shadow":"0px 10px 20px #888",border:"2px solid #CCCCCC"}},Create:function(a){var b=MathJax.HTML.Element("div",{className:"MJX_LiveRegion"});return b.setAttribute("aria-live",a),b},Update:MathJax.Hub.Browser.isPC?function(a,b){a.textContent="",setTimeout(function(){a.textContent=b},100)}:function(a,b){a.textContent="",a.textContent=b},Announce:function(){if(e.getOption("speech")){f.announced=!0,MathJax.Ajax.Styles(f.styles);var a=f.Create("polite");document.body.appendChild(a),f.Update(a,f.ANNOUNCE),setTimeout(function(){document.body.removeChild(a)},1e3)}}});MathJax.Extension.explorer.LiveRegion=f;var g=MathJax.Ajax.fileURL(MathJax.Ajax.config.path.a11y),h=MathJax.Extension.explorer.Explorer={liveRegion:f(),walker:null,highlighter:null,hoverer:null,flamer:null,speechDiv:null,earconFile:g+"/invalid_keypress"+(-1!==["Firefox","Chrome","Opera"].indexOf(MathJax.Hub.Browser.name)?".ogg":".mp3"),expanded:!1,focusoutEvent:MathJax.Hub.Browser.isFirefox?"blur":"focusout",focusinEvent:"focus",ignoreFocusOut:!1,jaxCache:{},messageID:null,Reset:function(){h.FlameEnriched()},Register:function(a){if(e.hook){var b=document.getElementById(a[1]);if(b&&b.id){var c=MathJax.Hub.getJaxFor(b.id);c&&c.enriched&&(h.StateChange(b.id,c),h.liveRegion.Add(),h.AddEvent(b))}}},StateChange:function(a,b){h.GetHighlighter(.2);var c=h.jaxCache[a];c&&c===b.root||(c&&h.highlighter.resetState(a+"-Frame"),h.jaxCache[a]=b.root)},AddAria:function(a){a.setAttribute("role","application"),a.setAttribute("aria-label","Math")},AddHook:function(a){h.RemoveHook(),h.hook=MathJax.Hub.Register.MessageHook("End Math",function(b){var c=b[1].id+"-Frame",d=document.getElementById(c);a&&c===h.expanded&&(h.ActivateWalker(d,a),d.focus(),h.expanded=!1)})},RemoveHook:function(){h.hook&&(MathJax.Hub.UnRegister.MessageHook(h.hook),h.hook=null)},AddMessage:function(){return MathJax.Message.Set("Generating Speech Output")},RemoveMessage:function(a){a&&MathJax.Message.Clear(a)},AddEvent:function(a){var b=a.id+"-Frame",c=a.previousSibling;if(c){var d=c.id!==b?c.firstElementChild:c;h.AddAria(d),h.AddMouseEvents(d),"MathJax_MathML"===d.className&&(d=d.firstElementChild),d&&(d.onkeydown=h.Keydown,h.Flame(d),d.addEventListener(h.focusinEvent,function(a){e.hook&&(f.announced||f.Announce())}),d.addEventListener(h.focusoutEvent,function(a){if(e.hook)return h.ignoreFocusOut&&(h.ignoreFocusOut=!1,"enter"===h.walker.moved)?void a.target.focus():void(h.walker&&h.DeactivateWalker())}),e.getOption("speech")&&h.AddSpeech(d))}},AddSpeech:function(a){var b=a.id,c=MathJax.Hub.getJaxFor(b),d=c.root.toMathML();if(a.getAttribute("haslabel")||h.AddMathLabel(d,b),!a.getAttribute("hasspeech"))switch(MathJax.Hub.config.explorer.generation){case"eager":h.AddSpeechEager(d,b);break;case"mixed":a.querySelectorAll("[data-semantic-complexity]").length>=e.eagerComplexity&&h.AddSpeechEager(d,b)}},AddSpeechLazy:function(a){var b=new sre.TreeSpeechGenerator;b.setRebuilt(h.walker.rebuilt),b.getSpeech(h.walker.rootNode,h.walker.xml),a.setAttribute("hasspeech","true")},AddSpeechEager:function(a,b){h.MakeSpeechTask(a,b,sre.TreeSpeechGenerator,function(a,b){a.setAttribute("hasspeech","true")},5)},AddMathLabel:function(a,b){h.MakeSpeechTask(a,b,sre.SummarySpeechGenerator,function(a,b){a.setAttribute("haslabel","true"),a.setAttribute("aria-label",b)},5)},MakeSpeechTask:function(a,b,c,d,e){var f=h.AddMessage();setTimeout(function(){var e=new c,g=document.getElementById(b),i=new sre.DummyWalker(g,e,h.highlighter,a),j=i.speech();j&&d(g,j),h.RemoveMessage(f)},e)},Keydown:function(c){if(c.keyCode===b.ESCAPE){if(!h.walker)return;return h.RemoveHook(),h.DeactivateWalker(),void a(c)}if(h.walker&&h.walker.isActive()){void 0!==h.walker.modifier&&(h.walker.modifier=c.shiftKey);var d=h.walker.move(c.keyCode);if(null===d)return;if(d){if("expand"===h.walker.moved){if(h.expanded=h.walker.node.id,MathJax.Hub.Browser.isEdge)return h.ignoreFocusOut=!0,void h.DeactivateWalker();if(MathJax.Hub.Browser.isFirefox||MathJax.Hub.Browser.isMSIE)return void h.DeactivateWalker()}h.liveRegion.Update(h.walker.speech()),h.Highlight()}else h.PlayEarcon();return void a(c)}var f=c.target;if(c.keyCode===b.SPACE){if(c.shiftKey&&e.hook){var g=MathJax.Hub.getJaxFor(f);h.ActivateWalker(f,g),h.AddHook(g)}else MathJax.Extension.MathEvents.Event.ContextMenu(c,f);return void a(c)}},GetHighlighter:function(a){h.highlighter=sre.HighlighterFactory.highlighter({color:e.getOption("background"),alpha:a},{color:e.getOption("foreground"),alpha:1},{renderer:MathJax.Hub.outputJax["jax/mml"][0].id,browser:MathJax.Hub.Browser.name})},AddMouseEvents:function(a){sre.HighlighterFactory.addEvents(a,{mouseover:h.MouseOver,mouseout:h.MouseOut},{renderer:MathJax.Hub.outputJax["jax/mml"][0].id,browser:MathJax.Hub.Browser.name})},MouseOver:function(b){if("none"!==e.getOption("highlight")){if("hover"===e.getOption("highlight")){var c=b.currentTarget;h.GetHighlighter(.1),h.highlighter.highlight([c]),h.hoverer=!0}a(b)}},MouseOut:function(b){return h.hoverer&&(h.highlighter.unhighlight(),h.hoverer=!1),a(b)},Flame:function(a){if("flame"===e.getOption("highlight"))return h.GetHighlighter(.05),h.highlighter.highlightAll(a),void(h.flamer=!0)},UnFlame:function(){h.flamer&&(h.highlighter.unhighlightAll(),h.flamer=null)},FlameEnriched:function(){h.UnFlame();for(var a,b=0,c=MathJax.Hub.getAllJax();a=c[b];b++)h.Flame(a.SourceElement().previousSibling)},Walkers:{syntactic:sre.SyntaxWalker,table:sre.TableWalker,semantic:sre.SemanticWalker,none:sre.DummyWalker},ActivateWalker:function(a,b){var c=e.getOption("speech"),d=e.getOption("walker")?h.Walkers[MathJax.Hub.config.explorer.walker]:h.Walkers.none,f=c?new sre.DirectSpeechGenerator:new sre.DummySpeechGenerator;h.GetHighlighter(.2),h.walker=new d(a,f,h.highlighter,b.root.toMathML()),c&&!a.getAttribute("hasspeech")&&h.AddSpeechLazy(a),h.walker.activate(),c&&(e.getOption("subtitle")&&h.liveRegion.Show(a,h.highlighter),h.liveRegion.Update(h.walker.speech())),h.Highlight(),h.ignoreFocusOut&&setTimeout(function(){h.ignoreFocusOut=!1},500)},DeactivateWalker:function(){h.liveRegion.Clear(),h.liveRegion.Hide(),h.Unhighlight(),h.currentHighlight=null,h.walker.deactivate(),h.walker=null},Highlight:function(){h.Unhighlight(),h.highlighter.highlight(h.walker.getFocus().getNodes())},Unhighlight:function(){h.highlighter.unhighlight()},PlayEarcon:function(){new Audio(h.earconFile).play()},SpeechOutput:function(){h.Reset(),["Subtitles"].forEach(function(a){var b=MathJax.Menu.menu.FindId("Accessibility","Explorer",a);b&&(b.disabled=!b.disabled)}),h.Regenerate()},RemoveSpeech:function(){e.setSpeechOption();for(var a,b=0,c=MathJax.Hub.getAllJax();a=c[b];b++){var d=document.getElementById(a.inputID+"-Frame");d&&(d.removeAttribute("hasspeech"),d.removeAttribute("haslabel"))}},Regenerate:function(){for(var a,b=0,c=MathJax.Hub.getAllJax();a=c[b];b++){var d=document.getElementById(a.inputID+"-Frame");d&&(d.removeAttribute("hasspeech"),h.AddSpeech(d))}},Startup:function(){var a=MathJax.Extension.collapsible;a&&a.Dependent(e),e.addDefaults()}};MathJax.Hub.Register.StartupHook("End Extensions",function(){e[!1===c.explorer?"Disable":"Enable"](),MathJax.Hub.Startup.signal.Post("Explorer Ready"),MathJax.Hub.Register.StartupHook("MathMenu Ready",function(){d=MathJax.Menu.cookie;var a,b=function(a){e[c.explorer?"Enable":"Disable"](!0,!0),MathJax.Menu.saveCookie()},f=MathJax.Menu.ITEM,g=MathJax.Menu.menu,i={action:h.Reset},j={action:e.speechOption},k=f.SUBMENU(["Explorer","Explorer"],f.CHECKBOX(["Active","Active"],"explorer",{action:b}),f.RULE(),f.CHECKBOX(["Walker","Walker"],"Assistive-walker"),f.SUBMENU(["Highlight","Highlight"],f.RADIO(["none","None"],"Assistive-highlight",i),f.RADIO(["hover","Hover"],"Assistive-highlight",i),f.RADIO(["flame","Flame"],"Assistive-highlight",i)),f.SUBMENU(["Background","Background"],f.RADIO(["blue","Blue"],"Assistive-background",i),f.RADIO(["red","Red"],"Assistive-background",i),f.RADIO(["green","Green"],"Assistive-background",i),f.RADIO(["yellow","Yellow"],"Assistive-background",i),f.RADIO(["cyan","Cyan"],"Assistive-background",i),f.RADIO(["magenta","Magenta"],"Assistive-background",i),f.RADIO(["white","White"],"Assistive-background",i),f.RADIO(["black","Black"],"Assistive-background",i)),f.SUBMENU(["Foreground","Foreground"],f.RADIO(["black","Black"],"Assistive-foreground",i),f.RADIO(["white","White"],"Assistive-foreground",i),f.RADIO(["magenta","Magenta"],"Assistive-foreground",i),f.RADIO(["cyan","Cyan"],"Assistive-foreground",i),f.RADIO(["yellow","Yellow"],"Assistive-foreground",i),f.RADIO(["green","Green"],"Assistive-foreground",i),f.RADIO(["red","Red"],"Assistive-foreground",i),f.RADIO(["blue","Blue"],"Assistive-foreground",i)),f.RULE(),f.CHECKBOX(["SpeechOutput","Speech Output"],"Assistive-speech",{action:h.SpeechOutput}),f.CHECKBOX(["Subtitles","Subtitles"],"Assistive-subtitle",{disabled:!c["Assistive-speech"]}),f.RULE(),f.SUBMENU(["Mathspeak","Mathspeak Rules"],f.RADIO(["mathspeak-default","Verbose"],"Assistive-ruleset",j),f.RADIO(["mathspeak-brief","Brief"],"Assistive-ruleset",j),f.RADIO(["mathspeak-sbrief","Superbrief"],"Assistive-ruleset",j)),f.SUBMENU(["Chromevox","ChromeVox Rules"],f.RADIO(["chromevox-default","Verbose"],"Assistive-ruleset",j),f.RADIO(["chromevox-short","Short"],"Assistive-ruleset",j),f.RADIO(["chromevox-alternative","Alternative"],"Assistive-ruleset",j))),l=(g.FindId("Accessibility")||{}).submenu;l?(a=l.IndexOfId("Explorer"),null!==a?l.items[a]=k:(a=l.IndexOfId("CollapsibleMath"),l.items.splice(a+1,0,k))):(a=g.IndexOfId("CollapsibleMath"),g.items.splice(a+1,0,k)),c.explorer||e.DisableMenus(!0)},20)},20)}),MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){MathJax.Hub.Config({SVG:{addMMLclasses:!0}});var a=MathJax.OutputJax.SVG;if(parseFloat(a.version)<2.7){var b=a.getJaxFromMath;a.Augment({getJaxFromMath:function(a){return a.parentNode.className.match(/MathJax_SVG_Display/)&&(a=a.parentNode),b.call(this,a)}})}}),MathJax.Ajax.config.path.a11y||(MathJax.Ajax.config.path.a11y=MathJax.Hub.config.root+"/extensions/a11y"),MathJax.Ajax.Require("[a11y]/collapsible.js"),MathJax.Hub.Register.StartupHook("Collapsible Ready",function(){MathJax.Extension.explorer.Explorer.Startup(),MathJax.Ajax.loadComplete("[a11y]/explorer.js")}); \ No newline at end of file diff --git a/mathjax/asset/extensions/a11y/invalid_keypress.mp3 b/mathjax/asset/extensions/a11y/invalid_keypress.mp3 new file mode 100644 index 00000000..cba44de0 Binary files /dev/null and b/mathjax/asset/extensions/a11y/invalid_keypress.mp3 differ diff --git a/mathjax/asset/extensions/a11y/invalid_keypress.ogg b/mathjax/asset/extensions/a11y/invalid_keypress.ogg new file mode 100644 index 00000000..292cefdd Binary files /dev/null and b/mathjax/asset/extensions/a11y/invalid_keypress.ogg differ diff --git a/mathjax/asset/extensions/a11y/mathjax-sre.js b/mathjax/asset/extensions/a11y/mathjax-sre.js new file mode 100644 index 00000000..40a6151f --- /dev/null +++ b/mathjax/asset/extensions/a11y/mathjax-sre.js @@ -0,0 +1,985 @@ +// Copyright 2014-2018 Volker Sorge +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; +$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var a=0;return function(b){return $jscomp.SYMBOL_PREFIX+(b||"")+a++}}(); +$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var b=0;return $jscomp.iteratorPrototype(function(){return b>>0);goog.uidCounter_=0;goog.getHashCode=goog.getUid; +goog.removeHashCode=goog.removeUid;goog.cloneObject=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if("function"===typeof a.clone)return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=goog.cloneObject(a[c]);return b}return a};goog.bindNative_=function(a,b,c){return a.call.apply(a.bind,arguments)}; +goog.bindJs_=function(a,b,c){if(!a)throw Error();if(2Number(a[1])?!1:b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')});a("es6-impl",function(){return!0});a("es7",function(){return b("2 ** 2 == 4")}); +a("es8",function(){return b("async () => 1, true")});a("es9",function(){return b("({...rest} = {}), true")});a("es_next",function(){return!1});return c},goog.Transpiler.prototype.needsTranspile=function(a,b){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;this.requiresTranspilation_||(this.requiresTranspilation_=this.createRequiresTranspilation_());if(a in this.requiresTranspilation_)return this.requiresTranspilation_[a]?!0:!goog.inHtmlDocument_()||"es6"!=b||"noModule"in goog.global.document.createElement("script")? +!1:!0;throw Error("Unknown language mode: "+a);},goog.Transpiler.prototype.transpile=function(a,b){return goog.transpile_(a,b)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(a){return a.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={};this.idToPath_={};this.written_={};this.loadingDeps_=[];this.depsToLoad_=[];this.paused_=!1;this.factory_=new goog.DependencyFactory(goog.transpiler_);this.deferredCallbacks_={};this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap= +function(a,b){function c(){d&&(goog.global.setTimeout(d,0),d=null)}var d=b;if(a.length){b=[];for(var e=0;e\x3c/script>")}else{var d=b.createElement("script");d.defer=goog.Dependency.defer_;d.async=!1;d.type="text/javascript";var e=goog.getScriptNonce();e&&(d.nonce=e);goog.DebugLoader_.IS_OLD_IE_?(a.pause(),d.onreadystatechange=function(){if("loaded"==d.readyState||"complete"==d.readyState)a.loaded(), +a.resume()}):d.onload=function(){d.onload=null;a.loaded()};d.src=this.path;b.head.appendChild(d)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or seting CLOSURE_NO_DEPS to true."),a.loaded()):a.pause()},goog.Es6ModuleDependency=function(a,b,c,d,e){goog.Dependency.call(this,a,b,c,d,e)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load= +function(a){function b(a,b){b?d.write(''; - } else { - $use = PConfig::get(local_user(),'mathjax','use'); - if ($use) { - $b .= ''; - } - } -} -function mathjax_addon_admin_post (&$a) { - $baseurl = ((x($_POST, 'mjbaseurl')) ? trim($_POST['mjbaseurl']) : 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML'); - Config::set('mathjax','baseurl',$baseurl); - info(L10n::t('Settings updated.'). EOL); -} -function mathjax_addon_admin (App $a, &$o) { - $t = get_markup_template( "admin.tpl", "addon/mathjax/" ); - - if (Config::get('mathjax','baseurl','') == '') { - Config::set('mathjax','baseurl','https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML'); +function mathjax_settings_post($a) +{ + if (!local_user() || empty($_POST['mathjax-submit'])) { + return; } - $o = replace_macros( $t, [ - '$submit' => L10n::t('Save Settings'), - '$mjbaseurl' => ['mjbaseurl', L10n::t('MathJax Base URL'), Config::get('mathjax','baseurl' ), L10n::t('The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax.'), 'required'] + PConfig::set(local_user(), 'mathjax', 'use', intval($_POST['mathjax_use'])); +} + +function mathjax_settings(App $a, &$s) +{ + if (!local_user()) { + return; + } + + $use = PConfig::get(local_user(), 'mathjax', 'use', false); + + $tpl = Renderer::getMarkupTemplate('settings.tpl', __DIR__); + $s .= Renderer::replaceMacros($tpl, [ + '$title' => 'MathJax', + '$description' => L10n::t('The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail.'), + '$mathjax_use' => ['mathjax_use', L10n::t('Use the MathJax renderer'), $use, ''], + '$savesettings' => L10n::t('Save Settings'), ]); } + +function mathjax_footer(App $a, &$b) +{ + // if the visitor of the page is not a local_user, use MathJax + // otherwise check the users settings. + if (!local_user() || PConfig::get(local_user(), 'mathjax', 'use', false)) { + $a->registerFooterScript(__DIR__ . '/asset/MathJax.js?config=TeX-MML-AM_CHTML'); + $a->registerFooterScript(__DIR__ . '/mathjax.js'); + } +} diff --git a/mathjax/templates/admin.tpl b/mathjax/templates/admin.tpl deleted file mode 100644 index e4b89380..00000000 --- a/mathjax/templates/admin.tpl +++ /dev/null @@ -1,2 +0,0 @@ -{{include file="field_input.tpl" field=$mjbaseurl}} -
diff --git a/mathjax/templates/settings.tpl b/mathjax/templates/settings.tpl new file mode 100644 index 00000000..98bdb85e --- /dev/null +++ b/mathjax/templates/settings.tpl @@ -0,0 +1,16 @@ + + +

{{$title}}

+
+ \ No newline at end of file diff --git a/morechoice/lang/cs/messages.po b/morechoice/lang/cs/messages.po index 114d48b1..a89b96ac 100644 --- a/morechoice/lang/cs/messages.po +++ b/morechoice/lang/cs/messages.po @@ -64,7 +64,7 @@ msgstr "" #: morechoice.php:45 msgid "Metrosexual" -msgstr "" +msgstr "Metrosexuál" #: morechoice.php:46 msgid "Monk" @@ -112,7 +112,7 @@ msgstr "Těžké říct touhle dobou" #: morechoice.php:60 msgid "Girls with big tits" -msgstr "" +msgstr "Holky s velkýma kozama" #: morechoice.php:61 msgid "Millionaires" @@ -120,11 +120,11 @@ msgstr "Milionáři" #: morechoice.php:62 msgid "Guys with big schlongs" -msgstr "" +msgstr "Chlapi s velkýma ptákama" #: morechoice.php:63 msgid "Easy women" -msgstr "" +msgstr "Lehké ženy" #: morechoice.php:64 msgid "People with impaired mobility" @@ -132,7 +132,7 @@ msgstr "Lidé s pohybovým postižením" #: morechoice.php:65 msgid "Amputees" -msgstr "" +msgstr "Amputovaní" #: morechoice.php:66 msgid "Statues, mannequins and immobility" @@ -144,7 +144,7 @@ msgstr "Bolest" #: morechoice.php:68 msgid "Trans men" -msgstr "Transmuž" +msgstr "Transmuži" #: morechoice.php:69 msgid "Older women" @@ -164,11 +164,11 @@ msgstr "V nebezpečí" #: morechoice.php:73 msgid "Pretending to be male" -msgstr "Předstírám, že jsem muž" +msgstr "Předstírají, že jsou muži" #: morechoice.php:74 msgid "Pretending to be female" -msgstr "Předstírám, že jsem žena" +msgstr "Předstírají, že jsou ženy" #: morechoice.php:75 msgid "Breats" @@ -180,11 +180,11 @@ msgstr "" #: morechoice.php:77 msgid "Crying" -msgstr "Pláču" +msgstr "Pláčí" #: morechoice.php:78 msgid "Nappies/Diapers" -msgstr "" +msgstr "Plenky" #: morechoice.php:79 msgid "Trees" @@ -208,11 +208,11 @@ msgstr "Nohy" #: morechoice.php:84 msgid "Covered in insects" -msgstr "Pokryt/a hmyzem" +msgstr "Pokryti hmyzem" #: morechoice.php:85 msgid "Turning a human being into furniture" -msgstr "" +msgstr "Mění lidské bytosti v nábytek" #: morechoice.php:86 msgid "Elderly people" @@ -228,7 +228,7 @@ msgstr "Zločinci" #: morechoice.php:89 msgid "Stealing" -msgstr "" +msgstr "Kradou" #: morechoice.php:90 msgid "Breast milk" @@ -252,7 +252,7 @@ msgstr "Auto" #: morechoice.php:95 msgid "Menstruation" -msgstr "" +msgstr "Menstruace" #: morechoice.php:96 msgid "Mucus" @@ -268,15 +268,15 @@ msgstr "Nosy" #: morechoice.php:99 msgid "Navels" -msgstr "" +msgstr "Pupky" #: morechoice.php:100 msgid "Corpses" -msgstr "" +msgstr "Mrtvoly" #: morechoice.php:101 msgid "Smells" -msgstr "" +msgstr "Pachy" #: morechoice.php:102 msgid "Buttocks" @@ -296,7 +296,7 @@ msgstr "Močení" #: morechoice.php:106 msgid "Eating people" -msgstr "" +msgstr "Žerou lidi" #: morechoice.php:107 msgid "Being eaten" @@ -316,7 +316,7 @@ msgstr "" #: morechoice.php:114 msgid "Polygamist" -msgstr "" +msgstr "Polygamist(k)a" #: morechoice.php:115 msgid "Half married" diff --git a/morechoice/lang/cs/strings.php b/morechoice/lang/cs/strings.php index 6d1289c1..55bcbd4d 100644 --- a/morechoice/lang/cs/strings.php +++ b/morechoice/lang/cs/strings.php @@ -17,7 +17,7 @@ $a->strings["Gender fluid"] = ""; $a->strings["Kathoey"] = ""; $a->strings["Lady"] = "Dáma"; $a->strings["Lipstick lesbian"] = ""; -$a->strings["Metrosexual"] = ""; +$a->strings["Metrosexual"] = "Metrosexuál"; $a->strings["Monk"] = "Mnich"; $a->strings["Nun"] = "Jeptiška"; $a->strings["Soft butch"] = ""; @@ -29,58 +29,58 @@ $a->strings["Transvesti"] = "Transvestita"; $a->strings["Trigender"] = ""; $a->strings["Can't remember"] = "Nepamatuju si"; $a->strings["Hard to tell these days"] = "Těžké říct touhle dobou"; -$a->strings["Girls with big tits"] = ""; +$a->strings["Girls with big tits"] = "Holky s velkýma kozama"; $a->strings["Millionaires"] = "Milionáři"; -$a->strings["Guys with big schlongs"] = ""; -$a->strings["Easy women"] = ""; +$a->strings["Guys with big schlongs"] = "Chlapi s velkýma ptákama"; +$a->strings["Easy women"] = "Lehké ženy"; $a->strings["People with impaired mobility"] = "Lidé s pohybovým postižením"; -$a->strings["Amputees"] = ""; +$a->strings["Amputees"] = "Amputovaní"; $a->strings["Statues, mannequins and immobility"] = "Sochy, figuríny a nepohyblivost"; $a->strings["Pain"] = "Bolest"; -$a->strings["Trans men"] = "Transmuž"; +$a->strings["Trans men"] = "Transmuži"; $a->strings["Older women"] = "Starší ženy"; $a->strings["Asphyxiation"] = ""; $a->strings["In public"] = "Na veřejnosti"; $a->strings["In danger"] = "V nebezpečí"; -$a->strings["Pretending to be male"] = "Předstírám, že jsem muž"; -$a->strings["Pretending to be female"] = "Předstírám, že jsem žena"; +$a->strings["Pretending to be male"] = "Předstírají, že jsou muži"; +$a->strings["Pretending to be female"] = "Předstírají, že jsou ženy"; $a->strings["Breats"] = ""; $a->strings["Scat"] = ""; -$a->strings["Crying"] = "Pláču"; -$a->strings["Nappies/Diapers"] = ""; +$a->strings["Crying"] = "Pláčí"; +$a->strings["Nappies/Diapers"] = "Plenky"; $a->strings["Trees"] = "Stromy"; $a->strings["Vomit"] = "Zvracení"; $a->strings["Murder"] = "Vražda"; $a->strings["Fat people"] = "Tlustí lidé"; $a->strings["Feet"] = "Nohy"; -$a->strings["Covered in insects"] = "Pokryt/a hmyzem"; -$a->strings["Turning a human being into furniture"] = ""; +$a->strings["Covered in insects"] = "Pokryti hmyzem"; +$a->strings["Turning a human being into furniture"] = "Mění lidské bytosti v nábytek"; $a->strings["Elderly people"] = "Postarší lidé"; $a->strings["Transgender people"] = "Transgenderoví lidé"; $a->strings["Criminals"] = "Zločinci"; -$a->strings["Stealing"] = ""; +$a->strings["Stealing"] = "Kradou"; $a->strings["Breast milk"] = ""; $a->strings["Immersing genitals in liquids"] = ""; $a->strings["Giants"] = "Obři"; $a->strings["Masochism"] = "Masochismus"; $a->strings["Cars"] = "Auto"; -$a->strings["Menstruation"] = ""; +$a->strings["Menstruation"] = "Menstruace"; $a->strings["Mucus"] = ""; $a->strings["Obscene language"] = "Sprostý jazyk"; $a->strings["Noses"] = "Nosy"; -$a->strings["Navels"] = ""; -$a->strings["Corpses"] = ""; -$a->strings["Smells"] = ""; +$a->strings["Navels"] = "Pupky"; +$a->strings["Corpses"] = "Mrtvoly"; +$a->strings["Smells"] = "Pachy"; $a->strings["Buttocks"] = ""; $a->strings["Nonliving objects"] = "Neživoucí předměty"; $a->strings["Sleeping people"] = "Spící lidé"; $a->strings["Urination"] = "Močení"; -$a->strings["Eating people"] = ""; +$a->strings["Eating people"] = "Žerou lidi"; $a->strings["Being eaten"] = ""; $a->strings["Animals"] = "Zvířata"; $a->strings["I'd rather just have some chocolate"] = "Radši bych si prostě dal čokoládu"; $a->strings["Married to my job"] = ""; -$a->strings["Polygamist"] = ""; +$a->strings["Polygamist"] = "Polygamist(k)a"; $a->strings["Half married"] = "Napůl ženatý/vdaná"; $a->strings["Living in the past"] = "Žiju v minulosti"; $a->strings["Pretending to be over my ex"] = ""; diff --git a/morechoice/lang/de/messages.po b/morechoice/lang/de/messages.po index b4d20ca3..d8615315 100644 --- a/morechoice/lang/de/messages.po +++ b/morechoice/lang/de/messages.po @@ -3,14 +3,18 @@ # This file is distributed under the same license as the Friendica morechoice addon package. # # +# Translators: +# Tobias Diekershoff , 2018 +# Vinzenz Vietzke , 2018 +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-08-07 15:04+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Tobias Diekershoff , 2018\n" +"PO-Revision-Date: 2018-08-07 18:18+0000\n" +"Last-Translator: Vinzenz Vietzke , 2018\n" "Language-Team: German (https://www.transifex.com/Friendica/teams/12172/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -120,7 +124,7 @@ msgstr "Millionäre" #: morechoice.php:62 msgid "Guys with big schlongs" -msgstr "" +msgstr "Typen mit großen Schwänzen" #: morechoice.php:63 msgid "Easy women" @@ -236,7 +240,7 @@ msgstr "Muttermilch" #: morechoice.php:91 msgid "Immersing genitals in liquids" -msgstr "" +msgstr "Eintauchen von Genitalien in Flüssigkeiten" #: morechoice.php:92 msgid "Giants" @@ -292,11 +296,11 @@ msgstr "Schlafende Personen" #: morechoice.php:105 msgid "Urination" -msgstr "" +msgstr "Urinieren" #: morechoice.php:106 msgid "Eating people" -msgstr "" +msgstr "Essende Menschen" #: morechoice.php:107 msgid "Being eaten" diff --git a/morechoice/lang/de/strings.php b/morechoice/lang/de/strings.php index 682d2ba1..c1ea3ba6 100644 --- a/morechoice/lang/de/strings.php +++ b/morechoice/lang/de/strings.php @@ -31,7 +31,7 @@ $a->strings["Can't remember"] = "Kann mich nicht erinnern"; $a->strings["Hard to tell these days"] = "Schwer zu sagen dieser Tage"; $a->strings["Girls with big tits"] = "Mädels mit großen Brüsten"; $a->strings["Millionaires"] = "Millionäre"; -$a->strings["Guys with big schlongs"] = ""; +$a->strings["Guys with big schlongs"] = "Typen mit großen Schwänzen"; $a->strings["Easy women"] = "Leichte Frauen"; $a->strings["People with impaired mobility"] = "Menschen mit eingeschränkter Mobilität"; $a->strings["Amputees"] = "Amputierte"; @@ -60,7 +60,7 @@ $a->strings["Transgender people"] = "Transgender Personen"; $a->strings["Criminals"] = "Kriminelle"; $a->strings["Stealing"] = "Stehlen"; $a->strings["Breast milk"] = "Muttermilch"; -$a->strings["Immersing genitals in liquids"] = ""; +$a->strings["Immersing genitals in liquids"] = "Eintauchen von Genitalien in Flüssigkeiten"; $a->strings["Giants"] = "Riesen"; $a->strings["Masochism"] = "Masochismus"; $a->strings["Cars"] = "Autos"; @@ -74,8 +74,8 @@ $a->strings["Smells"] = "Gerüche"; $a->strings["Buttocks"] = "Hintern"; $a->strings["Nonliving objects"] = "Leblose Objekte"; $a->strings["Sleeping people"] = "Schlafende Personen"; -$a->strings["Urination"] = ""; -$a->strings["Eating people"] = ""; +$a->strings["Urination"] = "Urinieren"; +$a->strings["Eating people"] = "Essende Menschen"; $a->strings["Being eaten"] = "Verspeist zu werden"; $a->strings["Animals"] = "Tiere"; $a->strings["I'd rather just have some chocolate"] = "Ich bevorzuge eine Tafel Schokolade"; diff --git a/morechoice/lang/fr/messages.po b/morechoice/lang/fr/messages.po new file mode 100644 index 00000000..31ee975e --- /dev/null +++ b/morechoice/lang/fr/messages.po @@ -0,0 +1,342 @@ +# ADDON morechoice +# Copyright (C) +# This file is distributed under the same license as the Friendica morechoice addon package. +# +# +# Translators: +# Marie Olive , 2018 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-07 15:04+0200\n" +"PO-Revision-Date: 2018-08-07 18:18+0000\n" +"Last-Translator: Marie Olive , 2018\n" +"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: morechoice.php:34 +msgid "Androgyne" +msgstr "Androgyne" + +#: morechoice.php:35 +msgid "Bear" +msgstr "Ours" + +#: morechoice.php:36 +msgid "Bigender" +msgstr "Bigenre" + +#: morechoice.php:37 +msgid "Cross dresser" +msgstr "" + +#: morechoice.php:38 +msgid "Drag queen" +msgstr "drag queen" + +#: morechoice.php:39 +msgid "Eunuch" +msgstr "eunuque" + +#: morechoice.php:40 +msgid "Faux queen" +msgstr "" + +#: morechoice.php:41 +msgid "Gender fluid" +msgstr "genre fluide" + +#: morechoice.php:42 +msgid "Kathoey" +msgstr "" + +#: morechoice.php:43 +msgid "Lady" +msgstr "" + +#: morechoice.php:44 +msgid "Lipstick lesbian" +msgstr "" + +#: morechoice.php:45 +msgid "Metrosexual" +msgstr "métrosexuel" + +#: morechoice.php:46 +msgid "Monk" +msgstr "moine" + +#: morechoice.php:47 +msgid "Nun" +msgstr "religieuse" + +#: morechoice.php:48 +msgid "Soft butch" +msgstr "" + +#: morechoice.php:49 +msgid "Stone femme" +msgstr "" + +#: morechoice.php:50 +msgid "Tomboy" +msgstr "" + +#: morechoice.php:51 +msgid "Transman" +msgstr "homme trans" + +#: morechoice.php:52 +msgid "Transwoman" +msgstr "femme trans" + +#: morechoice.php:53 +msgid "Transvesti" +msgstr "travesti" + +#: morechoice.php:54 +msgid "Trigender" +msgstr "trigenre" + +#: morechoice.php:55 +msgid "Can't remember" +msgstr "Ne se rappelle pas" + +#: morechoice.php:56 +msgid "Hard to tell these days" +msgstr "Difficile à dire en ce moment" + +#: morechoice.php:60 +msgid "Girls with big tits" +msgstr "Filles à gros seins" + +#: morechoice.php:61 +msgid "Millionaires" +msgstr "Millionnaires" + +#: morechoice.php:62 +msgid "Guys with big schlongs" +msgstr "" + +#: morechoice.php:63 +msgid "Easy women" +msgstr "Femmes faciles" + +#: morechoice.php:64 +msgid "People with impaired mobility" +msgstr "Personnes à mobilité réduite" + +#: morechoice.php:65 +msgid "Amputees" +msgstr "Amputés" + +#: morechoice.php:66 +msgid "Statues, mannequins and immobility" +msgstr "" + +#: morechoice.php:67 +msgid "Pain" +msgstr "Douleur" + +#: morechoice.php:68 +msgid "Trans men" +msgstr "Hommes trans" + +#: morechoice.php:69 +msgid "Older women" +msgstr "" + +#: morechoice.php:70 +msgid "Asphyxiation" +msgstr "" + +#: morechoice.php:71 +msgid "In public" +msgstr "" + +#: morechoice.php:72 +msgid "In danger" +msgstr "" + +#: morechoice.php:73 +msgid "Pretending to be male" +msgstr "" + +#: morechoice.php:74 +msgid "Pretending to be female" +msgstr "" + +#: morechoice.php:75 +msgid "Breats" +msgstr "" + +#: morechoice.php:76 +msgid "Scat" +msgstr "" + +#: morechoice.php:77 +msgid "Crying" +msgstr "" + +#: morechoice.php:78 +msgid "Nappies/Diapers" +msgstr "" + +#: morechoice.php:79 +msgid "Trees" +msgstr "" + +#: morechoice.php:80 +msgid "Vomit" +msgstr "" + +#: morechoice.php:81 +msgid "Murder" +msgstr "" + +#: morechoice.php:82 +msgid "Fat people" +msgstr "" + +#: morechoice.php:83 +msgid "Feet" +msgstr "" + +#: morechoice.php:84 +msgid "Covered in insects" +msgstr "" + +#: morechoice.php:85 +msgid "Turning a human being into furniture" +msgstr "" + +#: morechoice.php:86 +msgid "Elderly people" +msgstr "" + +#: morechoice.php:87 +msgid "Transgender people" +msgstr "" + +#: morechoice.php:88 +msgid "Criminals" +msgstr "" + +#: morechoice.php:89 +msgid "Stealing" +msgstr "" + +#: morechoice.php:90 +msgid "Breast milk" +msgstr "" + +#: morechoice.php:91 +msgid "Immersing genitals in liquids" +msgstr "" + +#: morechoice.php:92 +msgid "Giants" +msgstr "" + +#: morechoice.php:93 +msgid "Masochism" +msgstr "" + +#: morechoice.php:94 +msgid "Cars" +msgstr "" + +#: morechoice.php:95 +msgid "Menstruation" +msgstr "" + +#: morechoice.php:96 +msgid "Mucus" +msgstr "" + +#: morechoice.php:97 +msgid "Obscene language" +msgstr "" + +#: morechoice.php:98 +msgid "Noses" +msgstr "" + +#: morechoice.php:99 +msgid "Navels" +msgstr "" + +#: morechoice.php:100 +msgid "Corpses" +msgstr "" + +#: morechoice.php:101 +msgid "Smells" +msgstr "" + +#: morechoice.php:102 +msgid "Buttocks" +msgstr "" + +#: morechoice.php:103 +msgid "Nonliving objects" +msgstr "" + +#: morechoice.php:104 +msgid "Sleeping people" +msgstr "" + +#: morechoice.php:105 +msgid "Urination" +msgstr "" + +#: morechoice.php:106 +msgid "Eating people" +msgstr "" + +#: morechoice.php:107 +msgid "Being eaten" +msgstr "" + +#: morechoice.php:108 +msgid "Animals" +msgstr "" + +#: morechoice.php:109 +msgid "I'd rather just have some chocolate" +msgstr "" + +#: morechoice.php:113 +msgid "Married to my job" +msgstr "" + +#: morechoice.php:114 +msgid "Polygamist" +msgstr "" + +#: morechoice.php:115 +msgid "Half married" +msgstr "" + +#: morechoice.php:116 +msgid "Living in the past" +msgstr "" + +#: morechoice.php:117 +msgid "Pretending to be over my ex" +msgstr "" + +#: morechoice.php:118 +msgid "Hurt in the past" +msgstr "" + +#: morechoice.php:119 +msgid "Wallowing in self-pity" +msgstr "" diff --git a/morechoice/lang/fr/strings.php b/morechoice/lang/fr/strings.php new file mode 100644 index 00000000..7d57e3be --- /dev/null +++ b/morechoice/lang/fr/strings.php @@ -0,0 +1,88 @@ + 1);; +}} +; +$a->strings["Androgyne"] = "Androgyne"; +$a->strings["Bear"] = "Ours"; +$a->strings["Bigender"] = "Bigenre"; +$a->strings["Cross dresser"] = ""; +$a->strings["Drag queen"] = "drag queen"; +$a->strings["Eunuch"] = "eunuque"; +$a->strings["Faux queen"] = ""; +$a->strings["Gender fluid"] = "genre fluide"; +$a->strings["Kathoey"] = ""; +$a->strings["Lady"] = ""; +$a->strings["Lipstick lesbian"] = ""; +$a->strings["Metrosexual"] = "métrosexuel"; +$a->strings["Monk"] = "moine"; +$a->strings["Nun"] = "religieuse"; +$a->strings["Soft butch"] = ""; +$a->strings["Stone femme"] = ""; +$a->strings["Tomboy"] = ""; +$a->strings["Transman"] = "homme trans"; +$a->strings["Transwoman"] = "femme trans"; +$a->strings["Transvesti"] = "travesti"; +$a->strings["Trigender"] = "trigenre"; +$a->strings["Can't remember"] = "Ne se rappelle pas"; +$a->strings["Hard to tell these days"] = "Difficile à dire en ce moment"; +$a->strings["Girls with big tits"] = "Filles à gros seins"; +$a->strings["Millionaires"] = "Millionnaires"; +$a->strings["Guys with big schlongs"] = ""; +$a->strings["Easy women"] = "Femmes faciles"; +$a->strings["People with impaired mobility"] = "Personnes à mobilité réduite"; +$a->strings["Amputees"] = "Amputés"; +$a->strings["Statues, mannequins and immobility"] = ""; +$a->strings["Pain"] = "Douleur"; +$a->strings["Trans men"] = "Hommes trans"; +$a->strings["Older women"] = ""; +$a->strings["Asphyxiation"] = ""; +$a->strings["In public"] = ""; +$a->strings["In danger"] = ""; +$a->strings["Pretending to be male"] = ""; +$a->strings["Pretending to be female"] = ""; +$a->strings["Breats"] = ""; +$a->strings["Scat"] = ""; +$a->strings["Crying"] = ""; +$a->strings["Nappies/Diapers"] = ""; +$a->strings["Trees"] = ""; +$a->strings["Vomit"] = ""; +$a->strings["Murder"] = ""; +$a->strings["Fat people"] = ""; +$a->strings["Feet"] = ""; +$a->strings["Covered in insects"] = ""; +$a->strings["Turning a human being into furniture"] = ""; +$a->strings["Elderly people"] = ""; +$a->strings["Transgender people"] = ""; +$a->strings["Criminals"] = ""; +$a->strings["Stealing"] = ""; +$a->strings["Breast milk"] = ""; +$a->strings["Immersing genitals in liquids"] = ""; +$a->strings["Giants"] = ""; +$a->strings["Masochism"] = ""; +$a->strings["Cars"] = ""; +$a->strings["Menstruation"] = ""; +$a->strings["Mucus"] = ""; +$a->strings["Obscene language"] = ""; +$a->strings["Noses"] = ""; +$a->strings["Navels"] = ""; +$a->strings["Corpses"] = ""; +$a->strings["Smells"] = ""; +$a->strings["Buttocks"] = ""; +$a->strings["Nonliving objects"] = ""; +$a->strings["Sleeping people"] = ""; +$a->strings["Urination"] = ""; +$a->strings["Eating people"] = ""; +$a->strings["Being eaten"] = ""; +$a->strings["Animals"] = ""; +$a->strings["I'd rather just have some chocolate"] = ""; +$a->strings["Married to my job"] = ""; +$a->strings["Polygamist"] = ""; +$a->strings["Half married"] = ""; +$a->strings["Living in the past"] = ""; +$a->strings["Pretending to be over my ex"] = ""; +$a->strings["Hurt in the past"] = ""; +$a->strings["Wallowing in self-pity"] = ""; diff --git a/namethingy/namethingy.php b/namethingy/namethingy.php index c758fc08..f6a717fc 100644 --- a/namethingy/namethingy.php +++ b/namethingy/namethingy.php @@ -27,7 +27,7 @@ function namethingy_module() {} function namethingy_content(&$a) { -$baseurl = $a->get_baseurl() . '/addon/namethingy'; +$baseurl = $a->getBaseURL() . '/addon/namethingy'; $o .= <<< EOT